/* SideCue build log. Tokens, type and grid are shared with the landing page (site/assets/site.css); keep them in step. */
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

[data-theme="retro-dark"] {
  color-scheme: dark;
  --surface-base: #0E1116;
  --surface-1: #161B22;
  --surface-2: #1F2630;
  --surface-3: #2A3340;
  --content-primary: #E8EDF2;
  --content-secondary: #AAB4C0;
  --content-muted: #7D8795;
  --content-disabled: #55606D;
  --border-subtle: rgba(125,135,149,0.22);
  --border-default: rgba(125,135,149,0.38);
  --border-strong: #3A4452;
  --accent: #0F766E;
  --accent-hover: #14B8A6;
  --accent-fg: #F0FDFA;
  --status-critical-fg: #FAB2AC;
  --status-critical-bg: #3A0E0D;
  --chat-code: #1F2630;
  --lcd-frame: #0A0D11;
}
:root {
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scrollbar-color: var(--border-strong) var(--surface-base); }
body {
  background: var(--surface-base);
  color: var(--content-primary);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent-hover);
}
::selection { background: var(--accent); color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 6px; }
a { color: var(--accent-hover); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--content-primary); }
code, .mono { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--chat-code); padding: .08em .36em; border-radius: 4px; color: var(--content-primary); overflow-wrap: anywhere; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
.lede { color: var(--content-secondary); font-size: 19px; max-width: 62ch; }

/* ---- header (same as the landing page) ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--content-primary); text-decoration: none; }
.brand svg { flex: none; }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a { color: var(--content-secondary); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--content-primary); }
@media (max-width: 520px) { .top nav a:not([aria-current]) { display: none; } }

/* ---- intro ---- */
.intro { padding: 40px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 20px 64px; align-items: end; }
.intro h1 { font-size: clamp(44px, 8.2vw, 96px); line-height: .96; font-weight: 800; letter-spacing: -0.04em; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }

/* ---- where we are ---- */
.now { margin-top: 72px; padding: 28px 0 32px; border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 40px; align-items: baseline; }
.now-phase { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; font-weight: 700; }
.now-line { color: var(--content-secondary); font-size: 17px; grid-column: 1; }
.now-meta { color: var(--content-muted); font-size: 13px; grid-column: 2; grid-row: 1; justify-self: end; font-variant-numeric: tabular-nums; }
.now .strip { grid-column: 1 / -1; margin-top: 18px; }
@media (max-width: 720px) { .now { grid-template-columns: 1fr; } .now-meta { grid-column: 1; grid-row: auto; justify-self: start; } }

/* One cell per task in the phase: filled = merged. Square cells echo the device's 1-bit pixels. */
.strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.strip li { width: 18px; height: 18px; border-radius: 3px; border: 1px solid var(--border-strong); background: transparent; }
.strip li.on { background: var(--accent-hover); border-color: var(--accent-hover); }
.strip.small { gap: 2px; margin-top: 10px; max-width: 200px; }
.strip.small li { width: 8px; height: 8px; border-radius: 2px; }
.strip.small li.on { background: var(--content-secondary); border-color: var(--content-secondary); }
.log .entry:first-child .strip.small li.on { background: var(--accent-hover); border-color: var(--accent-hover); }

/* the page's one motion moment: the current phase fills in, cell by cell */
@media (prefers-reduced-motion: no-preference) {
  .now.animate .strip li.on { animation: fill .5s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 150ms); }
  @keyframes fill { from { background: transparent; border-color: var(--border-strong); transform: scale(.6); } }
}

/* ---- status: loading, empty, error ---- */
.status { margin-top: 56px; color: var(--content-secondary); max-width: 62ch; }
.status:empty { display: none; }
.status h2 { font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--content-primary); margin-bottom: 6px; }
.status.error { padding: 20px 22px; border-radius: 14px; background: var(--status-critical-bg); color: var(--status-critical-fg); }
.status.error h2 { color: var(--status-critical-fg); }

/* ---- timeline ---- */
.log { list-style: none; margin: 56px 0 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 12px; width: 1px; background: var(--border-strong); }
.log:empty::before { display: none; }
.entry { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px 40px; padding: 0 0 72px 30px; position: relative; }
.entry::before { content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface-base); border: 1px solid var(--border-strong); }
.entry:first-child::before { background: var(--accent-hover); border-color: var(--accent-hover); }
.entry:last-child { padding-bottom: 0; }
.meta { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.when { color: var(--content-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.phase { color: var(--content-secondary); font-size: 15px; font-weight: 500; }
.count { color: var(--content-muted); font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.title { font-size: 26px; line-height: 1.2; font-weight: 700; margin-bottom: 22px; max-width: 30ch; }
.secs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; }
.secs h4 { font-size: 16px; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; color: var(--content-primary); }
.txt { color: var(--content-secondary); font-size: 16px; line-height: 1.6; max-width: 68ch; }
.txt p + p, .txt p + ul, .txt ul + p { margin-top: .7em; }
.txt ul { margin: 0; padding-left: 18px; }
.txt li + li { margin-top: 4px; }
@media (max-width: 1080px) { .secs { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 860px) {
  .entry { grid-template-columns: 1fr; gap: 10px; padding-bottom: 56px; }
  .meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
  .strip.small { display: none; }
  .count { margin-top: 0; }
}

/* ---- screenshots: framed like the landing page's enlarged LCD, never cropped ---- */
.shots { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 32px; }
.shots:empty { display: none; }
.shot { margin: 0; max-width: 100%; }
.shot .frame { background: var(--lcd-frame); border-radius: 14px; padding: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.4); display: inline-block; max-width: 100%; }
.shot img { display: block; max-width: 100%; height: auto; }
.shot.pixel img { image-rendering: pixelated; image-rendering: crisp-edges; }
.shot figcaption { color: var(--content-muted); font-size: 13.5px; margin-top: 10px; max-width: 60ch; }
.noshot { margin-top: 26px; color: var(--content-muted); font-size: 14px; }
@media (max-width: 520px) { .shot .frame { padding: 10px; border-radius: 10px; } }

footer { margin-top: 120px; padding: 32px 0 56px; color: var(--content-muted); font-size: 13.5px; border-top: 1px solid var(--border-subtle); }
footer p { max-width: 80ch; }
footer p + p { margin-top: 10px; }
