/* Accomy legal pages — shared styles
   Brand: Inter, indigo #5248E3. Used by index.html (Privacy), terms.html, cookies.html */

:root {
  --brand: #5248E3;
  --brand-dark: #322F80;
  --brand-50: #F3F1FF;
  --ink: #0F172A;
  --text: #334155;
  --strong: #1E293B;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-soft: #EEF2F6;
  --bg: #ffffff;
  --bg-soft: #F8FAFC;
  --maxw: 1180px;
  --header-h: 64px;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; display: block; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 9px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.site-nav .ext { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 360px at 80% -120px, rgba(82,72,227,0.12), transparent 70%),
    linear-gradient(180deg, var(--brand-50), #ffffff 75%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 44px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}
.hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-weight: 800;
}
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14.5px;
}
.hero .meta b { color: var(--strong); font-weight: 600; }
.hero .lede {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--text);
  font-size: 17px;
}

/* ---------- Layout ---------- */
.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---------- Table of contents ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow: auto;
  font-size: 14px;
}
.toc h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  line-height: 1.4;
}
.toc a:hover { color: var(--ink); border-left-color: #cbd5e1; text-decoration: none; }
.toc a.active {
  color: var(--brand);
  border-left-color: var(--brand);
  background: var(--brand-50);
  font-weight: 600;
}

/* ---------- Content ---------- */
.content { min-width: 0; }
.content section { scroll-margin-top: calc(var(--header-h) + 20px); }
.content section + section { margin-top: 40px; }

.content h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.content h3 {
  font-size: 17px;
  color: var(--strong);
  font-weight: 700;
  margin: 28px 0 10px;
}
.content h4 {
  font-size: 15px;
  color: var(--strong);
  font-weight: 700;
  margin: 20px 0 8px;
}
.content p { margin: 0 0 14px; }
.content strong, .content b { color: var(--strong); font-weight: 600; }
.lead { font-style: italic; font-weight: 600; color: var(--strong); }

.content .intro p { font-size: 16.5px; }

/* Legal nested lists with parenthesised markers */
ol.alpha, ol.roman, ol.upper, ol.dash {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
ol.alpha { counter-reset: alpha; }
ol.roman { counter-reset: roman; }
ol.upper { counter-reset: upper; }
ol.alpha > li, ol.roman > li, ol.upper > li, ol.dash > li {
  position: relative;
  padding-left: 42px;
  margin: 0 0 12px;
}
ol.alpha > li { counter-increment: alpha; }
ol.roman > li { counter-increment: roman; }
ol.upper > li { counter-increment: upper; }
ol.alpha > li::before { content: "(" counter(alpha, lower-alpha) ")"; }
ol.roman > li::before { content: "(" counter(roman, lower-roman) ")"; }
ol.upper > li::before { content: "(" counter(upper, upper-alpha) ")"; }
ol.dash > li { padding-left: 24px; }
ol.dash > li::before { content: "\2022"; color: var(--brand); }
ol.alpha > li::before, ol.roman > li::before, ol.upper > li::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  text-align: left;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
ol.dash > li::before { position: absolute; left: 6px; top: 0; font-weight: 700; }
ol .lead { display: inline; }

/* Callout / highlight card */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px;
}
.card.brand {
  background: var(--brand-50);
  border-color: #ddd9fb;
}
.card p:last-child { margin-bottom: 0; }
.card .ttl { font-weight: 700; color: var(--strong); margin: 0 0 6px; display: block; }

/* Definition table (Terms interpretation) */
.deftable { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.deftable th, .deftable td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border: 1px solid var(--line);
}
.deftable thead th {
  background: var(--brand-dark);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.deftable tbody th {
  background: var(--bg-soft);
  width: 210px;
  color: var(--strong);
  font-weight: 700;
}
.deftable tbody tr:nth-child(even) td { background: #fcfdfe; }

.legal-caps { letter-spacing: 0.005em; }

/* Back to top */
.totop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.site-footer .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { width: 100%; color: #94A3B8; font-size: 13px; line-height: 1.6; }

/* ---------- Mobile TOC ---------- */
.toc-mobile { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .toc { display: none; }
  .toc-mobile {
    display: block;
    margin: 0 0 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
    overflow: hidden;
  }
  .toc-mobile > summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    font-weight: 600;
    color: var(--strong);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .toc-mobile > summary::-webkit-details-marker { display: none; }
  .toc-mobile > summary::after { content: "▾"; color: var(--muted); }
  .toc-mobile[open] > summary::after { content: "▴"; }
  .toc-mobile ol { list-style: none; margin: 0; padding: 4px 8px 12px; }
  .toc-mobile a { display: block; padding: 8px 12px; color: var(--muted); border-radius: 8px; }
  .toc-mobile a:hover { background: #fff; color: var(--ink); text-decoration: none; }
  .deftable tbody th { width: auto; }
}

@media (max-width: 560px) {
  .site-nav .full { display: none; }
  .hero .wrap { padding: 40px 20px 32px; }
  .layout { padding: 20px 20px 64px; }
  .site-header .bar, .site-footer .wrap, .hero .wrap { padding-left: 20px; padding-right: 20px; }
  .deftable, .deftable thead, .deftable tbody, .deftable tr, .deftable th, .deftable td { display: block; }
  .deftable thead { display: none; }
  .deftable tbody th { border-bottom: 0; }
  .deftable tbody td { border-top: 0; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-nav, .toc, .toc-mobile, .totop, .hero .eyebrow { display: none !important; }
  .hero { background: none; border: 0; }
  .layout { display: block; padding: 0; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .content section { page-break-inside: auto; }
  .content h2 { page-break-after: avoid; }
}
