/* permitdrafter.com landing page. Colors are the app's own (content/site.json theme, DP-14), so the page matches the
   plan-sheet logo Sara picked; still blue (DP-07). build.py writes them as tokens into tokens.css.
   One family: Atkinson Hyperlegible, hosted here. */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/AtkinsonHyperlegible-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/AtkinsonHyperlegible-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.05rem, 1.35rem + 3vw, 3.2rem); font-weight: 700; max-width: 17ch; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 700; max-width: 26ch; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0; max-width: 64ch; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 16px; top: -100px; background: var(--surface); color: var(--ink); padding: 0.6rem 0.9rem; border-radius: 8px; z-index: 40; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* Top bar */
/* The top bar stays in view, so "Join the waitlist" is one tap away anywhere on the page. */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.logo { display: block; flex: none; line-height: 0; }
.logo img { width: 30px; height: 30px; }
.top nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top nav .beta { display: inline-block; padding-block: 10px; color: var(--muted); white-space: nowrap; }
.top nav .beta:hover { color: var(--ink); }
/* DP-21: the full line fits from 900px; narrower, "Sign in" alone; under 768px the hero carries it (home) with the footer line */
@media (max-width: 899px) { .top nav .beta-q { display: none; } }
@media (max-width: 767px) { .top nav .beta { display: none; } }
@media (max-width: 640px) {
  .top nav .opt { display: none; }
  .top .wrap { flex-wrap: nowrap; }
  .top nav .btn { min-height: 40px; padding: 0 0.85rem; font-size: 0.9375rem; white-space: nowrap; }
}

/* Buttons: one shape everywhere */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.25rem;
  border-radius: 8px; border: 2px solid var(--btn); background: var(--btn); color: var(--btn-ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--line); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.top nav .btn { min-height: 42px; color: var(--btn-ink); }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
.hero .wrap { align-items: center; }
.hero .lead { margin-top: 18px; font-size: 1.1875rem; color: var(--ink); }
.hero .makers { margin-top: 14px; font-weight: 700; max-width: 52ch; }
.hero .acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero .status { margin-top: 18px; color: var(--muted); font-size: 0.9375rem; }
/* DP-21: under 768px the top bar has no room for "Sign in", so the hero carries it */
.hero .beta-line { display: none; margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }
.hero .beta-line a { color: var(--ink); }
@media (max-width: 767px) { .hero .beta-line { display: block; } }
.sheet { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.sheet img { width: 100%; }
.sheet picture { display: block; }
.sheet figcaption { padding: 10px 14px; font-size: 0.875rem; color: #4b5565; border-top: 1px solid #dde0e6; background: #fff; }

/* Waitlist form */
.join { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 28px); }
.join .fields { display: grid; gap: 16px; }
.join label { display: block; font-weight: 700; margin-bottom: 6px; }
.join label .opt { font-weight: 400; color: var(--muted); }
.join input, .join select {
  width: 100%; min-height: 48px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--muted);
  background: var(--surface); color: var(--ink); font: inherit;
}
.join .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 520px) { .join .row2 { grid-template-columns: minmax(0, 1fr); } }
.join .btn { width: 100%; margin-top: 4px; }
.ticks { border: 0; margin: 0; padding: 0; min-width: 0; }
.ticks legend { font-weight: 700; padding: 0; }
.ticks .hint { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
.tick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 8px; }
@media (max-width: 420px) { .tick-grid { grid-template-columns: minmax(0, 1fr); } }
.join label.tick { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-weight: 400; cursor: pointer; }
.join .tick input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.join .fine { font-size: 0.875rem; color: var(--muted); margin-top: 10px; }
.form-msg { color: var(--warn); background: var(--warn-bg); padding: 10px 12px; border-radius: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 28px); }
.done h3 { font-size: 1.375rem; }
.done p { margin-top: 8px; }

/* Sections */
.band { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.band.sunk { background: var(--sunk); }
.band .intro { margin-top: 14px; color: var(--muted); }
.prose { display: grid; gap: 14px; margin-top: 20px; }
main:focus { outline: none; }
.band h3 { font-size: 1.125rem; }
.band li p { margin-top: 6px; color: var(--muted); }

/* Systems: each brand under a short rule, all the same weight */
.makers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; margin-top: 36px; }
@media (max-width: 900px) { .makers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.maker { border-top: 2px solid var(--accent); padding-top: 12px; }
.maker ul { list-style: none; margin: 4px 0 0; padding: 0; color: var(--muted); }
.band .more { margin-top: 32px; color: var(--muted); }

/* How it works */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.steps li { display: grid; gap: 12px; align-content: start; }
.steps .n { font-size: 2.5rem; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }

/* The plan set, the crew sheets and who it's for: three across, then two, then one */
.feats { list-style: none; margin: 36px 0 0; padding: 0; }
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
@media (max-width: 900px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feats { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.feats li { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.crew { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 6vw, 88px); }
@media (max-width: 820px) { .crew { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.crew > li > .ico { color: var(--fs); }
.crew h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); margin-top: 16px; }
.crew > li > p { margin-top: 10px; max-width: 52ch; }
.crew .points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.crew .points li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; }
.crew .points .tk { color: var(--accent); margin-top: 3px; }

/* The big figures, on the one dark band */
.band.ink { background: var(--ink-band); color: var(--ink-band-text); border-top: 0; }
.figs { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 900px) { .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .figs { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.figs li { display: grid; gap: 10px; align-content: start; border-top: 2px solid var(--fs); padding-top: 14px; }
.figs .fig { font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.figs .what { color: var(--ink-band-muted); }

/* Standards, with a code box drawn like the one on each sheet */
.codes { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; }
@media (max-width: 700px) { .codes { grid-template-columns: minmax(0, 1fr); } }
.codes li { border-top: 2px solid var(--accent); padding-top: 14px; }
.codes .code { display: block; font-weight: 700; font-size: 1.25rem; }
.codes .what { display: block; margin-top: 6px; color: var(--muted); }
.std-note { margin-top: 32px; max-width: 70ch; color: var(--muted); font-size: 0.9375rem; }

/* Join, at the end of the page */
.joinband { background: var(--accent-soft); }
.join-intro { max-width: 640px; margin-inline: auto; text-align: center; }
.join-intro h2 { margin-inline: auto; }
.join-intro p { margin-top: 14px; color: var(--muted); }
.join-box { max-width: 640px; margin: 32px auto 0; }

/* Questions */
.faq { margin: 28px auto 0; max-width: 820px; }
.faqband h2 { text-align: center; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 4px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.0625rem; padding-block: 14px; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.375rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 16px; }


/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 32px 40px; color: var(--muted); font-size: 0.9375rem; }
footer .wrap { display: grid; gap: 12px; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink); }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand .logo img { width: 48px; height: 48px; }
footer .tm { font-size: 0.8125rem; }

/* Legal pages */
.doc { padding-block: clamp(36px, 5vw, 64px); }
.doc h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); max-width: 24ch; }
.doc h2 { font-size: 1.5rem; margin-top: 36px; }
.doc p, .doc ul { margin-top: 12px; max-width: 68ch; }
.doc .updated { color: var(--muted); margin-top: 10px; }
.doc-table { margin-top: 16px; max-width: 820px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.doc-table table { width: 100%; min-width: 520px; border-collapse: collapse; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc-table tbody tr:last-child th, .doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table thead th { color: var(--muted); font-size: 0.9375rem; }

/* Cookie box */
/* Desktop: a small box in the bottom-right corner, clear of the waitlist form. Phones: a sheet along the bottom
   edge with both buttons on one row. One defined edge, no wide shadow. */
#cc {
  position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100% - 32px)); background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 12px; padding: 16px 18px;
}
#cc p { font-size: 0.9375rem; }
#cc .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
#cc .btn { min-height: 44px; }
@media (max-width: 640px) {
  #cc { left: 0; right: 0; bottom: 0; width: auto; border-width: 2px 0 0; border-radius: 12px 12px 0 0;
        padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  #cc .acts { flex-wrap: nowrap; }
  #cc .btn { flex: 1; padding: 0 0.5rem; }
}
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

@media print { #cc, .top nav, .join, .skip { display: none !important; } body { background: #fff; color: #000; } }
