/* ===================================================================
   Home page, features (src/pages/index.html #features, scripts/home-tiles.js): twelve tiles, each a small picture of the
   app drawn in HTML/SVG (no images), a name and one line; each tile is a link to the page that explains it.

   tile ............ .tile-grid > li > a.tile > .tile-vis (the picture, aria-hidden) + .tile-name + .tile-line
   pictures ........ .tv-active .tv-map .tv-trend .tv-cmp .tv-src .tv-pages .tv-geo .tv-dev .tv-ret .tv-eng .tv-ev .tv-flow
   motion .......... the default look of every picture is its calm final state; .tile.is-run plays it once from the start
                     (scripts/home-tiles.js adds it on hover or keyboard focus, on a touch screen once in view). Only transform,
                     opacity and stroke-dashoffset move; every keyframe ends on the element's own look, so nothing jumps.
                     Hover is read from the <li>, which never moves (the lifted link would slip from under a pointer at
                     its bottom edge, bob and replay). .tiles.is-still ("Pause animations", from the script): no lift.
   =================================================================== */

.tiles {
    --tv-start: left;     /* the side a bar grows from (right-to-left: the right) */
    --tv-dir: 1;
    background: var(--color-bg-soft);
}

[dir="rtl"] .tiles {
    --tv-start: right;
    --tv-dir: -1;
}

:root[data-theme="dark"] .tiles {
    background: color-mix(in srgb, var(--color-bg-soft) 55%, var(--color-bg));
}

/* 4 in a row on a wide screen, 3 on a mid one, 2 on a tablet and a phone; the rows stretch, so the tiles have equal heights */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    margin-top: clamp(32px, 4vw, 48px);
}

.tile-grid > li {
    display: flex;
    min-width: 0;
}

/* ===== the tile: a card like the why cards, with the picture in a soft window on top ===== */

.tile {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 8px 8px 20px;

    border: 1px solid var(--color-border-soft);
    border-radius: 20px;
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);

    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

:root[data-theme="dark"] .tile {
    border-color: var(--color-border);
    background: var(--color-bg-soft);
}

/* it lifts a little under the pointer (hovering its <li>, see the top) and with keyboard focus */
.tile:focus-visible {
    outline-offset: 3px;
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -24px rgba(5, 46, 22, .38);
}

@media (hover: hover) {
    .tile-grid > li:hover > .tile {
        transform: translateY(-4px);
        border-color: color-mix(in srgb, var(--color-green) 40%, var(--color-border));
        box-shadow: 0 22px 40px -24px rgba(5, 46, 22, .38), 0 8px 18px -12px rgba(15, 23, 42, .14);
    }

    :root[data-theme="dark"] .tile-grid > li:hover > .tile {
        box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .75);
    }
}

.tiles.is-still .tile-grid > li > .tile {
    transform: none;
}

.tile-vis {
    --tv-bg: var(--color-bg-soft);

    position: relative;
    height: 136px;
    padding: 16px 18px;
    overflow: hidden;

    border-radius: 13px;
    background: var(--tv-bg);
    color: var(--color-text);

    font-size: 12px;
    line-height: 1.25;
}

:root[data-theme="dark"] .tile-vis {
    --tv-bg: var(--color-bg);
}

.tile-vis svg {
    max-width: none;
}

.tile-name {
    margin: 16px 10px 0;

    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.01em;
}

/* a quiet arrow after the name: text glued to the last word by a no-break space, so it never goes to a line of its own
   (an icon would); "/ ''" keeps it out of what screen readers say */
.tile-name::after {
    content: "\00a0\2192" / "";
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color .25s var(--ease);
}

[dir="rtl"] .tile-name::after {
    content: "\00a0\2190" / "";
}

.tile-grid > li:hover .tile-name::after,
.tile:focus-visible .tile-name::after {
    color: #15803d;
}

:root[data-theme="dark"] .tile-grid > li:hover .tile-name::after,
:root[data-theme="dark"] .tile:focus-visible .tile-name::after {
    color: var(--color-green);
}

.tile-line {
    margin: 4px 10px 0;

    font-size: 14.5px;
    line-height: 1.5;
    color: var(--color-text-soft);
}

/* Japanese and Korean: break at a space or after "、", never inside a word (auto-phrase: Japanese phrases, Chromium) */
:lang(ja) :is(.tile-name, .tile-line),
:lang(ko) :is(.tile-name, .tile-line) {
    word-break: keep-all;
    overflow-wrap: break-word;
}

@supports (word-break: auto-phrase) {
    :lang(ja) :is(.tile-name, .tile-line) {
        word-break: auto-phrase;
    }
}

/* small glyphs drawn with a line (devices, events, dials) */
.tv-g {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tv-g .is-fill {
    fill: currentColor;
}

.tile-vis b {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ===== the moves (each ends on the element's own look) ===== */

@keyframes tv-grow-x { from { transform: scaleX(0); } }
@keyframes tv-grow-y { from { transform: scaleY(0); } }
@keyframes tv-fade { from { opacity: 0; } }
@keyframes tv-fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes tv-slide { from { opacity: 0; transform: translateX(calc(-18px * var(--tv-dir))); } }
@keyframes tv-pop { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.15); } }
@keyframes tv-ring { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(3.6); } }
@keyframes tv-draw { from { stroke-dashoffset: calc(var(--len, 100) + 1); } }   /* one more: no round cap shows at the start */
@keyframes tv-settle { 0% { transform: scaleX(.8); } 45% { transform: scaleX(1.13); } 72% { transform: scaleX(.97); } 100% { transform: none; } }
@keyframes tv-run { 0% { stroke-dashoffset: 0; opacity: 0; } 12% { opacity: 1; } 86% { opacity: 1; } 100% { stroke-dashoffset: -100; opacity: 0; } }

/* ===== 1. Active now: the live number, and how it splits across the websites ===== */

.tv-active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.tv-now {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tv-now b {
    font-size: 40px;
    line-height: 1;
    letter-spacing: -.03em;
}

.tv-live {
    position: relative;
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-green);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-green) 22%, transparent);
}

.tv-live::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--color-green);
    opacity: 0;
}

.tv-split {
    display: flex;
    gap: 3px;
    height: 10px;
}

.tv-split i {
    width: var(--w);
    border-radius: 3px;
    background: var(--c);
    transform-origin: var(--tv-start) center;
}

.tv-split-n {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12.5px;
}

.tv-split-n span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tv-split-n span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
}

.tile.is-run .tv-live::after { animation: tv-ring .7s ease-out 2 both; }
.tile.is-run .tv-split i { animation: tv-grow-x .65s var(--ease) calc(var(--i) * 130ms + 120ms) both; }
.tile.is-run .tv-split-n span { animation: tv-fade-up .45s var(--ease) calc(var(--i) * 130ms + 300ms) both; }

/* ===== 2. Live map: visits light up where they are ===== */

.tv-map {
    padding: 10px 12px;
}

.tv-map svg,
.tv-trend svg,
.tv-flow svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tv-land {
    fill: #dce3ec;
}

:root[data-theme="dark"] .tv-land {
    fill: #222d42;
}

.tv-pin,
.tv-ring {
    fill: var(--c);
    transform-box: fill-box;
    transform-origin: center;
}

.tv-pin {
    stroke: var(--tv-bg);
    stroke-width: 1.2;
}

.tv-ring {
    opacity: 0;
}

/* the ring fills only forwards: while it waits it keeps its own look (hidden), so no dot shows before its pin pops in */
.tile.is-run .tv-pin { animation: tv-pop .5s var(--ease) calc(var(--i) * 80ms) both; }
.tile.is-run .tv-ring { animation: tv-ring .8s ease-out calc(var(--i) * 80ms + 120ms) forwards; }

/* ===== 3. Visitors over time: the line draws, the period before is dashed ===== */

.tv-trend {
    padding: 14px 14px 8px;
}

.tv-grid {
    fill: none;
    stroke: var(--color-border);
    stroke-width: .8;
}

.tv-prev {
    fill: none;
    stroke: var(--color-text-muted);
    stroke-width: 1.6;
    stroke-dasharray: 3 3.4;
    stroke-linecap: round;
}

.tv-cur {
    fill: none;
    stroke: var(--color-green);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100 200;   /* the gap is longer than the line, so the dash never repeats */
}

.tv-end {
    fill: var(--color-green);
    stroke: var(--tv-bg);
    stroke-width: 1.6;
    transform-box: fill-box;
    transform-origin: center;
}

.tile.is-run .tv-prev { animation: tv-fade .4s ease both; }
.tile.is-run .tv-cur { animation: tv-draw 1.1s var(--ease) .15s both; }
.tile.is-run .tv-area { animation: tv-fade .6s ease .75s both; }
.tile.is-run .tv-end { animation: tv-pop .45s var(--ease) 1.1s both; }

/* ===== 4. Compare websites: three demo websites side by side ===== */

.tv-cmp {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.tv-cmp-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 10px;
}

.tv-cmp-name {
    overflow: hidden;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--color-text-soft);
}

.tv-cmp-name::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-end: 6px;
    border-radius: 50%;
    background: var(--c);
    vertical-align: 1px;
}

/* right-to-left pages: the (Latin) name still reads, and is cut, from its own start */
[dir="rtl"] .tv-cmp-name {
    direction: ltr;
    text-align: right;
}

/* room for the final number from the start, so the name does not shrink while it counts up */
.tv-cmp-row b {
    min-width: 5ch;
    font-size: 12.5px;
    text-align: end;
}

.tv-cmp-row i {
    grid-column: 1 / -1;
    width: calc(var(--w) * 100%);
    height: 8px;
    border-radius: 4px;
    background: var(--c);
    transform-origin: var(--tv-start) center;
}

.tile.is-run .tv-cmp-row i { animation: tv-grow-x .8s var(--ease) calc(var(--i) * 140ms + 80ms) both; }

/* ===== 5. Traffic sources: a share bar behind each source ===== */

.tv-src {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.tv-src-row {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 21px;
    padding-inline: 9px 2px;
    font-weight: 700;
}

.tv-src-row::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: -1;
    width: calc(var(--w) * (100% - 40px));   /* the number keeps its own room at the end */
    border-inline-start: 3px solid var(--c);
    border-radius: 3px 6px 6px 3px;
    background: color-mix(in srgb, var(--c) 20%, transparent);
    transform-origin: var(--tv-start) center;
}

[dir="rtl"] .tv-src-row::before {
    border-radius: 6px 3px 3px 6px;
}

.tv-src-row b {
    color: var(--color-text-soft);
}

.tile.is-run .tv-src-row::before { animation: tv-grow-x .7s var(--ease) calc(var(--i) * 110ms + 60ms) both; }

/* ===== 6. Top pages: rows slide in ===== */

.tv-pages {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.tv-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 22px;
    padding-inline: 9px;

    border-radius: 7px;
    background: var(--color-bg);
    box-shadow: 0 0 0 1px var(--color-border-soft);
}

:root[data-theme="dark"] .tv-page {
    background: var(--color-bg-soft);
    box-shadow: 0 0 0 1px var(--color-border);
}

.tv-page:first-child,
:root[data-theme="dark"] .tv-page:first-child {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-green) 50%, transparent);
}

.tv-page span {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--color-text-soft);
}

.tile.is-run .tv-page { animation: tv-slide .5s var(--ease) calc(var(--i) * 100ms + 40ms) both; }

/* ===== 7. Countries & cities: columns with simple flags (CSS stripes, no emoji) ===== */

.tv-geo {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 6%, 16px);
    padding-block: 14px 10px;
}

.tv-geo-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    max-width: 34px;
}

.tv-geo-col i {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 22px;
}

.tv-geo-col i::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: calc(var(--h) * 100%);
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(var(--color-green), color-mix(in srgb, var(--color-green) 45%, var(--tv-bg)));
    transform-origin: center bottom;
}

.tv-geo-col b {
    font-size: 11px;
    color: var(--color-text-soft);
}

.tv-flag {
    flex: none;
    width: 20px;
    height: 14px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .14);
}

:root[data-theme="dark"] .tv-flag {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}

.tv-flag.is-de { background: linear-gradient(#1f1f1f 0 33.4%, #dd0000 0 66.7%, #ffce00 0); }
.tv-flag.is-pl { background: linear-gradient(#ffffff 0 50%, #dc143c 0); }
.tv-flag.is-fr { background: linear-gradient(90deg, #0055a4 0 33.4%, #ffffff 0 66.7%, #ef4135 0); }
.tv-flag.is-it { background: linear-gradient(90deg, #009246 0 33.4%, #ffffff 0 66.7%, #ce2b37 0); }
.tv-flag.is-nl { background: linear-gradient(#ae1c28 0 33.4%, #ffffff 0 66.7%, #21468b 0); }

.tile.is-run .tv-geo-col i::before { animation: tv-grow-y .7s var(--ease) calc(var(--i) * 90ms + 60ms) both; }
.tile.is-run .tv-flag { animation: tv-pop .45s var(--ease) calc(var(--i) * 90ms + 280ms) both; }

/* ===== 8. Devices & browsers: the donut closes, segment by segment ===== */

.tv-dev {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 9%, 30px);
}

.tv-donut {
    flex: none;
    width: 92px;
    height: 92px;
}

.tv-donut-bg,
.tv-seg {
    fill: none;
    stroke-width: 6;
}

.tv-donut-bg {
    stroke: var(--color-border);
}

/* a browser window in the middle of the donut */
.tv-browser {
    fill: none;
    stroke: var(--color-text-muted);
    stroke-width: 1.1;
    stroke-linejoin: round;
}

.tv-browser circle {
    fill: var(--color-text-muted);
    stroke: none;
}

.tv-seg {
    stroke: var(--c);
    stroke-dasharray: var(--len) 200;
}

.tv-keys {
    display: grid;
    gap: 7px;
}

.tv-keys span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.tv-keys .tv-g {
    width: 16px;
    height: 16px;
    color: var(--c);
}

.tile.is-run .tv-seg { animation: tv-draw .5s var(--ease) calc(var(--i) * 260ms) both; }
.tile.is-run .tv-keys span { animation: tv-fade-up .4s var(--ease) calc(var(--i) * 260ms + 180ms) both; }

/* ===== 9. New and returning: the split settles ===== */

.tv-ret {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.tv-ret-n {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tv-ret-n span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 22px;
    letter-spacing: -.02em;
}

.tv-ret-n .tv-g {
    width: 18px;
    height: 18px;
}

.tv-ret-n .is-new .tv-g { color: #0ea5e9; }
.tv-ret-n .is-back .tv-g { color: #8b5cf6; }

.tv-ret-bar {
    display: flex;
    height: 14px;
    overflow: hidden;
    border-radius: 7px;
    background: #8b5cf6;
}

.tv-ret-bar i {
    width: 62%;
    border-inline-end: 3px solid var(--tv-bg);
    background: #0ea5e9;
    transform-origin: var(--tv-start) center;
}

.tile.is-run .tv-ret-bar i { animation: tv-settle 1.2s var(--ease) .1s both; }
.tile.is-run .tv-ret-n span { animation: tv-fade-up .45s var(--ease) both; }
.tile.is-run .tv-ret-n span + span { animation-delay: .15s; }

/* ===== 10. Engagement: three small dials (time, scroll depth, bounce rate) ===== */

.tv-eng {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 6px;
}

.tv-dial {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    max-width: 84px;
}

.tv-dial > svg:first-child {
    width: 100%;
    height: auto;
}

.tv-dial-bg,
.tv-dial-fg {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
}

.tv-dial-bg {
    stroke: var(--color-border);
}

.tv-dial-fg {
    --len: var(--v);
    stroke: var(--c);
    stroke-dasharray: var(--v) 200;
}

.tv-dial b {
    margin-top: -.95em;
    font-size: 13px;
}

.tv-dial .tv-g {
    width: 16px;
    height: 16px;
    margin-top: 9px;
    color: var(--c);
}

.tile.is-run .tv-dial-fg { animation: tv-draw .9s var(--ease) calc(var(--i) * 150ms + 50ms) both; }

/* ===== 11. Clicks, downloads, forms (and videos): event chips pop in and count ===== */

.tv-ev {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 120px));
    align-content: center;
    justify-content: center;
    gap: 8px;
}

.tv-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 38px;
    padding-inline: 6px 10px;

    border-radius: 11px;
    background: var(--color-bg);
    box-shadow: 0 0 0 1px var(--color-border-soft), 0 1px 2px rgba(15, 23, 42, .05);

    font-size: 14px;
}

:root[data-theme="dark"] .tv-chip {
    background: var(--color-bg-soft);
    box-shadow: 0 0 0 1px var(--color-border);
}

.tv-chip b {
    margin-inline-start: auto;   /* the glyph at the start, the number at the end */
}

.tv-chip .tv-g {
    flex: none;
    width: 26px;
    height: 26px;
    padding: 5px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--c) 16%, transparent);
    color: var(--c);
}

.tile.is-run .tv-chip { animation: tv-pop .5s var(--ease) calc(var(--i) * 120ms) both; }

/* ===== 12. Visitor flow: channel -> device -> how the visit ended; dots travel along ===== */

.tv-flow {
    padding: 12px 14px;
}

.tv-links path {
    fill: none;
    stroke: var(--c);
    stroke-opacity: .26;
}

:root[data-theme="dark"] .tv-links path {
    stroke-opacity: .34;
}

.tv-nodes rect {
    fill: var(--c);
}

/* the dots: the colour of their channel on a light page, white on a dark one */
.tv-runs path {
    fill: none;
    stroke: var(--c);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 0 101;
    opacity: 0;
}

:root[data-theme="dark"] .tv-runs path {
    stroke: var(--color-text);
    stroke-width: 4.4;
}

.tile.is-run .tv-runs path { animation: tv-run 1.1s cubic-bezier(.45, .05, .55, .95) calc(var(--i) * 110ms) both; }

/* ===== mid screens: 3 in a row; tablets and phones: 2 ===== */

@media (max-width: 1199px) {
    .tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* phones: smaller type, and the longest lists lose their last row */
@media (max-width: 560px) {
    .tile-grid {
        gap: 12px;
    }

    .tile {
        padding: 6px 6px 14px;
        border-radius: 16px;
    }

    .tile-vis {
        height: 108px;
        padding: 10px 11px;
        border-radius: 11px;
        font-size: 11px;
    }

    .tile-name {
        margin: 12px 6px 0;
        font-size: 15px;
    }

    .tile-line {
        margin: 3px 6px 0;
        font-size: 13.5px;
        line-height: 1.45;
    }

    .tv-src-row:nth-child(4),
    .tv-page:nth-child(4),
    .tv-geo-col:nth-child(5) {
        display: none;
    }

    .tv-active { gap: 9px; }
    .tv-now { gap: 9px; }
    .tv-now b { font-size: 30px; }
    .tv-live { width: 10px; height: 10px; }
    .tv-split { height: 8px; }
    .tv-split-n { gap: 3px 8px; font-size: 11px; }
    .tv-split-n span { gap: 4px; }
    .tv-split-n span::before { width: 6px; height: 6px; }

    .tv-map, .tv-trend, .tv-flow { padding: 8px; }

    /* the whole width for the name, and just the bars: the numbers would cut the names on a phone */
    .tv-cmp { gap: 7px; }
    .tv-cmp-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .tv-cmp-row b { display: none; }
    .tv-cmp-row i { height: 6px; }
    .tv-cmp-name::before { width: 6px; height: 6px; margin-inline-end: 4px; }

    .tv-src-row { height: 20px; padding-inline: 7px 0; }
    .tv-page { height: 21px; padding-inline: 6px; gap: 6px; }

    .tv-geo { padding-block: 8px 4px; }
    .tv-geo-col i { max-width: 18px; }
    .tv-flag { width: 18px; height: 12px; }

    .tv-dev { gap: 10px; }
    .tv-donut { width: 64px; height: 64px; }
    .tv-keys { gap: 4px; }
    .tv-keys span { gap: 5px; font-size: 11.5px; }
    .tv-keys .tv-g { width: 13px; height: 13px; }

    .tv-ret { gap: 11px; }
    .tv-ret-n span { gap: 4px; font-size: 17px; }
    .tv-ret-n .tv-g { width: 14px; height: 14px; }
    .tv-ret-bar { height: 11px; }

    .tv-dial b { margin-top: 3px; font-size: 11px; }   /* under the small dial, not inside it */
    .tv-dial .tv-g { width: 13px; height: 13px; margin-top: 6px; }

    .tv-ev { gap: 6px; }
    .tv-chip { gap: 4px; height: 32px; padding-inline: 3px 5px; border-radius: 9px; font-size: 12px; }
    .tv-chip .tv-g { width: 22px; height: 22px; padding: 4px; border-radius: 7px; }
}

/* the narrowest phones (320 px): the two shares of New and returning still fit side by side */
@media (max-width: 359px) {
    .tv-ret { padding-inline: 9px; }
    .tv-ret-n span { gap: 3px; font-size: 14px; }
    .tv-ret-n .tv-g { width: 12px; height: 12px; }
}

/* reduced motion: nothing moves (the script never plays a tile then; this is the safety net) */
@media (prefers-reduced-motion: reduce) {
    .tile {
        transition: border-color .2s ease, box-shadow .2s ease;
    }

    .tile-grid > li:hover > .tile,
    .tile:focus-visible {
        transform: none;
    }

    .tile-name::after {
        transition: none;
    }

    .tile.is-run *,
    .tile.is-run *::before,
    .tile.is-run *::after {
        animation: none !important;
    }
}
