/*
  Diorama's legal pages, in Diorama's own look (see /diorama/index.html): the app icon's near-black,
  ember red and cream, set in Inter. The title band carries the page's ember glow; the reading area
  stays dark like the app page, with the body in the page's soft cream so long text is easy on the eye.
*/
:root {
  --ink: #0c0b0d;
  --ink-2: #161316;
  --card: #1b1719;
  --line: rgba(250, 244, 234, .10);
  --line-2: rgba(250, 244, 234, .16);
  --cream: #faf4ea;
  --sub: #d6c6be;
  --dim: #a3958f;
  --ember: #b2242c;
  --ember-hi: #e2483f;
  --ember-text: #f0695f;
  --col: 42rem;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--sub);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif; font-size: 17px; line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ember); color: var(--cream); }
a { color: var(--cream); text-decoration-color: rgba(226, 72, 63, .8); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--cream); }
:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }
.wrap { width: min(var(--col), 100% - 48px); margin-inline: auto; }

/* ---------- Title band: Diorama's hero, with its ember glow ---------- */
.band { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 88% -6%, rgba(178, 36, 44, .55), rgba(178, 36, 44, 0) 44%),
    radial-gradient(circle at 4% 104%, rgba(90, 22, 32, .5), rgba(90, 22, 32, 0) 40%);
}
.top {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 22px 0;
  width: min(1160px, 100% - 48px); margin-inline: auto;
}
.top .app { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; color: var(--cream); }
.top .app img { width: 36px; height: 36px; border-radius: 9px; }
.top-links { display: flex; align-items: center; gap: 18px; }
.top .get { font-size: .85rem; font-weight: 700; text-decoration: none; padding: 7px 14px; border-radius: 999px; background: var(--cream); color: #1a1416; white-space: nowrap; }
.top .get:hover { filter: brightness(1.05); }
.top .by { font-size: .85rem; color: var(--dim); text-decoration: none; white-space: nowrap; }
.top .by:hover { color: var(--cream); }

.band .wrap { position: relative; z-index: 1; }
.hero { padding: 44px 0 64px; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text); margin: 0 0 18px; }
h1 {
  margin: 0 0 26px; color: var(--cream); font-weight: 800; letter-spacing: -.035em; line-height: 1.04;
  font-size: clamp(2.3rem, 5vw, 3.6rem); text-wrap: balance;
}
/* The meta lines as the hero's fact row: dim labels, cream values. */
.meta { display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--dim); font-size: .92rem; line-height: 1.5; }
.meta b { color: var(--cream); font-weight: 700; }
.meta code { font-family: inherit; font-size: inherit; background: none; border: 0; padding: 0; color: var(--sub); }

/* ---------- Contents ---------- */
.toc {
  margin: 48px auto 8px; padding: 26px 30px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
}
.toc h2 { margin: 0 0 14px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text); }
.toc ol { margin: 0; padding-left: 1.7em; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 7px; break-inside: avoid; font-size: .95rem; line-height: 1.45; }
.toc li::marker { color: var(--dim); font-weight: 600; font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; color: var(--cream); }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--ember-hi); }

/* ---------- The document ---------- */
main { padding: 16px 0 88px; }
section { padding: 40px 0 12px; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
h2.sec {
  margin: 0 0 18px; color: var(--cream); font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
  font-size: clamp(1.45rem, 2.4vw, 1.75rem); text-wrap: balance; scroll-margin-top: 20px;
}
h3 { margin: 28px 0 8px; color: var(--cream); font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
p { margin: 0 0 18px; }
p, li, td { text-wrap: pretty; }
ul, ol { margin: 0 0 18px; padding-left: 1.35em; }
li { margin: 0 0 10px; }
/* Bullets are the page's ember dots, each with its soft halo. */
main ul { list-style: none; padding-left: 0; }
main ul > li { position: relative; padding-left: 28px; }
main ul > li::before {
  content: ""; position: absolute; left: 4px; top: .66em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ember-hi); box-shadow: 0 0 0 4px rgba(226, 72, 63, .18);
}
main ol li::marker { color: var(--dim); font-weight: 600; }
strong, b { color: var(--cream); font-weight: 650; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .84em; color: var(--cream);
  background: rgba(250, 244, 234, .07); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px;
  overflow-wrap: anywhere;
}

/* Tables scroll inside their own box. */
.table-scroll {
  overflow-x: auto; margin: 6px 0 22px; background: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 16px; -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.55; min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: 13px 18px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--card); color: var(--cream); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
td b { color: var(--cream); }

/* Callouts: the page's panels, warmed by a corner of ember glow. */
.callout {
  margin: 6px 0 22px; padding: 20px 24px; border-radius: 18px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(circle at 100% 0%, rgba(178, 36, 44, .26), rgba(178, 36, 44, 0) 55%),
    var(--card);
}
.callout p { color: var(--sub); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Footer, as on Diorama's page ---------- */
footer { padding: 44px 0 60px; color: var(--dim); font-size: .9rem; line-height: 1.6; border-top: 1px solid var(--line); }
footer .wrap { width: min(1160px, 100% - 48px); display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer a { color: var(--sub); text-decoration: none; }
footer a:hover { color: var(--cream); text-decoration: underline; }

@media (max-width: 760px) {
  .toc ol { columns: 1; }
  .hero { padding: 26px 0 48px; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .wrap, .top, footer .wrap { width: calc(100% - 36px); }
  .toc { padding: 22px 22px 18px; }
  .callout { padding: 18px 20px; }
  /* Two columns fit a phone; the box still scrolls if a long value needs it. */
  table { min-width: 0; font-size: .9rem; }
  th, td { padding: 12px 12px; }
  th:first-child, td:first-child { width: 40%; }
}
@media (max-width: 420px) { .top-links { gap: 14px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
