/* Dankore Vault design system. Every value here comes from DESIGN.md; change both together. */

/* ---------- Fonts (self-hosted, SIL OFL 1.1) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("../fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --gold: #E3A92B; --gold-deep: #B9831A; --gold-wash: #FBF1DA; --on-gold: #1A1206;
  --midnight: #0A1324; --midnight-raised: #13213A; --midnight-line: #24344F;
  --on-dark: #F6F1E7; --on-dark-muted: #AEB6C6;
  --paper: #FBF8F2; --surface: #FFFFFF; --sand: #F1EBDF;
  --ink: #0E1A2E; --ink-muted: #4B5568; --line: #DCD6CA;
  --success: #1E7F55; --danger: #B4372A; --info: #2457A6;

  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-pill: 999px;
  --s-xs: 8px; --s-sm: 12px; --s-md: 16px; --s-lg: 24px; --s-xl: 32px; --s-xxl: 48px;
  --s-section: 96px; --s-section-lg: 144px;

  --container: 1120px; --reading: 680px; --form: 520px;
  --shadow-soft: 0 12px 32px rgba(10, 19, 36, 0.10);
  --touch: 56px;
}
@media (max-width: 720px) { :root { --s-section: 64px; --s-section-lg: 96px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 19px; font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 var(--s-md); }
p:last-child { margin-bottom: 0; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
strong { font-weight: 700; }
ul, ol { padding-left: 1.2em; }

/* Focus is always visible: 3px gold ring, 2px offset. */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { border-radius: var(--r-pill); }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--gold); color: var(--on-gold);
  padding: 16px 24px; border-radius: var(--r-md); font-weight: 650; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* ---------- Typography ---------- */
.display, .h1, .h2, .h3, h1, h2, h3 { font-family: var(--font-display); color: inherit; margin: 0 0 var(--s-lg); }
.display { font-size: clamp(48px, 7vw, 88px); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }
.h1, h1 { font-size: clamp(38px, 5vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -0.015em; }
.h2, h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.1; }
.h3, h3 { font-size: 26px; font-weight: 700; line-height: 1.2; margin-bottom: var(--s-sm); }
.lead { font-size: clamp(21px, 2.2vw, 26px); font-weight: 500; line-height: 1.45; }
.label { font-size: 17px; font-weight: 650; line-height: 1.3; }
.small, .fine-print { font-size: 16px; line-height: 1.5; }
.eyebrow { font-family: var(--font-body); font-size: 15px; font-weight: 750; line-height: 1; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-deep); margin: 0 0 var(--s-md); }
.eyebrow--gold { color: var(--gold); }
code, .code { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.center { text-align: center; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--s-lg)); margin: 0 auto; padding: 0 var(--s-lg); }
.reading { max-width: calc(var(--reading) + 2 * var(--s-lg)); }
.container.reading { max-width: calc(var(--reading) + 2 * var(--s-lg)); }
.form-width { max-width: calc(var(--form) + 2 * var(--s-lg)); margin: 0 auto; padding: 0 var(--s-lg); }
.section { padding: var(--s-section) 0; }
.section--tight { padding-top: var(--s-xxl); }
.section--sand { background: var(--sand); }
.section--midnight { background: var(--midnight); color: var(--on-dark); }
.section--midnight a:not(.btn) { color: var(--on-dark); }
.section__title { max-width: 18ch; }
.grid { display: grid; gap: var(--s-lg); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-xxl); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-md); margin: var(--s-xl) 0 var(--s-lg); }
.actions--center { justify-content: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-sm);
  min-height: 60px; padding: 0 32px; border-radius: var(--r-pill); border: 2px solid transparent;
  font-family: var(--font-body); font-size: 19px; font-weight: 650; line-height: 1; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; text-align: center; }
.btn--primary { background: var(--gold); color: var(--on-gold); }
.btn--primary:hover, .btn--primary:active { background: var(--gold-deep); color: var(--on-gold); }
.btn--secondary-light { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--secondary-light:hover { background: var(--ink); color: var(--paper); }
.btn--secondary-dark { background: rgba(246, 241, 231, 0.08); border-color: var(--midnight-line); color: var(--on-dark); }
.btn--secondary-dark:hover { border-color: var(--on-dark-muted); color: var(--on-dark); background: rgba(246, 241, 231, 0.14); }
.btn--danger { background: var(--danger); color: #FFFFFF; }
.btn--danger:hover { background: #962D22; color: #FFFFFF; }
.btn--block { width: 100%; }
.btn--nav { min-height: var(--touch); padding: 0 24px; }

/* ---------- Forms (used from Phase 2 on) ---------- */
.field { margin-bottom: var(--s-lg); }
.field label { display: block; font-size: 17px; font-weight: 650; line-height: 1.3; margin-bottom: var(--s-xs); }
.field .hint { font-size: 16px; color: var(--ink-muted); margin: var(--s-xs) 0 0; }
.input { width: 100%; height: 64px; padding: 0 20px; background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-md); font: inherit; font-size: 20px; }
.input:focus { outline: none; border: 3px solid var(--gold); padding: 0 19px; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: 17px; font-weight: 650; margin: var(--s-xs) 0 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-xl); }
.card--dark { background: var(--midnight-raised); color: var(--on-dark); border-color: transparent; }
.card--gold { background: var(--gold-wash); color: var(--ink); border-color: transparent; }
.credits .card { margin-bottom: var(--s-lg); }
.credits .h2 { margin-top: var(--s-xxl); }
.credits .h2:first-child { margin-top: 0; }
.credit-list { padding-left: 1.2em; margin: 0 0 var(--s-lg); }
.credit-list li { margin-bottom: var(--s-sm); }
.callout { margin-top: var(--s-xxl); }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--r-md); padding: 20px 24px; border-left: 6px solid var(--info); background: var(--surface); }
.alert--success { border-left-color: var(--success); }
.alert--danger { border-left-color: var(--danger); }
.alert--info { border-left-color: var(--info); }
.alert--gold { border-left-color: var(--gold); background: var(--gold-wash); }
.signup-soon { margin-top: var(--s-xl); max-width: var(--reading); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-xl); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { display: flex; gap: var(--s-lg); align-items: flex-start; }
.step__number { flex: none; width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--gold); color: var(--on-gold);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 26px; font-weight: 700; }

/* ---------- Nav ---------- */
.site-nav { background: var(--midnight); color: var(--on-dark); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--midnight-line); }
.site-nav__inner { height: 80px; display: flex; align-items: center; gap: var(--s-xl); padding: 0 32px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-sm); color: var(--on-dark); text-decoration: none; min-height: var(--touch); }
.brand:hover { color: var(--on-dark); }
.brand__mark { width: 44px; height: 44px; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.01em; white-space: nowrap; }
.site-nav__links { display: flex; gap: var(--s-xs); margin-left: auto; }
.site-nav__links a, .site-nav__drawer a { color: var(--on-dark); text-decoration: none; font-weight: 650; font-size: 19px;
  min-height: var(--touch); display: inline-flex; align-items: center; padding: 0 var(--s-sm); border-radius: var(--r-sm); }
.site-nav__links a:hover, .site-nav__drawer a:hover { color: var(--gold); }
.site-nav__actions { display: flex; align-items: center; gap: var(--s-sm); }
.site-nav__menu { display: none; position: relative; }
.site-nav__menu summary { list-style: none; cursor: pointer; min-height: var(--touch); min-width: var(--touch); display: inline-flex;
  align-items: center; gap: var(--s-xs); padding: 0 var(--s-sm); border-radius: var(--r-pill); border: 2px solid var(--midnight-line); font-weight: 650; }
.site-nav__menu summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--on-dark); position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; } .menu-icon::after { top: 7px; }
.site-nav__drawer { position: absolute; right: 0; top: calc(100% + 12px); min-width: 260px; background: var(--midnight-raised);
  border: 1px solid var(--midnight-line); border-radius: var(--r-lg); padding: var(--s-sm); display: flex; flex-direction: column; box-shadow: var(--shadow-soft); }
@media (max-width: 960px) {
  .site-nav__links { display: none; }
  .site-nav__menu { display: block; }
  .site-nav__actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .site-nav__inner { padding: 0 var(--s-md); gap: var(--s-sm); }
  .brand__name { font-size: 20px; }
  .brand__mark { width: 36px; height: 36px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .btn--nav { padding: 0 16px; font-size: 17px; }
}
@media (max-width: 400px) { .brand__name { display: none; } }

/* ---------- Hero ---------- */
.hero { background: var(--midnight); color: var(--on-dark); padding: var(--s-section) 0 var(--s-section-lg); }
.hero__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s-xxl); align-items: center; }
.hero .lead { color: var(--on-dark); max-width: 34ch; }
.hero__note { color: var(--on-dark-muted); font-size: 17px; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } .hero__art { max-width: 460px; } }
.vault-card { background: var(--midnight-raised); border: 1px solid var(--midnight-line); border-radius: var(--r-xl); padding: var(--s-xl); }
.vault-card__head { display: flex; gap: var(--s-md); align-items: center; padding-bottom: var(--s-lg); border-bottom: 1px solid var(--midnight-line); }
.vault-card__title { font-family: var(--font-display); font-weight: 800; font-size: 26px; margin: 0; line-height: 1.2; }
.vault-card__sub { color: var(--gold); font-weight: 650; margin: 0; }
.vault-card__list { list-style: none; padding: 0; margin: var(--s-md) 0 0; }
.vault-card__list li { display: flex; align-items: center; gap: var(--s-md); padding: var(--s-md) 0; border-bottom: 1px solid var(--midnight-line); font-weight: 650; font-size: 20px; }
.vault-card__list li:last-child { border-bottom: 0; }
.vault-card__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); flex: none; }
.vault-card__hidden { margin-left: auto; color: var(--on-dark-muted); letter-spacing: 0.08em; }

/* ---------- Page head (inner pages) ---------- */
.page-head { background: var(--midnight); color: var(--on-dark); padding: var(--s-xxl) 0 var(--s-section); }
.page-head .lead { color: var(--on-dark); }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price { margin: var(--s-sm) 0 var(--s-lg); }
.price__amount { font-family: var(--font-display); font-size: 56px; font-weight: 800; line-height: 1; }
.price__period { font-size: 19px; font-weight: 650; color: var(--ink-muted); }
.price-card--featured { background: var(--midnight); color: var(--on-dark); border-color: var(--midnight); border-radius: var(--r-xl); box-shadow: var(--shadow-soft); }
.price-card--featured .price__period { color: var(--on-dark-muted); }
.price-card--featured .checks li::before { background: var(--gold); }
.badge { align-self: flex-start; background: var(--gold); color: var(--on-gold); font-size: 15px; font-weight: 750; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: var(--r-pill); padding: 8px 14px; margin-bottom: var(--s-md); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 36px; margin-bottom: var(--s-sm); }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 22px; height: 22px; border-radius: 50%; background: var(--success); }
.checks li::after { content: ""; position: absolute; left: 7px; top: calc(0.3em + 5px); width: 6px; height: 11px; border: solid #FFFFFF; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.price-card--featured .checks li::after { border-color: var(--on-gold); }
.fine-print { color: var(--ink-muted); margin-top: var(--s-xl); max-width: var(--reading); }

/* ---------- Emergency kit (Phase 5) ---------- */
.emergency-kit { background: #FFFFFF; border: 3px dashed var(--ink); border-radius: var(--r-lg); padding: var(--s-xl); font-family: var(--font-mono); font-size: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--midnight); color: var(--on-dark-muted); padding: var(--s-xxl) 0 var(--s-xl); }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--gold); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-xl); padding-bottom: var(--s-xl); border-bottom: 1px solid var(--midnight-line); }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__about p { margin-top: var(--s-md); max-width: 32ch; }
.site-footer__links, .site-footer__contact { display: flex; flex-direction: column; align-items: flex-start; }
.site-footer__links a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 650; }
.site-footer__contact a { font-weight: 650; margin-bottom: var(--s-sm); word-break: break-all; }
.site-footer .eyebrow { color: var(--gold); margin-bottom: var(--s-sm); }
.site-footer__legal { padding-top: var(--s-lg); font-size: 16px; }

/* ---------- Accounts (Phase 2) ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-muted); }
.lead-ish { font-size: 21px; line-height: 1.5; }
.inline-form { display: inline-flex; margin: 0; }
.site-nav__signin { color: var(--on-dark); font-weight: 650; text-decoration: none; min-height: var(--touch); display: inline-flex; align-items: center; padding: 0 var(--s-sm); border-radius: var(--r-sm); white-space: nowrap; }
.site-nav__signin:hover { color: var(--gold); }
.notice-bar { padding-top: var(--s-lg); }
.notice-bar .alert { max-width: var(--reading); }

.auth .h1 { font-size: clamp(36px, 4.4vw, 52px); }
.form-card { margin: var(--s-lg) 0; }
.form-alert { margin: var(--s-lg) 0 0; }
.form-link { margin: var(--s-lg) 0 0; text-align: center; }
.form-foot { margin: var(--s-lg) 0; text-align: center; font-weight: 650; }
.back-link { display: inline-flex; align-items: center; min-height: var(--touch); margin-bottom: var(--s-md); font-weight: 650; }
.back-link::before { content: "\2190"; margin-right: var(--s-xs); }
.two-passwords { margin-bottom: var(--s-lg); }
.link-button { background: none; border: 0; padding: 0 var(--s-sm); min-height: var(--touch); font: inherit; font-weight: 650; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--gold-deep); }
.text-link { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: 650; }
.text-link--danger { color: var(--danger); }
.text-link--danger:hover { color: #962D22; }
.btn--small { min-height: var(--touch); padding: 0 20px; font-size: 17px; }

/* Password field with a "Show" button (the button appears only when JavaScript runs). */
.password-field { position: relative; }
.password-field .input { padding-right: 96px; }
.password-field .input:focus { padding-right: 95px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 52px; min-width: 80px; padding: 0 var(--s-md);
  border: 0; border-radius: var(--r-sm); background: var(--sand); color: var(--ink); font: inherit; font-size: 17px; font-weight: 650; cursor: pointer; }
.password-toggle:hover { background: var(--line); }
.input--code { font-family: var(--font-mono); font-size: 26px; letter-spacing: 0.12em; }
.checkbox { display: flex; gap: var(--s-sm); align-items: flex-start; font-size: 19px; font-weight: 500; cursor: pointer; min-height: var(--touch); }
.checkbox input { width: 28px; height: 28px; margin: 2px 0 0; flex: none; accent-color: var(--gold-deep); }

/* Progress line for step-by-step flows: numbered gold circles. */
.progress { list-style: none; padding: 0; margin: 0 0 var(--s-xl); display: flex; gap: var(--s-sm); counter-reset: none; }
.progress__step { flex: 1; display: flex; flex-direction: column; gap: var(--s-xs); font-size: 16px; font-weight: 650; color: var(--ink-muted);
  padding-top: var(--s-sm); border-top: 4px solid var(--line); }
.progress__step.is-current, .progress__step.is-done { border-top-color: var(--gold); color: var(--ink); }
.progress__dot { width: 40px; height: 40px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 700; background: var(--sand); color: var(--ink); }
.progress__step.is-current .progress__dot, .progress__step.is-done .progress__dot { background: var(--gold); color: var(--on-gold); }

/* Signed-in pages */
.account-alert { margin: var(--s-lg) 0; max-width: var(--reading); }
.account-alert form { margin-top: var(--s-md); }
.account-grid { margin-top: var(--s-xl); }
.status-list { list-style: none; padding: 0; margin: 0 0 var(--s-md); }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-md); padding: var(--s-sm) 0; border-bottom: 1px solid var(--line); font-weight: 650; }
.pill { display: inline-flex; align-items: center; border-radius: var(--r-pill); padding: 4px 14px; font-size: 16px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.pill--ok { background: #E3F2EA; color: #155C3D; }
.pill--todo { background: var(--gold-wash); color: #7A5410; }
.settings-card { margin-top: var(--s-lg); }
.settings-card .h2 { margin-bottom: var(--s-md); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-md); flex-wrap: wrap; padding: var(--s-md) 0; border-top: 1px solid var(--line); }
.setting-row .label { margin: 0; }
.setting-value { margin: 0; word-break: break-word; }
.device-list { list-style: none; padding: 0; margin: var(--s-md) 0 var(--s-lg); }
.device { display: flex; justify-content: space-between; align-items: center; gap: var(--s-md); flex-wrap: wrap; padding: var(--s-md) 0; border-top: 1px solid var(--line); }
.device__name { font-weight: 700; margin: 0; }
.device__meta { color: var(--ink-muted); font-size: 17px; margin: 0; }

/* Two-step setup */
.qr-card { display: flex; flex-direction: column; align-items: center; gap: var(--s-md); }
.qr { width: 260px; max-width: 100%; background: #FFFFFF; padding: var(--s-xs); border-radius: var(--r-md); border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; }
.manual-key { width: 100%; }
.manual-key summary { cursor: pointer; font-weight: 650; min-height: var(--touch); display: flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.secret-key { font-size: 22px; letter-spacing: 0.08em; word-spacing: 0.3em; background: var(--sand); padding: var(--s-md); border-radius: var(--r-md); word-break: break-word; }
.recovery-codes { margin: var(--s-lg) 0; }
.recovery-codes__title { font-weight: 700; margin-bottom: var(--s-md); }
/* Numbers sit inside each code's box, so "10." never runs into the code beside it. */
.code-list { columns: 2; column-gap: var(--s-xl); list-style: none; counter-reset: code; padding-left: 0; margin: 0 0 var(--s-md); font-size: 22px; letter-spacing: 0.06em; }
.code-list li { counter-increment: code; margin-bottom: var(--s-xs); break-inside: avoid; white-space: nowrap; }
.code-list li::before { content: counter(code) "."; display: inline-block; min-width: 2.3em; letter-spacing: 0; }
@media (max-width: 480px) { .code-list { columns: 1; } }

/* Admin tables */
.table-wrap { padding: 0; overflow-x: auto; margin-top: var(--s-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 17px; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 700; background: var(--sand); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table code { font-size: 15px; }
.admin-subhead { margin-top: var(--s-xxl); }

@media (max-width: 560px) {
  .form-width { padding: 0 var(--s-md); }
  .card { padding: var(--s-lg); }
  .site-nav__signin { padding: 0 var(--s-xs); font-size: 17px; }
  .progress__step span:last-child { font-size: 15px; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .site-footer, .skip-link, .actions, .progress, .back-link, .notice-bar { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
  .hero, .page-head, .section--midnight, .section--sand { background: #FFFFFF; color: #000000; }
}

/* ---------- Billing (Phase 3) ---------- */
.page-hero { padding-block: var(--s-xxl) calc(var(--s-xxl) + 8px); }
.page-hero .lead { color: var(--on-dark-muted); margin: 0; }
.billing-banner a { font-weight: 700; white-space: nowrap; }

/* Plan picker: big radio cards. The whole card is the touch target. */
.plan-form { max-width: 880px; }
.plan-choices { border: 0; padding: 0; margin: 0 0 var(--s-lg); display: grid; gap: var(--s-lg); grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .plan-choices { grid-template-columns: 1fr; } }
.plan-choice { position: relative; display: flex; gap: var(--s-md); align-items: flex-start; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: var(--s-xl); min-height: var(--touch); }
.plan-choice:hover { border-color: var(--ink-muted); }
.plan-choice:has(input:checked) { border: 3px solid var(--gold-deep); padding: calc(var(--s-xl) - 1px); background: var(--gold-wash); }
.plan-choice:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.plan-choice input { width: 30px; height: 30px; margin: 6px 0 0; flex: none; accent-color: var(--gold-deep); }
.plan-choice__body { display: flex; flex-direction: column; gap: var(--s-sm); }
.plan-choice__name { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.2; }
.plan-choice__summary { color: var(--ink-muted); }
.plan-choice .price { margin: 0; }
.plan-choice .checks { display: flex; flex-direction: column; }
.check { position: relative; padding-left: 36px; margin-bottom: var(--s-xs); }
.check::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 22px; height: 22px; border-radius: 50%; background: var(--success); }
.check::after { content: ""; position: absolute; left: 7px; top: calc(0.3em + 5px); width: 6px; height: 11px; border: solid #FFFFFF; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.setup-choice { margin-bottom: var(--s-xl); }
.checkbox--big { font-size: 19px; line-height: 1.5; }
.next-steps { margin-bottom: var(--s-xl); max-width: var(--reading); }
.next-steps p { margin-bottom: var(--s-xs); }
@media (max-width: 560px) { .btn--block-mobile { width: 100%; } }
.pricing-next { margin-top: var(--s-xl); max-width: var(--reading); }
.pricing-next .actions { margin-top: var(--s-md); }

/* Questions and answers in plain words. */
.faq h3 { margin-top: var(--s-xl); }
.faq h3:first-child { margin-top: 0; }

/* Thank-you page steps: one column, compact. */
.steps--compact { grid-template-columns: 1fr; gap: var(--s-lg); margin: var(--s-xl) 0; }
.steps--compact .h3 { margin-bottom: 4px; }
/* Billing actions: full width on phones, and long labels wrap with room to breathe. */
.billing-actions .btn { line-height: 1.2; text-align: center; }
@media (max-width: 560px) {
  .billing-actions .inline-form, .billing-actions .btn { width: 100%; }
  .billing-actions .btn { padding-block: 14px; height: auto; min-height: 60px; }
}
.invoice-date { white-space: nowrap; }
.invoice-link { display: block; margin-top: 6px; font-weight: 650; }
@media (max-width: 560px) { #invoices .table th, #invoices .table td { padding: 12px 8px; } #invoices .table-wrap { margin-inline: -8px; } }

/* ---------- Client pages (Phase 5) ---------- */
.reading-width { max-width: var(--reading); }
.form-terms { margin-top: var(--s-md); text-align: center; }
.input--area { height: auto; min-height: 180px; padding: 16px 20px; line-height: 1.5; font: inherit; font-size: 20px; resize: vertical; }
.input--area:focus { padding: 15px 19px; }
.topic-choices { border: 0; padding: 0; margin: 0 0 var(--s-lg); }
.topic-choices legend { margin-bottom: var(--s-sm); padding: 0; }
.topic-choices .checkbox { margin-bottom: var(--s-xs); }
.pill--stop { background: #F6E1DE; color: #8E2A20; }

/* Articles, legal pages and other long reading: plain, roomy, big. */
.prose > h2, .prose .h2 { margin-top: var(--s-xxl); margin-bottom: var(--s-md); }
.prose > h3, .prose .h3 { margin-top: var(--s-xl); }
.prose p, .prose li { max-width: var(--reading); }
.prose-steps, .prose-list { margin: 0 0 var(--s-lg); padding-left: 1.6em; }
.prose-steps li, .prose-list li { margin-bottom: var(--s-sm); padding-left: 4px; }
.prose-steps li::marker { font-family: var(--font-display); font-weight: 800; color: var(--gold-deep); }
.prose-box { margin: var(--s-lg) 0; max-width: var(--reading); }
.prose-box p { margin-bottom: var(--s-xs); }
.legal-contents { margin-bottom: var(--s-xl); }
.legal-contents ol { margin: 0; padding-left: 1.4em; }
.legal-contents li { margin-bottom: 6px; }
.legal-contents a { display: inline-block; min-height: 32px; }

/* Help center */
.help-search { display: flex; gap: var(--s-sm); margin-top: var(--s-xl); max-width: 640px; }
.help-search .input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .help-search { flex-direction: column; } .help-search .btn { width: 100%; } }
.help-list { list-style: none; padding: 0; margin: 0 0 var(--s-lg); }
.help-list li { padding: var(--s-md) 0; border-bottom: 1px solid var(--line); }
.help-list a { font-weight: 700; font-size: 21px; }
.help-list p { margin: var(--s-xs) 0 0; color: var(--ink-muted); }
.help-links { list-style: none; padding: 0; margin: 0; }
.help-links li { border-top: 1px solid var(--line); }
.help-links li:first-child { border-top: 0; }
.help-links a { display: flex; align-items: center; min-height: var(--touch); padding: var(--s-xs) 0; font-weight: 650; }
.help-related { margin-top: var(--s-xxl); }
.help-topics .h3 { margin-bottom: var(--s-sm); }

/* Account home: checklist and apps */
.checklist-card { margin-top: var(--s-xl); }
.checklist { list-style: none; padding: 0; margin: var(--s-lg) 0 0; }
.checklist__item { display: flex; gap: var(--s-lg); align-items: flex-start; padding: var(--s-lg) 0; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.checklist__mark { flex: none; width: 48px; height: 48px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 22px; font-weight: 800; background: var(--sand); color: var(--ink); }
.checklist__item.is-next .checklist__mark { background: var(--gold); color: var(--on-gold); }
.checklist__item.is-done .checklist__mark { background: var(--success); position: relative; }
.checklist__item.is-done .checklist__mark::after { content: ""; width: 10px; height: 18px; border: solid #FFFFFF; border-width: 0 4px 4px 0; transform: translateY(-2px) rotate(45deg); }
.checklist__item.is-done .h3 { color: var(--ink-muted); margin: 10px 0 0; }
.checklist__body { flex: 1; min-width: 0; }
.checklist__body .h3 { margin-bottom: var(--s-xs); }
.checklist__body p { margin-bottom: var(--s-sm); }
.checklist__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-lg); }
.checklist__item.is-done .link-button { font-size: 16px; padding: 0; }
@media (max-width: 560px) { .checklist__item { gap: var(--s-md); } .checklist__mark { width: 40px; height: 40px; font-size: 19px; } }
.apps { margin-top: var(--s-xxl); scroll-margin-top: 110px; }
.app-card { display: flex; flex-direction: column; align-items: flex-start; }
.app-card .eyebrow { color: var(--gold-deep); margin-bottom: var(--s-sm); }
.app-card .btn { margin: var(--s-xs) 0 var(--s-sm); }
.app-card p:last-child { margin-top: auto; }
.code { overflow-wrap: anywhere; }

/* Family */
.family-list { list-style: none; padding: 0; margin: var(--s-xl) 0; display: grid; gap: var(--s-md); }
.family-person { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-lg); padding: var(--s-lg); }
.family-person__who { flex: 1 1 240px; min-width: 0; }
.family-person__name { font-weight: 700; font-size: 21px; margin: 0; }
.family-person__email { color: var(--ink-muted); margin: 0; word-break: break-all; }
.family-person__actions { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-lg); }
.family-add-title { margin-top: var(--s-xxl); }

/* How it works */
.how-steps { margin-top: 0; }
.how-devices { margin-top: var(--s-xxl); }

/* Emergency kit: a sheet of paper, on screen and in print */
.kit-note { margin-top: var(--s-lg); }
.kit { margin-top: var(--s-lg); color: var(--ink); }
.kit__head { display: flex; gap: var(--s-md); align-items: center; padding-bottom: var(--s-md); border-bottom: 2px solid var(--ink); margin-bottom: var(--s-md); }
.kit__logo { width: 56px; height: 56px; flex: none; }
.kit__brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0; }
.kit__title { font-family: var(--font-display); font-size: 34px; font-weight: 800; margin: 0; line-height: 1.1; }
.kit__meta { margin: 4px 0 0; font-size: 16px; }
.kit__section { padding: var(--s-sm) 0; border-bottom: 1px dashed var(--line); }
.kit__h { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: var(--s-xs) 0 var(--s-sm); }
.kit__fields { margin: 0; display: grid; gap: var(--s-sm); }
.kit__fields dt { font-family: var(--font-body); font-weight: 650; font-size: 16px; }
.kit__fields dd { margin: 2px 0 0; font-size: 20px; font-weight: 600; word-break: break-all; }
.kit__write dd { display: grid; gap: 30px; padding-top: 22px; }
.kit__line { display: block; border-bottom: 2px solid var(--ink); height: 2px; }
.kit p, .kit li { font-family: var(--font-body); font-size: 17px; line-height: 1.5; }
.kit__fields + p { margin-top: var(--s-sm); }
.kit ul { margin: 0; }
.kit__foot { padding-top: var(--s-md); }
.kit__foot p { margin-bottom: var(--s-xs); }
.site-footer__legal-links { display: flex; flex-wrap: wrap; gap: var(--s-lg); margin-top: var(--s-xs); }
.site-footer__legal-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; }

@media print {
  @page { margin: 12mm; }
  .kit-page > .container:first-child, .kit-page noscript { display: none !important; }
  .kit-page { padding: 0; }
  .kit-page .container { max-width: none; padding: 0; }
  .kit { margin: 0; border: 2px dashed #000000; padding: 6mm 7mm; }
  .kit__section { break-inside: avoid; padding: 4px 0; }
  .kit p, .kit li { font-size: 11pt; line-height: 1.4; margin-bottom: 2px; }
  .kit__head { padding-bottom: 6px; margin-bottom: 6px; }
  .kit__title { font-size: 22pt; }
  .kit__h { font-size: 13pt; margin: 2px 0 4px; }
  .kit__fields { gap: 4px; }
  .kit__fields dt { font-size: 10pt; }
  .kit__fields dd { font-size: 12pt; }
  .kit__write dd { gap: 20px; padding-top: 12px; }
  .kit__section { padding: 2px 0; }
  .kit ul { padding-left: 1.2em; }
  .kit__foot { padding-top: 6px; }
  a[href]::after { content: none; }
}

/* ---------- Admin console (Phase 6) ---------- */
.admin-nav { display: flex; flex-wrap: wrap; gap: var(--s-xs) var(--s-lg); margin: var(--s-md) 0 var(--s-xl); padding-bottom: var(--s-sm); border-bottom: 2px solid var(--line); }
.admin-nav a, .filter-links a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.admin-nav a:hover, .filter-links a:hover { border-bottom-color: var(--line); }
.admin-nav a[aria-current="page"], .filter-links a[aria-current="page"] { border-bottom-color: var(--gold); }
.count-badge { display: inline-block; min-width: 1.6em; padding: 0 8px; border-radius: var(--r-pill); background: var(--danger); color: #FFFFFF; font-size: 16px; text-align: center; }
.filter-links { display: flex; flex-wrap: wrap; gap: var(--s-xs) var(--s-md); margin: var(--s-md) 0; }
.admin-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-md); }
.admin-search .field { flex: 1 1 320px; margin-bottom: 0; }
.stat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-md); }
.stat { padding: 0; }
.stat a { display: block; padding: var(--s-lg); color: var(--ink); text-decoration: none; }
.stat a:hover .stat__label { text-decoration: underline; }
.stat__n { display: block; font-family: var(--font-display); font-size: 44px; font-weight: 800; line-height: 1.1; }
.stat__label { display: block; color: var(--ink-muted); font-weight: 650; }
.stat--alert { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.stat--alert .stat__n { color: var(--danger); }
.admin-list { padding-left: 1.2em; }
.admin-list li { margin-bottom: var(--s-xs); }
.danger-text { color: var(--danger); }
.vault-admin { margin-top: var(--s-md); }
.vault-admin__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-md); flex-wrap: wrap; margin-bottom: var(--s-sm); }
.vault-admin__who { font-weight: 800; font-size: 22px; margin: 0; }
.vault-admin__head .muted { margin: 0; word-break: break-word; }
.vault-admin__actions { display: flex; flex-wrap: wrap; gap: var(--s-md); align-items: flex-start; margin-top: var(--s-md); }
.lock-box { flex: 1 1 320px; }
.lock-box summary { cursor: pointer; font-weight: 700; color: var(--danger); padding: 10px 0; }
.lock-box[open] { padding: var(--s-md); border: 2px solid var(--danger); border-radius: var(--r-md); }
.note-list { list-style: none; padding: 0; margin: var(--s-lg) 0 0; }
.note-list li { border-top: 1px solid var(--line); padding: var(--s-md) 0; }
.note-list__meta { color: var(--ink-muted); font-size: 17px; margin: 0 0 var(--s-xs); }
.note-list__body, .request-card__message { white-space: pre-wrap; word-break: break-word; margin: 0; }
.request-card { margin-top: var(--s-md); }
.request-card__head { margin: 0; word-break: break-word; }
.request-card .muted { margin: 0 0 var(--s-sm); }
.request-card .inline-form { display: flex; flex-wrap: wrap; gap: var(--s-md); align-items: center; margin-top: var(--s-md); }
#notes form + .muted { margin-top: var(--s-lg); }

/* A second heading in the same card (the family card, then "Keep your account safe"). */
.card .actions + .h2 { margin-top: var(--s-xxl); }
