/* ═══════════════════════════════════════════════════════════════
   NOVURA — legal pages
   Long-form reading on the same night ground as the rest of the site.
   Depends on /styles.css for tokens, nav, footer and primitives.
   ═══════════════════════════════════════════════════════════════ */

/* Long documents: a deep link lands on its clause at once, without a scroll animation. */
html { scroll-behavior: auto !important; }
.lg { --read: 46em; }
.lg .nav__links a[aria-current="page"] { color: var(--ink); }
.lg .nav__links a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--signal); }
.lg .nav__links { gap: 26px; }
.lg .nav__links a { font-size: 14.5px; white-space: nowrap; }

/* ── Document head ──────────────────────────────────────────── */
.lg-head { padding: calc(var(--nav-h) + clamp(56px, 8vw, 104px)) 0 0; }
.lg-crumb { display: flex; flex-wrap: wrap; gap: 10px; color: var(--mute); margin-bottom: 26px; }
.lg-crumb a:hover { color: var(--ink); }
.lg-title { font-size: clamp(38px, 5.2vw, 76px); line-height: 1; letter-spacing: -.04em; font-weight: 500; max-width: 16em; text-wrap: balance; }
.lg-lede { margin-top: 26px; max-width: 40em; }
.lg-meta { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); border-top: 1px solid var(--rule-2); }
.lg-meta div { padding: 14px 0 0; }
.lg-meta dt { color: var(--mute); }
.lg-meta dd { margin-top: 4px; font-family: var(--f-sans); font-size: 15.5px; letter-spacing: -.005em; text-transform: none; color: var(--ink); }

/* ── Body: contents rail + article ──────────────────────────── */
.lg-body { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(88px, 10vw, 152px); align-items: start; }
.lg-side { grid-column: 1 / 4; position: sticky; top: calc(var(--nav-h) + 28px); max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; padding-right: 8px; }
.lg-toc summary { color: var(--mute); list-style: none; margin-bottom: 14px; cursor: default; }
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc ol { border-left: 1px solid var(--rule); }
.lg-toc a { display: grid; grid-template-columns: 30px 1fr; gap: 4px; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; line-height: 1.35; color: var(--mute); transition: color .2s var(--ease), border-color .2s var(--ease); }
.lg-toc a .mono { font-size: 10.5px; padding-top: 3px; letter-spacing: .04em; }
.lg-toc a:hover { color: var(--ink); }
.lg-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--signal); }
.lg-print { margin-top: 24px; background: none; border: 1px solid var(--rule-2); border-radius: 999px; padding: 9px 16px; color: var(--ink-2); cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease); }
.lg-print:hover { border-color: var(--ink); color: var(--ink); }

.lg-art { grid-column: 5 / 13; min-width: 0; font-size: 16.5px; line-height: 1.66; color: var(--ink-2); }
/* Text keeps a reading measure; tables may use the full column. */
.lg-lead, .lg-pager, .lg-sec > :not(.lg-tbl) { max-width: var(--read); }
.lg-art p { margin: 0 0 14px; }
.lg-art strong { color: var(--ink); font-weight: 600; }
.lg-art em { font-style: italic; }
.lg-art code { font-family: var(--f-mono); font-size: .86em; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; }
.lg-art a:not(.lg-cl__n):not(.lg-anchor) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .2s var(--ease), color .2s var(--ease); }
.lg-art a:not(.lg-cl__n):not(.lg-anchor):hover { text-decoration-color: var(--signal); color: #fff; }
.lg-lead { font-size: 17.5px; line-height: 1.6; color: var(--ink-2); padding-bottom: 8px; }
.lg-lead p:first-child { color: var(--ink); }

.lg-sec { padding-top: 56px; scroll-margin-top: calc(var(--nav-h) + 4px); }
.lg-sec h2 { display: grid; grid-template-columns: 52px 1fr auto; align-items: baseline; font-size: clamp(23px, 2.2vw, 29px); line-height: 1.15; letter-spacing: -.024em; color: var(--ink); padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.lg-sec__n { color: var(--signal-ink); font-size: 12.5px; }
.lg-sec--annex h2 { grid-template-columns: 1fr auto; row-gap: 10px; }
.lg-sec--annex .lg-sec__n { grid-column: 1 / -1; }
.lg-sec--annex { margin-top: 40px; border-top: 1px solid var(--rule-2); }
.lg-sec h3 { font-size: 17.5px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; color: var(--ink); margin: 30px 0 12px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.lg-anchor { font-family: var(--f-mono); font-size: 14px; color: var(--mute); opacity: 0; padding: 0 4px; transition: opacity .2s var(--ease), color .2s var(--ease); }
.lg-sec h2:hover .lg-anchor, .lg-anchor:focus-visible { opacity: 1; }
.lg-anchor:hover { color: var(--signal-ink); }
.lg-anchor.is-copied::after { content: ' copied'; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }

/* A clause: number in the gutter, text beside it. */
.lg-cl { display: grid; grid-template-columns: 52px minmax(0, 1fr); padding: 4px 0; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 6px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.lg-cl__n { color: var(--mute); font-size: 11.5px; padding-top: 5px; letter-spacing: .02em; transition: color .2s var(--ease); align-self: start; }
.lg-cl__n:hover { color: var(--signal-ink); }
.lg-cl__n.is-copied { color: var(--ok); }
.lg-cl__b > :last-child { margin-bottom: 10px; }
.lg-cl:target { background: rgba(255, 106, 19, .07); box-shadow: inset 2px 0 0 var(--signal); }
.lg-cl:target .lg-cl__n { color: var(--signal-ink); }
.lg-sec:target > h2 .lg-sec__t { color: var(--signal-ink); }

.lg-alpha, .lg-ul { margin: 0 0 14px; }
.lg-alpha { counter-reset: a; }
.lg-alpha li { counter-increment: a; position: relative; padding-left: 34px; margin-bottom: 7px; }
.lg-alpha li::before { content: '(' counter(a, lower-alpha) ')'; position: absolute; left: 0; color: var(--mute); font-variant-numeric: tabular-nums; }
.lg-ul li { position: relative; padding-left: 22px; margin-bottom: 7px; }
.lg-ul li::before { content: ''; position: absolute; left: 2px; top: .78em; width: 8px; height: 1px; background: var(--mute); }

.lg-note { margin: 6px 0 22px; padding: 18px 22px; background: var(--bg-2); border: 1px solid var(--rule); border-left: 2px solid var(--signal); border-radius: 0 8px 8px 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.lg-note p { margin: 0; }
.lg-lead .lg-note { margin-top: 26px; }

.lg-tbl { margin: 8px 0 24px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg-2); }
.lg-tbl table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.lg-tbl th { text-align: left; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--mute); padding: 13px 16px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.lg-tbl td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--rule); }
.lg-tbl tr:last-child td { border-bottom: 0; }
.lg-tbl td:first-child { color: var(--ink); }

.lg-defs > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--nav-h) + 20px); }
.lg-defs > div:target { box-shadow: inset 2px 0 0 var(--signal); padding-left: 12px; }
.lg-defs dt { color: var(--ink); }
.lg-defs dt strong { font-weight: 500; }
.lg-defs dd { font-size: 15.5px; }

.lg-pager { margin-top: 88px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lg-pager a { display: block; padding: 20px 22px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none !important; transition: border-color .2s var(--ease); }
.lg-pager a:hover { border-color: var(--ink-2); }
.lg-pager a[rel="next"], .lg-pager a:last-child { text-align: right; }
.lg-pager b { display: block; margin-top: 6px; font-weight: 500; font-size: 17px; letter-spacing: -.012em; color: var(--ink); }

/* ── Hub ────────────────────────────────────────────────────── */
.lg-hub { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(72px, 9vw, 128px); }
.lg-cards { border-top: 1px solid var(--rule-2); }
.lg-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) 220px 40px; column-gap: var(--gap); align-items: start; padding: 28px 0; border-bottom: 1px solid var(--rule); transition: background-color .25s var(--ease), padding .25s var(--ease); }
.lg-card__n { color: var(--signal-ink); padding-top: 6px; }
.lg-card__b { display: grid; gap: 8px; }
.lg-card__b .h-3 { font-size: clamp(21px, 2vw, 27px); letter-spacing: -.022em; }
.lg-card__b .body-s { max-width: 42em; }
.lg-card__m { display: grid; gap: 4px; color: var(--mute); padding-top: 6px; }
.lg-card__go { justify-self: end; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; color: var(--ink-2); transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease); }
.lg-card__go svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.lg-card:hover .lg-card__go { background: var(--signal); border-color: var(--signal); color: #140B05; }
.lg-card:hover .lg-card__go svg { transform: translateX(2px); }
.lg-card:hover .h-3 { color: #fff; }

.lg-fit__head { grid-column: 1 / 6; }
.lg-fit__head .body-s { margin-top: 20px; max-width: 30em; }
.lg-fit__list { grid-column: 7 / 13; border-top: 1px solid var(--rule-2); }
.lg-fit__list li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.lg-fit__list a { color: var(--ink); border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.lg-fit__list a:hover { border-color: var(--signal); }
.lg-ref__list { grid-column: 7 / 13; margin-top: 0; }
.lg-ref__list li { grid-template-columns: 200px 1fr; }
.lg-ref code, .lg-fit code { font-family: var(--f-mono); font-size: .86em; color: var(--ink); }
.lg .sec.lg-fit, .lg .sec.lg-ref { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--rule); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .lg .nav__links { gap: 20px; }
  .lg .nav__links a { font-size: 14px; }
}
@media (max-width: 1100px) {
  .lg .nav__links, .lg .nav__cta .btn--line { display: none; }
  .lg .nav__toggle { display: block; margin-right: -10px; }
  .lg .nav__inner { gap: 8px; }
  .lg .nav__cta { margin-left: auto; }
  .lg .nav.is-open { background: var(--bg); }
  .lg .nav.is-open .nav__links { display: flex; flex-direction: column; gap: 0; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--bg); padding: 16px var(--pad) 40px; margin: 0; border-top: 1px solid var(--rule); overflow-y: auto; }
  .lg .nav.is-open .nav__links a { font-size: 26px; letter-spacing: -.02em; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--rule); white-space: normal; }
  .lg .nav.is-open .nav__links a::after { display: none; }
  .lg-side { grid-column: 1 / 13; position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 8px; }
  .lg-toc { border: 1px solid var(--rule); border-radius: 8px; background: var(--bg-2); }
  .lg-toc summary { margin: 0; padding: 14px 18px; cursor: pointer; display: flex; justify-content: space-between; color: var(--ink-2); }
  .lg-toc summary::after { content: '+'; font-size: 15px; line-height: 1; }
  .lg-toc[open] summary::after { content: '–'; }
  .lg-toc ol { border-left: 0; border-top: 1px solid var(--rule); padding: 8px 4px 12px; }
  .lg-print { display: none; }
  .lg-art { grid-column: 1 / 13; }
  .lg-fit__head, .lg-fit__list, .lg-ref__list { grid-column: 1 / 13; }
  .lg-fit__list, .lg-ref__list { margin-top: 36px; }
  .lg-card { grid-template-columns: 44px minmax(0, 1fr) 40px; }
  .lg-card__m { grid-column: 2; grid-row: 2; display: flex; gap: 16px; padding-top: 12px; }
  .lg-card__go { grid-column: 3; grid-row: 1; }
}
@media (max-width: 600px) {
  .lg-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .lg-art { font-size: 16px; }
  .lg-sec h2 { grid-template-columns: 38px 1fr auto; }
  .lg-cl { grid-template-columns: 38px minmax(0, 1fr); }
  .lg-cl__n { font-size: 10.5px; }
  .lg-defs > div, .lg-fit__list li { grid-template-columns: 1fr; gap: 4px; }
  .lg-ref__list li { grid-template-columns: 110px 1fr; }
  .lg-pager { grid-template-columns: 1fr; }
  .lg-pager a[rel="next"], .lg-pager a:last-child { text-align: left; }
  .lg-alpha li { padding-left: 30px; }
  .lg-card__go { display: none; }
  .lg-card { grid-template-columns: 36px minmax(0, 1fr); }
}

/* ── Print: black on white, contract-style ──────────────────── */
@media print {
  @page { margin: 18mm 16mm; }
  html, body, .lg { background: #fff !important; color: #000 !important; color-scheme: light; }
  .nav, .footer, .lg-side, .lg-pager, .skip, .lg-anchor { display: none !important; }
  .lg-head { padding-top: 0; }
  .lg-title { font-size: 26pt; color: #000; }
  .lg-lede, .lg-lead, .lg-art, .lg-art p, .lg-defs dd, .lg-note { color: #111 !important; font-size: 10.5pt; line-height: 1.5; }
  .lg-crumb, .lg-crumb .kicker, .lg-meta dt, .lg-sec__n, .lg-cl__n, .lg-tbl th { color: #444 !important; }
  .lg-meta dd, .lg-sec h2, .lg-sec h3, .lg-art strong, .lg-art a, .lg-defs dt, .lg-tbl td:first-child, .lg-lead p:first-child, .lg-art code { color: #000 !important; }
  .lg-meta, .lg-sec h2, .lg-tbl, .lg-tbl td, .lg-tbl th, .lg-defs > div, .lg-note, .lg-sec--annex { border-color: #bbb !important; }
  .lg-body { display: block; padding: 20pt 0 0; }
  .lg-lead, .lg-sec > :not(.lg-tbl) { max-width: none; }
  .lg-sec { padding-top: 22pt; }
  .lg-sec h2 { font-size: 14pt; break-after: avoid; }
  .lg-sec h3 { break-after: avoid; }
  .lg-cl, .lg-note, .lg-tbl tr { break-inside: avoid; }
  .lg-note, .lg-tbl, .lg-art code { background: none !important; }
  .lg-tbl { overflow: visible; }
  .lg-tbl table { min-width: 0; font-size: 9pt; }
  .lg-art a { text-decoration: none !important; }
  .lg-req, .lg-lang { display: none !important; }
  .lg-util__cols { display: block; }
}

/* ── Language switch, numbered steps ────────────────────────── */
.lg-crumb { align-items: center; }
.lg-lang { margin-left: auto; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 999px; padding: 6px 14px; transition: border-color .2s var(--ease), color .2s var(--ease); }
.lg-lang:hover { border-color: var(--ink); color: var(--ink); }
.lg-steps { counter-reset: s; margin: 0 0 16px; }
.lg-steps li { counter-increment: s; position: relative; padding-left: 38px; margin-bottom: 12px; }
.lg-steps li::before { content: counter(s); position: absolute; left: 0; top: .15em; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--rule-2); display: grid; place-items: center; font: 500 11px/1 var(--f-mono); color: var(--ink); }

/* ── Bilingual utility pages: /support, /delete-account ─────── */
.lg-lede--2 { margin-top: 10px; color: var(--mute); }
.lg-util__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 88px); align-items: start; padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(64px, 8vw, 112px); }
.lg-util__cols .lg-util__col { grid-column: auto; min-width: 0; }
.lg-util__lang { color: var(--signal-ink); padding-bottom: 14px; border-bottom: 1px solid var(--rule-2); }
.lg-util .lg-lead:empty { display: none; }
.lg-util .lg-sec { padding-top: 36px; }
.lg-util .lg-sec h2 { grid-template-columns: 1fr auto; font-size: 21px; letter-spacing: -.016em; padding-bottom: 12px; margin-bottom: 14px; }
.lg-util .lg-sec__n { display: none; }
.lg-req { padding-bottom: clamp(88px, 10vw, 152px); scroll-margin-top: calc(var(--nav-h) + 24px); }
.lg-req__form { max-width: 760px; margin: 0 auto; }
.lg-req__form .field label { letter-spacing: .06em; }
.lg-req__check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 4px 0 20px; cursor: pointer; }
.lg-req__check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--signal); flex: none; }
.lg-req__check span[lang="en"] { color: var(--mute); }
.form__status span[lang="en"] { display: block; opacity: .75; }
@media (max-width: 860px) {
  .lg-util__cols { grid-template-columns: 1fr; }
  .lg-lang { margin-left: 0; }
}
