/* Crest: Signal design system (shared with Knox), adapted for web.
   Flat Swiss. Two colors do the work: navy and red. Paper background, hairline
   borders, sharp corners, tracked-caps labels, big confident type. No third
   hue anywhere: verified/success states are navy with a navy or red check. */

:root {
  --paper:    #FBFBFD;
  --white:    #FFFFFF;
  --ink:      #14213D;
  --red:      #E11D33;
  --red-down: #C9182C;
  --panel:    #EEF2FB;
  --hairline: #D8DEEA;
  --gray:     #5E6A85;
  --display:  "Space Grotesk", "Inter", system-ui, sans-serif;
  --body:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
section { scroll-margin-top: 76px; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* -- Signal motif: the red top bar, pinned to the viewport ----------------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--red); z-index: 60; }
body { padding-top: 3px; }

/* -- Nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 3px; z-index: 50;
  background: rgba(251, 251, 253, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 21px;
  letter-spacing: -0.01em; color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.nav-links a:hover { color: var(--red); }
.nav-links .nav-login { color: var(--gray); }

/* -- Buttons -------------------------------------------------------------- */
.btn {
  appearance: none; border: 0; border-radius: 3px; cursor: pointer;
  font-family: var(--body); font-weight: 600; font-size: 14px;
  padding: 10px 18px; transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-down); }
.btn-navy { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-navy:hover { background: var(--ink); color: var(--paper); }
.btn-quiet { background: transparent; color: var(--gray); border: 1px solid var(--hairline); }
.btn-quiet:hover { border-color: var(--gray); color: var(--ink); }
.btn-nav { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 15px 24px; font-size: 15.5px; }
.btn-full { width: 100%; }
.btn-ic { width: 15px; height: 15px; flex: none; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn[disabled]:active { transform: none; }

.link-quiet {
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
}
.link-quiet:hover { border-bottom-color: var(--red); color: var(--red); }

/* -- Type helpers ----------------------------------------------------------*/
.eyebrow, .tag {
  font-family: var(--display); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray);
}
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--ink); }

/* -- Hero ------------------------------------------------------------------*/
.hero { padding: 84px 0 76px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 60px; align-items: start;
}
.hero-copy .eyebrow { margin-bottom: 18px; }
h1 {
  font-size: clamp(38px, 4.6vw, 56px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.015em;
}
.sub {
  margin: 22px 0 0; color: var(--gray); font-size: 17px; line-height: 1.65;
  max-width: 56ch;
}
.cta-row { display: flex; align-items: center; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.trust {
  margin-top: 28px; font-family: var(--display); font-size: 10.5px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--gray);
}

/* -- The demo card ---------------------------------------------------------*/
.demo {
  background: var(--white); border: 1px solid var(--hairline); border-radius: 4px;
  box-shadow: 0 24px 48px -32px rgba(20, 33, 61, 0.30);
  overflow: hidden;
}
.demo-head {
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 11px 18px; display: flex; align-items: center; justify-content: space-between;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; }
.demo-body { padding: 24px 22px 22px; }
.demo-foot {
  border-top: 1px solid var(--hairline); padding: 10px 16px; text-align: center;
  font-family: var(--display); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gray);
}
.demo h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.d-sub { color: var(--gray); font-size: 14px; line-height: 1.6; margin: 10px 0 18px; }
.d-actions { display: flex; gap: 10px; }
.d-actions .btn { flex: 1; }
.d-samplelink {
  display: block; margin: 14px auto 0; background: none; border: 0; cursor: pointer;
  font-size: 12.5px; color: var(--gray); text-decoration: underline;
  text-underline-offset: 3px;
}
.d-samplelink:hover { color: var(--red); }
.d-fine { font-size: 11.5px; color: var(--gray); text-align: center; margin: 14px 0 0; }

.d-status {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink); min-height: 22px;
}
.spin {
  width: 15px; height: 15px; margin-top: 2px; border-radius: 50%; flex: none;
  border: 2px solid var(--hairline); border-top-color: var(--red);
  animation: crestspin 0.9s linear infinite;
}
@keyframes crestspin { to { transform: rotate(360deg); } }
.d-hint {
  background: var(--panel); border-left: 3px solid var(--red);
  padding: 12px 14px; font-size: 13px; color: var(--gray); line-height: 1.55;
  margin: 14px 0 0;
}
.d-hint b { color: var(--ink); font-weight: 600; }
.d-steps { margin: 8px 0 0; padding-left: 20px; }
.d-steps li { margin-top: 4px; }
.d-stream { margin-top: 14px; }
.skel {
  height: 34px; border: 1px solid var(--hairline); border-radius: 3px;
  margin-bottom: 8px;
  background: linear-gradient(100deg, var(--white) 40%, var(--panel) 50%, var(--white) 60%);
  background-size: 200% 100%;
  animation: crestshimmer 1.4s ease-in-out infinite;
}
@keyframes crestshimmer { to { background-position: -200% 0; } }
.srow {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 2px; border-bottom: 1px solid var(--hairline); font-size: 12.5px;
}
.srow:last-child { border-bottom: 0; }
.srow .sd { color: var(--gray); font-family: var(--mono); font-size: 11px; flex: none; }
.srow .sn { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.srow .sa { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); flex: none; }
.srow .sa.excl { color: var(--gray); font-weight: 400; }
.d-cancelrow { text-align: right; margin-top: 12px; }
.d-cancel {
  background: none; border: 0; cursor: pointer; font-size: 12.5px;
  color: var(--gray); text-decoration: underline; text-underline-offset: 3px;
}
.d-cancel:hover { color: var(--red); }

/* Notices (error / info): panel with the red bar, palette only. */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel); border-left: 3px solid var(--red);
  padding: 14px 16px; margin-bottom: 14px;
}
.notice-ic { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--red); }
.notice-ic svg { width: 20px; height: 20px; display: block; }
.notice-ic.info { color: var(--gray); }
.notice-head { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.notice-body { font-size: 13px; color: var(--gray); line-height: 1.55; margin-top: 3px; }
.notice-cta { font-size: 13px; line-height: 1.55; margin-top: 9px; }
.notice-cta-lead { color: var(--gray); }
.notice-cta-link {
  color: var(--red); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color 0.15s;
}
.notice-cta-link:hover { border-bottom-color: var(--red); }
.notice-ref { font-family: var(--mono); font-size: 10.5px; color: var(--gray); margin-top: 8px; }

/* Result: the income certificate. */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 2px;
}
.chip-sealed { background: var(--ink); color: var(--paper); }
.chip-sealed .dot { width: 6px; height: 6px; }
.chip-sample { border: 1px solid var(--hairline); color: var(--gray); }
.r-kicker {
  margin-top: 16px; font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray);
}
.r-big {
  font-family: var(--display); font-size: 46px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.r-big .permo { font-size: 17px; font-weight: 500; color: var(--gray); margin-left: 6px; }
.r-method { font-size: 13px; color: var(--gray); margin-top: 3px; }
.r-rows { margin-top: 16px; border-top: 1px solid var(--hairline); }
.r-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px;
}
.r-row .k { color: var(--gray); }
.r-row .v { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.r-lever {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--red); font-size: 12px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.r-lever:hover { color: var(--red-down); }
.r-catline { font-size: 12px; color: var(--gray); margin-top: 12px; line-height: 1.6; }

.certpanel { margin-top: 16px; border: 1px solid var(--hairline); border-radius: 3px; overflow: hidden; }
.certpanel-head {
  background: var(--ink); color: var(--paper); padding: 9px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.certpanel-head .seal { display: inline-flex; align-items: center; gap: 7px; }
.certpanel-body { padding: 6px 14px; background: var(--white); }
.cp-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px;
}
.cp-row:last-child { border-bottom: 0; }
.cp-row .k { color: var(--gray); }
.cp-row .v { color: var(--ink); font-weight: 500; text-align: right; }
.cp-row .v.mono { font-family: var(--mono); font-size: 11.5px; }
.check { width: 14px; height: 14px; color: var(--ink); vertical-align: -2px; }

.dep-table { margin-top: 16px; border: 1px solid var(--hairline); border-radius: 3px; overflow: hidden; }
.dep-scroll { overflow-x: auto; }
.dep-table table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.dep-table th {
  background: var(--ink); color: var(--paper); text-align: left;
  font-family: var(--display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 12px;
  white-space: nowrap;
}
.dep-table td {
  padding: 8px 12px; border-bottom: 1px solid var(--hairline);
  color: var(--gray); white-space: nowrap;
}
.dep-table tr:last-child td { border-bottom: 0; }
.dep-table td.dn { color: var(--ink); font-weight: 500; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.dep-table td.da { text-align: right; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--ink); }
.dep-table tr.excl td.da, .dep-table tr.excl td.dn { color: var(--gray); font-weight: 400; }
.dep-chip {
  display: inline-block; font-family: var(--display); font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px;
  border-radius: 2px; border: 1px solid var(--ink); color: var(--ink);
}
.dep-chip.excl { border-color: var(--hairline); color: var(--gray); }
.dep-more { text-align: center; font-size: 11.5px; color: var(--gray); padding: 8px; background: var(--paper); }
/* Capture-analysis panels: one component per registered brook_analysis module
   (rendered from the generic analysis payload; new modules appear here
   automatically). Live runs only — the sample has no capture behind it. */
.mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin-top: 12px; }
.modcard { border: 1px solid var(--hairline); border-radius: 3px; background: var(--white);
  padding: 12px 14px; }
.modcard .mk { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gray); font-weight: 600; }
.modcard .mv { font-family: var(--display); font-size: 20px; color: var(--ink);
  margin: 2px 0 6px; }
.modcard .mrow { display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--gray); padding: 1px 0; }
.modcard .mrow b { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* Officer drill-down: pull the full transaction detail the sealed view omits. */
.r-exports { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--hairline); }
.r-export { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: none; }
.r-export:hover { color: var(--red); }
.r-export svg { width: 15px; height: 15px; }
.r-btns { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.r-btns .btn { flex: 1; min-width: 140px; font-size: 13px; padding: 11px 12px; }

/* -- Full-width capture result (below the hero) --------------------------- */
.rsec[hidden] { display: none; }
.rsec { padding: 44px 0 12px; border-top: 1px solid var(--hairline); }
.rr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.rr-title { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-top: 4px; }
.rr-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 30px; align-items: start; }
.rr-big { font-family: var(--display); font-weight: 700; font-size: 50px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.rr-big .permo { font-family: var(--body); font-size: 18px; font-weight: 500; color: var(--gray); margin-left: 8px; }
.rr-metrics .r-method { margin-top: 6px; }
.rr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.rr-stat { border: 1px solid var(--hairline); border-radius: 3px; padding: 13px 14px; }
.rr-stat-v { font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rr-stat-k { font-size: 11.5px; color: var(--gray); margin-top: 5px; line-height: 1.35; }
.rr-metrics .r-catline { margin-top: 16px; }
.rr-side .certpanel { margin-top: 0; }
.rr-block { margin-top: 32px; }
.rr-block .rr-subhead { margin-bottom: 12px; }
.rr-block .dep-table, .rr-block .mods { margin-top: 0; }
.rr-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.rr-foot .r-exports { margin-top: 0; padding-top: 0; border-top: 0; }
.rr-foot .r-btns { margin-top: 0; }
.rr-foot .r-btns .btn { flex: none; min-width: 160px; }

/* The hero card's compact sealed confirmation. */
.d-done-big { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.d-done-big .permo { font-family: var(--body); font-size: 15px; font-weight: 500; color: var(--gray); margin-left: 6px; }
.d-done .r-method { margin-top: 4px; }
.d-done .d-sub { margin: 14px 0 16px; }
.d-done .btn + .btn { margin-top: 10px; }

@media (max-width: 900px) {
  .rr-grid { grid-template-columns: 1fr; gap: 24px; }
  .rr-stats { grid-template-columns: repeat(2, 1fr); }
  .rr-big { font-size: 42px; }
}
@media (max-width: 560px) {
  .rr-foot { flex-direction: column; align-items: stretch; }
  .rr-foot .r-btns { width: 100%; }
  .rr-foot .r-btns .btn { flex: 1; min-width: 0; }
}

/* -- Proof strip (navy band) ------------------------------------------------*/
.proof { background: var(--ink); color: var(--paper); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-cell { padding: 34px 26px; border-left: 1px solid rgba(251, 251, 253, 0.14); }
.proof-cell:first-child { border-left: 0; }
.proof-num {
  font-family: var(--display); font-size: 40px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1;
}
.proof-label {
  margin-top: 10px; font-family: var(--display); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: rgba(251, 251, 253, 0.66);
  line-height: 1.7;
}

/* -- Sections ---------------------------------------------------------------*/
.section { padding: 92px 0 0; }
.section:last-of-type, #pricing { padding-bottom: 96px; }
.section-tight { padding-top: 64px; }
.sechead { margin-bottom: 40px; }
.ruleline { height: 4px; background: var(--ink); margin-bottom: 22px; }
.secrow { display: flex; align-items: flex-start; gap: 26px; }
.num {
  font-family: var(--display); font-size: 64px; font-weight: 700; line-height: 0.9;
  color: var(--red); letter-spacing: -0.02em; flex: none;
}
h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: -0.012em; line-height: 1.15; margin-top: 8px; }

.callout {
  background: var(--panel); border-left: 3px solid var(--red);
  padding: 30px 34px; max-width: 880px;
}
.callout p { margin: 0; font-size: 17px; line-height: 1.75; color: var(--gray); }
.callout b { color: var(--ink); font-weight: 600; }
.lede { max-width: 780px; color: var(--gray); font-size: 16.5px; line-height: 1.7; margin: 0 0 40px; }

/* -- How it works ------------------------------------------------------------*/
.how-grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: 56px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: 0; }
.step-num {
  font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--red);
  line-height: 1.2; flex: none; width: 30px;
}
.step h3 { font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin: 6px 0 0; font-size: 14.5px; color: var(--gray); line-height: 1.65; }

/* The certificate mock (also reused in the borrower frame). */
.cert { border: 1px solid var(--hairline); border-radius: 3px; overflow: hidden; background: var(--white); }
.cert-head {
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.cert-seal { display: inline-flex; align-items: center; gap: 7px; }
.cert-body { padding: 18px 18px 14px; }
.cert-kicker {
  font-family: var(--display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray);
}
.cert-big {
  font-family: var(--display); font-size: 38px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.cert-permo { font-size: 15px; font-weight: 500; color: var(--gray); margin-left: 5px; }
.cert-method { font-size: 12.5px; color: var(--gray); margin-top: 3px; }
.cert-rows { margin-top: 14px; border-top: 1px solid var(--hairline); }
.crow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px;
}
.crow:last-child { border-bottom: 0; }
.crow .k { color: var(--gray); }
.crow .v { color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.crow .v.mono { font-family: var(--mono); font-size: 11.5px; font-weight: 400; }
.cert-prov { margin-top: 12px; background: var(--panel); padding: 4px 12px; border-radius: 2px; }
.cert-prov .crow { border-bottom-color: rgba(20, 33, 61, 0.08); }
.mock-caption, .frame-caption {
  margin-top: 14px; text-align: center;
  font-family: var(--display); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray);
}

/* -- Why cards ---------------------------------------------------------------*/
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card {
  background: var(--white); border: 1px solid var(--hairline);
  border-top: 3px solid var(--red); border-radius: 3px; padding: 24px 22px;
}
.why-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.why-card p { margin: 10px 0 0; font-size: 14px; color: var(--gray); line-height: 1.65; }

/* -- Borrower frames -----------------------------------------------------------*/
.frames { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: start; }
.frame { margin: 0; }
.frame-chrome {
  display: flex; gap: 6px; align-items: center;
  background: var(--panel); border: 1px solid var(--hairline); border-bottom: 0;
  border-radius: 3px 3px 0 0; padding: 9px 14px;
}
.frame-chrome span { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); }
.frame-body {
  border: 1px solid var(--hairline); border-radius: 0 0 3px 3px;
  background: var(--white); padding: 26px;
}
.frame-title { font-family: var(--display); font-size: 17px; font-weight: 600; }
.frame-text { font-size: 13.5px; color: var(--gray); line-height: 1.6; margin: 8px 0 16px; }
.dropzone {
  border: 1.5px dashed var(--hairline); border-radius: 3px; padding: 28px 20px;
  text-align: center; color: var(--gray); font-size: 13px;
}
.dropzone svg { width: 26px; height: 26px; color: var(--ink); margin-bottom: 8px; }
.choosefile {
  display: inline-block; margin-top: 10px; border: 1px solid var(--ink); color: var(--ink);
  border-radius: 3px; padding: 7px 14px; font-size: 12.5px; font-weight: 600;
}
.frame-fine { margin-top: 14px; text-align: center; font-size: 11px; color: var(--gray); }
.cert-mini .cert-big { font-size: 32px; }

/* -- Security -------------------------------------------------------------------*/
.sec-card {
  background: var(--white); border: 1px solid var(--hairline); border-radius: 3px;
  padding: 22px 20px;
}
.sec-ic { width: 26px; height: 26px; color: var(--ink); margin-bottom: 12px; }
.sec-card h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.sec-card p { margin: 8px 0 0; font-size: 13.5px; color: var(--gray); line-height: 1.6; }
.compliance {
  margin-top: 34px; text-align: center;
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray);
}
.enterprise {
  margin: 22px auto 0; max-width: 640px; text-align: center;
  background: var(--panel); border-left: 3px solid var(--red);
  padding: 14px 20px; font-size: 14px; color: var(--gray);
}

/* -- Pricing ----------------------------------------------------------------------*/
.price-grid { align-items: stretch; }
.price-card {
  background: var(--white); border: 1px solid var(--hairline); border-radius: 3px;
  padding: 28px 26px; display: flex; flex-direction: column;
}
.price-featured { border-top: 3px solid var(--red); }
.price-name {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray);
}
.price-amount {
  font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.015em; margin-top: 10px;
}
.price-unit { font-size: 13px; font-weight: 500; color: var(--gray); margin-left: 7px; letter-spacing: 0; }
.price-talk { font-size: 28px; }
.price-list { list-style: none; margin: 18px 0 24px; padding: 0; flex: 1; }
.price-list li {
  position: relative; padding: 7px 0 7px 24px; font-size: 13.5px; color: var(--gray);
  line-height: 1.55; border-bottom: 1px solid var(--hairline);
}
.price-list li:last-child { border-bottom: 0; }
.price-list li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 10px; height: 6px;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}
.price-note { margin: 26px 0 0; text-align: center; font-size: 12.5px; color: var(--gray); }

/* -- Footer -------------------------------------------------------------------------*/
.footer { background: var(--ink); color: var(--paper); margin-top: 96px; padding: 60px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .brand-name { color: var(--paper); }
.footer-line { margin: 14px 0 0; max-width: 380px; font-size: 13.5px; color: rgba(251, 251, 253, 0.66); line-height: 1.65; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-size: 13.5px; color: rgba(251, 251, 253, 0.85); }
.footer-links a:hover { color: var(--red); }
.footer-signoff {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(251, 251, 253, 0.16);
  font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
}
.footer-copy { margin-top: 8px; font-size: 12px; color: rgba(251, 251, 253, 0.55); }

/* -- Code blocks (the get-started section) ---------------------------------- */
.codewrap {
  border: 1px solid var(--hairline); border-radius: 4px; overflow: hidden;
  background: var(--ink);
}
.codehead {
  display: flex; justify-content: space-between; align-items: center;
  background: #0E1830; color: rgba(251, 251, 253, 0.62);
  font-family: var(--display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 8px 14px;
}
.copybtn {
  background: none; border: 1px solid rgba(251, 251, 253, 0.22); border-radius: 2px;
  color: rgba(251, 251, 253, 0.72); font-family: var(--body); font-size: 11px;
  font-weight: 600; padding: 3px 10px; cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.copybtn:hover { color: var(--white); border-color: rgba(251, 251, 253, 0.55); }
pre.code {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: #E7ECF7;
}
pre.code .c  { color: #7E8BA8; }             /* comment */
pre.code .p  { color: var(--red); user-select: none; }  /* shell prompt */
pre.code .s  { color: #BFD0F2; }             /* string */
.gs-steps { display: grid; gap: 26px; max-width: 880px; }
.gs-step .gs-label {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 10px;
}
.gs-step .gs-label .gs-n { color: var(--red); margin-right: 8px; }
.gs-step p { margin: 10px 0 0; font-size: 13.5px; color: var(--gray); line-height: 1.65; }
.gs-note {
  background: var(--panel); border-left: 3px solid var(--red);
  padding: 14px 18px; font-size: 13.5px; color: var(--gray); line-height: 1.65;
  max-width: 880px; margin-top: 26px;
}
.gs-note b { color: var(--ink); }
.keys-table { border: 1px solid var(--hairline); border-radius: 3px; overflow: hidden; max-width: 880px; margin-top: 26px; }
.keys-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.keys-table th {
  background: var(--ink); color: var(--paper); text-align: left;
  font-family: var(--display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 14px;
}
.keys-table td { padding: 9px 14px; border-bottom: 1px solid var(--hairline); color: var(--gray); vertical-align: top; }
.keys-table tr:last-child td { border-bottom: 0; }
.keys-table td.mono { font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; }

/* -- SDK status readout (demo card foot) ------------------------------------- */
.demo-foot .sdkstat { font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.demo-foot .sdkstat b { color: var(--ink); font-weight: 600; }

/* -- Reveal on scroll ----------------------------------------------------------------------*/
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .skel { animation: none; }
  .spin { animation-duration: 1.8s; }
}

/* -- Print: the certificate only -------------------------------------------------------------*/
#printcert { display: none; }
@media print {
  body > *:not(#printcert) { display: none !important; }
  #printcert { display: block; padding: 40px 8%; font-family: var(--body); color: var(--ink); }
  .pc-head { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--ink); padding-bottom: 18px; }
  .pc-head .brand-mark { width: 40px; height: 40px; }
  .pc-title { font-family: var(--display); font-size: 19px; font-weight: 700; }
  .pc-sub { font-size: 12px; color: var(--gray); margin-top: 2px; }
  .pc-big { font-family: var(--display); font-size: 44px; font-weight: 700; margin-top: 28px; }
  .pc-method { font-size: 14px; color: var(--gray); margin-top: 4px; }
  .pc-table { border-collapse: collapse; width: 100%; margin-top: 22px; font-size: 13px; }
  .pc-table td { padding: 8px 0; border-bottom: 1px solid var(--hairline); }
  .pc-table td:last-child { text-align: right; font-weight: 600; }
  .pc-hashlabel { margin-top: 26px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); }
  .pc-hash { font-family: var(--mono); font-size: 11px; word-break: break-all; margin-top: 6px; }
  .pc-foot { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--gray); }
}

/* -- Sample-case picker (modal) --------------------------------------------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 33, 61, 0.55); }
.modal-card {
  position: relative; z-index: 1;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 4px;
  box-shadow: 0 32px 64px -28px rgba(20, 33, 61, 0.45);
  width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: crestpop 0.16s ease-out;
}
@keyframes crestpop { from { opacity: 0; transform: translateY(8px); } }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 3px; cursor: pointer; color: var(--gray);
}
.modal-x:hover { color: var(--ink); background: var(--panel); }
.modal-x svg { width: 18px; height: 18px; }
.modal-head { padding: 26px 26px 18px; border-bottom: 1px solid var(--hairline); }
.modal-head .tag { display: block; }
.modal-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; margin-top: 8px; }
.modal-sub { color: var(--gray); font-size: 13.5px; line-height: 1.6; margin: 10px 0 0; max-width: 52ch; }
.modal-body {
  padding: 18px 26px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-empty { color: var(--gray); font-size: 13.5px; padding: 18px 0; text-align: center; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.modal-note {
  font-family: var(--display); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gray);
}

/* Each sample case is one clickable card that creates the case on click. */
.scase {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 4px;
  overflow: hidden; transition: border-color 0.15s, background 0.15s;
}
.scase:has(.scase-run:hover), .scase:has(.scase-run:focus-visible) {
  border-color: var(--red); background: var(--panel);
}
/* The "create case" action: everything but the download links. */
.scase-run {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; font-family: var(--body);
  padding: 16px 18px 12px;
}
.scase-run:focus-visible { outline: none; }
.scase-main { flex: 1; min-width: 0; }
.scase-title { display: block; font-family: var(--display); font-size: 15.5px; font-weight: 600; color: var(--ink); }
.scase-blurb { display: block; color: var(--gray); font-size: 13px; line-height: 1.5; margin-top: 6px; }
.scase-go { flex: none; color: var(--hairline); display: flex; }
.scase:has(.scase-run:hover) .scase-go, .scase:has(.scase-run:focus-visible) .scase-go { color: var(--red); }
.scase-go svg { width: 22px; height: 22px; }
/* The statements in the bundle — shown for context, not individually clickable. */
.scase-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; }
.scase-file {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; color: var(--gray);
  background: var(--panel); border-radius: 2px; padding: 4px 8px;
}
.scase-file > svg { width: 12px; height: 12px; flex: none; }
/* Foot: the primary "try this sample" CTA + the bundle download (static .zip). */
.scase-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 2px 18px 16px; }
.scase-try {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: 12px; font-weight: 600;
  background: var(--red); color: var(--white); border: 0; border-radius: 3px;
  padding: 8px 15px; cursor: pointer; transition: background 0.15s;
}
.scase-try:hover { background: var(--red-down); }
.scase-try:active { transform: translateY(1px); }
.scase-download {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--gray);
  border: 1px solid var(--hairline); border-radius: 3px; padding: 7px 12px;
  transition: border-color 0.15s, color 0.15s;
}
.scase-download:hover, .scase-download:focus-visible { border-color: var(--red); color: var(--red); }
.scase-download svg { width: 15px; height: 15px; flex: none; }
body.modal-open { overflow: hidden; }

/* -- Email gate + toast ------------------------------------------------------------------------*/
.modal-card-sm { max-width: 440px; }
.em-body { gap: 8px; }
.em-label {
  font-family: var(--display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
}
.em-input {
  width: 100%; box-sizing: border-box;
  font-family: var(--body); font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 4px;
  background: var(--white); transition: border-color 0.15s, background 0.15s;
}
.em-input::placeholder { color: #9AA6BD; }
.em-input:focus { outline: none; border-color: var(--red); }
.em-input.invalid { border-color: var(--red); background: #FEF3F4; }
.em-error { color: var(--red); font-size: 12.5px; font-weight: 500; }
.em-note {
  display: flex; gap: 9px; align-items: flex-start; margin: 6px 0 0;
  color: var(--gray); font-size: 12.5px; line-height: 1.55;
  background: var(--panel); border-radius: 4px; padding: 11px 13px;
}
.em-note-ic { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--red); }
.em-actions { display: flex; gap: 10px; }
.em-actions .btn { padding: 9px 18px; font-size: 13.5px; }

/* Persistent "emailed to …" confirmation inside the result card. */
.d-emailed {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 16px 0 14px; padding: 12px 14px;
  background: var(--panel); border-radius: 6px; border-left: 3px solid var(--hairline);
  font-size: 13px; line-height: 1.5; color: var(--ink);
}
.d-emailed-ic { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--gray); }
.d-emailed b { font-weight: 600; }
.d-emailed.pending, .d-emailed.pending .d-emailed-ic { color: var(--gray); }
.d-emailed.ok { border-left-color: #1FA463; }
.d-emailed.ok .d-emailed-ic { color: #1FA463; }
.d-emailed.warn { border-left-color: #E0972B; }
.d-emailed.warn .d-emailed-ic { color: #E0972B; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 120;
  transform: translateX(-50%) translateY(10px);
  display: flex; align-items: center; gap: 11px; max-width: min(92vw, 460px);
  background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: 13.5px; line-height: 1.45;
  padding: 13px 18px; border-radius: 6px;
  box-shadow: 0 18px 40px -16px rgba(20, 33, 61, 0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { font-weight: 600; }
.toast a { color: #9CC0FF; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--red); }
.toast.ok .toast-dot { background: #33D17A; }
.toast.warn .toast-dot { background: #F5A623; }
.toast.pending .toast-dot { background: #7FA0D8; animation: crestpulse 1s ease-in-out infinite; }
@keyframes crestpulse { 50% { opacity: 0.25; } }
@media (max-width: 560px) {
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; transform: translateY(10px); }
  .toast.show { transform: translateY(0); }
  .em-actions { width: 100%; }
  .em-actions .btn { flex: 1; }
}

/* -- Responsive --------------------------------------------------------------------------------*/
@media (max-width: 1020px) {
  .hero { padding: 56px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .demo { max-width: 560px; margin: 0 auto; width: 100%; }
  .how-grid { grid-template-columns: 1fr; gap: 44px; }
  .mock { max-width: 520px; margin: 0 auto; width: 100%; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-cell { border-left: 0; border-top: 1px solid rgba(251, 251, 253, 0.14); }
  .proof-cell:nth-child(-n+2) { border-top: 0; }
  .proof-cell:nth-child(even) { border-left: 1px solid rgba(251, 251, 253, 0.14); }
}
@media (max-width: 860px) {
  .nav-links a:not(.nav-login) { display: none; }
  .nav-links .nav-login { display: none; }
  .grid3 { grid-template-columns: 1fr; }
  .frames { grid-template-columns: 1fr; }
  .section { padding-top: 64px; }
  .num { font-size: 46px; }
  .secrow { gap: 18px; }
  .callout { padding: 22px 24px; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .grid4 { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-cell { border-left: 0 !important; }
  .proof-cell:not(:first-child) { border-top: 1px solid rgba(251, 251, 253, 0.14); }
  .btn-lg { width: 100%; }
  .r-btns .btn { min-width: 100%; }
  .modal { padding: 0; align-items: stretch; }
  .modal-card { max-width: none; max-height: 100vh; border: 0; border-radius: 0; }
  .modal-head { padding: 24px 20px 16px; }
  .modal-body { padding: 16px 20px; }
  .modal-foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .modal-foot .btn { width: 100%; }
  .modal-note { text-align: center; }
}
