/* Legal pages and simple pages: same tokens as the home, set for long reading. */
body.doc::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--night); }
.doc-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgb(19 11 29 / .9); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.doc-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.doc-back { color: var(--mist-2); text-decoration: none; font-size: .92rem; }
.doc-back:hover { color: var(--mist); }
.doc-main { padding-block: clamp(40px, 8vh, 80px) clamp(60px, 10vh, 110px); }
.doc-body { max-width: 72ch; margin: 0 auto; color: var(--mist-2); font-size: 1rem; line-height: 1.7; }
.doc-body h1 { font: 800 clamp(2rem, 4.4vw, 3rem)/1.05 var(--font-sans); letter-spacing: -.04em; color: var(--mist); margin: .8rem 0 .7rem; }
.doc-body h2 { font: 750 1.28rem/1.25 var(--font-sans); letter-spacing: -.02em; color: var(--mist); margin: 2.4rem 0 .8rem; }
.doc-body h3 { font: 700 1.02rem/1.3 var(--font-sans); color: var(--mist); margin: 1.4rem 0 .5rem; }
.doc-body p, .doc-body ul, .doc-body dl { margin: 0 0 1rem; }
.doc-body ul { padding-left: 1.2rem; }
.doc-body li { margin-bottom: .45rem; }
.doc-body a { color: var(--glow); }
.doc-body strong { color: var(--mist); font-weight: 650; }
.doc-lead { font-size: 1.08rem; color: var(--mist-2); }
.doc-date { font: 500 .76rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mist-3); }
.doc-table { overflow-x: auto; margin: 0 0 1.2rem; border: 1px solid var(--line); border-radius: 14px; }
.doc-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.doc-table th { color: var(--mist); font-weight: 650; background: rgb(244 239 250 / .04); }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table code { font: 500 .86em var(--font-mono); color: var(--mist); }
.doc-id { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.doc-id div { display: grid; grid-template-columns: minmax(130px, 34%) minmax(0, 1fr); gap: 12px; padding: .65rem .9rem; border-bottom: 1px solid var(--line); }
.doc-id div:last-child { border-bottom: 0; }
.doc-id dt { color: var(--mist-3); }
.doc-id dd { margin: 0; color: var(--mist); overflow-wrap: anywhere; }
.doc .foot .legal { margin-top: 0; padding-top: 0; border-top: 0; }
.doc .foot .legal a { color: var(--mist-2); }
@media (max-width: 560px) { .doc-id div { grid-template-columns: 1fr; gap: 2px; } }

/* Phones: each table row becomes a small card with its own labels. */
@media (max-width: 600px) {
  .doc-table { border: 0; border-radius: 0; overflow: visible; }
  .doc-table table { min-width: 0; }
  .doc-table thead { display: none; }
  .doc-table table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; width: 100%; }
  .doc-table tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .doc-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
  .doc-table tr td:last-child { border-bottom: 0; }
  .doc-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 500 .7rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist-3); }
}
