/* Legal pages (/legal, /legal/*). Loaded after /help.css, which supplies the tokens, header, footer and dark mode. */
.lhero { padding-block: 64px 44px; border-bottom: 1px solid var(--line); }
.lhero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.02; font-weight: 300; letter-spacing: -0.035em; margin-top: 16px; max-width: 16em; }
.lhero .lead { margin-top: 20px; color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 40em; }
.meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 28px 0 0; }
.meta div { display: grid; gap: 6px; }
.meta dt { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.meta dd { margin: 0; font-size: 15px; }
.meta code { font: 500 13.5px var(--mono); overflow-wrap: anywhere; }
.pill { display: inline-block; font: 600 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: var(--amber-wash); color: var(--amber); }
.region-note { margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.legal a:not(.btn) { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }

.ldoc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-block: 48px 96px; }
.toc-side nav { position: sticky; top: 92px; max-height: calc(100vh - 116px); overflow: auto; padding-right: 8px; }
.toc-h { font: 600 11.5px/1 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.ldoc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ldoc ol a { display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 6px 8px; margin-left: -8px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: var(--muted) !important; text-decoration: none; }
.ldoc ol a:hover { background: var(--surface); color: var(--ink) !important; }
.ldoc ol .n, .prose h2 .n { font: 500 12px/1.6 var(--mono); color: var(--faint); }
.toc-m { display: none; }

.prose { max-width: 64ch; font-size: 16.5px; line-height: 1.7; }
.prose > * + * { margin-top: 20px; }
.prose section { scroll-margin-top: 92px; padding-top: 12px; }
.prose section + section { margin-top: 40px; }
.prose section > * + * { margin-top: 14px; }
.prose h2 { font-size: clamp(23px, 2.4vw, 28px); line-height: 1.2; font-weight: 400; display: flex; align-items: baseline; gap: 12px; }
.prose h2 .n { flex: 0 0 auto; font-size: 13px; position: relative; top: -2px; }
.prose h2 .anchor { opacity: 0; font: 400 18px var(--mono); color: var(--faint) !important; text-decoration: none; transition: opacity .15s; }
.prose h2:hover .anchor, .prose h2 .anchor:focus-visible { opacity: 1; }
.prose section:target h2 span:not(.n) { background: var(--accent-wash-2); border-radius: 4px; box-shadow: 0 0 0 4px var(--accent-wash-2); }
.prose ul { margin-bottom: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.prose li::marker { color: var(--faint); }
.prose p, .prose li { overflow-wrap: break-word; }

.callout { border-radius: 16px; padding: 20px 22px; font-size: 15px; line-height: 1.6; }
.callout.warning { background: var(--amber-wash); }
.callout.info { background: var(--surface); border: 1px solid var(--line); }
.callout > * + * { margin-top: 10px; }
.callout-t { font-weight: 600; font-size: 15.5px; }
.callout ul { gap: 6px; }

.others { margin-top: 64px !important; padding-top: 28px; border-top: 1px solid var(--line); }
.others ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.others a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14.5px; text-decoration: none; color: var(--ink) !important; }
.others a:hover { border-color: var(--faint); }

.lindex { list-style: none; margin: 0; padding: 40px 0 96px; display: grid; gap: 14px; max-width: 860px; }
.lindex a { display: grid; gap: 6px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink) !important; }
.lindex a:hover { border-color: var(--faint); }
.lindex .t { font: 400 22px/1.2 var(--display); letter-spacing: -0.02em; }
.lindex .d { color: var(--muted); font-size: 15px; }
.lindex .m { color: var(--faint); font-size: 13px; }
.lindex code { font: 500 12.5px var(--mono); overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .ldoc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc-side { display: none; }
  .toc-m { display: block; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .toc-m summary { cursor: pointer; padding: 14px 16px; font-weight: 500; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .toc-m summary::-webkit-details-marker { display: none; }
  .toc-m summary::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); }
  .toc-m[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
  .toc-m nav { padding: 0 16px 12px; }
  .lhero { padding-block: 36px 28px; }
  .lhero .lead { font-size: 16.5px; }
  .prose { font-size: 16px; }
}
@media (max-width: 620px) { .crumb { display: none; } .meta { gap: 14px 24px; } }

@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --muted: #222; --faint: #555; --line: #bbb; --accent-ink: #000; --amber: #000; --amber-wash: transparent; color-scheme: light; }
  html { zoom: 1 !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav, .toc-side, .toc-m, .others, footer, .prose h2 .anchor, .region-note { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .lhero { padding: 0 0 12pt; }
  .lhero h1 { font-size: 26pt; }
  .ldoc { display: block; padding: 12pt 0 0; }
  .prose { max-width: none; font-size: 11pt; line-height: 1.5; }
  .prose h2 { font-size: 15pt; break-after: avoid; }
  .prose section { break-inside: auto; }
  .prose p, .prose li { orphans: 3; widows: 3; }
  .callout { border: 1pt solid #888; break-inside: avoid; }
  .legal a { color: #000 !important; text-decoration: none; }
}
