 :root {
  --paper: #F8F6F1;
  --ink: #111114;
  --wax: #B4382E;
  --brass: #9B7A45;
  --mist: #D8D4CC;
  --line: rgba(17, 17, 20, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #fff 0, var(--paper) 52%, #efeae0 100%); color: var(--ink); font-family: Georgia, 'Times New Roman', serif; }
.paper { width: min(760px, 100%); margin: 0 auto; padding: 28px 18px 42px; }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .16em; color: var(--brass); margin-bottom: 30px; }
/* Wax-seal mark: serif C inside a double ring, echoing the brand seal. */
.brand-link { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.signet { width: 42px; height: 42px; border: 2px solid var(--brass); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--brass); display: inline-grid; place-items: center; letter-spacing: 0; font-size: 22px; color: var(--wax); }
.card { border: 1px solid var(--line); background: rgba(255,255,255,.48); box-shadow: 0 24px 90px rgba(70, 48, 30, .10); padding: clamp(22px, 6vw, 54px); }
.eyebrow { color: var(--wax); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 8vw, 4.5rem); line-height: .96; margin: .2em 0 .5em; }
p { line-height: 1.55; }
.field { display: grid; gap: 8px; margin: 26px 0; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); background: var(--paper); padding: 14px 16px; color: var(--ink); font: 1rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.payload { overflow: auto; max-height: 42vh; margin-top: 12px; padding: 16px; border: 1px solid var(--line); background: #fffef9; font: .92rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.txcard { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); margin: 10px 0 16px; }
.txrow { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: 14px; padding: 13px 16px; background: #fffef9; align-items: baseline; }
.txkey { color: var(--brass); font-weight: 700; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; }
.txval { color: var(--ink); word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .98rem; }
.txrow-amount .txval { font-size: 1.35rem; font-weight: 700; font-family: Georgia, serif; }
.txrow-risk .txval { color: var(--wax); font-weight: 700; text-transform: capitalize; }
.txempty { color: var(--brass); font-style: italic; padding: 4px 0; }
.wysiwys { font-size: .92rem; line-height: 1.5; opacity: .85; margin: 2px 0 8px; }
.privacy-note { max-width: 42ch; margin: -6px auto 0; text-align: center; color: var(--brass); font-size: .92rem; }
.txrow-context { background: #fbf8ef; }
.txrow-context .txkey { color: var(--wax); }
.txrow-context .txval { font-family: Georgia, serif; }
.verify-badge { font-size: .82rem; font-weight: 700; margin: 0 0 12px; padding: 7px 12px; border-radius: 6px; display: inline-block; }
.verify-ok { color: #166534; background: #dcfce7; }
.verify-warn { color: var(--wax); background: rgba(179,56,44,.12); }
.slider { position: relative; width: min(360px, 100%); height: 64px; border-radius: 999px; background: rgba(179,56,44,.1); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; }
.slider-track-label { color: var(--wax); font-weight: 700; letter-spacing: .04em; pointer-events: none; transition: opacity .2s; }
.slider-handle { position: absolute; left: 4px; top: 4px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--wax); color: #fffdf7; font-size: 1.4rem; line-height: 1; cursor: grab; box-shadow: 0 6px 16px rgba(179,56,44,.3); touch-action: none; }
.slider-handle:active { cursor: grabbing; }
.slider.armed { background: rgba(22,120,60,.16); }
.slider.done .slider-track-label { opacity: 0; }
.hash { display: grid; gap: 5px; color: var(--brass); font-size: .82rem; }
.hash code { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.technical-details { margin: 14px 0 10px; padding: 12px 14px; border: 1px dashed var(--line); background: rgba(156,124,76,.06); }
.technical-details summary { cursor: pointer; color: var(--brass); font-weight: 700; }
.technical-note { margin: 8px 0 10px; color: var(--brass); font-size: .88rem; }
.actions { display: grid; justify-items: center; gap: 18px; margin-top: 28px; }
.seal-button { border: 0; background: var(--wax); color: #fffdf7; padding: 16px 24px; min-height: 56px; border-radius: 999px; font: 700 1rem Georgia, serif; box-shadow: inset 0 -5px 0 rgba(0,0,0,.15), 0 16px 35px rgba(179,56,44,.25); cursor: pointer; }
.seal-round { width: 178px; height: 178px; border-radius: 50%; padding: 22px; font-size: 1.05rem; }
.text-button { border: 0; background: transparent; color: var(--brass); text-decoration: underline; font: 1rem Georgia, serif; cursor: pointer; }
.status { font-weight: 700; color: var(--wax); }
.passkey-status { margin-top: 10px; padding: 12px 14px; border: 1px solid rgba(179,56,44,.28); background: rgba(179,56,44,.07); color: var(--ink); }
.passkey-status.status-error { color: var(--wax); background: rgba(179,56,44,.11); }
.terminal { display: grid; gap: 10px; margin-top: 24px; padding: 18px; border: 1px solid rgba(179,56,44,.35); background: rgba(179,56,44,.07); color: var(--ink); }
.terminal-title { display: block; color: var(--wax); font-size: clamp(1.35rem, 5vw, 2.4rem); line-height: 1.05; }
.terminal-detail { display: block; line-height: 1.5; }
button:disabled, input:disabled { opacity: .62; cursor: wait; }
.actions.is-busy { opacity: .72; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
/* Landing + docs layout */
.landing.paper, .docs.paper { width: min(960px, 100%); }
.brand-nav { margin-left: auto; display: flex; gap: 18px; font-family: Georgia, serif; font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
.brand-nav a, .footer-nav a, .toc a { color: var(--brass); }
a.seal-button { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; text-align: center; justify-content: center; }
.section { margin-top: 22px; }
.section h2 { font-size: clamp(1.5rem, 4.5vw, 2.4rem); line-height: 1.05; margin: .15em 0 .5em; }
.section h3 { font-size: 1.12rem; margin: 1.1em 0 .3em; }
.hero h1 { margin-top: .15em; }
.lede { font-size: clamp(1.05rem, 2.6vw, 1.4rem); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 26px; }
.hero-cta-note { margin-top: 14px; font-size: .9rem; font-weight: 700; color: var(--brass); }
.trust-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: .86rem; color: var(--brass); }
.trust-strip li { display: flex; align-items: center; gap: 7px; }
.trust-strip li::before { content: "✓"; color: var(--wax); font-weight: 700; }
.trust-strip a { color: var(--brass); }
.hero-note { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .96rem; line-height: 1.5; color: var(--ink); opacity: .82; max-width: 54ch; }
.pricing-note { font-size: .96rem; line-height: 1.5; opacity: .82; max-width: 60ch; margin: 0 0 6px; }
.plan .soon { color: var(--brass); font-style: italic; }
.seal-glyph { font-size: 1.1em; }
.seal-button--round { border-radius: 999px; padding: 18px 30px; }
.muted { color: var(--brass); }
.label { color: var(--wax); text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 700; margin: 0 0 6px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(156,124,76,.12); padding: 1px 5px; border-radius: 4px; word-break: break-word; }

/* Live demo */
.demo-result { display: grid; grid-template-columns: 168px 1fr; gap: 22px; align-items: center; margin-top: 24px; padding: 18px; border: 1px solid var(--line); background: #fffef9; }
.demo-qr { width: 168px; height: 168px; }
.demo-qr svg { width: 100%; height: 100%; display: block; }
.demo-result-body { display: grid; gap: 12px; }
.demo-link { display: block; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; word-break: break-all; }
.demo-fallback { margin-top: 22px; padding: 18px; border: 1px dashed var(--line); background: rgba(156,124,76,.06); }

/* Lists */
.bullets { padding-left: 1.1em; display: grid; gap: 10px; }
.bullets li { line-height: 1.5; }
.steps { list-style: none; padding: 0; display: grid; gap: 22px; }
.steps > li { border-left: 3px solid rgba(179,56,44,.3); padding-left: 16px; min-width: 0; }
.binding { border-left: 3px solid var(--wax); padding: 10px 14px; background: rgba(179,56,44,.07); font-weight: 700; }

/* Legal tables (cookie inventory etc.) */
.legal-scroll { overflow-x: auto; margin: 14px 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 11px; border: 1px solid var(--line); line-height: 1.45; }
.legal-table th { color: var(--brass); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.legal-table code { word-break: break-all; }
.verify-form { display: grid; gap: 10px; margin-top: 18px; }
.verify-form label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brass); }
.verify-form button { width: max-content; border: 1px solid var(--line); background: rgba(156,124,76,.10); color: var(--ink); padding: 12px 22px; cursor: pointer; font: 1rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.verify-result { margin-top: 18px; }
.verify-result .bullets { margin-top: 8px; }
.verify-ok { color: #1a7f37; font-weight: 600; }
.verify-fail { color: #b3382c; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .verify-ok { color: #4ac26b; }
  .verify-fail { color: #f0857a; }
}

/* Code snippets */
.snippet { overflow: auto; max-width: 100%; padding: 14px 16px; border: 1px solid var(--line); background: #fbf7ee; font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.snippet code { background: none; padding: 0; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab { border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--brass); padding: 10px 16px; font: 700 .95rem Georgia, serif; cursor: pointer; }
.tab.is-active { color: var(--ink); border-color: var(--line); background: #fffef9; }

/* Two column + pricing */
.two-col, .pricing { display: grid; gap: 18px; margin-top: 8px; }
.two-col { grid-template-columns: 1fr 1fr; }
.pricing { grid-template-columns: repeat(4, 1fr); }
.pricing-lead { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.plan--featured .eyebrow { color: var(--wax); margin: 0 0 2px; }
.pricing-supporting { margin-top: 18px; opacity: .88; }
.plan { border: 1px solid var(--line); background: rgba(255,255,255,.5); padding: 22px; display: grid; gap: 12px; align-content: start; }
.plan--featured { border-color: var(--wax); box-shadow: 0 16px 40px rgba(179,56,44,.12); }
.plan .price { font-size: 2rem; font-weight: 700; margin: 0; color: var(--ink); }
.plan .price span { font-size: 1rem; color: var(--brass); font-weight: 400; }
.plan .seal-button { margin-top: auto; }

/* Approval preview card (hero) */
.approval-preview { margin-top: 26px; border: 1px solid var(--line); border-radius: 10px; background: #fffef9; max-width: 420px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; box-shadow: 0 16px 40px rgba(70,48,30,.08); }
.ap-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: rgba(179,56,44,.08); color: var(--wax); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.ap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wax); animation: apPulse 1.6s ease-in-out infinite; }
@keyframes apPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.ap-body { padding: 12px 14px; display: grid; gap: 7px; }
.ap-row { display: grid; grid-template-columns: 84px 1fr; gap: 10px; font-size: .86rem; }
.ap-k { color: var(--brass); text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; align-self: center; }
.ap-v { color: var(--ink); word-break: break-word; }
.ap-strong { font-size: 1.05rem; font-weight: 700; }
.ap-risks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ap-hash { color: var(--brass); font-size: .74rem; margin-top: 4px; }
.ap-foot { display: flex; border-top: 1px solid var(--line); }
.ap-approve { flex: 1; text-align: center; padding: 11px; background: var(--wax); color: #fffdf7; font-weight: 700; font-size: .86rem; }
.ap-reject { padding: 11px 16px; color: var(--brass); font-size: .86rem; }

/* Risk labels */
.risk { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 700 .7rem/1.5 Georgia, serif; text-transform: uppercase; letter-spacing: .03em; background: rgba(156,124,76,.16); color: var(--brass); white-space: nowrap; }
.risk-pay { background: #fde68a; color: #92400e; }
.risk-prod { background: #dbeafe; color: #1e40af; }
.risk-destroy { background: #fee2e2; color: #991b1b; }
.risk-admin { background: #ede9fe; color: #5b21b6; }

/* Use cases + audience */
.usecases { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 6px; }
.usecases li { display: flex; align-items: center; gap: 12px; line-height: 1.4; }
.who { grid-template-columns: repeat(3, 1fr); }

/* TOC + footer */
.toc { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.site-footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 430px) {
  .paper { padding: 18px 12px 32px; }
  .brand { margin-bottom: 20px; }
  .card { padding: 22px 16px; }
  .seal-round { width: 150px; height: 150px; }
  /* Let the nav drop onto its own full-width row with tappable targets
     instead of squeezing against the wordmark and overflowing. */
  .brand-nav { flex-basis: 100%; margin-left: 0; gap: 14px 22px; flex-wrap: wrap; }
  .brand-nav a, .footer-nav a, .toc a { padding: 4px 0; }
  .ap-row, .txrow { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 720px) {
  .two-col, .pricing { grid-template-columns: 1fr; }
  .demo-result { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .demo-result-body { justify-items: center; }
}
@media (max-width: 1000px) and (min-width: 721px) {
  .pricing { grid-template-columns: repeat(2, 1fr); }
}
/* Dark theme — follows the OS preference. Flips the palette tokens and the few
   hardcoded light surfaces; the wax/brass accents are brightened for contrast. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1b15;
    --ink: #ECE6D8;
    --wax: #E0655A;
    --brass: #CBAA6C;
    --line: rgba(255, 255, 255, .15);
    color-scheme: dark;
  }
  body { background: radial-gradient(circle at top, #211f18 0, #15140f 58%, #0e0d0a 100%); }
  .card { background: rgba(255, 255, 255, .045); box-shadow: 0 24px 90px rgba(0, 0, 0, .5); }
  .payload, .txrow, .demo-result, .approval-preview, .tab.is-active, .snippet, input { background: #14130e; }
  .txrow-context { background: #1b160d; }
  .plan { background: rgba(255, 255, 255, .045); }
  .verify-ok { background: rgba(22, 101, 52, .22); color: #86efac; }
  .verify-warn { background: rgba(224, 101, 90, .2); color: #fca5a5; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
