@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&family=Unbounded:wght@600;700&display=swap');

:root {
  --bg: #080b09;
  --bg-deep: #050705;
  --surface: #101611;
  --surface-raised: #151d17;
  --surface-hover: #1b261e;
  --ink: #f3f6ef;
  --muted: #98a597;
  --muted-strong: #c2ccc0;
  --line: rgba(232, 246, 232, 0.12);
  --line-strong: rgba(167, 211, 111, 0.32);
  --accent: #79c575;
  --accent-bright: #a7d36f;
  --accent-ink: #071008;
  --warn: #2a2414;
  --warn-line: rgba(240, 183, 102, 0.42);
  --radius: 8px;
  --content-width: 1180px;
  --topbar-height: 66px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg-deep); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(121, 197, 117, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(121, 197, 117, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; }

.shell { width: min(var(--content-width), calc(100% - 48px)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--topbar-height);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 9, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(167, 211, 111, 0.22);
  border-radius: 8px;
  background: #111812;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.brand-mark img { width: 92%; height: 92%; object-fit: contain; }

.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

.nav-links a {
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, 0.08); outline: 0; }

.consent-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block: 18px 10px;
}

.consent-controls button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding-inline: 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.consent-controls button.is-primary {
  border-color: transparent;
  color: #06110c;
  background: #a7d36f;
}

.consent-controls button:hover { border-color: rgba(255, 255, 255, 0.5); }
.consent-controls button.is-primary:hover { background: #b9df89; }
.consent-controls button:focus-visible { outline: 3px solid #f0b766; outline-offset: 3px; }
.consent-status { min-height: 1.5em; color: var(--muted); }

.hero {
  padding: 72px 0 42px;
  border-bottom: 1px solid var(--line);
}

.doc.hero { display: block; max-width: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; letter-spacing: 0; }

h1 {
  max-width: 890px;
  margin-top: 12px;
  font-family: "Unbounded", "Onest", sans-serif;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.32;
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

h3 { font-size: 17px; font-weight: 800; line-height: 1.4; }

.lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.legal-document {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.legal-document-intro {
  padding: 72px max(24px, calc((100% - var(--content-width)) / 2)) 42px;
  border-bottom: 1px solid var(--line);
}

.legal-document-intro .lead { margin-bottom: 0; }

.legal-reader-layout {
  display: grid;
  grid-template-columns: minmax(188px, 230px) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 16px;
}

.legal-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 28px);
  max-height: calc(100vh - var(--topbar-height) - 50px);
  overflow: auto;
  padding-right: 8px;
}

.legal-toc-title {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc-list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }

.legal-toc-link {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-left: 1px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.legal-toc-link:hover,
.legal-toc-link:focus-visible,
.legal-toc-link.is-active {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(121, 197, 117, 0.08);
  outline: 0;
}

.legal-toc-number { flex: 0 0 auto; color: var(--accent); font-variant-numeric: tabular-nums; }

.legal-content { min-width: 0; display: grid; gap: 16px; }

.legal-content > .panel,
.legal-content > .grid-2,
.legal-content > .grid-3,
.legal-content > .section,
.legal-content > .note {
  margin: 0;
}

.panel,
.card,
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(21, 29, 23, 0.96), rgba(13, 19, 15, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.panel, .card { padding: clamp(20px, 3vw, 34px); }

.panel > h2:first-child,
.card > h2:first-child { display: flex; align-items: baseline; gap: 10px; }

.panel > h2:first-child::before,
.card > h2:first-child::before {
  content: "";
  width: 4px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
}

.doc p, .doc ul, .doc ol, .legal-content p, .legal-content ul, .legal-content ol { margin: 12px 0 0; }

.doc p, .legal-content p, .legal-content li { color: var(--muted-strong); }

.doc li + li { margin-top: 7px; }

.legal-content a,
.footer a { color: var(--accent-bright); text-decoration-color: rgba(167, 211, 111, 0.5); text-underline-offset: 3px; }

.grid-3, .grid-2 { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section { padding: 32px 0; }

.price-card { display: flex; flex-direction: column; gap: 18px; padding: 22px; }
.price-card.featured { border-color: rgba(167, 211, 111, 0.52); background: linear-gradient(155deg, #1b2a1a, #111a12); }

.price-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.price { color: var(--ink); font-size: 30px; font-weight: 800; line-height: 1; }
.tokens { width: fit-content; padding: 6px 9px; border-radius: 999px; color: var(--accent-ink); background: linear-gradient(100deg, var(--accent), var(--accent-bright)); font-size: 13px; font-weight: 800; }
.muted { color: var(--muted); }

.list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 9px; }
.list li::before { content: "•"; color: var(--accent-bright); font-weight: 900; }
.locked { color: #efbd72; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted-strong); text-align: left; vertical-align: top; }
th { color: var(--muted); background: rgba(255, 255, 255, 0.04); font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.note { padding: 18px 20px; border: 1px solid var(--warn-line); border-radius: var(--radius); color: #f0d497; background: var(--warn); }

.legal-pricing > .hero { width: min(var(--content-width), calc(100% - 48px)); margin: 0 auto; }
.legal-pricing > .hero .lead { max-width: 790px; }

.footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 42px 0; color: var(--muted); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.footer-brand,
.footer-column { display: grid; align-content: start; gap: 8px; font-size: 13px; line-height: 1.45; }
.footer-brand strong,
.footer-column strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-brand > strong {
  color: var(--accent-bright);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}
.footer-column a,
.footer-brand a { width: fit-content; color: var(--muted); text-decoration: none; }
.footer-column a:hover,
.footer-column a:focus-visible,
.footer-brand a:hover,
.footer-brand a:focus-visible { color: var(--accent-bright); outline: 0; }

@media (max-width: 860px) {
  .shell, .legal-reader-layout, .legal-pricing > .hero { width: min(100% - 32px, var(--content-width)); }
  .nav { align-items: flex-start; flex-direction: column; gap: 8px; padding: 13px 0; }
  .nav-links { justify-content: flex-start; }
  .hero { padding: 44px 0 30px; }
  .legal-document-intro { padding: 44px 16px 30px; }
  h1 { font-size: clamp(26px, 8.2vw, 34px); }
  .lead { font-size: 16px; }
  .legal-reader-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .legal-toc { position: static; max-height: none; overflow: visible; padding: 0 0 8px; }
  .legal-toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .legal-toc-link { padding: 8px; font-size: 12px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .nav-links a { padding: 6px 7px; font-size: 12px; }
  .legal-toc-list { grid-template-columns: 1fr; }
  .panel, .card { padding: 18px; }
  h2 { font-size: 18px; }
  .price { font-size: 27px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
