/* ------------------------------------------------------------------
   dickgentry.com: the front page and the DoomFunnel holding page.

   The front page is the way in to everything (one page since 2026-11-12,
   Dick): every card and the terminal are here, in this system. Snake, PDX,
   Four Bars and Fractal Lab keep their own darker look (core.css, beside
   this file). Nothing here links core.css and none of them links this file.

   Tokens first. The page is dark by default and follows the OS to light;
   site.js lets the visitor pin either with html[data-theme]. Every colour
   is a token so a canvas can read it (see --contour in site.js).
   ------------------------------------------------------------------ */

:root {
  color-scheme: dark;
  --bg: #0c1014;
  --bg-2: #11161c;
  --panel: #141a21;
  --panel-2: #1a2129;
  --line: #1f272f;
  --line-2: #2c3640;
  --text: #e9edf1;
  --muted: #98a4b0;
  --dim: #5d6975;
  --accent: #f1b35b;
  --accent-ink: #1a1206;
  --accent-soft: rgba(241, 179, 91, .14);
  --contour: 150, 168, 186;       /* rgb triplet: contour lines on the field */
  --contour-hot: 241, 179, 91;    /* the lines near the pointer */
  --err: #f0837a;                 /* terminal errors only */
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);

  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --top-h: 64px;
  --r: 16px;
  --term-w: min(440px, calc(100vw - 46px));   /* the drawer; the 46px keeps its tab on screen */
}

/* Light theme: the OS asks for it and the visitor has not pinned dark,
   or the visitor pinned light. Both blocks must say the same thing. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f3ee;
    --bg-2: #ece9e2;
    --panel: #fffdf9;
    --panel-2: #f3f0e9;
    --line: #e2ddd3;
    --line-2: #cfc8bb;
    --text: #181c21;
    --muted: #5d6670;
    --dim: #9aa3ab;
    --accent: #96500f;      /* 5.0:1 or better on every light surface; #b8661a read nicer but failed text contrast */
    --accent-ink: #fff8ee;
    --accent-soft: rgba(150, 80, 15, .12);
    --contour: 92, 104, 116;
    --contour-hot: 150, 80, 15;
    --err: #b3261e;
    --shadow: 0 24px 60px rgba(40, 30, 10, .14);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3ee;
  --bg-2: #ece9e2;
  --panel: #fffdf9;
  --panel-2: #f3f0e9;
  --line: #e2ddd3;
  --line-2: #cfc8bb;
  --text: #181c21;
  --muted: #5d6670;
  --dim: #9aa3ab;
  --accent: #96500f;      /* 5.0:1 or better on every light surface; #b8661a read nicer but failed text contrast */
  --accent-ink: #fff8ee;
  --accent-soft: rgba(150, 80, 15, .12);
  --contour: 92, 104, 116;
  --contour-hot: 150, 80, 15;
  --err: #b3261e;
  --shadow: 0 24px 60px rgba(40, 30, 10, .14);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-h) + 12px);
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- The field ----------
   One fixed canvas behind everything. site.js draws the contour map on it
   and fades it under the content; the page reads fine without it. */
.field {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* Keeps text legible where lines run under it: a soft pool of page colour. */
.field-fade {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 40%, var(--bg) 0%, transparent 100%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  opacity: .78;
}

/* The painted page (body.painted, paint.js): the veil sits on the left on a
   wide screen, where the banner's words are, and leaves the right to the
   paint. Cards are opaque, so only the banner and Say hello need it. On a narrow screen
   the words span the page, so the veil is even and the paint is quieter. */
.painted .field-fade {
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 40%, transparent 70%);
  opacity: .9;
}
@media (max-width: 900px) {
  .painted .field-fade { background: var(--bg); opacity: .62; }
}

/* ---------- Mono label voice ---------- */
.kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 0 0 20px;
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.kicker b { font-weight: 500; color: var(--text); }
.kicker .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.kicker .live {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text);
}
.kicker .live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--top-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .top { background: var(--bg); border-bottom-color: var(--line); }
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -.02em; font-size: 17px;
}
.wordmark i {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font: 800 12px/1 var(--font-mono); font-style: normal; letter-spacing: 0;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.wordmark:hover i { transform: rotate(-8deg) scale(1.06); }
.wordmark em { font-style: normal; color: var(--muted); font-weight: 500; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 9px 12px; border-radius: 999px;
  font: 500 13.5px/1 var(--font-sans);
  color: var(--muted);
  transition: color .15s, background .15s;
}
.nav a:hover, .nav a.active, .nav a[aria-current] { color: var(--text); background: var(--bg-2); }
/* --muted, not --dim: the numbers are read, and --dim is below 4.5:1 on both themes. */
.nav a span { display: inline-block; margin-right: 7px; font: 500 10px/1 var(--font-mono); color: var(--muted); letter-spacing: .08em; }

.theme {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-left: 6px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--panel); color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, transform .15s;
}
.theme:hover { color: var(--text); border-color: var(--muted); transform: rotate(15deg); }
.theme svg { width: 16px; height: 16px; }
.theme .sun { display: none; }
:root[data-theme="light"] .theme .sun { display: block; }
:root[data-theme="light"] .theme .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme .sun { display: block; }
  :root:not([data-theme]) .theme .moon { display: none; }
}

/* ---------- Layout ---------- */
main { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Banner ----------
   The top of the front page is one line and nothing else (Dick,
   2026-11-12): no top bar, no blurb. Keep it short so the first row of cards
   shows on load. The holding page still has a top bar (.top) and its own
   hero (.hold). */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: clamp(22px, 4.5vh, 48px);
  padding-bottom: clamp(18px, 3.5vh, 36px);
}
.banner .theme { flex: none; width: 42px; height: 42px; margin-left: 0; }
.banner .theme svg { width: 19px; height: 19px; }
.title {
  font-size: clamp(2.5rem, 7.2vw, 5.6rem);
  font-weight: 800; line-height: .95; letter-spacing: -.045em;
  margin: 0 0 0 -.04em;
}
.title span { display: inline-block; white-space: pre; }
.title .alt { color: var(--muted); }
.lede {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.45; font-weight: 500;
  color: var(--muted);
  margin-bottom: 24px;
}
.lede b { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Things that only work with JS (the terminal's buttons). */
html:not(.js) .js-only { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 14.5px/1 var(--font-sans);
  border: 1px solid transparent;
  /* --mx/--my are written by site.js for the magnetic pull. */
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), background .15s, box-shadow .2s;
  box-shadow: 0 10px 30px -12px var(--accent);
  cursor: pointer;
}
.btn i { font-style: normal; transition: transform .2s; }
.btn:hover { box-shadow: 0 16px 36px -12px var(--accent); }
.btn:hover i { transform: translateX(4px); }
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
}
.btn--ghost:hover { border-color: var(--muted); background: var(--bg-2); box-shadow: none; }
button.btn { font-family: inherit; }

/* ---------- Tiles: everything there is to open ----------
   A six-column grid with four tile shapes, so the page is not a stack of
   identical bars (Dick, 2026-11-12):
     plain    two columns, picture on top
     feature  four columns and two rows, a big picture (PDX)
     split    three columns, picture beside the text (--flip puts it right)
     slim     three columns, a short row with a small picture
     wide     the whole row, a long picture beside the text (Paintbox)
   Row by row at full width: feature + two plain / two split / three plain /
   one wide / two slim. A tile with extra content (PokerDex's installer) goes in a split,
   or it stretches its whole row. Under 1000px it is two columns, under 640px one. */
.work { padding-bottom: clamp(56px, 8vw, 96px); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.section-head .kicker { margin: 0; }

.tiles {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px;
  perspective: 1800px;
}
.tile {
  position: relative; grid-column: span 2;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  overflow: hidden;
  /* rx/ry written by site.js on pointermove; reset on leave. */
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease-out, border-color .2s, box-shadow .25s;
  scroll-margin-top: calc(var(--top-h) + 16px);
}
.tile:hover, .tile:focus-within { border-color: var(--line-2); box-shadow: var(--shadow); }
/* The whole tile is the link: the title's anchor stretches over it. */
.tile-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.tile-link:focus-visible { outline: none; }
.tile:has(.tile-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.tile-art {
  position: relative; flex: none;
  height: 150px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.tile-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tile-body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 22px; min-width: 0; }
.tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin: 0 0 10px;
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.tile h3 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; transition: color .15s; }
.tile:hover h3 { color: var(--accent); }
.tile-body > p:not(.tags) { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 16px; flex: 1; }
.tile-go {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--font-sans);
  color: var(--text);
}
.tile-go i { font-style: normal; color: var(--accent); transition: transform .2s; }
.tile:hover .tile-go i { transform: translateX(5px); }
.tile-glare {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), var(--accent-soft), transparent 65%);
  opacity: 0; transition: opacity .25s;
}
.tile:hover .tile-glare { opacity: 1; }

.tile--feature { grid-column: span 4; grid-row: span 2; }
.tile--feature .tile-art { flex: 1; height: auto; min-height: 280px; }
.tile--feature .tile-body { flex: none; padding: 22px 26px 26px; }
.tile--feature h3 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; }
.tile--feature .tile-body > p:not(.tags) { font-size: 16px; max-width: 60ch; }

.tile--split { grid-column: span 3; flex-direction: row; }
.tile--split .tile-art { width: 42%; height: auto; min-height: 220px; border-bottom: 0; border-right: 1px solid var(--line); }
.tile--split.tile--flip { flex-direction: row-reverse; }
.tile--split.tile--flip .tile-art { border-right: 0; border-left: 1px solid var(--line); }

.tile--wide { grid-column: 1 / -1; flex-direction: row; }
.tile--wide .tile-art { width: 56%; height: auto; min-height: 210px; border-bottom: 0; border-right: 1px solid var(--line); }
.tile--wide .tile-body { justify-content: center; padding: 22px 26px 24px; }
.tile--wide .tile-body > p:not(.tags) { flex: none; }

.tile--slim { grid-column: span 3; flex-direction: row; }
.tile--slim .tile-art { width: 132px; height: auto; border-bottom: 0; border-right: 1px solid var(--line); }
.tile--slim .tile-body { padding: 16px 20px 18px; }
.tile--slim h3 { font-size: 19px; margin-bottom: 6px; }
.tile--slim .tile-body > p:not(.tags) { font-size: 14.5px; margin-bottom: 12px; }

/* A second link under the main one (PokerDex's installer). The whole tile is
   still the main link (.tile-link::after, z-index 1); this sits above that
   layer so its own link can be hit. */
.tile-more {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.tile-more a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font: 600 13px/1 var(--font-sans); color: var(--text);
  transition: border-color .15s, color .15s;
}
.tile-more a:hover, .tile-more a:focus-visible { border-color: var(--accent); color: var(--accent); }
.tile-more a i { font-style: normal; color: var(--accent); }
.tile-more small { flex: 1 1 100%; color: var(--muted); font: 500 11.5px/1.5 var(--font-mono); }

.tile--soon, .tile--sealed { border-style: dashed; }
.tile--soon .tile-go, .tile--sealed .tile-go { color: var(--muted); }
.tile--sealed .tile-art canvas { image-rendering: pixelated; }
.unsealed .tile--sealed { border-style: solid; border-color: var(--accent); }
.unsealed .tile--sealed .tile-go { color: var(--text); }
/* The terminal's `play` lands on a tile and flashes it; a click on the
   sealed one while it is locked shakes it. */
.tile.flash { animation: tile-flash .5s ease-in-out 3; }
@keyframes tile-flash { 50% { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } }
.tile.shake { animation: tile-shake .36s linear; }
@keyframes tile-shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
/* The terminal's `glitch` command. */
body.page-glitch main { animation: page-glitch .5s steps(1); }
@keyframes page-glitch {
  0% { transform: translate(6px, -2px) skewX(2deg); filter: hue-rotate(60deg); }
  25% { transform: translate(-8px, 3px) skewX(-3deg); filter: invert(.15); }
  50% { transform: translate(4px, 1px); filter: hue-rotate(-40deg) saturate(2); }
  75% { transform: translate(-3px, -2px) skewX(1deg); filter: none; }
  100% { transform: none; filter: none; }
}

.badge {
  display: inline-block; padding: 5px 9px; border-radius: 999px;
  font: 600 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
}

/* ---------- Contact ---------- */
.contact {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.contact-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.contact h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.contact h2 small { display: block; margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  font: 600 13.5px/1 var(--font-sans);
  color: var(--text);
  transition: border-color .15s, background .15s, transform .15s;
}
.chip svg { width: 15px; height: 15px; color: var(--muted); transition: color .15s; }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.chip:hover svg { color: var(--accent); }

/* ---------- Footer ---------- */
.foot {
  position: relative; z-index: 1;
  padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.foot-row {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font: 500 11.5px/1.6 var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.foot-row nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.foot-row a:hover { color: var(--accent); }

/* ---------- Reveal on scroll ----------
   Gated on html.js (set by an inline script in <head>): with JS off nothing
   is hidden. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .tile.reveal.in { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: opacity .6s ease, transform .2s ease-out, border-color .2s, box-shadow .25s; }
.tiles .reveal:nth-child(3n+2) { transition-delay: .06s; }
.tiles .reveal:nth-child(3n) { transition-delay: .12s; }

/* ---------- Terminal drawer ----------
   Slides in from the right edge over the page (it does not push it). The
   tab rides on the drawer's left edge, so it is both the way in and the way
   out, and stays on screen on a phone. Shut, the drawer is off-screen,
   visibility: hidden and inert (site.js), so nothing in it can be tabbed to. */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30;
  width: var(--term-w);
  display: flex; flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font: 500 13.5px/1.6 var(--font-mono);
  transform: translateX(100%); visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s;
}
.term-open .drawer { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.term-tab {
  position: fixed; top: 50%; right: 0; z-index: 31;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 9px;
  writing-mode: vertical-rl;
  border: 1px solid var(--line-2); border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--panel); color: var(--muted);
  font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), color .15s, background .15s, padding .15s;
}
.term-tab b { color: var(--accent); font-weight: 700; letter-spacing: 0; }
.term-tab:hover { color: var(--text); background: var(--panel-2); padding-right: 14px; }
.term-open .term-tab { transform: translate(calc(-1 * var(--term-w)), -50%); color: var(--text); }
.term-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--top-h); padding: 0 12px 0 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.term-close {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: none; color: var(--muted); cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.term-close b { font-size: 15px; line-height: .8; }
.term-close:hover { color: var(--text); border-color: var(--muted); }
.term-out { flex: 1; overflow-y: auto; padding: 16px 18px 8px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.term-out .t-cmd { color: var(--text); }
.term-out .t-p, .term-in .prompt { color: var(--accent); }
.term-out .t-hi { color: var(--text); }
.term-out .t-ok { color: var(--accent); }
.term-out .t-err { color: var(--err); }
.term-in {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 12px 18px 18px; border-top: 1px solid var(--line);
}
.term-in .prompt { flex: none; white-space: nowrap; }
.term-in input {
  flex: 1; min-width: 0; padding: 4px 0;
  background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; caret-color: var(--accent);
}
/* While sudo waits for the passphrase the typing is not shown. */
.term-in.secret input { color: transparent; text-shadow: none; }

/* ---------- Blog index ---------- */
.page-head { padding-top: clamp(48px, 9vh, 96px); padding-bottom: clamp(28px, 4vw, 44px); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -.04em; margin-bottom: 18px; }
.page-head .lede { margin-bottom: 0; }

.posts { list-style: none; margin: 0 0 clamp(56px, 8vw, 96px); padding: 0; border-top: 1px solid var(--line); }
.post-row {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) auto;
  align-items: baseline; gap: 8px 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.post-row time { font: 500 12px/1.6 var(--font-mono); letter-spacing: .08em; color: var(--muted); }
.post-row h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); letter-spacing: -.025em; margin-bottom: 8px; transition: color .15s; }
.post-row p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; max-width: 620px; }
.post-row .tag { align-self: start; }
.post-row:hover h2 { color: var(--accent); }
.tag {
  display: inline-block; padding: 5px 9px; border-radius: 999px;
  font: 600 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-2);
}

/* ---------- Post ---------- */
.post {
  max-width: calc(720px + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 80px) var(--gutter) 0;
}
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-bottom: 22px;
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.post-meta .idx { color: var(--accent); }
.post h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); letter-spacing: -.04em; line-height: .98; margin-bottom: 22px; }
.post-dek { font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.35; font-weight: 500; color: var(--text); margin-bottom: 16px; }
.post-by {
  padding-bottom: 26px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font: 500 12px/1.6 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.post-body { font-size: 18px; line-height: 1.72; }
.post-body p { margin: 0 0 1.25em; }
.post-body h2 {
  margin: 2.2em 0 .7em;
  font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.15;
}
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.post-body a:hover { text-decoration-color: var(--accent); }
.post-body code {
  font: 500 .86em var(--font-mono);
  padding: 2px 6px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line);
}

/* Numbered roster: index and name in the mono voice, one line of body each.
   Markup is <dl class="post-roster"><div><dt><span>02</span>Name</dt><dd>..</dd></div>. */
.post-roster { margin: 0 0 1.6em; border-top: 1px solid var(--line); }
.post-roster div {
  display: grid; grid-template-columns: 170px 1fr; gap: 4px 18px; align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.post-roster dt { font: 600 13px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.post-roster dt span { display: inline-block; width: 34px; color: var(--accent); }
.post-roster dd { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 560px) { .post-roster div { grid-template-columns: 1fr; } }

/* The thing the post is about, playable from the page. */
.play-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  margin: 2.4em 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  transition: border-color .15s, box-shadow .2s, transform .2s;
}
.play-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.play-id {
  padding: 8px 10px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 11px/1 var(--font-mono); letter-spacing: .1em;
}
.play-card b { display: block; font-size: 18px; letter-spacing: -.01em; }
.play-card small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.play-card i { font-style: normal; color: var(--accent); font-size: 20px; transition: transform .2s; }
.play-card:hover i { transform: translateX(5px); }

.post-foot {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: clamp(40px, 7vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- Holding page ---------- */
.hold { min-height: calc(100svh - var(--top-h)); display: flex; align-items: center; padding-top: 60px; padding-bottom: 60px; }
.hold h1 { font-size: clamp(2.6rem, 8vw, 6rem); letter-spacing: -.045em; margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { grid-column: span 1; }
  .tile--feature, .tile--split, .tile--sealed { grid-column: span 2; grid-row: auto; }
  .tile--feature .tile-art { min-height: 240px; }
  .tile--soon { flex-direction: column; }
  .tile--soon .tile-art { width: auto; height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile--feature, .tile--split, .tile--sealed { grid-column: auto; }
  .tile--split, .tile--split.tile--flip, .tile--wide { flex-direction: column; }
  .tile--split .tile-art, .tile--split.tile--flip .tile-art, .tile--wide .tile-art { width: auto; height: 150px; min-height: 0; border: 0; border-bottom: 1px solid var(--line); }
  .tile--feature .tile-art { min-height: 200px; }
  .term-tab span { display: none; }
  .term-tab { padding: 14px 8px; }
}
@media (max-width: 860px) {
  .post-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .post-row .tag { grid-row: 1; justify-self: start; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .top { gap: 10px; }
  .wordmark em { display: none; }
  .nav a { padding: 8px 9px; font-size: 13px; }
  .nav a span { display: none; }
  .nav a[data-hide-narrow] { display: none; }
  .post-body { font-size: 17px; }
  .play-card { grid-template-columns: auto minmax(0, 1fr); }
  .play-card i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tile { transform: none; }
}
