/* Bricolage Grotesque (headings, wordmark; shared with CertNudge) and Source Serif 4 (the "document" voice),
   both SIL Open Font License, self-hosted */
@font-face { font-family: "Bricolage"; src: url("bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

/* "Official stamp": deep green security paper, an ink seal, perforated edges. The amber diamond, the Bricolage
   wordmark and the solid hero with a white example card are the Nudge family traits shared with CertNudge. */
:root {
  --ink: #12261c; --muted: #4c6155; --paper: #fbfaf4; --card: #ffffff; --tint: #eef3ea; --line: #d3dfd4; --rule: #b9cbbd;
  --green: #0e4d33; --green-deep: #093824; --green-mid: #17734b; --on-green: #ffffff; --on-green-soft: #cfe6d7; --green-soft: #bfdcc8;
  --button: #0e4d33; --button-hover: #093824; --on-button: #ffffff;
  --field: #ffffff; --on-field: #12261c; --field-hint: #5b6e62;
  --guilloche: rgba(255, 255, 255, .06); --shadow: rgba(0, 20, 10, .7);
  --amber: #f5a524; --amber-hover: #ffb944; --on-amber: #1a1408;
  --stamp: #15784c; --stamp-fade: rgba(21, 120, 76, .1);
  --good: #11704a; --warn: #8a5600; --bad: #b3342b;
  --good-bg: #e3f1e8; --warn-bg: #fbf0d9; --bad-bg: #f9e4e1;
  --link: #11704a; --sibling: #5b3df5;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Source Serif", Georgia, serif;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e3eee6; --muted: #9db3a5; --paper: #0c1511; --card: #121e18; --tint: #101c16; --line: #24372d; --rule: #31493c;
    --green: #0b3d28; --green-deep: #072a1b; --green-mid: #1f8f5f; --on-green-soft: #bcd9c6; --green-soft: #1e4a35;
    --button: #4fcf92; --button-hover: #6fdca8; --on-button: #0c1511;
    --guilloche: rgba(255, 255, 255, .045);
    --stamp: #4fcf92; --stamp-fade: rgba(79, 207, 146, .12);
    --good: #5ad69b; --warn: #f2bd5a; --bad: #ff8577;
    --good-bg: #133524; --warn-bg: #352a12; --bad-bg: #3a1c19;
    --link: #6fdca8; --sibling: #9a88ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0;
       font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
       color: var(--ink); background: var(--paper); overflow-wrap: break-word; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3, .brand, .price { font-family: "Bricolage", -apple-system, "Segoe UI", sans-serif; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.025em; margin: 0 0 18px; overflow-wrap: anywhere; }
h1.id { font-family: var(--mono); font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: .02em; margin-bottom: 8px; }
h2 { font-size: 1.9rem; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; margin: 0 0 22px; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
.page h2 { margin-top: 44px; }
.small { font-size: .875rem; color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .9em; letter-spacing: .01em; }
/* small-caps label; above section titles it runs into a thin rule */
.kicker { font: 600 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.kicker.ruled { display: flex; align-items: center; gap: 12px; }
.kicker.ruled::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

/* header */
.top { background: var(--green); color: var(--on-green); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; }
.brand { color: var(--on-green); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand i { width: 14px; height: 14px; background: var(--amber); display: inline-block; transform: rotate(45deg); }
nav { display: flex; align-items: center; gap: 24px; font-size: .95rem; white-space: nowrap; }
nav a, nav button.link { color: var(--on-green-soft); text-decoration: none; padding: 11px 0; font-size: .95rem; }
nav a:hover, nav button.link:hover { color: var(--on-green); text-decoration: underline; }

main { flex: 1; padding-bottom: 48px; }
.page { padding-top: 48px; }
main > .flashes:not(:has(.flash)) { display: none; }
main > .flashes:has(.flash) + .page { padding-top: 24px; }

/* hero: security-paper guilloche on deep green, an amber tear line under it */
.hero { background-color: var(--green); color: var(--on-green); padding: 44px 0 92px; position: relative;
        background-image:
          repeating-radial-gradient(circle at 88% 30%, transparent 0 22px, var(--guilloche) 22px 23px),
          repeating-radial-gradient(circle at 8% 110%, transparent 0 30px, var(--guilloche) 30px 31px); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
               background: repeating-linear-gradient(90deg, var(--amber) 0 18px, transparent 18px 26px); opacity: .9; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; }
.hero .kicker, .hero .lead, .hero .small { color: var(--on-green-soft); }
.lead { font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; max-width: 32em; }
.hero b.free { display: block; margin-top: 18px; }
.hero input { border-color: transparent; background: var(--field); color: var(--on-field); }
.hero input::placeholder { color: var(--field-hint); }
.hero button, .button.amber { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.hero button:hover, .button.amber:hover { background: var(--amber-hover); border-color: var(--amber-hover); }
.hero .flash { background: var(--card); color: var(--ink); margin: 0 0 16px; max-width: 560px; }
/* coming soon (VATNUDGE_SOON): an amber dashed stamp instead of the sign-up form and plan buttons */
.stamp { display: inline-block; font: 700 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber);
         border: 2px dashed currentColor; padding: 8px 12px; transform: rotate(-2deg); }
.hero .soon { margin: 22px 0 0; color: var(--on-green-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.plan .body .stamp { margin-top: auto; align-self: flex-start; color: var(--warn); }

/* forms */
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 10px; max-width: 780px; }
.row input { flex: 1 1 220px; min-width: 0; }
input { font: inherit; padding: 11px 14px; border: 2px solid var(--line); border-radius: var(--radius);
        background: var(--card); color: var(--ink); min-height: 48px; }
input[type=file] { padding: 9px 10px; }
input::placeholder { color: var(--muted); }
input:focus { border-color: var(--green-mid); outline: none; }
button, .button { font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; padding: 12px 20px; min-height: 48px;
                  border-radius: var(--radius); border: 2px solid var(--button); background: var(--button); color: var(--on-button);
                  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button:hover, .button:hover { background: var(--button-hover); border-color: var(--button-hover); }
button.secondary, .button.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
button.secondary:hover, .button.secondary:hover { background: var(--tint); border-color: var(--green-mid); }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); text-decoration: underline; font-weight: 400; font-size: .9rem; }
button.link:hover { background: none; }
button.danger { color: var(--bad); }
form.inline { display: inline; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }
button.busy { opacity: .75; cursor: progress; }
button.busy::before { content: ""; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor;
                      border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the document card: perforated top, ruled lines, a seal */
.doc { --holes: var(--green); position: relative; background: var(--card); color: var(--ink); border-radius: 0 0 var(--radius) var(--radius);
       padding: 30px 28px 22px; box-shadow: 0 26px 60px -26px var(--shadow); }
.doc::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 14px;
               background: radial-gradient(circle, var(--holes) 4.5px, transparent 5px) 4px 0 / 16px 14px repeat-x; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
            border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 4px; }
.doc-head .kicker { margin-bottom: 8px; font-family: var(--mono); color: var(--muted); }
.doc-head h2 { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; letter-spacing: .02em; margin: 0; }
.doc-head p { margin: 2px 0 0; font-family: var(--serif); }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 0; font-size: .92rem; }
.doc dt { color: var(--muted); }
.doc dd { margin: 0; font-family: var(--serif); }
.doc dd.mono { font-family: var(--mono); }
/* 14 daily checks, amber where a retry got the answer */
.days { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--rule); }
.days-grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin: 0 0 8px; }
.days-grid span { aspect-ratio: 1; background: var(--good); border-radius: 2px; }
.days-grid span.retry { background: var(--amber); }
.days-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; color: var(--muted); margin: 0; }
.days-key i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--good); border-radius: 2px; }
.days-key i.retry { background: var(--amber); }

/* the seal: an ink stamp, not a sticker */
.seal { flex: none; width: 112px; height: 112px; color: var(--stamp); transform: rotate(-9deg); margin: -6px -4px 0 0; }
.seal svg { width: 100%; height: 100%; display: block; }
.seal .ring { fill: none; stroke: currentColor; }
.seal .fillc { fill: var(--stamp-fade); }
.seal text { fill: currentColor; font-family: var(--mono); font-size: 9.4px; letter-spacing: 1.9px; font-weight: 700; }
.seal .big { font-family: "Bricolage", sans-serif; font-size: 22px; letter-spacing: .5px; font-weight: 800; }
.seal .date { font-size: 8.5px; letter-spacing: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .seal { animation: press .4s cubic-bezier(.2, .9, .3, 1.2); }
  @keyframes press { from { transform: rotate(-9deg) scale(1.25); } to { transform: rotate(-9deg) scale(1); } }
}

/* sections */
.band { padding: 76px 0; }
.band.tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* steps: numbered entries in double rings under a perforated rule */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 26px;
            background: radial-gradient(circle, var(--green-mid) 2.2px, transparent 2.7px) 0 0 / 10px 6px repeat-x; }
.steps li::before { counter-increment: step; content: "0" counter(step); display: inline-flex; align-items: center; justify-content: center;
                    width: 52px; height: 52px; border: 2px solid var(--green-mid); outline: 1px solid var(--green-mid); outline-offset: 3px;
                    border-radius: 50%; font: 800 1.25rem/1 "Bricolage", sans-serif; color: var(--green-mid); margin: 4px 0 18px 4px; }
.steps p { margin: 0; color: var(--muted); }

/* tick lists: a small tick inside an ink box */
.checks, .ticks { list-style: none; padding: 0; margin: 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.checks li, .ticks li { padding-left: 34px; position: relative; }
.ticks li { margin: 6px 0; }
.checks li::before, .ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border: 2px solid var(--green-mid); border-radius: 2px; }
.checks li::after, .ticks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 8px; height: 5px; border-left: 2px solid var(--green-mid);
                                      border-bottom: 2px solid var(--green-mid); transform: rotate(-45deg); }

/* plans: ticket stubs with a perforated tear line */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 22px; }
.plan { --notch: var(--paper); position: relative; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card);
        display: flex; flex-direction: column; }
.plan .stub { padding: 24px 24px 20px; border-bottom: 2px dashed var(--line); position: relative; }
.plan .stub::before, .plan .stub::after { content: ""; position: absolute; bottom: -11px; width: 20px; height: 20px; border-radius: 50%;
                                          background: var(--notch); border: 2px solid var(--line); }
.plan .stub::before { left: -12px; clip-path: inset(0 0 0 50%); }
.plan .stub::after { right: -12px; clip-path: inset(0 50% 0 0); }
.plan .body { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.plan .body .button { margin-top: auto; align-self: flex-start; }
.plan h3 { font-size: 1.25rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan h3 span { font: 600 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; line-height: 1.1; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan.featured { border-color: var(--green-mid); box-shadow: 10px 10px 0 var(--green-soft); }
.plan.featured .stub { border-bottom-color: var(--green-mid); }
.plan.featured .stub::before, .plan.featured .stub::after { border-color: var(--green-mid); }

/* messages */
.flash { border-left: 4px solid var(--good); background: var(--good-bg); padding: 10px 14px; margin: 24px 0 0; font-size: .95rem; }
.flash.error { border-left-color: var(--bad); background: var(--bad-bg); }
.flash.notice { border-left-color: var(--amber); background: var(--warn-bg); }

/* status marks: bordered ink stamps */
.mark { display: inline-block; font: 700 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
        padding: 5px 8px 4px; border: 2px solid currentColor; border-radius: 3px; white-space: nowrap; }
.mark.good { color: var(--good); background: var(--good-bg); box-shadow: inset 0 0 0 1px var(--good-bg), inset 0 0 0 2px currentColor; }
.mark.warn { color: var(--warn); background: var(--warn-bg); border-style: dashed; }
.mark.bad { color: var(--bad); background: var(--bad-bg); }
.mark.none { color: var(--muted); border-style: dotted; }

/* dashboard */
details.import { margin: 8px 0 0; max-width: 780px; border: 2px solid var(--line); border-radius: var(--radius); padding: 0 18px; background: var(--card); }
details.import > summary { cursor: pointer; color: var(--link); font-weight: 600; padding: 12px 0; }
details.import[open] { padding-bottom: 8px; }
table.dash { width: 100%; border-collapse: collapse; font-size: .94rem; margin-top: 22px; }
.dash th { text-align: left; font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
           padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.dash td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.dash td.id a { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }
.dash td.reg { font-family: var(--serif); }
.dash td.when { white-space: nowrap; color: var(--muted); }
.dash td.actions { text-align: right; white-space: nowrap; }
.dash tr.paused { opacity: .55; }

/* check history: a ledger with a perforated head */
.ledger { border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); margin-top: 14px; }
.ledger-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
               padding: 16px 20px; border-bottom: 2px dashed var(--line); }
.ledger-head b { font-family: var(--mono); font-size: 1.05rem; }
.ledger-head span { font-family: var(--serif); color: var(--muted); }
.ledger ol { list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 11rem 8rem 1fr; gap: 6px 16px; align-items: baseline; padding: 12px 20px;
             border-bottom: 1px solid var(--line); font-size: .92rem; }
.ledger li:last-child { border-bottom: 0; }
.ledger time { color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.ledger .detail { font-family: var(--serif); overflow-wrap: anywhere; }
.ledger .detail .cn { display: block; font-family: var(--mono); font-size: .88rem; }
.ledger .detail small { display: block; color: var(--muted); font-size: .85rem; }

/* an ID's page: record head with the seal when the last answer was valid */
.id-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.id-head .reg { font-family: var(--serif); margin: 6px 0 0; }
.id-head .seal { margin-top: -4px; }
.page .kicker.ruled { margin-top: 44px; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
footer a { color: var(--muted); }
footer .sib { display: inline-flex; align-items: center; gap: 8px; }
footer .sib i { width: 9px; height: 9px; background: var(--sibling); transform: rotate(45deg); display: inline-block; }
footer .contact { margin-right: 20px; }

@media (max-width: 860px) {
  .hero .wrap, .steps, .checks, .plans { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 64px; }
  .hero .wrap { gap: 44px; }
  .band { padding: 52px 0; }
  .page { padding-top: 32px; }
  h2 { font-size: 1.6rem; }
  .plans { max-width: 440px; gap: 24px; }
  .plan.featured { box-shadow: 6px 6px 0 var(--green-soft); }
  .steps { gap: 28px; }
  .dash, .dash tbody, .dash tr, .dash td { display: block; }
  .dash thead { display: none; }
  .dash tr { border-bottom: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .dash td { border: 0; padding: 0; }
  .dash td.id { grid-column: 1; }
  .dash td.st { grid-column: 2; grid-row: 1; text-align: right; }
  .dash td.reg, .dash td.when { grid-column: 1 / -1; }
  .dash td:empty { display: none; }
  .dash td.when::before { content: "Last answer: "; }
  .dash td.actions { grid-column: 1 / -1; text-align: left; }
  .ledger li { grid-template-columns: 1fr auto; }
  .ledger .detail { grid-column: 1 / -1; }
  .ledger .detail:empty { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  nav { gap: 16px; font-size: .9rem; }
  .lead { font-size: 1.08rem; }
  .doc { padding: 26px 18px 20px; }
  .seal { width: 84px; height: 84px; }
  .doc-head h2 { font-size: 1.1rem; }
  .doc dl { grid-template-columns: 1fr; gap: 0; }
  .doc dd { margin-bottom: 8px; }
  .ledger-head, .ledger li { padding-left: 14px; padding-right: 14px; }
  .row button { flex: 1 1 100%; }
  .brand { font-size: 1.15rem; gap: 8px; }
  .brand i { width: 11px; height: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
