/* ============================================================
   MyLiTJourney — design system v2
   One token set · Inter · 8px spacing · WCAG 2.1 AA
   ============================================================ */

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

:root {
  /* colour tokens */
  --navy: #123A70;        /* headings, authority */
  --blue: #1769AA;        /* primary actions, links */
  --teal: #168F8A;        /* progress + selected accents only */
  --ink: #27364A;         /* body text */
  --ink-2: #5F6F7F;       /* secondary text */
  --bg: #F6F8FA;          /* page background */
  --line: #DDE4EA;        /* 1px borders */
  --white: #FFFFFF;
  --danger: #B3261E;
  --amber: #B45309;       /* translation-notice accent */
  --teal-tint: #EAF4F3;
  --blue-tint: #EEF4FA;

  /* shape + elevation */
  --r-btn: 8px;
  --r-card: 12px;
  --r-panel: 16px;
  --shadow: 0 1px 3px rgba(18, 42, 74, 0.08);
  --shadow-pop: 0 8px 28px rgba(18, 42, 74, 0.16);

  /* layout */
  --content: 46rem;       /* ~720px text column */
  --sidebar: 260px;

  /* legacy aliases still referenced by older rules */
  --radius: 12px;
  --maxw: 46rem;
  --card: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 1.0625rem;   /* 17px at default root — rem so the Aa toggle scales body text too */
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
@media (min-width: 760px) { body { font-size: 1.125rem; } }

[dir="rtl"] body, [dir="rtl"] { text-align: right; }

img, svg { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

h1, h2, h3 { color: var(--navy); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 650; margin: 0.5rem 0 1rem; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 650; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { max-width: 68ch; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 4px; }

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

.skip-link {
  position: absolute; top: -100px; inset-inline-start: 0;
  background: var(--navy); color: #fff; padding: 0.75rem 1.25rem;
  z-index: 100; border-radius: 0 0 var(--r-btn) var(--r-btn);
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: var(--content);
  margin: 0 auto;
  min-height: 72px;
  padding: 0.5rem 1rem;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
@media (max-width: 560px) { .header-inner { min-height: 64px; } }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { display: block; flex: none; width: 34px; height: 28px; }
.brand-word { font-weight: 700; font-size: 1.15rem; color: var(--navy); letter-spacing: -0.01em; }
.brand-lit { color: var(--teal); }
@media (max-width: 380px) { .brand .brand-word { font-size: 1.02rem; } .brand img { width: 30px; height: 25px; } }
.header-spacer { flex: 1; }

/* header controls: one quiet ghost style */
.lang-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 42px; padding: 0.35rem 0.85rem;
  border: 1px solid var(--line); background: var(--white); color: var(--blue);
  border-radius: var(--r-btn);
  font-size: 0.95rem; font-family: inherit; font-weight: 500; cursor: pointer;
}
.lang-btn:hover { background: var(--blue-tint); border-color: #C5D2DE; }
.header-inner .lang-btn-label { font-weight: 500; }
.icon-only { width: 42px; height: 42px; min-width: 42px; padding: 0; justify-content: center; border-radius: var(--r-btn); }
@media (max-width: 560px) { .icon-only { width: 40px; height: 40px; min-width: 40px; } }
.tsz-btn { letter-spacing: 0; }
.tsz-btn .tsz-a { font-weight: 600; font-size: 0.98rem; }
.tsz-plus { font-weight: 700; font-size: 0.7em; margin-inline-start: 1px; }

.site-nav { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 42px;
  padding: 0.3rem 0.75rem; border-radius: var(--r-btn);
  text-decoration: none; color: var(--ink-2); font-size: 0.95rem;
}
.site-nav a:hover { background: var(--bg); color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }

/* ---------- Dialogs (language + search) ---------- */
.lang-dialog {
  border: 1px solid var(--line); border-radius: var(--r-panel); padding: 0;
  max-width: 26rem; width: calc(100vw - 2rem); box-shadow: var(--shadow-pop);
}
.lang-dialog::backdrop { background: rgba(18, 42, 74, 0.4); }
.lang-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0.5rem; }
.lang-dialog h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.lang-list { list-style: none; margin: 0; padding: 0.5rem 0.75rem 1rem; }
.lang-list button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 48px; padding: 0.5rem 0.75rem; border: none; background: none;
  font-family: inherit; font-size: 1rem; color: var(--ink); border-radius: var(--r-btn);
  cursor: pointer; text-align: start;
}
.lang-list button:hover:not([disabled]) { background: var(--bg); }
.lang-list button[aria-pressed="true"] { background: var(--teal-tint); font-weight: 600; color: var(--navy); }
.lang-list button[disabled] { color: #9AA7B2; cursor: not-allowed; }
.lang-soon { font-size: 0.85rem; color: #9AA7B2; }
.icon-btn {
  min-width: 42px; min-height: 42px; border: none; background: none;
  font-size: 1.3rem; cursor: pointer; color: var(--ink-2); border-radius: var(--r-btn);
}
.icon-btn:hover { background: var(--bg); color: var(--navy); }

.search-dialog { width: min(560px, 92vw); }
.search-input {
  width: calc(100% - 2.5rem); box-sizing: border-box; font: inherit;
  margin: 0.25rem 1.25rem 0.75rem; padding: 0.6rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--r-btn);
}
.search-input:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 0; }
.search-results { list-style: none; margin: 0; padding: 0 1rem 1rem; max-height: 55vh; overflow: auto; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-results a { display: flex; flex-direction: column; gap: 2px; padding: 0.7rem 0.4rem; text-decoration: none; color: inherit; border-radius: var(--r-btn); }
.search-results a:hover, .search-results a:focus-visible { background: var(--bg); }
.sr-stage { font-size: 0.78rem; color: var(--teal); font-weight: 600; }
.search-results strong { color: var(--navy); font-weight: 600; }
.sr-snip { font-size: 0.85rem; color: var(--ink-2); }
.search-empty { padding: 0.8rem 0.4rem; color: var(--ink-2); }

/* ---------- Translation notice ---------- */
.trans-notice { background: var(--white); border-bottom: 1px solid var(--line); }
.trans-notice-inner {
  max-width: var(--content); margin: 0 auto; display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.7rem 1rem;
  border-inline-start: 4px solid var(--amber);
}
.trans-notice p { margin: 0; font-size: 0.92rem; color: var(--ink-2); flex: 1; max-width: none; }

/* ---------- Layout ---------- */
main { max-width: var(--content); margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.lede { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; margin-top: 0; }

/* ---------- Hero ---------- */
.hero-wrap { overflow: hidden; border-radius: var(--r-panel); margin: 0.5rem 0 1.5rem; }
.hero-art { display: block; width: 100%; height: auto; }
.hero-modern { position: relative; }
.hero-modern .hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: linear-gradient(to top, rgba(14, 32, 60, 0.72), rgba(14, 32, 60, 0.2) 55%, rgba(14, 32, 60, 0) 80%);
}
.pilot-chip {
  display: inline-block; margin-bottom: 0.75rem;
  padding: 0.22rem 0.7rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(14, 32, 60, 0.3);
}
.hero-modern .hero-art { min-height: 360px; object-fit: cover; }
.hero-modern .hero-overlay h1 {
  color: #fff; margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 650; line-height: 1.15;
  max-width: 20ch; letter-spacing: -0.015em;
  text-shadow: 0 1px 10px rgba(10, 25, 50, 0.4);
}
.hero-modern .hero-overlay p {
  color: #E8EFF7; margin: 0 0 1.25rem; max-width: 56ch;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem); line-height: 1.55;
  text-shadow: 0 1px 6px rgba(10, 25, 50, 0.4);
}
.hero-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

/* primary button — the one solid-blue action */
.hero-cta {
  display: inline-flex; align-items: center;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 1rem;
  padding: 0.7rem 1.4rem; border-radius: var(--r-btn); text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-cta:hover, .hero-cta:focus-visible { background: #135A92; color: #fff; }
.hero-link { color: #fff; font-size: 0.98rem; text-underline-offset: 4px; }
.hero-link:hover { color: #DCE9F5; }

@media (max-width: 700px) {
  .hero-modern .hero-art { min-height: 0; }
  .hero-modern .hero-overlay { position: static; background: none; padding: 1rem 0 0; }
  .pilot-chip { border-color: var(--line); color: var(--ink-2); background: var(--white); }
  .hero-modern .hero-overlay h1 { color: var(--navy); text-shadow: none; max-width: none; font-size: 2rem; }
  .hero-modern .hero-overlay p { color: var(--ink-2); text-shadow: none; }
  .hero-link { color: var(--blue); }
  .hero-link:hover { color: var(--navy); }
}

.timeline-heading { margin-top: 2.5rem; }

/* ---------- Home timeline ---------- */
.timeline { list-style: none; margin: 1.25rem 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 30px;
  width: 2px; background: var(--line);
}
.timeline li { position: relative; margin: 0 0 0.75rem; }
.timeline a {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 0.8rem 1rem; margin-inline-start: 12px;
  text-decoration: none; color: var(--ink); min-height: 72px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.timeline a:hover, .timeline a:focus-visible { border-color: var(--blue); background: #FBFCFE; }
.stage-dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--ink-2); color: var(--ink-2);
  font-weight: 600; display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.timeline a:hover .stage-dot { border-color: var(--blue); color: var(--blue); }
.stage-thumb {
  flex: none; width: 60px; height: 60px; border-radius: var(--r-btn);
  object-fit: cover;
}
.timeline .stage-art { flex: none; width: 48px; height: 48px; }
.timeline .stage-name { font-weight: 600; font-size: 1.02rem; line-height: 1.35; color: var(--navy); }

/* ---------- Stage page ---------- */
.stage-hero { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.stage-hero .stage-art { display: none; }
.progress-label {
  font-weight: 600; color: var(--ink-2); font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.1rem;
}
.progress-track { background: var(--line); border-radius: 999px; height: 6px; margin: 0.5rem 0 1.5rem; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 999px; }

.stage-photo { display: block; width: 100%; height: auto; }
figure.stage-photo-wrap { margin: 0 0 1.5rem; overflow: hidden; border-radius: var(--r-panel); }
figure.stage-photo-wrap figcaption { font-size: 0.88rem; color: var(--ink-2); margin-top: 0.4rem; }

/* secondary (outlined) buttons */
.page-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.25rem 0 1.5rem; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 42px; padding: 0.45rem 1rem;
  border-radius: var(--r-btn); border: 1px solid var(--line);
  background: var(--white); color: var(--blue);
  font-family: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer;
}
.tool-btn:hover { background: var(--blue-tint); border-color: #C5D2DE; }
.tool-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.tool-btn[hidden] { display: none; }
.tool-btn svg { flex: none; }
.mark-btn.marked, .mark-btn[aria-pressed="true"] { background: var(--teal-tint); border-color: var(--teal); color: var(--teal); }

/* accordions */
.accordion {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  margin: 0 0 0.75rem; overflow: hidden;
}
.accordion summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.15rem; font-weight: 600; font-size: 1.08rem; color: var(--navy); min-height: 56px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: #FBFCFE; }
.acc-chevron { flex: none; transition: transform 0.2s ease; font-size: 0.9rem; color: var(--ink-2); }
.accordion[open] .acc-chevron { transform: rotate(180deg); }
.acc-body { padding: 0 1.15rem 1.15rem; }
.acc-body p { margin: 0 0 0.9rem; }
.acc-body p:last-child { margin-bottom: 0; }
.accordion.hl > summary { animation: mljHl 2.2s ease; }
@keyframes mljHl { 0% { background: var(--teal-tint); } 100% { background: transparent; } }

/* prev / next */
.stage-nav { display: flex; gap: 0.75rem; margin-top: 2.5rem; flex-wrap: wrap; }
.stage-nav a {
  flex: 1 1 12rem; display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 0.85rem 1rem; text-decoration: none; color: var(--ink);
  min-height: 64px; justify-content: center;
  transition: border-color 0.15s ease;
}
.stage-nav a:hover { border-color: var(--blue); }
.stage-nav .dirlabel { font-size: 0.82rem; color: var(--blue); font-weight: 600; }
.stage-nav .dest { font-weight: 600; line-height: 1.3; color: var(--navy); }
.stage-nav .next { text-align: end; align-items: flex-end; }

/* ---------- Glossary ---------- */
.draft-banner {
  background: var(--white); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--amber);
  border-radius: var(--r-card); padding: 0.9rem 1.1rem;
  font-weight: 500; font-size: 0.95rem; color: var(--ink-2); margin: 1rem 0 1.5rem;
}
.glossary-list { margin: 0; padding: 0; }
.glossary-list div { padding: 1rem 0.25rem; border-bottom: 1px solid var(--line); background: none; }
.glossary-list dt { font-weight: 600; color: var(--navy); font-size: 1.05rem; }
.glossary-list dd { margin: 0.25rem 0 0; color: var(--ink); }

.gloss-term {
  background: none; border: none; padding: 0; margin: 0; font: inherit;
  color: var(--teal); border-bottom: 1.5px dotted var(--teal); cursor: pointer;
}
.gloss-term:hover { background: var(--teal-tint); }
.gloss-popover {
  position: absolute; z-index: 50; max-width: 20rem;
  background: var(--navy); color: #fff; border-radius: var(--r-card);
  padding: 0.8rem 1rem; font-size: 0.92rem; line-height: 1.5; box-shadow: var(--shadow-pop);
}
.gloss-popover strong { display: block; margin-bottom: 0.25rem; }
.gloss-popover .gloss-close {
  position: absolute; top: 0.2rem; inset-inline-end: 0.2rem; background: none; border: none;
  color: #fff; font-size: 1.1rem; min-width: 36px; min-height: 36px; cursor: pointer;
}

/* ---------- Urgent help (kept as a marked panel — patient safety) ---------- */
.urgent-box {
  background: var(--white); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--danger);
  border-radius: var(--r-card); padding: 1.1rem 1.25rem; margin: 3rem 0 0;
}
.urgent-box h2 { color: var(--danger); font-size: 1rem; margin: 0 0 0.35rem; }
.urgent-box p { margin: 0; max-width: none; font-size: 0.95rem; line-height: 1.55; color: var(--ink); }
.urgent-box a { color: var(--danger); font-weight: 600; font-size: 0.95rem; }

/* ---------- Page feedback (open section, not a card) ---------- */
.feedback-box {
  border-top: 1px solid var(--line);
  margin: 2.5rem 0 0; padding: 1.5rem 0 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  background: none;
}
.feedback-box p { margin: 0; font-weight: 500; color: var(--ink); font-size: 0.95rem; }
.fb-btns { display: flex; gap: 0.5rem; }
.fb-btn { min-width: 4.5rem; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--white);
  padding: 2rem 1rem 3rem; color: var(--ink-2); font-size: 0.9rem;
}
.footer-inner { max-width: var(--content); margin: 0 auto; }
.footer-inner p { margin: 0 0 0.4rem; max-width: none; }
.footer-inner .review-status { font-size: 0.82em; color: var(--ink-2); }

.print-header { display: none; }

/* ---------- About page hero ---------- */
.about-art { display: none; }
.about-hero .hero-art { width: 100%; max-height: 320px; object-fit: cover; }
.about-hero .hero-overlay {
  position: absolute;
  background: linear-gradient(to top, rgba(14, 32, 60, 0.72), rgba(14, 32, 60, 0.12) 60%, rgba(14, 32, 60, 0) 85%);
  padding: clamp(1rem, 3vw, 2rem);
}
.about-hero .hero-overlay h1 { color: #fff; max-width: none; margin: 0; text-shadow: 0 1px 8px rgba(10, 25, 50, 0.45); }

/* ---------- Sidebar journey nav (desktop) ---------- */
.mile-nav { display: none; }
@media (min-width: 1160px) {
  .mile-nav {
    display: block; position: fixed; top: 0; inset-inline-start: 0; bottom: 0;
    width: var(--sidebar);
    background: var(--white);
    border-inline-end: 1px solid var(--line);
    overflow-y: auto; padding: 1.25rem 1rem 2rem; z-index: 30;
  }
  body.has-milenav .site-header,
  body.has-milenav main,
  body.has-milenav .site-footer,
  body.has-milenav .trans-notice { margin-inline-start: var(--sidebar); }
  [dir="rtl"] .mile-nav { inset-inline-start: auto; inset-inline-end: 0; }
  /* RTL: the sidebar occupies the inline-END side, so push content from that side */
  [dir="rtl"] body.has-milenav .site-header,
  [dir="rtl"] body.has-milenav main,
  [dir="rtl"] body.has-milenav .site-footer,
  [dir="rtl"] body.has-milenav .trans-notice {
    margin-inline-start: 0;
    margin-inline-end: var(--sidebar);
  }

  .mile-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; padding: 0.15rem 0.25rem 0; }
  .mile-brand img { width: 34px; height: 28px; }
  .mile-brand .brand-word { font-size: 1.08rem; }
  .mile-tagline {
    font-size: 0.55rem; font-weight: 600; letter-spacing: 0.13em;
    color: var(--ink-2); margin: 0.35rem 0 0.75rem; padding-inline-start: 0.25rem; white-space: nowrap;
  }

  .mile-road { position: relative; list-style: none; margin: 0.5rem 0 0; padding: 0; }
  /* the road: muted surface with a faint dashed centre line */
  .mile-road::before {
    content: ""; position: absolute; top: 14px; bottom: 14px; inset-inline-start: 16px;
    width: 6px; border-radius: 3px; background: #C9D5DF;
  }
  .mile-road::after {
    content: ""; position: absolute; top: 20px; bottom: 20px; inset-inline-start: 18.2px;
    width: 1.5px; border-radius: 1px;
    background-image: linear-gradient(to bottom, #FFFFFF 58%, transparent 42%);
    background-size: 1.5px 11px;
  }
  .mile-road li { position: relative; z-index: 1; }
  .mile-road a {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.4rem 0.4rem; border-radius: var(--r-btn);
    text-decoration: none; color: var(--ink-2);
    font-size: 0.86rem; line-height: 1.25; min-height: 42px;
  }
  .mile-road a:hover { background: var(--bg); color: var(--navy); }
  .mile-dot {
    flex: none; width: 26px; height: 26px; margin-inline-start: 6px;
    border-radius: 50%;
    background: var(--white); border: 1.5px solid var(--ink-2); color: var(--ink-2);
    font-weight: 600; font-size: 0.76rem;
    display: flex; align-items: center; justify-content: center;
  }
  .mile-road li.done .mile-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
  .mile-road li.current a { color: var(--navy); font-weight: 600; background: var(--teal-tint); }
  .mile-road li.current .mile-dot { background: var(--navy); border-color: var(--navy); color: #fff; }
  .mile-road li.you .mile-dot { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--teal); }
  .mile-label { flex: 1; }

  .mile-extra {
    margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 0.1rem;
  }
  .mile-extra a {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.6rem; border-radius: var(--r-btn);
    text-decoration: none; color: var(--ink-2); font-size: 0.9rem; min-height: 40px;
  }
  .mile-extra a:hover { background: var(--bg); color: var(--navy); }
  .mile-extra a[aria-current="page"] { color: var(--navy); font-weight: 600; box-shadow: inset 2px 0 0 var(--teal); }
  [dir="rtl"] .mile-extra a[aria-current="page"] { box-shadow: inset -2px 0 0 var(--teal); }

  body.has-milenav .site-nav { display: none; }
  body.has-milenav .brand { visibility: hidden; }

  /* road entrance (first page of a visit only) */
  @keyframes mljRoadGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  .mile-road::before, .mile-road::after { transform-origin: top; animation: mljRoadGrow 0.7s ease both; }
  @keyframes mljMileIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
  .mile-road li { opacity: 0; animation: mljMileIn 0.35s ease forwards; }
  .mile-nav.no-anim .mile-road::before, .mile-nav.no-anim .mile-road::after { animation: none; transform: none; }
  .mile-nav.no-anim .mile-road li { animation: none; opacity: 1; }
}

/* ---------- Continue card (legacy fallback) ---------- */
.continue-card {
  display: flex; flex-direction: column; gap: 0.2rem;
  background: var(--white); border: 1px solid var(--line); border-inline-start: 4px solid var(--teal);
  border-radius: var(--r-card); padding: 1rem 1.25rem; margin: 0 0 1.4rem;
  text-decoration: none; color: var(--ink);
}
.continue-card .cc-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); font-weight: 600; }
.continue-card .cc-dest { font-weight: 600; color: var(--navy); }

/* ---------- Toast + install hint ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 16px);
  background: var(--navy); color: #fff; padding: 0.6rem 1.2rem; border-radius: var(--r-btn);
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 60; box-shadow: var(--shadow-pop);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.a2hs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem;
  width: min(480px, calc(100vw - 2rem));
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  padding: 0.9rem 1rem; display: flex; gap: 0.8rem; align-items: center; z-index: 55;
}
.a2hs p { margin: 0; flex: 1; font-size: 0.9rem; max-width: none; }
.a2hs-row { display: flex; gap: 0.4rem; align-items: center; }

/* ---------- Motion (calm, functional only) ---------- */
.sr { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }
.sr.revealed { opacity: 1; transform: none; }
.anim-in { opacity: 1; }
@keyframes mljFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.accordion[open] .acc-body { animation: mljFadeUp 0.3s ease; }
@keyframes mljGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.progress-fill { transform-origin: left center; animation: mljGrow 0.7s ease 0.15s backwards; }
[dir="rtl"] .progress-fill { transform-origin: right center; }
@keyframes mljDialogIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lang-dialog[open] { animation: mljDialogIn 0.2s ease; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: mljVTOut 0.18s ease both; }
::view-transition-new(root) { animation: mljVTIn 0.22s ease both; }
@keyframes mljVTOut { to { opacity: 0; } }
@keyframes mljVTIn { from { opacity: 0; } }
.mile-nav { view-transition-name: mile-nav; }
::view-transition-old(mile-nav), ::view-transition-new(mile-nav) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .sr { opacity: 1 !important; transform: none !important; }
  .mile-road li { opacity: 1 !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer .footer-nav, .page-tools, .stage-nav, .mile-nav,
  .trans-notice, .lang-btn, .skip-link, .tool-btn,
  .feedback-box, .toast, .a2hs, .search-btn, .share-btn, .tsz-btn, .mark-btn,
  .hero-art, .about-art, .stage-photo, figure.stage-photo-wrap { display: none !important; }
  body { background: #fff; color: #000; }
  .print-header { display: block; font-size: 10pt; color: #444; border-bottom: 1pt solid #999; padding-bottom: 4pt; margin-bottom: 10pt; }
  .accordion, .accordion summary, .acc-body { border: none; padding-left: 0; padding-right: 0; }
  .urgent-box { border: 1.5pt solid #B3261E; }
  main { max-width: none; padding: 0; }
}

/* quiet section eyebrow above the steps timeline */
.steps-label {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-2); margin: 2.75rem 0 0.5rem;
}

/* ================= Two-level mobile branding ================= */

/* safe areas + anchor offset under the sticky header */
.site-header { padding-top: env(safe-area-inset-top); }
.site-header .header-inner { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
html { scroll-padding-top: 84px; }

/* full brand lockup at the top of the homepage (small screens only) */
.home-lockup { display: none; }
@media (max-width: 1159px) {
  .home-lockup {
    display: flex; align-items: center; gap: 0.7rem;
    max-width: 270px; margin: 0.5rem 0 1.1rem; padding: 0;
    text-decoration: none;
  }
  .home-lockup img { flex: none; width: 46px; height: 38px; object-fit: contain; }
  .lockup-text { display: flex; flex-direction: column; gap: 1px; }
  .home-lockup .brand-word { font-size: 1.35rem; line-height: 1.1; }
  .lockup-tag {
    font-size: 0.56rem; font-weight: 600; letter-spacing: 0.13em;
    color: var(--ink-2); white-space: nowrap;
  }
  /* homepage: keep the icon as a compact anchor, hide only the wordmark
     (the full lockup below carries the name + tagline) */
  body[data-page="home"] .site-header .brand-word { display: none; }
}

/* back navigation crumb on internal pages (small screens only) */
.back-crumb { display: none; }
@media (max-width: 1159px) {
  .back-crumb {
    display: inline-flex; align-items: center; gap: 0.3rem;
    margin: 0 0 0.5rem; padding: 0.2rem 0;
    font-size: 0.92rem; font-weight: 500;
    color: var(--ink-2); text-decoration: none;
  }
  .back-crumb:hover { color: var(--navy); }
  [dir="rtl"] .back-crumb svg { transform: scaleX(-1); }
}
@media print { .home-lockup, .back-crumb { display: none !important; } }

/* footer install button */
.install-btn { margin-top: 0.9rem; }
@media print { .install-btn { display: none !important; } }
