/* SessionFlip website. One world: a signal-box panel at night. */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --night: #0E131D;      /* deepest: boards, terminals */
  --navy: #141A26;       /* page ground */
  --panel: #1D2333;      /* panel face */
  --bezel: #293045;
  --line: #2A3245;       /* hairlines on navy */
  --rail: #EBEBEB;
  --rail-dim: #3A4460;
  --sleeper: #252C3F;
  --lamp-off: #2A3247;
  --work: #2663EB;
  --work-lit: #5B8DF8;
  --personal: #17A34A;
  --personal-lit: #34CC6C;
  --client: #E0622A;
  --amber: #F5A524;
  --amber-deep: #C98512;
  --enamel: #F3EEDF;
  --enamel-edge: #D9D1BA;
  --ink: #141A26;
  --ink-soft: #565B6A;
  --text: #E8EAF0;
  --text-dim: #AAB1C3;
  --text-faint: #8A92A8;
  --text-board: #7D8699;  /* board headers and prompts: 4.5:1 on night */

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --font-mac: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; /* only for drawn macOS UI */

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(5rem, 3rem + 6vw, 9rem);
  --radius: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-throw: cubic-bezier(0.34, 1.45, 0.55, 1); /* mass and overshoot: points, levers */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; scrollbar-color: var(--rail-dim) var(--night); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--amber);
}
::selection { background: var(--amber); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
code { font-family: var(--font-mono); font-size: 0.86em; background: var(--panel); border: 1px solid var(--line); padding: 0.08em 0.38em; border-radius: 4px; color: var(--text); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--amber); color: var(--ink); padding: 0.6rem 1rem; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

main > section { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding: var(--section) var(--gutter) 0; }

/* ---------- Enamel plate headings ---------- */
.plate {
  display: inline-block;
  position: relative;
  margin: 0 0 1.75rem;
  padding: 0.32em 1.15em 0.26em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 6px;
  background:
    radial-gradient(circle at 0.55em 50%, #B3AA90 0 0.11em, #8C846C 0.12em 0.14em, transparent 0.15em),
    radial-gradient(circle at calc(100% - 0.55em) 50%, #B3AA90 0 0.11em, #8C846C 0.12em 0.14em, transparent 0.15em),
    var(--enamel);
  box-shadow: inset 0 0 0 0.12em var(--enamel), inset 0 0 0 0.17em var(--ink), 0 10px 24px -10px rgba(0, 0, 0, 0.7);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  min-height: 52px; padding: 0 1.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border-radius: 8px; cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s, background-color 0.25s;
}
.btn-primary {
  background: var(--amber); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--amber-deep), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 8px 18px -8px rgba(0, 0, 0, 0.7);
}
.btn-primary::before { /* the lamp */
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: #FFF4DA; box-shadow: 0 0 0 2px rgba(20, 26, 38, 0.25), 0 0 8px 2px rgba(255, 244, 218, 0.9);
}
.btn-primary:hover { transform: translateY(-1px); background: #FFB43A; box-shadow: inset 0 0 0 1px var(--amber-deep), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 12px 22px -8px rgba(0, 0, 0, 0.75); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { color: var(--text); border: 1.5px solid var(--rail-dim); background: transparent; }
.btn-ghost:hover { border-color: var(--rail); }
.btn-small { min-height: 40px; padding: 0 1rem; font-size: 1.05rem; gap: 0.5rem; }
.btn-small::before { width: 0.5rem; height: 0.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.cta-center { justify-content: center; }
.fine { font-size: 0.95rem; color: var(--text-faint); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 26, 38, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); height: 68px; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.05em; text-transform: uppercase; }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text-dim); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
main > section.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center;
  padding-top: clamp(3rem, 2rem + 4vw, 6rem);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(3.4rem, 1.6rem + 6vw, 6rem); line-height: 0.9; letter-spacing: -0.005em;
}
.h1-line { display: block; }
.h1-work { color: var(--work-lit); }
.h1-personal { color: var(--personal-lit); }
.lede { margin: 1.6rem 0 2.1rem; max-width: 34ch; font-size: clamp(1.18rem, 1.05rem + 0.45vw, 1.38rem); color: var(--text-dim); line-height: 1.5; }
.hero .fine { margin-top: 1.1rem; }

.hero-panel { margin: 0; position: relative; padding-bottom: 150px; }
.hero-panel figcaption { position: absolute; bottom: 0; right: 0; width: calc(100% - 300px); min-height: 120px; display: flex; align-items: flex-end; font-size: 0.95rem; color: var(--text-faint); }

.panel {
  position: relative;
  padding: 5% 4% 4%;
  border-radius: 16px;
  background-color: var(--panel);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  box-shadow: inset 0 0 0 1px #2D3550, 0 0 0 10px #10151F, 0 0 0 11px #252C3F, 0 40px 70px -30px rgba(0, 0, 0, 0.8);
}
.diagram { width: 100%; height: auto; overflow: visible; }

/* Track diagram (shared by the hero panel) */
.sleepers path, .pd-sleepers, .close-sleepers { fill: none; stroke: var(--sleeper); stroke-width: 15; stroke-dasharray: 3 9; }
.rails path, .pd-rail, .close-rail { fill: none; stroke: var(--rail-dim); stroke-width: 3.5; stroke-linecap: round; }
.r { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease-out); }
.panel.is-resetting .r { transition: none; }
.r-trunk { stroke: var(--rail); }
.r-work { stroke: var(--work-lit); }
.r-personal { stroke: var(--personal-lit); }
.panel[data-open*="-"] .r-trunk,
.panel[data-open*="-work"] #r-work,
.panel[data-open*="-personal"] #r-personal,
.panel[data-open~="claude-work"] #r-claude-work,
.panel[data-open~="chatgpt-work"] #r-chatgpt-work,
.panel[data-open~="claude-personal"] #r-claude-personal,
.panel[data-open~="chatgpt-personal"] #r-chatgpt-personal { stroke-dashoffset: 0; }
.panel[data-open*="-work"] #r-work { transition-delay: 0.25s; }
.panel[data-open*="-personal"] #r-personal { transition-delay: 0.25s; }
#r-claude-work, #r-chatgpt-work, #r-claude-personal, #r-chatgpt-personal { transition-delay: 0.5s; }

.buffers rect { fill: #C8302C; }
.lamp, .pd-lamp { fill: var(--lamp-off); stroke: #10151F; stroke-width: 2; transition: fill 0.4s var(--ease-out), filter 0.4s; }
.panel[data-open~="claude-work"] .lamp-claude-work,
.panel[data-open~="chatgpt-work"] .lamp-chatgpt-work { fill: var(--work-lit); filter: drop-shadow(0 0 6px rgba(91, 141, 248, 0.95)); }
.panel[data-open~="claude-personal"] .lamp-claude-personal,
.panel[data-open~="chatgpt-personal"] .lamp-chatgpt-personal { fill: var(--personal-lit); filter: drop-shadow(0 0 6px rgba(52, 204, 108, 0.95)); }

.car { display: none; stroke-width: 1.5; }
.car-work { fill: var(--work); stroke: #9DBBFF; }
.car-personal { fill: var(--personal); stroke: #8DE5AC; }
.panel[data-open~="claude-work"] .car-claude-work,
.panel[data-open~="chatgpt-work"] .car-chatgpt-work,
.panel[data-open~="claude-personal"] .car-claude-personal,
.panel[data-open~="chatgpt-personal"] .car-chatgpt-personal { display: inline; }

.labels text, .points-diagram text { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.07em; text-transform: uppercase; fill: var(--text-faint); }
.labels .label-work { fill: var(--work-lit); }
.labels .label-personal { fill: var(--personal-lit); }
.pl { transition: fill 0.4s; }
.panel[data-open~="claude-work"] .pl-claude-work,
.panel[data-open~="chatgpt-work"] .pl-chatgpt-work,
.panel[data-open~="claude-personal"] .pl-claude-personal,
.panel[data-open~="chatgpt-personal"] .pl-chatgpt-personal { fill: var(--rail); }

/* The SessionFlip menu, drawn as macOS draws it */
.menu {
  position: absolute; left: -5%; top: calc(100% - 96px); z-index: 2;
  width: 284px; padding: 5px;
  font-family: var(--font-mac); font-size: 13.5px; line-height: 1.3; color: #ECEEF3;
  background: rgba(40, 46, 62, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border-radius: 11px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2), 0 0 0 0.5px rgba(0, 0, 0, 0.6), 0 22px 44px -10px rgba(0, 0, 0, 0.75);
}
.menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 28px; padding: 4px 10px;
  font: inherit; color: inherit; text-align: left; background: none; border: 0; border-radius: 6px; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: #2D62DE; color: #fff; outline: none; }
.menu-item:hover .menu-state, .menu-item:focus-visible .menu-state { color: rgba(255, 255, 255, 0.85); }
.menu-state { margin-left: auto; color: #98A1B6; font-size: 12.5px; }
.menu-item[aria-pressed="false"] .menu-state { display: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-work { background: var(--work); }
.dot-personal { background: var(--personal); }
.menu-rule { height: 1px; margin: 5px 10px; background: rgba(255, 255, 255, 0.12); }
.menu-row { display: flex; gap: 8px; padding: 4px 10px 4px 28px; color: #D5DAE4; }
.menu-aside { margin-left: auto; color: #8E97AB; }

/* ---------- Problem: departure board ---------- */
main > section.problem { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; }
.problem .plate { grid-column: 1; align-self: end; justify-self: start; margin: 0; }
.problem-note { grid-column: 1; align-self: start; max-width: 36ch; font-size: 1.2rem; color: var(--text-dim); }
.problem-note strong { color: var(--personal-lit); font-weight: 600; }
.board {
  grid-column: 2; grid-row: 1 / span 2;
  padding: 14px 18px 18px;
  background: var(--night);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px #1C2232, 0 0 0 8px #0A0D14, 0 0 0 9px #222838, 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; color: var(--amber);
  font-size: clamp(0.82rem, 0.7rem + 0.4vw, 1.02rem);
}
.board-row { display: grid; grid-template-columns: 6ch minmax(0, 1fr) 15ch; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px dashed #1D2331; }
.board-head { border-top: 0; padding-top: 2px; color: var(--text-board); font-size: 0.78em; letter-spacing: 0.08em; }
.board-row:not(.board-head) > span {
  padding: 5px 8px; border-radius: 3px;
  background: linear-gradient(#161B27 0 49%, #0B0E15 49% 51%, #12161F 51%);
}
.flap { color: #F2C14E; }
.flap.is-open { color: var(--personal-lit); }

/* ---------- How it works ---------- */
main > section.how { position: relative; }
.how-line { position: absolute; left: calc(var(--gutter) + 10px); top: calc(var(--section) + 7rem); bottom: 7.5rem; width: 24px; }
.how-line svg { width: 100%; height: 100%; overflow: visible; }
.how-rail { fill: none; stroke: var(--rail-dim); stroke-width: 4; vector-effect: non-scaling-stroke; }
.how-route { fill: none; stroke: var(--rail); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
html.motion .how-route { stroke-dasharray: 1 1; }
.stations { list-style: none; margin: 1.5rem 0 0; padding: 0 0 0 76px; }
.station { position: relative; padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.station-lamp {
  position: absolute; left: -76px; top: -4px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1;
  background: #FFF1CF; color: var(--ink);
  box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--rail-dim), 0 0 22px 2px rgba(255, 236, 190, 0.45);
  transition: background-color 0.5s var(--ease-out), color 0.5s, box-shadow 0.5s;
}
html.motion .station:not(.is-lit) .station-lamp { background: var(--lamp-off); color: var(--text-dim); box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--rail-dim); }
.station h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.25rem); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; margin-bottom: 0.7rem; }
.station p { max-width: 60ch; color: var(--text-dim); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 1.25rem 0 0; }
.tag { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.05rem; padding: 0.3em 0.85em 0.25em 0.7em; border-radius: 5px; color: #fff; display: inline-flex; align-items: center; gap: 0.45em; }
.tag::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.tag-work { background: var(--work); }
.tag-personal { background: #117A38; }
.tag-client { background: #C24E1B; }

.windows { margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; max-width: 720px; }
.windows figcaption { grid-column: 1 / -1; font-size: 0.92rem; color: var(--text-faint); }
.win { background: #F5F5F7; color: #1D1D1F; border-radius: 10px; overflow: hidden; font-family: var(--font-mac); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 24px 40px -18px rgba(0, 0, 0, 0.8); }
.win-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; background: #E6E6EA; font-size: 12.5px; color: #3A3A3C; }
.win-bar span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.win-work .win-bar span::before { background: var(--work); }
.win-personal .win-bar span::before { background: var(--personal); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.win-bar i:nth-child(2) { background: #FEBC2E; }
.win-bar i:nth-child(3) { background: #28C840; }
.win-bar span { margin: 0 auto; padding-right: 39px; font-weight: 600; }
.win-list { list-style: none; margin: 0; padding: 10px; font-size: 14px; }
.win-list li { padding: 7px 10px; border-radius: 6px; }
.win-list li:first-child { background: #E4E4EA; font-weight: 600; }
.notice {
  position: relative; color: #3A3F4D; border-radius: 8px; padding: 1.3rem 1.7rem 1.4rem;
  background: var(--enamel);
  box-shadow: inset 0 0 0 7px var(--enamel), inset 0 0 0 9px var(--ink), 0 14px 30px -14px rgba(0, 0, 0, 0.8);
}
.notice::before { /* rivets, on their own layer so the text ground stays plain enamel */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(circle at 12px 12px, #B3AA90 0 3px, #8C846C 3.5px 4px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 12px) 12px, #B3AA90 0 3px, #8C846C 3.5px 4px, transparent 4.5px),
    radial-gradient(circle at 12px calc(100% - 12px), #B3AA90 0 3px, #8C846C 3.5px 4px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #B3AA90 0 3px, #8C846C 3.5px 4px, transparent 4.5px);
}
.how-note { margin-left: 76px; max-width: 62ch; font-size: 1.0625rem; }

/* ---------- The real app ---------- */
.section-lede { max-width: 60ch; margin-bottom: 2.5rem; font-size: 1.2rem; color: var(--text-dim); }
.shots { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.shot { margin: 0; }
.shot:nth-child(2) { margin-top: 4rem; }
.shot-frame { border-radius: 12px; overflow: hidden; background: #ECECEC; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 40px 60px -30px rgba(0, 0, 0, 0.85); }
.shot picture, .shot img { display: block; width: 100%; }
.shot figcaption { margin-top: 0.85rem; font-size: 0.95rem; color: var(--text-faint); }

/* ---------- Developers: the points demo ---------- */
.points {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-areas: "folders diagram" "term term";
  gap: 1.5rem 2rem; padding: clamp(1.1rem, 3vw, 2rem);
  border-radius: 16px; background-color: var(--panel);
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: inset 0 0 0 1px #2D3550, 0 0 0 10px #10151F, 0 0 0 11px #252C3F;
  margin: 0 10px;
}
.folders { grid-area: folders; display: flex; flex-direction: column; gap: 0.55rem; justify-content: center; }
.folder {
  display: flex; align-items: center; gap: 0.75rem; min-height: 50px; padding: 0.6rem 1rem;
  font-family: var(--font-mono); font-size: 0.95rem; text-align: left; color: var(--text);
  background: var(--navy); border: 1.5px solid #333C54; border-radius: 8px; cursor: pointer;
  transition: border-color 0.25s, background-color 0.25s;
}
.folder::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--lamp-off); box-shadow: 0 0 0 2px #10151F; transition: background-color 0.35s, box-shadow 0.35s; }
.folder:hover { border-color: #56607C; }
.folder[aria-checked="true"] { border-color: var(--rail); background: #1A2131; }
.folder[aria-checked="true"][data-profile="work"]::before { background: var(--work-lit); box-shadow: 0 0 0 2px #10151F, 0 0 8px 1px rgba(91, 141, 248, 0.9); }
.folder[aria-checked="true"][data-profile="personal"]::before { background: var(--personal-lit); box-shadow: 0 0 0 2px #10151F, 0 0 8px 1px rgba(52, 204, 108, 0.9); }
.points-diagram { grid-area: diagram; width: 100%; height: auto; align-self: center; overflow: visible; }
.pd-sleepers { stroke-width: 13; }
.pd-route { fill: none; stroke-width: 5; stroke-linecap: round; stroke: transparent; transition: stroke 0.35s 0.15s; }
.pd-trunk { stroke: var(--rail); }
.points[data-route="work"] .pd-work { stroke: var(--work-lit); }
.points[data-route="personal"] .pd-personal { stroke: var(--personal-lit); }
.pd-blade { stroke: var(--rail); stroke-width: 6; stroke-linecap: round; transform-box: view-box; transform-origin: 120px 100px; transform: rotate(-38deg); transition: transform 0.6s var(--ease-throw); }
.points[data-route="personal"] .pd-blade { transform: rotate(38deg); }
.points[data-route="work"] .pd-lamp-work { fill: var(--work-lit); filter: drop-shadow(0 0 6px rgba(91, 141, 248, 0.95)); }
.points[data-route="personal"] .pd-lamp-personal { fill: var(--personal-lit); filter: drop-shadow(0 0 6px rgba(52, 204, 108, 0.95)); }
.term {
  grid-area: term; display: block; min-height: 7.2em;
  padding: 1rem 1.25rem; border-radius: 10px; background: var(--night); box-shadow: inset 0 0 0 1px #1F2636;
  font-family: var(--font-mono); font-size: clamp(0.82rem, 0.75rem + 0.3vw, 0.95rem); line-height: 1.75; color: #D7DBE4; overflow-wrap: anywhere;
}
.term-line { display: block; white-space: pre-wrap; }
.term-prompt { color: var(--text-board); }
.term-work { color: var(--work-lit); font-weight: 500; }
.term-personal { color: var(--personal-lit); font-weight: 500; }
.term-dim { color: var(--text-faint); }
.answers { margin: 1.5rem 10px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 2rem; font-size: 1.0625rem; }
.answers div { display: flex; flex-wrap: wrap; gap: 0 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.answers dt { font-family: var(--font-mono); font-size: 0.9em; color: var(--text); }
.answers dd { margin: 0; color: var(--text-dim); }
.order { margin-top: 3rem; max-width: 70ch; }
.order h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.6rem; letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.order ol { margin: 0 0 1.2rem; padding-left: 1.4rem; color: var(--text-dim); }
.order li { padding-left: 0.4rem; margin-bottom: 0.5rem; }
.order li::marker { font-family: var(--font-display); font-weight: 700; color: var(--amber); }
.order strong { color: var(--text); font-weight: 600; }
.order > p { color: var(--text-faint); font-size: 1.0625rem; }

/* ---------- Rules: the lever frame ---------- */
.frame {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.9rem, 2vw, 1.6rem);
  background: linear-gradient(#2B3346, #1E2434) 0 146px / 100% 14px no-repeat;
}
.lever { position: relative; padding-top: 182px; }
.lever-handle {
  position: absolute; top: 0; left: 50%; width: 40px; height: 170px; margin-left: -20px; overflow: visible;
  transform-origin: 50% 160px; transform: rotate(-9deg);
  transition: transform 0.7s var(--ease-throw);
}
.lever-shaft { fill: var(--lever, #C8302C); }
.lever-grip, .lever-catch, .lever-link { fill: #C9CED8; }
.lever-lead { fill: var(--enamel); stroke: var(--ink); stroke-width: 1.5; }
.lever-number { font-family: var(--font-display); font-weight: 700; font-size: 16px; text-anchor: middle; fill: var(--ink); }
.lever:hover .lever-handle, .lever.is-pulled .lever-handle { transform: rotate(9deg); }
.lever-red { --lever: #C8302C; }
.lever-yellow { --lever: #E3B21B; }
.lever-black { --lever: #0D0F14; }
.lever-black .lever-shaft { stroke: #4A5268; stroke-width: 1; }
.lever-blue { --lever: #2563C9; }
.lever-white { --lever: #E6E6E6; }
.lever-plate {
  display: block; margin-bottom: 0.85rem; padding: 0.55em 0.6em 0.45em; border-radius: 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; line-height: 1.1; letter-spacing: 0.03em; text-transform: uppercase; text-align: center;
  background: var(--enamel); color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--enamel), inset 0 0 0 4.5px var(--ink), 0 8px 16px -8px rgba(0, 0, 0, 0.7);
}
.lever p { font-size: 1.0625rem; color: var(--text-dim); line-height: 1.5; }

/* ---------- Pricing: the ticket ---------- */
main > section.pricing { text-align: center; overflow-x: clip; }
.pricing .plate { margin-bottom: 0; }
.ticket {
  position: relative; text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  max-width: 780px; margin: 2.75rem auto 0;
  background: var(--enamel); color: var(--ink); border-radius: 14px;
  box-shadow: inset 0 0 0 10px var(--enamel), inset 0 0 0 11.5px rgba(20, 26, 38, 0.55), 0 40px 70px -30px rgba(0, 0, 0, 0.9);
}
.ticket-stub { position: relative; display: flex; flex-direction: column; padding: 2.2rem 1.8rem 1.8rem; border-right: 2px dashed rgba(20, 26, 38, 0.35); }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; right: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); }
.ticket-stub::before { top: -14px; }
.ticket-stub::after { bottom: -14px; }
.ticket-main { position: relative; padding: 2.2rem 11rem 2.4rem 2.4rem; }
.ticket-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem); line-height: 0.95; text-transform: uppercase; margin-bottom: 0.8rem; }
.ticket-small { font-size: 1.0625rem; color: #3A3F4D; }
.ticket-route { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: 0.06em; text-transform: uppercase; padding-bottom: 0.55rem; margin-bottom: 0.9rem; border-bottom: 1.5px solid rgba(20, 26, 38, 0.35); }
.ticket-fare { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; margin-bottom: 1.1rem; }
.ticket-other { margin: -0.4rem 0 1rem; font-size: 1rem; color: #3A3F4D; }
.ticket-fare-name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.03em; }
.ticket-price { font-family: var(--font-display); font-weight: 700; font-size: clamp(4.5rem, 3rem + 5vw, 6rem); line-height: 0.85; letter-spacing: -0.01em; }
.ticket-terms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-weight: 600; }
.ticket-terms li { display: inline-flex; align-items: center; gap: 0.5rem; }
.ticket-terms li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.ticket-no { position: absolute; top: 1.6rem; right: 2rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); }
.ticket-no-stub { position: static; margin-top: auto; padding-top: 1.4rem; }
.stamp {
  position: absolute; right: 2rem; bottom: 1.6rem; width: 124px; height: 124px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: 2px;
  color: #8A2B67; border: 3px solid currentColor; box-shadow: inset 0 0 0 4px var(--enamel), inset 0 0 0 6px currentColor;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.05;
  transform: rotate(-14deg); mix-blend-mode: multiply; filter: url(#ink);
}
.stamp-top, .stamp-bottom { font-size: 0.72rem; }
.stamp-date { font-family: var(--font-mono); font-weight: 500; font-size: 1rem; letter-spacing: 0.02em; }
.pricing .cta-row { margin-top: 2.4rem; }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.pending {
  display: inline-block; margin: 1.1rem auto 0; padding: 0.55rem 1rem; border-radius: 6px;
  background: var(--night); box-shadow: inset 0 0 0 1px #2A3245;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.95rem; color: #F2C14E;
}
.pending[hidden] { display: none; }
.pricing-note { max-width: 58ch; margin: 1.3rem auto 0; color: var(--text-dim); font-size: 1.0625rem; }

/* ---------- FAQ ---------- */
main > section.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 4vw, 4.5rem); align-items: start; }
.faq .plate { position: sticky; top: 100px; justify-self: start; }
.faq-list { border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.2rem 3rem 1.2rem 0; font-weight: 600; font-size: 1.15rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%;
  background: var(--lamp-off); box-shadow: 0 0 0 2px #10151F, 0 0 0 3.5px var(--rail-dim); transition: background-color 0.3s, box-shadow 0.3s;
}
.faq summary:hover::after { box-shadow: 0 0 0 2px #10151F, 0 0 0 3.5px var(--text-faint); }
.faq details[open] summary::after { background: var(--amber); box-shadow: 0 0 0 2px #10151F, 0 0 0 3.5px var(--amber-deep), 0 0 10px 2px rgba(245, 165, 36, 0.6); }
.faq details p { max-width: 65ch; padding: 0 0 1.35rem; color: var(--text-dim); }

/* ---------- Close ---------- */
main > section.close { text-align: center; padding-bottom: var(--section); }
.close-track { width: 100%; height: 70px; margin-bottom: 2.5rem; }
.close-sleepers, .close-rail { vector-effect: non-scaling-stroke; }
.close-route { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }
.close-work { stroke: var(--work-lit); }
.close-personal { stroke: var(--personal-lit); }
.close h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(2.9rem, 1.8rem + 4.5vw, 6rem); line-height: 0.92; margin-bottom: 2rem; }
.close .fine { margin-top: 1.1rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--night); }
.footer-inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 2.75rem var(--gutter) 3.25rem; display: grid; gap: 0.6rem; font-size: 0.95rem; color: var(--text-faint); }
.footer .brand { margin-bottom: 0.6rem; color: var(--text); }

/* ---------- Legal and thanks pages ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0.4rem 0 0.6rem; padding: 0; list-style: none; }
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
main.legal { max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(3rem, 2rem + 4vw, 5.5rem) var(--gutter) var(--section); }
.legal .plate { margin-bottom: 1rem; }
.legal-date { color: var(--text-faint); font-size: 0.95rem; margin-bottom: 2.5rem; }
.legal h2 { color: var(--text); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); line-height: 1.1; margin: 2.75rem 0 0.9rem; }
.legal p, .legal li { color: var(--text-dim); max-width: 68ch; }
.legal p + p { margin-top: 0.9rem; }
.legal ul, .legal ol { margin: 0.9rem 0; padding-left: 1.3rem; }
.legal li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.legal li::marker { color: var(--amber); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a:not(.btn) { color: var(--text); }
.legal .notice { margin: 1.5rem 0; }
.legal .notice p { color: #3A3F4D; }
.legal .notice a { color: var(--ink); }
.steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 2rem 0 !important; display: grid; gap: 1.6rem; }
.steps li { position: relative; padding-left: 64px !important; margin: 0 !important; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -4px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--ink);
  background: #FFF1CF; box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--rail-dim);
}
.steps h2 { margin: 0 0 0.4rem; }
.steps .btn { margin-top: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .frame { grid-template-columns: repeat(3, minmax(0, 1fr)); background-size: 100% 0; }
  .lever-handle { height: 120px; width: 28px; margin-left: -14px; transform-origin: 50% 113px; }
  .lever { padding-top: 136px; }
}
@media (max-width: 960px) {
  main > section.hero, main > section.problem { grid-template-columns: minmax(0, 1fr); }
  .hero-panel { padding-bottom: 0; margin-top: 1rem; }
  .menu { position: relative; left: auto; top: auto; width: min(300px, 100%); margin: -10px 0 0 auto; }
  .hero-panel figcaption { position: static; width: auto; min-height: 0; margin-top: 1rem; }
  .problem .plate, .problem-note, .board { grid-column: 1; grid-row: auto; }
  main > section.faq { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .faq .plate { position: static; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot:nth-child(2) { margin-top: 0; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .points { grid-template-columns: minmax(0, 1fr); grid-template-areas: "diagram" "folders" "term"; }
  .answers { grid-template-columns: minmax(0, 1fr); }
  .frame { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .lever { padding: 0 0 0 54px; }
  .lever-handle { left: 6px; top: 0; width: 24px; height: 102px; margin-left: 0; transform-origin: 50% 96px; }
  .lever-plate { text-align: left; }
  .stations { padding-left: 60px; }
  .station-lamp { left: -60px; width: 40px; height: 40px; font-size: 1.25rem; }
  .how-line { left: calc(var(--gutter) + 8px); }
  .how-note { margin-left: 0; }
  .windows { grid-template-columns: minmax(0, 1fr); }
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket-stub { border-right: 0; border-bottom: 2px dashed rgba(20, 26, 38, 0.35); padding: 1.8rem 1.6rem 1.5rem; }
  .ticket-stub::before, .ticket-stub::after { right: auto; top: auto; bottom: -15px; }
  .ticket-stub::before { left: -14px; }
  .ticket-stub::after { right: -14px; }
  .ticket-main { padding: 1.6rem 1.6rem 9.5rem; }
  .ticket-no-stub { display: none; }
  .ticket-main .ticket-no { top: auto; bottom: 1.4rem; right: auto; left: 1.6rem; }
  .stamp { right: 1.4rem; bottom: 1.2rem; width: 108px; height: 108px; }
  .board-row { grid-template-columns: 5ch minmax(0, 1fr) 12ch; gap: 7px; }
  .board { padding: 10px 12px 14px; }
  .board-row:not(.board-head) > span { padding: 4px 5px; }
}
@media (max-width: 560px) {
  .labels text { font-size: 22px; }
  .lamps { display: none; }
  .panel { padding: 6% 3% 4%; }
}
@media (max-width: 420px) {
  .cta-row .btn { width: 100%; }
}
@media (pointer: coarse) {
  .menu-item, .btn-small { min-height: 44px; }
}

@media print {
  .nav, .menu, .skip { display: none; }
  html.motion *, html.motion *::before, html.motion *::after { opacity: 1 !important; visibility: visible !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation-duration: 0.01ms !important; }
}
