/* ============================================
   REPLICO AI — SHARED DESIGN SYSTEM
   Extracted from the homepage design language.
   Used by: /integrations/lofty, /security, /privacy, /terms
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  --ink:        #080D1A;
  --ink-2:      #0F1628;
  --ink-3:      #1A2235;
  --ink-4:      #252F45;
  --white:      #FFFFFF;
  --white-90:   rgba(255,255,255,0.9);
  --white-70:   rgba(255,255,255,0.7);
  --white-50:   rgba(255,255,255,0.5);
  --white-40:   rgba(255,255,255,0.4);
  --white-30:   rgba(255,255,255,0.3);
  --white-10:   rgba(255,255,255,0.1);
  --white-06:   rgba(255,255,255,0.06);
  --white-04:   rgba(255,255,255,0.04);
  --accent:     #DDFF47;
  --accent-dim: rgba(221,255,71,0.15);
  --accent-bdr: rgba(221,255,71,0.3);
  --green:      #3DDB82;
  --green-dim:  rgba(61,219,130,0.15);
  --red:        #FF5252;
  --red-dim:    rgba(255,82,82,0.1);
  --blue:       #4080FF;
  --blue-dim:   rgba(64,128,255,0.15);
  --blue-soft:  #93BFFF;
  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(255,255,255,0.12);
  --ff-h:       'Syne', sans-serif;
  --ff-b:       'DM Sans', sans-serif;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --shadow:     0 24px 64px rgba(0,0,0,0.4);
  --shadow-sm:  0 8px 24px rgba(0,0,0,0.25);
  --transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-b);
  background: var(--ink);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: var(--ff-b); cursor: pointer; border: none; background: none; }

/* ============================================
   UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}
.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;
}
.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 2000;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--ff-h);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Global focus states */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.5; }
}
.anim-1 { animation: fadeUp 0.65s 0.1s ease both; }
.anim-2 { animation: fadeUp 0.65s 0.2s ease both; }
.anim-3 { animation: fadeUp 0.65s 0.3s ease both; }
.anim-4 { animation: fadeUp 0.65s 0.4s ease both; }
.anim-5 { animation: fadeUp 0.65s 0.5s ease both; }

/* Reveal-on-scroll. Content is visible by default and only hidden once
   JS has confirmed it can reveal it again — so a JS failure never hides copy. */
.reveal {
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.has-js .reveal {
  opacity: 0;
  transform: translateY(32px);
}
.has-js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .has-js .reveal { opacity: 1; transform: none; }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(8,13,26,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-h);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.4px;
  color: var(--white);
}
.logo-dot {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--white-50);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--white); background: var(--white-06); }
.nav-links a[aria-current="page"] { color: var(--white); }

/* Integrations dropdown */
.nav-dd { position: relative; }
.nav-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-b);
  font-size: 14px;
  font-weight: 400;
  color: var(--white-50);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-dd-btn:hover { color: var(--white); background: var(--white-06); }
.nav-dd-btn svg { transition: var(--transition); opacity: 0.8; }
.nav-dd.open .nav-dd-btn { color: var(--white); background: var(--white-06); }
.nav-dd.open .nav-dd-btn svg { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 208px;
  background: rgba(15,22,40,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.nav-dd.open .nav-dd-menu,
.nav-dd:hover .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dd-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--white-70);
  border-radius: var(--radius-sm);
}
.nav-dd-menu a:hover { background: var(--white-06); color: var(--white); }
.nav-dd-menu .dd-sub {
  display: block;
  font-size: 11px;
  color: var(--white-50);
  margin-top: 2px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--ink) !important;
  font-family: var(--ff-h);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.nav-cta:hover {
  background: #c8f000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(221,255,71,0.3);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(8,13,26,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 28px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  font-size: 15px;
  color: var(--white-70);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav-drawer a:last-child { border: none; }
.nav-drawer a:hover { color: var(--white); }
.nav-drawer .drawer-cta {
  margin-top: 12px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--ff-h);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  border-bottom: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--ff-h);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  padding: 15px 28px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: #c8f000;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(221,255,71,0.28);
}
.btn-primary svg { transition: var(--transition); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white-70);
  font-family: var(--ff-h);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  transition: var(--transition);
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--white-30); color: var(--white); background: var(--white-04); }

/* ============================================
   SECTION BASE
   ============================================ */
.section { padding: 96px 0; }
.section-sm { padding: 72px 0; }
.section-alt { background: var(--ink-2); }
.section-line { border-top: 1px solid var(--border); }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--ff-h);
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 18px;
}
.section-title-sm {
  font-family: var(--ff-h);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}
.section-sub {
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--white-50);
  font-weight: 300;
  line-height: 1.75;
  max-width: 540px;
}
.section-head { margin-bottom: 56px; }
.section-head-center { text-align: center; margin-bottom: 56px; }
.section-head-center .section-sub { margin: 0 auto; }
.section-head-center .section-label { display: block; }

/* ============================================
   SUBPAGE HERO
   ============================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 148px 0 84px;
  border-bottom: 1px solid var(--border);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 65% 30%, rgba(64,128,255,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 12% 80%, rgba(221,255,71,0.07) 0%, transparent 50%),
    linear-gradient(165deg, var(--ink) 0%, #0A1020 55%, #080D1A 100%);
}
.page-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 70%);
}
.page-hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.page-hero .container,
.page-hero .container-narrow { position: relative; z-index: 2; }
.page-hero h1 {
  font-family: var(--ff-h);
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -2px;
  color: var(--white);
  margin-bottom: 22px;
  max-width: 780px;
}
.page-hero h1 .accent-line { color: var(--accent); }
.page-hero-sub {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--white-50);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 620px;
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-bdr);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--white-50);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--white-70); transition: var(--transition); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span[aria-current] { color: var(--white-90); }

/* Statement strip (system of record note) */
.statement {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--white-04);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-md);
  max-width: 720px;
  font-size: 14px;
  color: var(--white-70);
  line-height: 1.7;
}
.statement strong { color: var(--white); font-weight: 500; }

/* ============================================
   CAPABILITY CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.feature-card {
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.feature-card:hover {
  border-color: var(--accent-bdr);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-bdr);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 20px; height: 20px;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-name {
  font-family: var(--ff-h);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}
.feature-desc {
  font-size: 13px;
  color: var(--white-50);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ============================================
   GUARDRAILS (does NOT do)
   ============================================ */
.guardrail-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.guardrail-panel {
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.guardrail-panel h3 {
  font-family: var(--ff-h);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-50);
  margin-bottom: 18px;
}
.guardrail-list { display: flex; flex-direction: column; gap: 2px; }
.guardrail-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--white-70);
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.guardrail-list li:last-child { border-bottom: none; }
.g-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
}
.g-no { background: var(--red-dim); color: #FF8080; border: 1px solid rgba(255,82,82,0.22); }
.g-yes { background: var(--green-dim); color: var(--green); border: 1px solid rgba(61,219,130,0.22); }
.mvp-note {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-bdr);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--white-70);
  line-height: 1.65;
}
.mvp-note strong { color: var(--accent); font-weight: 600; }

/* ============================================
   ARCHITECTURE / DATA FLOW DIAGRAM
   ============================================ */
.arch {
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}
.arch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 30% 40%, rgba(64,128,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.arch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-50);
  font-weight: 500;
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ld-lofty { background: var(--blue-soft); }
.ld-replico { background: var(--accent); }
.ld-human { background: var(--green); }
.arch-steps { position: relative; z-index: 1; }
.arch-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 18px;
  position: relative;
  padding-bottom: 14px;
}
.arch-step:last-child { padding-bottom: 0; }
.arch-rail { position: relative; display: flex; justify-content: center; }
.arch-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-top: 16px;
  flex-shrink: 0;
  z-index: 1;
  border: 2px solid var(--ink);
}
.arch-step:not(:last-child) .arch-rail::after {
  content: '';
  position: absolute;
  top: 24px; bottom: -14px;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-2), var(--border));
  transform: translateX(-50%);
}
.dot-lofty { background: var(--blue-soft); box-shadow: 0 0 0 4px rgba(64,128,255,0.12); }
.dot-replico { background: var(--accent); box-shadow: 0 0 0 4px rgba(221,255,71,0.12); }
.dot-human { background: var(--green); box-shadow: 0 0 0 4px rgba(61,219,130,0.12); }
.arch-body {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: var(--transition);
}
.arch-body:hover { border-color: var(--border-2); }
.arch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.arch-title {
  font-family: var(--ff-h);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.2px;
}
.arch-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.tag-lofty { background: var(--blue-dim); color: var(--blue-soft); }
.tag-replico { background: var(--accent-dim); color: var(--accent); }
.tag-human { background: var(--green-dim); color: var(--green); }
.arch-desc {
  font-size: 12.5px;
  color: var(--white-50);
  line-height: 1.6;
  margin-top: 5px;
}

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
  background: var(--ink-2);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 88px 0;
}
.cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(221,255,71,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band .section-title,
.cta-band .section-title-sm { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-band .section-sub { margin: 0 auto 36px; text-align: center; }
.cta-band .hero-actions { justify-content: center; }

/* ============================================
   LEGAL DOCUMENT LAYOUT
   ============================================ */
.doc-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 56px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 96px;
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.doc-toc h2 {
  font-family: var(--ff-h);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-50);
  margin-bottom: 14px;
}
.doc-toc ol { display: flex; flex-direction: column; gap: 1px; counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a {
  display: block;
  font-size: 12.5px;
  color: var(--white-50);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1.4;
}
.doc-toc a::before {
  content: counter(toc, decimal-leading-zero) ".";
  color: var(--white-40);
  margin-right: 7px;
  font-size: 11px;
}
.doc-toc a:hover { color: var(--white); background: var(--white-06); }

.doc-body { max-width: 720px; }
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.doc-meta div { font-size: 12px; color: var(--white-50); }
.doc-meta strong { color: var(--white-70); font-weight: 500; }
.doc-section { margin-bottom: 44px; scroll-margin-top: 100px; }
/* Subtle closing note on legal pages */
.doc-footnote {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--white-50);
  line-height: 1.7;
  font-style: italic;
}
.doc-section h2 {
  font-family: var(--ff-h);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.4px;
  margin-bottom: 14px;
  padding-top: 4px;
}
.doc-section h2 .doc-num {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}
.doc-section h3 {
  font-family: var(--ff-h);
  font-size: 15px;
  font-weight: 700;
  color: var(--white-90);
  letter-spacing: -0.2px;
  margin: 22px 0 10px;
}
.doc-section p {
  font-size: 14.5px;
  color: var(--white-70);
  line-height: 1.8;
  margin-bottom: 14px;
  font-weight: 300;
}
.doc-section ul { margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.doc-section ul li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--white-70);
  line-height: 1.7;
  font-weight: 300;
}
.doc-section ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}
.doc-section strong { color: var(--white); font-weight: 500; }
.doc-section a { color: var(--accent); border-bottom: 1px solid var(--accent-bdr); }
.doc-section a:hover { border-bottom-color: var(--accent); }

/* Clearly visible development placeholder */
.ph {
  display: inline-block;
  background: rgba(255,82,82,0.12);
  border: 1px dashed rgba(255,82,82,0.5);
  color: #FF8080;
  font-family: var(--ff-b);
  font-size: 0.88em;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ============================================
   FINE PRINT
   ============================================ */
.fine-print {
  font-size: 12.5px;
  color: var(--white-50);
  line-height: 1.7;
  max-width: 660px;
  margin: 26px auto 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: #0D1525;
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
/* Slim footer: single row of links + copyright */
footer.footer-slim { padding: 32px 0; }
footer.footer-slim .footer-bottom { padding-top: 0; border-top: none; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-tagline {
  font-size: 13px;
  color: var(--white-50);
  line-height: 1.65;
  max-width: 260px;
  margin-bottom: 20px;
}
.footer-markets { display: flex; flex-wrap: wrap; gap: 8px; }
.market-pill {
  font-size: 11px;
  padding: 3px 9px;
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--white-50);
}
.footer-col h4 {
  font-family: var(--ff-h);
  font-size: 12px;
  font-weight: 700;
  color: var(--white-50);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  font-size: 14px;
  color: var(--white-50);
  transition: var(--transition);
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 12px; color: var(--white-50); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { font-size: 12px; color: var(--white-50); transition: var(--transition); }
.footer-legal a:hover { color: var(--white-70); }

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 210px 1fr; gap: 36px; }
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 28px; }
  .doc-toc { position: static; max-height: none; }
  .doc-toc ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; }
  .guardrail-wrap { grid-template-columns: 1fr; gap: 28px; }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta.desktop-only { display: none; }
  .nav-toggle { display: flex; }

  .page-hero { padding: 108px 0 60px; }
  .page-hero h1 { letter-spacing: -0.5px; font-size: clamp(30px, 8.5vw, 44px); overflow-wrap: break-word; }
  .page-hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }

  .section { padding: 72px 0; }
  .section-sm { padding: 56px 0; }
  .section-head, .section-head-center { margin-bottom: 40px; }

  .card-grid, .card-grid-2 { grid-template-columns: 1fr; }
  .arch { padding: 26px 18px; }
  .arch-step { grid-template-columns: 20px 1fr; gap: 12px; }
  .cta-band { padding: 68px 0; }

  .contact-card { padding: 26px 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }
}

@media (max-width: 560px) {
  .doc-toc ol { grid-template-columns: 1fr; }
  .doc-section h2 { font-size: 18px; }
  .statement { padding: 16px 18px; font-size: 13.5px; }
  .ph { white-space: normal; }
}
