/* thevenom.dev — see DESIGN.md for the rules behind these values */

:root {
  --ink: #0b0c0e;
  --ink-2: #121418;
  --ink-3: #1a1d23;
  --line: #2a2e36;
  --line-hi: #3a3f49;
  --text: #ece6d6;
  --text-dim: #a8a397;
  --text-faint: #8a857b;
  --amber: #ffb000;
  --amber-dim: #b37b00;
  --amber-glow: rgba(255, 176, 0, 0.18);

  /* Coherent retro stack (preview):
     - --font-mark  Press Start 2P → logo + H1 only (pixel punch, rare)
     - --font-ui    Russo One → H2/H3, buttons, nav/tags/chrome
     - --font-body  IBM Plex Sans → readable prose
     - --font-mono  IBM Plex Mono → code / prompts
     --font-display aliases --font-ui so existing rules keep working. */
  --font-mark: "Press Start 2P", "Courier New", monospace;
  --font-ui: "Russo One", "Arial Black", "Helvetica Neue", sans-serif;
  --font-display: var(--font-ui);
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --s7: 104px;

  --wrap: 960px;
  --measure: 68ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--amber-dim);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--amber);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--amber-glow);
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

p {
  margin: 0 0 var(--s3);
  max-width: var(--measure);
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s4);
}

.skip-nav {
  /* Landmark wrapper for the skip link only; takes no space when link is clipped. */
  margin: 0;
  padding: 0;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--s3);
  top: var(--s3);
  background: var(--amber);
  color: var(--ink);
  padding: var(--s2) var(--s3);
  z-index: 10;
}

/* ---------- Display type ---------- */

.display,
h2,
h3 {
  font-family: var(--font-ui);
  font-weight: 400; /* Russo One ships a single weight */
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0;
}

/* Press Start 2P — logo + big H1 only. Sized down: glyph advance is very wide. */
h1 {
  font-family: var(--font-mark);
  font-weight: 400;
  font-size: clamp(1.15rem, 3.6vw, 1.85rem);
  line-height: 1.45;
  letter-spacing: 0;
  margin: 0;
  text-shadow: 0 0 18px var(--amber-glow);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: manual;
}

h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: var(--s4);
}

h3 {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
  margin-bottom: var(--s2);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 var(--s3);
}

.lede {
  font-size: 1.125rem;
  color: var(--text-dim);
}

.dim {
  color: var(--text-dim);
}

.faint {
  color: var(--text-faint);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  height: 64px;
}

.site-name {
  font-family: var(--font-mark);
  font-size: clamp(0.55rem, 2.1vw, 0.8rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  max-width: min(100%, 14rem);
  overflow-wrap: anywhere;
}

.site-name .tld {
  color: var(--amber);
}

.nav {
  display: flex;
  gap: var(--s4);
  align-items: center;
}

.nav a {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
  /* 44x44 hit area; the visible underline stays tight to the label */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--amber);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 12px 18px;
  color: var(--text);
  background: var(--ink-3);
  border: 1px solid;
  border-color: var(--line-hi) #000 #000 var(--line-hi);
  cursor: pointer;
}

.btn:hover {
  background: #22262d;
}

.btn:active {
  border-color: #000 var(--line-hi) var(--line-hi) #000;
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
  border-color: #ffd36b #7a5400 #7a5400 #ffd36b;
}

.btn-primary:hover {
  background: #ffbf33;
}

.btn-primary:active {
  border-color: #7a5400 #ffd36b #ffd36b #7a5400;
}

.btn[aria-disabled="true"] {
  background: var(--ink-2);
  color: var(--text-faint);
  border-color: var(--line);
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}

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

.hero {
  position: relative;
  padding: var(--s7) 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* The only scanlines on the site. Keep them barely there. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 4px
  );
}

/* Starfield canvas (assets/js/fx.js). Rendered at 1/3 resolution and scaled up
   with hard pixels. Dimmed behind the text column so copy stays readable. */
.hero > .wrap {
  position: relative;
  z-index: 1;
}

.fx-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 30%, #000 65%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 30%, #000 65%);
}

@media (max-width: 820px) {
  .fx-stars {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 0.45;
  }
}

/* First-visit boot strip (fx.js). Pointer-events none; fades itself out. */
.fx-boot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 var(--s4);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.fx-boot.is-on { opacity: 1; transform: none; }
.fx-boot.is-out { opacity: 0; transform: translateY(-6px); }
.fx-boot-cmd { color: var(--text); }
.fx-boot-status { color: var(--amber-dim); letter-spacing: 0.02em; }
@media (prefers-reduced-motion: reduce) {
  .fx-boot { display: none !important; }
}

.hero--home {
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
}

.prompt {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 0 0 var(--s4);
}

.prompt .cmd {
  color: var(--text);
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--amber);
  animation: blink 1.1s steps(1) infinite;
}

/* One-motion rule: no looping cursor blink while the starfield runs. */
.hero[data-stars] .cursor {
  animation: none;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero h1 {
  margin-bottom: var(--s4);
}

.hero .lede {
  max-width: 52ch;
}

/* ---------- Sections ---------- */

.section {
  padding: var(--s7) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s5);
}

.section-head h2 {
  margin: 0;
}

/* ---------- Window frame (Win95-ish bevel, but dark) ---------- */

.window {
  background: var(--ink-2);
  border: 1px solid;
  border-color: var(--line-hi) #000 #000 var(--line-hi);
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.titlebar .ctl {
  display: flex;
  gap: 4px;
}

.titlebar .ctl i {
  width: 6px;
  height: 6px;
  background: var(--line-hi);
}

.window.is-active .titlebar {
  color: var(--ink);
  background: var(--amber);
  border-bottom-color: var(--amber-dim);
}

.window.is-active .titlebar .ctl i {
  background: var(--ink);
}

.window-body {
  padding: var(--s4);
}

/* ---------- Tool cards ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--s4);
}

.tool-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.08s steps(2);
}

a.tool-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--amber-dim);
}

.tool-card .window-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tool-card h3 {
  font-size: 1.25rem;
  color: var(--text);
}

.tool-card p {
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.tool-card .go {
  margin-top: auto;
  padding-top: var(--s3);
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
}

.tool-card.is-empty {
  background: transparent;
  border: 1px dashed var(--line);
}

.tool-card.is-empty .titlebar {
  border-bottom-style: dashed;
  color: var(--text-faint);
}

.tool-card.is-empty h3,
.tool-card.is-empty p {
  color: var(--text-faint);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0 0 var(--s3);
  padding: 0;
  list-style: none;
}

.tags li {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 1px 8px;
}

/* ---------- Tool detail ---------- */

.tool-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s6);
  align-items: center;
}

@media (max-width: 820px) {
  .tool-hero {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }
}

.spec {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s2) var(--s4);
  font-size: 0.9375rem;
}

.spec dt {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  padding-top: 3px;
}

.spec dd {
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s5) var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding-left: var(--s4);
  position: relative;
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--amber);
}

.features p {
  color: var(--text-dim);
  margin: 0;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s4);
}

.shot {
  margin: 0;
}

.shot .frame {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--ink-3);
  border: 1px dashed var(--line-hi);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  padding: var(--s3);
}

.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.shot figcaption {
  margin-top: var(--s2);
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* ---------- Downloads / checksums ---------- */

.dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.dl-table th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  padding: 0 var(--s3) var(--s2) 0;
  border-bottom: 1px solid var(--line);
}

.dl-table td {
  padding: var(--s3) var(--s3) var(--s3) 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.hash {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
  color: var(--text-dim);
}

.pending {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.table-scroll {
  overflow-x: auto;
}

.codeblock {
  margin: var(--s3) 0 0;
  padding: var(--s3) var(--s4);
  background: #000;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  max-width: 100%;
  overflow-x: auto;
  /* wrap long commands/hashes instead of pushing the page sideways at 360px */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.codeblock .c {
  color: var(--text-faint);
}

.note {
  border-left: 2px solid var(--amber);
  padding: var(--s2) 0 var(--s2) var(--s4);
  margin: var(--s5) 0 0;
  max-width: var(--measure);
}

.note p:last-child {
  margin-bottom: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
}

@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }
}

/* ---------- Coffee strip ---------- */

.coffee {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.coffee p {
  margin: 0;
  color: var(--text-dim);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--s5) 0;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--amber);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s3);
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .nav {
    gap: var(--s3);
  }
  .nav .nav-coffee {
    display: none;
  }
  .hero,
  .section {
    padding: var(--s6) 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
  .tool-card {
    transition: none;
  }
}

/* ---------- Contact form ---------- */

.contact-form {
  position: relative;
  display: grid;
  gap: var(--s4);
  max-width: 68ch;
}

.contact-form .field {
  display: grid;
  gap: var(--s2);
}

.contact-form label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.contact-form .optional {
  color: var(--text-faint);
  text-transform: none;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem; /* 16px — stops iOS zoom-on-focus */
  line-height: 1.4;
  color: var(--text);
  background: var(--ink-2);
  border: 1px solid;
  border-color: #000 var(--line-hi) var(--line-hi) #000;
  border-radius: 0;
  padding: 14px 16px;
  min-height: 3rem;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--amber) 50%),
    linear-gradient(135deg, var(--amber) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 12rem;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 0;
  box-shadow: 0 0 0 4px var(--amber-glow);
}

.contact-form [aria-invalid="true"] {
  border-color: #E5484D;
}

.contact-form .hint,
.contact-form .form-status {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* Honeypot: never show (hidden attr + display none; Turnstile is the main gate) */
.contact-form .hp,
.contact-form .hp * {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Turnstile widget: spacing only, leave its chrome alone */
.contact-form .cf-turnstile { margin: 0.5rem 0 1rem; min-height: 65px; }

@media (max-width: 560px) {
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    padding: 16px;
    min-height: 3.25rem;
    font-size: 1.0625rem;
  }

  .contact-form textarea {
    min-height: 14rem;
  }

  .contact-form .btn-row .btn {
    width: 100%;
    min-height: 3.25rem;
  }
}

/* ---------- Foundations pass 2026-11-06 (a11y + mobile) ---------- */

/* Grid children default to min-width:auto, which lets a <pre> or long hash
   push the whole page wider than the viewport. */
.two-col > *,
.tool-hero > *,
.tool-grid > *,
.rel-grid > * {
  min-width: 0;
}

pre {
  max-width: 100%;
}

.hash,
code {
  overflow-wrap: anywhere;
}

.btn {
  min-height: 44px;
}

.site-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.skip:focus {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 560px) {
  .site-header .wrap {
    flex-wrap: wrap;
    height: auto;
    row-gap: 0;
    padding-top: var(--s2);
    padding-bottom: var(--s1);
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }
  .section-head {
    flex-wrap: wrap;
  }
}

/* ---------- Home: free software lab ---------- */

.brand-kicker {
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 var(--s3);
}

.brand-kicker .tld {
  color: var(--amber);
}

.hero .audience {
  color: var(--text-dim);
  max-width: 52ch;
}

/* ---------- Status badges + release metadata ---------- */

.status {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 8px;
  border: 1px solid var(--line-hi);
  color: var(--text-dim);
}

.status--stable {
  color: var(--amber);
  border-color: var(--amber-dim);
}

.status--beta,
.status--experimental {
  color: var(--text);
  border-style: dashed;
}

.rel-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rel-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2) var(--s4);
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}

.rel-list a {
  font-family: var(--font-display);
  font-size: 1.125rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.rel-list .meta {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 0;
}

.rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--s5);
}

.changelog {
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog li {
  padding: 0 0 var(--s3);
}

.changelog .ver {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--amber);
}

.plain-list {
  margin: 0 0 var(--s3);
  padding-left: 1.25em;
  max-width: var(--measure);
}

.plain-list li {
  margin-bottom: var(--s2);
  color: var(--text-dim);
}

ol.plain-list li::marker {
  font-family: var(--font-mono);
  color: var(--amber);
}

.trust {
  border: 1px solid var(--line);
  padding: var(--s3) var(--s4);
  max-width: var(--measure);
}

.trust p:last-child {
  margin-bottom: 0;
}

/* Reading pages (privacy, lab) */
.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: var(--s6);
}

.prose ul {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: var(--s2);
}

.section-head a.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  color: var(--amber);
  text-decoration: none;
}

/* ---------- Discovery (search / filters) ---------- */

.discover {
  margin-bottom: var(--s5);
  border: 1px solid;
  border-color: var(--line-hi) #000 #000 var(--line-hi);
  background: var(--ink-2);
}

.discover-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
  padding: var(--s3);
  border-bottom: 1px solid var(--line);
}

.discover-search {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.discover-search label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.discover-search input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--text);
  border: 1px solid var(--line-hi);
  border-radius: 0;
  font: inherit;
}

.discover-search input[type="search"]:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--amber-glow);
}

.discover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
  margin-left: auto;
}

.discover-meta [data-discovery-status] {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-dim);
}

.discover-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--s3);
  padding: var(--s3);
}

.discover-group {
  min-width: 0;
}

.discover-group legend {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 0;
  margin-bottom: var(--s2);
}

.discover-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.discover-chips label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.discover-chips label:has(input:focus-visible) {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.discover-chips label:has(input:checked) {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--amber-dim);
}

.discover-chips input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.discover-noscript {
  margin: 0;
  padding: var(--s3);
  color: var(--text-dim);
  font-size: 0.875rem;
  border-top: 1px solid var(--line);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--s4);
  margin-bottom: var(--s6);
}

.featured-card .window-body p.why {
  color: var(--text);
  margin-bottom: var(--s3);
}

.tool-card[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .discover-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .discover-meta {
    margin-left: 0;
  }
}

.btn-sm {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.75rem;
}

/* ---------- Foundations polish N-F1/N-F2 ---------- */

/* N-F2: inline body links ≥44px tall without turning prose into a button stack.
   Expand the hit box with symmetric padding + negative margin so line boxes stay tight. */
.prose a,
.lede a,
.plain-list a,
.trust a,
.changelog a,
.window-body p a,
.rel-grid a,
.section .dim a,
.coffee a:not(.btn) {
  display: inline-block;
  min-height: 44px;
  padding: 12px 0;
  margin: -12px 0;
  line-height: 1.6;
  vertical-align: baseline;
}

/* Keep code-style hash links usable without huge gaps in tables */
td a.hash,
td a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Russo / Press Start preview hierarchy ---------- */

.brand-kicker {
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
}

/* Keep tool-card titles on Russo (h3), not Press Start */
.tool-card h3,
.window-body h3 {
  font-family: var(--font-ui);
}

@media (max-width: 560px) {
  /* Press Start 2P: shrink mark + H1 further; allow header to wrap without sideways scroll */
  .site-name {
    font-size: 0.55rem;
    max-width: 42vw;
  }
  h1 {
    /* Mobile H1 slightly reduced for 360 wrap (Press Start 2P) */
    font-size: clamp(0.95rem, 4.5vw, 1.2rem);
    line-height: 1.5;
  }
  .hero--home h1 {
    /* home H1 has three short lines — keep each line wrapping inside the column */
    max-width: 100%;
  }
  .nav {
    gap: var(--s2);
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .nav a {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }
  .btn {
    font-size: 0.65rem;
    max-width: 100%;
    text-align: center;
    justify-content: center;
  }
  .btn-row {
    flex-wrap: wrap;
  }
}

