/* Lisnora FM - legal pages (privacy.html, terms.html). Loaded after site.css.
   Layout: hero, "The short version" box, then a two-column grid: sticky table of contents + numbered sections.
   Under 960px the table of contents becomes a sticky bar under the header that opens a drop-down (legal.js).
   Strict CSP: no inline styles; icons in this file are data: images (allowed by img-src). */

html { scroll-padding-top: 96px; } /* anchor jumps land below the sticky header (and, on phones, the contents bar) */
.legal-page { position: relative; isolation: isolate; padding: 56px 0 8px; }

/* soft gold light behind the title (static, no animation: cheap on machines without a GPU) */
.legal-bg { position: absolute; top: -72px; left: 0; right: 0; height: 720px; overflow: hidden; pointer-events: none; z-index: -1; }
.legal-bg .glow { width: 640px; height: 640px; top: -40px; right: -220px; opacity: .5; animation: none; }

/* hero */
.legal-hero { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.legal-hero .kicker { margin: 0; }
.legal-hero h1 { font-size: clamp(38px, 6vw, 60px); }
.legal-meta { margin: 0; font-size: 14px; color: var(--muted); }
.legal-meta time { color: var(--text2); font-weight: 700; }
.legal-hero .lead { max-width: 660px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.legal-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text2); font-size: 14px; font-weight: 700;
  transition: color .2s, border-color .2s, background .2s; }
.legal-links a:hover { color: var(--text); border-color: #3d3d3d; background: var(--panel2); }
.legal-links svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; }

/* "The short version" */
.tldr { position: relative; max-width: 900px; margin-top: 36px; padding: 26px 28px 28px; border-radius: 22px;
  background: linear-gradient(180deg, #18140C 0%, var(--panel) 70%); border: 1px solid #3A2F18; }
.tldr::before { content: ""; position: absolute; top: -1px; left: 28px; right: 28px; height: 2px; border-radius: 2px; background: var(--grad); }
.tldr h2 { font-size: 20px; letter-spacing: -.01em; }
.tldr ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.tldr li { position: relative; padding-left: 34px; font-size: 15.5px; line-height: 1.6; color: var(--text2); }
.tldr li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1206' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4L18.5 7.5'/%3E%3C/svg%3E") center / 13px 13px no-repeat, var(--grad); }
.tldr strong { color: var(--text); font-weight: 700; }
.tldr a { text-decoration: underline; text-decoration-color: rgba(240, 185, 90, .45); text-underline-offset: 3px; }

/* two-column layout */
.legal { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 64px; align-items: start; margin-top: 56px; }

/* table of contents */
.toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--line) transparent; padding-bottom: 8px; }
.toc-title { margin: 0 0 12px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.toc-toggle { display: none; }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc-list a { display: flex; gap: 10px; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.35; transition: color .2s, border-color .25s; }
.toc-list a:hover { color: var(--text); }
.toc-list a[aria-current] { color: var(--gold-hi); border-left-color: var(--gold); }
.toc-list .n { flex: none; min-width: 18px; font-variant-numeric: tabular-nums; opacity: .6; }
.toc-list a[aria-current] .n { opacity: 1; color: var(--gold); }

/* sections */
.legal-body { max-width: 760px; min-width: 0; }
/* sections fade in and their contents rise; the section box itself never moves, so anchor jumps land exactly */
.sec.reveal { transform: none; }
.sec.reveal > * { transform: translateY(16px); transition: transform .8s var(--ease); }
.sec.reveal.in > *, .no-js .sec.reveal > * { transform: none; }
.sec + .sec { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line2); }
.sec h2 { display: flex; align-items: flex-start; gap: 14px; font-size: clamp(22px, 2.6vw, 26px); line-height: 1.25; letter-spacing: -.02em; }
.num { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; margin-top: -1px; border-radius: 10px;
  background: #2A2210; color: var(--gold-hi); font-size: 14px; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sec h3 { margin: 30px 0 0; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; color: var(--text); }
.sec p, .sec li { font-size: 16px; line-height: 1.72; color: var(--text2); }
.sec p { margin: 14px 0 0; }
.sec ul, .sec ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.sec li::marker { color: var(--gold); }
.sec strong { color: var(--text); font-weight: 700; }
.sec a { text-decoration: underline; text-decoration-color: rgba(240, 185, 90, .45); text-decoration-thickness: 1px;
  text-underline-offset: 3px; overflow-wrap: anywhere; }
.sec a:hover { text-decoration-color: currentColor; }
.sec .path { color: var(--text); font-weight: 600; white-space: normal; }

/* small cards (ad controls, notes) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 18px; }
.mini { padding: 18px 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.mini h4 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; line-height: 1.3;
  letter-spacing: -.01em; color: var(--text); }
.mini h4 svg { width: 20px; height: 20px; flex: none; stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; }

/* VIP plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 18px; }
.plan { position: relative; padding: 20px 20px 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.plan.best { border-color: #5a4520; background: linear-gradient(180deg, #1B170E 0%, var(--panel) 80%); }
.sec .plan-name { margin: 0; font-size: 12px; line-height: 1.4; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.sec .plan-price { margin: 6px 0 0; font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
.plan-price small { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.sec .plan p:not(.plan-price) { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; }
.plan .pill { position: absolute; top: 18px; right: 18px; }

/* tables (2 columns: fit at phone width without stacking) */
.tbl { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tbl th, .tbl td { padding: 13px 16px; border-top: 1px solid var(--line2); text-align: left; vertical-align: top; line-height: 1.5; }
.tbl thead th { border-top: 0; background: var(--panel2); font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted); }
.tbl tbody th { font-weight: 700; color: var(--text); }
.tbl tbody th small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.tbl td { color: var(--text2); }
.tbl tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl td.r { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.sec .note { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* callout */
.callout { display: flex; align-items: flex-start; gap: 14px; margin-top: 18px; padding: 16px 18px; border-radius: 16px;
  background: #1B170E; border: 1px solid #3A2F18; }
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 2px; stroke: var(--gold); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.sec .callout p { margin: 0; font-size: 15px; line-height: 1.6; }
.sec .callout p + p { margin-top: 6px; }

/* framed box (VIP billing rules) */
.box { margin-top: 20px; padding: 22px 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.sec .box h3 { margin: 0; }
.sec .box ul { margin-top: 12px; }

/* data categories (US state section) */
.cats { display: grid; gap: 10px; margin: 18px 0 0; }
.cat { padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.cat dt { font-weight: 800; color: var(--text); }
.cat dd { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--text2); }
.cat dd b { color: var(--muted); font-weight: 700; }

/* contact row + back to top */
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.contact-row .btn { text-decoration: none; }
.contact-row .btn svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.to-top { display: inline-flex; align-items: center; gap: 8px; margin-top: 56px; font-size: 14px; font-weight: 700; color: var(--muted); }
.to-top:hover { color: var(--text); }
.to-top svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* tablets and phones: the table of contents becomes a sticky bar with a drop-down list */
@media (max-width: 959px) {
  html { scroll-padding-top: 140px; }
  .legal { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 36px; }
  .toc { top: 72px; z-index: 40; max-height: none; overflow: visible; margin: 0 -24px; padding: 0 24px;
    background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .toc-title { display: none; }
  .toc-toggle { display: flex; align-items: center; gap: 10px; width: 100%; height: 52px; padding: 0; border: 0; background: none;
    color: var(--text); font: inherit; font-size: 14px; font-weight: 800; text-align: left; cursor: pointer; }
  .toc-label { flex: none; }
  .toc-now { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--gold); font-weight: 700; }
  .toc-now:not(:empty)::before { content: "\00B7"; margin-right: 8px; color: var(--muted); }
  .toc-toggle svg { width: 18px; height: 18px; flex: none; margin-left: auto; stroke: currentColor; fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
  .toc.open .toc-toggle svg { transform: rotate(180deg); }
  .toc-list { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: min(62vh, 540px); overflow-y: auto;
    overscroll-behavior: contain; padding: 6px 16px 12px; border-left: 0; border-bottom: 1px solid var(--line);
    background: #0D0D0D; box-shadow: 0 28px 40px -24px rgba(0, 0, 0, .9); }
  .toc.open .toc-list { display: block; animation: toc-drop .28s var(--ease); }
  .toc-list a { margin: 0; padding: 12px 8px; border-left: 0; border-bottom: 1px solid var(--line2); font-size: 15px; }
  .toc-list li:last-child a { border-bottom: 0; }

  /* without JavaScript: a plain list above the sections */
  .no-js .toc { position: static; margin: 0; padding: 0; background: none; border: 0; }
  .no-js .toc-toggle { display: none; }
  .no-js .toc-title { display: block; }
  .no-js .toc-list { display: block; position: static; max-height: none; padding: 0; border-left: 1px solid var(--line);
    border-bottom: 0; background: none; box-shadow: none; }
}
@media (max-width: 760px) {
  .legal-page { padding-top: 36px; }
  .toc { margin: 0 -16px; padding: 0 16px; }
  .tldr { margin-top: 28px; padding: 22px 18px 22px; }
  .tldr::before { left: 18px; right: 18px; }
  .sec + .sec { margin-top: 36px; padding-top: 36px; }
  .sec h2 { gap: 12px; }
  .tbl th, .tbl td { padding: 12px 12px; }
  .box { padding: 18px 16px 20px; }
}
@keyframes toc-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sec.reveal > * { transform: none; } }

/* printing */
@media print {
  .site-head, .site-foot, .skip, .toc, .legal-bg, .legal-links, .contact-row, .to-top { display: none !important; }
  html { scroll-padding-top: 0; }
  body { background: #fff; color: #111; }
  .legal-page { padding: 0; }
  .legal { display: block; margin-top: 24px; }
  .reveal, .sec.reveal > * { opacity: 1 !important; transform: none !important; }
  h1, h2, h3, h4, .sec strong, .tldr strong, .cat dt, .tbl tbody th, .plan-price { color: #000; }
  .lead, .legal-meta, .legal-meta time, .tldr li, .sec p, .sec li, .callout p, .cat dd, .tbl td, .note { color: #222; }
  .tldr, .callout, .mini, .plan, .cat, .tbl, .box { background: none; border-color: #bbb; }
  .tldr::before { display: none; }
  .num { background: none; color: #000; border: 1px solid #999; }
  .sec a, .tldr a { color: #000; }
  .sec h2 { break-after: avoid; }
}
