/* Legal Center: the reading layout for /legal/ pages. Load after /home/tokens.css and /home/shell.css, which give the
   app's colors, type, buttons, nav and footer. Light and dark follow the system through the tokens. */

.lc-main { display: block; outline: none; }

/* ---------- page head ---------- */
.lc-head { padding-block: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 32px); }
.lc-head h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; letter-spacing: var(--track-section); max-width: 24ch; }
.lc-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: var(--fs-subhead); color: var(--gw-mute); }
.lc-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--gw-mute); }
.lc-crumbs a { color: var(--gw-mute); }
.lc-crumbs a:hover { color: var(--gw-ink); }
.lc-meta { margin-top: 12px; color: var(--gw-mute); font-size: var(--fs-subhead); line-height: var(--lh-subhead); }
.lc-meta a { color: var(--gw-accent-text); }
.lc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 20px; }
.lc-actions .btn svg { display: inline-block; }

/* ---------- two columns: contents and the document ---------- */
.lc-grid { display: grid; grid-template-columns: 232px minmax(0, 68ch); gap: clamp(32px, 5vw, 72px); align-items: start; }
.lc-toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; overscroll-behavior: contain; padding-bottom: 16px; }
.lc-toc-k { margin-bottom: 10px; font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--gw-mute); font-weight: var(--fw-semibold); }
.lc-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
.lc-toc ol a { display: flex; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--gw-ink-2); font-size: var(--fs-footnote); line-height: var(--lh-footnote); }
.lc-toc ol a:hover { background: var(--gw-well-2); color: var(--gw-ink); text-decoration: none; }
.lc-toc ol a.is-active { background: var(--gw-accent-tint); color: var(--gw-accent-text); font-weight: var(--fw-medium); }
.lc-toc .lc-num { flex: none; min-width: 1.5em; margin-right: 0; color: var(--gw-mute); font-variant-numeric: tabular-nums; }
.lc-toc ol a.is-active .lc-num { color: inherit; }
.lc-toc-all { margin-top: 14px; padding: 12px 10px 0; border-top: 0.5px solid var(--gw-hair); font-size: var(--fs-footnote); }
.lc-toc-m { display: none; }

/* ---------- the document ---------- */
.lc-doc { min-width: 0; font-size: var(--fs-body); line-height: 1.6; color: var(--gw-ink); }
.lc-doc p, .lc-doc ul, .lc-doc ol, .lc-doc dl { margin: 0 0 14px; }
.lc-doc p:last-child, .lc-doc ul:last-child, .lc-doc ol:last-child { margin-bottom: 0; }
.lc-doc ul { padding-left: 1.25em; }
.lc-doc ul li + li { margin-top: 6px; }
.lc-doc ol.alpha { padding-left: 1.5em; list-style: lower-alpha; }
.lc-doc a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lc-doc a:hover { text-decoration-color: currentColor; }
.lc-doc code { font: inherit; font-weight: var(--fw-medium); padding: 1px 6px; border-radius: 6px; background: var(--gw-well); color: var(--gw-ink); overflow-wrap: anywhere; }
.lc-doc strong { font-weight: var(--fw-semibold); }
.lc-doc h4 { margin: 20px 0 8px; font-size: var(--fs-headline); }
.lc-lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--gw-ink-2); text-wrap: pretty; }
.lc-tracks { margin-top: 20px; padding: 14px 18px; border-radius: var(--r-field); background: var(--gw-accent-tint); color: var(--gw-ink); font-size: var(--fs-callout); line-height: 1.5; }
.lc-tracks strong { color: var(--gw-accent-text); }

.lc-glance { margin-top: 28px; padding: 22px 24px; border-radius: var(--r-group); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); }
.lc-glance h2 { font-size: var(--fs-title3); line-height: var(--lh-title3); margin-bottom: 12px; }
.lc-glance ul { margin: 0; padding-left: 1.2em; }
.lc-glance li { line-height: 1.5; }
.lc-glance li + li { margin-top: 8px; }
.lc-glance-note { margin-top: 14px !important; color: var(--gw-mute); font-size: var(--fs-footnote); line-height: var(--lh-footnote); }

.lc-sec { margin-top: clamp(44px, 5vw, 60px); scroll-margin-top: 84px; }
.lc-sec > h2 { position: relative; font-size: clamp(22px, 2vw, 26px); line-height: 1.25; letter-spacing: var(--track-title); margin-bottom: 14px; padding-top: 4px; }
.lc-sub { margin-top: 28px; scroll-margin-top: 84px; }
.lc-sub > h3 { position: relative; font-size: var(--fs-title3); line-height: var(--lh-title3); margin-bottom: 10px; }
.lc-num { color: var(--gw-mute); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; margin-right: 4px; }
.lc-body { margin-top: 0; }
.lc-body > :first-child { margin-top: 0; }

.lc-anchor { display: inline-flex; vertical-align: middle; margin-left: 8px; padding: 4px; border-radius: 6px; color: var(--gw-mute); opacity: 0; transition: opacity var(--t-fast) ease; text-decoration: none !important; }
h2:hover > .lc-anchor, h3:hover > .lc-anchor, .lc-anchor:focus-visible, .lc-anchor.is-copied { opacity: 1; }
.lc-anchor:hover { color: var(--gw-accent-text); background: var(--gw-well-2); }
.lc-anchor.is-copied { color: var(--gw-good); }
@media (hover: none) { .lc-anchor { display: none; } }

/* "In plain terms" */
.lc-plain { margin: 0 0 16px; padding: 14px 18px; border-radius: var(--r-field); background: var(--gw-well-2); border: 0.5px solid var(--gw-hair); }
.lc-plain-k { margin: 0 0 4px !important; font-size: var(--fs-footnote); line-height: var(--lh-footnote); font-weight: var(--fw-semibold); color: var(--gw-accent-text); }
.lc-plain p:last-child { color: var(--gw-ink-2); font-size: var(--fs-callout); line-height: 1.5; }

/* labelled lists: (a), (b) ... */
.lc-ol { list-style: none; padding: 0 !important; }
.lc-ol > li { position: relative; padding-left: 2.2em; }
.lc-ol > li + li { margin-top: 14px; }
.lc-ol > li > .lc-n { position: absolute; left: 0; top: 0; color: var(--gw-mute); font-variant-numeric: tabular-nums; }
.lc-ol > li > p { margin: 10px 0 0; }
.lc-ol > li > ul { margin: 10px 0 0; }

/* conspicuous text: weight and a rule, never a shout of color */
.lc-caps { margin: 16px 0; padding: 16px 20px; border-left: 3px solid var(--gw-ink); background: var(--gw-well-2); border-radius: 0 var(--r-field) var(--r-field) 0; font-weight: var(--fw-medium); }
.lc-caps p { margin-bottom: 12px; }

/* notes */
.lc-note { margin: 16px 0; padding: 14px 18px; border-radius: var(--r-field); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); }
.lc-note-t { margin-bottom: 4px !important; font-weight: var(--fw-semibold); }
.lc-note-warn { box-shadow: inset 3px 0 0 var(--gw-warn-fill), var(--sh-sm); }

/* definitions and key-value lists */
.lc-defs { display: grid; gap: 0; margin: 0; border-top: 0.5px solid var(--gw-hair); }
.lc-def { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 0.5px solid var(--gw-hair); }
.lc-def dt { font-weight: var(--fw-semibold); }
.lc-def dfn { font-style: normal; }
.lc-def dd { margin: 0; color: var(--gw-ink-2); }
.lc-def:target { background: var(--gw-accent-tint); }
.lc-kv { margin: 0; display: grid; border-top: 0.5px solid var(--gw-hair); }
.lc-kv > div { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 0.5px solid var(--gw-hair); }
.lc-kv dt { color: var(--gw-mute); }
.lc-kv dd { margin: 0; overflow-wrap: anywhere; }

/* tables */
.lc-tbl { margin: 16px 0; overflow-x: auto; border-radius: var(--r-field); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); }
.lc-tbl:focus-visible { outline-offset: 2px; }
.lc-tbl table { width: 100%; border-collapse: collapse; font-size: var(--fs-subhead); line-height: 1.5; }
.lc-tbl caption { padding: 12px 16px 0; text-align: left; font-weight: var(--fw-semibold); font-size: var(--fs-footnote); color: var(--gw-mute); }
.lc-tbl th, .lc-tbl td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 0.5px solid var(--gw-hair); }
.lc-tbl thead th { font-size: var(--fs-footnote); color: var(--gw-mute); font-weight: var(--fw-semibold); white-space: nowrap; }
.lc-tbl tbody th { font-weight: var(--fw-semibold); min-width: 9em; }
.lc-tbl tbody tr:last-child > * { border-bottom: 0; }
.lc-nowrap { white-space: nowrap; }
/* wide tables (and every table on narrow screens): one card per row */
.lc-tbl-wide table, .lc-tbl-wide tbody, .lc-tbl-wide tr, .lc-tbl-wide th, .lc-tbl-wide td { display: block; }
.lc-tbl-wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lc-tbl-wide tr { padding: 12px 16px; border-bottom: 0.5px solid var(--gw-hair); }
.lc-tbl-wide caption { display: block; padding-bottom: 4px; }
.lc-tbl-wide tr:last-child { border-bottom: 0; }
.lc-tbl-wide th, .lc-tbl-wide td { padding: 3px 0; border: 0; }
.lc-tbl-wide tbody th { font-size: var(--fs-callout); padding-bottom: 6px; }
.lc-tbl-wide td::before { content: attr(data-label) ": "; color: var(--gw-mute); font-weight: var(--fw-medium); }

.lc-small { margin-top: 10px; font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--gw-mute); }
.lc-pending { padding: 1px 6px; border-radius: 6px; background: var(--gw-warn-soft); color: var(--gw-ink); box-shadow: inset 0 0 0 1px var(--gw-warn-fill); font-weight: var(--fw-medium); }
.lc-history { padding-top: 8px; border-top: 0.5px solid var(--gw-hair); }

/* every document, at the end */
.lc-more { margin-top: clamp(56px, 6vw, 80px); padding-top: 28px; border-top: 0.5px solid var(--gw-hair); }
.lc-more > h2 { font-size: var(--fs-title3); line-height: var(--lh-title3); margin-bottom: 18px; }
.lc-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.lc-more-g h3 { font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--gw-mute); margin-bottom: 8px; }
.lc-more-g ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 6px; font-size: var(--fs-subhead); }
.lc-doc .lc-more-g a { text-decoration: none; }
.lc-doc .lc-more-g a:hover { text-decoration: underline; }
.lc-more-g a[aria-current="page"] { color: var(--gw-ink); font-weight: var(--fw-semibold); }

/* ---------- the index ---------- */
.lc-head-index { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(28px, 4vw, 44px); }
.lc-head-index h1 { font-size: clamp(36px, 4.4vw, 52px); letter-spacing: var(--track-display); }
.lc-hero-lede { margin-top: 14px; max-width: 60ch; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--gw-ink-2); }
.lc-search { position: relative; max-width: 520px; margin-top: 24px; }
.lc-search input { width: 100%; height: 48px; padding: 0 16px 0 44px; border: 0.5px solid var(--gw-hair); border-radius: var(--r-pill); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); color: var(--gw-ink); font: var(--fw-regular) var(--fs-callout) / 1 var(--font); letter-spacing: var(--track-callout); }
.lc-search input::placeholder { color: var(--gw-mute); }
.lc-search input:focus-visible { outline: 3px solid var(--gw-focus); outline-offset: 1px; }
.lc-search-i { position: absolute; left: 16px; top: 15px; color: var(--gw-mute); pointer-events: none; }
.lc-search:has(input[hidden]) { display: none; }
.lc-head-index .lc-meta { margin-top: 18px; }
.lc-noresult:empty { display: none; }
.lc-noresult { margin-bottom: 16px; color: var(--gw-mute); }
.lc-group { margin-top: 40px; }
.lc-group:first-of-type { margin-top: 0; }
.lc-group-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.lc-group-h h2 { font-size: var(--fs-title2); line-height: var(--lh-title2); }
.lc-group-h p { color: var(--gw-mute); font-size: var(--fs-subhead); }
.lc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.lc-card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border-radius: var(--r-group); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); color: var(--gw-ink); transition: box-shadow var(--t-fast) ease, transform 200ms var(--ease-out); }
.lc-card a:hover { text-decoration: none; box-shadow: var(--sh-md); transform: translateY(-1px); }
.lc-card-t { font-weight: var(--fw-semibold); font-size: var(--fs-headline); line-height: var(--lh-headline); color: var(--gw-ink); }
.lc-card a:hover .lc-card-t { color: var(--gw-accent-text); }
.lc-card-d { color: var(--gw-ink-2); font-size: var(--fs-subhead); line-height: 1.45; }
.lc-card-m { margin-top: auto; padding-top: 6px; color: var(--gw-mute); font-size: var(--fs-footnote); }
.lc-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
.lc-panel { padding: 22px 24px; border-radius: var(--r-group); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); line-height: 1.55; }
.lc-panel-wide { grid-column: 1 / -1; }
.lc-panel h2 { font-size: var(--fs-title3); line-height: var(--lh-title3); margin-bottom: 12px; }
.lc-commit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.lc-commit li { color: var(--gw-ink-2); }
.lc-commit strong { color: var(--gw-ink); font-weight: var(--fw-semibold); }
.lc-panel .lc-kv > div { grid-template-columns: minmax(0, 15em) minmax(0, 1fr); }
@media (prefers-reduced-motion: reduce) { .lc-card a { transition: none; } .lc-card a:hover { transform: none; } }

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
  .lc-grid { grid-template-columns: minmax(0, 1fr); }
  .lc-doc { max-width: 68ch; }
  .lc-toc { display: none; }
  .lc-toc-m { display: block; margin-top: 24px; border-radius: var(--r-field); background: var(--gw-bg-cell); box-shadow: var(--sh-sm); }
  .lc-toc-m summary { padding: 14px 18px; cursor: pointer; font-weight: var(--fw-semibold); }
  .lc-toc-m ol { margin: 0; padding: 0 18px 14px 2.4em; }
  .lc-toc-m li + li { margin-top: 4px; }
  .lc-toc-m .lc-num { display: none; }
}
@media (max-width: 640px) {
  .lc-tbl table, .lc-tbl tbody, .lc-tbl tr, .lc-tbl th, .lc-tbl td { display: block; }
  .lc-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lc-tbl tr { padding: 12px 16px; border-bottom: 0.5px solid var(--gw-hair); }
  .lc-tbl tr:last-child { border-bottom: 0; }
  .lc-tbl th, .lc-tbl td { padding: 3px 0; border: 0; }
  .lc-tbl td::before { content: attr(data-label) ": "; color: var(--gw-mute); font-weight: var(--fw-medium); }
  .lc-tbl caption { display: block; padding-bottom: 4px; }
  .lc-def, .lc-kv > div, .lc-panel .lc-kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lc-panels, .lc-commit, .lc-more-grid { grid-template-columns: minmax(0, 1fr); }
  .lc-glance, .lc-panel { padding: 18px; }
  .lc-ol > li { padding-left: 2em; }
}

/* ---------- print: black on white, the document only ---------- */
@media print {
  :root { color-scheme: light; }
  @page { margin: 18mm 16mm; }
  body { background: #FFFFFF !important; color: #000000 !important; font-size: 11pt; }
  .skip, .site-nav, .site-footer, .lc-toc, .lc-toc-m, .lc-actions, .lc-anchor, .lc-more, .lc-crumbs { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .lc-head { padding: 0 0 12pt; }
  .lc-grid { display: block; }
  .lc-doc { max-width: none; font-size: 11pt; line-height: 1.45; color: #000000; }
  .lc-doc *, .lc-head * { color: #000000 !important; background: transparent !important; box-shadow: none !important; }
  .lc-glance, .lc-plain, .lc-note, .lc-tracks, .lc-tbl, .lc-caps { border: 0.75pt solid #000000; border-radius: 0; break-inside: avoid; }
  .lc-caps { border-left-width: 3pt; }
  .lc-tbl { overflow: visible; }
  .lc-tbl th, .lc-tbl td, .lc-def, .lc-kv > div { border-color: #777777 !important; }
  .lc-sec > h2, .lc-sub > h3 { break-after: avoid; }
  .lc-doc a { text-decoration: underline; }
  .lc-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
  .lc-pending { border: 1pt dashed #000000; }
}

/* ---------- tracking for the small sizes (the body's is set for 17 px; tokens.css has the scale) ---------- */
.lc-crumbs ol, .lc-meta, .lc-toc, .lc-glance-note { letter-spacing: var(--track-footnote); }
