/* omaralfarouk.com — Departures Board */

:root {
  --ground: #121212;
  --tile: #1c1c1b;
  --tile-edge: #2b2b29;
  --hinge: #0a0a0a;
  --line: #2f2f2c;
  --ink: #ecebe6;
  --muted: #94938c;
  --amber: #f2b636;
  --amber-ink: #141210;

  --f-board: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-text: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --rail: clamp(0px, 7vw, 104px);
  --gutter: max(20px, calc(var(--rail) + 24px));
  --measure: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--amber); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
html { scrollbar-color: #3a3a37 var(--ground); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #3a3a37; border: 3px solid var(--ground); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--amber); color: var(--amber-ink); font: 600 .9rem var(--f-board); letter-spacing: .12em; text-transform: uppercase; }
.skip:focus { top: 16px; }

/* ---------- Side rails ---------- */
.rail {
  position: fixed; bottom: 0; z-index: 10;
  width: 40px; display: flex; flex-direction: column; align-items: center;
}
.rail::after { content: ""; width: 1px; height: 96px; margin-top: 20px; background: var(--ink); opacity: .55; }
.rail--left { left: calc(var(--rail) / 2 - 20px); }
.rail--right { right: calc(var(--rail) / 2 - 20px); }
.rail ul { display: flex; flex-direction: column; gap: 6px; }
.rail a { display: block; padding: 8px; color: var(--muted); transition: color .25s, transform .25s var(--ease); }
.rail a:hover, .rail a:focus-visible { color: var(--amber); transform: translateY(-3px); }
.rail svg { width: 20px; height: 20px; }
.rail__mail {
  writing-mode: vertical-rl;
  font: 500 .8rem/1 var(--f-board); letter-spacing: .16em;
  padding: 10px 8px !important;
}

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.is-stuck { border-bottom-color: var(--line); }
.mono { font: 600 1.05rem/1 var(--f-board); letter-spacing: .14em; }
.mono span { color: var(--amber); margin: 0 .18em; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.top nav a {
  font: 500 .85rem/1 var(--f-board); letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); padding: 6px 0; transition: color .2s;
}
.top nav a:hover, .top nav a:focus-visible { color: var(--ink); }
.top__cv { display: inline-flex; align-items: center; gap: 6px; color: var(--ink) !important; border: 1px solid var(--tile-edge); padding: 8px 12px !important; }
.top__cv:hover { border-color: var(--ink); }
.top__cv svg { width: 14px; height: 14px; }

main, .foot { padding-inline: var(--gutter); }
main { position: relative; }
main::before { /* the board's continuous track */
  content: ""; position: absolute; width: 1px; background: var(--line);
  left: calc(var(--gutter) - 32px); top: var(--track-top, 0); bottom: var(--track-bottom, 0);
}
.board__title, .contact__title { position: relative; }
.board__title::before, .contact__title::before {
  content: ""; position: absolute; left: -36px; top: .32em; width: 9px; height: 9px;
  background: var(--ground); outline: 1px solid var(--muted); outline-offset: -1px;
}
.boardrow__time time { color: var(--ink); margin-left: .6em; }
main > section { max-width: var(--measure); margin-inline: auto; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 11vh, 120px) clamp(24px, 4vh, 48px); position: relative; }

.lockup {
  --tile-w: clamp(22px, calc((min(100vw, var(--measure) + 2 * var(--gutter)) - 2 * var(--gutter)) / 14.2), 86px);
  --tile-h: calc(var(--tile-w) * 1.4);
  display: flex; flex-direction: column; gap: calc(var(--tile-w) * .1);
  font: 600 calc(var(--tile-w) * 1.08)/1 var(--f-board);
  margin: 0 0 clamp(36px, 6vh, 56px);
}
.lockup__row { display: flex; flex-wrap: wrap; gap: calc(var(--tile-w) * .1) var(--tile-w); }
.lockup__word { display: flex; gap: calc(var(--tile-w) * .07); }

.tile {
  position: relative; flex: none;
  width: var(--tile-w); height: var(--tile-h);
  display: grid; place-items: center;
  background: var(--tile);
  outline: 1px solid var(--tile-edge); outline-offset: -1px;
  color: var(--ink);
  text-transform: uppercase;
  overflow: hidden;
}
.tile::after { /* hinge */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--hinge); z-index: 2;
}
.tile--blank { background: transparent; outline-color: transparent; }
.tile--blank::after { display: none; }
.tile--colon {
  width: calc(var(--tile-w) * .5);
  background: transparent; outline: none; color: var(--amber);
}
.tile--colon::after { display: none; }
.tile { perspective: 400px; }
.tile__fall {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--tile); color: var(--ink);
  clip-path: inset(0 0 50% 0);
  transform-origin: 50% 50%;
  animation: fall .06s linear forwards;
  z-index: 1;
}
@keyframes fall { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(.55); } }

.boardrow {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 8px 32px; align-items: center;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  font: 500 clamp(.95rem, 1.2vw, 1.1rem)/1.2 var(--f-board); letter-spacing: .16em; text-transform: uppercase;
}
.boardrow__time { color: var(--muted); }

.mark {
  display: inline-block;
  font: 600 .82rem/1 var(--f-board); letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 10px 5px;
  outline: 1px solid var(--tile-edge); outline-offset: -1px;
  color: var(--ink); background: var(--tile);
  white-space: nowrap;
}
.mark--live { background: var(--amber); color: var(--amber-ink); outline-color: var(--amber); }

.hero__line {
  max-width: 40ch; margin-top: clamp(28px, 4vh, 40px);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--ink);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .95rem/1 var(--f-board); letter-spacing: .16em; text-transform: uppercase;
  padding: 16px 24px;
  position: relative; overflow: hidden;
  border: 1px solid var(--tile-edge); background: var(--tile); color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn::after { /* lower flap: one step darker, no line across the label */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; bottom: 0; background: #000; opacity: .22; pointer-events: none; }
.btn > * { position: relative; z-index: 1; }
.btn > span { display: inline-block; }
.btn:hover, .btn:focus-visible { border-color: var(--ink); }
.btn.is-flip > span { animation: btnflip .32s var(--ease); }
@keyframes btnflip { 0% { transform: perspective(200px) rotateX(0); } 45% { transform: perspective(200px) rotateX(-90deg); opacity: .2; } 55% { transform: perspective(200px) rotateX(90deg); opacity: .2; } 100% { transform: perspective(200px) rotateX(0); } }
.btn--solid { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn--solid::after { opacity: .07; }
.btn--solid:hover { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn--solid:hover svg { transform: translateY(2px); }
.btn[disabled] { opacity: .5; cursor: progress; }

/* ---------- Board sections ---------- */
.board, .work, .contact { padding-block: clamp(64px, 10vh, 120px); }

.board__title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px;
  font: 600 clamp(2.4rem, 5.4vw, 4.6rem)/.95 var(--f-board); letter-spacing: .02em; text-transform: uppercase;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.board__title small {
  font: 400 1rem/1.4 var(--f-text); letter-spacing: 0; text-transform: none; color: var(--muted);
}

.board__head, .dep {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1.5fr) minmax(0, 1fr) 9.5rem;
  gap: 16px 28px; align-items: center;
}
.board__head {
  padding: 0 0 12px; border-bottom: 1px solid var(--ink);
  font: 500 .78rem/1 var(--f-board); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.board__head span:last-child { text-align: right; }

.board__list > li { border-bottom: 1px solid var(--line); }
.dep { padding: 22px 0; }
details.dep { display: block; padding: 0; }
details.dep > summary {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1.5fr) minmax(0, 1fr) 9.5rem;
  gap: 16px 28px; align-items: center;
  padding: 22px 0; cursor: pointer; list-style: none;
  transition: background .2s;
}
details.dep > summary::-webkit-details-marker { display: none; }
details.dep > summary:hover .dep__dest b { color: var(--amber); }

.dep__time { font: 500 1rem/1.2 var(--f-board); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dep__dest { display: flex; flex-direction: column; gap: 4px; }
.dep__dest b { font: 600 clamp(1.3rem, 2vw, 1.65rem)/1.1 var(--f-board); letter-spacing: .03em; text-transform: uppercase; transition: color .2s; }
.dep__dest span { color: var(--muted); font-size: .98rem; }
.dep__via { font: 500 .95rem/1.4 var(--f-board); letter-spacing: .04em; color: var(--ink); opacity: .82; }
.dep__status { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.dep__chev { width: 18px; height: 18px; color: var(--muted); transition: transform .35s var(--ease), color .2s; }
details[open] .dep__chev { transform: rotate(45deg); color: var(--amber); }

.dep__body { padding: 0 0 28px; }
.dep__body ul {
  margin-left: calc(11rem + 28px);
  max-width: 68ch;
  display: grid; gap: 10px;
  border-left: 1px solid var(--line); padding-left: 24px;
}
.dep__body li { position: relative; color: var(--ink); opacity: .9; text-wrap: pretty; }
.dep__body li::before { content: ""; position: absolute; left: -28px; top: .72em; width: 9px; height: 1px; background: var(--muted); }
details[open] .dep__body { animation: unfold .45s var(--ease); }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Work ---------- */
.case { border-top: 1px solid var(--ink); padding-block: 28px clamp(48px, 7vh, 72px); }
.case__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.case__head h3 { font: 600 clamp(2rem, 4.2vw, 3.4rem)/1 var(--f-board); text-transform: uppercase; letter-spacing: .01em; }
.case__alias { color: var(--muted); font-weight: 500; }
.case__lede { max-width: 58ch; margin-top: 14px; font-size: 1.15rem; color: var(--ink); opacity: .9; text-wrap: pretty; }

.case__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 32px; align-items: start; }
.case__grid:not(:has(.shot)) { grid-template-columns: 1fr; }
.case__grid:not(:has(.shot)) .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.case__grid:not(:has(.shot)) .facts > div:nth-child(2) { padding-top: 0; }
.shot { display: block; position: relative; outline: 1px solid var(--tile-edge); outline-offset: -1px; background: var(--tile); }
.shot img { width: 100%; height: auto; opacity: .94; transition: opacity .3s; }
.shot:hover img { opacity: 1; }
.shot__cap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-top: 1px solid var(--tile-edge);
  font: 500 .85rem/1 var(--f-board); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.shot__cap svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.shot:hover .shot__cap { color: var(--amber); }
.shot:hover .shot__cap svg { transform: translate(2px, -2px); }

.facts { display: grid; gap: 0; }
.facts > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child { padding-top: 0; }
.facts dt { font: 600 .82rem/1 var(--f-board); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts dd { font-size: .98rem; line-height: 1.55; color: var(--ink); opacity: .88; }

/* MT5 route: stations on one line */
.route { margin-top: 40px; }
.route__line { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.route__line::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--ink); opacity: .6; }
.route__line li { position: relative; padding: 30px 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.route__line li::before {
  content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px;
  background: var(--ground); border: 1px solid var(--ink);
}
.route__line li:first-child::before, .route__line li:last-child::before { background: var(--ink); }
.route__line b { font: 600 1.12rem/1.1 var(--f-board); letter-spacing: .06em; text-transform: uppercase; }
.route__line span { font-size: .9rem; color: var(--muted); line-height: 1.35; }
.route figcaption { display: flex; align-items: baseline; gap: 14px; margin-top: 30px; color: var(--muted); }
.route__time { font: 600 1.6rem/1 var(--f-board); color: var(--ink); letter-spacing: .06em; padding: 8px 12px 7px; outline: 1px solid var(--tile-edge); outline-offset: -1px; background: var(--tile); }
.js .route__line li { opacity: 0; transform: translateX(-8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .route.is-in .route__line li { opacity: 1; transform: none; }

.minor { border-top: 1px solid var(--ink); }
.minor__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .8fr); gap: 12px 32px;
  padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.minor__row h3 { font: 600 1.35rem/1.15 var(--f-board); letter-spacing: .03em; text-transform: uppercase; }
.minor__row p { color: var(--ink); opacity: .82; font-size: .98rem; text-wrap: pretty; }
.minor__via { font: 500 .9rem/1.4 var(--f-board); letter-spacing: .04em; color: var(--muted); text-align: right; }
.more { margin-top: 28px; }
.more a { display: inline-flex; align-items: center; gap: 8px; font: 500 .9rem/1 var(--f-board); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.more a:hover { color: var(--ink); border-color: var(--ink); }
.more svg { width: 14px; height: 14px; }

/* ---------- Who ---------- */
.who { position: relative; max-width: none !important; padding-block: clamp(80px, 12vh, 140px); overflow: hidden; margin-inline: calc(-1 * var(--gutter)) !important; padding-inline: var(--gutter); }
.who__inner { position: relative; max-width: var(--measure); margin-inline: auto; }
.who__wheel {
  position: absolute; top: 50%; right: -22%;
  width: min(1100px, 92vw); aspect-ratio: 1; transform: translateY(-50%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 36%, #000 60%);
  mask-image: linear-gradient(to right, transparent 36%, #000 60%);
}
.mandala { width: 100%; height: 100%; overflow: visible; }
.mandala text { stroke: none; font: 16px/1 ui-monospace, Menlo, Consolas, monospace; }
.ring { transform-origin: 337.5px 337.5px; transform-box: view-box; }
.ring--1 text { fill: var(--ink); opacity: .22; }
.ring--2 text { fill: var(--ink); opacity: .34; font-weight: 700; font-size: 20px; }
.ring--3 text { fill: var(--ink); opacity: .26; }
.ring--4 text { fill: var(--ink); opacity: .2; }
.ring--5 text { fill: var(--ink); opacity: .28; }
.ring--1 { animation: spin 90s linear infinite; }
.ring--2 { animation: spin 75s linear infinite reverse; }
.ring--3 { animation: spin 60s linear infinite; }
.ring--4 { animation: spin 45s linear infinite reverse; }
.ring--5 { animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.who__grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.portrait { outline: 1px solid var(--tile-edge); outline-offset: -1px; background: #000; }
.portrait img { width: 100%; height: auto; filter: saturate(.85) contrast(1.02); }
.who__text { display: grid; gap: 18px; max-width: 62ch; }
.who__text p { font-size: 1.12rem; line-height: 1.65; text-wrap: pretty; }
.who__text p:first-child { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.45; }

.spec { margin-top: 14px; border-top: 1px solid var(--line); }
.spec > div, .stack > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec dt, .stack dt { font: 500 .8rem/1.6 var(--f-board); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.spec dd { font-size: 1rem; }

.stack { margin-top: clamp(48px, 7vh, 72px); border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; background: color-mix(in srgb, var(--ground) 80%, transparent); }
.stack dd { font: 500 1.02rem/1.45 var(--f-board); letter-spacing: .05em; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; padding-bottom: clamp(80px, 12vh, 140px); }
.contact__title { font: 600 clamp(3rem, 6.4vw, 5.2rem)/.9 var(--f-board); text-transform: uppercase; letter-spacing: .01em; }

.letter__text {
  font: 400 clamp(1.4rem, 2.4vw, 2rem)/1.75 var(--f-text);
  color: var(--ink); text-wrap: pretty;
}
.slot {
  font: 500 1em/1.2 var(--f-board); letter-spacing: .04em;
  color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--muted);
  padding: 0 4px 2px; margin: 0 0 0 .25em;
  width: 9.5em; max-width: 100%;
  border-radius: 0;
  transition: border-color .2s, background .2s;
}
.slot--wide { width: 13em; }
.slot::placeholder { color: var(--muted); opacity: 1; }
.slot:focus { outline: none; border-bottom-color: var(--amber); background: var(--tile); }
.slot.is-bad { border-bottom-color: #f08a74; }
.hp { position: absolute; left: -9999px; }
.letter__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.letter__status { color: var(--muted); font-size: 1rem; }
.letter__status.is-ok { color: var(--amber); }
.letter__status.is-err { color: #f08a74; }

.direct { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.direct a { font: 500 1rem/1 var(--f-board); letter-spacing: .1em; color: var(--muted); padding: 6px 0; }
.direct a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto;
  padding-block: 28px 40px; border-top: 1px solid var(--line);
  font: 500 .82rem/1.4 var(--f-board); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.foot__social { display: none; gap: 20px; }
.foot__social a:hover { color: var(--ink); }

/* ---------- Entry flips ---------- */
[data-flapin] { display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .board__head, .dep, details.dep > summary { grid-template-columns: 9rem minmax(0, 1.5fr) 8.5rem; }
  .dep__via, .board__head span:nth-child(3) { display: none; }
  .dep__body ul { margin-left: calc(9rem + 28px); }
  .case__grid { grid-template-columns: 1fr; }
  .route__line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .route__line::before { display: none; }
  .route__line li { border-top: 1px solid color-mix(in srgb, var(--ink) 60%, transparent); padding-top: 26px; }
  .route__line li::before { top: -8px; }
  .stack { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --rail: 0px; }
  main::before, .board__title::before, .contact__title::before { display: none; }
  .rail { display: none; }
  .foot__social { display: flex; }
  .top nav a:not(.top__cv) { display: none; }
  .lockup { --tile-w: clamp(20px, calc((100vw - 2 * var(--gutter)) / 10.5), 64px); }
  .boardrow { grid-template-columns: 1fr; gap: 12px; }
  .boardrow__time { display: none; }
  .who__grid { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; }
  .who__wheel { right: -55%; top: 150px; width: 130vw; transform: none; -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 48%); mask-image: linear-gradient(to bottom, #000 25%, transparent 48%); }
  .portrait { position: relative; }
  .contact { grid-template-columns: 1fr; }
  .direct { grid-column: 1; }
  .minor__row { grid-template-columns: 1fr; }
  .case__grid:not(:has(.shot)) .facts { grid-template-columns: 1fr; }
  .case__grid:not(:has(.shot)) .facts > div:nth-child(2) { padding-top: 16px; }
  .minor__via { text-align: left; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .board__head { display: none; }
  .dep, details.dep > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .dep__time { grid-column: 1 / -1; font-size: .88rem; }
  .dep__status { grid-row: 2; grid-column: 2; align-self: start; }
  .dep__body ul { margin-left: 0; }
  .route__line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec > div, .stack > div { grid-template-columns: 1fr; }
  .letter__text { line-height: 1.9; }
  .slot, .slot--wide { width: calc(100% - .7em); margin: 0; }
  .mark { font-size: .74rem; padding: 5px 8px 4px; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ring { animation: none !important; }
  .tile.is-flip, details[open] .dep__body { animation: none; }
  .js .route__line li { opacity: 1; transform: none; transition: none; }
}
