/* Policy pages: privacy, terms, cookies, refund policy, data request, credits (includes/legal_layout.php). Prefix lp-.
   Direction: a charter / statute book. Navy band, serif headings, a narrow measure for reading, numbered sections that
   hang in the margin, a summary box with a gold rule, and a table of contents that stays beside the text on wide screens.
   Light palette only, like the rest of the public site. */

.lp-page {
  --lp-navy: var(--primary-color, #0a2342);
  --lp-gold: var(--accent-gold, #c9a46b);
  --lp-gold-ink: #7a561a;             /* gold dark enough for text on white (>= 5:1) */
  --lp-ink: #1f2a40;
  --lp-muted: #4f5b73;
  --lp-line: rgba(10, 35, 66, 0.15);
  --lp-paper: #fbf8f1;
  --lp-serif: var(--heading-font, "Playfair Display", Georgia, serif);
  --lp-sans: var(--body-font, "Lato", system-ui, sans-serif);
  background: #fff;
  color: var(--lp-ink);
  font-family: var(--lp-sans);
  font-size: 1.04rem;
  line-height: 1.7;
}
.lp-wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }

/* ---------- hero ---------- */
.lp-hero {
  background: linear-gradient(160deg, #0a2342 0%, #10305a 100%);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4.5vw, 3.25rem);
  border-bottom: 4px solid var(--lp-gold);
}
.lp-eyebrow { margin: 0 0 0.6rem; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lp-gold); }
.lp-title { margin: 0; max-width: 20ch; font-family: var(--lp-serif); font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.12; font-weight: 700; color: #fff; }
.lp-lede { margin: 1rem 0 0; max-width: 46rem; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: #dbe3ef; }
.lp-meta { margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; font-size: 0.88rem; color: #c3cee0; }

/* ---------- layout ---------- */
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; padding-block: clamp(1.75rem, 4vw, 3rem); }
@media (min-width: 62rem) {
  .lp-grid { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
  .lp-toc { position: sticky; top: 6.5rem; max-height: calc(100vh - 8rem); overflow-y: auto; }
}

/* ---------- table of contents ---------- */
.lp-toc { font-size: 0.93rem; line-height: 1.4; padding: 0.25rem 0 0.25rem 1.1rem; border-left: 2px solid var(--lp-line); }
.lp-toc__title { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lp-muted); }
.lp-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: lp-toc; }
.lp-toc li { counter-increment: lp-toc; margin: 0; }
.lp-toc a {
  display: block; padding: 0.38rem 0; color: var(--lp-ink); text-decoration: none;
}
.lp-toc a::before { content: counter(lp-toc, decimal-leading-zero); display: inline-block; min-width: 1.9rem; font-variant-numeric: tabular-nums; color: var(--lp-gold-ink); font-weight: 700; }
.lp-toc a:hover { color: var(--lp-navy); text-decoration: underline; text-underline-offset: 3px; }
.lp-toc a:focus-visible { outline: 3px solid var(--lp-navy); outline-offset: 2px; border-radius: 2px; }
@media (max-width: 61.99rem) {
  .lp-toc { padding: 0.9rem 1rem; border: 1px solid var(--lp-line); border-radius: 6px; background: var(--lp-paper); }
  .lp-toc ol { columns: 2 14rem; column-gap: 1.5rem; }
  .lp-toc li { break-inside: avoid; }
}

/* ---------- reading column ---------- */
.lp-prose { max-width: 46rem; counter-reset: lp-sec; }
.lp-prose p, .lp-prose ul, .lp-prose ol, .lp-prose dl { margin: 0 0 1rem; }
.lp-prose ul, .lp-prose ol { padding-left: 1.3rem; }
.lp-prose li { margin: 0.3rem 0; padding-left: 0.2rem; }
.lp-prose a { color: var(--lp-navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lp-prose a:hover { text-decoration-thickness: 2px; }
.lp-prose a:focus-visible { outline: 3px solid var(--lp-navy); outline-offset: 2px; border-radius: 2px; }
.lp-prose strong { color: var(--lp-navy); }
.lp-prose code { padding: 0.05em 0.35em; font-size: 0.88em; background: var(--lp-paper); border: 1px solid var(--lp-line); border-radius: 3px; word-break: break-word; }

.lp-section { position: relative; margin: 0 0 2.4rem; padding-top: 0.2rem; scroll-margin-top: 6rem; counter-increment: lp-sec; }
.lp-section > h2 {
  margin: 0 0 0.9rem; padding-bottom: 0.55rem;
  font-family: var(--lp-serif); font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.25; font-weight: 700; color: var(--lp-navy);
  background: linear-gradient(var(--lp-gold), var(--lp-gold)) no-repeat 0 100% / 3rem 2px;
}
.lp-section > h2::before {
  content: counter(lp-sec, decimal-leading-zero);
  display: block; margin-bottom: 0.15rem;
  font-family: var(--lp-sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; color: var(--lp-gold-ink);
}
@media (min-width: 62rem) {
  .lp-section > h2::before { position: absolute; left: -3.2rem; top: 0.55rem; margin: 0; font-size: 0.9rem; letter-spacing: 0.04em; }
}
.lp-section h3 { margin: 1.4rem 0 0.4rem; font-family: var(--lp-serif); font-size: 1.15rem; color: var(--lp-navy); }

/* ---------- summary box ---------- */
.lp-glance { margin: 0 0 2.4rem; padding: 1.15rem 1.3rem 0.6rem; background: var(--lp-paper); border: 1px solid var(--lp-line); border-left: 5px solid var(--lp-gold); border-radius: 4px; }
.lp-glance__title { margin: 0 0 0.6rem; font-family: var(--lp-serif); font-size: 1.2rem; color: var(--lp-navy); }
.lp-glance ul { margin: 0; padding-left: 1.2rem; }
.lp-glance li { margin: 0 0 0.55rem; }

/* ---------- tables ---------- */
.lp-tablewrap { margin: 0 0 1.4rem; overflow-x: auto; border: 1px solid var(--lp-line); border-radius: 4px; -webkit-overflow-scrolling: touch; }
.lp-tablewrap:focus-visible { outline: 3px solid var(--lp-navy); outline-offset: 2px; }
.lp-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.93rem; line-height: 1.5; }
.lp-table th, .lp-table td { padding: 0.65rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--lp-line); }
.lp-table thead th { background: var(--lp-navy); color: #fff; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 0; }
.lp-table tbody th { font-weight: 700; color: var(--lp-navy); background: var(--lp-paper); width: 28%; }
.lp-table tbody tr:last-child th, .lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- after the article ---------- */
.lp-after { display: grid; gap: 1.5rem 3rem; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 62rem) { .lp-after { grid-template-columns: 15rem minmax(0, 1fr); } .lp-contact { grid-column: 2; grid-row: 1; } .lp-also { grid-column: 1; grid-row: 1; } }
.lp-contact { max-width: 46rem; padding: 1.2rem 1.4rem; background: var(--lp-navy); color: #e6ecf5; border-radius: 6px; }
.lp-contact h2 { margin: 0 0 0.5rem; font-family: var(--lp-serif); font-size: 1.25rem; color: #fff; }
.lp-contact p { margin: 0 0 0.7rem; }
.lp-contact p:last-child { margin-bottom: 0; }
.lp-contact a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.lp-contact a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lp-also__title { margin: 0 0 0.5rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lp-muted); }
.lp-also ul { margin: 0; padding: 0; list-style: none; }
.lp-also a { display: inline-block; padding: 0.25rem 0; color: var(--lp-navy); text-underline-offset: 3px; }
.lp-also a:focus-visible { outline: 3px solid var(--lp-navy); outline-offset: 2px; border-radius: 2px; }

/* ---------- forms on the data-request page ---------- */
.lp-form { display: grid; gap: 1.1rem; margin: 1.2rem 0 0; padding: 1.4rem; background: var(--lp-paper); border: 1px solid var(--lp-line); border-radius: 6px; }
.lp-field { display: grid; gap: 0.35rem; }
.lp-field > label, .lp-fieldset > legend { font-weight: 700; color: var(--lp-navy); }
.lp-hint { margin: 0; font-size: 0.9rem; color: var(--lp-muted); }
.lp-input, .lp-select, .lp-textarea {
  box-sizing: border-box; width: 100%; min-height: 2.9rem; padding: 0.6rem 0.8rem; font: inherit; color: var(--lp-ink);
  background: #fff; border: 1.5px solid #6f7b92; border-radius: 4px;
}
.lp-textarea { min-height: 7rem; resize: vertical; }
.lp-input:focus-visible, .lp-select:focus-visible, .lp-textarea:focus-visible { outline: 3px solid var(--lp-navy); outline-offset: 1px; border-color: var(--lp-navy); }
.lp-input[aria-invalid="true"], .lp-textarea[aria-invalid="true"] { border-color: #b3261e; }
.lp-fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 0.5rem; }
.lp-choice { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.7rem; align-items: start; padding: 0.7rem 0.8rem; background: #fff; border: 1.5px solid var(--lp-line); border-radius: 4px; cursor: pointer; }
.lp-choice input { margin: 0.28rem 0 0; width: 1.1rem; height: 1.1rem; accent-color: var(--lp-navy); }
.lp-choice:has(input:checked) { border-color: var(--lp-navy); background: #f2f6fc; }
.lp-choice:has(input:focus-visible) { outline: 3px solid var(--lp-navy); outline-offset: 2px; }
.lp-choice strong { color: var(--lp-navy); }
.lp-choice small { grid-column: 2; font-size: 0.9rem; color: var(--lp-muted); }
.lp-check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.lp-check input { margin: 0.3rem 0 0; width: 1.1rem; height: 1.1rem; accent-color: var(--lp-navy); }
.lp-btn {
  justify-self: start; min-height: 2.9rem; padding: 0.6rem 1.5rem; font: inherit; font-weight: 700; color: #fff;
  background: var(--lp-navy); border: 2px solid var(--lp-navy); border-radius: 4px; cursor: pointer;
}
.lp-btn:hover { background: #07182d; }
.lp-btn:focus-visible { outline: 3px solid var(--lp-navy); outline-offset: 3px; }
.lp-btn[disabled] { opacity: 0.6; cursor: wait; }
.lp-prose a.lp-btn { display: inline-block; box-sizing: border-box; color: #fff; text-decoration: none; line-height: 1.5; }
.lp-prose a.lp-btn:hover { color: #fff; }
.lp-error { margin: 0; font-size: 0.92rem; font-weight: 700; color: #a3211a; }
.lp-notice { margin: 0 0 1.2rem; padding: 0.9rem 1.1rem; border-radius: 4px; border: 1px solid var(--lp-line); border-left: 5px solid var(--lp-navy); background: #f2f6fc; }
.lp-notice--ok { border-left-color: #1d6b3a; background: #eef7f1; }
.lp-notice--err { border-left-color: #a3211a; background: #fdf1ef; }
.lp-notice p:last-child { margin-bottom: 0; }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: no-preference) { .lp-section { transition: none; } html { scroll-behavior: smooth; } }
@media print {
  .lp-hero { background: none; color: #000; border-bottom: 2px solid #000; }
  .lp-title, .lp-lede, .lp-meta, .lp-eyebrow { color: #000; }
  .lp-toc, .lp-also, .lp-contact { display: none; }
  .lp-grid { display: block; }
  .lp-prose a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* ---------- data-request page ---------- */
.lp-steps { counter-reset: none; }
.lp-stepslist { margin: 0; padding: 0; list-style: none; counter-reset: lp-step; }
.lp-stepslist li { counter-increment: lp-step; position: relative; margin: 0 0 0.9rem; padding-left: 2rem; font-size: 0.93rem; line-height: 1.45; }
.lp-stepslist li::before { content: counter(lp-step); position: absolute; left: 0; top: 0.05rem; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: #fff; background: var(--lp-navy); border-radius: 50%; }
.lp-ref { padding: 0.1em 0.45em; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.95em; letter-spacing: 0.06em; background: #fff; border: 1px solid var(--lp-line); border-radius: 3px; }
.lp-section > h2.lp-plain::before { content: none; }
.lp-delete-only { display: grid; gap: 1.1rem; padding-top: 0.4rem; border-top: 1px dashed var(--lp-line); }
.lp-delete-only[hidden] { display: none; }
.lp-input[readonly] { background: #eef1f6; color: var(--lp-muted); }
.lp-notice ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
