@layer reset, tokens, base, layout, components, pages, utilities;

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
  ol, ul { padding: 0; }
  img, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  table { border-collapse: collapse; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    color-scheme: light;
    --bg: #f3f4f1;
    --surface: #fbfbfa;
    --sunken: #e8eae6;
    --tint: #f1e3db;
    --line: #d6d9d4;
    --line-strong: #6b7470;
    --ink: #1c2226;
    --ink-2: #47525a;
    --brand: #8a3719;
    --brand-hover: #722c13;
    --on-brand: #ffffff;
    --brand-ink: #7d3218;
    --route: #a8461f;
    --route-soft: #e7c3b2;
    --coral: #b8461f;
    --focus: #ffcf33;
    --focus-ink: #1c2226;
    --ok: #1d5434;
    --ok-bg: #e1efe4;
    --warn: #6b4405;
    --warn-bg: #f8edd6;
    --bad: #8a1f1b;
    --bad-bg: #f8e4e2;
    --info: #234a63;
    --info-bg: #e2eaf0;
    --band: #1c2226;
    --band-ink: #f3f4f1;
    --band-ink-2: #c9cfcc;
    --band-accent: #f2b49a;
    --hover: rgb(28 34 38 / 0.05);
    --press: rgb(28 34 38 / 0.09);
    --scrim: rgb(14 18 20 / 0.5);
    --shadow-1: 0 1px 2px rgb(28 34 38 / 0.06);
    --shadow-2: 0 1px 2px rgb(28 34 38 / 0.05), 0 12px 32px -16px rgb(28 34 38 / 0.22);
    --shadow-pop: 0 2px 6px rgb(28 34 38 / 0.08), 0 24px 48px -20px rgb(28 34 38 / 0.3);
    --header-bg: rgb(243 244 241 / 0.82);

    --font: "Figtree", system-ui, "Segoe UI", Arial, sans-serif;
    --font-display: "Newsreader", Georgia, "Times New Roman", serif;
    --fs-xs: 0.875rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1.0625rem;
    --fs-md: 1.1875rem;
    --fs-lg: 1.375rem;
    --fs-xl: 1.75rem;
    --fs-d3: clamp(1.875rem, 1.5rem + 1.5vw, 2.625rem);
    --fs-d2: clamp(2.25rem, 1.65rem + 2.5vw, 3.5rem);
    --fs-d1: clamp(2.75rem, 1.8rem + 4vw, 5rem);
    --lh: 1.6;
    --lh-tight: 1.08;

    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --section: clamp(4rem, 2.8rem + 5vw, 7.5rem);

    --r-ctl: 8px;
    --r-panel: 12px;
    --r-round: 999px;

    --wrap: 76rem;
    --narrow: 46rem;
    --measure: 40rem;
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
    --header-h: 4.5rem;

    --z-header: 40;
    --z-toast: 80;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
    --d-press: 120ms;
    --d-ui: 180ms;
    --d-panel: 280ms;
  }

  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121618;
    --surface: #191f22;
    --sunken: #0e1214;
    --tint: #2b201b;
    --line: #2c3539;
    --line-strong: #7f8a86;
    --ink: #eceeec;
    --ink-2: #b4bcbe;
    --brand: #f0a083;
    --brand-hover: #f6bba5;
    --on-brand: #1e0f09;
    --brand-ink: #f2ad92;
    --route: #e0876a;
    --route-soft: #5a3324;
    --coral: #f0a083;
    --focus: #ffd84d;
    --focus-ink: #121618;
    --ok: #8fd6a4;
    --ok-bg: #12301d;
    --warn: #f2c97a;
    --warn-bg: #36280c;
    --bad: #ff9f97;
    --bad-bg: #41191a;
    --info: #9cc4dd;
    --info-bg: #16293a;
    --band: #0b0e10;
    --band-ink: #eceeec;
    --band-ink-2: #b4bcbe;
    --band-accent: #f0a083;
    --hover: rgb(236 238 236 / 0.06);
    --press: rgb(236 238 236 / 0.1);
    --scrim: rgb(0 0 0 / 0.62);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 1px 2px rgb(0 0 0 / 0.35), 0 14px 34px -16px rgb(0 0 0 / 0.7);
    --shadow-pop: 0 2px 8px rgb(0 0 0 / 0.4), 0 26px 52px -18px rgb(0 0 0 / 0.8);
    --header-bg: rgb(18 22 24 / 0.8);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --bg: #121618;
      --surface: #191f22;
      --sunken: #0e1214;
      --tint: #2b201b;
      --line: #2c3539;
      --line-strong: #7f8a86;
      --ink: #eceeec;
      --ink-2: #b4bcbe;
      --brand: #f0a083;
      --brand-hover: #f6bba5;
      --on-brand: #1e0f09;
      --brand-ink: #f2ad92;
      --route: #e0876a;
      --route-soft: #5a3324;
      --coral: #f0a083;
      --focus: #ffd84d;
      --focus-ink: #121618;
      --ok: #8fd6a4;
      --ok-bg: #12301d;
      --warn: #f2c97a;
      --warn-bg: #36280c;
      --bad: #ff9f97;
      --bad-bg: #41191a;
      --info: #9cc4dd;
      --info-bg: #16293a;
      --band: #0b0e10;
      --band-ink: #eceeec;
      --band-ink-2: #b4bcbe;
      --band-accent: #f0a083;
      --hover: rgb(236 238 236 / 0.06);
      --press: rgb(236 238 236 / 0.1);
      --scrim: rgb(0 0 0 / 0.62);
      --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
      --shadow-2: 0 1px 2px rgb(0 0 0 / 0.35), 0 14px 34px -16px rgb(0 0 0 / 0.7);
      --shadow-pop: 0 2px 8px rgb(0 0 0 / 0.4), 0 26px 52px -18px rgb(0 0 0 / 0.8);
      --header-bg: rgb(18 22 24 / 0.8);
    }
  }

  @media (max-width: 47.99rem) {
    :root { --header-h: 4rem; }
  }
}

@layer base {
  html { scroll-padding-top: calc(var(--header-h) + 1rem); }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }
  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: var(--lh);
    font-kerning: normal;
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  main { flex: 1; display: block; }
  main:focus { outline: none; }
  h1, h2, h3, h4 { font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
  h1, h2 { font-family: var(--font-display); font-weight: 450; line-height: var(--lh-tight); letter-spacing: -0.015em; }
  h1 em, h2 em { font-style: italic; color: var(--brand-ink); }
  p, li, dd { text-wrap: pretty; }
  a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
  a:hover { text-decoration-thickness: 2px; }
  strong, b { font-weight: 700; }
  hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-2) 0; }
  ::selection { background: var(--route-soft); color: var(--ink); }

  :focus-visible {
    outline: 3px solid var(--focus-ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--focus);
  }
  a:focus-visible {
    outline: none;
    background: var(--focus);
    color: var(--focus-ink);
    box-shadow: 0 -2px var(--focus), 0 4px var(--focus-ink);
    text-decoration: none;
    border-radius: 0;
  }
  .btn:focus-visible, .icon-btn:focus-visible, .account-btn:focus-visible, .brand:focus-visible, .cal__day:focus-visible, .segmented a:focus-visible, .tabs a:focus-visible, .sheet-nav a:focus-visible, .popmenu a:focus-visible {
    background: revert-layer;
    color: revert-layer;
    outline: 3px solid var(--focus-ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--focus);
  }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
  .narrow { max-width: var(--narrow); }
  .wrap.narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); }
  .section { padding-block: var(--section); }
  .stack > * + * { margin-block-start: var(--sp-4); }
  .stack-l > * + * { margin-block-start: var(--sp-8); }
  .cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
  .actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
  .split { display: grid; gap: var(--sp-10); }
  @media (min-width: 62rem) {
    .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-16); }
  }
}

@layer components {
  .skip-link {
    position: absolute;
    inset-inline-start: var(--sp-4);
    inset-block-start: -10rem;
    z-index: 100;
    padding: var(--sp-3) var(--sp-5);
    background: var(--focus);
    color: var(--focus-ink);
    font-weight: 700;
    text-decoration: none;
  }
  .skip-link:focus { inset-block-start: var(--sp-3); }

  .i { width: 1.25em; height: 1.25em; flex: none; }

  .site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-block-end: 1px solid var(--line);
  }
  @media (prefers-reduced-transparency: reduce) {
    .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
  .site-header__bar { display: flex; align-items: center; gap: var(--sp-6); min-height: var(--header-h); }

  .brand { display: inline-flex; align-items: center; gap: var(--sp-3); color: var(--ink); text-decoration: none; flex: none; border-radius: var(--r-ctl); }
  .brand__mark { width: 40px; height: 40px; }
  .brand__name { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; }

  .site-nav { margin-inline-start: var(--sp-4); }
  .site-nav ul { display: flex; gap: var(--sp-1); list-style: none; }
  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: var(--sp-3);
    color: var(--ink);
    font-weight: 550;
    text-decoration: none;
    border-radius: var(--r-ctl);
    transition: background-color var(--d-ui) ease;
  }
  @media (hover: hover) and (pointer: fine) {
    .site-nav a:hover { background: var(--hover); }
  }
  .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.42em; }

  .site-header__actions { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }

  .icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--r-ctl);
    background: transparent;
    color: var(--ink);
    transition: background-color var(--d-ui) ease, transform var(--d-press) var(--ease-out);
  }
  .icon-btn:hover { background: var(--hover); }
  .icon-btn:active { transform: scale(0.95); background: var(--press); }
  .icon-btn .i { width: 22px; height: 22px; }

  .only-dark { display: none; }
  :root[data-theme="dark"] .only-dark { display: block; }
  :root[data-theme="dark"] .only-light { display: none; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .only-dark { display: block; }
    :root:not([data-theme="light"]) .only-light { display: none; }
  }

  .link-quiet { color: var(--ink); font-weight: 600; text-decoration: none; padding: var(--sp-2) var(--sp-3); min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r-ctl); }
  .link-quiet:hover { background: var(--hover); }

  .account-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: 44px;
    padding: 0 var(--sp-3) 0 var(--sp-1);
    border: 1px solid var(--line);
    border-radius: var(--r-round);
    background: var(--surface);
    font-weight: 600;
  }
  .account-btn:hover { border-color: var(--line-strong); }
  .account-btn .i { width: 16px; height: 16px; }
  .avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--brand-ink); font-weight: 750; }

  .popmenu {
    position: fixed;
    inset: auto;
    margin: 0;
    width: min(18rem, calc(100vw - 1rem));
    padding: var(--sp-2);
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-pop);
    transform-origin: top right;
    transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out), overlay var(--d-ui) allow-discrete, display var(--d-ui) allow-discrete;
  }
  .popmenu:not(:popover-open) { opacity: 0; transform: scale(0.97) translateY(-4px); }
  @starting-style { .popmenu:popover-open { opacity: 0; transform: scale(0.97) translateY(-4px); } }
  .popmenu__head { display: grid; padding: var(--sp-3); }
  .popmenu__name { font-weight: 700; }
  .popmenu__meta { font-size: var(--fs-xs); color: var(--ink-2); overflow-wrap: anywhere; }
  .popmenu a, .popmenu button {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    min-height: 44px;
    padding: var(--sp-2) var(--sp-3);
    border: 0;
    border-radius: var(--r-ctl);
    background: transparent;
    color: var(--ink);
    font-weight: 550;
    text-decoration: none;
    text-align: start;
  }
  .popmenu a:hover, .popmenu button:hover { background: var(--hover); }
  .popmenu .i { width: 20px; height: 20px; color: var(--ink-2); }

  .nav-toggle { display: none; }
  @media (max-width: 61.99rem) {
    .site-nav, .header-signin, .account-btn__name { display: none; }
    .nav-toggle { display: inline-grid; }
    .account-btn { padding: 0 var(--sp-2) 0 var(--sp-1); }
  }
  @media (max-width: 29.99rem) {
    .site-header .header-cta { display: none; }
  }
  @media (max-width: 22.49rem) {
    .site-header__bar { gap: var(--sp-3); }
    .site-header [data-theme-toggle] { display: none; }
  }

  .sheet {
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    width: min(24rem, 100vw);
    height: 100dvh;
    max-height: none;
    padding: var(--sp-4) var(--sp-5) var(--sp-8);
    border: 0;
    border-inline-start: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    overflow-y: auto;
    transform: translateX(0);
    transition: transform var(--d-panel) var(--ease-drawer), overlay var(--d-panel) allow-discrete, display var(--d-panel) allow-discrete;
  }
  .sheet:not([open]) { transform: translateX(100%); }
  @starting-style { .sheet[open] { transform: translateX(100%); } }
  .sheet::backdrop { background: var(--scrim); transition: background-color var(--d-panel) ease, overlay var(--d-panel) allow-discrete, display var(--d-panel) allow-discrete; }
  @starting-style { .sheet[open]::backdrop { background: rgb(0 0 0 / 0); } }
  .sheet__head { display: flex; align-items: center; justify-content: space-between; margin-block-end: var(--sp-4); }
  .sheet__title { font-size: var(--fs-lg); }
  .sheet__label { margin: var(--sp-6) 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); }
  .sheet-nav { list-style: none; border-block-start: 1px solid var(--line); }
  .sheet-nav li { border-block-end: 1px solid var(--line); }
  .sheet-nav a, .sheet-nav button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: var(--sp-2) var(--sp-1);
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: var(--fs-md);
    font-weight: 650;
    text-decoration: none;
  }
  .sheet-nav--small a, .sheet-nav--small button { font-size: var(--fs-base); min-height: 50px; font-weight: 550; }
  .sheet-nav a[aria-current="page"] { color: var(--brand-ink); }
  .sheet-nav .i { width: 18px; height: 18px; color: var(--ink-2); }
  .sheet__form button { justify-content: flex-start; gap: var(--sp-3); }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: 0 var(--sp-5);
    border: 1.5px solid var(--ink);
    border-radius: var(--r-round);
    background: transparent;
    color: var(--ink);
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--d-ui) ease, border-color var(--d-ui) ease, color var(--d-ui) ease, transform var(--d-press) var(--ease-out);
  }
  @media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--hover); } }
  .btn:active { transform: scale(0.97); }
  .btn .i { width: 20px; height: 20px; }
  .btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
  @media (hover: hover) and (pointer: fine) { .btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); } }
  .btn--secondary { background: var(--surface); }
  .btn--quiet { border-color: transparent; color: var(--brand-ink); }
  .btn--quiet:hover { background: var(--hover); }
  .btn--danger { border-color: var(--bad); color: var(--bad); background: transparent; }
  .btn--danger:hover { background: var(--bad-bg); }
  .btn--danger-solid { background: var(--bad); border-color: var(--bad); color: var(--bg); }
  .btn--sm { min-height: 44px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
  .btn--lg { min-height: 56px; padding: 0 var(--sp-6); font-size: var(--fs-md); }
  .btn--block { width: 100%; }
  .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
  .btn.is-busy { position: relative; color: transparent; pointer-events: none; }
  .btn.is-busy::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-color: var(--on-brand) var(--on-brand) transparent transparent;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
  }
  .btn:not(.btn--primary).is-busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
  @keyframes spin { to { transform: rotate(1turn); } }

  .link-arrow { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 650; color: var(--brand-ink); text-decoration: none; min-height: 44px; }
  .link-arrow:hover { text-decoration: underline; }
  .link-arrow .i { width: 18px; height: 18px; transition: transform var(--d-ui) var(--ease-out); }
  .link-arrow:hover .i { transform: translateX(3px); }

  .form { display: grid; gap: var(--sp-6); }
  .form__row { display: grid; gap: var(--sp-6); }
  @media (min-width: 40rem) { .form__row { grid-template-columns: 1fr 1fr; } }
  .field { display: grid; gap: var(--sp-2); align-content: start; }
  .field__label { font-weight: 700; }
  .field__opt { font-weight: 400; color: var(--ink-2); }
  .field__hint { font-size: var(--fs-sm); color: var(--ink-2); }
  .field__error { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); font-weight: 650; color: var(--bad); }
  .field__error .i { margin-top: 2px; }
  .input, .textarea, .select {
    width: 100%;
    min-height: 50px;
    padding: var(--sp-3) var(--sp-4);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font-size: var(--fs-base);
    transition: border-color var(--d-ui) ease;
  }
  .textarea { min-height: 8rem; resize: vertical; line-height: var(--lh); }
  .input:hover, .textarea:hover, .select:hover { border-color: var(--ink-2); }
  .input::placeholder, .textarea::placeholder { color: var(--ink-2); opacity: 1; }
  .field--error .input, .field--error .textarea { border-color: var(--bad); border-width: 2px; }
  .input--code { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
  .select { appearance: none; padding-inline-end: var(--sp-10); background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
  .control-wrap { position: relative; }
  .control-wrap .input { padding-inline-end: 3.5rem; }
  .reveal-pass {
    position: absolute;
    inset-block: 3px;
    inset-inline-end: 3px;
    display: grid;
    place-items: center;
    width: 46px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
  }
  .reveal-pass:hover { background: var(--hover); color: var(--ink); }
  .reveal-pass .i-eye-slash { display: none; }
  .reveal-pass[aria-pressed="true"] .i-eye { display: none; }
  .reveal-pass[aria-pressed="true"] .i-eye-slash { display: block; }
  .hp-field { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

  .check { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); align-items: start; cursor: pointer; }
  .check input { appearance: none; width: 26px; height: 26px; margin: 0; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface); display: grid; place-items: center; transition: background-color var(--d-ui) ease, border-color var(--d-ui) ease; }
  .check input::after { content: ""; width: 12px; height: 7px; border: 3px solid var(--on-brand); border-top: 0; border-inline-end: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
  .check input:checked { background: var(--brand); border-color: var(--brand); }
  .check input:checked::after { opacity: 1; }
  .check span { padding-top: 1px; }
  .check small { display: block; margin-top: var(--sp-1); font-size: var(--fs-sm); color: var(--ink-2); }

  .notice { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-ctl); background: var(--info-bg); color: var(--ink); }
  .notice .i { width: 22px; height: 22px; margin-top: 1px; color: var(--info); }
  .notice:focus { outline: none; }
  .notice:focus-visible { outline: 3px solid var(--focus-ink); box-shadow: 0 0 0 5px var(--focus); }
  .notice--ok { background: var(--ok-bg); }
  .notice--ok .i { color: var(--ok); }
  .notice--warn { background: var(--warn-bg); }
  .notice--warn .i { color: var(--warn); }
  .notice--bad { background: var(--bad-bg); }
  .notice--bad .i { color: var(--bad); }

  .tag { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; background: var(--sunken); color: var(--ink); white-space: nowrap; }
  .tag--ok { background: var(--ok-bg); color: var(--ok); }
  .tag--warn { background: var(--warn-bg); color: var(--warn); }
  .tag--bad { background: var(--bad-bg); color: var(--bad); }
  .tag--info { background: var(--info-bg); color: var(--info); }

  .segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sunken); }
  .segmented a { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding: 0 var(--sp-3); border-radius: 8px; color: var(--ink); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
  .segmented a .i { width: 18px; height: 18px; }
  .segmented a:hover { background: var(--hover); }
  .segmented a[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-1); }

  .tabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); border-block-end: 1px solid var(--line); }
  .tabs a { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 48px; padding: 0 var(--sp-4); margin-block-end: -1px; border-block-end: 3px solid transparent; color: var(--ink-2); font-weight: 650; text-decoration: none; }
  .tabs a .i { width: 20px; height: 20px; }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current="page"] { color: var(--ink); border-block-end-color: var(--brand); }

  .panel { padding: clamp(var(--sp-5), 3vw, var(--sp-8)); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
  .panel--tint { background: var(--tint); border-color: transparent; }

  .page-head { padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
  .page-head h1 { font-size: var(--fs-d2); max-width: 20ch; }
  .page-head .lead { margin-top: var(--sp-4); font-size: var(--fs-md); color: var(--ink-2); max-width: var(--measure); }
  .crumbs { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); font-size: var(--fs-sm); list-style: none; color: var(--ink-2); }
  .crumbs li + li::before { content: "/"; margin-inline-end: var(--sp-2); color: var(--ink-2); }

  .h3 { font-size: var(--fs-lg); }
  .lead { font-size: var(--fs-md); color: var(--ink-2); }
  .muted { color: var(--ink-2); }
  .small { font-size: var(--fs-sm); }

  .prose { max-width: var(--measure); font-size: var(--fs-base); }
  .prose > * + * { margin-block-start: 1em; }
  .prose h2 { margin-block-start: 2.2em; font-size: var(--fs-d3); }
  .prose h3 { margin-block-start: 1.8em; font-size: var(--fs-lg); }
  .prose ul, .prose ol { padding-inline-start: 1.3em; }
  .prose li + li { margin-block-start: 0.45em; }
  .prose li::marker { color: var(--route); }
  .prose dl { display: grid; gap: var(--sp-1) var(--sp-6); }
  .prose dt { font-weight: 700; }
  .prose dd { margin-block-end: var(--sp-3); }

  .qa { border-block-end: 1px solid var(--line); }
  .qa:first-child { border-block-start: 1px solid var(--line); }
  .qa summary { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); min-height: 64px; padding-block: var(--sp-3); font-size: var(--fs-md); font-weight: 650; cursor: pointer; list-style: none; }
  .qa summary::-webkit-details-marker { display: none; }
  .qa summary .i { width: 22px; height: 22px; color: var(--brand-ink); transition: transform var(--d-ui) var(--ease-out); }
  .qa[open] summary .i { transform: rotate(45deg); }
  .qa__body { padding-block-end: var(--sp-5); max-width: var(--measure); color: var(--ink); }
  .qa__body > * + * { margin-block-start: var(--sp-3); }
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .qa::details-content { block-size: 0; overflow: clip; transition: block-size var(--d-panel) var(--ease-out), content-visibility var(--d-panel) allow-discrete; }
    .qa[open]::details-content { block-size: auto; }
  }

  .modal {
    width: min(100% - 2rem, 28rem);
    padding: var(--sp-6);
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-pop);
    transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out), overlay var(--d-ui) allow-discrete, display var(--d-ui) allow-discrete;
  }
  .modal:not([open]) { opacity: 0; transform: scale(0.96); }
  @starting-style { .modal[open] { opacity: 0; transform: scale(0.96); } }
  .modal::backdrop { background: var(--scrim); }
  .modal__title { font-size: var(--fs-lg); margin-block-end: var(--sp-2); }
  .modal__text { color: var(--ink-2); }
  .modal__actions { display: flex; flex-wrap: wrap-reverse; gap: var(--sp-3); justify-content: flex-end; margin-block-start: var(--sp-6); }
  .modal__actions > .btn { flex: 1 1 auto; }

  .toasts { position: fixed; inset-block-end: var(--sp-5); inset-inline: 0; z-index: var(--z-toast); display: grid; justify-items: center; gap: var(--sp-2); pointer-events: none; padding-inline: var(--sp-4); }
  .toast { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-radius: var(--r-ctl); background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-pop); transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out); }
  @starting-style { .toast { opacity: 0; transform: translateY(8px); } }
  .toast.is-leaving { opacity: 0; transform: translateY(8px); }

  .empty { display: grid; justify-items: start; gap: var(--sp-3); padding: var(--sp-8); border: 1px dashed var(--line-strong); border-radius: var(--r-panel); }
  .empty .i { width: 32px; height: 32px; color: var(--route); }

  .kv { display: grid; gap: var(--sp-3); }
  .kv > div { display: flex; justify-content: space-between; gap: var(--sp-4); padding-block-end: var(--sp-3); border-block-end: 1px solid var(--line); }
  .kv > div:last-child { border-block-end: 0; padding-block-end: 0; }
  .kv dt { color: var(--ink-2); }
  .kv dd { font-weight: 650; text-align: end; font-variant-numeric: tabular-nums; }

  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
  .table { width: 100%; min-width: 40rem; font-size: var(--fs-sm); }
  .table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: start; vertical-align: top; border-block-end: 1px solid var(--line); }
  .table th { font-weight: 700; color: var(--ink-2); background: var(--sunken); }
  .table tr:last-child td { border-block-end: 0; }
  .table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

  .site-footer { margin-top: var(--section); background: var(--sunken); border-block-start: 1px solid var(--line); }
  .footer-help { display: flex; gap: var(--sp-3); align-items: flex-start; padding-block: var(--sp-6); border-block-end: 1px solid var(--line); }
  .footer-help .i { width: 26px; height: 26px; color: var(--coral); margin-top: 1px; }
  .footer-help p { max-width: 60rem; }
  .footer-grid { display: grid; gap: var(--sp-8); padding-block: var(--sp-10); }
  @media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
  .footer-brand p { margin-top: var(--sp-3); max-width: 26rem; color: var(--ink-2); }
  .footer-h { font-size: var(--fs-sm); font-weight: 750; letter-spacing: 0; margin-bottom: var(--sp-3); }
  .site-footer nav ul { list-style: none; display: grid; gap: var(--sp-1); }
  .site-footer nav a { display: inline-flex; min-height: 40px; align-items: center; color: var(--ink); text-decoration: none; }
  .site-footer nav a:hover { text-decoration: underline; }
  .footer-base { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center; padding-block: var(--sp-6) var(--sp-8); border-block-start: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
  .footer-theme { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }

  .status { padding-block: clamp(3rem, 2rem + 6vw, 7rem); }
  .status__code { font-weight: 700; color: var(--ink-2); }
  .status h1 { margin-top: var(--sp-3); font-size: var(--fs-d2); max-width: 18ch; }
  .status__text { margin-block: var(--sp-5) var(--sp-8); font-size: var(--fs-md); max-width: var(--measure); }

  .setup-steps { list-style: none; display: grid; gap: var(--sp-5); counter-reset: step; }
  .setup-step { position: relative; padding: var(--sp-6); padding-inline-start: 4.25rem; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); counter-increment: step; }
  .setup-step::before { content: counter(step); position: absolute; inset-inline-start: var(--sp-6); inset-block-start: var(--sp-6); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sunken); font-weight: 750; }
  .setup-step.is-done::before { background: var(--ok-bg); color: var(--ok); }
  .setup-step h2 { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
  .setup-step p { display: flex; gap: var(--sp-2); align-items: center; }
  .checklist { list-style: none; display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
  .checklist li { display: flex; gap: var(--sp-3); align-items: flex-start; }
  .checklist li > div { display: grid; }
  .checklist .is-ok .i { color: var(--ok); }
  .checklist .is-missing .i { color: var(--warn); }
  .checklist span { color: var(--ink-2); font-size: var(--fs-sm); }
}

@layer utilities {
  .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .mt-2 { margin-top: var(--sp-2); }
  .mt-4 { margin-top: var(--sp-4); }
  .mt-6 { margin-top: var(--sp-6); }
  .mt-8 { margin-top: var(--sp-8); }
  .tnum { font-variant-numeric: tabular-nums; }

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

  @media print {
    .site-header, .site-footer, .skip-link, .toasts, .no-print, .tabs { display: none !important; }
    body { background: #fff; color: #000; }
    .panel { border-color: #999; }
  }
}

@layer pages {
  .photo { position: relative; overflow: hidden; border-radius: var(--r-panel); background: var(--sunken); }
  .photo img { width: 100%; height: 100%; object-fit: cover; }

  .hero { padding-block: clamp(2rem, 1.2rem + 3vw, 4.5rem) clamp(3rem, 2rem + 4vw, 6rem); }
  .hero__grid { display: grid; gap: var(--sp-10); align-items: end; }
  @media (min-width: 62rem) { .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--sp-16); align-items: center; } }
  .hero h1 { font-size: var(--fs-d1); font-weight: 400; line-height: 1.04; letter-spacing: -0.025em; max-width: 12ch; padding-block-end: 0.06em; }
  .hero h1 em { font-weight: 400; padding-inline-end: 0.04em; }
  .hero__lead { margin-block: var(--sp-6) var(--sp-8); max-width: 34ch; font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem); line-height: 1.5; color: var(--ink-2); }
  .hero__media { aspect-ratio: 4 / 5; max-height: min(42rem, 78dvh); justify-self: stretch; }
  .hero__media img { object-position: 46% 50%; }
  @media (max-width: 61.99rem) { .hero__media { aspect-ratio: 4 / 3; } }

  .plan { container-type: inline-size; background: var(--surface); border-block: 1px solid var(--line); }
  .plan__grid { display: grid; gap: var(--sp-10); }
  @media (min-width: 62rem) { .plan__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--sp-16); align-items: start; } }
  .plan__intro h2 { font-size: var(--fs-d3); max-width: 16ch; }
  .plan__intro > p { margin-block: var(--sp-4) var(--sp-6); color: var(--ink-2); max-width: 36ch; }
  .plan__intro .input { max-width: 18rem; }
  .planner__result { margin-block: var(--sp-8) var(--sp-2); min-height: 3.2em; font-size: var(--fs-md); max-width: 46ch; }
  .planner__result strong { font-weight: 700; color: var(--brand-ink); }

  .route { list-style: none; position: relative; display: grid; gap: var(--sp-4); }
  .route__stop { position: relative; display: grid; grid-template-columns: 28px 1fr; column-gap: var(--sp-4); align-items: center; min-height: 52px; }
  .route__stop::before { content: ""; position: absolute; inset-inline-start: 13px; inset-block: -1.5rem calc(100% - 4px); width: 2px; background: var(--route); }
  .route__stop:first-child::before, .route__stop[hidden] + .route__stop:not([hidden])::before { display: none; }
  .route__dot { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: var(--fs-xs); font-weight: 700; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
  .route__name { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.2; }
  .route__date { grid-column: 2; font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.35; }
  .route__stop--due .route__dot { background: var(--surface); border: 2px solid var(--brand); }
  .route__stop--now .route__dot { background: var(--coral); box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--coral); width: 20px; height: 20px; margin-inline: 4px; }
  .route__stop.is-past .route__dot { background: var(--sunken); color: var(--ink-2); border: 1.5px solid var(--line-strong); }
  .route__stop.is-past .route__name { color: var(--ink-2); }
  .route__stop.is-past::before, .route__stop.is-past + .route__stop::before { background: repeating-linear-gradient(180deg, var(--line-strong) 0 5px, transparent 5px 10px); }

  @container (min-width: 46rem) {
    .route { grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--sp-2); padding-block-start: var(--sp-2); }
    .route__stop { grid-template-columns: 1fr; grid-template-rows: 28px auto auto; justify-items: start; text-align: start; row-gap: var(--sp-3); }
    .route__stop::before { inset-block: 13px auto; height: 2px; width: auto; inset-inline: -100% calc(100% - 4px); }
    .route__stop.is-past::before, .route__stop.is-past + .route__stop::before { background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 10px); }
    .route__dot { grid-row: auto; }
    .route__date { grid-column: 1; }
    .route__stop--now .route__dot { margin-block: 4px; margin-inline: 4px 0; }
  }

  @media (prefers-reduced-motion: no-preference) {
    .route.is-live .route__stop { animation: stop-in 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
    @keyframes stop-in { from { opacity: 0; transform: translateY(6px); } }
  }

  .section-title { font-size: var(--fs-d3); max-width: 22ch; }
  .section-lead { margin-top: var(--sp-4); font-size: var(--fs-md); color: var(--ink-2); max-width: var(--measure); }

  .feel__grid { display: grid; gap: var(--sp-10); }
  @media (min-width: 62rem) { .feel__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-16); align-items: start; } }
  .feel__media { aspect-ratio: 4 / 5; }
  @media (max-width: 61.99rem) { .feel__media { aspect-ratio: 3 / 2; } }
  .feel h2 { font-size: var(--fs-d3); max-width: 18ch; }
  .feel__statement { margin-block: var(--sp-5) var(--sp-8); font-size: var(--fs-md); line-height: 1.6; max-width: 44ch; }
  .feel__statement strong { font-weight: 650; color: var(--brand-ink); }
  .feel__signs h3 { font-size: var(--fs-base); margin-bottom: var(--sp-4); color: var(--ink-2); }
  .signs { list-style: none; display: grid; gap: 0; border-block-start: 1px solid var(--line); }
  .signs li { padding-block: var(--sp-3); border-block-end: 1px solid var(--line); }
  .feel__signs + .link-arrow { margin-top: var(--sp-6); }

  .method-list { list-style: none; margin-top: var(--sp-10); counter-reset: method; }
  .method { display: grid; gap: var(--sp-3); padding-block: var(--sp-8); border-block-start: 1px solid var(--line); }
  .method:last-child { border-block-end: 1px solid var(--line); }
  @media (min-width: 48rem) { .method { grid-template-columns: minmax(12rem, 4fr) minmax(0, 7fr); gap: var(--sp-10); align-items: baseline; } }
  .method__name { font-family: var(--font-display); font-size: clamp(2.25rem, 1.7rem + 2.2vw, 3.75rem); font-weight: 400; font-style: italic; line-height: 1; letter-spacing: -0.02em; color: var(--brand-ink); hyphens: manual; }
  .method__body h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
  .method__body p { max-width: 54ch; color: var(--ink-2); }

  .person { background: var(--surface); border-block: 1px solid var(--line); }
  .person__grid { display: grid; gap: var(--sp-10); }
  @media (min-width: 62rem) { .person__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--sp-16); align-items: center; } }
  .person__media { aspect-ratio: 4 / 5; max-width: 26rem; }
  .person h2 { font-size: var(--fs-d3); }
  .person__title { margin-top: var(--sp-2); font-weight: 600; color: var(--ink-2); }
  .person__bio { margin-top: var(--sp-6); max-width: 54ch; font-size: var(--fs-md); }
  .person__creds { list-style: none; display: grid; gap: var(--sp-2); margin-top: var(--sp-6); color: var(--ink-2); font-size: var(--fs-sm); }
  .person__creds li { display: flex; gap: var(--sp-2); align-items: flex-start; }
  .person__creds .i { width: 18px; height: 18px; margin-top: 2px; color: var(--route); }

  .practical__head { display: grid; gap: var(--sp-4); max-width: var(--measure); }
  .facts { display: grid; gap: var(--sp-3); margin-top: var(--sp-10); }
  @media (min-width: 40rem) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 40rem) and (max-width: 61.99rem) { .facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
  @media (min-width: 62rem) { .facts > .facts__fee { grid-row: span 2; } .facts > div:last-child:nth-child(4) { grid-column: 1 / -1; } }
  .facts > div { display: grid; align-content: start; gap: var(--sp-2); padding: var(--sp-6); border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); }
  .facts dt { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2); }
  .facts dt .i { width: 20px; height: 20px; color: var(--route); }
  .facts dd { max-width: 40ch; }
  .facts > .facts__fee { background: var(--tint); border-color: transparent; }
  .facts__big { display: block; margin-block: var(--sp-2) var(--sp-3); font-family: var(--font-display); font-size: clamp(3rem, 2.2rem + 3vw, 4.5rem); line-height: 1; letter-spacing: -0.02em; color: var(--brand-ink); font-variant-numeric: lining-nums; }

  .faq__grid { display: grid; gap: var(--sp-8); }
  @media (min-width: 62rem) { .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--sp-16); } .faq__intro { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; } }
  .faq__intro p { margin-top: var(--sp-4); }

  .band { position: relative; isolation: isolate; overflow: hidden; background: var(--band); color: var(--band-ink); padding-block: clamp(5rem, 3.5rem + 7vw, 10rem); margin-bottom: calc(-1 * var(--section)); }
  .band__media { position: absolute; inset: 0; z-index: -1; }
  .band__media img { width: 100%; height: 100%; object-fit: cover; }
  .band__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 15 17 / 0.82) 0%, rgb(12 15 17 / 0.55) 55%, rgb(12 15 17 / 0.25) 100%); }
  .band__inner { display: grid; gap: var(--sp-5); justify-items: start; }
  .band h2 { font-size: var(--fs-d2); max-width: 16ch; color: #f3f4f1; }
  .band p { font-size: var(--fs-md); color: #d7dbd8; max-width: 40ch; }
  .band .btn--on-band { margin-top: var(--sp-3); background: #f3f4f1; border-color: #f3f4f1; color: #1c2226; }
  @media (hover: hover) and (pointer: fine) { .band .btn--on-band:hover { background: #ffffff; border-color: #ffffff; } }
  .band a:focus-visible { box-shadow: 0 0 0 5px var(--focus); outline-color: #f3f4f1; }

  .js .reveal { clip-path: inset(0 0 100% 0); }
  .js .reveal.is-in { clip-path: inset(0 0 0 0); transition: clip-path 900ms var(--ease-in-out); }
  .js .reveal img { transform: scale(1.06); }
  .js .reveal.is-in img { transform: none; transition: transform 1200ms var(--ease-out); }
  @media (prefers-reduced-motion: reduce) {
    .js .reveal, .js .reveal img { clip-path: none; transform: none; }
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero__copy > * { animation: rise 640ms var(--ease-out) both; }
    .hero__copy > :nth-child(2) { animation-delay: 70ms; }
    .hero__copy > :nth-child(3) { animation-delay: 140ms; }
    @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  }
}

@layer pages {
  .page-head--book { padding-block-end: var(--sp-6); }
  .book-facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); margin-top: var(--sp-6); color: var(--ink); font-weight: 550; }
  .book-facts li { display: inline-flex; align-items: center; gap: var(--sp-2); }
  .book-facts .i { width: 22px; height: 22px; color: var(--route); }

  .book { display: grid; gap: var(--sp-6); align-items: start; margin-top: var(--sp-4); }
  @media (min-width: 62rem) { .book { grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem); gap: var(--sp-8); } }
  .book__main { display: grid; gap: var(--sp-6); }
  @media (min-width: 80rem) { .book__main { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; } }
  @media (min-width: 62rem) { .book__side { position: sticky; top: calc(var(--header-h) + 1.5rem); } }

  .book-step { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-lg); margin-bottom: var(--sp-5); }
  .book-step__n { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); font-size: var(--fs-sm); font-weight: 750; color: var(--ink); transition: background-color var(--d-ui) ease, border-color var(--d-ui) ease, color var(--d-ui) ease; }
  .book-step__n.is-current { border-color: var(--brand); color: var(--brand-ink); }
  .book-step__n.is-done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

  .cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
  .cal__title { font-size: var(--fs-md); font-weight: 750; }
  .cal__grid { width: 100%; table-layout: fixed; }
  .cal__grid th { padding-block: var(--sp-2); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); text-align: center; }
  .cal__grid td { padding: 2px; text-align: center; }
  .cal__day {
    position: relative;
    width: 100%;
    max-width: 52px;
    aspect-ratio: 1;
    min-height: 44px;
    margin-inline: auto;
    display: grid;
    place-items: center;
    border: 1.5px solid transparent;
    border-radius: var(--r-ctl);
    background: transparent;
    color: var(--ink-2);
    font-size: var(--fs-base);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    cursor: default;
    transition: background-color var(--d-ui) ease, border-color var(--d-ui) ease, color var(--d-ui) ease, transform var(--d-press) var(--ease-out);
  }
  .cal__day[aria-disabled="true"] { opacity: 0.62; }
  .cal__day.is-open { cursor: pointer; color: var(--ink); font-weight: 750; background: var(--tint); }
  .cal__day.is-open::after { content: ""; position: absolute; inset-block-end: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--route); }
  .cal__day.is-open:hover { border-color: var(--brand); }
  .cal__day.is-open:active { transform: scale(0.95); }
  .cal__day.is-today { border-color: var(--line-strong); }
  .cal__day.is-selected, .cal__day.is-selected:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); opacity: 1; }
  .cal__day.is-selected::after { background: var(--on-brand); }
  .cal.is-loading .cal__grid { opacity: 0.6; transition: opacity var(--d-ui) ease; }
  .cal__legend { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-2); }
  .cal__legend-dot { width: 22px; height: 22px; border-radius: 6px; background: var(--tint); position: relative; }
  .cal__legend-dot::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--route); }
  [data-cal-status]:not(:empty) { margin-top: var(--sp-4); }

  .times__title { color: var(--ink-2); margin-bottom: var(--sp-4); }
  .slots { border: 0; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
  .slot { position: relative; display: block; cursor: pointer; }
  .slot__input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .slot__face { position: relative; display: grid; gap: 2px; min-height: 56px; padding: var(--sp-3) var(--sp-4); padding-inline-end: var(--sp-10); border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); transition: border-color var(--d-ui) ease, background-color var(--d-ui) ease, transform var(--d-press) var(--ease-out); }
  .slot__face::after { content: ""; position: absolute; inset-inline-end: var(--sp-4); top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid var(--line-strong); box-sizing: border-box; }
  .slot__time { font-size: var(--fs-md); font-weight: 700; }
  .slot__meta { font-size: var(--fs-sm); color: var(--ink-2); }
  .slot:hover .slot__face { border-color: var(--brand); }
  .slot:active .slot__face { transform: scale(0.985); }
  .slot__input:checked + .slot__face { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--tint); }
  .slot__input:checked + .slot__face::after { border: 6px solid var(--brand); background: var(--on-brand); }
  .slot__input:focus-visible + .slot__face { outline: 3px solid var(--focus-ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--focus); }
  .times__skeleton { display: grid; gap: var(--sp-2); }
  .skeleton { border-color: transparent; background: linear-gradient(90deg, var(--sunken) 0%, var(--tint) 50%, var(--sunken) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
  .skeleton::after { content: none; }
  @keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

  .summary { display: grid; gap: var(--sp-5); }
  .summary .book-step { margin-bottom: 0; }
  .summary__when { padding: var(--sp-4); border-radius: var(--r-ctl); background: var(--sunken); }
  .summary__date { font-size: var(--fs-md); font-weight: 750; }
  .summary__date.is-empty { font-weight: 500; color: var(--ink-2); }
  .summary__time { font-weight: 550; }
  .summary__clinic { margin-top: var(--sp-2); }
  .summary__after { margin-top: calc(-1 * var(--sp-2)); }
  .kv__total { font-size: var(--fs-md); }
  .kv__total dt { color: var(--ink); font-weight: 650; }
  .kv__total dd { font-weight: 800; }

  .stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); width: max-content; }
  .stepper button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: var(--ink); border-radius: 8px; }
  .stepper button:hover:not(:disabled) { background: var(--hover); }
  .stepper button:disabled { color: var(--ink-2); opacity: 0.45; cursor: not-allowed; }
  .stepper output { min-width: 3ch; text-align: center; font-weight: 750; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }

  .book-bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-header); display: none; padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom)); background: var(--surface); border-block-start: 1px solid var(--line); box-shadow: 0 -10px 28px -18px rgb(11 37 48 / 0.35); transform: translateY(110%); transition: transform var(--d-panel) var(--ease-drawer); }
  .book-bar.is-on { transform: none; }
  .book-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); max-width: 40rem; margin-inline: auto; }
  .book-bar__what { display: grid; min-width: 0; line-height: 1.4; }
  .book-bar__what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .book-bar__what span { font-size: var(--fs-sm); color: var(--ink-2); }
  @media (max-width: 61.99rem) {
    .book-bar { display: block; }
    body.has-book-bar .site-footer { padding-block-end: 5.5rem; }
  }
}

@layer pages {
  .auth { padding-block: clamp(2rem, 1.5rem + 3vw, 4.5rem); }
  .auth__card { width: min(100% - 2 * var(--gutter), 30rem); margin-inline: auto; display: grid; gap: var(--sp-5); }
  .auth__card h1 { font-size: var(--fs-d2); }
  .auth__card .lead { margin-top: calc(-1 * var(--sp-2)); }
  .auth__links { display: grid; gap: var(--sp-2); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
  .auth__links a { font-weight: 600; }

  .page-head--account { padding-block-end: var(--sp-6); }
  .account-body { padding-top: var(--sp-8); }
  .account-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); }
  .count { display: inline-grid; place-items: center; min-width: 1.8em; height: 1.8em; margin-inline-start: var(--sp-2); padding-inline: 0.4em; border-radius: var(--r-round); background: var(--sunken); font-size: var(--fs-sm); font-weight: 750; vertical-align: middle; }
  section > .h3 { margin-bottom: var(--sp-5); }

  .bk-list, .abk-list, .msg-list { list-style: none; display: grid; gap: var(--sp-4); }
  .bk { display: grid; gap: var(--sp-4); padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
  @media (min-width: 48rem) { .bk { grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: start; gap: var(--sp-6); } }
  .bk--past { background: transparent; }
  .bk__date { display: grid; justify-items: center; align-content: center; width: 5.5rem; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-ctl); background: var(--tint); text-align: center; line-height: 1.15; }
  .bk--past .bk__date { background: var(--sunken); }
  .bk__dow { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); }
  .bk__day { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
  .bk__mon { font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); }
  .bk__title { font-size: var(--fs-lg); }
  .bk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); }
  .bk__details, .bk__hint { margin-top: var(--sp-3); font-size: var(--fs-sm); }
  .bk__hint { color: var(--ink-2); }
  .bk__note { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); background: var(--sunken); font-size: var(--fs-sm); }
  .bk__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  @media (min-width: 48rem) { .bk__actions { flex-direction: column; align-items: stretch; min-width: 11rem; } }
  .bk__actions form { display: contents; }

  .ticket { max-width: 44rem; }
  .ticket__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); padding-bottom: var(--sp-5); margin-bottom: var(--sp-5); border-bottom: 1px dashed var(--line-strong); }
  .ticket__date { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
  .ticket__time { font-size: var(--fs-md); font-weight: 600; margin-top: var(--sp-1); }
  .ticket__note { margin-top: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-ctl); background: var(--sunken); }
  .ticket__note--clinic { background: var(--tint); }
  .ticket__actions { margin-top: var(--sp-6); }
  .next-steps { max-width: 44rem; margin-top: var(--sp-10); }
  .next-list { list-style: none; counter-reset: n; display: grid; gap: var(--sp-4); }
  .next-list li { counter-increment: n; position: relative; padding-inline-start: 3rem; }
  .next-list li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: -2px; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tint); font-weight: 750; color: var(--brand-ink); }

  .profile { display: grid; gap: var(--sp-6); max-width: 52rem; }
  .profile__section .h3 { margin-bottom: var(--sp-5); }
  .profile__privacy-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
  .profile__danger { border-color: var(--bad); }

  .admin-add { display: grid; gap: var(--sp-4); }
  @media (min-width: 62rem) { .admin-add { grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr auto; align-items: end; } .admin-add .field__hint { min-height: 1.5em; } }
  .admin-add__submit { padding-bottom: 2px; }
  .admin-times { display: grid; gap: var(--sp-8); }
  .day-list { display: grid; gap: var(--sp-5); }
  .day { border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
  .day__title { padding: var(--sp-3) var(--sp-5); font-size: var(--fs-base); background: var(--sunken); }
  .day__slots { list-style: none; }
  .tslot { display: grid; grid-template-columns: minmax(8rem, auto) 1fr auto; gap: var(--sp-4); align-items: center; padding: var(--sp-2) var(--sp-5); border-top: 1px solid var(--line); }
  .tslot__time { font-weight: 700; }
  .tslot__state { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .tslot__state a.tag { text-decoration: none; }
  .tslot__actions { display: flex; gap: var(--sp-1); }
  .tslot.is-closed .tslot__time { color: var(--ink-2); text-decoration: line-through; }

  .abk { display: grid; gap: var(--sp-4); padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
  @media (min-width: 62rem) { .abk { grid-template-columns: 11rem minmax(0, 1fr) minmax(16rem, 22rem); gap: var(--sp-6); align-items: start; } }
  .abk-list--quiet .abk { background: transparent; }
  .abk__date { font-weight: 750; }
  .abk__time { font-size: var(--fs-lg); font-weight: 800; }
  .abk__name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); font-weight: 750; font-size: var(--fs-md); }
  .abk__contact, .abk__facts { margin-top: var(--sp-1); font-size: var(--fs-sm); overflow-wrap: anywhere; }
  .abk__note { margin-top: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-ctl); background: var(--sunken); font-size: var(--fs-sm); }
  .abk__decide { display: grid; gap: var(--sp-3); }
  .abk__more summary { cursor: pointer; font-weight: 650; color: var(--bad); min-height: 44px; display: flex; align-items: center; }
  .abk__more[open] { display: grid; gap: var(--sp-3); }

  .msg { padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); display: grid; gap: var(--sp-3); justify-items: start; }
  .msg__head { display: grid; gap: var(--sp-1); }
  .msg__from { overflow-wrap: anywhere; }
  .msg__body { white-space: normal; max-width: var(--measure); }

  .doc { display: grid; gap: var(--sp-10); }
  @media (min-width: 62rem) { .doc { grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr); gap: var(--sp-16); align-items: start; } .doc__aside { position: sticky; top: calc(var(--header-h) + 2rem); } }
  .doc__body > section + section { margin-top: var(--sp-12); }
  .doc__body h2 { margin-top: 0; }
  .doc__aside { display: grid; gap: var(--sp-6); align-content: start; }
  .toc__label { font-size: var(--fs-sm); font-weight: 750; color: var(--ink-2); margin-bottom: var(--sp-2); }
  .toc ol { list-style: none; border-inline-start: 2px solid var(--line); }
  .toc a { display: block; padding: var(--sp-2) var(--sp-4); margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: var(--ink); text-decoration: none; font-size: var(--fs-sm); line-height: 1.4; }
  .toc a:hover { color: var(--brand-ink); text-decoration: underline; }
  .toc a[aria-current="true"] { border-inline-start-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
  @media (max-width: 61.99rem) { .toc { display: none; } }
  .aside-cta { padding: var(--sp-5); border-radius: var(--r-panel); background: var(--tint); display: grid; gap: var(--sp-3); justify-items: start; }
  .aside-cta__title { font-weight: 750; }
  .doc__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-6); margin-top: var(--sp-12); padding-top: var(--sp-8); border-top: 1px solid var(--line); }

  .def { display: grid; gap: var(--sp-4); }
  .def > div { padding-inline-start: var(--sp-4); border-inline-start: 3px solid var(--route-soft); }
  .def dt { font-weight: 750; }

  .loop { margin-block: var(--sp-6); padding: var(--sp-6); border-radius: var(--r-panel); background: var(--sunken); }
  .loop__steps { list-style: none; padding: 0; display: grid; gap: var(--sp-3); counter-reset: none; }
  @media (min-width: 48rem) { .loop__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .loop__steps li { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); align-items: start; padding: var(--sp-4); border-radius: var(--r-ctl); background: var(--surface); margin: 0; }
  .loop__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 750; font-size: var(--fs-sm); }
  .loop figcaption { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); display: flex; gap: var(--sp-2); align-items: center; }

  .timeline { list-style: none; padding: 0; margin-block: var(--sp-6); display: grid; gap: 0; position: relative; }
  .timeline li { position: relative; display: grid; gap: var(--sp-1); padding: 0 0 var(--sp-6) 2.75rem; margin: 0; }
  .timeline li::before { content: ""; position: absolute; inset-inline-start: 10px; top: 0.35em; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--surface); z-index: 1; }
  .timeline li::after { content: ""; position: absolute; inset-inline-start: 16px; top: 0.6em; bottom: -0.4em; width: 4px; background: var(--route); border-radius: 2px; }
  .timeline li:last-child::after { display: none; }
  .timeline__week { font-weight: 800; color: var(--brand-ink); }

  .fee-table { display: grid; margin-block: var(--sp-5); border-top: 1px solid var(--ink); }
  .fee-table > div { display: flex; justify-content: space-between; gap: var(--sp-6); padding-block: var(--sp-4); border-bottom: 1px solid var(--line); }
  .fee-table dt { font-weight: 600; }
  .fee-table dd { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

  .legal { display: grid; border-top: 1px solid var(--ink); }
  .legal > div { display: grid; gap: var(--sp-1); padding-block: var(--sp-4); border-bottom: 1px solid var(--line); }
  @media (min-width: 40rem) { .legal > div { grid-template-columns: 14rem 1fr; gap: var(--sp-6); } }
  .legal dt { font-weight: 750; }
  .legal dd span { display: block; }

  .contact { display: grid; gap: var(--sp-10); }
  @media (min-width: 62rem) { .contact { grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 1fr); gap: var(--sp-16); align-items: start; } }
  .contact__side { display: grid; gap: var(--sp-5); }
  .ways { list-style: none; display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
  .ways li { display: flex; align-items: center; gap: var(--sp-3); overflow-wrap: anywhere; }
  .ways .i { color: var(--route); }
  .panel--urgent { background: var(--sunken); border-color: transparent; }
  .panel--urgent .h3 { display: flex; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
  .panel--urgent .i { color: var(--coral); width: 24px; height: 24px; }
}

@layer pages {
  .prose section > * + * { margin-block-start: 1em; }
  .prose section > h2 + * { margin-block-start: var(--sp-4); }
  .prose section > h3 { margin-block-start: 1.6em; }
  .prose section > h3 + p { margin-block-start: var(--sp-2); }
}

@layer pages {
  @media (max-width: 40rem) {
    .tslot { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--sp-1); padding-inline: var(--sp-4); }
    .tslot__state { grid-column: 1; grid-row: 2; }
    .tslot__actions { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  }
}
