/* The legal pages (terms, privacy, refunds, disclaimer, trademarks, contact): long-form reading in the landing
   page's look. Tokens are copied from ../landing.css so these pages never load the landing page's 150 KB of CSS.
   Placeholders that legal.js could not fill show as amber [brackets] (.legal-ph), on screen and in print. */

:root {
  --canvas: #05070f;
  --ground: #080b17;
  --surface: #0d1224;
  --ink: #f2f4fb;
  --ink-soft: #aeb7d0;
  --ink-note: #8c96b4;
  --accent: #8ea2ff;
  --accent-ink: #060814;
  --line: rgba(160, 175, 255, .16);
  --edge: rgba(255, 255, 255, .1);
  --warn: #fab219;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --text: "Barlow", "Segoe UI", system-ui, sans-serif;
  --bar-h: 64px;
  --wrap: 1180px;
  --measure: 64ch;
}

*, *::before, *::after { box-sizing: border-box; }
/* Anything a switch in legal.js hides stays hidden, whatever display a rule below gives it. */
[hidden] { display: none !important; }
html { background: var(--canvas); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 20px); scrollbar-color: #2a3352 var(--canvas); }
body { margin: 0; font: 400 1.0625rem/1.7 var(--text); background:
  radial-gradient(60% 40% at 85% -8%, rgba(142, 162, 255, .12), transparent 70%),
  radial-gradient(50% 36% at -10% 4%, #141a3e, transparent 70%), var(--canvas);
  background-repeat: no-repeat; color: var(--ink-soft); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: rgba(142, 162, 255, .35); color: #fff; }
a { color: var(--ink); text-decoration-color: rgba(142, 162, 255, .55); text-underline-offset: .18em; }
a:hover { color: #fff; text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* ---------------------------------------------------------------- the bar */
.bar { position: sticky; top: 0; z-index: 40; height: var(--bar-h); background: rgba(5, 7, 15, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.wordmark { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font: 700 1.45rem/1 var(--display); letter-spacing: .005em;
  color: var(--ink); text-decoration: none; }
.wordmark em { font-style: normal; color: var(--accent); }
.wordmark:hover { color: var(--ink); }
.wordmark-text { white-space: nowrap; }
/* The logo (../assets/brand, from the logo pack), 44 px tall in the bar; its width from the picture (3:1). */
.wordmark-logo { display: block; width: auto; height: 44px; }
.bar-links { display: flex; gap: 1.4rem; margin-left: auto; }
.bar-links a, .bar-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none;
  font-weight: 500; font-size: .9375rem; }
.bar-links a:hover, .bar-back:hover { color: var(--ink); }
.bar-links a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.bar-back { margin-left: auto; display: none; gap: .35rem; }

/* ---------------------------------------------------------------- draft banner */
.draft { border-bottom: 1px solid rgba(250, 178, 25, .35); background: rgba(250, 178, 25, .1); color: #ffe2a3; font-size: .9375rem; line-height: 1.5; }
.draft .wrap { padding: .7rem 0; }
.draft b { color: var(--warn); font-weight: 600; }

/* ---------------------------------------------------------------- layout */
/* Three parts: the page's head (title, dates, summary), the side (contents, other policies) and the text. On a wide
   screen the side runs down the left of both; on a phone the contents sit between the head and the text. */
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: clamp(32px, 5vw, 80px); row-gap: 0;
  padding: clamp(36px, 6vw, 72px) 0 72px; align-items: start; }
.prose-head { grid-column: 2; grid-row: 1; max-width: var(--measure); min-width: 0; }
.prose-main { grid-column: 2; grid-row: 2; }
.side { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: calc(var(--bar-h) + 28px); max-height: calc(100vh - var(--bar-h) - 56px); overflow-y: auto; overscroll-behavior: contain;
  font-size: .9rem; line-height: 1.4; scrollbar-width: thin; }
.toc summary { list-style: none; font: 700 .8rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-note); padding: .2rem 0 .9rem; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol, .side-pages ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: .3rem 0 .3rem .85rem; border-left: 2px solid var(--line); color: var(--ink-note); text-decoration: none; }
.toc li a:hover { color: var(--ink); border-left-color: rgba(142, 162, 255, .5); }
.toc li a.is-here { color: var(--ink); border-left-color: var(--accent); }
.side-pages { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.side-pages h2 { margin: 0 0 .7rem; font: 700 .8rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-note); }
.side-pages a { display: block; padding: .3rem 0; color: var(--ink-soft); text-decoration: none; }
.side-pages a:hover { color: var(--ink); }
.side-pages a[aria-current="page"] { color: var(--accent); }
/* A page with no contents list (Contact) keeps its list of policies at every width. */
.side--pages .side-pages { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------------------------------------------------------------- the text */
/* Text runs about 64 characters a line; tables may use the full column, so their cells don't squeeze. */
.prose { max-width: var(--measure); min-width: 0; }
.prose-main { max-width: 860px; }
.prose-main :is(p, ul, ol, h2, h3, dl, address, .box) { max-width: var(--measure); }
.prose-main table { max-width: none; }
.prose-head .kicker { margin: 0 0 .8rem; font: 600 .8rem/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.prose h1 { margin: 0; font: 700 clamp(2.5rem, 5.4vw, 3.9rem)/.95 var(--display); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.prose-head .meta { margin: 1.1rem 0 0; font-size: .9375rem; color: var(--ink-note); }
.meta > span + span::before { content: "·"; margin: 0 .55rem; color: var(--ink-note); }
.prose-head .legend { margin-top: 1.2rem; line-height: 2; }
.prose-head .lede { margin: 1.6rem 0 0; font-size: 1.1875rem; line-height: 1.6; color: var(--ink); }
.prose section { margin-top: 3.2rem; }
.prose h2 { display: flex; gap: .45em; align-items: baseline; margin: 0 0 1rem; font: 700 clamp(1.6rem, 2.6vw, 2rem)/1.05 var(--display);
  letter-spacing: -.005em; color: var(--ink); text-wrap: balance; }
.prose h2 .n { flex: none; color: var(--accent); font-variant-numeric: tabular-nums; }
.prose h3 { margin: 1.9rem 0 .5rem; font: 600 1.125rem/1.35 var(--text); color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose dl, .prose table, .prose .box, .prose address { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .6rem 0; padding-left: .2rem; }
.prose li, .box li { line-height: 1.6; }
.prose li::marker { color: var(--accent); }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose address { font-style: normal; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(13, 18, 36, .6); }
/* The warranty disclaimer and liability limits (Terms 16 and 17): set apart in bold, brighter type in a ruled box,
   so they are conspicuous without a block of capitals. Adding text-transform: uppercase brings
   the capitals back. */
.prose .caps { font-weight: 600; color: var(--ink); line-height: 1.6; padding: 1rem 1.2rem; border-left: 3px solid var(--accent);
  background: rgba(142, 162, 255, .06); border-radius: 0 12px 12px 0; }
.prose code { font: 500 .9em/1 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: .1em .35em; border-radius: 5px; background: rgba(142, 162, 255, .12); color: var(--ink); }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.4rem; }
/* The notice lists on the Trademarks page share one label column, so their text lines up from list to list. */
.prose section dl { grid-template-columns: 11.5rem minmax(0, 1fr); }
.prose dt { color: var(--ink); font-weight: 600; }
.prose dd { margin: 0; }

/* The plain-English summary at the top of each page, and boxed notes in the text. */
.box { padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(165deg, rgba(24, 32, 66, .55), rgba(9, 12, 27, .85));
  box-shadow: inset 0 1px 0 var(--edge); }
.box > :last-child { margin-bottom: 0; }
.box h2, .box .box-title { display: block; margin: 0 0 .6rem; font: 700 .8rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.box ul { margin-bottom: 0; }
.prose-head .summary { margin-top: 2rem; }
.prose-head .summary + .summary { margin-top: 1rem; }
.box--note { border-color: rgba(250, 178, 25, .32); background: rgba(250, 178, 25, .06); }
.box--note .box-title { color: var(--warn); }

/* "Today" and "Planned" tags, so present practice and future practice are never confused. */
.tag { display: inline-block; margin-right: .35rem; padding: .12rem .5rem; border-radius: 999px; font: 600 .72rem/1.4 var(--text); letter-spacing: .08em;
  text-transform: uppercase; vertical-align: .12em; white-space: nowrap; }
.tag--now { background: rgba(142, 162, 255, .16); color: #c9d2ff; box-shadow: inset 0 0 0 1px rgba(142, 162, 255, .4); }
.tag--planned { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px rgba(174, 183, 208, .45); }
.tag--switch { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1px rgba(250, 178, 25, .5); }
/* "Proposed": a term the owner has not decided yet. Shown only while the page is in draft (data-legal-if="draft"). */
.tag--proposed { background: rgba(250, 178, 25, .1); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(250, 178, 25, .55); margin-left: .25rem; }
/* A tag at the start of a table's first cell sits on its own line, so the name after it doesn't break in two. */
.prose td:first-child > .tag { display: block; width: max-content; margin: 0 0 .35rem; }
/* Keeps a phone number or similar on one line. */
.nw { white-space: nowrap; }

/* Tables: rows become stacked blocks on a phone, so the page never scrolls sideways. */
.prose table { width: 100%; border-collapse: collapse; font-size: .9688rem; line-height: 1.55; }
.prose th, .prose td { padding: .75rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font: 600 .78rem/1.3 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-note); border-bottom-color: rgba(160, 175, 255, .3); }
.prose td:first-child { color: var(--ink); font-weight: 500; }
.prose tbody tr:hover td { background: rgba(142, 162, 255, .04); }
/* Refunds, "Your plan at a glance": Monthly and Yearly get equal columns. */
#glance table { table-layout: fixed; }
#glance th:first-child { width: 22%; }

/* Placeholders legal.js could not fill: impossible to miss, so nothing ships blank. */
.legal-ph { padding: 0 .25em; border-radius: 4px; background: rgba(250, 178, 25, .14); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(250, 178, 25, .45);
  font-weight: 600; white-space: normal; }

/* ---------------------------------------------------------------- page footer */
.doc-foot { border-top: 1px solid var(--line); padding: 36px 0 56px; font-size: .875rem; line-height: 1.6; color: var(--ink-note); }
.doc-foot .wrap { display: grid; gap: 1rem; }
.doc-foot nav { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.doc-foot nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.doc-foot nav a:hover { color: var(--ink); }
.doc-foot nav a[aria-current="page"] { color: var(--accent); }
.doc-foot p { margin: 0; max-width: 80ch; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1080px) {
  .bar-links { display: none; }
  .bar-back { display: inline-flex; }
}
/* Above 1080px the bar already lists every policy, so the side column holds only the contents. */
@media (min-width: 1081px) {
  .side:not(.side--pages) .side-pages { display: none; }
}
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .prose-head, .prose-main, .side { grid-column: 1; grid-row: auto; }
  .prose-head { margin-bottom: 2rem; }
  .side { position: static; max-height: none; overflow: visible; order: 2; margin: 0 0 2.2rem; padding: .9rem 1.1rem; border: 1px solid var(--line);
    border-radius: 14px; background: rgba(13, 18, 36, .6); }
  .prose-main { order: 3; }
  .prose-head { order: 1; }
  .toc summary { cursor: pointer; padding: .3rem 0; display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
  .toc summary::after { content: ""; width: .55rem; height: .55rem; border-right: 2px solid var(--ink-note); border-bottom: 2px solid var(--ink-note);
    transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
  .toc[open] summary::after { transform: rotate(225deg) translateY(-2px); }
  .toc[open] ol { padding-top: .4rem; }
  /* The other policies sit in the same box as the contents, so a phone reader can reach them without scrolling to the end. */
  .side-pages { margin-top: .9rem; padding-top: .9rem; }
  .side-pages h2 { margin-bottom: .3rem; }
  .side-pages ul { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
  .side-pages a { display: inline-flex; align-items: center; min-height: 40px; }
  .side--pages .side-pages { margin-top: 0; padding-top: 0; }
}
@media (min-width: 901px) {
  .toc summary { pointer-events: none; }
}
@media (max-width: 640px) {
  :root { --bar-h: 58px; }
  body { font-size: 1rem; }
  .prose-head .lede { font-size: 1.0625rem; }
  .prose section { margin-top: 2.6rem; }
  .prose-main > section:first-child { margin-top: 0; }
  .prose dl, .prose section dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .prose dd { margin-bottom: .7rem; }
  .prose table, .prose thead, .prose tbody, .prose tr, .prose th, .prose td { display: block; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prose tr { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .prose td { padding: .15rem 0; border: 0; }
  .prose td[data-th]::before { content: attr(data-th); display: block; margin-top: .35rem; font: 600 .72rem/1.3 var(--text); letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink-note); }
  .prose td:first-child::before { display: none; }
  .box { padding: 1rem 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------------------------------------------------------------- print: black on white, everything open */
@media print {
  :root { --ink: #000; --ink-soft: #111; --ink-note: #333; --accent: #000; --line: #bbb; --warn: #000; }
  html, body { background: #fff !important; color: #111; }
  body { font-size: 11pt; line-height: 1.5; }
  .bar, .side, .skip-link, .doc-foot nav { display: none !important; }
  .doc { display: block; padding: 0; }
  .prose, .prose-main, .prose-main :is(p, ul, ol, h2, h3, dl, address, .box) { max-width: none; }
  .prose h1 { font-size: 26pt; }
  .prose h2 { font-size: 16pt; break-after: avoid; }
  .prose .box h2, .box .box-title { font: 700 9pt/1.2 var(--text); letter-spacing: .1em; color: #000; }
  .prose section { margin-top: 1.4rem; }
  .prose tr, .prose dt, .prose dd { break-inside: avoid; }
  .box, .prose address { background: none !important; box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .prose .caps { background: none; border-left: 3px solid #000; }
  .draft { background: none; color: #000; border: 1px solid #000; margin-bottom: 14pt; }
  .draft b { color: #000; }
  .tag--proposed { border-style: dashed; }
  .legal-ph { background: none; color: #000; box-shadow: none; border: 1px dashed #000; }
  .tag { box-shadow: none; border: 1px solid #555; color: #000; background: none; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after, .prose a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #333; word-break: break-all; }
  .prose a[data-legal]::after { content: none; }
  .prose th, .prose td { border-bottom: 1px solid #bbb; }
}

/* Phones: the contents list links are at least 40 px tall to tap (2026-10-27 responsive audit). */
@media (max-width: 767px) { .toc li a { min-height: 40px; display: flex; align-items: center; } }
