/* Atlas site — shared styles for legal / utility pages */
:root {
  --canvas: #f0eee9;
  --paper: #ffffff;
  --ink: #0E1A2A;
  --navy: #1A2744;
  --navy-deep: #0F1A30;
  --teal: #0A9B8E;
  --teal-deep: #087A70;
  --mint: #6EE7D3;
  --muted: #5C6B7A;
  --muted-light: #8A97A4;
  --hairline: rgba(14,26,42,0.08);
  --hairline-soft: rgba(14,26,42,0.05);
  --chip-bg: rgba(10,155,142,0.10);
  --nav-bg: rgba(240,238,233,0.85);
  --toggle-bg: rgba(14,26,42,0.05);
  --toggle-border: rgba(14,26,42,0.1);
}
html.dark {
  --canvas: #0B1424;
  --paper: #121E33;
  --ink: #EEF2F6;
  --muted: rgba(238,242,246,0.6);
  --muted-light: rgba(238,242,246,0.42);
  --hairline: rgba(255,255,255,0.09);
  --hairline-soft: rgba(255,255,255,0.05);
  --nav-bg: rgba(11,20,36,0.8);
  --toggle-bg: rgba(255,255,255,0.08);
  --toggle-border: rgba(255,255,255,0.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 90px; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}
html.dark body {
  background:
    radial-gradient(100% 55% at 88% 0%, rgba(46,204,113,0.10) 0%, rgba(46,204,113,0) 55%),
    radial-gradient(80% 50% at 2% 4%, rgba(10,155,142,0.18) 0%, rgba(10,155,142,0) 60%),
    linear-gradient(180deg, #0F1A30 0%, #0B1424 45%, #0A111E 100%);
  background-attachment: fixed;
}
.serif { font-family: 'Fraunces', serif; }
.mono { font-family: 'JetBrains Mono', monospace; }
a { text-decoration: none; color: inherit; }
img { display: block; }

.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Nav ---------- */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-brand span { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 500; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.link { font-size: 13.5px; font-weight: 500; color: var(--muted); transition: color .18s ease; }
.nav-links a.link:hover { color: var(--ink); }
.nav-links a.link.active { color: var(--ink); }

.btn {
  font-family: 'Geist', sans-serif; font-weight: 600; font-size: 13px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #0A9B8E 0%, #087A70 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(10,155,142,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10,155,142,0.42); }
.btn-nav { height: 38px; padding: 0 16px; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px;
  background: var(--toggle-bg); border: 1px solid var(--toggle-border);
  color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--hairline); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* Mobile hamburger */
.nav-check { display: none; }
.nav-burger { display: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-check:checked ~ .nav-inner .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-check:checked ~ .nav-inner .nav-burger span:nth-child(2) { opacity: 0; }
.nav-check:checked ~ .nav-inner .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-menu {
  display: none; flex-direction: column;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
  padding: 4px 32px 20px;
}
.nav-check:checked ~ .nav-menu { display: flex; }
.nav-menu a { padding: 13px 0; font-size: 15px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--hairline-soft); }
.nav-menu a:last-child { border-bottom: none; color: var(--teal); font-weight: 600; }
.nav-menu a:hover { color: var(--ink); }

/* ---------- Legal page scaffold ---------- */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 148px 32px 0; }
.legal-head { padding-bottom: 36px; margin-bottom: 44px; border-bottom: 1px solid var(--hairline); }
.legal-head .kicker { display: block; margin-bottom: 14px; }
.legal-head h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(38px, 5vw, 52px); font-weight: 400; letter-spacing: -1px; line-height: 1.05;
  margin-bottom: 16px;
}
.legal-head h1 em { font-style: italic; color: var(--teal); }
.legal-head .updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted-light);
}

.legal-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 27px; font-weight: 400; letter-spacing: -0.4px; line-height: 1.15;
  margin: 52px 0 16px;
}
.legal-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px; font-weight: 500; letter-spacing: -0.2px;
  margin: 32px 0 10px;
}
.legal-body p { color: var(--muted); margin-bottom: 16px; }
.legal-body p strong, .legal-body li strong { color: var(--ink); font-weight: 600; }
.legal-body a.tlink { color: var(--teal); border-bottom: 1px solid rgba(10,155,142,0.3); transition: border-color .18s; }
.legal-body a.tlink:hover { border-color: var(--teal); }

.legal-body ul, .legal-body ol { margin: 0 0 20px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legal-body ul li, .legal-body ol li { color: var(--muted); position: relative; padding-left: 26px; }
.legal-body ul li::before {
  content: ''; position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--teal);
}
.legal-body ol { counter-reset: legal; }
.legal-body ol li { counter-increment: legal; padding-left: 34px; }
.legal-body ol li::before {
  content: counter(legal, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--teal);
}
.legal-body ul ul { margin-top: 10px; margin-bottom: 0; }

/* Contact / callout card */
.callout {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 18px;
  padding: 32px; margin-top: 52px;
}
.callout h2 { margin: 0 0 10px !important; }
.callout p { margin-bottom: 10px; }
.callout p:last-child { margin-bottom: 0; }

/* Agent card */
.agent-card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 18px;
  padding: 28px; margin-bottom: 20px;
}
.agent-card .who { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 500; margin-bottom: 8px; color: var(--ink); }
.agent-card p { margin-bottom: 8px; }
.agent-card p:last-child { margin-bottom: 0; }

/* Template block */
pre.template {
  background: var(--navy-deep); color: rgba(255,255,255,0.85);
  border-radius: 18px; padding: 28px;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7;
  margin: 0 0 20px;
  overflow-x: auto;
}

/* ---------- Footer ---------- */
footer.site-footer { margin-top: 88px; border-top: 1px solid var(--hairline); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 56px 32px 40px;
  display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap;
}
.footer-brand .row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-brand span { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 500; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.footer-brand a { color: var(--muted); border-bottom: 1px solid var(--hairline); transition: color .18s; }
.footer-brand a:hover { color: var(--ink); }
.footer-cols { display: flex; gap: 72px; }
.footer-col .hd { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted-light); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--muted); transition: color .18s; }
.footer-col a:hover { color: var(--ink); }
.footer-base { max-width: 1180px; margin: 0 auto; padding: 0 32px 40px; }
.footer-base .line {
  border-top: 1px solid var(--hairline); padding-top: 24px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted-light);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

@media (max-width: 720px) {
  .nav-links .link { display: none; }
  .nav-links .btn-nav { display: none; }
  .nav-burger { display: flex; }
  .legal-wrap { padding: 128px 24px 0; }
  .footer-cols { gap: 48px; }
}
