/* ===================================================================
   Traffic: on top of style/websites.css (the glass, the finder, the cards, the buttons, the table of Websites).
   Here: the on/off bar at the top (NEX's nexVISBAR, or our own buttons), the filter chips under
   the finder, the ten cards, the chart (bars and lines: ours, SVG; squares: the hours of the week), the switcher of the tables
   and the table (NEX's nexSEGMENT and nexTABLE, or our own when NEX is not there).
   Light + dark, phone width (16px gutter, no sideways scroll of the page), right-to-left through logical properties.
   =================================================================== */


/* a part switched off at the top: hidden (NEX's bar does it with this attribute; without NEX our buttons do the same) */
.tr [data-nexvisbar-hidden] { display: none !important; }

/* ===== under the finder, one row: the filter chips, and at its end the bar that switches the KPIs and the chart on and off ===== */

.tr-filterrow {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 16px;
    margin-bottom: 20px;
}

.tr-visbar {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    min-height: 28px;   /* (kept while NEX is on its way, so nothing moves when the bar comes) */
    margin-inline-start: auto;
}

.tr-visbar .nexvisbar {
    width: auto;
    max-width: 100%;
}

/* without NEX: plain buttons (pressed = on) */
.tr-vis {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.tr-vis-t {
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tr-vis-b {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--glass-field);
    color: var(--color-text-muted);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}

.tr-vis-b .material-symbols-outlined { font-size: 17px; }
.tr-vis-b:hover { color: var(--color-text-soft); }

.tr-vis-b[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--color-green) 55%, transparent);
    background: color-mix(in srgb, var(--color-green) 13%, transparent);
    color: var(--color-text);
}

.tr-finder { margin-bottom: 12px; }

/* the filters: chips with a cross, "+ Add filter", "Clear filters" (scripts/livefilter.js) */
.tr-filters {
    position: relative;
    z-index: 15;   /* its popup floats over the cards below */
    flex: 1 1 320px;
    min-width: 0;
}

/* filters are on and nothing matches them */
.tr-nomatch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: -8px 0 18px;
    padding: 9px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--color-text) 6%, transparent);
    color: var(--color-text-soft);
    font-size: 13.5px;
    font-weight: 600;
}

.tr-nomatch > span:not(.material-symbols-outlined) { flex: 1 1 220px; }
.tr-nomatch .material-symbols-outlined { font-size: 19px; }

/* ===== the ten cards (style/websites.css): all in one row when there is room, 5 in a row on smaller screens, 2 on phones.
   The rows follow the width of the cards' own box (a container query), not of the window ===== */

.tr-summary {
    position: relative;
    z-index: 4;   /* (the help of a card floats over the chart under it) */
    margin-bottom: 22px;
    container: tr-kpis / inline-size;
}

.ws-kpis.tr-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* a long word of a name ("Conversiepercentage") breaks between its syllables, never out of its card; short words stay whole */
.tr-kpis .ws-kpi-t {
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 12 5 5;
}

/* two in a row: the right-hand card opens its help towards the start */
.tr-kpis .ws-kpi:nth-child(n) .ws-tip { inset-inline: 0 auto; }
.tr-kpis .ws-kpi:nth-child(2n) .ws-tip { inset-inline: auto 0; }

@container tr-kpis (min-width: 760px) {
    .ws-kpis.tr-kpis {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
    }

    .tr-kpis .ws-kpi:nth-child(n) .ws-tip { inset-inline: 0 auto; }
    .tr-kpis .ws-kpi:nth-child(5n) .ws-tip,
    .tr-kpis .ws-kpi:nth-child(5n - 1) .ws-tip { inset-inline: auto 0; }
}

/* all 10 in one row from about a 1280 px window (the common laptops) */
@container tr-kpis (min-width: 1200px) {
    .ws-kpis.tr-kpis {
        grid-template-columns: repeat(10, minmax(0, 1fr));
        gap: 10px;
    }

    /* the picture sits above the name, so the name has the whole width of the card and its words stay whole */
    .tr-kpis .ws-kpi-h {
        flex-direction: column;
        align-items: stretch;
    }

    /* the second half of the row opens its help towards the start */
    .tr-kpis .ws-kpi:nth-child(n) .ws-tip { inset-inline: 0 auto; }
    .tr-kpis .ws-kpi:nth-child(n + 6) .ws-tip { inset-inline: auto 0; }
}

/* narrow cards (5 in a row on a smaller screen, or all 10 in one row): a smaller picture, number and line; "vs the previous
   7 days" is not written out (a screen reader still says it, and it shows when the pointer rests on the change) */
@container tr-kpis ((min-width: 760px) and (max-width: 1099.98px)) or (min-width: 1200px) {
    .tr-kpis .ws-kpi {
        gap: 6px;
        padding: 10px 11px;
    }

    .tr-kpis .ws-kpi-h { gap: 7px; }

    .tr-kpis .ws-kpi-ico {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .tr-kpis .ws-kpi-ico .material-symbols-outlined { font-size: 17px; }
    .tr-kpis .ws-kpi-t { font-size: 12px; }

    .tr-kpis .ws-kpi-v {
        font-size: 20px;
        white-space: normal;   /* ("12 min 35 s" may take two lines rather than leave its card) */
        overflow-wrap: anywhere;
    }

    .tr-kpis .ws-kpi-trend { min-height: 16px; }

    .tr-kpis .ws-cmp {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .tr-kpis .ws-kpi-spark { height: 22px; }
}

/* ===== the chart ===== */

.tr-chart {
    margin-bottom: 26px;
    padding: 14px 16px 10px;
    border-radius: 16px;
}

.tr-chart:hover,
.tr-chart:focus-within { background: var(--glass-hover); }

.tr-chart-h {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 10px;
}

.tr-chart-t {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
}

/* the numbers that can be on: coloured pills (as the tabs of Real-time's feed) */
.tr-metrics {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.tr-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text-muted);
    font-size: 12.5px;
    font-weight: 700;
    transition: background .15s, border-color .15s, color .15s;
}

.tr-metric:hover { color: var(--color-text-soft); background: color-mix(in srgb, var(--color-text) 5%, transparent); }

.tr-metric-dot {
    flex: none;
    width: 9px;
    height: 9px;
    border: 2px solid var(--kind);
    border-radius: 50%;
}

.tr-metric.is-on {
    border-color: color-mix(in srgb, var(--kind) 55%, transparent);
    background: color-mix(in srgb, var(--kind) 13%, transparent);
    color: var(--color-text);
}

.tr-metric.is-on .tr-metric-dot { background: var(--kind); }
.tr-metric[aria-disabled="true"] { cursor: default; }

/* "Previous period": on or off; its dashed line is the legend of the dashed lines */
.tr-prevbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text-muted);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}

.tr-prevbtn:hover { color: var(--color-text-soft); background: color-mix(in srgb, var(--color-text) 5%, transparent); }

.tr-prevbtn-i line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-dasharray: 4 3;
}

.tr-prevbtn[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--color-text) 30%, transparent);
    background: color-mix(in srgb, var(--color-text) 7%, transparent);
    color: var(--color-text);
}

/* after a click on a day or a month: the way back to the range before */
.tr-zoom { margin-bottom: 10px; }
[dir="rtl"] .tr-zoom .material-symbols-outlined { transform: scaleX(-1); }

/* the drawing: ours (SVG); the tip and the band of the bucket under the pointer float over it */
.tr-plot {
    position: relative;
    min-height: 210px;
    outline: 0;
    border-radius: 10px;
    touch-action: pan-y;
}

.tr-plot:focus-visible { box-shadow: 0 0 0 2px var(--color-green); }

.tr-plot-svg { width: 100%; }
.tr-plot-svg svg { display: block; overflow: visible; }

.tr-plot .tr-ax {
    fill: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.tr-plot .tr-grid { stroke: var(--ws-line); stroke-width: 1; }
.tr-plot .tr-grid.is-base { stroke: color-mix(in srgb, var(--color-text) 22%, transparent); }

.tr-plot .tr-line {
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tr-plot .tr-area { opacity: .12; }

/* the period before: thin, dashed, a little lighter; over the bars with an edge of the card's colour */
.tr-plot .tr-prev {
    fill: none;
    stroke-width: 1.7;
    stroke-dasharray: 5 4;
    stroke-linecap: butt;
    stroke-linejoin: round;
    opacity: .8;
}

.tr-plot .tr-prev-edge {
    fill: none;
    stroke: var(--glass-hover);
    stroke-width: 4;
    stroke-linejoin: round;
    opacity: .85;
}

.tr-plot .tr-prev-dot {
    fill: var(--glass-hover);
    stroke-width: 1.7;
    opacity: .8;
}

/* a day or a month can be opened with a click */
.tr-plot[data-zoom="true"] { cursor: pointer; }

.tr-hover {
    position: absolute;
    border-radius: 4px;
    background: color-mix(in srgb, var(--color-text) 5%, transparent);
    pointer-events: none;
}

.tr-hover[hidden] { display: none; }

.tr-tip {
    position: absolute;
    top: 4px;
    z-index: 2;
    min-width: 160px;
    max-width: 290px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--glass-pop);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    font-size: 12.5px;
    pointer-events: none;
}

:root[data-theme="dark"] .tr-tip { box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }

.tr-tip-t {
    margin: 0 0 4px;
    color: var(--color-text-soft);
    font-weight: 700;
    white-space: nowrap;
}

.tr-tip-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 2px 0 0;
}

.tr-tip-row b {
    margin-inline-start: auto;
    padding-inline-start: 12px;
    font-variant-numeric: tabular-nums;
}

.tr-tip-dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

/* which time of the period before the numbers are compared with, and "before 98" after each number */
.tr-tip-s {
    margin: -2px 0 5px;
    color: var(--color-text-muted);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.tr-tip-was {
    flex: none;
    color: var(--color-text-muted);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* "Click to see this day" */
.tr-tip-hint {
    margin: 6px 0 0;
    padding-top: 5px;
    border-top: 1px solid var(--ws-line);
    color: var(--color-text-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.tr-plot-empty {
    position: absolute;
    inset: 40% 0 auto;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

.tr-plot-svg,
.tr-heat-box,
.tr-breakdown .tr-table,
.tr-breakdown .tr-empty { transition: opacity .2s ease; }

/* while new numbers are on their way the old ones stay, a little faded (nothing that pulses) */
.tr-chart.is-busy .tr-plot-svg,
.tr-heat.is-busy .tr-heat-box,
.tr-breakdown.is-busy .tr-table,
.tr-breakdown.is-busy .tr-empty { opacity: .5; }

/* ===== the switcher of the tables: one row of tabs that scrolls sideways (fading out at the edge it runs on past) ===== */

.tr-dims {
    position: relative;
    border-bottom: 1px solid var(--ws-line);
}

.tr-dims .nexsegment {
    display: flex;
    width: 100%;
}

.tr-dims[data-over="1"]:not([data-end="1"]) .nexsegment,
.tr-dims[data-over="1"]:not([data-end="1"]) .tr-seg {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}

.tr-dims[data-over="1"]:not([data-start="1"]):not([data-end="1"]) .nexsegment,
.tr-dims[data-over="1"]:not([data-start="1"]):not([data-end="1"]) .tr-seg {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.tr-dims[data-over="1"][data-end="1"]:not([data-start="1"]) .nexsegment,
.tr-dims[data-over="1"][data-end="1"]:not([data-start="1"]) .tr-seg {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 40px);
    mask-image: linear-gradient(to right, transparent, #000 40px);
}

[dir="rtl"] .tr-dims[data-over="1"]:not([data-end="1"]) .nexsegment,
[dir="rtl"] .tr-dims[data-over="1"]:not([data-end="1"]) .tr-seg {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent);
}

[dir="rtl"] .tr-dims[data-over="1"]:not([data-start="1"]):not([data-end="1"]) .nexsegment,
[dir="rtl"] .tr-dims[data-over="1"]:not([data-start="1"]):not([data-end="1"]) .tr-seg {
    -webkit-mask-image: linear-gradient(to left, transparent, #000 40px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to left, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

[dir="rtl"] .tr-dims[data-over="1"][data-end="1"]:not([data-start="1"]) .nexsegment,
[dir="rtl"] .tr-dims[data-over="1"][data-end="1"]:not([data-start="1"]) .tr-seg {
    -webkit-mask-image: linear-gradient(to left, transparent, #000 40px);
    mask-image: linear-gradient(to left, transparent, #000 40px);
}

/* without NEX: the page's own row of tabs */
.ws-seg.tr-seg {
    display: flex;
    max-width: 100%;
    margin-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tr-seg::-webkit-scrollbar { display: none; }

.tr-seg button {
    flex: none;
    white-space: nowrap;
}

.tr-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text) 10%, transparent);
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tr-seg button[aria-pressed="true"] .tr-badge { background: rgba(255, 255, 255, .3); }

/* ===== the search of the table and the hint ===== */

.tr-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 12px 0 10px;
}

.tr-search {
    display: flex;
    flex: 0 1 320px;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 38px;
    padding-inline: 10px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--glass-field);
    transition: border-color .15s, box-shadow .15s;
}

.tr-search:focus-within {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-green) 18%, transparent);
}

.tr-search .material-symbols-outlined {
    flex: none;
    color: var(--color-text-muted);
    font-size: 19px;
}

.tr-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
}

.tr-hint {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

.tr-limit {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, #f59e0b 15%, transparent);
    font-size: 13px;
    font-weight: 600;
}

.tr-more {
    margin: 10px 0 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

.tr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 36px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass);
    color: var(--color-text-soft);
    font-size: 14px;
    text-align: center;
}

.tr-empty p { margin: 0; }

/* ===== the table (NEX's nexTABLE) ===== */

.tr-table .nextable {
    border-color: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* no toolbar, no column picker, no "tick all" (a filter takes at most 20 values) */
.tr-table .nextable-tabrow { display: none !important; }
.tr-table .nextable-th [data-do="pick-all"] { visibility: hidden; }

/* "(unknown)" and a value with a comma cannot be a filter: no checkbox */
.tr-table .nextable-cell[data-type="pick"][data-key=""] input,
.tr-table .nextable-cell[data-type="pick"][data-key*=","] input { visibility: hidden; }

.tr-table .nextable-cell[data-type="pick"] { cursor: pointer; }

.tr-table .nextable-cell input[type="checkbox"] {
    width: 17px;
    height: 17px;
}

.tr-table .nextable-th { font-size: 12px; }

/* the arrow of the sorted column points the way the numbers go (down: from the largest) */
.tr-table .nextable-th[data-sort="desc"] .nextable-arrow { transform: none; }
.tr-table .nextable-th[data-sort="asc"] .nextable-arrow { transform: rotate(180deg); }

/* the name: its picture, its name, a second line where it helps */
.tr-table .nextable-cell.nextable-own {
    display: flex;
    align-items: center;
    padding-block: 0;
}

.tr-cell {
    display: flex;
    width: 100%;
    min-width: 0;
}

.tr-name {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    line-height: 1.3;
}

.tr-name .si { flex: none; }

.tr-name-t {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tr-name-v,
.tr-name-s {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tr-name-v { font-weight: 700; }

.tr-name-s {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
}

.tr-host { font-weight: 700; }

.tr-name.is-unknown .tr-name-v {
    color: var(--color-text-muted);
    font-style: italic;
    font-weight: 600;
}

/* a page's website (when several are in view): its favicon over the tinted initials */
.tr-fav {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 24px;
    height: 24px;
    overflow: hidden;
    border-radius: 7px;
    background: color-mix(in srgb, var(--c) 16%, transparent);
    color: var(--c);
    font-size: 9.5px;
    font-weight: 800;
}

.tr-fav img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 3px;
    background: var(--color-bg);
    object-fit: contain;
}

/* right to left: the frozen columns stick to the start (NEX writes "left"), the bars grow from the start */
[dir="rtl"] .tr-table .nextable-th[data-sticky="true"],
[dir="rtl"] .tr-table .nextable-cell[data-sticky="true"] {
    right: var(--nextable-left);
    left: auto;
    box-shadow: -1px 0 0 var(--nextable-line);
}

[dir="rtl"] .tr-table .nextable-cell[data-bar] {
    background-image: linear-gradient(to left, var(--nextable-soft) var(--nextable-fill), transparent var(--nextable-fill));
}

/* the change against the period before (▲ 12%, ▼ 8%, new, –), at the end of its cell as the numbers */
.tr-cell-change { justify-content: flex-end; }
.tr-change { white-space: nowrap; }

/* ===== the squares of the chart: 7 days x 24 hours ===== */

.tr-heat { padding-bottom: 4px; }

/* in the head of the card, instead of the numbers: what the squares count (lighter than Bars | Lines | Squares next to it) */
.tr-heat-kind {
    flex: 1 1 auto;
    min-width: 0;
}

.tr-heat-kind .ws-seg { max-width: 100%; }

.tr-heat-kind .ws-seg button[aria-pressed="true"] {
    background: color-mix(in srgb, var(--color-green) 16%, transparent);
    box-shadow: none;
    color: var(--color-text);
}

/* under the squares: the busiest hour, and less → more */
.tr-heat-f {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin: 10px 0 4px;
}

/* less → more: the colours of the cells */
.tr-heat-legend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.tr-heat-legend > span[data-i18n] { margin-inline: 4px; }

.tr-heat-sw {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--color-text) 6%, transparent);
}

.tr-heat-box { position: relative; }

/* the grid scrolls sideways inside the card on a phone; the days' names stay at its start */
.tr-heat-grid {
    position: relative;   /* (the hidden words for screen readers stay inside it, so they never widen the page) */
    overflow-x: auto;
    outline: 0;
    border-radius: 8px;
    scrollbar-width: thin;
}

.tr-heat-grid:focus-visible { box-shadow: 0 0 0 2px var(--color-green); }

.tr-heat-t {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 3px;
    table-layout: fixed;
}

.tr-heat-t thead td,
.tr-heat-t tbody th { width: 46px; }

.tr-heat-t thead th {
    height: 18px;
    padding: 0;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: start;
    white-space: nowrap;
    overflow: visible;
}

.tr-heat-t thead td,
.tr-heat-t tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--glass-hover);
    box-shadow: 3px 0 0 var(--glass-hover);   /* (covers the gap after it, so nothing shows through while the grid scrolls) */
}

.tr-heat-t tbody th {
    padding: 0 8px 0 0;
    color: var(--color-text-soft);
    font-size: 12px;
    font-weight: 700;
    text-align: start;
    white-space: nowrap;
}

.tr-heat-t tbody td {
    height: 26px;
    padding: 0;
    border-radius: 5px;
    background: color-mix(in srgb, var(--color-text) 6%, transparent);
}

.tr-heat-t td.is-on,
.tr-heat-sw.is-on { background: rgb(34 197 94 / var(--a)); }

.tr-heat-t td.is-at { box-shadow: inset 0 0 0 2px var(--color-text); }

.tr-heat-tip { top: 0; }

.tr-heat-sum {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.tr-heat-note {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 12.5px;
}

/* ===== without NEX: a plain table (style/websites.css's table) ===== */

.tr-plain-wrap {
    max-height: min(720px, 75vh);
    overflow: auto;
}

.tr-plain thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--glass-hover);
}

.tr-plain thead th.ws-sticky { z-index: 3; }

.tr-plain .ws-sticky { inset-inline-start: 0; }

.tr-plain .tr-pick,
.tr-plain .tr-pick-h {
    width: 40px;
    text-align: center;
}

.tr-plain .tr-pick input {
    width: 17px;
    height: 17px;
    accent-color: var(--color-green);
}

.tr-plain tbody th { font-weight: 500; }
.tr-plain tbody th .tr-name { max-width: 320px; }
.tr-plain tbody tr.is-on > * { background: color-mix(in srgb, var(--color-green) 9%, var(--glass-hover)); }

/* ===== small screens ===== */

@media (max-width: 560px) {
    .tr-filterrow .tr-visbar { flex: 1 1 100%; margin-inline-start: 0; }   /* (its own line under the filters) */
    .tr-visbar .nexvisbar-label,
    .tr-vis-t { display: none; }   /* (the buttons say it with their eyes; the group keeps its name for screen readers) */
    .tr-chart { padding: 12px 12px 8px; }
    .tr-chart-t { flex-basis: 100%; }
    .tr-search { flex: 1 1 100%; }
    .tr-plain tbody th .tr-name { max-width: 180px; }
}

@media (max-width: 380px) {
    /* Bars | Lines | Squares go down to their icons; the word stays for screen readers */
    #TR_CHART_KIND button span:not(.material-symbols-outlined) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}
