/* TrustWarden design system.
   Point of view: a trust page is a CITABLE RECORD, not a marketing page. Every
   statement carries a clause number (§2.3) and a stated-on date, so a reviewer
   can cite it in an email. The look follows: cool porcelain ground, marine ink,
   a mono apparatus for clauses/stamps/labels, sans for prose, and the serif
   reserved for the masthead — the letterhead of the record. Deliberately the
   inverse of VATWarden's warm ledger; same type family, different constitution. */

@font-face {
  font-family: 'Plex Sans';
  src: url('/assets/fonts/plex-sans-var.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Serif';
  src: url('/assets/fonts/plex-serif-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ground: #f7f8fa;
  --panel: #ffffff;
  --ink: #171b21;
  --muted: #5a6472;
  --faint: #8b93a1;
  --line: #d9dee5;
  --line-soft: #e7eaef;
  --brand: #1d3a5f;
  --brand-deep: #16304e;
  --wash: #e9eef5;
  --ok: #1e6f50;
  --ok-wash: #e6f2ec;
  --err: #a33636;
  --err-wash: #f7e9e9;
  --warn-wash: #f5efdf;
  --sans: 'Plex Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: 'Plex Serif', Georgia, serif;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(23, 27, 33, 0.05), 0 8px 24px rgba(23, 27, 33, 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; }
h1 { font-size: 1.7rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0.5rem 0 1rem; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-deep); }
code, pre, .mono { font-family: var(--mono); }
code { background: var(--wash); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.88em; }
pre {
  background: var(--ink); color: #e8ebf0; padding: 14px 16px; border-radius: var(--radius);
  overflow-x: auto; font-size: 0.85rem; line-height: 1.5;
}
pre code { background: none; padding: 0; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }
main.container { padding-top: 2rem; padding-bottom: 4rem; }
main.container.flush { max-width: none; padding: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- header / footer ---------- */

.site-header {
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  font-size: 1.05rem; text-decoration: none; color: var(--ink);
  letter-spacing: -0.02em;
}
.brand b { font-weight: 600; color: var(--brand); }
.brand span { font-weight: 400; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
/* Buttons keep their colors inside nav context (specificity restated on purpose). */
.nav-links a.btn { color: #fff; }
.nav-links a.btn:hover { color: #fff; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 32px;
  color: var(--faint); font-size: 0.85rem;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-block; background: var(--brand); color: #fff; border: 1px solid var(--brand);
  padding: 9px 16px; border-radius: var(--radius); font-size: 0.92rem; font-weight: 600;
  font-family: var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 0.85rem; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--wash); color: var(--brand-deep); }
.btn-danger { background: transparent; color: var(--err); border-color: var(--line); }
.btn-danger:hover { background: var(--err-wash); color: var(--err); }
.link-btn {
  background: none; border: none; padding: 0; color: var(--muted); font: inherit;
  font-size: 0.92rem; cursor: pointer; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--ink); }
.inline-form { display: inline; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="file"], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 0.95rem; background: var(--panel); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.field-hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
.stack > div { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.check input { width: auto; margin-top: 3px; }
.check label { font-weight: 400; margin: 0; font-size: 0.92rem; }

/* ---------- tables, cards, flashes ---------- */

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 0.75rem 0 1.25rem; font-size: 0.92rem; }
th { text-align: left; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
     letter-spacing: 0.06em; color: var(--faint); font-weight: 400; padding: 6px 10px 6px 0; }
td { border-top: 1px solid var(--line-soft); padding: 9px 10px 9px 0; vertical-align: top; }
tr:hover td { background: rgba(233, 238, 245, 0.35); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 1rem 0;
}

.flash { padding: 10px 14px; border-radius: var(--radius); margin: 1rem 0; font-size: 0.92rem; border: 1px solid; }
.flash-ok { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.flash-err { background: var(--err-wash); border-color: var(--err); color: var(--err); }
.flash-info { background: var(--wash); border-color: var(--brand); color: var(--brand-deep); }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; padding: 2px 8px;
  border-radius: 10px; border: 1px solid;
}
.badge-ok { color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.badge-err { color: var(--err); border-color: var(--err); background: var(--err-wash); }
.badge-neutral { color: var(--muted); border-color: var(--line); background: var(--ground); }

.meter { height: 6px; background: var(--line-soft); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.meter > div { height: 100%; background: var(--brand); width: 0; border-radius: 3px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 1.25rem 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.stat .l { font-size: 0.8rem; color: var(--muted); }

/* ---------- the record (public trust page + previews) ---------- */

.record {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow); max-width: 860px; margin: 2.5rem auto 3rem; padding: 0 0 8px;
}
.record-inner { padding: 0 44px 24px; }

.trust-masthead {
  padding: 40px 44px 28px; border-bottom: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap;
}
.trust-masthead h1 { font-family: var(--serif); font-weight: 600; font-size: 2rem; margin: 0 0 6px; }
.trust-masthead .meta { color: var(--muted); font-size: 0.92rem; }
.trust-masthead .meta a { color: var(--muted); }
.record-tag {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--brand); padding: 5px 10px; border-radius: 2px;
  white-space: nowrap;
}

.record-section { padding-top: 8px; }
.section-head {
  display: flex; align-items: baseline; gap: 12px; margin: 26px 0 4px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
.section-head .sno { font-family: var(--mono); color: var(--brand); font-size: 0.95rem; }
.section-head h2 { margin: 0; font-size: 1.1rem; }
.section-head .intro { display: none; }

.clause { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.clause:last-child { border-bottom: 0; }
.clause .cno { font-family: var(--mono); font-size: 0.8rem; color: var(--brand); }
.clause .cno a { color: inherit; text-decoration: none; }
.clause .cno a:hover { text-decoration: underline; }
.clause .body { font-size: 0.95rem; }
.clause .note { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.clause .stamp { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); white-space: nowrap; }
.clause:target { background: var(--wash); border-radius: 3px; }

.record table { font-size: 0.9rem; }
.record .table-note { color: var(--faint); font-size: 0.8rem; margin-top: -0.5rem; }

.record-footer {
  border-top: 1px solid var(--line); margin-top: 24px; padding: 14px 44px 16px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  color: var(--faint); font-size: 0.8rem;
}
.record-footer a { color: var(--muted); }

.subscribe-inline { display: flex; gap: 8px; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.subscribe-inline input { max-width: 280px; }

/* ---------- the gate ---------- */

.gate { max-width: 520px; margin: 3rem auto; }
.nda-text {
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-size: 0.85rem; color: var(--muted); max-height: 180px; overflow-y: auto;
}

/* ---------- landing ---------- */

.band { padding: 3.5rem 0; }
.band-dark { background: var(--brand); color: #eef2f7; }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark a { color: #cfdcec; }
.band-dark .btn { background: #fff; color: var(--brand); border-color: #fff; }
.band-dark .btn:hover { background: var(--wash); color: var(--brand-deep); }
.band-tint { background: var(--wash); }

.hero { display: grid; grid-template-columns: 5fr 6fr; gap: 40px; align-items: center; padding: 3rem 0 3.5rem; }
.hero h1 { font-family: var(--serif); font-size: 2.4rem; letter-spacing: -0.01em; margin-bottom: 1rem; }
.hero .sub { font-size: 1.05rem; color: var(--muted); margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* The landing demo is the real record CSS at small scale — the artifact sells
   itself, and it can never drift from what customers actually get. */
.mini-page { min-width: 0; }
.mini-page .record { margin: 0; transform: none; font-size: 0.85rem; }
.mini-page .trust-masthead { padding: 22px 26px 16px; }
.mini-page .trust-masthead h1 { font-size: 1.3rem; }
.mini-page .record-inner { padding: 0 26px 14px; }
.mini-page .record-footer { padding: 10px 26px 12px; }
.mini-page .clause { grid-template-columns: 46px 1fr auto; padding: 7px 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.5rem 0; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.step .k { font-family: var(--mono); color: var(--brand); font-size: 0.8rem; margin-bottom: 6px; }
.band-dark .step { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); }
.band-dark .step .k { color: #a9c1dd; }
.band-dark .step p { color: #cfdcec; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 1.5rem 0; }
.price-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.price-card .price { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 10px; }
.price-card .price span { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.price-card ul { padding-left: 1.1rem; margin: 0 0 1.25rem; font-size: 0.9rem; }
.price-card li { margin-bottom: 6px; }

/* ---------- wizard ---------- */

.wizard-progress { display: flex; align-items: center; gap: 14px; margin: 1rem 0 1.5rem; }
.wizard-progress .meter { flex: 1; margin-top: 0; }
.wizard-progress .count { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.qcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.qcard .qlabel { font-weight: 600; margin-bottom: 2px; }
.qcard .qhelp { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.qcard .opts { display: flex; flex-direction: column; gap: 6px; }
.qcard .opts .check { padding: 2px 0; }
.qcard .req { font-family: var(--mono); font-size: 0.68rem; color: var(--err); letter-spacing: 0.08em; margin-left: 6px; }
.qcard.answered { border-left: 3px solid var(--ok); }

.key-reveal {
  background: var(--warn-wash); border: 1px solid #c9b98a; border-radius: var(--radius);
  padding: 12px 14px; margin: 1rem 0; font-size: 0.92rem; word-break: break-all;
}

/* ---------- responsive & a11y ---------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .trust-masthead { padding: 28px 22px 20px; }
  .record-inner { padding: 0 22px 18px; }
  .record-footer { padding: 12px 22px 14px; }
  .clause { grid-template-columns: 44px 1fr; }
  .clause .stamp { grid-column: 2; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav-links a, .clause { transition: background-color 120ms ease, color 120ms ease; }
}
