/* The legal pages (public/privacy.html, public/terms.html). They are static
   files, outside the Astro build, so they can't import src/styles/site.css:
   this file repeats its tokens, nav, buttons and footer (keep them in step;
   tests/legalPages.test.ts checks the tokens) and adds the document layout.
   Inter is served from /fonts, the same file the layout bundles. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.tt-site {
  --bg: #ffffff;
  --bg-soft: #f7f7fb;
  --card: #ffffff;
  --ink: #09090b;
  --muted: #52525b;
  --subtle: #71717a;
  --dim: #a1a1aa;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --brand: #4640ea;
  --brand-hover: #3a31d0;
  --brand-2: #7d8bfb;
  --hl: #d5d9ff;
  --hl-soft: #eef0ff;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --font: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; }
.tt-site {
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  font-size: 16px; line-height: 1.55;
}
.tt-site * { box-sizing: border-box; }
.tt-site ::selection { background: var(--brand); color: #fff; }
.tt-site a { color: inherit; text-decoration: none; }
.tt-site img, .tt-site svg { display: block; max-width: 100%; }
.tt-site sup { font-size: 0.6em; line-height: 0; }
.tt-site .wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* the highlighter (see site.css) */
.tt-site .hl {
  display: inline-block; line-height: 0.94;
  padding: 0 0.12em 0.1em; margin: 0 -0.02em;
  border-radius: 0.12em; background: var(--hl);
}

/* buttons */
.tt-site .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff;
  font: 600 14px/1 var(--font); letter-spacing: -0.005em; white-space: nowrap;
  transition: background 160ms, transform 160ms var(--ease);
}
.tt-site .btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); transform: translateY(-1px); }
.tt-site :is(.btn, .menu summary):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* nav (components/site/SiteNav.astro, blog variant) */
.tt-site nav.top {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.tt-site .nav-row { height: 72px; display: flex; align-items: center; gap: 32px; }
.tt-site .nav-row .logo img { height: 30px; width: auto; }
.tt-site .nav-links { display: flex; gap: 28px; margin: 0 auto; font-size: 15px; font-weight: 500; color: var(--muted); }
.tt-site .nav-links a { white-space: nowrap; transition: color 150ms; }
.tt-site .nav-links a:hover { color: var(--ink); }
.tt-site .nav-right { display: flex; align-items: center; gap: 8px; }
.tt-site .nav-login { font-size: 15px; font-weight: 500; color: var(--muted); padding: 0 12px; white-space: nowrap; }
.tt-site .nav-login:hover { color: var(--ink); }
.tt-site .menu { display: none; }
.tt-site .menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); }
.tt-site .menu summary::-webkit-details-marker { display: none; }
.tt-site .menu .i-close { display: none; }
.tt-site .menu[open] .i-open { display: none; }
.tt-site .menu[open] .i-close { display: block; }
.tt-site .menu-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 32px -16px rgba(9, 9, 11, 0.2);
  padding: 8px clamp(16px, 3vw, 32px) 20px; display: grid;
}
.tt-site .menu-panel a { padding: 12px 0; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--line); }
.tt-site .menu-panel a:last-child { border-bottom: 0; }
@media (max-width: 960px) {
  .tt-site .nav-links, .tt-site .nav-login { display: none; }
  .tt-site .nav-right { margin-left: auto; }
  .tt-site .menu { display: block; }
}
@media (max-width: 420px) {
  .tt-site .nav-row { gap: 12px; }
  .tt-site .nav-row .logo img { height: 24px; }
  .tt-site .nav-right .btn { padding: 0 14px; font-size: 13px; }
}

/* ── The document ─────────────────────────────────────────────────── */
.tt-site .legal-head { padding: 64px 0 40px; background: radial-gradient(ellipse 60% 90% at 85% 0%, rgba(125, 139, 251, 0.14), transparent 70%); }
.tt-site .legal-head h1 {
  margin: 0; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.12;
  letter-spacing: -0.045em; font-weight: 700;
}
.tt-site .legal-meta { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.tt-site .legal-meta p { margin: 0; }
.tt-site .legal-meta strong { color: var(--ink); font-weight: 600; }

.tt-site .legal-body {
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 760px);
  gap: 64px; align-items: start; padding-bottom: 96px;
}
.tt-site .toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; font-size: 14px; }
.tt-site .toc summary {
  list-style: none; cursor: default;
  margin: 0 0 12px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle);
}
.tt-site .toc summary::-webkit-details-marker { display: none; }
.tt-site .toc ol { margin: 0; padding: 0 0 0 2.2em; display: grid; gap: 8px; color: var(--subtle); }
/* Tabular figures for the numbers only: Inter's also widen hyphens. */
.tt-site .toc li::marker { font-variant-numeric: tabular-nums; }
.tt-site .toc li { padding-left: 2px; }
.tt-site .toc a { color: var(--muted); line-height: 1.4; transition: color 150ms; }
.tt-site .toc a:hover { color: var(--brand); }
/* Always open beside the text on wide screens. */
@media (min-width: 961px) { .tt-site .toc summary { pointer-events: none; } }

.tt-site .content { min-width: 0; font-size: 16.5px; line-height: 1.7; color: #27272a; }
.tt-site .content > .section:first-child { padding-top: 0; }
.tt-site .section { padding: 8px 0 24px; }
.tt-site .content p { margin: 0 0 14px; }
.tt-site .content :is(ul, ol) { margin: 0 0 16px; padding-left: 1.4em; }
.tt-site .content li { margin: 0 0 8px; padding-left: 0.2em; }
.tt-site .content li::marker { color: var(--dim); }
.tt-site .content strong { font-weight: 600; color: var(--ink); }
.tt-site .content a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(70, 64, 234, .35); text-underline-offset: 3px; }
.tt-site .content a:hover { text-decoration-color: currentColor; }
.tt-site .section-title {
  margin: 28px 0 14px; padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 22px; line-height: 1.25; letter-spacing: -0.025em; font-weight: 700; color: var(--ink);
}
.tt-site .subsection-title { margin: 22px 0 10px; font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 700; color: var(--ink); }
.tt-site .definition { margin: 0 0 8px 20px; }
/* Section links land below the sticky top bar. */
.tt-site .anchor { display: block; position: relative; top: -96px; visibility: hidden; height: 0; }
.tt-site .highlight {
  margin: 20px 0; padding: 20px 24px; border-radius: var(--r);
  background: var(--hl-soft); border: 1px solid #dfe2ff; border-left: 3px solid var(--brand);
}
.tt-site .highlight p:last-child { margin-bottom: 0; }

@media (max-width: 960px) {
  .tt-site .legal-head { padding: 44px 0 28px; }
  .tt-site .legal-body { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 64px; }
  /* On narrower screens the contents fold into a box above the text. */
  .tt-site .toc { position: static; max-height: none; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-soft); }
  .tt-site .toc summary { cursor: pointer; margin: 0; display: flex; justify-content: space-between; }
  .tt-site .toc summary::after { content: "+"; font-size: 16px; color: var(--muted); }
  .tt-site .toc[open] summary::after { content: "–"; }
  .tt-site .toc[open] ol { margin-top: 14px; }
  .tt-site .content { font-size: 16px; }
}

/* footer (components/site/SiteFooter.astro) */
.tt-site footer.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--line); }
.tt-site .foot-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.tt-site .foot-brand img { height: 28px; width: auto; }
.tt-site .foot-brand p { margin: 14px 0 0; max-width: 280px; font-size: 14px; color: var(--muted); }
.tt-site .foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); }
.tt-site .foot-col .foot-h { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.tt-site .foot-col a { color: var(--muted); transition: color 150ms; }
.tt-site .foot-col a:hover, .tt-site .foot-col a[aria-current="page"] { color: var(--ink); }
.tt-site .foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--subtle);
}
.tt-site .soc-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 12px; color: var(--ink); font-weight: 500; transition: border-color 150ms;
}
.tt-site .soc-pill:hover { border-color: var(--line-2); }
.tt-site .soc-pill img { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .tt-site .foot-top { grid-template-columns: 1fr 1fr 1fr; }
  .tt-site .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .tt-site .foot-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }

@media (prefers-reduced-motion: reduce) {
  .tt-site .btn { transition: none; }
}
