@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/onest-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/onest-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/onest-latin-ext-wght-normal.woff2) format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/onest-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Vazirmatn Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/vazirmatn-arabic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Vazirmatn Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/vazirmatn-latin-ext-wght-normal.woff2) format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Vazirmatn Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/vazirmatn-latin-wght-normal.woff2) format('woff2-variations');
  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: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations');
  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;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  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;
}
/* ==========================================================================
   Yabancı design system — "Rota"
   Wayfinding signage + official-document precision.
   Layout uses logical properties only, so dir="rtl" mirrors everything.
   ========================================================================== */

:root {
  --paper: #f6f3ec;
  --paper-2: #eee9df;
  --card: #fffdf8;
  --ink: #16202a;
  --ink-2: #4b5661;
  --ink-3: #5f6964;
  --line: #ddd5c6;
  --line-strong: #c9bfac;
  --bos: #0c5a63;          /* Bosphorus — actions, routes */
  --bos-strong: #08454c;
  --bos-soft: #dcebe9;
  --coral: #d2492a;        /* İznik coral — the dot, urgency */
  --coral-soft: #f9e2d9;
  --coral-ink: #a8361a;    /* coral text on light/soft backgrounds */
  --ok: #1e7048;
  --ok-soft: #dcefe2;
  --warn: #93590c;
  --warn-soft: #f6e8cf;
  --focus: #d2492a;

  --font-sans: 'Onest Variable', 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --lh: 1.6;
  --track-tight: -0.025em;

  --r-s: 6px;
  --r-m: 12px;
  --r-l: 20px;
  --shadow: 0 1px 0 rgba(22, 32, 42, .04), 0 8px 24px -12px rgba(22, 32, 42, .18);
  --gutter: 16px;
  --max: 1200px;
  --header-h: 64px;
  color-scheme: light;
}

@media (min-width: 720px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* Dark theme: "night ferry" — not an inversion; warm ink on deep teal-black. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e161b; --paper-2: #131e24; --card: #17232a;
    --ink: #ece6da; --ink-2: #a9b3b5; --ink-3: #8c9799;
    --line: #26343c; --line-strong: #34454e;
    --bos: #6cc3c4; --bos-strong: #93d6d6; --bos-soft: #11343a;
    --coral: #ff7d5c; --coral-soft: #3a1f18; --coral-ink: #ffa186;
    --ok: #74d09f; --ok-soft: #12301f; --warn: #eab55c; --warn-soft: #33260f;
    --focus: #ff7d5c;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0e161b; --paper-2: #131e24; --card: #17232a;
  --ink: #ece6da; --ink-2: #a9b3b5; --ink-3: #8c9799;
  --line: #26343c; --line-strong: #34454e;
  --bos: #6cc3c4; --bos-strong: #93d6d6; --bos-soft: #11343a;
  --coral: #ff7d5c; --coral-soft: #3a1f18; --coral-ink: #ffa186;
  --ok: #74d09f; --ok-soft: #12301f; --warn: #eab55c; --warn-soft: #33260f;
  --focus: #ff7d5c;
  color-scheme: dark;
}

/* Persian: Vazirmatn, taller line height, never letter-spacing (it breaks
   cursive joining). */
:lang(fa) {
  --font-sans: 'Vazirmatn Variable', 'Vazirmatn', 'Onest Variable', Tahoma, sans-serif;
  --lh: 1.9;
  --track-tight: 0;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 72px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: var(--lh);
  font-feature-settings: 'ss01', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--bos); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--bos-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: var(--track-tight); margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
:lang(fa) :is(h1, h2, h3, h4) { line-height: 1.5; }
p { margin: 0 0 1em; text-wrap: pretty; }
.mono { font-family: var(--font-mono); font-feature-settings: normal; letter-spacing: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-s); }
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--space, 1rem); }

/* Mirrored directional icons in RTL */
[dir='rtl'] .dir-icon { transform: scaleX(-1); }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-2); display: inline-flex; align-items: center; gap: .5em;
}
:lang(fa) .eyebrow { font-family: var(--font-sans); text-transform: none; letter-spacing: 0; font-size: .85rem; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; flex: none; }
.logo:hover { color: var(--ink); }
.logo svg { height: 30px; width: auto; }
.main-nav { display: none; margin-inline-start: 16px; gap: 2px; }
.main-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.main-nav a:hover { background: var(--paper-2); }
.main-nav a[aria-current='page'] { background: var(--ink); color: var(--paper); }
.header-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 999px;
  border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
@media (min-width: 1020px) { .main-nav { display: flex; } .menu-toggle { display: none !important; } }

/* Language switcher — <details>, works without JS */
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang-code { font-family: var(--font-mono); font-weight: 600; font-size: .8rem; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow);
  padding: 6px; margin: 0; list-style: none; z-index: 60;
}
.lang-menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-s); color: var(--ink); text-decoration: none;
}
.lang-menu a:hover { background: var(--paper-2); }
.lang-menu a[aria-current='true'] { background: var(--bos-soft); color: var(--bos-strong); font-weight: 600; }
.lang-menu .missing { opacity: .55; }
.lang-menu small { font-family: var(--font-mono); color: var(--ink-3); font-size: .72rem; }

/* Mobile nav */
.mobile-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--paper); z-index: 49; overflow-y: auto; padding: 20px var(--gutter) 40px; border-top: 1px solid var(--line); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li a { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 600; }
.mobile-nav .secondary a { font-size: 1rem; font-weight: 500; color: var(--ink-2); }
body.nav-open { overflow: hidden; }

/* ---------- Buttons & form controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--bos-strong); border-color: var(--bos-strong); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .92rem; }
.input, select.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-s);
  border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink);
}
.input:focus { border-color: var(--bos); outline: none; box-shadow: 0 0 0 3px var(--bos-soft); }
input[type='date'].input { font-family: var(--font-mono); }
[dir='rtl'] input[type='date'].input, [dir='rtl'] input[type='number'].input { direction: rtl; text-align: start; }

/* Segmented radio "chips" */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--card); font-weight: 500; font-size: .95rem; cursor: pointer;
}
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Search box ---------- */
.searchbox { position: relative; display: flex; align-items: center; max-width: 640px; }
.searchbox svg { position: absolute; inset-inline-start: 18px; width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.searchbox input {
  width: 100%; min-height: 58px; padding-inline: 50px 120px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--card); font-size: 1.02rem;
}
.searchbox input:focus { outline: none; box-shadow: 0 0 0 4px var(--bos-soft); }
.searchbox .btn { position: absolute; inset-inline-end: 6px; min-height: 46px; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 36px; position: relative; }
@media (min-width: 900px) { .hero { padding-block: 72px 56px; } }
.hero h1 { font-size: clamp(2.15rem, 6.2vw, 4.4rem); font-weight: 750; max-width: 15ch; margin-block: 16px 20px; }
:lang(fa) .hero h1 { max-width: 18ch; font-weight: 800; }
:lang(ru) .hero h1 { max-width: 17ch; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 58ch; margin-bottom: 28px; }
.hero-grid { display: grid; gap: 40px; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.1fr .9fr; align-items: start; } .hero-grid > :first-child { padding-top: 24px; } }

/* The signature "route board" */
.board {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; box-shadow: var(--shadow);
}
.board h2 { font-size: 1.15rem; margin-bottom: 4px; }
.board > p { color: var(--ink-2); font-size: .95rem; margin-bottom: 16px; }
.situations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.situation {
  text-align: start; padding: 12px 14px; border-radius: var(--r-m); border: 1.5px solid var(--line);
  background: var(--paper); cursor: pointer; display: grid; gap: 2px; min-height: 64px;
}
.situation strong { font-size: .95rem; line-height: 1.3; }
.situation small { color: var(--ink-2); font-size: .8rem; line-height: 1.3; }
.situation:hover { border-color: var(--line-strong); }
.situation[aria-pressed='true'] { border-color: var(--bos); background: var(--bos-soft); box-shadow: inset 0 0 0 1px var(--bos); }

.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before {
  content: ''; position: absolute; inset-inline-start: 15px; top: 16px; bottom: 16px; width: 3px; background: var(--bos); border-radius: 3px;
}
.route li { position: relative; padding-inline-start: 48px; padding-block: 8px; }
.route .stop {
  position: absolute; inset-inline-start: 0; top: 8px; width: 33px; height: 33px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); border: 3px solid var(--bos);
  font-family: var(--font-mono); font-weight: 700; font-size: .8rem; color: var(--bos-strong);
}
.route li:first-child .stop { background: var(--coral); border-color: var(--coral); color: #fff; }
.route a { font-weight: 600; color: var(--ink); text-decoration: none; display: block; line-height: 1.35; }
.route a:hover { color: var(--bos); text-decoration: underline; }
.route small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: .85rem; line-height: 1.4; }
.route-hint { font-size: .82rem; color: var(--ink-3); margin: 12px 0 0; }

/* ---------- Sections ---------- */
.band { padding-block: 56px; }
.band.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 28px; }
.band-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 8px 0 0; max-width: 24ch; }
.band-head p { color: var(--ink-2); max-width: 52ch; margin: 0; }

/* Deadline clocks */
.clocks { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
@media (min-width: 640px) and (max-width: 999px) {
  .clocks { grid-template-columns: repeat(2, 1fr); }
  .clock:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .clocks { grid-template-columns: repeat(3, 1fr); }
  /* No empty cells whatever the number of clocks */
  .clock:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
  .clock:last-child:nth-child(3n + 2) { grid-column: span 2; }
}
.clock { background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.clock-value { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1; color: var(--bos-strong); }
:lang(fa) .clock-value { letter-spacing: 0; }
.clock.urgent .clock-value { color: var(--coral); }
.clock p { margin: 0; color: var(--ink); font-size: .98rem; flex: 1; }
.clock-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; }
.clock-foot a { color: var(--ink-2); }

/* Topic cards */
.topics { display: grid; gap: 16px; }
@media (min-width: 720px) { .topics { grid-template-columns: repeat(2, 1fr); } }
.topic {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s ease, transform .2s ease;
}
.topic:hover { border-color: var(--line-strong); }
.topic-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.topic-head h3 { font-size: 1.4rem; margin: 0; }
.topic-head h3 a { color: var(--ink); text-decoration: none; }
.topic-head h3 a::after { content: ''; position: absolute; inset: 0; }
.topic { position: relative; }
.topic .count { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.topic > p { color: var(--ink-2); margin: 0; }
.topic ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.topic li { position: relative; z-index: 1; }
.topic li a { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; color: var(--ink); text-decoration: none; border-top: 1px dashed var(--line); }
.topic li a:hover { color: var(--bos); }
.topic li a::before { content: '●'; color: var(--coral); font-size: .6rem; transform: translateY(-2px); }
.topic-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bos-soft); color: var(--bos-strong); flex: none; }
.topic-mark svg { width: 22px; height: 22px; }

/* Tool cards */
.tools-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tools-grid { grid-template-columns: repeat(4, 1fr); } }
.tool-card {
  position: relative; background: var(--ink); color: var(--paper); border-radius: var(--r-l); padding: 22px; min-height: 200px;
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; overflow: hidden;
}
:root[data-theme='dark'] .tool-card, .tool-card { --tc-line: rgba(255,255,255,.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .tool-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); } }
:root[data-theme='dark'] .tool-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
:root[data-theme='dark'] .tool-card:hover, :root:not([data-theme='light']) .tool-card:hover { color: var(--paper); }
.tool-card:hover { color: var(--paper); background: var(--bos-strong); }
.tool-card .num { font-family: var(--font-mono); font-size: .78rem; opacity: .7; }
.tool-card h3 { font-size: 1.15rem; margin: 0; }
.tool-card p { font-size: .9rem; opacity: .82; margin: 0; flex: 1; }
.tool-card .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.tool-card .go svg { width: 18px; height: 18px; }
.tool-card::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; border: 18px solid var(--coral); opacity: .9; }

/* Updates list */
.updates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.update { display: grid; gap: 6px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .update { grid-template-columns: 170px 1fr; } }
.update time { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); }
:lang(fa) .update time { font-family: var(--font-sans); }
.update h3 { font-size: 1.12rem; margin: 0 0 6px; }
.update p { margin: 0 0 8px; color: var(--ink-2); }
.update-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .85rem; }

/* Pills / status */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.info { background: var(--bos-soft); color: var(--bos-strong); border-color: transparent; }

/* Trust */
.trust { display: grid; gap: 24px; counter-reset: trust; }
@media (min-width: 860px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust div { border-top: 3px solid var(--ink); padding-top: 16px; counter-increment: trust; }
.trust h3 { font-size: 1.1rem; }
.trust h3::before { content: '0' counter(trust); font-family: var(--font-mono); color: var(--coral); margin-inline-end: 10px; font-size: .85rem; }
.trust p { color: var(--ink-2); margin: 0; }

/* ---------- Page header ---------- */
.page-head { padding-block: 32px 28px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .page-head { padding-block: 52px 40px; } }
.page-head h1 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); margin: 12px 0 14px; max-width: 22ch; }
.page-head .lead { color: var(--ink-2); font-size: 1.12rem; max-width: 62ch; margin: 0; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; font-size: .85rem; color: var(--ink-2); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: '/'; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--bos); text-decoration: underline; }

/* ---------- Guide layout ---------- */
.guide-grid { display: grid; gap: 32px; padding-block: 32px 64px; }
@media (min-width: 900px) { .guide-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; } }
@media (min-width: 1100px) { .guide-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 64px; } }
.guide-aside { display: grid; gap: 16px; align-content: start; align-self: start; }
/* The aside travels with the text on wide screens. */
@media (min-width: 900px) {
  /* No inner scrollbar: the aside scrolls with the page until its bottom is
     visible, then sticks (top is set by GuidePage script when it is taller than the window). */
  .guide-aside { position: sticky; top: var(--aside-top, calc(var(--header-h) + 20px)); }
}
/* On narrower screens a slim bar follows instead. */
.guide-bar { position: sticky; top: var(--header-h); z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.guide-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; }
.guide-bar-toc { position: relative; }
.guide-bar-toc summary { list-style: none; cursor: pointer; }
.guide-bar-toc summary::-webkit-details-marker { display: none; }
.guide-bar-toc nav { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); width: min(86vw, 360px); max-height: 60vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 8px; }
.guide-bar-toc ul { list-style: none; margin: 0; padding: 0; }
.guide-bar-toc a { display: block; padding: 10px 12px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.35; }
.guide-bar-toc a:hover { background: var(--paper-2); }
@media (min-width: 900px) { .guide-bar { display: none; } }
.stamp-by { display: flex; align-items: center; gap: 8px; margin: 12px 0 0 !important; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--ink) !important; font-weight: 600; }
.stamp-by svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 18px; font-size: .88rem; color: var(--ink-2); }

.tldr { background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--coral); border-radius: var(--r-m); padding: 20px 22px; margin-bottom: 28px; }
.tldr h2 { font-size: .8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 10px; }
:lang(fa) .tldr h2 { font-family: var(--font-sans); letter-spacing: 0; font-size: .95rem; }
.tldr ul { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 6px; }
.tldr li::marker { color: var(--coral); }

.deadline-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.deadline { flex: 1 1 180px; background: var(--bos-soft); border-radius: var(--r-m); padding: 14px 16px; }
.deadline strong { display: block; font-size: 1.5rem; color: var(--bos-strong); line-height: 1.1; letter-spacing: -0.02em; }
:lang(fa) .deadline strong { letter-spacing: 0; }
.deadline span { font-size: .88rem; color: var(--ink); }

/* Stamp: verification card */
.stamp { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; font-size: .9rem; }
.stamp-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stamp-seal {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 2px dashed currentColor;
}
.stamp-seal svg { width: 18px; height: 18px; }
.stamp.verified { color: var(--ok); }
.stamp.partial, .stamp.check { color: var(--warn); }
.stamp-top strong { color: var(--ink); line-height: 1.3; }
.stamp p { color: var(--ink-2); margin: 0 0 12px; }
.stamp dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; color: var(--ink); }
.stamp dt { color: var(--ink-2); }
.stamp dd { margin: 0; font-family: var(--font-mono); font-size: .85rem; text-align: end; white-space: nowrap; }
:lang(fa) .stamp dd { white-space: normal; }
.stamp dl { grid-template-columns: minmax(0, 1fr) auto; }
:lang(fa) .stamp dd { font-family: var(--font-sans); }
.stamp .lang-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .82rem; }

.aside-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; }
.aside-box h2 { font-size: .78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 10px; }
:lang(fa) .aside-box h2 { font-family: var(--font-sans); letter-spacing: 0; font-size: .9rem; }
.aside-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.aside-box li a { color: var(--ink); text-decoration: none; font-size: .92rem; display: block; padding: 4px 0; }
.aside-box li a:hover { color: var(--bos); }
.toc a { border-inline-start: 2px solid var(--line); padding-inline-start: 12px !important; }
.toc a.active { border-color: var(--coral); color: var(--ink); font-weight: 600; }

.term { padding: 10px 0; border-top: 1px dashed var(--line); }
.term:first-of-type { border-top: 0; padding-top: 0; }
.term dt { font-family: var(--font-mono); font-weight: 600; font-size: .85rem; color: var(--bos-strong); }
.term dd { margin: 2px 0 0; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }

/* Prose */
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 2.2em; padding-top: .2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.8em; }
.prose ul { padding-inline-start: 1.2em; }
.prose ul li::marker { color: var(--coral); }
.prose li { margin-bottom: .4em; }
.prose strong { font-weight: 650; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--paper-2); padding: .1em .35em; border-radius: 4px; }
.prose blockquote {
  margin: 1.6em 0; padding: 16px 20px; background: var(--warn-soft); border-radius: var(--r-m); border-inline-start: 4px solid var(--warn);
}
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
/* Ordered lists become route steps */
.prose ol { list-style: none; counter-reset: step; padding: 0; margin: 1.4em 0; position: relative; }
.prose ol > li { counter-increment: step; position: relative; padding-inline-start: 52px; padding-bottom: 18px; margin: 0; }
.prose ol > li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: -1px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); border: 3px solid var(--bos); color: var(--bos-strong);
  font-family: var(--font-mono); font-weight: 700; font-size: .85rem;
}
.prose ol > li::after { content: ''; position: absolute; inset-inline-start: 15.5px; top: 34px; bottom: 0; width: 3px; background: var(--bos-soft); }
.prose ol > li:last-child::after { display: none; }
.prose ol > li > strong:first-child { display: block; }
.prose .verify { font-family: var(--font-mono); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--warn-soft); color: var(--warn); padding: 2px 6px; border-radius: 4px; vertical-align: 2px; white-space: nowrap; }
:lang(fa) .prose .verify { font-family: var(--font-sans); letter-spacing: 0; font-size: .78rem; text-transform: none; }

.disclaimer { margin-top: 40px; padding: 18px 20px; border-radius: var(--r-m); background: var(--paper-2); color: var(--ink-2); font-size: .92rem; display: flex; gap: 12px; }
.disclaimer svg { width: 22px; height: 22px; flex: none; color: var(--warn); }
.sources { margin-top: 28px; }
.sources h2 { font-size: 1.1rem; }
.sources ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sources li { display: flex; gap: 10px; align-items: baseline; font-size: .95rem; }
.sources li span { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-3); }
.sources a { word-break: break-word; }

/* Checklist */
.checklist { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; margin: 28px 0; }
.checklist-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.checklist-head h2 { margin: 0; font-size: 1.25rem; }
.checklist > p { color: var(--ink-2); font-size: .9rem; }
.progress { height: 6px; background: var(--paper-2); border-radius: 6px; overflow: hidden; margin: 10px 0 14px; }
.progress span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s ease; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { border-top: 1px dashed var(--line); }
.check-list label { display: flex; gap: 14px; align-items: flex-start; padding: 12px 2px; cursor: pointer; }
.check-list input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ok); flex: none; }
.check-list input:checked + span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.checklist-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.related { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .related { grid-template-columns: repeat(2, 1fr); } }
.related a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); color: var(--ink); text-decoration: none; }
.related a:hover { border-color: var(--bos); }
.related small { display: block; color: var(--ink-2); margin-top: 4px; font-size: .86rem; line-height: 1.45; }

/* Guide cards on section pages */
.cards { display: grid; gap: 14px; padding-block: 32px 64px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-l);
  background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 220px;
}
.card:hover { border-color: var(--bos); color: var(--ink); }
.card .idx { font-family: var(--font-mono); font-size: .8rem; color: var(--coral); font-weight: 700; }
.card h2, .card h3 { font-size: 1.22rem; margin: 0; }
.card p { color: var(--ink-2); font-size: .95rem; margin: 0; flex: 1; }
.card-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-2); }

/* Directory */
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding-block: 24px 8px; }
.dir-list { display: grid; gap: 12px; padding-block: 16px 64px; }
@media (min-width: 760px) { .dir-list { grid-template-columns: repeat(2, 1fr); } }
.dir-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.dir-item h2 { font-size: 1.05rem; margin: 0; }
.dir-item p { color: var(--ink-2); font-size: .93rem; margin: 0; flex: 1; }
.dir-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dir-links a { font-size: .88rem; }
.tel { font-family: var(--font-mono); font-weight: 700; background: var(--coral-soft); color: var(--coral-ink); padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.tel:hover { color: var(--coral-ink); }

/* Glossary */
.gloss { display: grid; gap: 0; padding-block: 8px 64px; margin: 0; }
.gloss-item { display: grid; gap: 4px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .gloss-item { grid-template-columns: 280px 1fr; } }
.gloss-item dt { font-family: var(--font-mono); font-weight: 600; color: var(--bos-strong); }
.gloss-item dd { margin: 0; }
.gloss-item[hidden] { display: none; }

/* Tools */
.tool { display: grid; gap: 28px; padding-block: 32px 64px; }
@media (min-width: 960px) { .tool.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; display: grid; gap: 18px; }
.result-big { font-size: clamp(2rem, 5vw, 3rem); font-weight: 750; line-height: 1; letter-spacing: -0.03em; }
:lang(fa) .result-big { letter-spacing: 0; }
.kv { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); }
.kv div { background: var(--card); padding: 14px 16px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.kv dt { color: var(--ink-2); font-size: .92rem; }
.kv dd { margin: 0; font-weight: 700; text-align: end; }
.notice { padding: 14px 16px; border-radius: var(--r-m); font-weight: 600; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--coral-soft); color: var(--coral-ink); }
.notice.info { background: var(--bos-soft); color: var(--bos-strong); }
.trip { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.trip .icon-btn { border: 1px solid var(--line); }
.money-grid { display: grid; gap: 12px; }
@media (min-width: 520px) { .money-grid { grid-template-columns: 1fr 1fr; } }
.bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.bar span { display: block; height: 100%; }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.small-note { font-size: .85rem; color: var(--ink-2); }

/* Search page */
.search-results { list-style: none; padding: 0; margin: 20px 0 64px; }
.search-results li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.search-results a { font-weight: 650; font-size: 1.1rem; }
.search-results p { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
.search-results mark { background: var(--coral-soft); color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* About */
.about-grid { display: grid; gap: 28px; padding-block: 40px 64px; }
@media (min-width: 860px) { .about-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 56px; } }
.about-grid section h2 { font-size: 1.3rem; }
.about-grid section p { color: var(--ink-2); }

/* Chooser */
.chooser { min-height: 100vh; display: grid; place-items: center; padding: 40px var(--gutter); }
.chooser-inner { width: 100%; max-width: 720px; }
.chooser-inner .logo svg { height: 40px; }
.chooser h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 32px 0 8px; }
.chooser p { color: var(--ink-2); }
.choices { display: grid; gap: 10px; margin-top: 28px; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong);
  background: var(--card); text-decoration: none; color: var(--ink); position: relative;
}
.choice:hover { border-color: var(--ink); color: var(--ink); }
.choice strong { font-size: 1.4rem; }
.choice span { color: var(--ink-2); font-size: .92rem; }
.choice[data-suggested='true'] { border-color: var(--bos); box-shadow: inset 0 0 0 1px var(--bos); }
.choice .badge { position: absolute; inset-inline-end: 14px; top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: #121a21; color: #d9d4ca; padding-block: 48px 32px; margin-top: auto; }
.site-footer a { color: #f0ebe1; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer .logo { color: #f0ebe1; }
.site-footer p { color: #aab2b4; font-size: .92rem; max-width: 42ch; }
.site-footer h2 { font-size: .78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: #8f9a9c; margin-bottom: 14px; }
:lang(fa) .site-footer h2 { font-family: var(--font-sans); letter-spacing: 0; font-size: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.hotline { display: flex; align-items: center; gap: 12px; }
.hotline b { font-family: var(--font-mono); font-size: 1.3rem; color: #ff8a6a; min-width: 3.2ch; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #26323a; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .85rem; color: #8f9a9c; }
.footer-langs { display: flex; gap: 14px; flex-wrap: wrap; }

.layout { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

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


/* ---------- Home blocks (order comes from src/data/home.json) ---------- */
.home-blocks { display: flex; flex-direction: column; }
.home-blocks > * { width: 100%; }
.illus { display: block; width: 100%; height: auto; }
.hero-art { margin-top: 40px; max-height: 230px; }
@media (max-width: 640px) { .hero-art { margin-top: 28px; } }
.topic-art { height: 110px; width: auto; max-width: 100%; margin-inline-start: -6px; }
.popular { display: grid; gap: 12px; counter-reset: pop; }
@media (min-width: 720px) { .popular { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .popular { grid-template-columns: repeat(3, 1fr); } }
.popular-item { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.popular-item:hover { border-color: var(--bos); color: var(--ink); transform: translateY(-2px); }
.popular-item .idx { font-family: var(--font-mono); font-size: .8rem; font-weight: 700; color: var(--coral-ink); }
.popular-item strong { font-size: 1.08rem; line-height: 1.3; }
.popular-item span:last-child { color: var(--ink-2); font-size: .93rem; line-height: 1.5; }

/* ---------- Readability ---------- */
@media (min-width: 900px) { .prose { font-size: 1.09rem; } }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 72px); }
.prose a { font-weight: 500; }
.prose > p:first-child { font-size: 1.08em; }

/* ---------- Photos ---------- */
.photo { margin: 0; position: relative; overflow: hidden; border-radius: var(--r-l); background: var(--paper-2); }
.photo picture { display: block; position: absolute; inset: 0; }
.photo img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.photo figcaption { position: absolute; inset-inline-end: 10px; bottom: 8px; font-size: .7rem; }
.photo figcaption a { color: #fff; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 999px; text-decoration: none; }
.photo-banner { aspect-ratio: 21 / 7; margin-top: 24px; }
@media (max-width: 640px) { .photo-banner { aspect-ratio: 16 / 9; } }
.topic-photo { aspect-ratio: 16 / 7; margin: -26px -26px 4px; border-radius: var(--r-l) var(--r-l) 0 0; }
.hero-photo { aspect-ratio: 21 / 8; margin-top: 40px; }

/* Home gallery mosaic */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.gallery-item { aspect-ratio: 4 / 3; }
.gallery-item.g1 { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 220px); }
  .gallery-item { aspect-ratio: auto; height: 100%; }
  .gallery-item.g1 { grid-column: 1 / 3; grid-row: 1 / 3; aspect-ratio: auto; }
}

/* Former component styles */
.wordmark { font-family: 'Onest Variable', 'Onest', sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.045em; line-height: 1; display: inline-flex; align-items: baseline; direction: ltr; }
.wordmark .i { position: relative; }
.wordmark .dot { position: absolute; width: .26em; height: .26em; border-radius: 50%; background: var(--coral); left: .2em; top: -.12em; transform: translateX(.14em); }
.wordmark .tld { font-family: var(--font-mono); font-weight: 500; font-size: .42em; letter-spacing: 0; margin-left: .55em; opacity: .55; }
.chooser .wordmark { font-size: 2.4rem; }
.theme-toggle svg { display: none; }
.theme-toggle[data-mode='auto'] .t-auto, .theme-toggle[data-mode='light'] .t-light, .theme-toggle[data-mode='dark'] .t-dark { display: block; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded='true'] .i-close { display: block; }
.menu-toggle[aria-expanded='true'] .i-open { display: none; }
.mobile-nav svg { width: 20px; height: 20px; color: var(--ink-3); }
.inline-icon { display: inline; width: 16px; height: 16px; vertical-align: -3px; }
[dir='rtl'] .term dt, [dir='rtl'] .gloss-item dt { text-align: end; }
.topic > .topic-photo { flex: none; }
.photo-frame { position: absolute; inset: 0; }
.admin-bar .site-header { top: 32px; }

.trip.is-invalid .input{border-color:var(--coral);box-shadow:0 0 0 1px var(--coral)}

/* ---------- Print: one clean document, no cut lines ---------- */
@page { size: auto; margin: 16mm 15mm 18mm; }
@media print {
  :root, :root[data-theme='dark'] {
    --paper: #fff; --paper-2: #f3f3f3; --card: #fff; --ink: #111; --ink-2: #333; --ink-3: #555;
    --line: #cfcfcf; --bos: #0c5a63; --bos-strong: #08454c; --bos-soft: #e9f2f1; --coral: #b23a1f;
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #111 !important; overflow: visible !important; height: auto !important; }
  body { font-size: 11pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Screen-only parts */
  .site-header, .site-footer, .mobile-nav, .guide-bar, .guide-aside, .checklist-actions, .skip, .no-print,
  .progress, [data-count], .related, .disclaimer a, .btn, .theme-toggle, .lang, .menu-toggle, .search-form,
  [aria-labelledby='rel-h'], section:has(> .related) { display: none !important; }

  /* Grids and flex containers cannot be split cleanly across pages (Safari cuts lines in half): print them as blocks */
  .guide-grid, .tldr ul, .sources ol, .sources li, .check-list, .checklist-head, .about-grid, .dir-list, .kv, .disclaimer { display: block !important; }
  .wrap { max-width: none !important; padding-inline: 0 !important; }
  .guide-grid { padding-block: 0 !important; }
  .prose, .prose p, .prose li { max-width: none !important; }

  /* Type sized for paper */
  .page-head { padding-block: 0 8pt !important; border-bottom: 1px solid #ccc; }
  .page-head h1 { font-size: 22pt !important; max-width: none; margin: 4pt 0 6pt; }
  .page-head .lead { font-size: 12pt !important; }
  .prose { font-size: 11pt !important; }
  .prose h2, .checklist-head h2, .sources h2 { font-size: 15pt !important; margin-top: 16pt; padding-top: 0; }
  .tldr h2 { font-size: 9pt !important; }
  .guide-meta { font-size: 9pt; }

  /* Keep things together */
  p, li { orphans: 3; widows: 3; }
  h1, h2, h3, .prose ol > li > strong:first-child { break-after: avoid; page-break-after: avoid; }
  li, .tldr li, .check-list li, .sources li, .deadline, tr, img, figure { break-inside: avoid; page-break-inside: avoid; }
  .deadline-row { display: block !important; break-inside: avoid; }
  .deadline { display: inline-block; vertical-align: top; width: calc(50% - 8px); margin: 0 6px 8px 0; padding: 8pt 10pt; border: 1px solid #ccc; background: #fff !important; }
  .deadline strong { font-size: 14pt; }
  table { break-inside: auto; }
  thead { display: table-header-group; }

  /* Boxes: light outlines instead of tinted panels */
  .tldr, .checklist { background: #fff !important; border: 1px solid #ccc; border-inline-start: 3pt solid var(--coral); border-radius: 6px; padding: 10pt 12pt; margin: 0 0 12pt; box-shadow: none; }
  .checklist { border-inline-start-width: 1px; }
  .check-list li { padding: 3pt 0; }
  .check-list input { width: 10pt; height: 10pt; }

  /* Step lists: smaller markers, no connecting line (it breaks across pages) */
  .prose ol > li { padding-inline-start: 30pt; padding-bottom: 8pt; }
  .prose ol > li::before { width: 20pt; height: 20pt; font-size: 9pt; line-height: 18pt; }
  .prose ol > li::after { display: none !important; }

  /* Photo: a modest banner, credit kept */
  .photo-banner { aspect-ratio: auto !important; height: 55mm; margin-top: 8pt; border-radius: 6px; }
  .photo figcaption a { background: none !important; color: #333 !important; }
  .photo figcaption { position: static; text-align: end; font-size: 8pt; margin-top: 2pt; }

  /* Show where links go, for sources only */
  .sources a::after { content: ' — ' attr(href); font-size: 8.5pt; color: #444; word-break: break-all; }
  a { color: #0c4f57 !important; text-decoration: underline; }
  .verify { border: 1px solid #b7863a; background: none !important; color: #7a5410 !important; }
}

.guide-meta .byline{font-weight:600;color:var(--ink)}
