/* Planroom Weekly — plan-sheet aesthetic. System fonts only, no external assets. */

:root {
  --ink: #0b1b2b;
  --ink-2: #10263b;
  --ink-3: #18344f;
  --ink-text: #e8eef5;
  --ink-muted: #a9bacb;
  --ink-line: rgba(160, 196, 230, 0.1);
  --ink-line-strong: rgba(160, 196, 230, 0.22);

  --paper: #f6f2e9;
  --paper-2: #eee8da;
  --sheet: #fffdf7;
  --rule: #d8cfbb;
  --rule-strong: #b9ad94;
  --text: #17212c;
  --muted: #4b5664;

  --amber: #f2a531;
  --amber-hover: #ffb84d;
  --amber-ink: #874b00; /* amber-family text on paper, AA */
  --ok: #1f6b45;
  --err: #a3271b;

  --display: Rockwell, "Rockwell Nova", "Roboto Slab", "Zilla Slab", "Museo Slab", "DejaVu Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 6px;
  --wrap: 72rem;
  --gutter: clamp(1.1rem, 4vw, 2rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1rem/1.6 var(--sans);
  color: var(--text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }
.on-paper :focus-visible { outline-color: var(--ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--amber); color: var(--ink); padding: 0.6rem 1rem; border-radius: var(--radius); font-weight: 700;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Blueprint surface ---------- */
.blueprint {
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--ink-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line-strong) 1px, transparent 1px),
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  color: var(--ink-text);
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--ink-line-strong); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.01em; }
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.nav { display: flex; align-items: center; gap: 1.4rem; font-size: 0.92rem; }
.nav a { text-decoration: none; color: var(--ink-muted); }
.nav a:hover { color: var(--ink-text); text-decoration: underline; }
.nav .nav-cta { color: var(--ink); background: var(--amber); padding: 0.45rem 0.85rem; border-radius: var(--radius); font-weight: 650; }
.nav .nav-cta:hover { background: var(--amber-hover); color: var(--ink); text-decoration: none; }
.nav .nav-link { display: none; }
@media (min-width: 46rem) { .nav .nav-link { display: inline; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(1.75rem, 6vw, 4.5rem) 0 clamp(2.5rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); } }

.eyebrow {
  font: 600 0.74rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(2.05rem, 7.2vw, 3.7rem); margin-bottom: 0.4em; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--amber); }
.lede { font-size: clamp(1.05rem, 2.4vw, 1.22rem); color: var(--ink-muted); max-width: 38rem; margin-bottom: 1.4rem; }
.lede strong { color: var(--ink-text); font-weight: 600; }

/* dimension line */
.dim { position: relative; height: 1px; background: var(--ink-line-strong); margin: 0 0 1.5rem; max-width: 30rem; }
.dim::before, .dim::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--ink-muted); }
.dim::before { left: 0; }
.dim::after { right: 0; }

/* ---------- Forms ---------- */
.signup { max-width: 36rem; }
.signup-area { scroll-margin-top: 1rem; }
.signup-area:focus { outline: none; }
.field-row { display: grid; gap: 0.6rem; }
@media (min-width: 34rem) { .field-row { grid-template-columns: 1fr auto; } }
.label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.input, .select {
  width: 100%; min-height: 3.1rem; padding: 0.7rem 0.9rem; font: inherit; font-size: 1rem;
  border-radius: var(--radius); border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--text);
}
.blueprint .input, .blueprint .select { border-color: #5d7891; background: #f9f7f1; }
.input:focus-visible, .select:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.select { min-height: 2.6rem; padding: 0.45rem 0.7rem; font-size: 0.95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.1rem; padding: 0.7rem 1.3rem; border: 0; border-radius: var(--radius); cursor: pointer;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; letter-spacing: 0.005em;
  background: var(--amber); color: var(--ink);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--amber-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--paper); }

.chips { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.chips legend { padding: 0; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.chips legend span, .opt { font-weight: 400; color: var(--ink-muted); }
.on-paper .chips legend span, .on-paper .opt { color: var(--muted); }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.42rem 0.75rem; min-height: 2.25rem;
  border: 1px solid #5d7891; border-radius: 999px; font-size: 0.88rem; line-height: 1.2; color: var(--ink-text);
  background: rgba(255, 255, 255, 0.03); transition: background-color 0.12s ease, border-color 0.12s ease;
}
.chip span::before {
  content: ""; width: 0.7rem; height: 0.7rem; border: 1.5px solid currentColor; border-radius: 2px; flex: none;
}
.chip:hover span { border-color: var(--ink-text); }
.chip input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.chip input:checked + span::before {
  background: var(--ink); border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--amber);
}
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

.extras { display: grid; gap: 0.75rem; margin-top: 1rem; font-size: 0.92rem; }
@media (min-width: 34rem) { .extras { grid-template-columns: minmax(0, 13rem) 1fr; align-items: end; } }
.extras .label { font-size: 0.85rem; }
.check { display: flex; gap: 0.55rem; align-items: flex-start; line-height: 1.4; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin: 0.1rem 0 0; accent-color: var(--amber); flex: none; }

.micro { font-size: 0.85rem; color: var(--ink-muted); margin: 0.85rem 0 0; }
.on-paper .micro { color: var(--muted); }
.micro a { color: inherit; }

.form-error { margin: 0.6rem 0 0; font-size: 0.92rem; font-weight: 600; color: #ffb4a8; }
/* Keep the live region in the accessibility tree; only drop its spacing while empty. */
.form-error:empty { margin: 0; }
.on-paper .form-error { color: var(--err); }

/* Server-side (no-JS) result notices, shown via :target */
.notice { display: none; border-radius: var(--radius); padding: 0.9rem 1rem; margin: 0 0 1rem; font-weight: 600; max-width: 36rem; }
.notice:target { display: block; }
.notice--ok { background: #dff1e6; color: #0f3d26; border-left: 4px solid var(--ok); }
.notice--err { background: #fbe3df; color: #5e130b; border-left: 4px solid var(--err); }
#subscribed:target ~ .signup { display: none; }

.thanks {
  max-width: 36rem; border: 1px solid var(--ink-line-strong); border-left: 4px solid var(--amber);
  background: rgba(11, 27, 43, 0.6); padding: 1.2rem 1.3rem; border-radius: var(--radius);
}
.on-paper .thanks { background: var(--sheet); border-color: var(--rule); border-left-color: var(--amber); }
.thanks h3 { margin-bottom: 0.3rem; }
.thanks p { margin: 0; }

/* ---------- Spec sheet (hero aside) ---------- */
.spec {
  border: 1px solid var(--ink-line-strong); border-radius: var(--radius);
  background: rgba(8, 20, 33, 0.72); font-size: 0.92rem;
}
.spec-head { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--ink-line-strong); font: 600 0.72rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.spec dl { margin: 0; }
.spec .row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--ink-line); }
.spec .row:last-child { border-bottom: 0; }
.spec dt { font: 600 0.72rem/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.spec dd { margin: 0; color: var(--ink-text); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--alt { background: var(--paper-2); border-block: 1px solid var(--rule); }
.section-head { max-width: 44rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.kicker { font: 600 0.74rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-ink); margin: 0 0 0.7rem; }
.kicker b { color: var(--text); font-weight: 600; }

.steps { list-style: none; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 50rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.3rem 1.3rem; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: inline-block; font: 700 0.78rem/1 var(--mono); letter-spacing: 0.08em;
  padding: 0.35rem 0.5rem; border: 1px solid var(--text); border-radius: 3px; margin-bottom: 0.9rem;
}
.step p { margin: 0; color: var(--muted); }

/* ---------- Sample issue (email card) ---------- */
.issue-wrap { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 62rem) { .issue-wrap { grid-template-columns: minmax(0, 1fr) 19rem; } }
.issue {
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 8px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(11, 27, 43, 0.45);
  overflow: hidden;
}
.issue-mast { padding: 1.4rem clamp(1.1rem, 4vw, 2rem) 1.2rem; border-bottom: 2px solid var(--ink); }
.issue-mast .name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 0 0 0.35rem; }
.issue-mast .meta { font-size: 0.9rem; color: var(--muted); margin: 0; }
.issue-mast .meta b { color: var(--text); }
.issue-body { padding: 1.4rem clamp(1.1rem, 4vw, 2rem) 0.4rem; }
.issue-body > p { color: var(--muted); }
.issue h3.issue-h { font: 700 0.78rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-ink); margin: 1.8rem 0 0.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.issue h3.issue-h:first-of-type { margin-top: 0.4rem; }
.issue ul.plain { list-style: none; }
.issue ul.plain li { padding-left: 1rem; position: relative; margin-bottom: 0.4rem; }
.issue ul.plain li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 0.4rem; height: 1px; background: var(--text); }

.bid { padding: 1.15rem 0 1.3rem; border-bottom: 1px dashed var(--rule-strong); }
.bid:last-of-type { border-bottom: 0; }
.bid h4 { font-family: var(--display); font-size: 1.14rem; line-height: 1.25; margin: 0 0 0.3rem; }
.bid .where { font-size: 0.92rem; color: var(--muted); margin: 0 0 0.6rem; }
.bid .where b { color: var(--text); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.75rem; }
.tags li { font: 500 0.74rem/1.3 var(--mono); padding: 0.22rem 0.5rem; border: 1px solid var(--rule-strong); border-radius: 3px; background: var(--paper); }
.bid p { margin-bottom: 0.7rem; }
.bid .src { font-weight: 600; color: var(--ink); }
.bid .src::after { content: " \2197"; }

.facts { margin: 0 0 0.8rem; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--rule); font-size: 0.9rem; }
.facts dt, .facts dd { padding: 0.4rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.facts dt { font: 600 0.72rem/1.9 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-right: 1rem; }

.issue-foot { margin-top: 0.6rem; padding: 1rem clamp(1.1rem, 4vw, 2rem); background: var(--paper); border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--muted); font-style: italic; }
.issue-foot p { margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table caption { text-align: left; font: 700 0.78rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 0.6rem; }
.table th, .table td { text-align: left; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.table td:last-child, .table th:last-child { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table thead th { font: 600 0.72rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--text); }
.table tfoot th, .table tfoot td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid var(--text); }

.aside-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem; }
.aside-card + .aside-card { margin-top: 1rem; }
.aside-card p { font-size: 0.92rem; color: var(--muted); margin: 0.8rem 0 0; }
@media (min-width: 62rem) { .issue-aside { position: sticky; top: 1.5rem; } }

/* ---------- Trades ---------- */
.trades { list-style: none; display: grid; gap: 0; border-top: 1.5px solid var(--text); }
@media (min-width: 44rem) { .trades { grid-template-columns: repeat(2, 1fr); column-gap: 2.5rem; } }
.trades li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.6rem; padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.trades .code { font: 600 0.78rem/1.7 var(--mono); color: var(--amber-ink); }
.trades strong { display: block; font-size: 1.05rem; }
.trades span.d { color: var(--muted); font-size: 0.93rem; }
.priority { display: inline-block; margin-left: 0.4rem; font: 600 0.66rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 0.22rem 0.4rem; border-radius: 3px; background: var(--ink); color: var(--amber); vertical-align: 0.15em; }
.fit { margin-top: 1.75rem; color: var(--muted); max-width: 44rem; }

/* ---------- Plans ---------- */
.plans { display: grid; gap: 1.25rem; }
@media (min-width: 52rem) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { position: relative; border-radius: 8px; padding: clamp(1.3rem, 3vw, 1.9rem); border: 1px solid var(--rule-strong); background: var(--sheet); display: flex; flex-direction: column; }
.plan--wait { border: 1.5px dashed var(--ink); background: transparent; }
.plan .status { font: 700 0.72rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.9rem; display: inline-flex; gap: 0.5rem; align-items: center; }
.plan .status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--ok); }
.plan--wait .status::before { background: transparent; border: 1.5px solid var(--amber-ink); }
.plan h3 { font-size: 1.5rem; margin-bottom: 0.2rem; }
.price { font-family: var(--display); font-size: 2.3rem; font-weight: 700; line-height: 1.1; margin: 0.5rem 0 0.2rem; }
.price small { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.plan .note { font-size: 0.92rem; color: var(--muted); }
.ticks { list-style: none; margin: 1rem 0 1.4rem; }
.ticks li { padding: 0.45rem 0 0.45rem 1.6rem; position: relative; border-top: 1px solid var(--rule); }
.ticks li::before { content: ""; position: absolute; left: 0.15rem; top: 0.85rem; width: 0.7rem; height: 0.38rem; border-left: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.context { margin: 1.5rem 0 0; font-size: 0.95rem; color: var(--muted); max-width: 44rem; }

/* ---------- Is / isn't ---------- */
.honest { display: grid; gap: 1.25rem; }
@media (min-width: 52rem) { .honest { grid-template-columns: 1fr 1fr; } }
.honest > div { border-top: 3px solid var(--text); padding-top: 1rem; }
.honest > div.isnt { border-top-color: var(--amber); }
.honest ul { list-style: none; }
.honest li { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; border-top: 1.5px solid var(--text); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 2.2rem 1.05rem 0; position: relative;
  font-weight: 650; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.85rem; font: 400 1.4rem/1 var(--mono); color: var(--amber-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: 0 0 1.1rem; max-width: 42rem; }

/* ---------- Final CTA ---------- */
.final { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.final .wrap { display: grid; gap: 2rem; }
@media (min-width: 58rem) { .final .wrap { grid-template-columns: 1fr 1fr; align-items: center; } }
.final h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.final p.sub { color: var(--ink-muted); font-size: 1.08rem; }
.final .extras { grid-template-columns: 1fr; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ink-muted); font-size: 0.9rem; padding: 2.25rem 0 2.5rem; border-top: 1px solid var(--ink-line-strong); }
.site-footer .wrap { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr auto; } }
.site-footer .brand { color: var(--ink-text); }
.site-footer p { margin: 0.35rem 0 0; }
.site-footer a { color: var(--ink-text); }
.foot-links { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }

/* ---------- Prose page (privacy / 404) ---------- */
.prose { max-width: 44rem; padding: clamp(2.5rem, 7vw, 4.5rem) 0 4rem; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4rem; }
.prose .updated { font: 600 0.78rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .blueprint { background: none; color: #000; }
  .signup, .nav, .final { display: none; }
}
