/* Twerll legal pages
   Shared stylesheet for /legal/*.html
   Plain static CSS: these pages must render with no JS and no DC runtime.
   Tokens mirror the Twerll app's design system: same values as the home page.
   Fonts are loaded via <link> in each page's <head> so they fetch in parallel
   with this stylesheet rather than being serialized behind it. */

:root {
  --primary: #8B5CFF;
  --secondary: #E24FBE;
  --paper: #F4F6FB;
  --card: #FFFFFF;
  --text: #141A24;
  --text-2: #5A6474;
  --rule: rgba(51, 65, 85, .16);
  --rule-soft: rgba(51, 65, 85, .09);
  --chip: rgba(139, 92, 255, .12);
  --btn-label: #F4F6FB;

  --display: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --measure: 68ch;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 246, 251, .88);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead-in {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--text);
  text-decoration: none; letter-spacing: -.02em;
}
.brand img { width: 28px; height: 28px; display: block; }

/* The app's buttons are flat: solid fill, radius 25, Inter Tight 600 at 18px. */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 25px;
  font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: opacity .15s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--btn-label); }
.btn-primary:hover { opacity: .88; }
.btn-ghost { border-color: var(--rule); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--chip); border-color: var(--primary); }

/* ---------- layout ---------- */

.page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
@media (min-width: 1040px) {
  .page { grid-template-columns: 236px minmax(0, 1fr); gap: 72px; }
  /* Hub has no TOC, so keep it a single centred column. */
  .page-solo { grid-template-columns: minmax(0, 1fr); }
}
.page-solo { max-width: 920px; }

/* ---------- table of contents ---------- */

.toc { display: none; }
@media (min-width: 1040px) {
  .toc {
    display: block;
    position: sticky; top: 108px;
    align-self: start;
    max-height: calc(100vh - 148px);
    overflow-y: auto;
    scrollbar-width: none;
    font-size: 14px; line-height: 1.45;
  }
  .toc::-webkit-scrollbar { display: none; }
}
.toc-title { font-size: 14px; color: var(--text-2); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 2px; }
.toc a {
  display: block; padding: 5px 0 5px 12px;
  border-left: 2px solid var(--rule);
  color: var(--text-2); text-decoration: none;
}
.toc a:hover { color: var(--text); border-left-color: var(--primary); }

/* ---------- document ---------- */

.doc { max-width: var(--measure); min-width: 0; }

.eyebrow { font-size: 14px; color: var(--text-2); margin: 0 0 18px; }
.eyebrow a { color: var(--text-2); text-decoration: none; }
.eyebrow a:hover { color: var(--primary); }

h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.08; letter-spacing: -.02em;
  color: var(--text); margin: 0 0 18px;
}

.updated { font-size: 14px; color: var(--text-2); margin: 0 0 36px; }

.summary {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 24px 26px;
  margin: 0 0 52px;
  font-size: 16.5px;
  color: var(--text);
}
.summary strong {
  display: block; font-family: var(--display); font-weight: 600; color: var(--text);
  font-size: 16px; letter-spacing: -.01em; margin-bottom: 10px;
}
.summary p { margin: 0; }

section { margin: 0 0 44px; scroll-margin-top: 96px; }

h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 24px; line-height: 1.25; letter-spacing: -.01em;
  color: var(--text);
  margin: 0 0 16px; padding-top: 26px;
  border-top: 1px solid var(--rule);
}
section:first-of-type h2 { padding-top: 0; border-top: 0; }

.doc p { margin: 0 0 16px; color: var(--text-2); }
.doc p:last-child { margin-bottom: 0; }

/* Sub-headings inside a document. The legal pages never needed these, but the guide
   pages do. Without a rule here h3 falls to the UA default, which is bold: the browser
   then synthesizes weight 700 out of Inter Tight 600 and breaks the two-weights rule. */
.doc h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 19px; line-height: 1.3; letter-spacing: -.01em;
  color: var(--text); margin: 26px 0 10px;
}

.doc ul { margin: 0 0 16px; padding: 0; list-style: none; }
.doc ul:last-child { margin-bottom: 0; }
.doc li { position: relative; padding-left: 22px; margin: 0 0 10px; color: var(--text-2); }
.doc li::before {
  content: ''; position: absolute; left: 4px; top: .68em;
  width: 5px; height: 5px; border-radius: 8px;
  background: var(--primary);
}

/* Numbered lists. The bullet above is applied to every .doc li, so without this an
   ordered list renders its number AND a purple dot. Restore the browser's numbering
   and switch the dot off. */
.doc ol { margin: 0 0 16px; padding-left: 22px; list-style: decimal; }
.doc ol:last-child { margin-bottom: 0; }
.doc ol li { position: static; padding-left: 6px; }
.doc ol li::before { display: none; }

.doc .lede { color: var(--text); }

/* ---------- hub cards ---------- */

.cards { display: grid; gap: 16px; margin: 0 0 48px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 26px 24px 24px;
  text-decoration: none; color: inherit;
  transition: border-color .18s ease, background .18s ease;
}
.card:hover { border-color: var(--primary); background: var(--chip); }
.card h3 {
  font-family: var(--display); font-weight: 600; font-size: 21px;
  line-height: 1.25; color: var(--text); margin: 0 0 10px; letter-spacing: -.01em;
}
.card p { margin: 0 0 20px; font-size: 15px; color: var(--text-2); flex: 1; }
.card .go { font-size: 15px; color: var(--primary); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--rule); margin-top: 24px; }
.foot-in {
  max-width: 1180px; margin: 0 auto; padding: 40px 24px 64px;
  display: flex; flex-wrap: wrap; gap: 18px 40px;
  align-items: baseline; justify-content: space-between;
  font-size: 14px; color: var(--text-2);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--primary); text-decoration: underline; }

.mirror {
  max-width: var(--measure);
  margin: 48px 0 0; padding: 20px 22px;
  background: var(--chip);
  border-radius: 20px;
  font-size: 15px; color: var(--text);
}
.mirror p { margin: 0; }

@media print {
  .masthead, .toc, .foot, .btn { display: none !important; }
  body { background: #FFFFFF; font-size: 11pt; }
  .page { display: block; padding: 0; }
  a { color: inherit; text-decoration: none; }
}
