/* VA Reform — site styles. No frameworks. */
@font-face { font-family: "Great Vibes"; src: url("../fonts/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Allura"; src: url("../fonts/Allura-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #1b2430;
  --ink-2: #4a5568;
  --muted: #6b7280;
  --line: #d9dee5;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --brand: #1f4e5f;
  --brand-dark: #16394a;
  --accent: #f2b134;
  --accent-ink: #5a3d00;
  --danger: #b42318;
  --ok: #067647;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 17px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
small, .hint { color: var(--muted); font-size: .9rem; }
.muted { color: var(--ink-2); }
.fine { font-size: .8rem; color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.row { display: flex; align-items: flex-start; }
.row.center { align-items: center; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.gap { gap: 12px; }
.wrap-sm { flex-wrap: wrap; gap: 12px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark { width: 34px; height: 34px; border-radius: 8px; background: var(--brand); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; left: 8px; top: 8px; width: 12px; height: 12px; border: 3.5px solid var(--accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(2px,-2px); }
.brand-text { font-weight: 700; font-size: 1.15rem; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: .02em; }
nav { display: flex; gap: 18px; align-items: center; }
nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
nav a:hover { color: var(--brand); }

/* buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 2px solid var(--brand); padding: 11px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--bg-alt); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* hero */
.hero { background: linear-gradient(180deg, #eef3f5 0%, #ffffff 100%); padding: 64px 0 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 760px; }
.counter { margin-top: 22px; font-weight: 600; color: var(--brand); }
.counter:empty { display: none; }

/* sections */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.pillars { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); counter-reset: p; }
.pillars > li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; position: relative; counter-increment: p; }
.pillars > li::before { content: counter(p); position: absolute; top: -12px; left: 16px; background: var(--accent); color: var(--accent-ink); font-weight: 800; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; }
.pillars h3 { margin-top: 6px; }
.pillars p { color: var(--ink-2); font-size: .97rem; }
.pillars ul { margin: 0; padding-left: 18px; font-size: .93rem; color: var(--ink-2); }
.pillars ul li { border: 0; padding: 2px 0; background: none; counter-increment: none; }
.pillars ul li::before { display: none; }
.steps3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 20px; }
.steps3 .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 8px; }
.privacy-note { margin-top: 28px; background: #fff; border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 6px; font-size: .95rem; }

/* stepper */
.stepper { list-style: none; padding: 0; margin: 0 0 24px; display: flex; gap: 6px; counter-reset: s; }
.stepper li { flex: 1; padding: 8px 6px; text-align: center; font-size: .85rem; color: var(--muted); border-bottom: 3px solid var(--line); counter-increment: s; }
.stepper li::before { content: counter(s) ". "; }
.stepper li.current { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.stepper li.done { color: var(--ok); border-color: var(--ok); }

/* form */
fieldset.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 16px; background: #fff; }
legend { font-weight: 700; padding: 0 8px; font-size: 1.1rem; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=tel], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #b9c2cc; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(31,78,95,.35); outline-offset: 1px; }
input[aria-invalid=true] { border-color: var(--danger); }
textarea { resize: vertical; min-height: 200px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid3 { display: grid; gap: 14px; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
.hint.right { display: block; text-align: right; }
.choices, .letter-options { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: #eef3f5; }
.choice input { margin-top: 5px; }
.choice small { color: var(--muted); }
details.prompts { margin-bottom: 14px; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.reps-box { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.reps-box h3 { margin: 0; }
#reps-list:empty { display: none; }
.error { color: var(--danger); }
.ok { color: var(--ok); }

/* signature */
.sig-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; background: var(--bg-alt); }
.seg { display: inline-flex; border: 1px solid var(--brand); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--brand); padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button[aria-selected=true] { background: var(--brand); color: #fff; }
.sig-preview { min-height: 70px; border-bottom: 2px solid var(--ink); font-size: 44px; line-height: 1.2; padding: 6px 12px 2px; color: #14213d; background: #fff; }
.sig-preview.greatvibes { font-family: "Great Vibes", cursive; }
.sig-preview.allura { font-family: "Allura", cursive; font-size: 48px; }
#sig-canvas { width: 100%; max-width: 600px; height: 180px; background: #fff; border: 1px solid #b9c2cc; border-radius: 8px; touch-action: none; display: block; margin-bottom: 8px; }

/* letters output */
.letters-out { display: grid; gap: 14px; }
.letter-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.letter-card h4 { margin: 0 0 4px; font-size: 1.05rem; }
.letter-card .to { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.letter-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.letter-card .status { font-size: .88rem; margin-top: 8px; min-height: 1.2em; }

/* send guide */
.send-guide { margin-top: 36px; border-top: 2px solid var(--brand); padding-top: 20px; }
.send-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: #fff; }
.send-item h3 { margin-bottom: 8px; }
.send-item address { font-style: normal; white-space: pre-line; background: var(--bg-alt); padding: 10px 12px; border-radius: 6px; display: inline-block; margin: 6px 0 10px; }
.send-item ul { margin: 0; padding-left: 20px; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-card { background: #fff; border-radius: var(--radius); max-width: 820px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; padding: 18px; }
.modal-card pre { white-space: pre-wrap; font: 14px/1.5 Georgia, "Times New Roman", serif; overflow: auto; border: 1px solid var(--line); padding: 16px; border-radius: 6px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; margin-top: 40px; font-size: .92rem; color: var(--ink-2); background: var(--bg-alt); }

/* stats page */
table.stats { border-collapse: collapse; width: 100%; max-width: 640px; margin-bottom: 28px; }
table.stats th, table.stats td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.stats td.n { text-align: right; font-variant-numeric: tabular-nums; }
