/* HUD Desk website. Plain CSS, no build step, nothing loaded from another origin.
   Look: the G2 display itself (#00ff00 on black). Headings use Departure Mono, a pixel font drawn
   on an 11 px grid, so its sizes are whole multiples of 11 px (11, 22, 33, 44, 66): any other size
   blurs the pixel edges. Body text uses the reader's system font for comfortable reading. */

@font-face {
  font-family: "Departure Mono";
  src: url("fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  /* Show the fallback at once and swap when the 22 KB file arrives; headings never stay blank. */
  font-display: swap;
}

:root {
  --bg: #000;
  --panel: #030a03;
  --line: #134d13;          /* dim green rule, like an unlit grid */
  --line-soft: #0b2a0b;
  --green: #00ff00;         /* the exact colour of the G2 captures */
  --text: #dcefdc;          /* body text: green-tinted white, easier on the eye than pure green */
  /* Brighter than a plain grey-green so it still passes WCAG AA (4.5:1) on a dark scanline row. */
  --muted: #a9cfa9;
  /* The tube (Eugene, 2026-11-30: "more of a tube TV feel like my terminal watch face with the scan lines"):
     his Garmin terminal face darkens every third pixel row, and a letter on that row is about 38 % dimmer.
     site.js rounds the pitch to whole device pixels so the lines stay sharp on 1.25x, 1.5x, 2.25x screens. */
  --scan-pitch: 3px;
  --scan-dark: 1px;
  --scan-dim: 0.38;
  --glow: 0 0 5px rgba(0, 255, 0, 0.45), 0 0 16px rgba(0, 255, 0, 0.16);
  --pixel: "Departure Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --lens: 606px;            /* 576 px capture + 2 x 14 px padding + 2 x 1 px border */
  /* Hero shows the same capture at 2x (1152 CSS px) with pixelated scaling; padding 12 px. */
  --lens-2x: 1178px;        /* 1152 + 2 x 12 px padding + 2 x 1 px border */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

img { max-width: 100%; height: auto; display: block; }

/* ---- Tube look ------------------------------------------------------------------------- */

/* Scanlines and vignette: one fixed layer over the whole page, like the glass of a CRT. It sits above
   the content but takes no pointer events, so links and buttons work through it. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background-image:
    linear-gradient(to bottom,
      transparent 0, transparent calc(var(--scan-pitch) - var(--scan-dark)),
      rgba(0, 0, 0, var(--scan-dim)) calc(var(--scan-pitch) - var(--scan-dark)), rgba(0, 0, 0, var(--scan-dim)) var(--scan-pitch)),
    /* The vignette darkens only the outer edge (from 72 % of the way out), never the reading column. */
    radial-gradient(ellipse at center, transparent 72%, rgba(0, 0, 0, 0.32) 100%);
  background-size: 100% var(--scan-pitch), 100% 100%;
}
/* A faint band of phosphor light that rolls down the screen every 9 s. Motion only: no flicker. */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 22vh; z-index: 49; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 255, 0, 0), rgba(0, 255, 0, 0.035) 50%, rgba(0, 255, 0, 0));
  transform: translateY(-25vh);
  animation: crt-roll 9s linear infinite;
  will-change: transform;
}
@keyframes crt-roll {
  from { transform: translateY(-25vh); }
  to { transform: translateY(125vh); }
}
/* Reduced motion: no rolling band. More contrast or forced colours: no overlay at all. Print: none. */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; display: none; }
}
@media (prefers-contrast: more), (forced-colors: active), print {
  body::before, body::after { display: none; }
}

a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 0.92em;
  color: var(--green);
}
/* A flag such as -Voice must not break at its hyphen. */
p code, li code { white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--green); color: #000; padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---- Header ---------------------------------------------------------------------------- */

.top { border-bottom: 1px solid var(--line-soft); }
.top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 22px/1 var(--pixel); color: var(--green); text-decoration: none;
}
/* The favicon is a 24x24 pixel drawing: scale it only by whole pixels, without smoothing. */
.brand img { width: 24px; height: 24px; image-rendering: pixelated; }
.top-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top-nav a:hover { color: var(--green); }

/* ---- Type ------------------------------------------------------------------------------ */

h1, h2, h3, .eyebrow, .tagline, .btn, .modules a, .foot-brand, .lens-bar, .slide-cap b {
  font-family: var(--pixel);
  font-weight: 400;
}
h1 {
  font-size: 66px; line-height: 1.1; margin: 0 0 12px; color: var(--green);
  /* Phosphor bloom, stronger on the big title. */
  text-shadow: 0 0 6px rgba(0, 255, 0, 0.55), 0 0 24px rgba(0, 255, 0, 0.3);
}
h2 { font-size: 33px; line-height: 1.2; margin: 0 0 18px; color: var(--green); }
h3 { font-size: 22px; line-height: 1.3; margin: 0 0 8px; color: var(--green); }
/* Green text glows like phosphor; the body copy stays sharp for reading. */
h2, h3, .tagline, .brand, .btn:not(.btn-primary), .modules a, .slide-cap b, .views b, a { text-shadow: var(--glow); }
.btn-primary { box-shadow: 0 0 14px rgba(0, 255, 0, 0.45); }
.prompt { color: var(--muted); margin-right: 4px; }
.eyebrow { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.tagline { font-size: 22px; line-height: 1.4; color: var(--green); margin: 0 0 20px; }
.lead { font-size: 19px; margin: 0 0 28px; max-width: 34em; }
.fine { font-size: 14px; color: var(--muted); margin: 22px 0 0; }
.section-lead { max-width: 46em; margin: 0 0 28px; }
.kicker { color: var(--muted); margin: -8px 0 12px; }

/* ---- Buttons --------------------------------------------------------------------------- */

/* Stacked on purpose: beside a 576 px screen the text column is about 480 px wide, too narrow for
   both buttons on one line, so they share one width instead of wrapping unevenly. */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta .btn { min-width: 296px; text-align: center; }
.btn {
  display: inline-block; font-size: 22px; line-height: 1;
  padding: 14px 16px; border: 1px solid var(--green); color: var(--green);
  text-decoration: none; background: transparent;
}
.btn:hover { background: rgba(0, 255, 0, 0.1); text-decoration: none; }
.btn-primary { background: var(--green); color: #000; }
.btn-primary:hover { background: #5cff5c; }

/* ---- Hero ------------------------------------------------------------------------------ */

/* Stacked on purpose: a side-by-side column is too narrow for a crisp 2x (1152 px) capture, and
   shrinking a 576x288 below its own size makes the pixel fonts unreadable (Eugene, 2026-12-03). */
.hero { padding: 64px 0 56px; }
.hero .wrap { max-width: 1240px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 36px; align-items: start;
}
.hero-text { max-width: 40em; }
.hero-rotator { margin: 0; max-width: var(--lens-2x); width: 100%; }
.hero-rotator .lens {
  max-width: var(--lens-2x); padding: 12px; width: 100%;
}
/* 2x whole-number scale: each source pixel is a 2x2 CSS block; pixelated keeps edges sharp.
   max-width stays none on desktop so the global img rule cannot fractional-shrink it. */
.hero-rotator .lens img { width: 1152px; max-width: none; }

/* ---- The lens: a frame around one 576x288 capture -------------------------------------- */

.lens {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  /* The lens: a green rim glow outside and a soft glow inside, like a lit tube face. */
  box-shadow: 0 0 0 1px #020802, 0 0 56px rgba(0, 255, 0, 0.1), inset 0 0 40px rgba(0, 255, 0, 0.05);
  max-width: var(--lens);
}
.lens-bar {
  display: flex; justify-content: space-between;
  font-size: 11px; line-height: 1; color: var(--muted); margin: 0 2px 10px;
}
/* The captures are 1-bit pixel art at their native 576x288. Never draw them smaller than that on
   desktop (max-width: none overrides the global img { max-width: 100% }, which was shrinking them
   to ~470 px beside the headline). pixelated keeps every pixel square at 1x and 2x. */
.lens img {
  width: 576px; max-width: none; height: auto;
  image-rendering: pixelated;
}
.slide-cap { font-size: 15px; color: var(--muted); margin: 10px 2px 0; min-height: 1.6em; }
.slide-cap b { color: var(--green); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 8px; }

/* ---- Rotators -------------------------------------------------------------------------- */

/* Without JavaScript the slides stack (every screen visible). With it (html.js, set in <head>)
   they share one grid cell and only .is-active shows, so the frame keeps its height. */
.slides { display: grid; gap: 24px; }
.js .rotator .slides { gap: 0; }
.js .rotator .slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.js .rotator .slide.is-active {
  opacity: 1; visibility: visible;
  transition: opacity 0.35s ease, visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .js .rotator .slide, .js .rotator .slide.is-active { transition: none; }
}

.rotator-controls {
  display: none; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.js .rotator-controls:not(:empty) { display: flex; }
.rotator-controls button {
  font: 11px/1 var(--pixel); color: var(--green); background: transparent;
  border: 1px solid var(--line); padding: 8px 10px; cursor: pointer; min-height: 32px;
}
.rotator-controls button:hover { border-color: var(--green); }
.rotator-controls .dot {
  width: 14px; height: 14px; min-height: 0; padding: 0;
  /* A 44 px-high hit area around a 14 px square: easy to tap, small to look at. */
  border: 0; position: relative; background: transparent;
}
.rotator-controls .dot::before {
  content: ""; position: absolute; inset: 2px; border: 1px solid var(--green);
}
.rotator-controls .dot::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: -15px; bottom: -15px;
}
.rotator-controls .dot[aria-current="true"]::before { background: var(--green); }
.rotator-controls .dots { display: flex; gap: 6px; padding: 0 4px; }
.rotator-controls .play { margin-left: auto; }

/* ---- Modules row ----------------------------------------------------------------------- */

.features-intro { padding: 56px 0 24px; border-top: 1px solid var(--line-soft); }
.modules { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.modules a {
  display: inline-block; font-size: 22px; line-height: 1; padding: 10px 14px;
  border: 1px solid var(--line); color: var(--green); text-decoration: none;
}
.modules a:hover { border-color: var(--green); background: rgba(0, 255, 0, 0.08); }
/* Pictures, Keyboard and Display work inside every module: a second, quieter row. */
.modules-also { margin-top: 12px; }
.modules-also a { color: var(--muted); border-style: dashed; }

/* ---- Feature rows ---------------------------------------------------------------------- */

.feature { padding: 56px 0; }
.feature-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--lens);
  gap: 48px; align-items: start;
}
/* Alternate sides so a long page does not read as one column of pictures. */
.feature:nth-of-type(odd) .feature-text { order: 2; }
.feature:nth-of-type(odd) .feature-grid { grid-template-columns: var(--lens) minmax(0, 1fr); }
.feature-text { padding-top: 8px; }
.feature-media { margin: 0; }
.points { margin: 0; padding: 0; list-style: none; }
.points li { position: relative; padding-left: 22px; margin: 0 0 12px; }
/* A language name must not break inside the word (an Asian script can break between any two
   characters). */
.langs span[lang] { white-space: nowrap; }
.points li::before {
  content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px;
  background: var(--green);
}

/* ---- Phone ----------------------------------------------------------------------------- */

.phone { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: start; }
.phone-shot { margin: 0; }
.phone-frame {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #1a1a1a;
  max-width: 340px; margin: 0 auto; position: relative;
}
/* The phone captures are ordinary anti-aliased UI pictures: let the browser smooth them. */
.phone-frame img { width: 100%; image-rendering: auto; }
/* The AI Chat capture is 1,204 px tall: show its top and fade it out. */
.phone-frame.tall { max-height: 680px; }
.phone-frame.tall::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(rgba(0, 0, 0, 0), var(--bg));
}
.phone-shot figcaption { text-align: center; color: var(--muted); font-size: 15px; margin-top: 12px; }

/* ---- Your data ------------------------------------------------------------------------- */

.your-data { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.data-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--lens);
  gap: 48px; align-items: start; margin-bottom: 36px;
}
.data-text p { margin: 0 0 14px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); }
table.where { border-collapse: collapse; width: 100%; font-size: 15px; }
table.where caption {
  text-align: left; font: 11px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 14px 14px 4px;
}
table.where th, table.where td {
  text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--line-soft);
}
table.where thead th { color: var(--green); font-weight: 600; border-top: 0; }
table.where tbody th { color: var(--text); font-weight: 600; }
/* Narrow screens: three columns of a few words each read badly, so each row becomes a block:
   the part as a heading, then "Runs on" and "Talks to" with their labels (from data-label). */
@media (max-width: 640px) {
  table.where thead { display: none; }
  table.where, table.where tbody, table.where tr, table.where th, table.where td { display: block; width: 100%; }
  table.where caption { display: block; }
  table.where tbody tr { border-top: 1px solid var(--line-soft); padding: 10px 0; }
  table.where tbody th, table.where td { border-top: 0; padding: 2px 14px; }
  table.where tbody th { color: var(--green); }
  table.where td::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* ---- Setup ----------------------------------------------------------------------------- */

.setup { padding: 56px 0 72px; border-top: 1px solid var(--line-soft); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 880px; }
.steps > li {
  counter-increment: step; position: relative; padding: 0 0 26px 64px; margin: 0;
  border-left: 1px solid var(--line); margin-left: 21px;
}
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before {
  content: counter(step); position: absolute; left: -22px; top: -6px;
  width: 44px; height: 44px; display: grid; place-items: center;
  font: 22px/1 var(--pixel); color: #000; background: var(--green);
}
.steps p { margin: 0 0 12px; }
.note { font-size: 15px; color: var(--muted); }
.demo { margin: 8px 0 0; padding: 14px 18px; border: 1px dashed var(--line); max-width: 880px; }

.code-block { border: 1px solid var(--line); margin: 0 0 12px; background: var(--panel); }
.code-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--muted);
}
.code-block pre { margin: 0; padding: 12px; }
/* Wrap long commands instead of scrolling sideways. Only the display wraps: the text (and what
   the Copy button copies) is still one line. */
.code-block code { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* The copy button needs JavaScript (the clipboard API), so it shows only with html.js. */
.copy { display: none; }
.js .copy {
  display: inline-block; font: 11px/1 var(--pixel); color: var(--green); background: transparent;
  border: 1px solid var(--line); padding: 6px 10px; cursor: pointer;
}
.js .copy:hover { border-color: var(--green); }

/* ---- Footer ---------------------------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot p { margin: 0 0 8px; }
.foot-brand { font-size: 22px; color: var(--green); margin-bottom: 12px !important; }

/* ---- Privacy page ---------------------------------------------------------------------- */

.doc { max-width: 780px; padding: 48px 24px 72px; margin: 0 auto; }
.doc h1 { font-size: 44px; }
.doc h2 { font-size: 33px; margin-top: 40px; }
.doc h3 { margin-top: 30px; }
.doc p { margin: 0 0 14px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.doc .updated { color: var(--muted); font-size: 15px; }
.doc strong { color: var(--green); font-weight: 600; }
.doc a { overflow-wrap: anywhere; }

/* ---- Pictures: one picture in four views ---------------------------------------------- */

.pictures { padding: 56px 0; border-top: 1px solid var(--line-soft); }
/* Wide enough for two 576 px captures side by side at 1280 px; below that one per row, so a capture
   is never shrunk by a few pixels (a 1-bit picture loses whole rows when it is). */
.wrap-wide { max-width: 1240px; }
.views {
  display: grid; gap: 28px 40px; justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 576px), 576px));
}
.view { margin: 0; }
.view img {
  width: 576px; max-width: none; height: auto; image-rendering: pixelated;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 0 40px rgba(0, 255, 0, 0.08);
}
.view figcaption { color: var(--muted); font-size: 15px; margin-top: 10px; }
.view b { font: 11px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-right: 8px; }
/* The picture before HUD Desk processes it (Eugene, 2026-11-30: "you need to show the original colored
   picture before being processed"). It sits above the scanline layer (z-index 51 > 50), so it shows
   as an ordinary screen shows it, next to the G2 views under the tube. Scaled smoothly: a photo-like
   picture, not pixel art. */
.source { margin: 0 auto 28px; max-width: 432px; position: relative; z-index: 51; }
.source img { width: 100%; border-radius: 8px; border: 1px solid var(--line); image-rendering: auto; }
.source figcaption { color: var(--muted); font-size: 15px; margin-top: 10px; text-align: center; }
.source b { font: 11px/1 var(--pixel); letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-right: 8px; }
.views-lead { text-align: center; color: var(--text); margin: 0 0 18px; }
.pictures-more { margin-top: 48px; }
.pictures-more p { margin: 0 0 12px; }

/* The Coding callout: the one thing people do not expect a pair of glasses to do. */
.points li.callout { color: var(--green); text-shadow: var(--glow); }
.help { max-width: 880px; margin: 0 0 12px; }

/* ---- Narrow screens -------------------------------------------------------------------- */

/* 2x needs ~1178 px of content (1152 + pad + border). With 24 px side padding that is a 1226 px
   viewport; below that keep 1x (never a fractional scale). Feature rows stack once the side
   column cannot hold a full 576 px capture. */
@media (max-width: 1225px) {
  .hero-rotator, .hero-rotator .lens { max-width: var(--lens); }
  .hero-rotator .lens img { width: 576px; max-width: none; }
}
@media (max-width: 1100px) {
  .feature-grid, .data-grid,
  .feature:nth-of-type(odd) .feature-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature:nth-of-type(odd) .feature-text { order: 0; }
  .lens, .feature-media { max-width: var(--lens); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 36px; }
  h1 { font-size: 44px; }
  h2 { font-size: 22px; }
  .doc h1 { font-size: 33px; }
  .doc h2 { font-size: 22px; }
  .lead { font-size: 17px; }
  .tagline { font-size: 22px; }
  .btn { font-size: 22px; width: 100%; text-align: center; }
  .feature, .phone, .your-data, .setup { padding: 40px 0; }
  .lens { padding: 10px; border-radius: 10px; }
  .phones { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .steps > li { padding-left: 44px; margin-left: 17px; }
  .steps > li::before { width: 34px; height: 34px; left: -17px; font-size: 22px; }
  .modules a { font-size: 22px; padding: 8px 10px; }
  .top-row { padding-top: 10px; padding-bottom: 10px; }
}

/* Phone widths: the capture must use the full content width (never a ~226 px leftover). Prefer
   sources whose text survives the scale; high-dpr still uses pixelated, low-dpr smooths. */
@media (max-width: 640px) {
  .hero-rotator, .hero-rotator .lens, .lens, .feature-media { max-width: 100%; }
  .lens img, .view img, .hero-rotator .lens img {
    width: 100%; max-width: 100%; height: auto;
  }
}
@media (max-width: 640px) and (max-resolution: 1.49dppx) {
  .lens img, .view img { image-rendering: auto; }
}
