/* Sikap design tokens, handoff 5 Oct 2026.
   Source of truth: the decided boards on the "Sikap home directions" canvas.
   Self-host every font. No cookies, no analytics, no third-party requests at runtime. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: Maragsa; src: url(/assets/fonts/Maragsa-Display.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(/assets/fonts/HankenGrotesk-latin-var.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; src: url(/assets/fonts/HankenGrotesk-latin-ext-var.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Colour ---------- */
:root, .light {
  --paper: #FFFFFF;   /* page background */
  --mist: #ECEFF3;    /* panels, map land, globe sphere */
  --soft: #F3F5F8;    /* hover and selected rows */
  --ink: #111821;     /* text, rails, filled stops */
  --slate: #505A67;   /* secondary text, placeholders (7.00:1 on paper) */
  --fade: #8A93A0;    /* map outline, empty level dots, input borders (3.11:1) */
  --line: #C5CCD5;    /* borders, faded track, decorative only */
  --rule: #E3E7EC;    /* row separators */
  --sleeper: #C5CCD5; /* rail sleepers */
  --glow: #D9962F;    /* hovered country on the globe: lighter than ochre */
  --ochre: #9A5208;   /* accent: current stop, focus ring, key figure */
  --onink: #FFFFFF;   /* text on ochre or ink */
  --blue: #2F5FD0;    /* consent ticks, agent sprites */
  --go: #17743F;     /* the stop in progress: green arrow and open-stop edge (5.9:1 on paper) */
  --c1: #B42318; --c2: #0F766E; --c3: #7A3E9D; --c4: #2F5FD0; /* cost bar segments: red, teal, purple, blue (tell apart without colour names) */
}
.dark {
  --paper: #131C27; --mist: #1D2938; --soft: #1D2938; --ink: #ECF0F5; --slate: #AEB8C5;
  --fade: #6B7686; --line: #3A4757; --rule: #2B3746; --sleeper: #46536A;
  --glow: #F4CC85; --ochre: #E2A24A; --onink: #131C27; --blue: #7FA4FF; --go: #5FD08C;
  --c1: #F0746B; --c2: #4FC3AD; --c3: #C39BE0; --c4: #7FA4FF;
}
/* Always white (Edwin, 3 Nov 2026): no automatic dark mode from the Mac or phone setting. .dark stays for a future toggle only. */
/* Logo mark colour is fixed: #D38A1E (exempt from contrast rules as a logo). */

/* ---------- Type ---------- */
:root {
  --font-display: Maragsa, Georgia, serif;          /* headings, city and stop names */
  --font-text: "Hanken Grotesk", system-ui, sans-serif;
  --h1-desk: 64px; --h1-phone: 44px;                /* line-height 1 */
  --h2: 28px;                                        /* section headings, Maragsa 700 */
  --body: 16px; --body-lh: 1.5;
  --small: 14px; --tiny: 13px;                       /* German term under English: 13 to 15px, var(--slate) */
  /* Rules: no monospace anywhere; italics only for quotations; no tracked capitals; no em dashes. */
}

/* ---------- Space and size ---------- */
:root {
  --gutter-phone: 16px; --gutter-desk: 56px;
  --content: 1040px;       /* Sources, Queue, Founder */
  --content-narrow: 760px; /* legal pages */
  --radius: 4px; --radius-lg: 6px;
  --tap: 44px;             /* minimum tap target, house rule */
  --header-desk: 72px; --header-phone: 64px;
}

/* ---------- Motion ---------- */
:root {
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .2s; --t-mid: .42s; --t-slow: .9s;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Base ---------- */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: var(--body); line-height: var(--body-lh); }
a { color: var(--ink); } a:hover { color: var(--ochre); }
input::placeholder { color: var(--slate); opacity: 1; }

/* ---------- Route rail ---------- */
.rail { position: absolute; left: 24px; width: 16px; top: 0; bottom: 0; background: repeating-linear-gradient(to bottom, var(--sleeper) 0 2px, transparent 2px 9px); }
.rail::after { content: ""; position: absolute; left: 5px; width: 6px; top: 0; bottom: 0; background: linear-gradient(to right, var(--ink) 0 2px, var(--paper) 2px 4px, var(--ink) 4px 6px); }
.r1 { fill: none; stroke: var(--sleeper); stroke-width: 16; stroke-dasharray: 2 7; }
.r2 { fill: none; stroke: var(--ink); stroke-width: 6; }
.r3 { fill: none; stroke: var(--paper); stroke-width: 2; }
.rf { fill: none; stroke: var(--line); stroke-width: 4; stroke-dasharray: 8 7; } /* not researched: always paired with text */

/* ---------- Accessibility rules from the 5 Oct review ---------- */
header a, nav a { display: inline-flex; align-items: center; min-height: var(--tap); box-sizing: border-box; }
header a, nav a, footer a { min-width: var(--tap); }
footer a { display: inline-flex; align-items: center; min-height: var(--tap); }
.seal, .ic { position: relative; }
.seal::after, .ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: var(--tap); height: var(--tap); transform: translate(-50%, -50%); } /* 44px hit area, icon stays 16 to 24px */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.seg:focus-visible { outline-offset: -4px; }                 /* segmented control sits in overflow:hidden */
.seg[aria-pressed=true]:focus-visible { outline-color: var(--paper); } /* ochre on the light selected segment in dark mode is only 1.86:1 */
.bar > * + * { box-shadow: inset 2px 0 0 var(--paper); }      /* separator between stacked bar segments */

/* ---------- Shared components (foundation; pages add their own css/<page>.css) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; } html.light { color-scheme: light; } html.dark { color-scheme: dark; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.de { color: var(--slate); font-size: var(--tiny); }                 /* German term next to or under the English */
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter-phone); }
.wrap.narrow { max-width: var(--content-narrow); }
@media (min-width: 900px) { .wrap { padding: 0 var(--gutter-desk); } }

/* header */
.sk-header { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-phone); padding: 0 8px 0 var(--gutter-phone); background: var(--paper); position: relative; z-index: 10; }
.sk-header .logo { display: flex; }
.sk-nav { display: none; align-items: center; gap: 30px; font-size: 16px; font-weight: 500; white-space: nowrap; }
.sk-nav a { text-decoration: none; white-space: nowrap; line-height: 1; }
.sk-nav a[aria-current=page]:not(.cta) { text-decoration: underline 2px var(--ochre); text-underline-offset: 8px; }
.sk-nav .wl { background: var(--ochre); color: var(--onink, #fff); padding: 9px 14px; border-radius: 6px; font-weight: 600; }
.sk-nav .wl[aria-current=page] { text-decoration: none; }
.sk-nav .login { color: var(--slate); font-size: 15px; }
.sk-phone { display: flex; align-items: center; gap: 4px; }
.sk-phone .cta { padding: 0 14px; font-size: 14px; line-height: 1; white-space: nowrap; }   /* the ochre join button beside the menu button (19 Oct 2026) */
.sk-phone .cta[aria-current=page] { text-decoration: none; }
.mb { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.sk-sheet { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line); padding: 4px var(--gutter-phone) 12px; animation: rise .3s var(--ease) both; }
.sk-sheet[hidden] { display: none; }
.sk-sheet a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 17px; font-weight: 500; }
.sk-sheet a[aria-current=page] { color: var(--ochre); }
@media (min-width: 900px) {
  .sk-header { min-height: var(--header-desk); padding: 0 var(--gutter-desk); }
  .sk-nav { display: flex; } .sk-phone { display: none; }
}
/* footer */
.sk-footer { margin-top: 64px; padding: 20px var(--gutter-phone) 28px; border-top: 1px solid var(--rule); font-size: var(--tiny); line-height: 1.5; color: var(--slate); }
.sk-footer p { margin: 0 0 8px; } .sk-footer .links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.sk-footer a { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); }
@media (min-width: 900px) { .sk-footer { padding-left: var(--gutter-desk); padding-right: var(--gutter-desk); } }

/* buttons, inputs, chips */
a, button { -webkit-tap-highlight-color: transparent; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 22px; border: 0; border-radius: var(--radius); background: var(--ink); text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; color: var(--paper) !important; }
.cta.och { background: var(--ochre); font-weight: 700; color: var(--onink) !important; }
.cta[disabled] { opacity: .5; cursor: default; }
.ghost { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.qin, .field { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--fade); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; }
.rchip { display: inline-flex; align-items: center; gap: 5px; min-height: var(--tap); padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.rchip[aria-selected=true], .rchip[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 0 12px 0 10px; border: 0; border-bottom: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.prow[aria-pressed=true] { background: var(--soft); box-shadow: inset 4px 0 0 var(--ochre); }
.seg-group { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.seg { min-height: var(--tap); padding: 0 16px; border: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.seg[aria-pressed=true] { background: var(--ink); color: var(--paper); font-weight: 600; }
.seg + .seg { box-shadow: inset 2px 0 0 var(--paper); }
.x { flex: 0 0 auto; width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--slate); cursor: pointer; font: inherit; font-size: 20px; line-height: 1; }

/* seal and pop-out: 16px icon in a 44px hit area */
.sw { position: relative; display: inline-block; vertical-align: middle; }
.seal { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; color: var(--slate); }   /* sources stay on the page but do not shout */
.seal svg { width: 14px; height: 14px; }
.seal::after, .ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: var(--tap); height: var(--tap); transform: translate(-50%, -50%); }
.pop { position: absolute; left: -8px; top: 28px; width: 250px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 20; font-size: var(--tiny); line-height: 1.45; font-weight: 400; animation: pop .2s var(--ease) both; }
.pop a { word-break: break-all; }
.pop .x { position: absolute; right: 0; top: 0; margin: 0; }
.up .pop { top: auto; bottom: 30px; }
@media (max-width: 899px) { .sw.inline-pop { position: static; } .sw.inline-pop .pop { position: static; width: auto; margin-top: 8px; box-shadow: none; } }

/* empty state, hatched bar and swatch */
.hatch { display: inline-block; width: 28px; height: 12px; vertical-align: middle; background: repeating-linear-gradient(135deg, var(--fade) 0 1px, transparent 1px 5px); border: 1px solid var(--line); }
.empty { color: var(--slate); font-size: var(--small); display: inline-flex; align-items: center; gap: 8px; }
.ckey-m { color: var(--slate); font-size: var(--small); }
.dash-slot { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px; color: var(--slate); font-size: var(--small); }

/* route rail: shared building blocks (pages position them) */
.rail { position: absolute; left: 24px; width: 16px; top: 0; bottom: 0; background: repeating-linear-gradient(to bottom, var(--sleeper) 0 2px, transparent 2px 9px); }
.rail::after { content: ""; position: absolute; left: 5px; width: 6px; top: 0; bottom: 0; background: linear-gradient(to right, var(--ink) 0 2px, var(--paper) 2px 4px, var(--ink) 4px 6px); }
.rail.faded { opacity: .5; } .rail.faded::after { background: repeating-linear-gradient(to bottom, var(--line) 0 8px, transparent 8px 15px); width: 4px; left: 6px; }
.r1 { fill: none; stroke: var(--sleeper); stroke-width: 16; stroke-dasharray: 2 7; }
.r2 { fill: none; stroke: var(--ink); stroke-width: 6; }
.r3 { fill: none; stroke: var(--paper); stroke-width: 2; }
.rf { fill: none; stroke: var(--line); stroke-width: 4; stroke-dasharray: 8 7; }
.f-ink { fill: var(--ink); } .f-paper { fill: var(--paper); } .f-ochre { fill: var(--ochre); } .f-mist { fill: var(--mist); }
.s-ink { stroke: var(--ink); } .s-onink { stroke: var(--onink); } .s-fade { stroke: var(--fade); } .s-line { stroke: var(--line); }
.ic { position: relative; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.nm { display: block; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; min-height: var(--tap); min-width: var(--tap); }
.nm:hover .en { text-decoration: underline 1px; text-underline-offset: 4px; }
details summary { cursor: pointer; list-style: none; } details summary::-webkit-details-marker { display: none; }
details[open] .chev { transform: rotate(90deg); } .chev { transition: transform .2s var(--ease); }
.panel, .card { animation: rise .42s var(--ease) both; }
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }                /* fade only: nothing on the site moves (friend session, 6 Oct 2026) */
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }

/* focus: 2px ochre ring, 2px offset; inside clipped containers it goes inside */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible, [role=tab]:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.seg:focus-visible { outline-offset: -4px; } .seg[aria-pressed=true]:focus-visible { outline-color: var(--paper); }
[role=tab] { min-height: var(--tap); }
.bar > * + * { box-shadow: inset 2px 0 0 var(--paper); }

/* ---------- clickable things look clickable, and nothing moves (friend session, 6 Oct 2026) ---------- */
.prow::after { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-left: 4px; border-top: 2px solid var(--slate); border-right: 2px solid var(--slate); transform: rotate(45deg); }
.prow { border: 1px solid var(--rule); border-top: 0; }
.prow:hover { background: var(--soft); border-color: var(--line); }
.prow:hover::after { border-color: var(--ink); }
.go-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; }
.go-link::after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.go-link:hover { background: var(--soft); border-color: var(--ink); color: var(--ink); }
/* a dropdown arrow on every title that opens */
.dda { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s var(--ease); }
[aria-expanded=true] .dda, details[open] > summary .dda { transform: translateY(2px) rotate(225deg); }
.seg:hover:not([aria-pressed=true]), .rchip:hover:not([aria-pressed=true]) { background: var(--soft); border-color: var(--ink); }
/* a stop that is in progress, and the arrow to the next stop */
.in-progress { color: var(--go); }
select.field { appearance: none; -webkit-appearance: none; height: 52px; padding-right: 44px; font-weight: 600; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
select.field:hover { border-color: var(--ink); }
