/* ==========================================================================
   BOKS — shared design system
   Dark, minimal, Nordic. One accent. Thin lines. Big type.
   Used by every public page and by the dashboard (app.css layers on top).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts (local variable woff2, latin + latin-ext)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  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-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jbmono-latin.woff2") format("woff2");
  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-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jbmono-latin-ext.woff2") format("woff2");
  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 {
  color-scheme: dark;
  accent-color: var(--accent);
  --bg: #0a0a0b;
  --bg-elev: #111113;
  --bg-elev-2: #17171a;
  --bg-elev-3: #1e1e22;
  --line: #26262b;
  --line-strong: #3a3a41;
  --text: #f2f2ef;
  --muted: #9a9aa3;
  --dim: #6b6b74;
  --accent: #d9ff4d;
  --accent-soft: rgba(217, 255, 77, 0.1);
  --danger: #ff6b5e;
  --ok: #7ce38b;
  --radius: 10px;
  --radius-sm: 6px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --maxw: 1120px;

  --accent-hover: #e5ff78;
  --bg-input: #0d0d0f;
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --nav-h: 68px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

::selection {
  background: var(--accent);
  color: #0a0a0b;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

[hidden] {
  display: none !important;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Subtle scrollbar, dark */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 3px solid var(--bg);
}
*::-webkit-scrollbar-track {
  background: transparent;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-narrow {
  max-width: 760px;
}

.section {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 52px;
}

.section-head p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 46ch;
  padding-bottom: 6px;
}

.stack {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
}

.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  width: 100%;
}

.text-center {
  text-align: center;
}

.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;
}

.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 130;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #0a0a0b;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: #0a0a0b;
}

section[id],
.faq-item[id] {
  scroll-margin-top: calc(var(--nav-h) + 18px);
}

main:focus {
  outline: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

.muted {
  color: var(--muted);
}

.dim {
  color: var(--dim);
}

.no-wrap {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.display {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 600;
  text-wrap: balance;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  flex: none;
}

.eyebrow.no-dot::before {
  display: none;
}

.micro-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Brand
   -------------------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--text);
  flex: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-mark.sm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.brand-mark.sm svg {
  width: 16px;
  height: 16px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--dim);
  text-transform: uppercase;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line-strong);
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: var(--nav-h);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 8px;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-panel {
  display: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
}

.site-nav .nav-toggle {
  display: none;
  margin-left: auto;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav.is-open .nav-panel {
  display: block;
}

@media (min-width: 901px) {
  .nav-panel {
    display: none !important;
  }
}

/* Slim variant used on auth / share / account pages */
.site-nav.slim .nav-inner {
  height: 64px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg-elev-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, opacity 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn:hover {
  background: var(--bg-elev-3);
  border-color: var(--line-strong);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0b;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0a0a0b;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-elev-2);
  border-color: var(--muted);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #160a09;
}

.btn-danger:hover {
  background: #ff8378;
  border-color: #ff8378;
  color: #160a09;
}

.btn-quiet-danger {
  background: transparent;
  border-color: rgba(255, 107, 94, 0.42);
  color: var(--danger);
}

.btn-quiet-danger:hover {
  background: rgba(255, 107, 94, 0.1);
  border-color: var(--danger);
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
  gap: 7px;
}

.btn-sm svg {
  width: 13px;
  height: 13px;
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 13px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.btn-link:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.btn .spinner {
  margin-right: 1px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease;
  flex: none;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  background: var(--bg-elev-2);
  color: var(--text);
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-btn:disabled:hover {
  background: transparent;
  color: var(--muted);
}

.icon-btn:active {
  background: var(--bg-elev-3);
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg-elev-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-accent {
  background: var(--accent-soft);
  border-color: rgba(217, 255, 77, 0.38);
  color: var(--accent);
}

.badge-danger {
  background: rgba(255, 107, 94, 0.08);
  border-color: rgba(255, 107, 94, 0.32);
  color: var(--danger);
}

.badge-dot::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field {
  display: block;
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}

.input::placeholder {
  color: var(--dim);
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.input[aria-invalid="true"] {
  border-color: rgba(255, 107, 94, 0.65);
}

.input-mono {
  font-family: var(--font-mono);
  font-size: 14.5px;
  letter-spacing: 0.08em;
}

textarea.input {
  height: auto;
  min-height: 96px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
}

.input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hint {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.field-error {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.form-error {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 107, 94, 0.34);
  background: rgba(255, 107, 94, 0.07);
  border-radius: 8px;
  color: #ffb0a8;
  font-size: 13px;
  line-height: 1.5;
}

.form-error:empty {
  display: none;
}

.form-error svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--danger);
}

/* Checkbox */
.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  user-select: none;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg-input);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.check input:hover {
  border-color: var(--muted);
}

.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #0a0a0b;
  border-bottom: 2px solid #0a0a0b;
  transform: rotate(-45deg) translateY(-1px);
}

.check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check span {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   Cards / callouts / panels
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.callout {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elev-2);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.callout svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--muted);
}

.callout strong {
  color: var(--text);
  font-weight: 500;
}

.callout-danger {
  border-color: rgba(255, 107, 94, 0.34);
  background: rgba(255, 107, 94, 0.06);
}

.callout-danger svg {
  color: var(--danger);
}

.callout-accent {
  border-color: rgba(217, 255, 77, 0.28);
  background: var(--accent-soft);
}

.callout-accent svg {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Token display
   -------------------------------------------------------------------------- */
.token-display {
  display: block;
  width: 100%;
  padding: 20px 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-align: center;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.recovery-display {
  padding: 14px 12px;
  font-size: clamp(0.75rem, 3.6vw, 1.05rem);
  line-height: 1.65;
  letter-spacing: 0.04em;
  overflow-wrap: normal;
  word-break: normal;
}

.reveal-block-recovery {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.copy-btn svg {
  width: 13px;
  height: 13px;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--bg-elev-3);
}

.copy-btn.is-copied {
  color: var(--accent);
  border-color: rgba(217, 255, 77, 0.4);
}

/* --------------------------------------------------------------------------
   Meter
   -------------------------------------------------------------------------- */
.meter {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--bg-elev-3);
  border-radius: 999px;
  overflow: hidden;
}

.meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.4s ease, background-color 0.2s ease;
}

.meter-fill.is-high {
  background: #ffc44d;
}

.meter-fill.is-full {
  background: var(--danger);
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 3, 4, 0.78);
  overscroll-behavior: contain;
}

.modal {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-modal);
}

.modal.modal-wide {
  width: min(540px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2,
.modal-head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.modal-head p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--radius-sm);
  color: var(--dim);
  margin: -4px -6px 0 0;
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-close:hover {
  background: var(--bg-elev-3);
  color: var(--text);
}

.modal-body {
  padding: 22px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.modal-body p + p {
  margin-top: 12px;
}

.modal-body strong {
  color: var(--text);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.modal-actions .btn {
  min-width: 96px;
}

.totp-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 16px 0 20px;
}

.totp-qr {
  width: 200px;
  height: 200px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  image-rendering: pixelated;
}

.totp-secret-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.totp-secret-row code {
  flex: 1 1 220px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.recovery-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.recovery-code-grid code {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  user-select: all;
}

@media (max-width: 520px) {
  .recovery-code-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elev-3);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.18s ease both;
}

.toast::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  margin-top: 7px;
}

.toast-error {
  border-color: rgba(255, 107, 94, 0.45);
}

.toast-error::before {
  background: var(--danger);
}

.toast.is-leaving {
  animation: toast-out 0.18s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
  vertical-align: -3px;
}

.spinner-lg {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  padding: 40px 20px;
}

/* --------------------------------------------------------------------------
   Marketing — hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(64px, 8.5vw, 116px) 0 clamp(72px, 8vw, 108px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(40px, 4.5vw, 64px);
  align-items: center;
}

.hero-title {
  margin-top: 22px;
  font-size: clamp(2.7rem, 5.6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}

.hero-title .accent-dot {
  color: var(--accent);
}

.hero-copy {
  margin-top: 26px;
  max-width: 47ch;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
}

.hero-copy strong {
  color: var(--text);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-note .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* Hero product visual */
.hero-visual {
  position: relative;
  max-width: 472px;
  width: 100%;
  justify-self: end;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  pointer-events: none;
}

.vault-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
}

.vault-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev-2);
}

.vault-head .label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.vault-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.vault-status .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.vault-token {
  padding: 20px 16px 18px;
  border-bottom: 1px solid var(--line);
}

.vault-token-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.vault-token-value {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.9vw, 1.18rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text);
  white-space: nowrap;
}

.vault-token-value .seg {
  color: var(--muted);
}

.vault-files {
  padding: 4px 0;
}

.vault-file {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
}

.vault-file + .vault-file {
  border-top: 1px solid rgba(38, 38, 43, 0.7);
}

.vault-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
}

.vault-icon svg {
  width: 15px;
  height: 15px;
}

.vault-icon.folder {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(217, 255, 77, 0.22);
}

.vault-file-main {
  min-width: 0;
  flex: 1;
}

.vault-file-name {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vault-file-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.vault-file .badge {
  font-size: 8.5px;
  padding: 2px 5px;
}

.vault-foot {
  padding: 13px 16px 15px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev-2);
}

.vault-foot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.vault-foot .meter {
  height: 4px;
}

.hero-chip {
  position: absolute;
  left: -22px;
  bottom: -48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-elev-3);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.hero-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   Marketing — features
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1100px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 26px 24px 30px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 230px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  background: #131316;
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.feature-icon svg {
  width: 15px;
  height: 15px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-top: 4px;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.68;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Marketing — steps
   -------------------------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.step {
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 18px;
}

.step h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 10px;
}

.step p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.steps-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 48px;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: var(--bg-elev);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 780px;
}

.steps-note svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

.steps-note strong {
  color: var(--text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Marketing — privacy
   -------------------------------------------------------------------------- */
.privacy-band {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 100px 0;
}

.privacy-statement {
  max-width: 780px;
}

.privacy-statement h2 {
  margin-top: 20px;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}

.privacy-statement p {
  margin-top: 20px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.privacy-point {
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

.privacy-point .micro-label {
  font-size: 10px;
  color: var(--dim);
}

.privacy-point h3 {
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.privacy-point p {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.privacy-foot {
  margin-top: 44px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Marketing — pricing
   -------------------------------------------------------------------------- */
.pricing-card {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 40px);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.pricing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 16px;
}

.price-num {
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.price-free {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.pricing-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.pricing-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 24px;
  padding: 24px 0 26px;
}

.pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-list svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

.pricing-note {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Marketing — FAQ
   -------------------------------------------------------------------------- */
.faq-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
}

.faq-intro p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 34ch;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text);
  transition: color 0.15s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  top: 50%;
  left: 50%;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.faq-icon::before {
  width: 12px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 1px;
  height: 12px;
  transform: translate(-50%, -50%);
}

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  padding: 0 40px 22px 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 62ch;
}

.faq-answer strong {
  color: var(--text);
  font-weight: 500;
}

.faq-answer p + p {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Marketing — final CTA
   -------------------------------------------------------------------------- */
.cta-band {
  border-top: 1px solid var(--line);
  padding: 86px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.cta-inner p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 42ch;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}

.footer-brand p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  max-width: 30ch;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom .footer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-bottom .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.footer-mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-top {
  border-bottom: 1px solid var(--line);
}

.auth-top .nav-inner {
  height: 64px;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 64px;
}

.auth-card {
  width: min(460px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(24px, 4vw, 36px);
}

.auth-card.wide {
  width: min(560px, 100%);
}

.auth-card h1 {
  margin-top: 16px;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.auth-card .auth-lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.auth-body {
  margin-top: 28px;
}

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--dim);
}

.auth-alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.text-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}

.text-link:hover {
  color: var(--accent);
  border-bottom-color: rgba(217, 255, 77, 0.45);
}

.auth-foot a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.auth-foot a:hover {
  color: var(--accent);
  text-decoration-color: rgba(217, 255, 77, 0.45);
  border-bottom-color: transparent;
}

.auth-page-foot {
  padding: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.auth-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.auth-fact {
  background: var(--bg-elev-2);
  padding: 13px 12px;
}

.auth-fact .micro-label {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.auth-fact strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.auth-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

.plan-intent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 255, 77, 0.24);
  border-radius: 8px;
  background: var(--accent-soft);
}

.plan-intent .micro-label {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
}

.plan-intent strong {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.plan-intent-note {
  max-width: 26ch;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: right;
}

.auth-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

.auth-note a:hover {
  color: var(--text);
}

.noscript-note {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elev-2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-card .noscript-note {
  margin: 0 0 18px;
}

/* Signup steps */
.flow-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.flow-step .num {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 9px;
  color: var(--dim);
}

.flow-step.is-active {
  color: var(--text);
}

.flow-step.is-active .num {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0a0b;
}

.flow-step.is-done {
  color: var(--muted);
}

.flow-step.is-done .num {
  border-color: rgba(217, 255, 77, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
}

.flow-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 12px;
}

/* Token reveal block */
.reveal-block {
  margin-top: 24px;
}

.reveal-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.reveal-label .micro-label {
  font-size: 10px;
}

.reveal-label .badge {
  font-size: 9px;
}

.reveal-block .token-actions {
  margin-top: 10px;
}

.reveal-warning {
  margin-top: 18px;
}

.reveal-ack {
  margin-top: 20px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev-2);
}

.enter-vault {
  margin-top: 16px;
}

.reveal-help {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

/* Login input */
.login-form .input-mono {
  height: 50px;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-align: center;
}

.login-form .btn {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Account page
   -------------------------------------------------------------------------- */
.account-main {
  padding: 52px 0 96px;
}

.account-container {
  max-width: 920px;
}

.account-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.account-head h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.account-head .account-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.account-sub .mono {
  color: var(--text);
  font-size: 13px;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel.span-2 {
  grid-column: span 2;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head h2 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.panel-head .micro-label {
  font-size: 9.5px;
  color: var(--dim);
}

.panel-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 18px;
  max-width: 58ch;
}

.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.kv:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.kv-label {
  color: var(--muted);
}

.kv-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.storage-figure {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 14px;
}

.storage-used {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.storage-of {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.storage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.stat-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.storage-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.retention-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.stat {
  background: var(--bg-elev-2);
  padding: 12px 13px;
}

.stat .micro-label {
  font-size: 9px;
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.panel-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.panel.danger-zone {
  border-color: rgba(255, 107, 94, 0.28);
}

.panel.danger-zone .panel-head h2 {
  color: var(--danger);
}

.panel.danger-zone .panel-desc {
  color: var(--muted);
}

.account-loading {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 13px;
}

.account-error {
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  text-align: center;
}

.account-error h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.account-error p {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 20px;
}

/* Modal token reveal spacing */
.modal .token-display {
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  padding: 16px 12px;
  letter-spacing: 0.1em;
}

.modal .reveal-warning {
  margin-top: 14px;
}

.modal .callout {
  font-size: 12.5px;
}

/* Delete typed confirmation */
.confirm-input {
  margin-top: 4px;
}

.delete-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Share page
   -------------------------------------------------------------------------- */
.share-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.share-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 72px;
}

.share-card {
  width: min(520px, 100%);
  padding: clamp(26px, 4.4vw, 38px);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  text-align: center;
}

.share-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  border-radius: 10px;
  border: 1px solid rgba(217, 255, 77, 0.26);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.share-icon svg {
  width: 24px;
  height: 24px;
}

.share-icon.is-muted {
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
  color: var(--muted);
}

.share-card h1 {
  margin-top: 14px;
  font-size: clamp(1.45rem, 3.4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.share-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.share-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.share-download {
  margin-top: 26px;
  height: 46px;
}

.share-footnote {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.share-divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0 16px;
}

.share-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--dim);
}

.share-stats .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.share-state {
  margin-top: 18px;
}

.share-state h1 {
  margin-top: 0;
}

.share-state .eyebrow {
  margin-top: 0;
  margin-bottom: 12px;
}

.share-state > p:not(.eyebrow) {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.share-state .btn {
  margin-top: 22px;
}

.share-retry {
  margin-top: 18px;
}

.share-page .auth-page-foot {
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.notfound-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.notfound-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.notfound-inner {
  text-align: center;
  max-width: 520px;
}

.notfound-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 13vw, 7.5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--text);
}

.notfound-code .accent {
  color: var(--accent);
}

.notfound-inner h1 {
  margin-top: 22px;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.notfound-inner p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.notfound-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.notfound-meta {
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-visual {
    justify-self: start;
    max-width: 460px;
  }

  .privacy-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 30px;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .site-nav .nav-toggle {
    display: inline-grid;
  }

  .nav-inner {
    gap: 16px;
  }

  .nav-panel {
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
    padding: 12px 24px 22px;
  }

  .nav-panel .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0 0 16px;
  }

  .nav-panel .nav-links a {
    padding: 13px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  .nav-panel .nav-actions {
    display: flex;
    margin: 0;
  }

  .nav-panel .nav-actions .btn {
    flex: 1;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-card {
    min-height: 0;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .faq-intro {
    position: static;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 3;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .panel.span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .br-wide {
    display: none;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section,
  .privacy-band {
    padding: 68px 0;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .section-head p {
    padding-bottom: 0;
  }

  .hero {
    padding-top: 52px;
    padding-bottom: 64px;
  }

  .hero-note {
    font-size: 10.5px;
  }

  .hero-chip {
    left: 0;
    bottom: -44px;
  }

  .privacy-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-list {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-col:last-child {
    grid-column: span 2;
  }

  .footer-col:last-child ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 22px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .account-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .account-main {
    padding-top: 36px;
  }

  .panel {
    padding: 18px;
  }

  .cta-band {
    padding: 64px 0;
  }
}

@media (max-width: 520px) {
  .site-nav.slim .nav-right a[href="/app"] {
    display: none;
  }

  .plan-intent {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .plan-intent-note {
    max-width: none;
    text-align: left;
  }

  :root {
    --nav-h: 62px;
  }

  .hero-title {
    font-size: clamp(2.35rem, 10vw, 3rem);
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-visual::before {
    display: none;
  }

  .vault-token-value {
    font-size: 0.95rem;
    letter-spacing: 0.07em;
  }

  .vault-file {
    padding-left: 13px;
    padding-right: 13px;
  }

  .hero-chip {
    display: none;
  }

  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-main {
    padding: 36px 16px 48px;
    align-items: flex-start;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .auth-facts {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .auth-fact {
    padding: 10px 9px;
  }

  .auth-fact strong {
    font-size: 10.5px;
  }

  .flow-step {
    gap: 6px;
  }

  .token-display {
    font-size: 1rem;
    letter-spacing: 0.08em;
    padding: 17px 12px;
  }

  .share-main {
    padding: 32px 16px 48px;
    align-items: flex-start;
  }

  .share-card {
    padding: 24px 18px;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }

  .modal-head,
  .modal-body {
    padding: 18px;
  }

  .modal-actions {
    padding: 16px 18px;
  }

  .modal-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .account-head h1 {
    font-size: 1.9rem;
  }

  .storage-used {
    font-size: 24px;
  }

  .notfound-actions .btn {
    flex: 1 1 100%;
  }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ---------- Landing pricing grid ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 24px 21px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
}

.price-card.is-featured {
  border-color: rgba(217, 255, 77, 0.45);
  background:
    linear-gradient(180deg, rgba(217, 255, 77, 0.05), transparent 38%),
    var(--bg-elev);
}

.price-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 23px;
}

.price-card-head .micro-label {
  font-size: 9px;
}

.price-card-head .badge {
  font-size: 8px;
}

.price-quota {
  margin: 20px 0 4px;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.price-money {
  min-height: 52px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
}

.price-money strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.price-alt {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
}

.price-usd {
  margin-top: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
}

.price-usd-sep {
  color: var(--dim);
}

.price-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.price-list li::before {
  content: "· ";
  color: var(--accent);
}

.price-card .btn {
  margin-top: auto;
}

.pricing-footnote {
  margin-top: 16px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .price-card {
    padding: 22px 19px;
  }
}
