/* ---------- Tokens ----------
 * Black + single orange accent (Polestar-style); neutral greys for surfaces.
 * --canh / --canl and the other hues are data colors (bus wires, skills, traces). */
:root {
  --bg: #000;
  --screen: #0a0a0b;
  --panel: #131315;
  --panel-2: #1b1b1e;
  --panel-3: #26262a;
  --inset: #050506;
  --line: #1f1f22;
  --line-2: #323236;
  --text: #f3f3f4;
  --text-2: #c9c9ce;
  --muted: #8d8d94;
  --faint: #55555c;
  --accent: #ff7a1a;
  --accent-hi: color-mix(in srgb, var(--accent) 72%, #fff);
  --accent-ink: #140700;
  --accent-a: color-mix(in srgb, var(--accent) 15%, transparent);
  --accent-50: color-mix(in srgb, var(--accent) 50%, transparent);
  --m: 1; /* animation time scale, set by the fan control */
  --canh: #f5b83d;
  --canl: #4cc38a;
  --blue: #5ab0ff;
  --red: #ff5d5d;
  --violet: #b18cff;
  --teal: #3cc9c9;
  --coral: #ff8a6b;
  --radius: 6px;
  --radius-lg: 8px;
  --gutter: clamp(16px, 3vw, 32px);
  --bar-h: 56px;
  --dock-h: 68px;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--sans); line-height: 1.12; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 500; }
h3 { font-size: 1.3rem; font-weight: 500; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
kbd { font-family: var(--mono); font-size: .8em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 1px 6px; background: var(--panel-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 5px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .6rem 1.25rem; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--panel-2);
  color: var(--text); text-decoration: none; font: 500 .94rem var(--sans);
  cursor: pointer; transition: border-color .2s, background .2s, transform .1s;
}
.btn:hover { background: var(--panel-3); border-color: #45454b; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-small { min-height: 36px; padding: .35rem .9rem; font-size: .84rem; border-radius: 5px; }

/* ---------- Status bar ---------- */
.statusbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  height: var(--bar-h); padding: 0 var(--gutter);
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { justify-self: start; display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); font: 600 .7rem var(--sans); letter-spacing: .04em;  object-fit: cover; flex: none; }
.clock { font-size: 1.05rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.status-right { justify-self: end; display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.status-loc { display: inline-flex; align-items: center; gap: .3rem; }
.status-loc .ico, .status-signal { width: 17px; height: 17px; }

/* ---------- Bottom bar: climate | pinned apps | fan ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding: 0 var(--gutter) env(safe-area-inset-bottom);
  background: rgba(8, 8, 9, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.dock { display: flex; justify-content: center; gap: 4px; height: 100%; }
.dock a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 80px; height: 100%; padding: 0 6px;
  color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 500; letter-spacing: .01em;
  transition: color .2s;
}
.dock a::before { content: ""; position: absolute; top: -1px; left: 50%; width: 0; height: 3px; border-radius: 0 0 2px 2px; background: var(--accent); transform: translateX(-50%); transition: width .25s; }
.dock a:hover { color: var(--text); }
.dock a.active { color: var(--text); }
.dock a.active .ico { color: var(--accent); }
.dock a.active::before { width: 28px; }
.dock .ico { width: 24px; height: 24px; }

.climate { display: flex; align-items: center; gap: 2px; }
.climate-l { justify-self: start; }
.climate-r { justify-self: end; }
.cl-step, .cl-temp, .cl-fan, .cl-eng { height: 44px; border: 0; border-radius: 3px; background: transparent; cursor: pointer; transition: background .15s, color .15s; }
.cl-step { width: 34px; display: grid; place-items: center; color: var(--muted); }
.cl-temp { display: flex; align-items: baseline; gap: 2px; padding: 0 10px; color: var(--text); }
.cl-temp b { font: 300 1.65rem/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; box-shadow: 0 2px 0 var(--accent); }
.cl-temp span { font-size: .78rem; color: var(--muted); }
.cl-fan { display: flex; align-items: center; gap: 9px; padding: 0 12px; color: var(--text-2); }
.cl-fan .ico { width: 24px; height: 24px; animation: spin var(--spin, 0s) linear infinite; }
.cl-fan[data-level="0"] .ico { animation: none; color: var(--faint); }
.cl-step:hover, .cl-temp:hover, .cl-fan:hover, .cl-eng:hover, .cl-temp[aria-expanded="true"], .cl-fan[aria-expanded="true"] { background: var(--panel-2); color: var(--text); }
.cl-eng { width: 44px; display: grid; place-items: center; color: var(--text-2); }
.cl-eng .ico { width: 24px; height: 24px; }
/* Glow and pulse near the bottom of the page (class set by engineering.js); fan Off / reduced motion keep the glow, drop the pulse */
.cl-eng.beckon:not([aria-pressed="true"]), .eng-btn.beckon:not([aria-pressed="true"]) {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-a); box-shadow: 0 0 14px var(--accent-50);
  animation: eng-beckon calc(1.6s * var(--m)) ease-in-out infinite;
}
.cl-eng.beckon:not([aria-pressed="true"]) .ico, .eng-btn.beckon:not([aria-pressed="true"]) .ico { filter: drop-shadow(0 0 6px var(--accent)); }
@keyframes eng-beckon {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-50), 0 0 10px var(--accent-a); }
  50% { box-shadow: 0 0 0 7px transparent, 0 0 24px var(--accent-50); }
}
.fan-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.fan-bars i { width: 4px; border-radius: 1px; background: var(--line-2); }
.fan-bars i:nth-child(1) { height: 6px; }
.fan-bars i:nth-child(2) { height: 11px; }
.fan-bars i:nth-child(3) { height: 16px; }
.fan-bars i.on { background: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.climate-panel {
  position: fixed; z-index: 70; left: var(--gutter); bottom: calc(var(--dock-h) + 12px + env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 2 * var(--gutter)));
  display: grid; gap: 18px; padding: 18px 20px 20px;
  background: var(--screen); border: 1px solid var(--line-2); border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
}
.climate-panel[hidden] { display: none; }
.cp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.cp-head b { display: block; font-weight: 500; font-size: 1.05rem; }
.cp-head span { font-size: .8rem; color: var(--muted); }
.cp-close { width: 34px; height: 34px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; }
.cp-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-size: .86rem; font-weight: 500; color: var(--muted); }
.cp-label b { color: var(--text); font: 300 1.4rem var(--sans); font-variant-numeric: tabular-nums; }
.cp-note { margin: 6px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.4; }
#tempRange::-webkit-slider-runnable-track { background: linear-gradient(90deg, hsl(210 100% 72%), hsl(254 100% 68%) 12.5%, hsl(298 100% 64%) 25%, hsl(341 100% 59%) 37.5%, hsl(25 100% 55%) 50%, hsl(8 100% 56%)); }
#tempRange::-moz-range-track { background: linear-gradient(90deg, hsl(210 100% 72%), hsl(254 100% 68%) 12.5%, hsl(298 100% 64%) 25%, hsl(341 100% 59%) 37.5%, hsl(25 100% 55%) 50%, hsl(8 100% 56%)); }
#tempRange::-moz-range-progress { background: transparent; }
#climateAuto { justify-self: start; }

/* ---------- Shell: driving-info rail + app area ---------- */
.section, .home, .footer { width: min(1180px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.rail { display: none; }

.section {
  position: relative;
  margin-top: 16px;
  padding: clamp(22px, 4vw, 42px);
  background: var(--screen);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head h2 { margin-bottom: .6rem; }
.section-head p:last-child { margin-bottom: 0; }

.app-label {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 1rem; color: var(--muted); font-weight: 500; font-size: .86rem;
}
.app-label .ico { width: 34px; height: 34px; padding: 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--accent); }

@media (min-width: 1280px) {
  .shell {
    display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 16px; align-items: start;
    width: min(1520px, calc(100% - 2 * var(--gutter))); margin-inline: auto;
  }
  .shell .section, .shell .home, .shell .footer { width: auto; margin-inline: 0; }
  .shell main, .shell .footer { grid-column: 2; }
  .rail {
    grid-column: 1; grid-row: 1 / 3;
    position: sticky; top: calc(var(--bar-h) + 16px);
    margin-top: 24px; /* matches .home padding-top at this width */
    max-height: calc(100vh - var(--bar-h) - var(--dock-h) - 32px);
    overflow-y: auto; scrollbar-width: none;
    display: flex; flex-direction: column; gap: 12px;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-dup { display: none !important; }
  /* Rail shows the role and stats here, so the intro spans the row (portrait beside the text) and the map sits below */
  .w-intro { grid-column: 1 / -1 !important; grid-row: 1 !important; }
}

.r-card { padding: 16px 18px; border-radius: var(--radius-lg); background: var(--screen); border: 1px solid var(--line); }
.r-label { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.r-drive-top { display: flex; justify-content: space-between; align-items: flex-start; }
.r-gear { display: flex; gap: 10px; padding-top: 2px; font-size: .95rem; font-weight: 600; color: var(--faint); }
.r-gear span { transition: color .2s; }
.r-gear .on { color: var(--accent); }
.r-sign { display: flex; flex-direction: column; align-items: center; width: 50px; padding: 4px 0 5px; border-radius: 4px; background: #f3f3f4; color: #000; border: 2px solid #000; box-shadow: 0 0 0 1.5px #f3f3f4; line-height: 1; }
.r-sign small { font-size: .5rem; font-weight: 700; letter-spacing: .06em; }
.r-sign b { margin-top: 3px; font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.r-speed { display: flex; flex-direction: column; align-items: center; margin: -4px 0 0; }
.r-speed b { font-size: 4.6rem; font-weight: 300; line-height: .95; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.r-speed span { font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.r-drive .r-note { text-align: center; }
.r-road { display: block; width: 100%; height: auto; max-height: 78px; margin: 8px 0 0; }
.road-surface { fill: #0e0e10; }
.road-edge { fill: none; stroke: #3b3b41; stroke-width: 2; }
.road-dash { fill: none; stroke: #66666e; stroke-width: 2; stroke-dasharray: 9 11; }
.road-lead { fill: #3a3a40; }
.road-car rect:first-child { fill: #e9e9ec; }
.road-car-glass { fill: #2a2a2f; }
.road-car-lamp { fill: var(--accent); }
.r-trip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 10px; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.r-trip-bar { height: 4px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.r-trip-bar i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--accent); }
.r-note { margin: .2rem 0 0; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.r-title { margin: 0; font-size: 1.15rem; font-weight: 500; line-height: 1.25; }
.r-now { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; font-size: 1.2rem; font-weight: 500; }
.r-now-ico { width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-a); color: var(--accent); }
.r-next { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 12px 14px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; transition: background .2s, border-color .2s; }
.r-next:hover { background: var(--panel-3); }
.r-next span { display: flex; flex-direction: column; line-height: 1.25; }
.r-next small { font-size: .72rem; color: var(--muted); }
.r-next b { font-weight: 500; }
.r-next .ico { color: var(--accent); }
.r-next.up .ico { transform: rotate(180deg); }
.r-quick { display: none; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.r-quick a { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 14px 12px 12px; border-radius: var(--radius); background: var(--screen); border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: .8rem; font-weight: 500; transition: background .2s, border-color .2s; }
@media (min-height: 1000px) { .r-quick { display: grid; } }
.r-quick a:hover { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }

/* ---------- Home ---------- */
.home {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px;
  padding-top: clamp(16px, 3vw, 24px);
}
.w {
  background: var(--screen);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  animation: rise calc(.6s * var(--m)) cubic-bezier(.2, .7, .3, 1) both;
}
.w-intro {
  grid-column: 1 / 8; grid-row: 1 / 3;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(26px, 4.5vw, 56px);
  background: radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--screen);
}
.w-intro h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 1.2rem; }
.lede { font-size: 1.08rem; max-width: 38rem; color: var(--text-2); }
.hero-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.25rem; }
/* Portrait: above the text when the intro panel is narrow, beside it when there's room */
.w-intro { container-type: inline-size; }
.intro-body { display: grid; gap: clamp(20px, 3vw, 32px); }
.intro-text { min-width: 0; }
.intro-photo {
  width: auto; height: clamp(170px, 24vh, 220px); aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--panel-2);
}
@container (min-width: 600px) {
  .intro-body { grid-template-columns: minmax(0, 1fr) clamp(180px, 28%, 240px); align-items: center; }
  .intro-photo { order: 2; width: 100%; height: auto; }
}

.w-now { grid-column: 8 / 13; animation-delay: .06s; }
.w-label { display: flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-a); }
.w-title { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 500; line-height: 1.15; margin-bottom: .3rem; letter-spacing: -.015em; }
.w-now .muted { margin-bottom: .9rem; }
.w-since { display: inline-block; margin: 0; font-size: .72rem; color: var(--text-2); padding: 3px 10px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line-2); }

.w-stats { grid-column: 8 / 13; display: grid; grid-template-columns: 1fr; gap: 16px; }
.w-stat { display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem; animation-delay: .12s; }
.w-stat b { font: 300 clamp(2.6rem, 4.6vw, 3.4rem)/1 var(--sans); letter-spacing: -.04em; }
.w-stat span { font-size: .84rem; color: var(--muted); line-height: 1.35; }

/* Navigation map: SVG geometry with an HTML layer for labels, markers, and the car */
.w-map { grid-column: 1 / -1; position: relative; padding: 0; overflow: clip; height: clamp(440px, 52vw, 500px); background: #161618; animation-delay: .1s; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-land { fill: #161618; }
.m-water { fill: #0a0f17; stroke: #1c2735; stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-river { fill: none; stroke: #0d1420; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-border { fill: none; stroke: #2a2a30; stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-road { fill: none; stroke: #2e2e34; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-route { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .3; }
.m-route.done { opacity: .9; }
.m-route.glow { stroke-width: 12; opacity: .18; }
.m-route.now { opacity: 1; }
.map-layer { position: absolute; inset: 0; pointer-events: none; }
.m-stop, .m-city, .m-car { position: absolute; left: 0; top: 0; }
.m-stop i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #111113; border: 2px solid var(--accent); }
.m-stop span, .m-city { font-size: .7rem; font-weight: 500; white-space: nowrap; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.m-stop span { position: absolute; left: 11px; top: -9px; color: var(--text-2); }
.m-stop.on i { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-a); }
.m-stop.on span { color: var(--text); font-weight: 600; }
.m-stop.mute span, .m-city.mute { visibility: hidden; }
.m-city { color: var(--faint); font-size: .64rem; }
.m-car { width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: 1; }
.m-car svg { width: 100%; height: 100%; fill: var(--accent); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); }
.nav-maneuver, .nav-card, .nav-overview { position: absolute; z-index: 2; background: rgba(10, 10, 11, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.nav-maneuver { top: 14px; left: 14px; display: flex; align-items: center; gap: 12px; max-width: min(320px, calc(100% - 86px)); padding: 10px 16px 10px 10px; border-radius: 3px; }
.nav-maneuver[hidden], .nav-overview[hidden] { display: none; }
.nm-ico { flex: none; width: 46px; height: 46px; border-radius: 3px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.nm-ico .ico { width: 26px; height: 26px; stroke-width: 2.4; }
.nm-dist { font-size: 1.45rem; font-weight: 300; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nm-text { font-size: .8rem; color: var(--text-2); line-height: 1.3; }
.nav-overview { top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 3px; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.nav-overview:hover { background: var(--panel-2); }
.map-note { position: absolute; top: 18px; right: 70px; z-index: 1; margin: 0; font-size: .62rem; color: var(--faint); }
.nav-card { left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; padding: 14px 16px; border-radius: 3px; }
.nc-text { min-width: 0; }
.nc-text small { display: block; font-size: .72rem; color: var(--muted); }
.nc-text b { display: block; margin: 2px 0 1px; font-size: 1.08rem; font-weight: 500; line-height: 1.25; }
.nc-text span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.nc-actions { display: flex; gap: 8px; }
.nc-actions .btn { min-height: 40px; }
.nc-prev { width: 40px; padding: 0; }

/* App tiles: monochrome icons, grey tiles, orange on interaction */
.apps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app {
  display: flex; flex-direction: column; gap: 3px; min-height: 148px;
  padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: background .2s, border-color .2s, transform .1s;
  animation: rise .6s cubic-bezier(.2, .7, .3, 1) both;
}
.app:nth-child(1) { animation-delay: .16s; }
.app:nth-child(2) { animation-delay: .19s; }
.app:nth-child(3) { animation-delay: .22s; }
.app:nth-child(4) { animation-delay: .25s; }
.app:nth-child(5) { animation-delay: .28s; }
.app:nth-child(6) { animation-delay: .31s; }
.app:hover { background: var(--panel-2); border-color: var(--line-2); }
.app:hover .app-ico { color: var(--accent); }
.app:active { transform: scale(.98); }
.app-ico { color: var(--text-2); margin-bottom: auto; transition: color .2s; }
.app-ico .ico { width: 28px; height: 28px; }
.app-name { margin-top: 18px; font-weight: 500; font-size: 1rem; line-height: 1.2; }
.app-sub { font-size: .78rem; color: var(--muted); line-height: 1.3; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Bus / Experience ---------- */
.bus {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto 64px auto;
  column-gap: 12px;
  padding: 0 34px;
}
.bus-line { position: relative; grid-row: 2; grid-column: 1 / -1; align-self: center; height: 14px; margin: 0 -34px; }
.wire { position: absolute; left: 22px; right: 22px; height: 3px; border-radius: 3px; }
.wire-h { top: 0; background: var(--canh); box-shadow: 0 0 10px rgba(245, 184, 61, .3); }
.wire-l { bottom: 0; background: var(--canl); box-shadow: 0 0 10px rgba(76, 195, 138, .25); }
.term { position: absolute; top: 50%; transform: translateY(-50%); font: 600 .62rem var(--mono); color: var(--muted); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 2px 4px; }
.term-a { left: -14px; }
.term-b { right: -14px; }

.node {
  position: relative; z-index: 1;
  grid-row: 1; grid-column: var(--col); align-self: end;
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 12px 12px 11px; margin-bottom: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); cursor: pointer; font: inherit;
  transition: border-color .2s, transform .2s, background .2s;
}
.node.bottom { grid-row: 3; align-self: start; margin: 18px 0 0; }
.node::after { content: ""; position: absolute; left: 50%; width: 2px; height: 50px; z-index: -1; background: var(--line-2); transition: background .2s; }
.node:not(.bottom)::after { top: 100%; }
.node.bottom::after { bottom: 100%; }
.node:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateY(-2px); }
.node.bottom:hover { transform: translateY(2px); }
.node[aria-pressed="true"] { border-color: var(--accent); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--accent); }
.node[aria-pressed="true"]::after { background: var(--accent); }
.node .n-addr { font: 500 .64rem var(--mono); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.node .n-led { width: 7px; height: 7px; border-radius: 50%; background: #2c2c30; }
.node.awake .n-led { background: var(--canl); box-shadow: 0 0 8px var(--canl); }
.node .n-name { font-weight: 600; font-size: .92rem; line-height: 1.2; letter-spacing: -.005em; }
.node .n-sub { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.node.edu .n-name { color: var(--blue); }

.packet { position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 3px; background: var(--canh); box-shadow: 0 0 14px 3px rgba(245, 184, 61, .7); opacity: 0; z-index: 2; pointer-events: none; }

.node-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); gap: 16px; margin-top: 18px; }
#network { padding-block: clamp(22px, 3vw, 30px); }
#nodePanel > :last-child { margin-bottom: 0; }
#nodePanel { container-type: inline-size; padding: clamp(18px, 2.4vw, 26px); }
.np-top { display: flex; justify-content: space-between; gap: .5rem 1rem; align-items: flex-start; margin-bottom: .35rem; }
.np-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.np-count { min-width: 3.2em; text-align: center; font-size: .72rem; color: var(--muted); }
.np-step { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.np-step .ico { width: 18px; height: 18px; }
.np-step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.np-step:disabled { opacity: .35; cursor: default; }
.np-role { font-size: clamp(1.45rem, 2.6vw, 1.8rem); }
.np-dates { display: inline-block; margin-left: .6rem; font: 500 .74rem var(--mono); color: var(--accent); padding: 2px 9px; border-radius: 4px; background: var(--accent-a); vertical-align: 1px; }
.np-org { color: var(--muted); margin-bottom: 1rem; }
#network .section-head { margin-bottom: 1.25rem; }
@container (min-width: 620px) { .np-list { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
.np-list { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: .5rem; font-size: .96rem; line-height: 1.5; }
.np-list li { position: relative; padding-left: 1.2rem; color: var(--text-2); }
.np-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 1.1rem; }
.chips li, .chip { font: 500 .7rem var(--mono); padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--panel-2); }

.trace { display: flex; flex-direction: column; overflow: hidden; min-height: 240px; background: var(--inset); }
/* Beside the panel, the trace takes the panel's height instead of growing with its log */
.node-detail .trace { contain: size; }
.trace-head { display: flex; justify-content: space-between; padding: 12px 16px; font-size: .72rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.rec { color: var(--red); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.trace-cols, .trace-body li { display: grid; grid-template-columns: 4.6em 6.4em 2.4em 1fr; gap: 6px; }
.trace-cols { padding: 6px 16px; font-size: .64rem; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid var(--line); }
.trace-body { list-style: none; margin: 0; padding: 6px 16px 12px; font-size: .68rem; line-height: 1.75; color: #a9a9b0; flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
.trace-body li { flex: none; white-space: nowrap; animation: fadein .25s ease; } /* never shrink lines; the oldest drop off the top */
.trace-body li span:last-child { overflow: hidden; text-overflow: ellipsis; }
.trace-body .tx { color: var(--canh); }
.trace-body .rx { color: var(--canl); }
.trace-body li.note { display: block; color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

/* Wide screens: all six nodes in one row above the bus, so the whole Career section fits on a 1080p screen */
@media (min-width: 1400px) {
  .bus { grid-template-rows: auto 36px; }
  .node, .node.bottom { grid-row: 1; align-self: end; margin: 0 0 14px; }
  .node::after, .node.bottom::after { top: 100%; bottom: auto; height: 32px; }
  .node.bottom:hover { transform: translateY(-2px); }
}

/* ---------- DBC / Skills ---------- */
/* Settings-screen list: category menu + rows of skills with role tags */
.settings { display: grid; grid-template-columns: 240px minmax(0, 1fr); overflow: hidden; }
.set-menu { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--screen); border-right: 1px solid var(--line); }
.set-tab {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border: 0; border-radius: var(--radius); background: transparent;
  color: var(--text-2); font: 500 .95rem var(--sans); text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.set-tab small { font: 500 .72rem var(--mono); color: var(--faint); }
.set-tab:hover { background: var(--panel-2); color: var(--text); }
.set-tab[aria-selected="true"] { background: var(--panel-3); color: var(--text); }
.set-tab[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.set-tab[aria-selected="true"] small { color: var(--accent); }
.set-pane { min-width: 0; padding-bottom: 6px; }
.set-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.set-head h3 { font-size: 1.15rem; font-weight: 500; }
.set-head span { font-size: .8rem; color: var(--muted); }
.set-rows { list-style: none; margin: 0; padding: 0; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-name { font-size: .98rem; color: var(--text); }
.set-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.set-tag {
  font: 500 .76rem var(--sans); padding: 5px 10px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
}
.set-tag:hover { border-color: var(--accent); color: var(--text); background: var(--accent-a); }

/* ---------- Range inputs and presets (climate panel) ---------- */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer;
  --p: 0%;
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--p), var(--panel-3) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 8px; background: var(--panel-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 8px; background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-50); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-50); }

.presets { display: flex; justify-content: space-between; gap: 4px; margin-top: 6px; padding: 3px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line); }
.presets button { flex: 1; font: 600 .72rem var(--mono); padding: 6px 0; border-radius: 5px; background: transparent; color: var(--muted); border: 0; cursor: pointer; transition: background .15s, color .15s; }
.presets button:hover { color: var(--text); }
.presets button.on { color: var(--accent-ink); background: var(--accent); }

/* ---------- Outdoors ---------- */
#outside { overflow: clip; padding-bottom: clamp(56px, 7vw, 80px); }
.outside { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.outside-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.outside-photos figure { margin: 0; }
.outside-photos img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line-2); }
.outside-photos figcaption { margin-top: 6px; font-size: .78rem; color: var(--muted); }
.outside h2 { margin-bottom: 1rem; }
.outside .chips { margin: 1rem 0 1.4rem; }
.elev { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; }
.elev path { fill: color-mix(in srgb, var(--accent) 5%, transparent); stroke: color-mix(in srgb, var(--accent) 35%, transparent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* ---------- Contact / footer ---------- */
.contact-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ctile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px; min-width: 0;
  padding: 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: background .2s, border-color .2s, transform .1s;
}
.ctile:hover { background: var(--panel-2); border-color: var(--line-2); }
.ctile:hover .app-ico { color: var(--accent); }
.ctile:active { transform: scale(.98); }
.ctile .app-ico { margin: 0; }
.ctile > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ctile b { font-weight: 500; font-size: 1.02rem; line-height: 1.25; }
.ctile b + span { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.35; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 24px 4px 8px; font-size: .72rem; color: var(--muted); }

/* ---------- Engineering mode (engineering.js) ----------
 * The page becomes a driving surface: box edges become breakable walls drawn on the .eng-walls canvas,
 * text is split into <eng-w> words that the kart pushes with transforms; a shattered word holds <eng-l> letters. */
.footer { align-items: center; }
/* The main toggle is .cl-eng in the bottom bar; the footer button is the way in on phones, where that side of the bar is hidden. */
.eng-btn { display: none; font-family: var(--sans); }
.eng-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) { .eng-btn { display: inline-flex; } }

html.eng { scroll-behavior: auto; }
html.eng body {
  background-color: var(--bg);
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 40px 40px;
  user-select: none; -webkit-user-select: none;
}
@media (pointer: coarse) {
  /* room to scroll the footer above the touch controls */
  html.eng body { padding-bottom: calc(var(--dock-h) + 110px + env(safe-area-inset-bottom)); }
}
html.eng .statusbar, html.eng .rail { position: static; }
html.eng .rail { max-height: none; overflow: visible; }
html.eng #outside { overflow: visible; }
html.eng .bar, html.eng .climate-panel { display: none; }
html.eng .reveal { opacity: 1; transform: none; transition: none; }
/* Entrance animations would move boxes after their walls are measured. */
html.eng .shell * { animation: none !important; }
/* The canvas draws the walls, so the boxes' own borders are hidden (widths kept for layout). */
html.eng .eng-box { transition: none; transform: none; border-color: transparent !important; box-shadow: none; }
.eng-walls { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 35; pointer-events: none; }
eng-w { display: inline-block; transform-origin: 50% 50%; }
eng-w.shattered { position: relative; }
eng-ghost { visibility: hidden; }
eng-l { position: absolute; display: block; white-space: pre; transform-origin: 50% 50%; }

.eng-car {
  position: absolute; left: 0; top: 0; z-index: 40;
  width: 48px; height: 36px;
  transform-origin: 24px 18px;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .75));
}
.eng-car svg { display: block; overflow: visible; }
.eng-kbody { fill: var(--accent); }
.eng-tail { fill: #8a1f1a; }
.eng-car.braking .eng-tail { fill: #ff3b30; }

.eng-hud {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px);
  min-height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
  background: rgba(8, 8, 9, .92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  font-size: .82rem;
}
.eh-title { flex: none; display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; white-space: nowrap; }
.eh-title .ico { color: var(--accent); }
.eh-stats { flex: none; display: flex; gap: clamp(12px, 2vw, 22px); }
.eh-stats span { display: block; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.eh-stats b { display: block; min-width: 4.2em; font-weight: 500; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eh-stats i { font-style: normal; }
.eh-hint { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.eh-hint kbd { font-size: .72em; padding: 0 5px; color: var(--text-2); }
.eh-acts { flex: none; display: flex; gap: 6px; margin-left: auto; }

.eng-pad {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; /* sits on the HUD; bottom set in JS */
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.eng-pad[hidden] { display: none; }
.eng-pad div { display: flex; gap: 10px; }
.eng-pad button {
  pointer-events: auto; touch-action: none;
  width: 68px; height: 68px; display: grid; place-items: center;
  border-radius: var(--radius-lg); border: 1px solid var(--line-2);
  background: rgba(27, 27, 30, .88); color: var(--text);
  font: 600 .8rem var(--sans);
}
.eng-pad button.down { background: var(--panel-3); border-color: var(--accent); }
.eng-pad .eng-gas { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.eng-pad .eng-gas.down { background: var(--accent-hi); }
@media (max-width: 1100px) { .eh-title span, .eh-moved { display: none; } }
@media (max-width: 820px), (pointer: coarse) { .eh-hint { display: none; } }
@media (max-width: 700px) {
  .eng-hud { gap: 12px; padding-inline: 12px; }
  .eh-stats b { min-width: 3.6em; }
}
@media (max-width: 420px) {
  .eh-acts [data-act="reset"] { display: none; }
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity calc(.7s * var(--m)) ease, transform calc(.7s * var(--m)) ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dock a { min-width: 62px; }
}
@media (max-width: 860px) {
  .cl-step { display: none; }
}
@media (max-width: 1060px) {
  .w-intro { grid-column: 1 / -1; grid-row: auto; }
  .w-now { grid-column: 1 / 7; }
  .w-stats { grid-column: 7 / 13; }
}
@media (max-width: 980px) {
  .node-detail { grid-template-columns: 1fr; }
  .contact-tiles { grid-template-columns: 1fr; }
  .ctile { flex-direction: row; align-items: center; gap: 16px; }
}
@media (max-width: 860px) {
  .bus { grid-template-columns: 1fr; grid-template-rows: none; padding: 26px 0 26px 44px; row-gap: 12px; }
  .bus-line { position: absolute; top: 0; bottom: 0; left: 8px; right: auto; width: 14px; height: auto; margin: 0; grid-row: auto; grid-column: auto; align-self: stretch; }
  .wire { left: auto; right: auto; top: 22px; bottom: 22px; width: 3px; height: auto; }
  .wire-h { left: 0; }
  .wire-l { right: 0; left: auto; }
  .term { left: 50%; top: auto; transform: translateX(-50%); }
  .term-a { top: -10px; }
  .term-b { bottom: -10px; }
  .node, .node.bottom { grid-row: auto; grid-column: 1; margin: 0; align-self: stretch; }
  .node::after, .node:not(.bottom)::after, .node.bottom::after { top: 50%; bottom: auto; left: auto; right: 100%; width: 24px; height: 2px; }
  .node:hover, .node.bottom:hover { transform: translateX(3px); }
  .outside { grid-template-columns: 1fr; }
  .outside-photos { max-width: 420px; }
  .status-loc, .status-signal { display: none; }
}
@media (max-width: 700px) {
  :root { --dock-h: 60px; }
  .settings { grid-template-columns: 1fr; }
  .set-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); }
  .set-tab { padding: 10px 12px; font-size: .88rem; }
  .set-head, .set-row { padding-inline: 16px; }
  .set-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .set-tags { justify-content: flex-start; }
  .w-now, .w-stats { grid-column: 1 / -1; }
  .apps { gap: 8px; }
  .app { min-height: 128px; }
  .bar { grid-template-columns: auto 1fr; padding-inline: 4px 8px; }
  .climate-r { display: none; }
  .cl-temp { padding: 0 8px; }
  .cl-temp b { font-size: 1.35rem; }
  .cl-temp span { display: none; }
  .dock { justify-content: space-between; gap: 0; }
  .dock a { flex: 1; min-width: 0; padding: 0; }
  .dock a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .app { min-height: 104px; }
  .app-sub { display: none; }
  .map-note { display: none; }
  .nav-maneuver { gap: 10px; padding-right: 12px; }
  .nm-ico { width: 40px; height: 40px; }
  .nm-dist { font-size: 1.25rem; }
  .section { padding: 22px 18px; }
  .brand span:last-child { font-size: .9rem; }
  .statusbar { grid-template-columns: 1fr auto auto; }
  .clock { font-size: 1rem; }
  .trace-cols, .trace-body li { grid-template-columns: 4.2em 5.8em 2em 1fr; }
}
@media (max-width: 380px) {
  .brand span:last-child { display: none; }
}
/* Fan set to Off: same as reduced motion */
html.still { scroll-behavior: auto; }
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
.still .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
