/* Flight delay risk and schedule buffers - static site styles.
   Identity: dark apron-ink masthead with an amber accent (kept). Colour tokens live in :root and are
   repeated for the dark theme (media query and [data-theme="dark"]); every group below is defined in all three.
   - Meaning: --good (teal), --warn (amber), --bad (orange-red), --neutral (slate); text-safe on the page surfaces.
   - Risk scale --risk-1 ... --risk-5 (low to high late-arrival rate): yellow, orange, red, crimson. One sequence,
     lightness falls steadily, no green-red pair; the same five steps colour the map dots, route arcs and table.
   - Categorical series --c-a ... --c-f (colour-blind safe set; charts also differ by marker shape or hatch).
   - Map: --sea, --land, --land-line.
   Type: Inter (SIL OFL, bundled in ../fonts, variable weight); nothing is loaded from outside.
   Palette (2026-11-25): light corporate — white page, light grey cards, navy masthead, blue accent. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  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;
}

:root {
  color-scheme: light;
  --ink: #0F2742;
  --tarmac: #FFFFFF;
  --blue: #1F6FEB;
  --orange: #B84C00;
  --amber: #4C93F5;
  --slate: #52606E;

  --bg: var(--tarmac);
  --surface: #F3F6FA;
  --surface-2: #E6ECF3;
  --text: #1B2430;
  --muted: var(--slate);
  --line: #D3DCE6;
  --link: #1A5BC4;
  --focus: #1F6FEB;
  --accent: #1A5BC4;

  --good: #0B6B63;
  --warn: #8A5A00;
  --bad: #B03410;
  --neutral: #52606E;

  --risk-0: #8A97A4;
  --risk-1: #FCE08B;
  --risk-2: #F9B04A;
  --risk-3: #EE7A2B;
  --risk-4: #D13F1F;
  --risk-5: #8E1B3A;

  --c-a: #0072B2;
  --c-b: #B84C00;
  --c-c: #5C6B7A;
  --c-d: #00805F;
  --c-e: #A8337F;
  --c-f: #946200;

  --sea: #D6E6F2;
  --land: #FBFAF6;
  --land-line: #8FA3B6;

  --pass-bg: #D5EFEA;
  --pass-fg: #064E48;
  --fail-bg: #FADBD0;
  --fail-fg: #7A2208;
  --na-bg: #E3E8ED;
  --na-fg: #3E4A57;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C151E;
    --surface: #142130;
    --surface-2: #1B2D40;
    --text: #E4EAF0;
    --muted: #A7B5C3;
    --line: #2A3C4F;
    --link: #8CC8F2;
    --focus: #FFD24A;
    --accent: #FFC93C;
    --good: #2DD4BF;
    --warn: #FFC93C;
    --bad: #FF8A5C;
    --neutral: #A7B5C3;
    --risk-0: #7D8B99;
    --risk-1: #F7E7A1;
    --risk-2: #F5B454;
    --risk-3: #EE7D3E;
    --risk-4: #E4484F;
    --risk-5: #D2418F;
    --c-a: #56B4E9;
    --c-b: #FF9A4D;
    --c-c: #A7B5C3;
    --c-d: #3CCB9D;
    --c-e: #E58AC3;
    --c-f: #F2C14E;
    --sea: #0A1826;
    --land: #182A3C;
    --land-line: #4A647D;
    --pass-bg: #0F3F3B;
    --pass-fg: #A8F0E4;
    --fail-bg: #4D2012;
    --fail-fg: #FFD2C2;
    --na-bg: #22303F;
    --na-fg: #C3CED9;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C151E;
  --surface: #142130;
  --surface-2: #1B2D40;
  --text: #E4EAF0;
  --muted: #A7B5C3;
  --line: #2A3C4F;
  --link: #8CC8F2;
  --focus: #FFD24A;
  --accent: #FFC93C;
  --good: #2DD4BF;
  --warn: #FFC93C;
  --bad: #FF8A5C;
  --neutral: #A7B5C3;
  --risk-0: #7D8B99;
  --risk-1: #F7E7A1;
  --risk-2: #F5B454;
  --risk-3: #EE7D3E;
  --risk-4: #E4484F;
  --risk-5: #D2418F;
  --c-a: #56B4E9;
  --c-b: #FF9A4D;
  --c-c: #A7B5C3;
  --c-d: #3CCB9D;
  --c-e: #E58AC3;
  --c-f: #F2C14E;
  --sea: #0A1826;
  --land: #182A3C;
  --land-line: #4A647D;
  --pass-bg: #0F3F3B;
  --pass-fg: #A8F0E4;
  --fail-bg: #4D2012;
  --fail-fg: #FFD2C2;
  --na-bg: #22303F;
  --na-fg: #C3CED9;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
h2 { font-size: 1.75rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
p, li, dd { max-width: 70ch; }

a { color: var(--link); text-underline-offset: 0.15em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h2:focus, main:focus { outline: none; }

.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 10;
  background: var(--amber); color: var(--ink); padding: 0.5rem 0.9rem; font-weight: 600;
}
.skip:focus { top: 0.5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Masthead and section tabs */
.masthead { background: var(--ink); color: #F1F5F9; }
.masthead :focus-visible { outline-color: var(--amber); }
.masthead-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0.9rem 1rem 0.5rem;
  display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between;
}
.brand h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.01em; }
.disclaimer { color: #C3D0DC; font-size: 0.9rem; margin-top: 0.15rem; }

.tabs { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; overflow-x: auto; }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; min-width: max-content; }
.tabs li { max-width: none; }
.tabs a {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.7rem 0.9rem 0.6rem; color: #DCE6EF; text-decoration: none;
  border-bottom: 4px solid transparent; font-weight: 500;
}
.tabs a:hover { color: #FFFFFF; border-bottom-color: #566B80; }
.tabs a[aria-current="page"] { color: #FFFFFF; border-bottom-color: var(--amber); font-weight: 600; }
.tab-ico { display: inline-flex; color: #9FB6CC; }
.tabs a:hover .tab-ico { color: #FFFFFF; }
.tabs a[aria-current="page"] .tab-ico { color: var(--amber); }

/* Icons (js/simgeler.js): decorative, take the colour of the text next to them */
.ico { flex: none; vertical-align: -0.2em; }
.with-ico { display: flex; align-items: center; gap: 0.5rem; }
.with-ico .ico { color: var(--accent); }
.note-ico { display: flex; align-items: flex-start; gap: 0.5rem; }
.note-ico .ico { margin-top: 0.2em; color: var(--accent); }

.sample-banner { background: var(--amber); color: var(--ink); padding: 0.6rem 1rem; text-align: center; font-weight: 600; }

/* Layout */
main { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.view > h2 { margin-bottom: 1.25rem; }
[data-view-body] > * + * { margin-top: 2rem; }
.stack > * + * { margin-top: 0.9rem; }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 1rem 2.5rem; color: var(--muted); font-size: 0.9rem; max-width: var(--wrap); margin: 0 auto; }
.site-footer p + p { margin-top: 0.4rem; }

/* Buttons and form controls */
.btn {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  padding: 0.4rem 0.8rem; border-radius: 3px;
}
.btn:hover { border-color: var(--blue); }
.theme-btn { background: transparent; color: #F1F5F9; border-color: #566B80; flex: none; }
.theme-btn:hover { border-color: #FFFFFF; }

.controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; font-weight: 600; min-width: 11rem; }
.field select {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface);
  border: 1px solid var(--muted); border-radius: 3px; padding: 0.4rem 0.5rem; max-width: 100%;
}

/* Notices */
.notice { border-left: 5px solid var(--c-a); background: var(--surface); padding: 0.7rem 0.9rem; }
.notice.warn { border-left-color: var(--bad); }
.notice > .ico { float: left; margin: 0.15em 0.6rem 0 0; color: var(--c-a); }
.notice.warn > .ico { color: var(--bad); }
.notice > .ico + span { display: block; overflow: hidden; }
main section > h3 { border-left: 5px solid var(--amber); padding-left: 0.6rem; }
.story-step > h3 { border-left: 0; padding-left: 0; }
.notice strong { font-weight: 700; }
.note { color: var(--muted); font-size: 0.9rem; }
.status { color: var(--muted); }
.error { border-left: 5px solid var(--orange); background: var(--fail-bg); color: var(--fail-fg); padding: 0.8rem 1rem; }
.error p + p { margin-top: 0.5rem; }
.error .btn { margin-top: 0.75rem; }

/* Story hero: one question, three findings, one chart (dark board, amber accents) */
.hero { background: var(--ink); color: #E8EEF4; padding: 1.5rem 1.25rem 1.5rem; display: grid; gap: 1.25rem; }
.hero-q { font-family: var(--font-head); font-size: 1.7rem; line-height: 1.25; font-weight: 600; max-width: 34ch; color: #FFFFFF; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.finding { max-width: none; background: #1B2D40; border-top: 4px solid var(--amber); padding: 0.8rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.finding-label { font-weight: 600; color: #C3D0DC; font-size: 0.95rem; }
.finding-big { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; line-height: 1.1; color: var(--amber); font-variant-numeric: tabular-nums; }
.finding-text { color: #E8EEF4; }
.hero-figure { margin: 0; }
.hero-figure figcaption { margin-bottom: 0.4rem; }
.hero .note { color: #C3D0DC; }
.hero .chart-box { max-width: 42rem; }
.scope { color: #C3D0DC; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: none; }
.hero .btn { background: transparent; color: #FFFFFF; border-color: #8CA0B3; }
.hero .btn:hover { border-color: #FFFFFF; }
.hero .btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.hero .btn:focus-visible { outline-color: var(--amber); }
a.btn { display: inline-block; text-decoration: none; }
.story-steps { margin-top: 2rem; }
.story-steps:focus { outline: none; }
.story-steps > * + * { margin-top: 2rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem 1.5rem; margin: 1.25rem 0 0; padding: 0; }
.facts div { border-top: 3px solid var(--amber); padding-top: 0.4rem; }
.facts dt { color: var(--muted); font-size: 0.85rem; }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Collapsible sections (Results, Explore, Buffers, Method) */
.fold { border: 1px solid var(--line); border-left: 5px solid var(--amber); background: var(--surface); }
.fold > summary { cursor: pointer; padding: 0.7rem 0.9rem; font-weight: 600; display: flex; flex-direction: column; gap: 0.15rem; }
.fold > summary::marker { color: var(--blue); }
.fold-title { font-family: var(--font-head); font-size: 1.1rem; }
.fold-sub { font-weight: 400; color: var(--muted); font-size: 0.92rem; }
.fold-body { padding: 0.25rem 0.9rem 1rem; }
.folds > * + * { margin-top: 0.6rem; }
.about-box { border-left: 5px solid var(--amber); background: var(--surface); padding: 0.9rem 1rem; margin-top: 2rem; }
.about-links a { white-space: nowrap; }
.explore-routes { margin-top: 2rem; }
.explore-routes h3:focus { outline: none; }

.board { width: 100%; border-collapse: collapse; background: var(--ink); color: #E8EEF4; font-size: 0.95rem; }
.board caption { text-align: left; padding: 0.7rem 0.9rem; background: #0B1722; color: #C3D0DC; font-weight: 600; caption-side: top; }
.board th, .board td { padding: 0.55rem 0.9rem; text-align: left; vertical-align: baseline; }
.board thead th { color: #9FB1C2; font-weight: 500; font-size: 0.85rem; border-bottom: 2px solid var(--amber); }
.board tbody tr + tr > * { border-top: 1px solid #2B3D50; }
.board tbody th { font-weight: 500; }
.board td.num { font-size: 1.1rem; font-weight: 600; white-space: nowrap; }
.board td.ci { color: #C3D0DC; white-space: nowrap; }
.board td.ref { color: #C3D0DC; }
.board-wrap { overflow-x: auto; }

/* Acceptance criteria */
.criteria { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.criteria > li { max-width: none; display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 0.25rem 0.75rem; align-items: baseline; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); }
.criteria > li.is-fail { border-left: 5px solid var(--bad); background: var(--surface); }
.criteria .cid { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.criteria .ctitle { font-weight: 500; }
.criteria details { grid-column: 2 / -1; font-size: 0.9rem; color: var(--muted); }
.criteria summary { cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.65rem 0.15rem 0.5rem; border-radius: 3px; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.badge.pass { background: var(--pass-bg); color: var(--pass-fg); }
.badge.fail { background: var(--fail-bg); color: var(--fail-fg); }
.badge.na { background: var(--na-bg); color: var(--na-fg); }

.points { padding-left: 1.2rem; }
.points li { margin-top: 0.4rem; }

/* Generic tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); max-width: 100%; }
.table-wrap:focus-visible { outline-offset: -3px; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
table.data caption { text-align: left; padding: 0.55rem 0.7rem; font-weight: 600; }
table.data th, table.data td { padding: 0.4rem 0.65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; white-space: nowrap; }
table.data thead th { background: var(--surface-2); font-weight: 600; }
table.data tr.group-row th { text-align: center; font-size: 0.8rem; color: var(--muted); border-left: 1px solid var(--line); }
table.data tr.group-row th:first-child { border-left: 0; }
table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
table.data tbody th { font-weight: 600; }
table.data .np { color: var(--muted); font-style: italic; }
table.sticky-first th:first-child, table.sticky-first td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.sticky-first thead th:first-child { background: var(--surface-2); }
button.sort { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button.sort .arrow { display: inline-block; min-width: 1em; color: var(--muted); }
button.sort:hover { text-decoration: underline; }
.table-status { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }
.table-more { margin-top: 0.5rem; }
.link-btn { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.15em; font-weight: 600; }

/* Charts and map */
.chart-box { background: var(--surface); border: 1px solid var(--line); padding: 0.5rem; max-width: 46rem; }
.chart-box.wide { max-width: none; }
.chart { display: block; width: 100%; height: auto; }
.chart text { font-family: var(--font-body); font-size: 12px; fill: var(--muted); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1.2; }
.chart .diag { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 4; }
.chart .ref { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 6 4; }
.chart text.ref-label { fill: var(--text); text-anchor: end; }
.chart text.axis-title { fill: var(--text); text-anchor: middle; font-size: 12.5px; }
.chart text.bar-val { fill: var(--text); }
.chart .bar { fill: var(--c-a); }
.chart .bar.neg { fill: var(--c-b); }
.chart.mini { display: inline-block; width: 150px; height: 22px; vertical-align: middle; }

.ser { --sc: var(--c-a); }
.ser-a { --sc: var(--c-a); }
.ser-b { --sc: var(--c-b); }
.ser-c { --sc: var(--c-c); }
.ser-d { --sc: var(--c-d); }
.ser-e { --sc: var(--c-e); }
.ser-f { --sc: var(--c-f); }
.ser .line { fill: none; stroke: var(--sc); stroke-width: 2.2; }
.ser.dashed .line { stroke-dasharray: 7 4; }
.ser .mk { fill: var(--sc); stroke: var(--sc); stroke-width: 1.5; }
.ser.hollow .mk { fill: var(--surface); }

.legend { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-size: 0.9rem; }
.legend li { display: flex; align-items: center; gap: 0.4rem; max-width: none; }
.swatch { flex: none; }

/* Map: sea (background) and land (state fill) differ softly; the graticule is a faint dotted line that only
   shows over the sea (land is drawn on top of it). */
.map-box { background: var(--sea); border: 1px solid var(--line); }
.map { display: block; width: 100%; height: auto; }
.map .map-bg { fill: var(--sea); }
.map .grid { fill: none; stroke: var(--land-line); stroke-width: 0.8; stroke-opacity: 0.4; stroke-dasharray: 1 5; stroke-linecap: round; }
.map text { font-family: var(--font-body); }
.map .grid-label { font-size: 11px; fill: var(--muted); }
.map .state { fill: var(--land); stroke: var(--land-line); stroke-width: 0.7; stroke-linejoin: round; }
.map .leader { stroke: var(--muted); stroke-width: 1; }
.map .pt { cursor: pointer; }
.map .pt:focus { outline: none; }
.pt .dot, .legend-svg .dot { stroke: var(--text); stroke-width: 1.2; fill: var(--surface); }
.pt.sel .dot { stroke-width: 2.6; }
.pt.hidden-pt .dot { fill: none; stroke-dasharray: 3 2; }
.map .pt .ring { fill: none; stroke: transparent; stroke-width: 3; }
.map .pt:hover .ring { stroke: var(--muted); }
.map .pt.sel .ring, .map .pt:focus-visible .ring { stroke: var(--focus); }
.map .pt-label { font-size: 11px; font-weight: 600; fill: var(--text); paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }

/* Risk scale: five steps, shared by dots, arcs, table bars and the legend (class number = step) */
.dot.r1, .arc-end.r1, .cbar-fill.r1 { fill: var(--risk-1); }
.dot.r2, .arc-end.r2, .cbar-fill.r2 { fill: var(--risk-2); }
.dot.r3, .arc-end.r3, .cbar-fill.r3 { fill: var(--risk-3); }
.dot.r4, .arc-end.r4, .cbar-fill.r4 { fill: var(--risk-4); }
.dot.r5, .arc-end.r5, .cbar-fill.r5 { fill: var(--risk-5); }
.arc-end.r0 { fill: var(--risk-0); }
.rs0 { stroke: var(--risk-0); }
.rs1 { stroke: var(--risk-1); }
.rs2 { stroke: var(--risk-2); }
.rs3 { stroke: var(--risk-3); }
.rs4 { stroke: var(--risk-4); }
.rs5 { stroke: var(--risk-5); }
.sw.r1 { background: var(--risk-1); }
.sw.r2 { background: var(--risk-2); }
.sw.r3 { background: var(--risk-3); }
.sw.r4 { background: var(--risk-4); }
.sw.r5 { background: var(--risk-5); }
.rb1 { --rb: var(--risk-1); }
.rb2 { --rb: var(--risk-2); }
.rb3 { --rb: var(--risk-3); }
.rb4 { --rb: var(--risk-4); }
.rb5 { --rb: var(--risk-5); }

/* Route arcs: a darker casing keeps pale arcs readable on the pale land in the light theme */
.arc { cursor: pointer; }
.arc:focus { outline: none; }
.arc-hit { fill: none; stroke: transparent; stroke-linecap: round; }
.arc-case { fill: none; stroke: var(--text); stroke-opacity: 0.8; stroke-linecap: round; }
.arc-line { fill: none; stroke-linecap: round; stroke-opacity: 1; }
.arc-glow { display: none; fill: none; stroke-linecap: round; pointer-events: none; }
.arc-end { stroke: var(--text); stroke-width: 1.2; stroke-opacity: 0.9; }
.arc:hover .arc-case { stroke-opacity: 1; }
.arc:focus .arc-case { stroke: var(--focus); stroke-opacity: 1; }
.map .tip { pointer-events: none; }
.map .tip.off { display: none; }
.map .tip-bg { fill: var(--surface); stroke: var(--text); stroke-width: 1; }
.map .tip-head { font-size: 12px; font-weight: 700; fill: var(--text); }
.map .tip-line { font-size: 12px; fill: var(--text); }

/* Map legend: colour strip, size key, arc key */
.map-legend { display: grid; gap: 0.7rem; background: var(--surface); border: 1px solid var(--line); padding: 0.7rem 0.9rem; }
.legend-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.9rem; }
.legend-row.legend-col { flex-direction: column; align-items: stretch; gap: 0.3rem; }
.legend-group { display: grid; gap: 0.5rem; }
.legend-title { font-weight: 600; }
.legend-svg { flex: none; }
.risk-strip { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; max-width: 30rem; }
.risk-strip li { flex: 1 1 0; min-width: 0; max-width: none; display: flex; flex-direction: column; gap: 0.2rem; }
.sw { display: block; height: 0.9rem; border-radius: 2px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 45%, transparent); }
.sw-label { font-size: 0.78rem; color: var(--muted); text-align: center; white-space: nowrap; }

.detail { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--amber); padding: 0.8rem 1rem; }
.detail h3 { margin-bottom: 0.4rem; }
.detail dl { margin: 0.6rem 0 0; display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.detail { border-top-color: var(--accent); }
.detail dd { color: var(--text); }

/* Explore: summary cards (icon, title, big number, one line) */
.explore-cards:empty { display: none; }
.explore-cards { margin-top: 2rem; }
.tone-good { --tone: var(--good); }
.tone-warn { --tone: var(--warn); }
.tone-bad { --tone: var(--bad); }
.tone-neutral { --tone: var(--neutral); }
.stat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); gap: 1rem; }
.stat-card { max-width: none; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--tone, var(--neutral)); padding: 0.8rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.stat-ico { display: inline-grid; place-items: center; align-self: flex-start; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--tone, var(--neutral)); background: color-mix(in srgb, var(--tone, var(--neutral)) 14%, var(--surface)); }
.stat-card h4 { font-size: 1rem; }
.stat-big { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-note { font-size: 0.9rem; color: var(--muted); }
.stat-row { display: flex; align-items: flex-start; gap: 0.5rem; max-width: none; }
.stat-row .ico { margin-top: 0.15rem; color: var(--tone, var(--neutral)); }

/* Explore: route table (risk badge, small bars, plain column titles with a small technical tag) */
.p-legend { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c-a); padding: 0.7rem 0.9rem; display: grid; gap: 0.5rem; }
.p-legend-title { display: flex; align-items: center; gap: 0.5rem; }
.p-legend-title .ico { color: var(--c-a); }
.p-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem 1.2rem; }
.p-list > div { max-width: none; }
.p-list dt { font-weight: 600; }
.p-list dd { margin: 0; color: var(--muted); }
.th-tag { display: inline-block; font-size: 0.7rem; font-weight: 600; line-height: 1.35; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 0.3rem; font-variant-numeric: tabular-nums; }
.th-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; max-width: 9.5rem; white-space: normal; }
table.data th.num .th-stack { align-items: flex-end; }
.th-main { display: inline-flex; align-items: center; gap: 0.3rem; text-align: inherit; }
.th-ico .ico { color: var(--accent); }
.risk-cell, .q-cell, .buf-cell { display: inline-flex; align-items: center; gap: 0.5rem; }
.buf-cell .ico { color: var(--accent); }
.risk-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.45rem 0.05rem 0.3rem; border: 1px solid var(--line); border-left: 5px solid var(--rb, var(--neutral)); border-radius: 3px; font-size: 0.78rem; font-weight: 700; background: var(--surface); color: var(--text); }
.cbar { flex: none; display: block; }
.cbar-bg { fill: var(--surface-2); }
.qbar-fill.late { fill: var(--c-a); }
.qbar-fill.early { fill: var(--c-f); }
.qbar-zero { stroke: var(--text); stroke-width: 1; }

details.data-table { margin-top: 0.75rem; }
details.data-table summary { cursor: pointer; font-weight: 600; }
details.data-table .table-wrap { margin-top: 0.5rem; }

.two-col { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Sözlük */
.gloss-input { font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--muted); border-radius: 3px; padding: 0.4rem 0.5rem; width: 100%; min-width: 14rem; }
.gloss-field { min-width: 16rem; flex: 1 1 16rem; max-width: 28rem; }
.gloss-group h3 { border-bottom: 3px solid var(--amber); padding-bottom: 0.3rem; }
.gloss-list { margin: 0; }
.term { max-width: none; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.term:focus { outline: none; }
.term.is-target { border-left: 5px solid var(--amber); background: var(--surface); }
.term dt { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.term dt a { color: inherit; }
.term dd { margin: 0.25rem 0 0; }
.term .where { color: var(--muted); font-size: 0.92rem; }
.term-link { white-space: nowrap; }

.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { max-width: none; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.source-list li:last-child { border-bottom: 1px solid var(--line); }
.source-list .src-url { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }

/* Language switch (TR | EN) */
.header-tools { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.lang-switch { display: inline-flex; flex: none; }
.lang-btn { background: transparent; color: #F1F5F9; border-color: #566B80; border-radius: 0; min-width: 2.75rem; min-height: 2.25rem; }
.lang-btn:first-child { border-radius: 3px 0 0 3px; }
.lang-btn + .lang-btn { margin-left: -1px; border-radius: 0 3px 3px 0; }
.lang-btn:hover { border-color: #FFFFFF; position: relative; }
.lang-btn[aria-pressed="true"] { background: var(--amber); color: var(--ink); border-color: var(--amber); text-decoration: underline; text-underline-offset: 0.2em; position: relative; }
.masthead .lang-btn:focus-visible { outline-color: #FFFFFF; position: relative; z-index: 1; }

/* Story: steps, pictograph, slider */
.lede { font-size: 1.1rem; max-width: 62ch; }
.story-step { border-top: 3px solid var(--amber); padding-top: 1rem; }
.story-step > h3 { display: flex; align-items: center; gap: 0.7rem; font-size: 1.3rem; }
.step-ico { color: var(--accent); }
.step-no { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: var(--amber); font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.fact { font-weight: 600; font-size: 1.05rem; border-left: 4px solid var(--amber); padding-left: 0.75rem; }

.picto-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 2rem; max-width: 34rem; }
.picto-panel { margin: 0; }
.picto-panel figcaption { margin-top: 0.4rem; display: flex; flex-direction: column; gap: 0.1rem; }
.picto-count { font-variant-numeric: tabular-nums; }
.picto { display: block; width: 100%; max-width: 14rem; height: auto; }
.picto .dot.late { fill: var(--c-b); stroke: var(--c-b); stroke-width: 1.5; }
.picto .dot.ok { fill: none; stroke: var(--c-c); stroke-width: 1.5; }

.slider-box { max-width: 40rem; display: flex; flex-direction: column; gap: 0.4rem; }
.slider-label { font-weight: 600; }
.slider-row { display: flex; align-items: center; gap: 1rem; }
.slider { flex: 1 1 auto; min-width: 0; height: 2.25rem; accent-color: var(--blue); cursor: pointer; }
.slider-out { flex: none; min-width: 6.5rem; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; text-align: right; }
.slider-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; padding-right: 7.5rem; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; margin: 0; padding: 0; max-width: 40rem; }
.stat-cards div { background: var(--surface); border-top: 3px solid var(--blue); padding: 0.5rem 0.7rem; }
.stat-cards dt { color: var(--muted); font-size: 0.85rem; }
.stat-cards dd { margin: 0; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.meters { display: flex; flex-direction: column; gap: 0.6rem; max-width: 40rem; }
.meter-row { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) auto; gap: 0.25rem 1rem; align-items: center; }
.meter-row meter { width: 100%; height: 1.2rem; }
.meter-val { font-variant-numeric: tabular-nums; }

.more-links { list-style: none; margin: 0; padding: 0; }
.more-links li { max-width: none; padding: 0.4rem 0; border-top: 1px solid var(--line); }
.more-links li:last-child { border-bottom: 1px solid var(--line); }

/* OR: exploratory section, visibly apart from the main results */
.explore { border: 2px dashed var(--orange); }
.explore-badge { background: var(--fail-bg); color: var(--fail-fg); margin-right: 0.3rem; }
.fold.explore > summary { display: block; }

@media (max-width: 40rem) {
  h2 { font-size: 1.45rem; }
  .hero { padding: 1rem 0.9rem; }
  .hero-q { font-size: 1.3rem; }
  .finding-big { font-size: 1.8rem; }
  .tabs a { padding: 0.65rem 0.7rem 0.55rem; }
  .brand h1 { font-size: 1.25rem; }
  .masthead-inner { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .header-tools { justify-content: flex-start; }
  .theme-btn { align-self: flex-start; }
  .slider-row { flex-wrap: wrap; gap: 0.25rem 1rem; }
  .slider { flex-basis: 100%; }
  .slider-out { text-align: left; }
  .slider-ends { padding-right: 0; }
  .meter-row { grid-template-columns: minmax(0, 1fr) auto; }
  .meter-row .meter-label { grid-column: 1 / -1; }
  .story-step > h3 { font-size: 1.15rem; align-items: flex-start; }
  .criteria > li { grid-template-columns: 2.6rem 1fr; }
  .criteria .badge { grid-column: 2; justify-self: start; }
  .field { min-width: 100%; }
  .board th, .board td { padding: 0.5rem 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .badge { border: 1px solid CanvasText; }
  .map .pt .dot { stroke: CanvasText; }
}

/* Narrow screens: grid/flex children may shrink below their content width (charts scroll inside their box). */
.hero > *, main > *, .story-step > *, .finding { min-width: 0; }
.chart-box { overflow-x: auto; }
.chart-box svg { max-width: 100%; height: auto; }
/* Story slides: one headline, one visual, one or two plain sentences */
.hero-ozet { color: #C3D0DC; max-width: 40rem; }
.slide-fig { margin: 0; display: grid; gap: 0.4rem; }
.slide-fig figcaption { color: var(--muted); font-size: 0.9rem; }
.slide-text { max-width: 46rem; font-size: 1.05rem; }
.details-link { margin: 0; font-size: 0.95rem; }
.picto-big { max-width: 18rem; }
.chart .bar.emph { fill: var(--c-b); stroke: var(--text); stroke-width: 2; }
.chart .col { fill: var(--c-a); }
.chart .col.pred { fill: var(--surface); stroke: var(--c-b); stroke-width: 2; stroke-dasharray: 4 2; }
.chart text.diag-caption { fill: var(--text); font-size: 12.5px; }
.seg.flight, .seg.ok { fill: var(--c-a); }
.seg.delay { fill: var(--c-c); }
.seg.over, .seg.late { fill: var(--c-b); stroke: var(--text); stroke-width: 1.5; }
.seg.col { fill: var(--c-a); }
.seg.pred { fill: var(--surface); stroke: var(--c-b); stroke-width: 2; stroke-dasharray: 4 2; }
.seg.buffer { stroke: var(--c-a); stroke-width: 1.5; }
.seg.saved { stroke: var(--c-d); stroke-width: 1.5; }
.hatch .hatch-bg { fill: var(--surface); }
.hatch-a .hatch-ln { stroke: var(--c-a); stroke-width: 2; }
.hatch-d .hatch-ln { stroke: var(--c-d); stroke-width: 2; }
.key-list { margin-top: 0.3rem; }
.panel-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.panel-pair > * { min-width: 0; }
.action-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.action { max-width: none; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--amber); padding: 0.8rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.action h4 { font-size: 1.05rem; }
.action h4 .ico { color: var(--accent); }
.action p { margin: 0; }
.story-step { scroll-margin-top: 1rem; }
/* Link to the presentation site (header and Story) */
a.btn-present { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 700; }
a.btn-present:hover { border-color: #FFFFFF; }
.masthead a.btn-present:focus-visible { outline-color: #FFFFFF; }
.hero a.btn-present { background: var(--amber); color: var(--ink); border-color: var(--amber); }
/* A hidden (unpublished) airport is drawn as a dashed outline only, so a published neighbour under it keeps its colour. */
.map .pt.hidden-pt .dot { fill: none; }
