/* Kuenta — one stylesheet for every page.
   Tokens from docs/design-system.html. Four theme blocks, the project's pattern:
   bare :root, the system preference, and both data-theme overrides. */

:root {
  --ground: #f3f4f0; --surface: #fcfcfa; --surface-2: #eceee7;
  --ink: #1f2420; --ink-soft: #565c55;
  --line: #dee0d8; --line-soft: #e8e9e2;
  --accent: #2f6b57; --accent-ink: #24503f; --accent-tint: #e2ece6;
  --intervention: #b4703a;
  --on-accent: #ffffff;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Cascadia Code", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141712; --surface: #1d211a; --surface-2: #23281f;
    --ink: #ecede6; --ink-soft: #a8ad9f;
    --line: #2c312a; --line-soft: #262b23;
    --accent: #7fb79e; --accent-ink: #a7d2c0; --accent-tint: #22332c;
    --intervention: #d69a66;
    --on-accent: #141712;
  }
}
:root[data-theme="light"] {
  --ground: #f3f4f0; --surface: #fcfcfa; --surface-2: #eceee7;
  --ink: #1f2420; --ink-soft: #565c55;
  --line: #dee0d8; --line-soft: #e8e9e2;
  --accent: #2f6b57; --accent-ink: #24503f; --accent-tint: #e2ece6;
  --intervention: #b4703a;
  --on-accent: #ffffff;
}
:root[data-theme="dark"] {
  --ground: #141712; --surface: #1d211a; --surface-2: #23281f;
  --ink: #ecede6; --ink-soft: #a8ad9f;
  --line: #2c312a; --line-soft: #262b23;
  --accent: #7fb79e; --accent-ink: #a7d2c0; --accent-tint: #22332c;
  --intervention: #d69a66;
  --on-accent: #141712;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; line-height: 1.14; }
h1 { font-size: clamp(28px, 6vw, 40px); margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(21px, 3.4vw, 26px); margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0; max-width: 60ch; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* masthead — the mark is 24px, above the 20px floor below which the ghost frame is lost */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lockup img { width: 26px; height: 24px; display: block; }
.lockup .wordmark { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.lockup .dot { color: var(--accent); font-size: 0.4em; padding-left: 0.17em; }
.masthead nav { display: flex; gap: 16px; font-size: 14.5px; }

section { padding: 34px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }
.hero { padding: 18px 0 40px; }
.hero p.sub { font-size: clamp(17px, 2.4vw, 19px); color: var(--ink-soft); margin: 16px 0 0; max-width: 46ch; }

.stack { display: flex; flex-direction: column; gap: 22px; }
.stack.tight { gap: 12px; }

.steps { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; list-style: none; }
.steps p { font-size: 15.5px; color: var(--ink-soft); margin-top: 4px; }

/* two frames, equal weight — no fade, no tilt, neither side favoured.
   The plate art is deliberately non-photographic: alignment brackets, a
   registration grid, and contour rings. Never skin, never hair, never a
   fabricated screenshot. The two differ in shape, not in size or sharpness —
   a pair of frames says time passed, not that anything got better. */
.frames { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; max-width: 420px; }
/* The art is in plate-a.svg / plate-b.svg, referenced rather than inlined:
   each file carries its own colours and its own dark-mode block, the way
   icon.svg does. Class-styling shapes inside a <symbol> does not reliably
   reach <use> shadow content, which is how they came out solid black. */
.plate {
  display: block; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frames .when { font-size: 13px; color: var(--ink-soft); margin-top: 9px; font-variant-numeric: tabular-nums; }

/* the timeline, at the size the page is actually about */
.timeline { margin-top: 34px; }
.timeline svg { display: block; width: 100%; height: auto; }
.timeline .rail { stroke: var(--line); stroke-width: 2; }
.timeline .node { fill: var(--accent); }
.timeline .did { fill: var(--intervention); }
.timeline .thumb { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.timeline .tick { stroke: var(--line-soft); stroke-width: 1; }
.timeline .leader { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.timeline text { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; fill: var(--ink-soft); }
.timeline text.strong { fill: var(--ink); }

.node { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; }
.node.did { border-radius: 2px; background: var(--intervention); transform: rotate(45deg); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }

/* the card people share */
.cardart { max-width: 400px; margin-top: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cardart .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cardart .row .plate { border-radius: 6px; }
.cardart .dates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; text-align: center; }
.cardart .dates span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; color: var(--ink-soft); }
.cardart .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.cardart .span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--ink-soft); }
.cardart .mini { display: inline-flex; align-items: center; gap: 6px; }
.cardart .mini img { width: 22px; height: 20px; display: block; }
.cardart .mini b { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ink); }
.cardart .mini i { color: var(--accent); font-size: 6px; font-style: normal; }

.cta {
  display: inline-block; margin-top: 26px; padding: 12px 22px; border-radius: 11px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px;
  text-decoration: none;
}
.cta:hover { color: var(--on-accent); }
.cta.quiet { background: transparent; color: var(--accent-ink); border: 1px solid var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 17px 19px; }
.card p { font-size: 15px; color: var(--ink-soft); }
.card p + p { margin-top: 10px; }

dl { margin: 0; }
dt { font-weight: 600; margin-top: 20px; }
dt:first-child { margin-top: 0; }
dd { margin: 5px 0 0; color: var(--ink-soft); font-size: 15.5px; max-width: 60ch; }
dl + p { margin-top: 22px; }

.foot { padding: 26px 0 56px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; display: flex; flex-wrap: wrap; gap: 16px; }
.foot .said { font-family: var(--font-mono); font-size: 12px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .frames { grid-template-columns: 1fr; max-width: 240px; }
}
