@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }

/* Layout: one column of numbered stages; each stage is a wrapping row of phone screens read left to right. */
:root {
  --bg: #f1efe9;
  --surface: #fbfaf7;
  --fg: #22211e;
  --muted: #625e55;
  --line: #d6d1c5;
  --accent: #7a5a12;
  --frame: #2b2924;
  --display: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a17; --surface: #25231f; --fg: #eeeae0; --muted: #aaa497;
    --line: #3d3a33; --accent: #d9b55c; --frame: #57534a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a17; --surface: #25231f; --fg: #eeeae0; --muted: #aaa497;
  --line: #3d3a33; --accent: #d9b55c; --frame: #57534a; color-scheme: dark;
}
body {
  background: var(--bg); color: var(--fg); font-family: var(--body);
  font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 32px 64px;
}
.wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
header h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 44px); line-height: 1.05; margin: 0 0 12px; text-wrap: balance; }
header p { margin: 0; max-width: 65ch; color: var(--muted); }
.meta { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav a { color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
nav a:hover, nav a:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
section { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; scroll-margin-top: 12px; }
section h2 { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 0; }
section > p { margin: 0; color: var(--muted); max-width: 65ch; }
.row { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 24px 18px; }
figure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
figure button { all: unset; cursor: zoom-in; display: block; border-radius: 16px; border: 3px solid var(--frame); overflow: hidden; background: var(--surface); aspect-ratio: 720 / 1560; }
figure button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
figcaption { display: flex; flex-direction: column; gap: 2px; }
.num { font-family: var(--mono); font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.title { font-weight: 600; font-size: 14px; }
.how { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.notes h2 { font-size: 18px; }
.notes ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); max-width: 70ch; }
.notes li + li { margin-top: 4px; }
dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog::backdrop { background: rgba(10, 9, 7, .82); }
.view { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.view img { max-height: 82vh; width: auto; max-width: 92vw; border-radius: 18px; border: 3px solid #57534a; }
.view .bar { display: flex; align-items: center; gap: 10px; color: #f1efe9; font-size: 14px; }
.view button { font: inherit; color: #f1efe9; background: #3a372f; border: 1px solid #6b665a; border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.view button:focus-visible { outline: 2px solid #d9b55c; }
.view .cap { min-width: 0; text-align: center; flex: 1; }
.intro { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.intro div { min-width: 0; }
.intro b { display: block; margin-bottom: 4px; }
.intro span { color: var(--muted); font-size: 14px; }
section h2 .c { font-family: var(--mono); color: var(--accent); font-size: 15px; font-weight: 400; margin-right: 8px; }
.do { font-size: 13px; line-height: 1.4; }
.note { font-size: 12px; color: var(--muted); line-height: 1.4; border-left: 2px solid var(--line); padding-left: 8px; }
.ask { background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 18px; max-width: 70ch; }
.ask b { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.ask ul { margin: 0; padding-left: 18px; }
.ask li + li { margin-top: 4px; }

#stages { display: flex; flex-direction: column; gap: 40px; }
.pdf { color: var(--accent); }
