/* ===========================================================
   zed.ing — shared stylesheet
   Tokens first, components second. Every color comes from a
   token so both themes resolve as a set. See CLAUDE.md.
   =========================================================== */

:root {
  /* light palette */
  --ground: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --ink: #18201e;
  --ink-2: #3c4b47;
  --muted: #66756f;
  --line: #d9e0dc;
  --line-strong: #b9c5c0;
  --accent: #0e5b51;
  --accent-ink: #0e5b51;
  --accent-soft: #e0edea;
  --warn: #8a5312;
  --warn-soft: #f6ecdd;
  --stop: #8c2f24;
  --stop-soft: #f7e6e3;
  --shadow: 0 1px 2px rgba(24, 32, 30, .05), 0 8px 24px -16px rgba(24, 32, 30, .28);

  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101413;
    --surface: #191f1d;
    --surface-2: #212927;
    --ink: #e8edeb;
    --ink-2: #c2cdc9;
    --muted: #93a19c;
    --line: #2b3634;
    --line-strong: #3d4a47;
    --accent: #5cc3b1;
    --accent-ink: #7fd4c4;
    --accent-soft: #16302c;
    --warn: #d9a64f;
    --warn-soft: #2d2416;
    --stop: #e08b7d;
    --stop-soft: #33201d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #101413;
  --surface: #191f1d;
  --surface-2: #212927;
  --ink: #e8edeb;
  --ink-2: #c2cdc9;
  --muted: #93a19c;
  --line: #2b3634;
  --line-strong: #3d4a47;
  --accent: #5cc3b1;
  --accent-ink: #7fd4c4;
  --accent-soft: #16302c;
  --warn: #d9a64f;
  --warn-soft: #2d2416;
  --stop: #e08b7d;
  --stop-soft: #33201d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

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

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

img { max-width: 100%; height: auto; }

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

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------- site header (nav lives here as the site grows) ---------- */

.sitebar {
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  align-items: baseline;
  gap: 22px;
  font-family: var(--sans);
  font-size: 13.5px;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent-ink); }

.sitenav { display: flex; gap: 18px; margin-left: auto; }
.sitenav a { color: var(--muted); text-decoration: none; }
.sitenav a:hover, .sitenav a[aria-current="page"] { color: var(--accent-ink); }

/* ---------- masthead ---------- */

.masthead {
  padding-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 28px;
}

.masthead h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}

.standfirst { margin: 0; font-size: 19px; color: var(--ink-2); max-width: 62ch; }

.subject {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.progress {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 13px;
  align-self: flex-start;
  font-variant-numeric: tabular-nums;
}

/* ---------- sections ---------- */

section { display: flex; flex-direction: column; gap: 18px; }

h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; max-width: 66ch; }
.lede { color: var(--ink-2); }

blockquote.rule {
  margin: 0;
  padding: 18px 22px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  box-shadow: var(--shadow);
  font-size: 18px;
}
blockquote.rule cite {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- ordered process ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.steps li {
  background: var(--surface);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 12px;
  align-items: baseline;
}
.steps .stepno { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.steps .steptitle { font-family: var(--sans); font-weight: 600; font-size: 16px; }
.steps .stepbody { grid-column: 2; color: var(--ink-2); font-size: 16px; }

/* ---------- record cards ---------- */

.cards { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-head { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; }

.check {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-2);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background .12s ease, border-color .12s ease;
}
.check::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--surface);
  border-bottom: 2px solid var(--surface);
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { opacity: 1; }
.check:hover { border-color: var(--accent); }

.card-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
  margin: 0;
  line-height: 1.28;
}
.card-title .idx { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 8px; }

.tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }

.pill {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.pill.s-top { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.s-mid { background: var(--surface-2); color: var(--ink-2); }
.pill.s-sup { background: transparent; color: var(--muted); }
.pill.cost { background: transparent; color: var(--muted); font-family: var(--mono); text-transform: none; letter-spacing: 0; }

.card p { font-size: 16.5px; }

.contact {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  background: var(--surface-2);
  border-radius: 7px;
  padding: 13px 16px;
  overflow-x: auto;
}
.contact .who {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.contact + .contact { margin-top: -4px; }

.ask {
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 16px;
  font-style: italic;
  color: var(--ink-2);
  font-size: 16.5px;
  max-width: 66ch;
}
.ask::before {
  content: "Ask for";
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.note { font-family: var(--sans); font-size: 14.5px; color: var(--muted); max-width: 66ch; }
.note strong { color: var(--ink-2); font-weight: 600; }

/* ---------- callouts ---------- */

.callout { border-radius: 10px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.callout h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; margin: 0; }
.callout p { font-size: 16.5px; }
.callout.warn { background: var(--warn-soft); border: 1px solid var(--warn); }
.callout.warn h3 { color: var(--warn); }
.callout.stop { background: var(--stop-soft); border: 1px solid var(--stop); }
.callout.stop h3 { color: var(--stop); }

/* ---------- tables ---------- */

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 16px; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody tr:last-child td { border-bottom: none; }
td:first-child { font-family: var(--sans); font-weight: 600; font-size: 15.5px; white-space: nowrap; }

/* ---------- footer ---------- */

.pagefoot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
}
.pagefoot p { max-width: 70ch; font-family: var(--sans); }
.srcs { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- 404 ---------- */

.oops { padding-top: 96px; display: flex; flex-direction: column; gap: 16px; }
.oops h1 { font-family: var(--sans); font-size: 40px; margin: 0; letter-spacing: -.025em; }
.oops .code { font-family: var(--mono); color: var(--accent-ink); font-size: 13px; }

/* ---------- responsive & print ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px 72px; gap: 36px; }
  .sitebar { padding: 18px 18px 0; }
  .masthead { padding-top: 32px; }
  .steps li { grid-template-columns: 28px 1fr; }
}

@media print {
  body { background: #fff; }
  .card, .contact, .steps li { box-shadow: none; }
  .progress, .sitebar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
