/* truexsystems.com | instrument cluster system. Tokens and rules live in ../../DESIGN.md */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --ink: #111416;
  --graphite: #14181B;
  --bezel: #1E2429;
  --lens: #E3E7E5;
  --scale: #7A848B;
  --needle: #E04A30;

  /* day (default) */
  --bg: var(--lens);
  --panel: #EEF1EF;
  --text: var(--ink);
  --muted: #525B61;
  --tick: #7A848B;
  --accent: #B3331C;
  --face: #EEF1EF;
  --hub: #14181B;
  --hair: rgba(122, 132, 139, .38);
  --hair-strong: rgba(122, 132, 139, .75);
  --lamp-off: rgba(122, 132, 139, .32);
  --btn-bg: var(--ink);
  --btn-fg: var(--lens);
  --btn-bg-hover: #2A3035;

  --nav-h: 64px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 7rem);
  --block: clamp(3rem, 7vw, 4.5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --bg: var(--graphite); --panel: var(--bezel); --text: var(--lens); --muted: #9AA3A9;
    --tick: #6B757C; --accent: #EE5A40; --face: var(--bezel); --hub: #0E1113;
    --hair: rgba(122, 132, 139, .3); --hair-strong: rgba(122, 132, 139, .6); --lamp-off: rgba(122, 132, 139, .28);
    --btn-bg: var(--lens); --btn-fg: var(--ink); --btn-bg-hover: #C9CECB;
    color-scheme: dark;
  }
}
:root[data-theme="night"] {
  --bg: var(--graphite); --panel: var(--bezel); --text: var(--lens); --muted: #9AA3A9;
  --tick: #6B757C; --accent: #EE5A40; --face: var(--bezel); --hub: #0E1113;
  --hair: rgba(122, 132, 139, .3); --hair-strong: rgba(122, 132, 139, .6); --lamp-off: rgba(122, 132, 139, .28);
  --btn-bg: var(--lens); --btn-fg: var(--ink); --btn-bg-hover: #C9CECB;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-padding-top: calc(var(--nav-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color .24s var(--ease), color .24s var(--ease);
}
h1, h2, h3, h4, p, dl, dd, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; touch-action: manipulation; }
h1, h2, h3, h4 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; overflow-wrap: break-word; }
a { color: inherit; }
.mono { font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: 1rem; top: -60px; z-index: 30; background: var(--btn-bg); color: var(--btn-fg); padding: .7rem 1rem; border-radius: 2px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 1rem; }

.todo { font-family: var(--mono); font-stretch: 87.5%; font-size: .8125rem; color: var(--accent); }
.dash { color: var(--muted); }
.accent { color: var(--accent); }

.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .16s var(--ease); }
.link:hover { text-decoration-thickness: 2px; text-decoration-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 2px;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .16s var(--ease), transform .16s var(--ease), border-color .16s var(--ease);
  touch-action: manipulation;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-bg-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: currentColor; }
.btn--ghost:hover { border-color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
  transition: background-color .24s var(--ease);
}
.nav__inner { height: 100%; max-width: 1240px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); display: flex; align-items: center; gap: 1.5rem; }
.nav__brand { font-weight: 720; font-stretch: 115%; font-size: 1.0625rem; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; margin-right: auto; }
.nav__menu ul { display: flex; gap: .25rem; }
.nav__menu a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .7rem;
  text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--muted);
  position: relative; transition: color .16s var(--ease);
}
.nav__menu a:hover, .nav__menu a[aria-current="true"] { color: var(--text); }
.nav__menu a::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: 8px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .22s var(--ease);
}
.nav__menu a[aria-current="true"]::after { transform: scaleX(1); }
.nav__tools { display: flex; align-items: center; gap: .75rem; }

.minitach { position: relative; width: 40px; height: 40px; flex: none; transition: opacity .2s var(--ease); }
.minitach svg { width: 100%; height: 100%; }
.minitach__gear { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: .625rem; font-weight: 600; line-height: 1; color: var(--text); }

.lights { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; padding: 2px; min-height: 44px; min-width: 44px; cursor: pointer; }
.lights__knob { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--scale); background: var(--panel); transition: transform .24s var(--ease), background-color .24s var(--ease); }
.lights:hover .lights__knob { border-color: var(--text); }
.lights__knob::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 10px; margin-left: -1.5px; border-radius: 1px; background: var(--accent); }
.lights[data-pos="auto"] .lights__knob { transform: rotate(-50deg); }
.lights[data-pos="day"] .lights__knob { transform: rotate(0deg); }
.lights[data-pos="night"] .lights__knob { transform: rotate(50deg); }
.lights__label { font-size: .75rem; color: var(--muted); min-width: 3.4em; text-align: left; }

.menu-btn { display: none; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .75rem; background: none; border: 1px solid var(--hair-strong); border-radius: 2px; cursor: pointer; font-weight: 600; font-size: .9375rem; }
.menu-btn:hover { border-color: var(--text); }
.menu-btn__bars { position: relative; width: 16px; height: 10px; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .22s var(--ease); }
.menu-btn__bars::before { top: 0; } .menu-btn__bars::after { bottom: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 899px) {
  .menu-btn { display: inline-flex; }
  .lights__label { display: none; }
  .nav__menu { position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--hair); padding: .5rem var(--gutter) 1rem; display: none; }
  .nav__menu.is-open { display: block; }
  .nav__menu ul { flex-direction: column; }
  .nav__menu a { width: 100%; font-size: 1.125rem; color: var(--text); padding: 0; }
  .nav__menu a::after { left: 0; right: auto; width: 1.5rem; }
  .no-js .nav__menu, html:not(.js) .nav__menu { position: static; display: block; background: none; border: 0; padding: 0; }
}
@media (max-width: 380px) { .nav__brand { font-size: 1rem; } .nav__tools { gap: .4rem; } .menu-btn__text { display: none; } }

/* ---------- sections ---------- */
.section { padding-block: var(--section) 0; }
.section + .section { border-top: 1px solid var(--hair); }
.section--flush { border-top: 1px solid var(--hair); }
.section--last { padding-bottom: var(--section); }
.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); font-weight: 700; font-stretch: 112%; line-height: 1.02; letter-spacing: -.015em; }
h3 { font-size: 1.3rem; font-weight: 650; line-height: 1.2; letter-spacing: -.005em; }
h4 { font-size: 1.0625rem; font-weight: 650; line-height: 1.25; }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: 52ch; margin-top: .75rem; }
p { max-width: 65ch; }

/* ---------- scroll stages (pinned) ---------- */
.stage { position: relative; }
.stage__pin { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .js .stage { height: var(--stage-h, 300vh); }
  .js .stage__pin { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; display: flex; align-items: center; padding-top: var(--nav-h); }
}

/* ---------- hero ---------- */
.hero { --stage-h: 330vh; }
.hero .stage__pin { padding-block: calc(var(--nav-h) + 2rem) 3rem; }
@media (prefers-reduced-motion: no-preference) { .js .hero .stage__pin { padding-block: var(--nav-h) 0; } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero__name { font-size: clamp(2.6rem, 1.5rem + 5vw, 5.4rem); font-weight: 760; font-stretch: 118%; line-height: .95; letter-spacing: -.025em; }
.hero__caps { display: grid; margin: 1.25rem 0 1.75rem; }
.hero__cap { font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); line-height: 1.45; max-width: 30ch; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__tach { justify-self: center; width: min(100%, 540px, 64vh); aspect-ratio: 1; }
.tach-body { width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.tach { width: 100%; height: 100%; }

/* captions: without JS or with reduced motion, all lines are listed */
.hero__caps { gap: .6rem; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero__caps { gap: 0; }
  .js .hero__cap { grid-area: 1 / 1; }
  .js .hero__cap:not(.is-on) { opacity: 0; transform: translateY(10px); pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .hero__cap:not([data-cap="0"]) { color: var(--muted); font-size: 1.0625rem; } }

@media (max-width: 767px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .hero__tach { order: -1; width: min(86%, 40vh, 380px); }
  .hero__caps { margin: .9rem 0 1.25rem; }
  .hero__cap { max-width: none; }
}

/* ---------- gauges (shared) ---------- */
.gauge .g-rim { fill: none; stroke: var(--scale); stroke-width: 1.5; }
.gauge .g-face { fill: var(--face); stroke: var(--scale); stroke-width: 1.5; transition: fill .24s var(--ease); }
.gauge .g-tick { stroke: var(--tick); }
.gauge .g-tick.is-red, .gauge .g-red { stroke: var(--accent); }
.gauge .g-num { fill: var(--text); font-family: var(--font); font-stretch: 75%; font-weight: 650; font-variant-numeric: tabular-nums; }
.gauge .g-num.is-red { fill: var(--accent); }
.gauge .g-unit { fill: var(--muted); font-family: var(--mono); font-stretch: 87.5%; }
.gauge .g-read { fill: var(--text); font-family: var(--mono); font-stretch: 87.5%; font-weight: 500; font-variant-numeric: tabular-nums; }
.gauge .g-needle { fill: var(--accent); }
.gauge .g-hub { fill: var(--hub); stroke: var(--scale); stroke-width: 1.5; }
.gauge .g-lamp { fill: var(--lamp-off); font-family: var(--font); font-weight: 700; font-stretch: 90%; }
.gauge .g-lamp.is-on, .gauge .g-shift.is-on { fill: var(--accent); }
.gauge .g-shift { fill: var(--lamp-off); }
.gauge .g-gear { fill: var(--text); font-family: var(--mono); font-stretch: 87.5%; font-weight: 600; }
.gauge .g-target { stroke: var(--accent); stroke-opacity: .28; fill: none; }

/* ---------- GTI ---------- */
.gti { --stage-h: 380vh; }
.gti .stage__pin { padding-block: 2rem; }
.gti__grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.gti__art { position: relative; aspect-ratio: 1000 / 420; }
.gti__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gti__svg .ln { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gti__svg .ln.body { stroke-width: 2.25; }
.gti__svg .ln.thin { stroke-width: 1.25; stroke: var(--muted); }
.gti__svg .ln.faint { stroke-width: 1; stroke: var(--scale); stroke-opacity: .7; }
.gti__svg .caliper { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: butt; }
@media (prefers-reduced-motion: no-preference) {
  .js .gti__svg [data-d] { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
}
.gti__markers { position: absolute; inset: 0; }
.marker {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.marker::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--text); background: var(--bg); transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); grid-area: 1 / 1; }
.marker::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text); grid-area: 1 / 1; transition: background-color .2s var(--ease); }
.marker:hover::before { transform: scale(1.12); }
@media (max-width: 767px) { .marker::before { width: 18px; height: 18px; } .marker::after { width: 6px; height: 6px; } }
.marker.is-on::before { background: var(--accent); border-color: var(--accent); }
.marker.is-on::after { background: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  .js .marker:not(.is-shown) { opacity: 0; transform: scale(.4); pointer-events: none; }
}

.gti__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; font-stretch: 108%; line-height: 1.1; }
.gti__sub { color: var(--muted); margin-top: .35rem; }
.spot-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.25rem 0 1rem; }
.spot-tab {
  min-height: 44px; padding: 0 .85rem; border-radius: 2px; border: 1px solid var(--hair-strong); background: transparent; cursor: pointer;
  font-size: .9375rem; font-weight: 550; transition: border-color .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}
.spot-tab:hover { border-color: var(--text); }
.spot-tab[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.spots { display: grid; }
.spot { grid-area: 1 / 1; background: var(--panel); border: 1px solid var(--hair); border-left: 2px solid var(--accent); border-radius: 2px; padding: 1rem 1.1rem 1.1rem; transition: opacity .22s var(--ease), transform .22s var(--ease); }
.spot h4 { margin-bottom: .6rem; }
html:not(.js) .spot { grid-area: auto; margin-bottom: .75rem; }
.js .spot:not(.is-on) { opacity: 0; transform: translateY(6px); visibility: hidden; }

.kv > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--hair); }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv dt { font-family: var(--mono); font-stretch: 87.5%; font-size: .8125rem; color: var(--muted); padding-top: .15rem; }
.kv dd { font-size: .9688rem; line-height: 1.45; }

@media (max-width: 899px) {
  .gti__grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; align-content: center; }
  .gti__sub { display: none; }
  .spot-tabs { margin: .75rem 0 .75rem; }
  .spot-tab { padding: 0 .65rem; font-size: .875rem; }
  .kv > div { grid-template-columns: 5.25rem minmax(0, 1fr); padding: .35rem 0; }
  .kv dd { font-size: .9063rem; }
}

/* ---------- dyno ---------- */
.dyno { --stage-h: 260vh; }
.dyno .stage__pin { padding-block: 2rem; }
.dyno__wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "head head" "chart table" "controls note"; column-gap: clamp(1.5rem, 3vw, 3rem); row-gap: 1rem; align-items: start; }
.dyno__head { grid-area: head; }
.dyno__head h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; font-stretch: 108%; }
.dyno__head p { color: var(--muted); margin-top: .35rem; }
.dyno__chart { grid-area: chart; aspect-ratio: 800 / 360; }
.dyno__chart svg { width: 100%; height: 100%; overflow: visible; }
.dyno__controls { grid-area: controls; display: grid; grid-template-columns: auto minmax(0, 1fr) 7.5rem; align-items: center; gap: 1rem; }
.dyno__controls label { font-size: .8125rem; color: var(--muted); }
.dyno__rpm { font-size: .9375rem; text-align: right; }
.dyno__table { grid-area: table; border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; align-self: center; }
.dyno__table th, .dyno__table td { text-align: right; padding: .55rem 0 .55rem .75rem; border-top: 1px solid var(--hair); }
.dyno__table thead th { font-family: var(--mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 400; color: var(--muted); border-top: 0; padding-top: 0; }
.dyno__table tbody th { text-align: left; font-weight: 600; font-size: .9375rem; padding-left: 0; }
.dyno__table tbody th span { display: block; font-family: var(--mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 400; color: var(--muted); }
.dyno__table td { font-family: var(--mono); font-stretch: 87.5%; font-size: clamp(1.15rem, .9rem + 1vw, 1.6rem); font-weight: 500; }
.dyno__note { grid-area: note; font-size: .875rem; color: var(--muted); }

.dyno svg .d-grid { stroke: var(--hair); stroke-width: 1; }
.dyno svg .d-axis { fill: var(--muted); font-family: var(--mono); font-stretch: 87.5%; font-size: 12px; }
.dyno svg .d-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dyno svg .d-stock { stroke: var(--scale); }
.dyno svg .d-mod { stroke: var(--accent); }
.dyno svg .d-tq { stroke-dasharray: 7 5; stroke-width: 2; }
.dyno svg .d-cursor { stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dyno svg .d-dot { stroke: var(--bg); stroke-width: 2; }
.dyno svg .d-dot.d-stock { fill: var(--scale); }
.dyno svg .d-dot.d-mod { fill: var(--accent); }
.dyno svg .d-legend { fill: var(--muted); font-family: var(--font); font-size: 13px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--hair-strong); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--hair-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 30px; margin-top: -14px; border-radius: 2px; background: var(--accent); border: 0; }
input[type="range"]::-moz-range-thumb { width: 8px; height: 30px; border-radius: 2px; background: var(--accent); border: 0; }
input[type="range"]:focus-visible { outline-offset: 0; }

@media (max-width: 899px) {
  .dyno__wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "chart" "controls" "table" "note"; row-gap: .6rem; }
  .dyno__head p { display: none; }
  .dyno__controls { grid-template-columns: minmax(0, 1fr) 6.5rem; }
  .dyno__controls label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dyno__table td { font-size: 1.05rem; padding-block: .35rem; }
  .dyno__table th { padding-block: .35rem; }
  .dyno__note { font-size: .8125rem; }
}
@media (max-width: 899px) and (max-height: 700px) { .dyno__note { display: none; } }

/* ---------- build log ---------- */
.log { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); padding-block: var(--section) var(--block); align-items: start; }
.log__list h3 { margin-bottom: 1rem; }
.entry { border-top: 1px solid var(--hair); }
.entry:last-child { border-bottom: 1px solid var(--hair); }
.entry summary {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 20px; align-items: center; gap: 1rem;
  min-height: 56px; padding: .7rem .25rem .7rem 0; cursor: pointer; list-style: none;
  transition: padding-left .22s var(--ease);
}
.entry summary::-webkit-details-marker { display: none; }
.entry__date { font-size: .8125rem; color: var(--muted); }
.entry__title { font-weight: 600; font-size: 1.0625rem; }
.entry__chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .22s var(--ease); justify-self: center; }
.entry[open] .entry__chev { transform: rotate(45deg); border-color: var(--accent); }
.entry summary:hover .entry__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry[open] summary { padding-left: .9rem; box-shadow: inset 2px 0 0 var(--accent); }
.entry__body { padding: 0 0 1.1rem calc(5.5rem + 1rem); color: var(--muted); }
.entry__body p { color: var(--text); }
@supports (interpolate-size: allow-keywords) {
  .log { interpolate-size: allow-keywords; }
  .entry::details-content { block-size: 0; overflow: hidden; transition: block-size .26s var(--ease), content-visibility .26s allow-discrete; }
  .entry[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) { .entry::details-content { transition: none; } }

.plate { position: sticky; top: calc(var(--nav-h) + 1.5rem); background: var(--panel); border: 1px solid var(--hair); border-radius: 2px; padding: 1.25rem; }
.plate h3 { font-size: 1rem; margin-bottom: .9rem; }
.kv--plate dd { font-weight: 550; }

@media (max-width: 899px) {
  .log { grid-template-columns: minmax(0, 1fr); }
  .plate { position: static; }
  .entry summary { grid-template-columns: 4.75rem minmax(0, 1fr) 20px; gap: .75rem; }
  .entry__body { padding-left: 0; }
}

/* ---------- camry / repairs / sim ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); padding-bottom: var(--section); border-top: 1px solid var(--hair); padding-top: var(--block); }
.camry p { margin: .6rem 0 1.25rem; color: var(--muted); }
.readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 2px; overflow: hidden; }
.readouts > div { background: var(--panel); padding: .9rem 1rem; display: grid; gap: .15rem; align-content: start; }
.readouts__l { font-family: var(--mono); font-stretch: 87.5%; font-size: .75rem; color: var(--muted); }
.readouts__v { font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; font-weight: 500; font-size: clamp(1.4rem, 1.05rem + 1.3vw, 2rem); line-height: 1.15; }
.readouts__v small { font-size: .75rem; font-weight: 400; color: var(--muted); margin-left: .35rem; }
.readouts__v--word { font-size: clamp(1rem, .9rem + .5vw, 1.2rem); font-family: var(--font); font-weight: 600; padding-top: .4rem; }
.repairs h3 { margin-bottom: 1rem; }
.repairs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.repairs__grid li { border-top: 2px solid var(--text); padding-top: .8rem; }
.repairs__grid p { color: var(--muted); font-size: .9688rem; margin-top: .3rem; }
.sim { grid-column: 1 / -1; padding-top: 2rem; border-top: 1px solid var(--hair); }
.sim p { color: var(--muted); margin-top: .5rem; }
@media (max-width: 767px) {
  .bench { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .repairs__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- software stack ---------- */
.stack { display: grid; gap: 1.5rem; padding-bottom: var(--section); }
.proj {
  --cover: 0;
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  min-height: min(76vh, 600px); padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--panel); border: 1px solid var(--hair); border-radius: 2px;
  transform-origin: 50% 0;
}
.proj::after { content: ""; position: absolute; inset: -1px; border-radius: 2px; background: var(--bg); opacity: calc(var(--cover) * .55); pointer-events: none; }
@media (min-width: 900px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  .js .proj { position: sticky; top: calc(var(--nav-h) + 1rem + var(--i) * 14px); transform: scale(calc(1 - var(--cover) * .05)); }
}
.proj h3 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); font-weight: 700; font-stretch: 110%; line-height: 1.05; margin-bottom: .9rem; }
.proj__text > p { color: var(--muted); }
.proj__text > p + p { margin-top: 1rem; }
.proj__fine { font-size: .875rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.chips li { font-family: var(--mono); font-stretch: 87.5%; font-size: .8125rem; padding: .35rem .7rem; border: 1px solid var(--hair-strong); border-radius: 2px; }
.proj__visual { min-width: 0; }

.meter { display: grid; justify-items: center; gap: .25rem; }
.meter svg { width: min(100%, 420px); height: auto; }
.meter__read { display: grid; justify-items: center; text-align: center; margin-top: -.25rem; }
.meter__v { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); font-weight: 500; line-height: 1; }
.meter__u { font-size: .8125rem; color: var(--muted); margin-top: .4rem; }
.meter__t { font-size: .875rem; color: var(--muted); margin-top: .15rem; }

.route { display: grid; gap: 0; counter-reset: none; }
.route li { position: relative; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: 1rem; padding: .7rem 0 .7rem 1.4rem; border-left: 2px solid var(--hair-strong); transition: border-color .3s var(--ease); }
.route li::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--panel); border: 2px solid var(--hair-strong); transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.route__k { font-size: .75rem; color: var(--muted); }
.route__n { font-weight: 550; }
.route li.is-lit { border-left-color: var(--accent); }
.route li.is-lit::before { background: var(--accent); border-color: var(--accent); }
html:not(.js) .route li { border-left-color: var(--accent); }

.slot { position: relative; display: grid; place-content: center; gap: .3rem; text-align: center; width: 100%; border: 1px dashed var(--hair-strong); border-radius: 2px; background: repeating-linear-gradient(135deg, transparent 0 14px, var(--hair) 14px 15px); color: var(--muted); overflow: hidden; }
.slot__file { font-size: .875rem; color: var(--text); background: var(--panel); padding: .2rem .5rem; }
.slot__size { font-size: .75rem; background: var(--panel); padding: .1rem .5rem; justify-self: center; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.has-img { border-style: solid; background: none; }

.gw { --out: 1; --back: 1; display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem minmax(0, 1fr); align-items: stretch; }
.gw__side { border: 1px solid var(--hair-strong); border-radius: 2px; padding: 1rem 1.1rem; background: var(--bg); display: grid; align-content: start; gap: .5rem; }
.gw__side h4 { font-stretch: 108%; }
.gw__side li { font-family: var(--mono); font-stretch: 87.5%; font-size: .8125rem; padding: .3rem 0; border-top: 1px solid var(--hair); }
.gw__foot { font-size: .75rem; color: var(--accent); margin-top: .35rem; }
.gw__wire { display: grid; align-content: center; gap: .45rem; padding: 0 .6rem; }
.gw__lbl { font-size: .6875rem; color: var(--muted); text-align: center; }
.gw__track { position: relative; height: 2px; background: var(--hair-strong); overflow: hidden; }
.gw__run { position: absolute; inset: 0; }
.gw__run i { position: absolute; top: -2px; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); }
.gw__run--out { transform: translateX(calc(var(--out) * 100%)); }
.gw__run--out i { left: -6px; }
.gw__run--back { transform: translateX(calc((1 - var(--back)) * 100%)); }
.gw__run--back i { left: 0; }
html:not(.js) .gw__run { display: none; }
@media (max-width: 560px) {
  .gw { grid-template-columns: minmax(0, 1fr); }
  .gw__wire { grid-template-columns: minmax(0, 1fr) 2px 2px minmax(0, 1fr); align-items: center; gap: .9rem; padding: .5rem 0; }
  .gw__lbl:first-child { text-align: right; }
  .gw__lbl:last-child { text-align: left; }
  .gw__track { width: 2px; height: 40px; }
  .gw__run--out { transform: translateY(calc(var(--out) * 100%)); }
  .gw__run--out i { left: -2px; top: -6px; }
  .gw__run--back { transform: translateY(calc((1 - var(--back)) * 100%)); }
  .gw__run--back i { left: -2px; top: 0; }
}
.infra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; position: relative; }
.infra__box { border: 1px solid var(--hair-strong); border-radius: 2px; padding: 1rem 1.1rem; background: var(--bg); }
.infra__box dt { font-weight: 700; font-stretch: 108%; margin-bottom: .5rem; }
.infra__box dd { font-family: var(--mono); font-stretch: 87.5%; font-size: .8125rem; color: var(--muted); padding: .3rem 0; border-top: 1px solid var(--hair); }

@media (max-width: 899px) {
  .proj { grid-template-columns: minmax(0, 1fr); min-height: 0; }
}
@media (max-width: 420px) { .infra { grid-template-columns: minmax(0, 1fr); } }

/* ---------- tennis MFD ---------- */
.mfd { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; background: var(--panel); border: 1px solid var(--hair); border-radius: 2px; padding: clamp(1.5rem, 4vw, 3rem); }
.readouts--mfd > div { background: var(--bg); }
.mfd__note { font-size: .875rem; color: var(--muted); margin-top: 1rem; }
@media (max-width: 767px) { .mfd { grid-template-columns: minmax(0, 1fr); } }

/* ---------- experience ---------- */
.record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); padding-bottom: var(--section); }
.record__item { border-top: 2px solid var(--text); padding-top: 1rem; }
.record__when { font-size: .8125rem; color: var(--muted); margin-bottom: .75rem; }
.record__item h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); font-weight: 700; font-stretch: 108%; }
.record__role { font-weight: 550; color: var(--muted); margin: .2rem 0 .9rem; }
.todo-h .todo { font-size: 1rem; }
@media (max-width: 767px) { .record { grid-template-columns: minmax(0, 1fr); } }

/* ---------- contact ---------- */
.contact .lede { margin-bottom: 2rem; }
.kv--contact { max-width: 640px; }
.kv--contact > div { grid-template-columns: 7rem minmax(0, 1fr); padding: .85rem 0; }
.kv--contact > div:first-child { padding-top: .85rem; border-top: 1px solid var(--hair); }
.kv--contact > div:last-child { border-bottom: 1px solid var(--hair); }
.kv--contact dd { font-size: 1.0625rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--hair); padding-block: 2rem calc(2rem + env(safe-area-inset-bottom)); font-size: .9375rem; color: var(--muted); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
