/* ==========================================================
   FRST Computer — the site's one stylesheet.

   Palette. Two themes, one per page:
     dark  — teal on black: the night page (darkmode.html),
             where the Model Three leads.
     light — teal on cream, mimeograph paper: the day page
             (index.html), where the MODEL4 leads.
   Each page sets data-theme on <html>; both share semantic
   var names and the theme swaps the values.
   ========================================================== */
:root {
  color-scheme: dark;
  --bg:           #000;
  --bg-2:         #050907;
  --ink:          #03b694;
  --ink-2:        #78e3c7;
  --ink-dim:      #2f8378;        /* 4.6:1 on black (WCAG AA) */
  --ink-faint:    #0e2a26;
  --rule:         #10302a;
  --hot:          #ffa24a;
  --hot-2:        #ff6b8a;
  /* Mis-registration overlay colors on the hero title. */
  --title-shift-a: rgba(255,74,164,0.55);
  --title-shift-b: rgba(245,196,0,0.55);
  --stop-color:    #ff4444;
  /* Grain overlay strength. */
  --grain-mix:     overlay;
  --grain-opacity: 0.28;
  --scanline-rgb:  3,182,148;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:           #f2e9d4;        /* cream mimeograph stock */
  --bg-2:         #e8dcc0;        /* slightly darker "card" paper */
  --ink:          #006b5a;        /* ink-well teal */
  --ink-2:        #00554a;        /* body-copy teal */
  --ink-dim:      #5a6c66;        /* faded ink on old paper; 4.6:1 (WCAG AA) */
  --ink-faint:    #cbd9d2;        /* barely-there teal for rules */
  --rule:         #b7c5be;
  --hot:          #b85c00;        /* burnt orange, deeper */
  --hot-2:        #b52450;
  --title-shift-a: rgba(214,24,110,0.7);
  --title-shift-b: rgba(194,150,0,0.7);
  --stop-color:    #c91d1d;
  --grain-mix:     multiply;
  --grain-opacity: 0.18;
  --scanline-rgb:  70,50,24;       /* warm brown scan ghost */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mimeograph-ish noise layer. Heavier than a polite grain —
   zine pages aren't pristine. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: repeating-linear-gradient(
    to bottom,
    rgba(var(--scanline-rgb), 0.045) 0px,
    rgba(var(--scanline-rgb), 0.045) 1px,
    transparent 1px,
    transparent 3px
  );
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 201;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-mix);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: var(--ink-2); text-decoration: none; border-bottom: 1px dotted var(--ink-dim); }
a:hover { color: var(--hot); border-bottom-color: var(--hot); }

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  position: relative;
  z-index: 2;
}

/* ==========================================================
   Masthead
   ========================================================== */
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 48px;
}
/* Logo in the masthead — the white-bordered FRST lockup. Sized to
   sit visually next to the small nav labels. */
.mast-logo {
  display: block;
  height: 42px;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Product wordmark — "MODEL4" rendered tight and upright to match
   the string the cyberdeck itself shows in its title bar. */
.m4 { letter-spacing: 0.02em; font-weight: 700; }
.mast-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mast-nav a {
  color: var(--ink-dim);
  border-bottom: 1px solid transparent;
}
.mast-nav a:hover { color: var(--ink); }

/* Day/night — a link to the other page, styled as a pill so
   it fits among the nav labels. */
.theme-toggle {
  background: none;
  border: 1px solid var(--ink-faint);
  color: var(--ink-dim);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: 4px 10px 6px;
  margin-left: 4px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-dim);
}
.theme-toggle .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--ink);
  box-shadow: inset -3px 0 0 var(--bg);
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  padding: 24px 0 44px;
  margin-bottom: 40px;
  position: relative;
}
h1.hero-title {
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin-bottom: 20px;
  color: var(--ink);
  /* Mis-registered dual-print — like a two-pass Risograph where
     the plates didn't quite line up. Reads 'xerox drift'. */
  text-shadow:
    -2px -1px 0 var(--title-shift-a),
     2px  1px 0 var(--title-shift-b);
}
h1.hero-title .stop {
  color: var(--stop-color);
  text-shadow:
    -2px -1px 0 var(--title-shift-a),
     2px  1px 0 var(--title-shift-b);
}
.hero-lede {
  max-width: 640px;
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.hero-lede em { color: var(--ink); font-style: normal; font-weight: 500; }
.hero-meta {
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-meta .dot { color: var(--ink); }

/* ==========================================================
   Section scaffolding — section label + big heading
   ========================================================== */
section { padding: 48px 0; }
/* Torn-edge section divider. The SVG stroke color is themed via
   a mask: we render the wiggly path as an SVG mask and fill it
   with the current `--rule` color. */
section:not(:last-of-type) {
  border-bottom: none;
  position: relative;
  padding-bottom: 60px;
}
section:not(:last-of-type)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 14px;
  background: var(--rule);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='14' preserveAspectRatio='none' viewBox='0 0 800 14'><path d='M0,8 L20,5 L45,9 L70,6 L95,10 L130,4 L160,9 L200,6 L240,10 L280,5 L320,9 L360,6 L400,10 L440,4 L480,9 L520,7 L560,10 L600,5 L640,9 L680,6 L720,10 L760,5 L800,9' stroke='black' stroke-width='1.2' fill='none'/></svg>");
  -webkit-mask-size: 100% 14px;
  -webkit-mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='14' preserveAspectRatio='none' viewBox='0 0 800 14'><path d='M0,8 L20,5 L45,9 L70,6 L95,10 L130,4 L160,9 L200,6 L240,10 L280,5 L320,9 L360,6 L400,10 L440,4 L480,9 L520,7 L560,10 L600,5 L640,9 L680,6 L720,10 L760,5 L800,9' stroke='black' stroke-width='1.2' fill='none'/></svg>");
  mask-size: 100% 14px;
  mask-repeat: no-repeat;
}

.sec-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
.sec-label::before,
.sec-label::after {
  content: '';
  display: inline-block;
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--ink-faint);
}
.sec-label::before { display: none; }
/* Section number picks up a color per section — pulled from the
   logo's R/Y/G/M palette so the page accents echo the mark. */
.sec-label .num {
  color: var(--num-color, var(--ink));
  font-weight: 700;
  text-shadow:
    -1px 0 0 rgba(255,255,255,0.05),
     1px 0 0 rgba(0,0,0,0.4);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--ink);
}
h3 {
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
}

p {
  max-width: 640px;
  margin-bottom: 14px;
  color: var(--ink-2);
}
p em { color: var(--ink); font-style: normal; font-weight: 500; }
p strong { color: var(--ink); font-weight: 600; }

/* ==========================================================
   "Try FRST" — one big Model 4 launcher
   ========================================================== */
.deck-hero {
  display: block;
  border: 1px solid var(--ink-dim);
  background: var(--bg-2);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  margin-top: 26px;
  transition: border-color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}
.deck-hero:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.deck-hero:hover .deck-img { filter: saturate(1.05) contrast(1.03); }
.deck-hero:hover .deck-cta { color: var(--hot); }
.deck-hero:hover .deck-cta .arrow { transform: translateX(6px); }

/* Deck photo in the "Try FRST" hero.
   Dark theme: halftone-dithered 1-bit deck photo with a teal ink
     wash — reads as a two-color zine spread.
   Light theme: the unaltered color photo of the deck on a tree
     stump in the woods. */
.deck-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  background-color: #000;
  background-position: center 38%;
  background-repeat: no-repeat;
  background-size: cover;
  transition: filter 0.3s ease;
  background-image: url('ADeckInTheWoods_dither.webp');
  filter: contrast(1.05);
}
/* Teal ink wash over the dither — dark theme only. */
.deck-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  mix-blend-mode: multiply;
  opacity: 0.88;
}
.deck-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.65) 100%);
}

/* Light-mode: show the original color photo, no halftone + no
   teal wash. The deck on a tree stump reads well against cream. */
[data-theme="light"] .deck-img {
  background-color: var(--bg);
  background-image: url('ADeckInTheWoods.webp');
  filter: none;
}
[data-theme="light"] .deck-img::before { display: none; }
/* Re-theme the vignette in cream instead of black — the photo
   should fade into the paper, not get silhouetted by a dark halo. */
[data-theme="light"] .deck-img::after {
  background:
    radial-gradient(ellipse at center,
      rgba(242,233,212,0) 55%,
      rgba(242,233,212,0.55) 100%),
    linear-gradient(to bottom,
      rgba(242,233,212,0) 65%,
      rgba(242,233,212,0.85) 100%);
}
@media (max-width: 740px) {
  .deck-img { aspect-ratio: 4/3; background-position: center; }
}

.deck-body {
  padding: 22px 24px 24px;
  border-top: 1px solid var(--ink-faint);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 24px;
  align-items: end;
}
@media (max-width: 560px) {
  .deck-body { grid-template-columns: 1fr; }
}
.deck-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.deck-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.deck-sub {
  font-size: 13px;
  color: var(--ink-2);
  max-width: 620px;
}
.deck-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--ink-dim);
  padding: 10px 16px;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.deck-hero:hover .deck-cta { border-color: var(--hot); }
.deck-cta .arrow { transition: transform 0.2s ease; }

/* ==========================================================
   Products (catalog-ish)
   ========================================================== */
.cat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.sku {
  border: 1px solid var(--ink-faint);
  padding: 22px 20px 18px;
  background: var(--bg-2);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
/* Alternating slight tilt — pasted-into-a-zine feel. */
.cat .sku:nth-child(6n+1) { transform: rotate(-0.7deg); }
.cat .sku:nth-child(6n+2) { transform: rotate( 0.5deg); }
.cat .sku:nth-child(6n+3) { transform: rotate(-0.4deg); }
.cat .sku:nth-child(6n+4) { transform: rotate( 0.8deg); }
.cat .sku:nth-child(6n+5) { transform: rotate(-0.3deg); }
.cat .sku:nth-child(6n)   { transform: rotate( 0.6deg); }
.sku:hover {
  transform: rotate(0) scale(1.01);
  border-color: var(--ink-dim);
}
.sku-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.sku-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.sku-price {
  font-size: 14px;
  color: var(--hot);
  font-weight: 700;
  white-space: nowrap;
}
/* Rubber-stamp tag. Rotated, slightly noisy border via
   SVG filter (see #stamp-rough in body). The color comes from a
   per-sku variable so we can mix red/teal/yellow stamps. */
.sku-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--stamp, var(--hot));
  border: 2px solid var(--stamp, var(--hot));
  padding: 2px 8px 1px;
  margin-bottom: 12px;
  transform: rotate(var(--stamp-rot, -4deg));
  transform-origin: left center;
  filter: url(#stamp-rough);
  /* Counter-rotate the text slightly less for a second-pass feel. */
  text-shadow: 0 0 0 currentColor;
}
.sku-desc {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.sku-foot {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sku-foot a { border-bottom-color: var(--ink-dim); }

/* ==========================================================
   Values — big typography
   ========================================================== */
.values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 20px;
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.values span { position: relative; }
.values span + span::before {
  content: '·';
  color: var(--ink-dim);
  position: absolute;
  left: -20px;
}

/* ==========================================================
   Contact — two-column definition list
   ========================================================== */
.ct {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 22px;
  max-width: 620px;
  margin-top: 20px;
  font-size: 14px;
}
.ct dt {
  color: var(--ink-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  padding-top: 3px;
}
.ct dd { color: var(--ink-2); }

/* ==========================================================
   Footer + smolweb link
   ========================================================== */
.foot {
  padding-top: 36px;
  margin-top: 48px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.foot a { color: var(--ink-dim); border-bottom-color: var(--ink-faint); }
.foot a:hover { color: var(--ink-2); }


.hr::before { content: "\00b7  \00b7  \00b7  \00b7  \00b7  \00b7"; }
.hr {
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.5em;
  margin: 20px 0;
  user-select: none;
}

/* Smolweb call-out */
.smol {
  color: var(--ink-dim);
  font-size: 12px;
}
.smol a { color: var(--ink-2); }

/* The masthead's links wrap on a phone rather than push the page
   sideways. */
.mast-nav { flex-wrap: wrap; row-gap: 8px; }

/* ==========================================================
   The two flagships, side by side and on the same stage:
     Model Three — the neon deck (color LCD, Pi Zero, 9front).
     MODEL4      — the forest deck (e-paper, ESP32-S3, LoRa).
   Each deck carries an accent from the logo's palette.
   ========================================================== */
.neon   { --deck-accent: #ff4ba3; }
.forest { --deck-accent: #33cc55; }
[data-theme="light"] .neon   { --deck-accent: #b52450; }
[data-theme="light"] .forest { --deck-accent: #1f7a3a; }

/* The deck names.  In the dark the neon one glows; on paper it is
   just ink, like everything else. */
.neon-word {
  color: var(--deck-accent);
  text-shadow: 0 0 6px rgba(255,75,163,0.55), 0 0 16px rgba(255,75,163,0.25);
}
[data-theme="light"] .neon-word { text-shadow: none; }
.forest-word { color: var(--deck-accent); }

/* Pick a deck: two launchers instead of one. */
.decks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 26px;
}
.decks .deck-hero {
  margin-top: 0;
  border-top: 3px solid var(--deck-accent);
  display: flex;
  flex-direction: column;
}
.decks .deck-img { aspect-ratio: 16/9; }
.decks .deck-body { grid-template-columns: 1fr; flex: 1; align-items: start; }
.decks .deck-cta { justify-self: start; }
@media (max-width: 760px) {
  .decks { grid-template-columns: 1fr; }
  .decks .deck-img { aspect-ratio: 16/9; }
}

/* The Model Three, in the dark: the photo carries its own neon, so
   neither theme washes it -- the MODEL4's teal multiply is off -- and
   only the vignette (black at night, cream by day) frames it.  The
   crops center on the screen and the rainbow keys. */
.deck-img.neon {
  background-image: url('ModelThreeInTheDark.webp');
  background-position: center 40%;
  filter: none;
}
.deck-img.neon::before { display: none; }
[data-theme="light"] .deck-img.neon {
  background-image: url('ModelThreeInTheDark.webp');
  filter: none;
}
.lead-deck .deck-img.neon { background-position: center 27%; }

/* ==========================================================
   Shop floor: the flagship spreads, then the rest of the shelf
   ========================================================== */
.flagships {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 26px;
}
@media (max-width: 760px) {
  .flagships { grid-template-columns: 1fr; }
}
.flag {
  border: 1px solid var(--ink-faint);
  border-top: 3px solid var(--deck-accent);
  background: var(--bg-2);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
/* A stamp is as wide as its words, not the card. */
.flag > .sku-tag { align-self: flex-start; }
/* Pasted into the zine a hair crooked, each its own way. */
.flagships .flag:nth-child(1) { transform: rotate(-0.4deg); }
.flagships .flag:nth-child(2) { transform: rotate( 0.4deg); }
.flag:hover { transform: rotate(0); border-color: var(--ink-dim); border-top-color: var(--deck-accent); }
.flag-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.flag-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.flag-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--hot);
  white-space: nowrap;
}
.flag-kind {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--deck-accent);
  margin: 4px 0 16px;
}
/* What the deck's own screen shows, captured from its firmware. */
.flag-shot { margin: 0 0 16px; }
.flag-screen {
  border: 1px solid var(--ink-faint);
  background: #000;
  aspect-ratio: 5/3;
  overflow: hidden;
}
.flag-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flag-shot figcaption {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 6px;
}
.flag-story {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.flag-specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.flag-specs li::before {
  content: '\25aa\00a0';
  color: var(--deck-accent);
}
.flag-note {
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.flag-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: baseline;
  border-top: 1px dashed var(--ink-faint);
  padding-top: 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.flag-foot a { border-bottom-color: var(--ink-dim); }
.flag-foot a.buy { color: var(--hot); border-bottom-color: var(--hot); }

.shelf-label {
  margin: 40px 0 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ==========================================================
   The lead deck: the page's hero photograph.  Day leads with the
   MODEL4 in the woods; night with the Model Three's neon.
   ========================================================== */
.lead-deck { margin: 34px 0 0; }
.lead-deck .deck-img { aspect-ratio: 21/9; }
.lead-deck figcaption {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
@media (max-width: 740px) {
  .lead-deck .deck-img { aspect-ratio: 16/9; }
}

/* The launchers show the deck's own screen, as its firmware draws
   it, set in a black bezel. */
.deck-screen {
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--ink-faint);
}
.deck-screen img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* The flagship spreads show the deck itself. */
.flag-photo { aspect-ratio: 16/10; }

/* ==========================================================
   The store page: the smol store's one plain list, dressed like
   the day page.  Works without the stylesheet as well as with it.
   ========================================================== */
.store-list {
  list-style: none;
  margin-top: 24px;
  border-top: 1px solid var(--rule);
}
.store-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 22px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--ink-faint);
}
.store-item > .store-text:only-child { grid-column: 1 / -1; }
.store-item img {
  display: block;
  width: 180px;
  height: auto;
  border: 1px solid var(--ink-faint);
}
.store-item h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 18px;
}
.store-item.neon .store-name,
.store-item.forest .store-name { color: var(--deck-accent); }
.store-price {
  color: var(--hot);
  font-weight: 700;
  white-space: nowrap;
}
.store-item p { font-size: 14px; margin-bottom: 6px; }
.store-note { color: var(--ink-dim); font-size: 12px; }
.store-add {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.store-add a.buy { color: var(--hot); border-bottom-color: var(--hot); }
.store-cart {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 560px) {
  .store-item { grid-template-columns: 1fr; }
  .store-item img { width: 100%; max-width: 360px; }
}

/* ==========================================================
   A deck's own page (model3.html, model4.html): the whole story,
   as published first on gopher.
   ========================================================== */
.deck-page .sku-tag { margin-bottom: 18px; }
h1.deck-page-title {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.buy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  margin-top: 22px;
  padding: 14px 0;
  border-top: 1px dashed var(--ink-faint);
  border-bottom: 1px dashed var(--ink-faint);
}
.buy-strip .flag-price { font-size: 24px; }
.buy-note { font-size: 13px; color: var(--ink-dim); }
.buy-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.buy-strip .buy-links { margin-left: auto; }
.buy-links a.buy { color: var(--hot); border-bottom-color: var(--hot); }

.spec-tree {
  list-style: none;
  margin: 18px 0 14px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 720px;
}
.spec-tree li { margin: 4px 0; padding-left: 18px; position: relative; }
.spec-tree li::before {
  content: '\2013';
  position: absolute;
  left: 0;
  color: var(--deck-accent, var(--ink-dim));
}
.spec-tree ul { list-style: none; margin: 4px 0 6px 6px; }
.spec-tree strong { color: var(--ink); }

/* ASCII art and ads from the gopher hole: exact, and on a narrow
   screen they scroll inside themselves rather than widen the page. */
pre.ascii {
  font-family: inherit;
  font-size: clamp(9px, 1.35vw, 13px);
  line-height: 1.25;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--ink-faint);
  padding: 16px 18px;
  margin-top: 18px;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  /* the art is character by character: no |= or >= ligatures */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
code { color: var(--ink); font-family: inherit; }
/* Marks a command only some decks carry. */
.only {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--ink-faint);
  padding: 0 5px;
  margin-left: 4px;
  white-space: nowrap;
}
.first-on-gopher {
  margin-top: 36px;
  font-size: 12px;
  color: var(--ink-dim);
  max-width: none;
}

/* ==========================================================
   software.html — the greatest hits: a time machine for the
   old internet.  The time circuits are the DeLorean's, after
   the film: red, green, amber.
   ========================================================== */
.time-circuits {
  display: grid;
  gap: 8px;
  margin: 26px 0 30px;
  padding: 14px;
  max-width: 420px;
  background: #1b1d1f;
  border: 3px solid #6d7378;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #2c3034, 0 10px 24px rgba(0,0,0,0.25);
  transform: rotate(-0.6deg);
}
.tc-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.tc-led {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 2px 10px;
  background: #0b0b0b;
  border: 1px solid #333;
  color: var(--tc);
  text-shadow: 0 0 6px var(--tc), 0 0 14px var(--tc);
}
.tc-label {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e8e2d0;
  background: #8a1e1e;
  padding: 1px 8px;
}
.tc-dest { --tc: #ff3b30; }
.tc-now  { --tc: #3cff6b; }
.tc-last { --tc: #ffb000; }

.doc-quote {
  margin: 0 0 28px;
  padding: 4px 0 4px 18px;
  border-left: 4px solid #ff4444;
}
.doc-quote p {
  font-size: clamp(20px, 3.4vw, 30px);
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
.doc-quote footer {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hit {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 26px;
  align-items: center;
  margin: 40px 0;
}
.hit:nth-of-type(even) { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.hit:nth-of-type(even) img { order: 2; }
.hit img {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  border: 10px solid #111;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--ink-faint), 0 14px 32px rgba(0,0,0,0.3);
}
.hit h3 { margin: 0 0 8px; font-size: 18px; }
.hit p { margin: 0 0 10px; }
.hit-where {
  font-size: 12px;
  color: var(--ink-dim);
}
@media (max-width: 740px) {
  .hit, .hit:nth-of-type(even) { grid-template-columns: 1fr; gap: 14px; }
  .hit:nth-of-type(even) img { order: 0; }
}
pre.spin {
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: #0b0b0b;
  color: #3cff6b;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
}

/* ==========================================================
   Accessibility.
   ========================================================== */
/* Text for screen readers only: the product behind an "Add to
   cart", the plain reading of a stylized headline. */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* The first things a keyboard or screen reader meets: skip to the
   content, or go to the text-only site.  Hidden until focused. */
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  border: none;
}
.skip:focus { top: 12px; }
.skip + .skip:focus { top: 56px; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
/* Product names are headings, for heading navigation; they keep the
   look of the labels they were. */
h3.flag-name, h3.sku-name { margin: 0; }
h3.flag-name { color: inherit; }
/* The colored section numbers, darkened enough to read on paper. */
[data-theme="light"] .sec-label .num {
  color: color-mix(in srgb, var(--num-color, var(--ink)) 50%, #000);
}

/* Download cards (model3.html#download): hashes wrap, fetch lines read
   as a terminal */
.sku code.sha {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-dim);
  word-break: break-all;
}
.fetch {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--ink-faint);
  background: var(--bg-2);
  font-size: 13px;
  overflow-x: auto;
}

/* ==========================================================
   watch.html and watch/: the films.  Our own files in a plain
   <video>; another site's player only behind a <details>.
   ========================================================== */
.watch-grid {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.watch-card a { display: block; border-bottom: none; }
.watch-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 600;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--ink-faint);
}
.watch-title {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--ink);
}
.watch-card p { margin: 6px 0 0; }
.watch-meta { font-size: 12px; color: var(--ink-dim); }

.film-title { font-size: clamp(28px, 5vw, 44px); margin: 8px 0 20px; }
.film-player { margin: 0 0 20px; }
.film-player video,
.film-elsewhere iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 600;
  background: #000;
  border: 1px solid var(--ink-faint);
}
.film-player figcaption { margin-top: 12px; }
.film-note { font-size: 13px; color: var(--ink-dim); }
.film-links { padding-left: 18px; }
.film-links li { margin: 6px 0; }
.film-elsewhere { margin: 24px 0; }
.film-elsewhere summary { cursor: pointer; color: var(--ink); }
.film-elsewhere iframe { margin-top: 10px; border: 0; }
.film-transcript { margin-top: 32px; }
