/* ═══════════════════════════════════════════════════════════════════
   Penny — Security White Paper & Compliance Portal
   Aesthetic: Apple Platform Security + Stripe Trust + Cloudflare Architecture
   Strict Zero-Card-Data Verification & Institutional Authority
═══════════════════════════════════════════════════════════════════ */

:root {
  /* Default: Dark Obsidian Slate */
  --bg: #070b09;
  --bg-gradient: radial-gradient(circle at 50% 0%, rgba(0, 192, 163, 0.08) 0%, rgba(7, 11, 9, 0) 70%);
  --surface-0: #0a110e;
  --surface-1: #0f1915;
  --surface-2: #14231e;
  --surface-glass: rgba(15, 25, 21, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-emerald: rgba(0, 192, 163, 0.28);
  --border-gold: rgba(245, 158, 11, 0.35);

  --ink-primary: #f8fafc;
  --ink-secondary: #94a3b8;
  --ink-muted: #5e7168;

  --emerald: #00c0a3;
  --emerald-hover: #05dfbd;
  --emerald-dark: #059669;
  --emerald-glow: rgba(0, 192, 163, 0.18);

  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.15);

  --crimson: #f43f5e;
  --crimson-glow: rgba(244, 63, 94, 0.15);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --header-height: 64px;
  --subnav-height: 48px;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 30px -4px rgba(0, 192, 163, 0.15);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --bg-gradient: radial-gradient(circle at 50% 0%, rgba(5, 150, 105, 0.06) 0%, rgba(248, 250, 252, 0) 70%);
    --surface-0: #f1f5f9;
    --surface-1: #ffffff;
    --surface-2: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.85);
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-emerald: rgba(5, 150, 105, 0.35);
    --border-gold: rgba(217, 119, 6, 0.35);

    --ink-primary: #0f172a;
    --ink-secondary: #475569;
    --ink-muted: #64748b;

    --emerald: #059669;
    --emerald-hover: #047857;
    --emerald-dark: #065f46;
    --emerald-glow: rgba(5, 150, 105, 0.12);

    --gold: #d97706;
    --gold-glow: rgba(217, 119, 6, 0.12);

    --crimson: #e11d48;
    --crimson-glow: rgba(225, 29, 72, 0.12);

    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --shadow-hover: 0 8px 30px -4px rgba(5, 150, 105, 0.12);
  }
}

/* ── Base Reset & Layout ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--subnav-height) + 20px);
}

body.doc-page {
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-repeat: no-repeat;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.doc-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════════════════════
   HEADER (TOP BAR)
══════════════════════════════════════════════════════════ */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: border-color .2s ease;
}

.doc-header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.doc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink-primary);
}

.doc-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: block;
}

.doc-brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}

.doc-brand-sep {
  color: var(--ink-muted);
  font-weight: 300;
}

.doc-inpay-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}

.doc-inpay-badge:hover {
  border-color: var(--border-emerald);
  color: var(--ink-primary);
  background: var(--surface-2);
}

.doc-inpay-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  display: inline-block;
  animation: inpayPulse 2.2s infinite ease-in-out;
}

@keyframes inpayPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}

.doc-inpay-ico {
  display: block;
  border-radius: 2px;
}

.doc-ext-ico {
  opacity: .7;
}

.doc-status-badge {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 192, 163, 0.08);
  border: 1px solid var(--border-emerald);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (min-width: 900px) {
  .doc-status-badge {
    display: inline-flex;
  }
}

.doc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
}

.doc-nav-btn--ghost {
  background: transparent;
  color: var(--ink-secondary);
  border-color: var(--border);
}

.doc-nav-btn--ghost:hover {
  background: var(--surface-1);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.doc-nav-btn--primary {
  background: var(--surface-1);
  color: var(--ink-primary);
  border-color: var(--border-emerald);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.doc-nav-btn--primary:hover {
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
}

/* ══════════════════════════════════════════════════════════
   STICKY SECONDARY SUB-NAV (SCROLLSPY)
══════════════════════════════════════════════════════════ */
.doc-subnav {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  height: var(--subnav-height);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.doc-subnav-in {
  height: 100%;
}

.doc-subnav-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.doc-subnav-scroll::-webkit-scrollbar {
  display: none;
}

.subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .15s ease;
  border: 1px solid transparent;
}

.subnav-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: .6;
}

.subnav-item:hover {
  color: var(--ink-primary);
  background: var(--surface-1);
}

.subnav-item.is-active {
  color: var(--emerald);
  background: rgba(0, 192, 163, 0.08);
  border-color: var(--border-emerald);
}

.subnav-item.is-active .subnav-num {
  opacity: 1;
  color: var(--emerald);
}

/* ══════════════════════════════════════════════════════════
   GENERAL SECTION STYLES
══════════════════════════════════════════════════════════ */
.doc-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.sec-head {
  margin-bottom: 36px;
}

.sec-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 192, 163, 0.08);
  border: 1px solid var(--border-emerald);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.sec-tag-num {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--emerald);
  color: #070b09;
  font-size: 10px;
  font-weight: 800;
}

.sec-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  line-height: 1.25;
  margin-bottom: 12px;
}

.sec-desc {
  font-size: 15.5px;
  color: var(--ink-secondary);
  max-width: 820px;
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════
   SECTION 1: HERO & SUMMARY
══════════════════════════════════════════════════════════ */
.doc-hero-sec {
  padding: 64px 0 56px;
}

.hero-label-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
}

.hero-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--emerald);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: inpayPulse 2s infinite ease-in-out;
}

.hero-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.meta-sep {
  opacity: .4;
}

.text-emerald {
  color: var(--emerald);
}

.hero-content-box {
  margin-bottom: 36px;
}

.hero-h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.18;
  color: var(--ink-primary);
  margin-bottom: 18px;
  max-width: 980px;
}

@media (max-width: 768px) {
  .hero-h1 {
    font-size: 30px;
  }
}

.hero-lead {
  font-size: 17.5px;
  color: var(--ink-secondary);
  line-height: 1.7;
  max-width: 900px;
}

.hero-lead strong {
  color: var(--ink-primary);
  font-weight: 700;
}

.hero-spec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
}

.spec-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spec-k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  font-weight: 700;
}

.spec-v {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}

.spec-sub {
  font-size: 12px;
  color: var(--emerald);
  font-family: var(--font-mono);
}

/* Trust Badges Grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.trust-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s ease;
  position: relative;
}

.trust-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-emerald);
  box-shadow: var(--shadow-hover);
}

.trust-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trust-card-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(0, 192, 163, 0.1);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-cert-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.trust-card-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
}

.trust-card-desc {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
  flex-grow: 1;
}

.trust-card-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald);
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════
   SECTION 2: 4-ZONE ARCHITECTURE DIAGRAM
══════════════════════════════════════════════════════════ */
.arch-canvas {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.arch-perimeter-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed var(--border-gold);
  color: var(--ink-primary);
  font-size: 13.5px;
  line-height: 1.55;
}

.perimeter-icon {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.perimeter-text strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.perimeter-text span {
  color: var(--ink-secondary);
}

.arch-zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.zone-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all .2s ease;
}

.zone-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.zone-card--bank {
  background: linear-gradient(180deg, var(--surface-1) 0%, rgba(245, 158, 11, 0.04) 100%);
  border-color: var(--border-gold);
}

.zone-card--core {
  background: linear-gradient(180deg, var(--surface-1) 0%, rgba(0, 192, 163, 0.04) 100%);
  border-color: var(--border-emerald);
}

.zone-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zone-badge-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-muted);
}

.zone-badge-type {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.zone-badge--gold .zone-badge-type {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border-color: var(--border-gold);
}

.zone-badge--emerald .zone-badge-type {
  background: rgba(0, 192, 163, 0.12);
  color: var(--emerald);
  border-color: var(--border-emerald);
}

.zone-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zone-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.zone-icon--gold {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
}

.zone-icon--emerald {
  background: rgba(0, 192, 163, 0.12);
  color: var(--emerald);
}

.zone-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.zone-subtitle {
  font-size: 12px;
  color: var(--ink-muted);
}

.zone-summary {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.zone-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-grow: 1;
}

.zone-spec-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.zone-spec-item strong {
  color: var(--ink-primary);
}

.spec-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
  margin-top: 6px;
  flex-shrink: 0;
}

.spec-bullet--gold {
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}

.spec-bullet--emerald {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.zone-data-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.zone-data-badge--gold {
  border-color: var(--border-gold);
}

.zone-data-badge--emerald {
  border-color: var(--border-emerald);
}

.data-badge-k {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.data-badge-v {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-primary);
  word-break: break-all;
}

.zone-data-badge--gold .data-badge-v {
  color: var(--gold);
}

.zone-data-badge--emerald .data-badge-v {
  color: var(--emerald);
}

.arch-flow-summary {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  overflow-x: auto;
}

.flow-pill-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  white-space: nowrap;
}

.flow-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.flow-pill--bank {
  border-color: var(--border-gold);
  color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
}

.flow-pill--core {
  border-color: var(--border-emerald);
  color: var(--emerald);
  background: rgba(0, 192, 163, 0.08);
}

.flow-arr {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ══════════════════════════════════════════════════════════
   SECTION 3: TABBED FLOWS
══════════════════════════════════════════════════════════ */
.flow-tabs-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.flow-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-0);
  overflow-x: auto;
  scrollbar-width: none;
}

.flow-tabs-nav::-webkit-scrollbar {
  display: none;
}

.flow-nav-btn {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all .15s ease;
  position: relative;
}

.flow-nav-btn:last-child {
  border-right: none;
}

.flow-nav-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-muted);
}

.flow-nav-btn:hover {
  background: var(--surface-1);
  color: var(--ink-primary);
}

.flow-nav-btn.is-active {
  background: var(--surface-1);
  color: var(--emerald);
}

.flow-nav-btn.is-active .flow-nav-idx {
  background: rgba(0, 192, 163, 0.15);
  color: var(--emerald);
}

.flow-nav-btn.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--emerald);
}

.flow-panel {
  display: none;
  padding: 36px 32px;
}

.flow-panel.is-active {
  display: block;
}

.flow-panel-intro {
  margin-bottom: 30px;
}

.flow-panel-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.flow-panel-desc {
  font-size: 14.5px;
  color: var(--ink-secondary);
  max-width: 800px;
}

.flow-timeline {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  padding-left: 10px;
}

.flow-stage {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
}

.stage-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-emerald);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.stage-body {
  flex-grow: 1;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.stage-body h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.stage-body p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-bottom: 10px;
}

.stage-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stage-code code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
  word-break: break-all;
}

/* ══════════════════════════════════════════════════════════
   SECTION 4: DATA RETENTION MATRIX
══════════════════════════════════════════════════════════ */
.matrix-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.matrix-table th {
  background: var(--surface-0);
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.matrix-table tbody tr:hover {
  background: rgba(0, 192, 163, 0.02);
}

.matrix-table tbody tr:last-child td {
  border-bottom: none;
}

.param-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.param-cell strong {
  color: var(--ink-primary);
  font-weight: 700;
}

.param-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.m-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.m-badge--never {
  background: rgba(244, 63, 94, 0.1);
  color: var(--crimson);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.m-badge--stored {
  background: rgba(0, 192, 163, 0.1);
  color: var(--emerald);
  border: 1px solid var(--border-emerald);
}

.m-badge--bank {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.m-badge--temp {
  background: var(--surface-2);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.status-desc {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.4;
}

.matrix-footnote {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 22px;
  background: var(--surface-0);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.matrix-footnote svg {
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   SECTION 5: CRYPTOGRAPHY & STANDARDS
══════════════════════════════════════════════════════════ */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.crypto-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .2s ease;
}

.crypto-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-emerald);
  box-shadow: var(--shadow-hover);
}

.crypto-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crypto-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(0, 192, 163, 0.1);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}

.crypto-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.crypto-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.crypto-desc {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.crypto-foot {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.crypto-param {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--emerald);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   SECTION 6: LEGAL FRAMEWORK
══════════════════════════════════════════════════════════ */
.legal-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.legal-framework-notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: rgba(0, 192, 163, 0.05);
  border-bottom: 1px solid var(--border);
}

.notice-ico {
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-body h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.notice-body p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.notice-body strong {
  color: var(--ink-primary);
}

.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
}

.legal-table tr {
  border-bottom: 1px solid var(--border);
}

.legal-table tr:last-child {
  border-bottom: none;
}

.legal-table tr:hover {
  background: rgba(0, 192, 163, 0.02);
}

.legal-k {
  width: 32%;
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  vertical-align: middle;
}

.legal-v {
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
  vertical-align: middle;
}

.legal-inpay-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-sep {
  color: var(--ink-muted);
}

.legal-link {
  color: var(--emerald);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s ease;
}

.legal-link:hover {
  color: var(--emerald-hover);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════
   SECTION 7: PDF VAULT
══════════════════════════════════════════════════════════ */
.pdf-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.pdf-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all .2s ease;
}

.pdf-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-emerald);
  box-shadow: var(--shadow-hover);
}

.pdf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdf-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}

.pdf-code-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

.pdf-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.pdf-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  line-height: 1.35;
}

.pdf-desc {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.pdf-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.meta-pill {
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--surface-0);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-pill--status {
  color: var(--emerald);
  border-color: var(--border-emerald);
  background: rgba(0, 192, 163, 0.06);
  font-weight: 600;
}

.pdf-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
}

.pdf-btn--view {
  flex: 1;
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
}

.pdf-btn--view:hover {
  background: var(--emerald-hover);
  border-color: var(--emerald-hover);
}

.pdf-btn--dl {
  background: var(--surface-2);
  color: var(--ink-primary);
  border-color: var(--border);
}

.pdf-btn--dl:hover {
  background: var(--surface-0);
  border-color: var(--border-strong);
}

.pdf-btn--copy {
  background: var(--surface-2);
  color: var(--ink-secondary);
  border-color: var(--border);
  padding: 8px 12px;
}

.pdf-btn--copy:hover {
  color: var(--ink-primary);
  border-color: var(--border-emerald);
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.doc-footer {
  padding: 48px 0 36px;
  background: var(--surface-0);
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink-primary);
  font-size: 18px;
  font-weight: 800;
}

.footer-logo img {
  border-radius: 6px;
}

.footer-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-nav a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: color .15s ease;
}

.footer-nav a:hover {
  color: var(--emerald);
}

.footer-sep {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-secondary);
}

.footer-copy strong {
  color: var(--ink-primary);
}

.footer-reg {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════════════════════════ */
.doc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  border: 1px solid var(--border-emerald);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 700;
  animation: toastFadeIn .2s ease;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   PRINT STYLESHEET (@media print)
══════════════════════════════════════════════════════════ */
@media print {
  body.doc-page {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .doc-header,
  .doc-subnav,
  .doc-nav-btn,
  .pdf-card-actions,
  .doc-toast,
  .footer-nav {
    display: none !important;
  }

  .doc-section {
    padding: 24pt 0 !important;
    border-bottom: 1pt solid #cccccc !important;
    page-break-inside: avoid;
  }

  .hero-h1 {
    font-size: 22pt !important;
    color: #000000 !important;
  }

  .trust-card,
  .zone-card,
  .stage-body,
  .crypto-card,
  .pdf-card,
  .legal-box,
  .matrix-card {
    background: #ffffff !important;
    border: 1pt solid #dddddd !important;
    box-shadow: none !important;
  }

  .m-badge,
  .sec-tag,
  .trust-cert-tag,
  .crypto-badge {
    border: 1pt solid #999999 !important;
    color: #000000 !important;
  }
}


.stage-guarantee {
  background: rgba(0, 192, 163, 0.05);
  border: 1px solid rgba(0, 192, 163, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  margin-top: 8px;
}
.stage-guarantee-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 192, 163, 0.12);
  color: var(--emerald);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
