/*
 * BusOva Live: the tracker's own look (a separate project from BusOva.com; it shares none of its styles).
 *
 * "Concourse" (chosen 27 Nov 2026): the feel of a bus station. A dark band carries each page's heading, and the front
 * page opens with a departure board. Content sits in white cards with soft shadows, and the bold, wide cut of Archivo
 * is used for big headings.
 *   - the matrix: white dot-matrix (Doto) on black with the unlit LED grid behind, as on Brighton & Hove's blinds.
 *     Every page's heading is a blind in its case. Route plates, the map's bus markers, live tags and counts are small
 *     ones.
 *   - colour: six palettes (picked from the header, kept in a cookie), each with a day and a night version. --accent
 *     is the palette's main colour (buttons, links, icons) with --accent-ink on it; --spark is its highlight.
 *
 * Every colour is a custom property, redefined for the night theme, so a switch restyles everything (map markers and
 * the route line included) without a reload.
 *
 * Path: root/css/tracker/tracker.css
 */

@font-face {
    font-family: "Archivo";
    src: url("/assets/fonts/tracker/archivo-latin-standard-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Doto";
    src: url("/assets/fonts/tracker/doto-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- tokens ---------- */
/*
 * Two switches on <html>: data-palette (the colour scheme the visitor picked from the header menu, kept in the
 * tk_palette cookie; see TK_PALETTES in inc/tracker-layout.php) and data-theme (day or night). The shared tokens come
 * first, then each palette's day colours and its night colours. A palette sets every colour below the line
 * "palette colours"; nothing else in this file names a colour a palette should own.
 */
:root {
    color-scheme: light;
    --blind: #050506;
    --led: #f4f6f2;             /* white LEDs, as on Brighton & Hove's blinds */
    --led-unlit: rgba(255, 255, 255, .075);
    --led-glow: 0 0 5px rgba(255, 255, 255, .32);
    --live-dot: #ff5a47;
    --error-bg: #f8dfda;
    --error-ink: #7d1e10;
    --warn-bg: #f8eecb;
    --warn-ink: #5c4300;
    --map-filter: saturate(.85);
    --shadow: 0 1px 2px rgba(30, 10, 15, .06), 0 10px 30px rgba(30, 10, 15, .08);       /* cards */
    --shadow-lift: 0 2px 6px rgba(30, 10, 15, .08), 0 22px 48px rgba(30, 10, 15, .14);  /* raised: menus, hovered cards */
    --housing: linear-gradient(#3b3438, #1b1719);   /* the case a matrix board sits in */
    --band-scheme: dark;        /* form controls on the band: dark unless the band is light (Paper) */

    --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --dots: "Doto", "Archivo", monospace;
    --radius: 12px;
    --radius-lg: 18px;
    --gutter: clamp(16px, 4vw, 44px);
    --measure: 1240px;
    --header-h: 68px;

    /* palette colours: Claret, the default */
    --paper: #f4f1ec; --surface: #ffffff; --surface-2: #e9e3dc; --row-hover: #f8f4ef;
    --ink: #1d1415; --ink-2: #43373a; --muted: #7a6a68; --rule: #e3dcd5; --rule-strong: #c9bdb4;
    --link: #8e2433; --link-hover: #5e1420; --accent: #8e2433; --spark: #e8b04b;
    --band: #3a1219; --band-2: #4f1c25; --band-ink: #f6ece6; --band-muted: #c9a3a6; --band-rule: #5e2630;
    --bezel: #2a1a1d; --bezel-2: #1f1315; --bezel-3: #3a2428;
    --accent-ink: #ffffff;
}

:root[data-theme="dark"] {
    --accent-ink: #1d0a0e;
    color-scheme: dark;
    --led-unlit: rgba(255, 255, 255, .06);
    --led-glow: 0 0 7px rgba(255, 255, 255, .55), 0 0 18px rgba(210, 235, 255, .18);
    --error-bg: #3a1b15;
    --error-ink: #ffb4a3;
    --warn-bg: #33290d;
    --warn-ink: #f3d27a;
    --map-filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.95) saturate(.5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 52px rgba(0, 0, 0, .55);
    --band-scheme: dark;

    --paper: #120a0c; --surface: #1b1013; --surface-2: #24161a; --row-hover: #1f1316;
    --ink: #f2e8e6; --ink-2: #d2c3c2; --muted: #9a8687; --rule: #2c1c20; --rule-strong: #3d282d;
    --link: #f0a3ad; --link-hover: #f2c46b; --accent: #f07a85; --spark: #f2c46b;
    --band: #1d0a0e; --band-2: #2a1217; --band-ink: #f6ece6; --band-muted: #b08c90; --band-rule: #3a1a20;
}

/* Graphite and signal yellow */
:root[data-palette="graphite"] {
    --accent-ink: #161513;
    --paper: #f5f5f2; --surface: #ffffff; --surface-2: #e8e7e3; --row-hover: #f9f9f6;
    --ink: #161513; --ink-2: #3b3935; --muted: #6d6a64; --rule: #e2e0db; --rule-strong: #c4c1ba;
    --link: #7a5a00; --link-hover: #161513; --accent: #e0b400; --spark: #ffd100;
    --band: #22201d; --band-2: #2f2c28; --band-ink: #f3f1ec; --band-muted: #a9a49b; --band-rule: #3a3732;
    --bezel: #2a2825; --bezel-2: #1c1b19; --bezel-3: #3a3733;
}
:root[data-palette="graphite"][data-theme="dark"] {
    --accent-ink: #161513;
    --paper: #0e0d0c; --surface: #181715; --surface-2: #211f1c; --row-hover: #1c1b18;
    --ink: #efede8; --ink-2: #cfccc5; --muted: #8f8b83; --rule: #2a2825; --rule-strong: #3b3833;
    --link: #ffd84d; --link-hover: #fff0a6; --accent: #ffd100; --spark: #ffd100;
    --band: #090908; --band-2: #171614; --band-ink: #f3f1ec; --band-muted: #8f8b83; --band-rule: #2a2825;
}

/* Cobalt */
:root[data-palette="cobalt"] {
    --accent-ink: #121630;
    --paper: #f3f4fa; --surface: #ffffff; --surface-2: #e4e7f3; --row-hover: #f7f8fd;
    --ink: #121630; --ink-2: #343a5c; --muted: #5f6584; --rule: #dde0ee; --rule-strong: #bfc4dc;
    --link: #1f2d9a; --link-hover: #d9502f; --accent: #ff6a45; --spark: #ffd27a;
    --band: #1f2d9a; --band-2: #2a3aad; --band-ink: #eef0ff; --band-muted: #b3bbf2; --band-rule: #3445b8;
    --bezel: #1a1d33; --bezel-2: #12142a; --bezel-3: #262a48;
}
:root[data-palette="cobalt"][data-theme="dark"] {
    --accent-ink: #0a0d24;
    --paper: #0a0d24; --surface: #121735; --surface-2: #1a2045; --row-hover: #151a3d;
    --ink: #e9ebfa; --ink-2: #c5c9e6; --muted: #8a90b4; --rule: #222850; --rule-strong: #323a6a;
    --link: #a9b6ff; --link-hover: #ffb199; --accent: #ff8a6c; --spark: #ffd27a;
    --band: #0d1240; --band-2: #182060; --band-ink: #eef0ff; --band-muted: #8f98d6; --band-rule: #232b70;
}

/* Aubergine */
:root[data-palette="aubergine"] {
    --accent-ink: #ffffff;
    --paper: #f5f3f7; --surface: #ffffff; --surface-2: #e8e3ed; --row-hover: #f9f7fb;
    --ink: #1b1320; --ink-2: #40364a; --muted: #6f6378; --rule: #e3dde8; --rule-strong: #c6bccf;
    --link: #6b3fa0; --link-hover: #c4612b; --accent: #d9577a; --spark: #f2a65a;
    --band: #2b1838; --band-2: #3a2249; --band-ink: #f3ecf7; --band-muted: #b9a5c6; --band-rule: #4a2f5c;
    --bezel: #241b2b; --bezel-2: #1a1320; --bezel-3: #33283c;
}
:root[data-palette="aubergine"][data-theme="dark"] {
    --accent-ink: #150b1c;
    --paper: #0f0a13; --surface: #18111e; --surface-2: #211829; --row-hover: #1c1423;
    --ink: #f0e9f5; --ink-2: #cfc3d8; --muted: #958a9e; --rule: #2a2032; --rule-strong: #3b2e46;
    --link: #c9a7f0; --link-hover: #f6bd85; --accent: #f08aa2; --spark: #f6bd85;
    --band: #150b1c; --band-2: #241530; --band-ink: #f3ecf7; --band-muted: #a08cb0; --band-rule: #33203f;
}

/* Pillar-box red */
:root[data-palette="red"] {
    --accent-ink: #ffffff;
    --paper: #f7f7f7; --surface: #ffffff; --surface-2: #ececec; --row-hover: #fbf6f6;
    --ink: #141414; --ink-2: #3a3a3a; --muted: #6b6b6b; --rule: #e3e3e3; --rule-strong: #c5c5c5;
    --link: #b3202a; --link-hover: #141414; --accent: #b3202a; --spark: #ffd34d;
    --band: #b3202a; --band-2: #c32b35; --band-ink: #ffffff; --band-muted: #f6cdd0; --band-rule: #cf4048;
    --bezel: #1d1d1d; --bezel-2: #141414; --bezel-3: #2a2a2a;
}
:root[data-palette="red"][data-theme="dark"] {
    --accent-ink: #0d0d0d;
    --paper: #0d0d0d; --surface: #161616; --surface-2: #1f1f1f; --row-hover: #1a1a1a;
    --ink: #f0f0f0; --ink-2: #cfcfcf; --muted: #8e8e8e; --rule: #262626; --rule-strong: #383838;
    --link: #ff7a80; --link-hover: #ffd34d; --accent: #ff5a60; --spark: #ffd34d;
    --band: #5c1217; --band-2: #731a20; --band-ink: #ffffff; --band-muted: #e0a3a6; --band-rule: #7d222a;
}

/* Paper: no dark band; white pages and black blinds, with one bright accent */
:root[data-palette="paper"] {
    --accent-ink: #ffffff;
    --band-scheme: light;
    --paper: #f4f4f1; --surface: #ffffff; --surface-2: #e9e9e5; --row-hover: #f9f9f7;
    --ink: #141414; --ink-2: #3a3a3a; --muted: #6b6b6b; --rule: #e0e0dc; --rule-strong: #c4c4be;
    --link: #0b5cad; --link-hover: #e4572e; --accent: #e4572e; --spark: #e4572e;
    --band: #ffffff; --band-2: #f1f1ee; --band-ink: #141414; --band-muted: #6b6b6b; --band-rule: #e0e0dc;
    --bezel: #2a2a2a; --bezel-2: #1e1e1e; --bezel-3: #3a3a3a;
}
:root[data-palette="paper"][data-theme="dark"] {
    --accent-ink: #0f0f10;
    --band-scheme: dark;
    --paper: #0f0f10; --surface: #18181a; --surface-2: #222225; --row-hover: #1b1b1e;
    --ink: #efefef; --ink-2: #cfcfcf; --muted: #8f8f8f; --rule: #26262a; --rule-strong: #36363b;
    --link: #7cb5f2; --link-hover: #f2b632; --accent: #f08a5d; --spark: #f2b632;
    --band: #121214; --band-2: #1c1c1f; --band-ink: #efefef; --band-muted: #9a9a9a; --band-rule: #2a2a2e;
}

/* The colour picker's swatches: each shows its own palette whatever is in use. */
.tk-sw { display: block; width: 44px; height: 30px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.tk-sw::after { content: ""; display: block; height: 8px; margin-top: 22px; }
.tk-sw--claret { background: #3a1219; } .tk-sw--claret::after { background: repeating-linear-gradient(90deg, #e8b04b 0 6px, #8e2433 6px 12px); }
.tk-sw--graphite { background: #22201d; } .tk-sw--graphite::after { background: repeating-linear-gradient(90deg, #ffd100 0 6px, #22201d 6px 12px); }
.tk-sw--cobalt { background: #1f2d9a; } .tk-sw--cobalt::after { background: repeating-linear-gradient(90deg, #ff7a59 0 6px, #ffd27a 6px 12px); }
.tk-sw--aubergine { background: #2b1838; } .tk-sw--aubergine::after { background: repeating-linear-gradient(90deg, #f2a65a 0 6px, #e46f8a 6px 12px); }
.tk-sw--red { background: #b3202a; } .tk-sw--red::after { background: repeating-linear-gradient(90deg, #ffffff 0 6px, #141414 6px 12px); }
.tk-sw--paper { background: #ffffff; } .tk-sw--paper::after { background: repeating-linear-gradient(90deg, #f2b632 0 6px, #e4572e 6px 12px, #0b5cad 12px 18px); }



/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.tk {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
.tk a { color: var(--link); text-decoration: none; }
.tk a:hover { color: var(--link-hover); }
.tk :focus-visible { outline: 2px solid var(--spark); outline-offset: 2px; border-radius: 3px; }
.tk h1, .tk h2, .tk h3 { margin: 0; line-height: 1.1; }
.tk p { margin: 0 0 1rem; }
.tk sup { font-size: .68em; color: var(--muted); margin-left: 1px; }
.tk-skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 2000; }
.tk-skip:focus { left: 8px; }
.tk-main { flex: 1 0 auto; }
.tk-wrap { max-width: var(--measure); margin: 0 auto; padding: 40px var(--gutter) 80px; }

/* Small labels over headings, and the big headings themselves. */
.tk-eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.tk-eyebrow--band { color: var(--spark); }
.tk-display { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; line-height: 1.06; margin: 0 0 12px; }
.tk-intro { max-width: 40em; color: var(--ink-2); font-size: 1.08rem; margin: 0 0 32px; }
.tk-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- the matrix: the logo dot, route plates, markers, counts ---------- */
.tk-line, .tk-bus, .tk-live, .tk-count, .tk-board, .tk-stats__live, .tk-blind, .tk-map-note {
    background-color: var(--blind);
    background-image: radial-gradient(var(--led-unlit) 1px, transparent 1.3px);
    background-size: 4px 4px;
    color: var(--led);
    font-family: var(--dots);
    font-weight: 800;
    text-shadow: var(--led-glow);
}

.tk-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.9em;
    height: 1.9em;
    padding: 0 .55em;
    border-radius: 6px;
    font-size: 1rem;
    letter-spacing: .04em;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
    box-shadow: 0 0 0 2px var(--bezel-3);
}
.tk a .tk-line { transition: box-shadow .15s; }
.tk a:hover .tk-line { box-shadow: 0 0 0 2px var(--spark); }

/* ---------- header ---------- */
.tk-header { position: sticky; top: 0; z-index: 1100; background: var(--band); color: var(--band-ink); box-shadow: 0 1px 0 var(--band-rule); }
.tk-header__inner {
    max-width: var(--measure);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 28px;
}
.tk-brand { display: inline-flex; flex: none; }
.tk-brand__mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: .03em;
    line-height: 1;
    color: var(--band-ink);
}
.tk-brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live-dot); animation: tk-pulse 2.2s ease-out infinite; }
@keyframes tk-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live-dot) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.tk-brand__live { font-weight: 400; color: var(--band-muted); }

.tk-search { position: relative; flex: 1 1 auto; max-width: 440px; }
.tk-search__icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--band-muted); font-size: .85rem; pointer-events: none; }
.tk-search__input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 40px;
    font: inherit;
    font-size: .95rem;
    color: var(--band-ink);
    background: color-mix(in srgb, var(--band-ink) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--band-ink) 14%, transparent);
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: var(--band-scheme);
}
.tk-search__input::placeholder { color: var(--band-muted); }
.tk-search__input:focus { outline: none; border-color: var(--spark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--spark) 22%, transparent); }
.tk-is-home .tk-header .tk-search { visibility: hidden; }   /* the home page has its own, bigger search */
.tk-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1300;
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    max-height: min(70vh, 480px);
    overflow-y: auto;
    padding: 6px;
    text-align: left;
}
.tk .tk-search-results a { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-size: .95rem; }
.tk .tk-search-results a:hover, .tk .tk-search-results a:focus { background: var(--row-hover); outline: none; }
.tk-search-results .tk-kind { margin-left: auto; flex: none; color: var(--muted); font-size: .78rem; font-stretch: 85%; }
.tk-search-results .tk-none { padding: 10px 12px; color: var(--muted); }

.tk-header__nav { display: flex; align-items: center; gap: 24px; margin-left: auto; flex: none; }
.tk .tk-header__link { display: inline-flex; align-items: center; gap: 8px; height: var(--header-h); color: var(--band-muted); font-size: .95rem; font-weight: 500; }
.tk .tk-header__link .fa-solid { font-size: .85em; opacity: .8; }
.tk .tk-header__link:hover { color: var(--band-ink); }
.tk .tk-header__link.is-active { color: var(--band-ink); box-shadow: inset 0 -3px 0 var(--spark); }
.tk-theme {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, var(--band-ink) 14%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--band-ink) 8%, transparent);
    color: var(--spark);
    cursor: pointer;
}
.tk-theme:hover { border-color: var(--spark); }
.tk-theme__to-light { display: none; }
:root[data-theme="dark"] .tk-theme__to-light { display: inline; }
:root[data-theme="dark"] .tk-theme__to-dark { display: none; }

/* ---------- page heading: the destination display ---------- */
.tk-hero {
    background: radial-gradient(1100px 460px at 88% -20%, var(--band-2), transparent 70%), var(--band);
    color: var(--band-ink);
}
.tk-hero__inner { max-width: var(--measure); margin: 0 auto; padding: 30px var(--gutter) 44px; }
.tk-hero--tabs .tk-hero__inner { padding-bottom: 0; }

.tk-crumbs { margin-bottom: 20px; font-size: .86rem; }
.tk .breadcrumb { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; color: var(--band-muted); }
.tk .breadcrumb-item + .breadcrumb-item::before { content: "/"; margin: 0 .6em; color: var(--band-rule); }
.tk .breadcrumb-item a { color: var(--band-muted); }
.tk .breadcrumb-item a:hover { color: var(--spark); }
.tk .breadcrumb-item.active { color: var(--band-ink); }

.tk-hero__head { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 28px; }

/* The blind sits in a housing, as on the front of a bus. */
.tk-blind {
    display: inline-grid;
    grid-auto-flow: column;
    align-items: center;
    max-width: 100%;
    background-image: radial-gradient(var(--led-unlit) 1.2px, transparent 1.6px);
    background-size: 6px 6px;
    border-radius: 12px;
    box-shadow: 0 0 0 6px #2b2427, 0 0 0 7px rgba(255, 255, 255, .08), 0 22px 46px rgba(0, 0, 0, .45);
    padding: 18px 30px 16px;
}
.tk-blind--num { padding-left: 0; }
.tk-blind__num {
    align-self: stretch;
    display: grid;
    place-items: center;
    min-width: 2.1em;
    padding: 0 .35em;
    margin-right: .5em;
    border-right: 3px solid #2b2427;
    font-weight: 900;
    font-size: clamp(3rem, 6.5vw, 5.2rem);
    line-height: 1;
    letter-spacing: .02em;
}
.tk-blind__text { display: grid; gap: 6px; min-width: 0; font-weight: 800; }
.tk-blind__kicker { font-family: var(--font); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #a99da1; text-shadow: none; }
.tk-blind__line { font-size: clamp(1.5rem, 3.2vw, 2.5rem); line-height: 1.05; letter-spacing: .03em; overflow-wrap: anywhere; }
.tk-blind__line--2 { font-size: clamp(1.05rem, 2.1vw, 1.5rem); opacity: .88; }

.tk-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; max-width: 560px; }
.tk-hero__meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--band-ink) 8%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--band-ink) 14%, transparent);
    font-size: .9rem;
    color: var(--band-ink);
}
.tk-hero__meta .fa-solid { color: var(--spark); font-size: .85em; }
.tk-hero__meta a { color: var(--band-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--band-ink) 35%, transparent); text-underline-offset: 3px; }
.tk-hero__meta a:hover { color: var(--spark); }

/* Tabs sit on the band's lower edge; the chosen one is cut out of the page below. */
.tk-tabs { display: flex; gap: 4px; margin-top: 32px; overflow-x: auto; scrollbar-width: none; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk .tk-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px 14px;
    border-radius: 12px 12px 0 0;
    color: var(--band-muted);
    font-weight: 600;
    white-space: nowrap;
}
.tk .tk-tabs a:hover { color: var(--band-ink); background: color-mix(in srgb, var(--band-ink) 7%, transparent); }
.tk .tk-tabs a.active { background: var(--paper); color: var(--ink); }
.tk-count { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: .8rem; }

/* ---------- section headings and toolbars ---------- */
.tk-h2 { font-size: 1.4rem; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; margin: 0 0 16px; }
.tk-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 26px; }
.tk-datebar {
    display: inline-flex;
    align-items: stretch;
    height: 44px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.tk .tk-datebar a { display: inline-grid; place-items: center; width: 44px; color: var(--ink-2); }
.tk .tk-datebar a:hover { background: var(--row-hover); color: var(--ink); }
.tk-datebar input[type="date"] {
    padding: 0 10px;
    border: 0;
    border-left: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
}
.tk-segment { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.tk .tk-segment a, .tk-segment span { padding: 7px 16px; border-radius: 9px; color: var(--ink-2); font-weight: 600; }
.tk .tk-segment a:hover { color: var(--ink); }
.tk-segment span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.tk-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 16px; }
.tk-section-head h2 { font-size: 1.4rem; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; margin: 0; }
.tk-section-head span { color: var(--muted); font-size: .9rem; }

/* ---------- notes ---------- */
.tk-note { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; }
.tk-note--warn { background: var(--warn-bg); color: var(--warn-ink); }
.tk-note--error { background: var(--error-bg); color: var(--error-ink); }
.tk-note--ok { background: color-mix(in srgb, var(--spark) 16%, var(--surface)); color: var(--ink); }
.tk-note ul { margin: 0; padding-left: 1.2em; }
.tk-empty { padding: 48px 24px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-hint { color: var(--muted); font-size: .9rem; }
.tk-muted { color: var(--muted); }
.tk-small { font-size: .88rem; color: var(--muted); }

/* ---------- tables ---------- */
.tk-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 36px;
}
.tk-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.tk-table th {
    text-align: left;
    padding: 13px 20px 11px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.tk-table td { padding: 13px 20px; border-top: 1px solid var(--rule); vertical-align: middle; }
.tk-table tbody tr:hover td { background: var(--row-hover); }
.tk-table .tk-num, .tk-time { font-weight: 700; white-space: nowrap; }
.tk-table .tk-fit { width: 1%; white-space: nowrap; }
.tk-table .tk-right { text-align: right; }

.tk-live { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; margin-left: 8px; border-radius: 999px; font-size: .78rem; letter-spacing: .06em; vertical-align: middle; }
.tk-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live-dot); box-shadow: var(--led-glow); animation: tk-blink 1.6s ease-in-out infinite; }
.tk a.tk-live:hover { color: var(--led); filter: brightness(1.2); }
@keyframes tk-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tk-live::before, .tk-brand__dot { animation: none; } }

/* ---------- timetable grid ---------- */
.tk-dir { margin-bottom: 44px; }
.tk-dir__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; font-size: 1.3rem; font-weight: 800; font-stretch: 110%; }
.tk-dir__head .tk-arrow { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .75rem; }
.tk-tt { width: auto; min-width: 100%; }
.tk-tt th, .tk-tt td { padding: 10px 14px; text-align: center; white-space: nowrap; }
.tk-tt td { font-weight: 600; font-size: .92rem; }
.tk-tt .tk-stop {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 14rem;
    max-width: 18rem;
    padding-left: 20px;
    text-align: left;
    white-space: normal;
    font-weight: 500;
    background: var(--surface);
    box-shadow: inset -1px 0 0 var(--rule-strong);
}
.tk-tt thead .tk-stop { background: var(--surface-2); }
.tk-tt tbody tr:hover .tk-stop { background: var(--row-hover); }
.tk-tt thead a { color: var(--ink-2); }
.tk-tt thead a:hover { color: var(--link-hover); }
.tk-tt tr.tk-minor td { color: var(--muted); font-weight: 400; font-size: .85rem; padding-top: 6px; padding-bottom: 6px; }
.tk-tt tr.tk-minor .tk-stop a { color: var(--ink-2); }
.tk-tt tr.tk-first td, .tk-tt tr.tk-last td { font-weight: 800; }

/* ---------- lists in cards: routes, stops, operators ---------- */
.tk-routes, .tk-stoplist, .tk-ops {
    list-style: none;
    margin: 0 0 40px;
    padding: 10px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.tk-routes { columns: 2 380px; column-gap: 48px; column-rule: 1px solid var(--rule); }
.tk-routes li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.tk .tk-routes a { display: grid; grid-template-columns: 4.4em minmax(0, 1fr); align-items: center; gap: 16px; padding: 11px 6px; margin: 0 -6px; border-radius: 8px; color: var(--ink); }
.tk .tk-routes a:hover { background: var(--row-hover); }
.tk-routes .tk-line { justify-self: start; min-width: 3.6em; font-size: 1.05rem; height: 1.95em; }
.tk-route-desc { min-width: 0; line-height: 1.3; }
.tk-route-desc .tk-to { color: var(--muted); margin: 0 .3em; }
.tk-route-op { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }

.tk-stoplist { columns: 2 340px; column-gap: 48px; column-rule: 1px solid var(--rule); }
.tk-stoplist li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.tk .tk-stoplist a { display: flex; align-items: baseline; gap: 10px; padding: 10px 6px; margin: 0 -6px; border-radius: 8px; color: var(--ink); }
.tk .tk-stoplist a:hover { background: var(--row-hover); }
.tk-stoplist .tk-ind { flex: none; min-width: 3.4em; padding: 1px 7px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; text-align: center; }
.tk-stoplist .tk-street { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

.tk-ops { columns: 3 260px; column-gap: 40px; padding: 18px 24px 4px; }
.tk-ops__group { break-inside: avoid; margin: 0 0 22px; }
.tk-ops ul { list-style: none; margin: 0; padding: 0; }
.tk-ops li { border-bottom: 1px solid var(--rule); }
.tk .tk-ops a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 6px; margin: 0 -6px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.tk .tk-ops a:hover { background: var(--row-hover); }
.tk-ops .tk-chip__n { flex: none; }
.tk .tk-ops__letter { margin: 0 0 4px; font-family: var(--dots); font-weight: 900; font-size: 1.4rem; color: var(--accent); }

/* ---------- places ---------- */
.tk-tiles { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tk .tk-tiles a, .tk-tiles .tk-tile--off {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 112px;
    height: 100%;
    padding: 20px 22px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: var(--ink);
    transition: box-shadow .15s, transform .15s;
}
.tk .tk-tiles a::after { content: "\2192"; position: absolute; right: 20px; bottom: 16px; color: var(--accent); font-weight: 700; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.tk .tk-tiles a:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.tk .tk-tiles a:hover::after { opacity: 1; transform: none; }
.tk-tile__name { font-size: 1.12rem; font-weight: 700; font-stretch: 106%; line-height: 1.2; }
.tk-tile__count { color: var(--muted); font-size: .88rem; }
.tk-tiles .tk-tile--off { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule); }

.tk-country { margin: 0 0 56px; }
.tk-country__head { display: flex; align-items: baseline; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 18px; }
.tk-country__head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; font-stretch: 115%; letter-spacing: -.01em; margin: 0; }
.tk-country__head span { color: var(--muted); }

.tk-az { columns: 4 200px; column-gap: 36px; margin: 0 0 40px; padding: 22px 26px 6px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-az__letter { break-inside: avoid; margin: 0 0 20px; }
.tk-az__letter h3 { font-family: var(--dots); font-weight: 900; font-size: 1.5rem; color: var(--accent); margin: 0 0 6px; }
.tk-az ul { list-style: none; margin: 0; padding: 0; }
.tk-az li { padding: 3px 0; line-height: 1.35; }
.tk-az .tk-az__q { color: var(--muted); font-size: .85em; }

.tk-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 40px; padding: 0; }
.tk .tk-chips a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-weight: 550; font-size: .93rem; }
.tk .tk-chips a:hover { box-shadow: var(--shadow-lift); color: var(--accent); }
.tk-chip__n { color: var(--muted); font-size: .82rem; font-weight: 400; }

.tk-filter { width: min(100%, 360px); height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--rule); color: var(--ink); font: inherit; }
.tk-filter:focus { outline: none; box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
[data-tk-filter-item][hidden] { display: none !important; }

/* ---------- prose pages (data sources) and forms (contact) ---------- */
.tk-prose { max-width: 780px; }
.tk-prose > h2 { font-size: 1.45rem; font-weight: 800; font-stretch: 110%; margin: 48px 0 8px; }
.tk-prose > h2:first-child { margin-top: 0; }
.tk-prose > p { color: var(--ink-2); }
.tk-prose a { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.tk-source { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 22px; padding: 24px; margin-bottom: 14px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-source__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-size: 1.2rem; }
.tk-source h3 { font-size: 1.1rem; font-weight: 700; margin: 2px 0 8px; }
.tk-source p { margin: 0 0 8px; color: var(--ink-2); }

.tk-form { position: relative; display: grid; gap: 22px; max-width: 680px; padding: 28px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tk-field label { display: block; margin-bottom: 7px; font-weight: 600; font-size: .92rem; }
.tk-field input, .tk-field select, .tk-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}
.tk-field textarea { min-height: 190px; resize: vertical; }
.tk-field input:focus, .tk-field select:focus, .tk-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.tk-button, .tk a.tk-more {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
    transition: filter .15s, transform .15s;
}
.tk-button:hover, .tk a.tk-more:hover, .tk a.tk-button:hover { color: var(--accent-ink); filter: brightness(1.08); transform: translateY(-1px); }
.tk a.tk-button { color: var(--accent-ink); }
.tk-trap { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Main content beside a narrower column. */
.tk-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.tk-aside { padding: 24px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-aside h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; }
.tk-aside p { color: var(--ink-2); font-size: .93rem; }
.tk-aside p:last-child { margin: 0; }

/* ---------- facts (trip) ---------- */
.tk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 0 0 32px; }
.tk-facts > div { padding: 18px 20px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-facts dt { font-size: .74rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.tk-facts dd { margin: 0; font-size: 1.1rem; font-weight: 700; }

/* Stops on a journey: the route as a line, a stop at each timing point. */
.tk-stops { max-width: 780px; list-style: none; margin: 0 0 32px; padding: 16px 0; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-stops li { position: relative; display: flex; align-items: baseline; gap: 18px; padding: 9px 22px 9px 66px; }
.tk-stops li::before { content: ""; position: absolute; left: 36px; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.tk-stops li:first-child::before { top: 50%; }
.tk-stops li:last-child::before { bottom: 50%; }
.tk-stops li::after { content: ""; position: absolute; left: 31px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--surface); border: 4px solid var(--accent); }
.tk-stops li.tk-minor::after { width: 8px; height: 8px; left: 35px; margin-top: -4px; border: 0; background: var(--surface); }
.tk-stops li:first-child::after, .tk-stops li:last-child::after { background: var(--spark); border-color: var(--accent); }
.tk-stops .tk-time { flex: none; width: 3.4em; font-weight: 800; }
.tk-stops li:not(.tk-minor) a { font-weight: 600; }
.tk-stops .tk-minor { padding-top: 5px; padding-bottom: 5px; font-size: .92rem; }
.tk-stops .tk-minor .tk-time { font-weight: 500; color: var(--muted); }
.tk-stops .tk-minor a { color: var(--ink-2); }
.tk-stops .tk-locality { color: var(--muted); font-size: .85em; margin-left: 8px; }

/* ---------- day chips (vehicle) ---------- */
.tk-days { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: -8px 0 28px; padding: 0; }
.tk .tk-days a, .tk-days span { display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2); }
.tk .tk-days a:hover { color: var(--accent); }
.tk-days span.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- maps ---------- */
.tk-map { height: 560px; border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.tk-map .leaflet-tile-pane { filter: var(--map-filter); }
.tk-map.leaflet-container { font: inherit; background: var(--surface-2); }
.tk-map .leaflet-bar { border: 0; box-shadow: var(--shadow-lift); border-radius: 10px; overflow: hidden; }
.tk-map .leaflet-bar a, .tk-map .leaflet-bar a:hover { width: 36px; height: 36px; line-height: 36px; background: var(--band); color: var(--band-ink); border-bottom-color: var(--band-rule); }
.tk-map .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--muted); }
.tk-map .leaflet-control-attribution a { color: var(--muted); }
.tk-map .leaflet-popup-content-wrapper, .tk-map .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
.tk-map .leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; }
.tk-map .leaflet-popup-content { margin: 0; min-width: 230px; font-size: .92rem; line-height: 1.45; }
.tk-map a.leaflet-popup-close-button { display: grid; place-items: center; width: 28px; height: 28px; top: 8px; right: 8px; padding: 0; border-radius: 50%; font: 400 20px/1 var(--font); color: var(--muted); }
.tk-map a.leaflet-popup-close-button:hover { background: var(--surface-2); color: var(--ink); }
.tk-map .leaflet-popup:has(.tk-popup__head) a.leaflet-popup-close-button { color: #a99da1; }
.tk-map .leaflet-popup:has(.tk-popup__head) a.leaflet-popup-close-button:hover { background: rgba(255, 255, 255, .1); color: var(--led); }
.tk-popup--stop { display: grid; gap: 3px; padding: 12px 44px 13px 16px; }
.tk-popup__kind { color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.tk .tk-popup--stop a { color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.3; }
.tk .tk-popup--stop a.tk-popup__go { color: var(--link); font-size: .85rem; font-weight: 600; }
.tk-map-caption { margin: 0 0 40px; }
.tk-map-note { background-color: var(--blind) !important; padding: 8px 14px; letter-spacing: .03em; border: 0 !important; border-radius: 10px !important; max-width: min(520px, 70vw); line-height: 1.35; }

.tk-popup__head { display: flex; align-items: center; gap: 12px; padding: 12px 40px 12px 14px; background: var(--blind); }
.tk-popup__head a { color: var(--led); font-weight: 700; }
.tk-popup__head a:hover { color: var(--spark); }
.tk-popup dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; padding: 12px 14px; }
.tk-popup dt { color: var(--muted); font-size: .85rem; }
.tk-popup dd { margin: 0; font-weight: 600; }
.tk-popup__foot { padding: 11px 14px 13px; border-top: 1px solid var(--rule); font-size: .88rem; font-weight: 600; }

/* A bus on the map: a little blind with the route on it, a pointer showing which way it is heading. */
.tk-bus {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 24px;
    padding: 0 5px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1;
    letter-spacing: .03em;
    white-space: nowrap;
    box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0, 0, 0, .45);
}
.tk-bus__arrow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.tk-bus__arrow::before { content: ""; position: absolute; left: -6px; top: -27px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 8px solid var(--accent); }
.tk-map path.tk-route-line { stroke: var(--accent); stroke-width: 5; stroke-opacity: .85; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tk-map path.tk-route-stop { stroke: var(--ink); stroke-width: 2.5; fill: var(--surface); fill-opacity: 1; }

/* ---------- the live map page: the map fills the window ---------- */
.tk-home { position: relative; }
.tk-home .tk-map { height: calc(100vh - var(--header-h)); min-height: 480px; margin: 0; border-radius: 0; box-shadow: none; }
.tk-home__board { position: absolute; left: var(--gutter); bottom: 32px; z-index: 900; width: min(380px, calc(100% - 2 * var(--gutter))); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); overflow: hidden; }
.tk-home__board .tk-blind { display: grid; grid-auto-flow: row; justify-items: start; border-radius: 0; box-shadow: none; padding: 18px 22px 16px; width: 100%; }
.tk-home__count { font-family: var(--dots); font-weight: 900; font-size: 3rem; line-height: 1; }
.tk-home__count-label { font-family: var(--dots); font-weight: 800; font-size: 1.1rem; letter-spacing: .04em; margin-top: 6px; }
.tk-home__board p { margin: 0; padding: 14px 22px 16px; font-size: .92rem; color: var(--ink-2); }

/* ---------- the front page ---------- */
.tk-welcome { background: radial-gradient(1200px 520px at 85% -10%, var(--band-2), transparent 70%), var(--band); color: var(--band-ink); overflow: hidden; }
.tk-welcome__inner { max-width: var(--measure); margin: 0 auto; padding: 56px var(--gutter) 100px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.tk-welcome__title { margin: 0 0 18px; font-size: clamp(2.5rem, 5.2vw, 4.5rem); line-height: .98; font-weight: 800; font-stretch: 116%; letter-spacing: -.01em; }
.tk-welcome__title em { font-style: normal; color: var(--spark); }
.tk-welcome__lead { max-width: 34em; margin: 0 0 28px; font-size: 1.15rem; color: var(--band-muted); }
.tk-bigsearch { position: relative; display: flex; align-items: center; gap: 12px; max-width: 560px; padding: 0 18px; height: 58px; background: #ffffff; color: #1d1415; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .32); }
.tk-bigsearch .fa-solid { color: #7a6a68; }
.tk-bigsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: inherit; font: 500 1.05rem var(--font); color-scheme: light; }
.tk-bigsearch input::placeholder { color: #8a7c7a; }
.tk-bigsearch:focus-within { box-shadow: 0 20px 50px rgba(0, 0, 0, .32), 0 0 0 3px var(--spark); }
.tk-bigsearch .tk-search-results { top: calc(100% + 10px); }
.tk-quick { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.tk .tk-quick a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; color: var(--band-ink); font-size: .88rem; font-weight: 500; background: color-mix(in srgb, var(--band-ink) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--band-ink) 14%, transparent); }
.tk .tk-quick a:hover { color: var(--spark); box-shadow: inset 0 0 0 1px var(--spark); }

/* The departure board in its case. */
.tk-board-wrap { padding: 10px; border-radius: 20px; background: var(--housing); box-shadow: 0 30px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12); }
.tk-board { border-radius: 11px; padding: 18px 22px 20px; background-size: 5px 5px; }
.tk-board__top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 1.05rem; }
.tk .tk-board a { color: var(--led); }
.tk .tk-board a:hover { color: var(--spark); }
.tk-board__rows { list-style: none; margin: 0; padding: 0; }
.tk-board__rows li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; gap: 14px; padding: 5px 0; font-size: clamp(1.1rem, 1.9vw, 1.42rem); }
.tk-board__line { font-weight: 900; }
.tk-board__dest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-board__due { white-space: nowrap; }
.tk-board__none { margin: 14px 0 6px; font-size: 1.15rem; }
.tk-board-wrap__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 10px 6px 2px; color: #b9adb1; font-size: .82rem; }
.tk-board-wrap__foot nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tk .tk-board-wrap__foot a { color: #b9adb1; }
.tk .tk-board-wrap__foot a:hover, .tk .tk-board-wrap__foot a[aria-current] { color: #ffffff; }
.tk .tk-board-wrap__foot a[aria-current] { text-decoration: underline; text-underline-offset: 3px; }

/* The numbers strip, lapping over the band. */
.tk-stats { position: relative; margin-top: -48px; padding: 0 var(--gutter); }
.tk-stats__inner { max-width: calc(var(--measure) - 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lift); overflow: hidden; }
.tk-stats__inner > div { padding: 22px 26px; display: grid; align-content: center; gap: 2px; }
.tk-stats__inner > div + div { border-left: 1px solid var(--rule); }
.tk-stats__inner strong { font-size: 1.8rem; font-weight: 750; font-stretch: 110%; line-height: 1.1; }
.tk-stats__inner span { color: var(--muted); font-size: .92rem; }
.tk-stats__inner > .tk-stats__live { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; background-size: 5px 5px; }
.tk-stats__inner > .tk-stats__live span { color: var(--led); font-size: 1rem; }
.tk-stats__inner > .tk-stats__live .tk-stats__num { font-size: 2.7rem; font-weight: 900; line-height: .95; }

.tk-wrap--home { padding-top: 72px; padding-bottom: 0; }
.tk-band-section { margin-bottom: 72px; }
.tk-why { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tk-why li { padding: 24px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tk-why__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.tk-why h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; }
.tk-why p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.tk-home-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.tk-mapcard { position: relative; }
.tk-mapcard .tk-map { height: 100%; min-height: 380px; margin: 0; }
.tk-mapcard__cta { position: absolute; left: 18px; bottom: 18px; z-index: 900; box-shadow: var(--shadow-lift); }
.tk-popular { padding: 26px; }
.tk-popular h2 { font-size: 1.25rem; font-weight: 750; margin: 0 0 12px; }
.tk-popular ul { list-style: none; margin: 0 0 14px; padding: 0; }
.tk .tk-popular li a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 600; }
.tk .tk-popular li a:hover { color: var(--accent); }
.tk-popular li span { color: var(--muted); font-weight: 400; font-size: .9rem; }
.tk .tk-popular__all { font-weight: 650; }

.tk-join { background: var(--accent); color: var(--accent-ink); }
.tk-join__inner { max-width: var(--measure); margin: 0 auto; padding: 40px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.tk-join h2 { font-size: 1.7rem; font-weight: 800; font-stretch: 110%; margin: 0 0 4px; }
.tk-join p { margin: 0; opacity: .88; }
.tk a.tk-join__btn { display: inline-flex; padding: 14px 24px; border-radius: 12px; background: var(--accent-ink); color: var(--accent); font-weight: 700; }
.tk a.tk-join__btn:hover { color: var(--accent); filter: brightness(1.05); transform: translateY(-1px); }

/* ---------- footer ---------- */
.tk-footer { background: var(--band); color: var(--band-muted); font-size: .86rem; }
.tk-footer__inner { max-width: var(--measure); margin: 0 auto; padding: 48px var(--gutter) 48px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; }
.tk-footer__brand p { margin: 16px 0 0; color: var(--band-ink); font-size: .95rem; max-width: 36ch; }
.tk-footer__col h2 { margin: 4px 0 12px; font-size: .74rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--band-muted); }
.tk-footer__col ul { list-style: none; margin: 0; padding: 0; }
.tk-footer__col li { padding: 4px 0; font-size: .95rem; }
.tk .tk-footer__col a { color: var(--band-ink); text-decoration: none; }
.tk .tk-footer__col a:hover { color: var(--spark); }
.tk-footer__credits { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--band-rule); }
.tk-footer .footer-attribution { line-height: 1.7; }
.tk-footer a { color: var(--band-ink); text-decoration: underline; text-decoration-color: var(--band-rule); text-underline-offset: 3px; }
.tk-footer a:hover { color: var(--spark); }
.tk-footer .footer-attribution-more { margin-left: 4px; }

/* ---------- workings and route plates in tables ---------- */
.tk-plates { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tk-plates .tk-line { font-size: .85rem; min-width: 2.6em; height: 1.8em; }
.tk a.tk-working { display: inline-block; min-width: 3.4em; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink); font-weight: 800; text-align: center; }
.tk a.tk-working:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- colour picker (header) ---------- */
.tk-palette { position: relative; }
.tk-palettes { position: absolute; right: 0; top: calc(100% + 10px); z-index: 1200; width: 300px; padding: 14px; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lift); }
.tk-palettes[hidden] { display: none; }
.tk-palettes__title { margin: 0 0 10px; font-size: .74rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tk-palettes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tk-palettes__grid button { display: grid; justify-items: center; gap: 6px; padding: 9px 4px 8px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: .8rem; line-height: 1.2; cursor: pointer; }
.tk-palettes__grid button:hover { background: var(--row-hover); }
.tk-palettes__grid button[aria-pressed="true"] { border-color: var(--accent); background: var(--row-hover); font-weight: 600; }
.tk-palettes__note { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
    .tk-welcome__inner { grid-template-columns: 1fr; gap: 40px; padding-bottom: 90px; }
    .tk-why { grid-template-columns: 1fr 1fr; }
    .tk-home-split { grid-template-columns: 1fr; }
    .tk-stats__inner { grid-template-columns: 1fr 1fr; }
    .tk-stats__inner > div:nth-child(3) { border-left: 0; }
    .tk-stats__inner > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 800px) {
    .tk-header__inner { height: auto; flex-wrap: wrap; gap: 12px 16px; padding-top: 12px; padding-bottom: 12px; }
    .tk-search { order: 3; flex-basis: 100%; max-width: none; }
    .tk-is-home .tk-header .tk-search { display: none; }
    .tk-hide-sm { display: none; }
    .tk-header__nav { gap: 16px; }
    .tk-hero__inner { padding-top: 20px; padding-bottom: 30px; }
    .tk-blind { padding: 14px 20px 12px; border-radius: 10px; }
    .tk-blind--num { padding-left: 0; }
    .tk-tabs { margin-top: 24px; }
    .tk .tk-tabs a { padding: 11px 16px 12px; }
    .tk-table th, .tk-table td { padding-left: 14px; padding-right: 14px; }
    .tk-home .tk-map { height: calc(100vh - 124px); }
    .tk-home__board { left: 12px; right: 12px; bottom: 16px; width: auto; }
    .tk-footer__inner { grid-template-columns: 1fr 1fr; }
    .tk-footer__brand { grid-column: 1 / -1; }
    .tk-split { grid-template-columns: 1fr; gap: 32px; }
    .tk-form__row { grid-template-columns: 1fr; }
    .tk-form { padding: 20px; }
    .tk .tk-header__link { height: auto; }
    .tk .tk-header__link.is-active { box-shadow: none; color: var(--spark); }
    .tk-welcome__inner { padding-top: 36px; }
    .tk-board__rows li { grid-template-columns: 2.8em minmax(0, 1fr) auto; gap: 10px; }
}
@media (max-width: 560px) {
    .tk-why { grid-template-columns: 1fr; }
    .tk-stats__inner { grid-template-columns: 1fr; }
    .tk-stats__inner > div + div { border-left: 0; border-top: 1px solid var(--rule); }
    .tk-routes, .tk-stoplist, .tk-ops, .tk-az { padding-left: 16px; padding-right: 16px; }
}
.tk-map .tk-locate { display: grid !important; place-items: center; font-size: .95rem; cursor: pointer; }
