/* ProdMint v2 screens (C-77) — CompCode beat tokens from the site repo (css/beat.css). */
:root {
  --ground: #F4F0E8;
  --paper: #F7F4EF;
  --paper-2: #EFEAE1;
  --ink: #16150F;
  --ink-2: #3F3B32;
  --muted: #7A7367;
  --rule: #DFDAD1;
  --rule-2: #C6BFB2;
  --thread: #1C4B7C;
  --thread-deep: #12355A;
  --thread-soft: rgba(28, 75, 124, 0.14);
  --bronze: #8A6420;
  --plate: #14130E;
  --hdr-veil: rgba(247, 244, 239, 0.94);
  --field: #fff;
  --on-ink: #F7F4EF;
  --err: #9B1C1C;
  --err-bg: #FDECEC;
  --ok: #2F6F5E;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gut: clamp(16px, 4vw, 40px);
  --max: 920px;
  --ease: cubic-bezier(0.22, 0.71, 0.16, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font: 16px/1.55 var(--ui);
}
a { color: var(--thread); text-underline-offset: 2px; }
a:hover { color: var(--thread-deep); }
img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
}
.skip:focus {
  left: var(--gut); top: 12px; z-index: 50;
  background: var(--ink); color: var(--on-ink);
  padding: 8px 12px; text-decoration: none;
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px var(--gut);
  border-bottom: 1px solid var(--rule);
  background: var(--hdr-veil);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.mark {
  font-family: var(--display);
  font-size: 1.2rem; color: var(--ink);
  text-decoration: none; letter-spacing: -0.02em;
}
.mark span { color: var(--thread); }
.top nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.9rem; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) 64px; }

.hero {
  padding: clamp(28px, 6vw, 56px) 0 clamp(20px, 4vw, 36px);
  border-bottom: 1px solid var(--rule);
}
.hero__brand {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bronze); margin: 0 0 12px;
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(1.7rem, 5.2vw, 2.6rem); line-height: 1.12;
  letter-spacing: -0.015em; text-wrap: balance;
}
.promise {
  margin: 0 0 8px; max-width: 42ch;
  font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--ink-2);
}
.poc-price { margin: 0 0 18px; color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--on-ink);
  font: 600 0.9rem/1.2 var(--ui); letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: var(--thread); border-color: var(--thread); color: #fff; }
.btn--ghost {
  background: transparent; color: var(--ink-2); border-color: var(--rule-2);
}
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--danger {
  background: transparent; color: var(--err); border-color: var(--err);
  width: auto; font-size: 0.8rem; letter-spacing: 0.06em;
}
.btn--block { width: 100%; }

.section { padding: clamp(28px, 5vw, 48px) 0; border-bottom: 1px solid var(--rule); }
.section h2 {
  margin: 0 0 8px; font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 1.75rem); letter-spacing: -0.01em;
}
.section .lede { margin: 0 0 20px; color: var(--muted); max-width: 48ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: grid; grid-template-columns: 2.5rem 1fr; gap: 12px;
  padding: 14px 16px; background: var(--paper); border: 1px solid var(--rule);
}
.steps .n {
  font-family: var(--mono); font-size: 0.85rem; color: var(--thread);
  padding-top: 2px;
}
.steps strong { display: block; color: var(--ink); margin-bottom: 2px; }
.steps span { color: var(--ink-2); font-size: 0.95rem; }

.relay {
  background: var(--plate); color: #C9C3B4; padding: clamp(22px, 4vw, 32px);
  border: 1px solid #2a271f;
}
.relay h2 { color: #F4F0E6; margin: 0 0 8px; }
.relay p { margin: 0 0 16px; max-width: 48ch; }
.relay .btn { border-color: #F4F0E6; background: #F4F0E6; color: var(--plate); }
.relay .btn:hover { background: var(--thread); border-color: var(--thread); color: #fff; }

.showcase {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .showcase { grid-template-columns: 1fr 1fr; }
}
.showcase a {
  display: block; padding: 14px 16px; background: var(--paper);
  border: 1px solid var(--rule); text-decoration: none; color: var(--ink);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.showcase a:hover { border-color: var(--thread); background: var(--paper-2); }
.showcase .host {
  display: block; margin-top: 4px;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
  word-break: break-all;
}

.panel {
  background: var(--paper); border: 1px solid var(--rule); padding: 18px 16px;
}
.panel h2 { margin-top: 0; }
label { display: block; margin: 14px 0 6px; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
input, textarea, select {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--rule-2); border-radius: 0;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--thread-soft); border-color: var(--thread);
}
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; font-weight: 400; color: var(--ink-2); font-size: 0.92rem;
}
.consent input { width: auto; margin-top: 3px; flex-shrink: 0; }
.err { color: var(--err); font-size: 0.88rem; display: block; margin-top: 4px; }
.banner-err {
  background: var(--err-bg); color: var(--err); padding: 10px 12px; margin-bottom: 12px;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); font-size: 0.9rem; }
.note {
  background: var(--thread-soft); border-left: 3px solid var(--thread);
  padding: 12px 14px; margin: 0 0 18px; color: var(--ink-2); font-size: 0.95rem;
}

.status-head { padding: 28px 0 8px; }
.status-head h1 {
  margin: 0 0 8px; font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
}
.badge {
  display: inline-block; margin: 0 0 12px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--thread);
  border: 1px solid var(--thread-soft); background: var(--thread-soft);
  padding: 6px 10px;
}

.brief h3, .answers h3, .timeline h3 {
  margin: 20px 0 8px; font-family: var(--display); font-weight: 400; color: var(--ink);
}
.brief ul, .timeline ol { margin: 0 0 12px; padding-left: 1.2rem; }
.brief li, .timeline li { margin-bottom: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem;
}
.timeline time { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
@media (max-width: 520px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

.foot {
  margin-top: 0; padding: 18px var(--gut) 36px; border-top: 1px solid var(--rule);
  font-size: 0.85rem; color: var(--muted);
}
.foot__inner { max-width: var(--max); margin: 0 auto; }
.foot a { color: var(--ink-2); }

.gone { padding: 48px 0; text-align: left; }
.gone h1 { font-family: var(--display); font-weight: 400; color: var(--ink); }

/* Cowork review 01/11 15:55: anchors clear the sticky header; nav stays on one line at 390 px; brief heading in the display face. */
[id] { scroll-margin-top: 72px; }
@media (max-width: 520px) {
  .top { padding: 12px var(--gut); }
  .top nav { flex-wrap: nowrap; gap: 10px; font-size: 0.82rem; white-space: nowrap; }
}
.brief h2 { font-family: var(--display); font-weight: 400; color: var(--ink); }

/* ── Spec 187 R1 (K-273) · night sky. <html data-sky="night"> re-maps the tokens; components are not restyled
   one by one. Values follow the site repo css/beat.css (spec 176 K-211, spec 184). Panels are slightly opaque
   so text sits on a veil, not on bare stars. Light mode = the tokens in :root above. */
html[data-sky] {
  --ground: transparent;
  --paper: rgba(14, 20, 40, 0.72); --paper-2: rgba(18, 26, 50, 0.78);
  --ink: #EEF1FA; --ink-2: #C9CFE2; --muted: #A3ABC4;
  --rule: rgba(255, 255, 255, 0.12); --rule-2: rgba(255, 255, 255, 0.22);
  --thread: #8FB9E0; --thread-deep: #BCD6F0; --thread-soft: rgba(143, 185, 224, 0.16);
  --bronze: #D8B26A;
  --plate: rgba(5, 8, 18, 0.78);
  --err: #F6B8AC; --err-bg: rgba(155, 28, 28, 0.28); --ok: #8CC7B0;
  --hdr-veil: rgba(7, 11, 23, 0.82);
  --field: rgba(24, 32, 60, 0.82);
  --on-ink: #06101f;
  color-scheme: dark;
}
html[data-sky] .btn:hover { color: #06101f; }
html[data-sky] .btn--ghost:hover { color: var(--ink); }
html[data-sky] .relay { border-color: var(--rule); }
html[data-sky] .relay .btn { color: #06101f; }
html[data-sky] ::placeholder { color: var(--muted); opacity: 1; }

.theme-toggle { display: none; }
html.theme-js .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; padding: 0; background: transparent; cursor: pointer;
  color: var(--ink); border: 1px solid var(--rule-2);
}
.theme-toggle:hover { border-color: var(--ink-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--thread); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .ico-sun { display: none; }
html[data-sky] .theme-toggle .ico-sun { display: block; }
html[data-sky] .theme-toggle .ico-moon { display: none; }
.top nav { margin-left: auto; }
/* The switch takes 44px of the phone header: the first nav link gives way (the hero's "See the 4 steps" button goes to the same place). */
@media (max-width: 520px) {
  .top { gap: 10px; }
  .top nav a:first-child { display: none; }
}
@media (max-width: 350px) {
  .top nav a:nth-child(2) { display: none; }
}

/* ── Spec 187 R2 (K-274) · constellation, projects, live preview ── */
.constellation .c-wrap { display: grid; gap: 1.2rem; }
.c-svg { width: 100%; max-width: 640px; height: auto; display: block; }
.c-line { stroke: var(--thread); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .85; }
.c-star circle { fill: var(--ink); }
.c-star .c-glow { fill: var(--thread-soft); }
.constellation.c-pending .c-line { stroke-dashoffset: 1; }
.constellation.c-pending .c-star, .constellation.c-pending .c-step { opacity: .35; }
.constellation.c-drawn .c-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease; }
.constellation.c-drawn .c-line--2 { transition-delay: 1.1s; }
.constellation .c-star, .constellation .c-step { transition: opacity .6s ease; }
.constellation.c-drawn .c-star, .constellation.c-drawn .c-step { opacity: 1; }
.constellation.c-drawn .c-star--2, .constellation.c-drawn .c-step--2 { transition-delay: 1s; }
.constellation.c-drawn .c-star--3, .constellation.c-drawn .c-step--3 { transition-delay: 2.1s; }
.c-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: c; }
.c-step { counter-increment: c; border-top: 1px solid var(--rule-2); padding-top: .7rem; min-width: 0; }
.c-step strong { display: block; font-family: var(--serif, "Fraunces", Georgia, serif); font-size: 1.15rem; font-weight: 500; }
.c-step strong::before { content: counter(c, decimal-leading-zero) "  "; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .75rem; color: var(--muted); }
.c-step span { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 640px) { .c-steps { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .constellation .c-line, .constellation .c-star, .constellation .c-step { transition: none !important; } }

.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.project a { display: grid; gap: .35rem; height: 100%; padding: 1rem 1.1rem 1.2rem; border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink); text-decoration: none; }
.project a:hover, .project a:focus-visible { border-color: var(--thread); outline: none; }
.project strong { font-family: var(--serif, "Fraunces", Georgia, serif); font-weight: 500; font-size: 1.15rem; }
.project span { color: var(--ink-2); font-size: .95rem; }
.project .project__tag { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.submit-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.preview { position: sticky; top: 84px; padding: 1.1rem 1.2rem; border: 1px dashed var(--rule-2); background: var(--paper); min-width: 0; }
.preview__label, .preview__k { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .8rem 0 .2rem; }
.preview__label { margin-top: 0; }
.preview h3 { margin: .2rem 0 .4rem; font-family: var(--serif, "Fraunces", Georgia, serif); font-weight: 500; overflow-wrap: anywhere; }
.preview p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.preview .is-empty { color: var(--muted); font-style: italic; }
.submit-note { margin-top: .6rem; text-align: center; }
@media (max-width: 860px) { .submit-grid { grid-template-columns: minmax(0, 1fr); } .preview { position: static; } }

/* ── Spec 187 R4 (K-275) · blog ── */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.post-list a { color: var(--ink); text-decoration: none; display: grid; gap: .25rem; }
.post-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.post-list strong { font-family: var(--serif, "Fraunces", Georgia, serif); font-size: 1.4rem; font-weight: 500; }
.post-list time, .post time { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .78rem; color: var(--muted); }
.post { max-width: 720px; margin: 0 auto; padding: 2.4rem 0 3rem; }
.post h1 { font-family: var(--serif, "Fraunces", Georgia, serif); font-weight: 500; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: .4rem 0 1rem; text-wrap: balance; }
.post .dek { font-size: 1.15rem; color: var(--ink-2); }
.post h2 { font-family: var(--serif, "Fraunces", Georgia, serif); font-weight: 500; margin: 2.2rem 0 .6rem; }
.post p, .post li { font-size: 1.06rem; line-height: 1.7; }
.post figure { margin: 1.6rem 0; }
.post figure img, .post figure video { width: 100%; height: auto; display: block; background: var(--paper); }
.post figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.post .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.post .pair img { aspect-ratio: 3/4; object-fit: cover; }
.post .draft-note { border: 1px dashed var(--bronze); padding: .6rem .8rem; font-size: .9rem; color: var(--ink-2); }
.post .ends { border-top: 1px solid var(--rule-2); margin-top: 2.4rem; padding-top: 1rem; color: var(--ink-2); }
@media (max-width: 520px) { .post .pair { grid-template-columns: minmax(0, 1fr); } }
