/* ==========================================================================
   Bastion Mail — design tokens
   ========================================================================== */
:root {
  --ink-900: #0d0b1f;
  --ink-800: #15122e;
  --ink-700: #221d48;
  --ink-600: #3a3470;

  --primary: #6a4cff;
  --primary-600: #5a3ef0;
  --primary-700: #4a2fd6;
  --primary-50: #f1eeff;
  --primary-100: #e4ddff;

  --accent: #1fc8a2;
  --accent-50: #e6faf5;

  --text: #1a1830;
  --text-muted: #5d5a78;
  --text-subtle: #8c89a6;
  --border: #e6e4f0;
  --border-strong: #d4d1e3;
  --surface: #ffffff;
  --surface-alt: #f7f6fc;
  --danger: #d92d4b;
  --danger-50: #fdecef;
  --success: #12936f;
  --success-50: #e7f7f1;
  --warning: #c27a00;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(18, 14, 52, .06), 0 1px 1px rgba(18, 14, 52, .04);
  --shadow: 0 10px 30px -12px rgba(30, 20, 90, .18), 0 2px 6px rgba(30, 20, 90, .06);
  --shadow-lg: 0 40px 80px -30px rgba(20, 10, 80, .45), 0 12px 30px -10px rgba(20, 10, 80, .25);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid rgba(106, 76, 255, .45); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 44px; padding: 0 20px;
  font: 600 15px/1 var(--font);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(106, 76, 255, .6); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-primary[disabled] { background: #a99bf5; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-light { background: #fff; color: var(--ink-800); }
.btn-light:hover { background: var(--primary-50); color: var(--ink-800); }
.btn-outline-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.22); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 11, 31, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .container { display: flex; align-items: center; height: 68px; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand small { font-weight: 500; color: rgba(255,255,255,.55); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-left: 2px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { color: rgba(255,255,255,.78); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .link { color: rgba(255,255,255,.85); font-weight: 600; font-size: 15px; padding: 8px 12px; }
.header-actions .link:hover { color: #fff; }
.header-actions .btn { height: 40px; padding: 0 16px; font-size: 14px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
@media (max-width: 960px) {
  .nav, .header-actions { display: none; }
  .menu-toggle { display: block; }
  .site-header.open .nav,
  .site-header.open .header-actions {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; background: var(--ink-900); padding: 12px 16px;
  }
  .site-header.open .nav { top: 68px; }
  .site-header.open .header-actions { top: calc(68px + 4 * 42px + 24px); padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-header.open .header-actions .btn { height: 44px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(106, 76, 255, .55), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(31, 200, 162, .18), transparent 60%),
    linear-gradient(180deg, var(--ink-900) 0%, #17123a 100%);
  color: #fff;
  padding: 88px 0 120px;
  margin-top: -68px; padding-top: calc(88px + 68px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: #d9d2ff; background: rgba(106, 76, 255, .18); border: 1px solid rgba(160, 140, 255, .3);
  padding: 6px 12px 6px 8px; border-radius: 999px; margin-bottom: 24px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(31,200,162,.2); }
.hero h1 { color: #fff; font-size: clamp(34px, 5.2vw, 62px); font-weight: 800; letter-spacing: -.035em; margin-bottom: 22px; }
.hero h1 .grad { background: linear-gradient(90deg, #b8a8ff, #7ee8cf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 19px; color: rgba(255,255,255,.74); max-width: 560px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 0; list-style: none; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,.7); }
.hero-points svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 1000px) {
  .hero .container { grid-template-columns: 1fr; gap: 56px; }
  .hero { padding-bottom: 80px; }
}

/* App mockup */
.mock {
  position: relative;
  background: #fff; color: var(--text);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden; font-size: 13px;
  border: 1px solid rgba(255,255,255,.2);
}
.mock-wrap { position: relative; }
.mock-wrap::before {
  content: ""; position: absolute; inset: -30px -30px auto auto; width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(126, 232, 207, .35), transparent 70%); filter: blur(20px); z-index: -1;
}
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f4f3f9; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #dcd9e8; display: block; }
.mock-url { margin-left: 12px; flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; color: var(--text-muted); font-size: 12px; }
.mock-url svg { width: 12px; height: 12px; color: var(--success); }
.mock-body { display: grid; grid-template-columns: 150px 1fr; min-height: 380px; }
.mock-side { background: var(--ink-800); color: rgba(255,255,255,.75); padding: 14px 10px; }
.mock-side .compose { display: block; text-align: center; background: var(--primary); color: #fff; border-radius: 7px; padding: 8px; font-weight: 600; margin-bottom: 14px; }
.mock-side ul { list-style: none; margin: 0; padding: 0; }
.mock-side li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; }
.mock-side li.active { background: rgba(255,255,255,.1); color: #fff; }
.mock-side li span:last-child { font-size: 11px; color: rgba(255,255,255,.5); }
.mock-main { display: grid; grid-template-rows: auto 1fr; }
.mock-list { border-bottom: 1px solid var(--border); }
.mock-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f0eff6; }
.mock-row:last-child { border-bottom: 0; }
.mock-row.sel { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary); }
.mock-row .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; }
.mock-row b { display: block; font-weight: 600; font-size: 13px; }
.mock-row small { display: block; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.mock-row time { font-size: 11px; color: var(--text-subtle); display: flex; align-items: center; gap: 4px; }
.mock-row time svg { width: 12px; height: 12px; color: var(--primary); }
.mock-read { padding: 14px 16px; }
.mock-read .badge-e2e { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-50); color: #0c7d63; font-weight: 600; font-size: 11.5px; border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.mock-read .badge-e2e svg { width: 12px; height: 12px; }
.mock-read h4 { font-size: 15px; margin-bottom: 6px; }
.mock-read p { color: var(--text-muted); margin: 0 0 6px; line-height: 1.5; }
.mock-line { height: 8px; border-radius: 4px; background: #efedf6; margin: 8px 0; }
.mock-attach { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--text-muted); }
.mock-attach svg { width: 14px; height: 14px; color: var(--primary); }
.float-card {
  position: absolute; background: #fff; color: var(--text); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px;
}
.float-card .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.float-card .ic svg { width: 18px; height: 18px; }
.float-card b { display: block; font-size: 13px; }
.float-card span { color: var(--text-muted); font-size: 12px; }
.float-a { left: -34px; bottom: 46px; }
.float-a .ic { background: var(--accent-50); color: #0c7d63; }
.float-b { right: -20px; top: 76px; }
.float-b .ic { background: var(--primary-50); color: var(--primary); }
@media (max-width: 640px) {
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .float-a { left: 8px; bottom: -28px; }
  .float-b { display: none; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 104px 0; }
.section.alt { background: var(--surface-alt); }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head .kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.section-head p { font-size: 18px; color: var(--text-muted); }
@media (max-width: 640px) { .section { padding: 72px 0; } .section-head { margin-bottom: 40px; } }

/* Standards strip */
.standards { border-bottom: 1px solid var(--border); background: #fff; }
.standards .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.standards p { margin: 0; font-size: 14px; color: var(--text-muted); font-weight: 500; }
.standards ul { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; }
.standards li { font-weight: 700; color: #6f6c8a; font-size: 15px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.standards li svg { width: 18px; height: 18px; color: var(--primary); }

/* Feature grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--primary-100); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 20px; }
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-muted); margin: 0; font-size: 15.5px; }

/* How it works */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; counter-reset: step; }
.flow::before { content: ""; position: absolute; top: 34px; left: 16%; right: 16%; height: 2px; background: repeating-linear-gradient(90deg, var(--primary-100) 0 8px, transparent 8px 14px); }
.flow-step { position: relative; text-align: center; padding: 0 12px; }
.flow-step .num { width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 20px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--primary); position: relative; }
.flow-step .num svg { width: 28px; height: 28px; }
.flow-step .num::after { counter-increment: step; content: counter(step); position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.flow-step h3 { font-size: 18px; }
.flow-step p { color: var(--text-muted); font-size: 15px; max-width: 320px; margin: 0 auto; }
@media (max-width: 800px) { .flow { grid-template-columns: 1fr; gap: 40px; } .flow::before { display: none; } }

.cipher {
  margin-top: 56px; background: var(--ink-800); color: #cfc9f5; border-radius: var(--radius-lg); padding: 22px 26px;
  font: 13px/1.7 var(--mono); overflow-x: auto; box-shadow: var(--shadow);
}
.cipher .k { color: #7ee8cf; }
.cipher .c { color: #6f6a9c; }
.cipher .v { color: #b8a8ff; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; }
.split .lead { font-size: 18px; color: var(--text-muted); }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.checklist .tick { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-50); color: #0c7d63; display: grid; place-items: center; }
.checklist .tick svg { width: 16px; height: 16px; }
.checklist b { display: block; font-weight: 700; margin-bottom: 2px; }
.checklist span { color: var(--text-muted); font-size: 15px; }

.panel {
  background: linear-gradient(160deg, var(--ink-800), var(--ink-700));
  color: #fff; border-radius: 24px; padding: 32px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.panel::before { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(106,76,255,.6), transparent 70%); }
.panel > * { position: relative; }
.panel h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.panel h4 svg { width: 18px; height: 18px; color: var(--accent); }
.meta-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.meta-table th, .meta-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.meta-table th { color: rgba(255,255,255,.5); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.meta-table td:last-child { text-align: right; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.pill.ok { background: rgba(31,200,162,.15); color: #7ee8cf; }
.pill.no { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }

/* Audience */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .audience { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .audience { grid-template-columns: 1fr; } }
.aud { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; }
.aud .tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); background: var(--primary-50); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.aud h3 { font-size: 18px; }
.aud p { font-size: 15px; color: var(--text-muted); }
.aud ul { margin: auto 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.aud li { font-size: 14px; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.aud li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 8px; }

/* Invite band */
.invite-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 28px; padding: 56px; box-shadow: var(--shadow); }
@media (max-width: 960px) { .invite-band { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; } }
.invite-band h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
.invite-band p { color: var(--text-muted); }
.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: s; }
.steps-v li { position: relative; padding: 14px 0 14px 52px; border-bottom: 1px dashed var(--border); }
.steps-v li:last-child { border-bottom: 0; }
.steps-v li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 14px; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-50); color: var(--primary); font-weight: 800; display: grid; place-items: center; }
.steps-v b { display: block; }
.steps-v span { font-size: 14.5px; color: var(--text-muted); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 24px; transition: border-color .2s; }
.faq details[open] { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { color: var(--text-muted); padding-bottom: 20px; margin: 0; }

/* CTA */
.cta {
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(106, 76, 255, .55), transparent 60%),
    radial-gradient(500px 300px at 10% 100%, rgba(31, 200, 162, .2), transparent 60%),
    var(--ink-900);
  color: #fff; text-align: center; padding: 96px 0;
}
.cta h2 { color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 800; max-width: 760px; margin: 0 auto 16px; }
.cta p { color: rgba(255,255,255,.72); font-size: 18px; max-width: 620px; margin: 0 auto 32px; }
.cta .hero-cta { justify-content: center; margin: 0; }

/* Footer */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.6); padding: 72px 0 32px; font-size: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h5 { color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: #fff; }
.footer-about p { max-width: 340px; margin-top: 16px; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(31,200,162,.2); }
.onion { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.45); word-break: break-all; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth-body {
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(106, 76, 255, .14), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(31, 200, 162, .10), transparent 60%),
    var(--surface-alt);
}
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; gap: 16px; }
.auth-top .brand { color: var(--ink-800); }
.auth-top .brand:hover { color: var(--ink-800); }
.auth-top .brand small { color: var(--text-subtle); }
.auth-top .aside { font-size: 14px; color: var(--text-muted); }
.auth-top .aside a { font-weight: 600; margin-left: 6px; }
@media (max-width: 560px) { .auth-top { padding: 16px; } .auth-top .aside span { display: none; } }

.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px 48px; }
@media (min-height: 820px) { .auth-main { align-items: center; } }
.auth-card {
  width: 100%; max-width: 460px; background: #fff; border-radius: 20px;
  border: 1px solid var(--border); box-shadow: var(--shadow); padding: 40px;
}
.auth-card.wide { max-width: 520px; }
@media (max-width: 560px) { .auth-card { padding: 28px 20px; border-radius: 16px; } }
.auth-card h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); margin-bottom: 28px; font-size: 15.5px; }

.stepper { display: flex; gap: 8px; margin-bottom: 26px; }
.stepper span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background .3s; }
.stepper span.on { background: var(--primary); }
.step-label { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; display: block; }

.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.field label .opt { font-weight: 500; color: var(--text-subtle); font-size: 13px; }
.field label a { font-weight: 600; font-size: 13px; }
.input-wrap { position: relative; display: flex; align-items: stretch; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  font: 500 15.5px var(--font); color: var(--text);
  background: #fff; border: 1px solid var(--border-strong); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #a9a6bf; font-weight: 400; }
.input:hover { border-color: #bdb9d3; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(106, 76, 255, .14); }
.input.invalid { border-color: var(--danger); }
.input.invalid:focus { box-shadow: 0 0 0 4px rgba(217, 45, 75, .12); }
.input.code { font-family: var(--mono); letter-spacing: .14em; font-size: 17px; text-align: center; }
.input-wrap .suffix {
  display: flex; align-items: center; padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--text-muted);
  background: var(--surface-alt); border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 10px 10px 0; white-space: nowrap;
}
.input-wrap .suffix + .input, .input-wrap .input:has(+ .suffix) { border-radius: 10px 0 0 10px; }
.input-wrap.has-suffix .input { border-radius: 10px 0 0 10px; }
.input-wrap .toggle-pw {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 8px; color: var(--text-subtle); cursor: pointer; border-radius: 8px;
}
.input-wrap .toggle-pw:hover { color: var(--text); background: var(--surface-alt); }
.input-wrap .toggle-pw svg { width: 20px; height: 20px; }
.input-wrap.pw .input { padding-right: 48px; }
.hint { font-size: 13px; color: var(--text-subtle); margin-top: 6px; }
.err-text { font-size: 13px; color: var(--danger); margin-top: 6px; display: none; }
.field.has-error .err-text { display: block; }
.field.has-error .input { border-color: var(--danger); }

.strength { display: flex; gap: 4px; margin-top: 10px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background .2s; }
.strength-label { font-size: 12.5px; color: var(--text-subtle); margin-top: 6px; display: flex; justify-content: space-between; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; font-size: 14px; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-muted); line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }

.turnstile-box { margin: 6px 0 20px; min-height: 65px; display: flex; justify-content: center; }
.turnstile-box.loading::before {
  content: "Verifying your browser…"; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 300px; height: 65px; border: 1px solid var(--border); border-radius: 6px; background: #fafafa; color: var(--text-subtle); font-size: 13px;
}

.alert { display: none; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; line-height: 1.45; }
.alert.show { display: flex; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.error { background: var(--danger-50); color: #a01933; border: 1px solid #f6c7d0; }
.alert.success { background: var(--success-50); color: #0b6b51; border: 1px solid #bfe8da; }
.alert.info { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-100); }

.divider { display: flex; align-items: center; gap: 14px; color: var(--text-subtle); font-size: 13px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-foot { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--text-muted); }
.auth-foot a { font-weight: 600; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; color: var(--text-subtle); font-size: 13px; }
.secure-note svg { width: 14px; height: 14px; color: var(--success); }

.auth-legal { text-align: center; padding: 20px 16px 28px; font-size: 13px; color: var(--text-subtle); }
.auth-legal a { color: var(--text-muted); margin: 0 10px; }
.auth-legal a:hover { color: var(--text); }

.invite-box { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; font-size: 14px; color: var(--text-muted); margin-top: 24px; }
.invite-box b { color: var(--text); display: block; margin-bottom: 4px; font-size: 14.5px; }

.success-state { text-align: center; }
.success-state .big-ic { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 22px; background: var(--success-50); color: var(--success); display: grid; place-items: center; }
.success-state .big-ic svg { width: 34px; height: 34px; }
.addr { display: inline-block; font-family: var(--mono); background: var(--surface-alt); border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--text); margin: 4px 0 18px; }
.kv { text-align: left; background: var(--surface-alt); border-radius: 12px; padding: 4px 16px; margin: 8px 0 24px; font-size: 14px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv div:last-child { border-bottom: 0; }
.kv span { color: var(--text-muted); }

[hidden] { display: none !important; }

/* 404 */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--ink-900); color: #fff; }
.nf h1 { color: #fff; font-size: 88px; font-weight: 800; margin: 0; background: linear-gradient(90deg, #b8a8ff, #7ee8cf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf p { color: rgba(255,255,255,.7); margin-bottom: 28px; }
