/* ==========================================================================
   Legal pages (/terms /refund /privacy /disclaimer /copyright) — redesign
   approved 1 Oct 2026. The tab row sits right under the breadcrumb, so it is
   in the same place on all five pages; the document is set in a comfortable
   reading column next to a sticky "On this page" list. Uses the listing
   tokens (.lp-page, listing.css). Classes: lg-*; the Copyright page's
   takedown form (ip-dmca / ip-form, base styles in app-overrides.css) is
   restyled here as a card like the Contact page's form.
   ========================================================================== */
:where(.lg) :where(h1, h2, h3, p) { margin: 0; }
:where(.lg) :focus-visible { outline: 2px solid var(--lp-brand); outline-offset: 2px; border-radius: 6px; }
.lg { color: var(--lp-ink); padding-bottom: 72px; }
.lg-tabs a, .lg-toc a, .lg-help a { text-decoration: none; }

/* ---------- the five documents ---------- */
.lg-tabs { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; }
.lg-tabs::-webkit-scrollbar { display: none; }
.lg-tabs a { flex-shrink: 0; display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border: 1px solid var(--lp-line); border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 700; color: var(--lp-ink-2); white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.lg-tabs a:hover { border-color: var(--lp-ink-2); color: var(--lp-ink); }
.lg-tabs a.is-on { background: var(--lp-ink); border-color: var(--lp-ink); color: #fff; }

/* ---------- title block ---------- */
.lg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 26px 0 22px; border-bottom: 1px solid var(--lp-line-soft); }
.lg-head h1 { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.025em; color: var(--lp-ink); }
.lg-head__sub { max-width: 680px; margin-top: 8px !important; font-size: 15.5px; color: var(--lp-muted); }
.lg-head__date { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px !important; font-size: 13px; font-weight: 700; color: var(--lp-ink-2); }
.lg-head__date svg { flex-shrink: 0; color: var(--lp-faint); }
.lg-print { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--lp-line); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--lp-ink); cursor: pointer; }
.lg-print:hover { border-color: var(--lp-ink-2); }

/* ---------- layout ---------- */
.lg-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 28px; }
.lg-side { position: sticky; top: 92px; display: grid; gap: 14px; }
.lg-toc { max-height: calc(100vh - 260px); overflow-y: auto; padding: 16px 16px 12px; border: 1px solid var(--lp-line); border-radius: 16px; background: #fff; }
.lg-toc__title { margin-bottom: 8px !important; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-faint); }
.lg-toc a { display: block; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--lp-ink-2); }
.lg-toc a:hover { background: var(--lp-soft); color: var(--lp-ink); }
.lg-toc a.is-on { background: var(--lp-brand-soft); color: var(--lp-brand); }
.lg-help { padding: 16px; border-radius: 16px; background: var(--lp-soft); font-size: 13.5px; color: var(--lp-ink-2); }
.lg-help__title { font-size: 14.5px; font-weight: 800; color: var(--lp-ink); }
.lg-help p + p { margin-top: 4px; }
.lg-help a { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--lp-brand); word-break: break-all; }

/* ---------- the document: easy reading ---------- */
.lg-doc { max-width: 760px; min-width: 0; font-size: 16px; line-height: 1.75; color: var(--lp-ink-2); overflow-wrap: anywhere; }
.lg-doc > :first-child { margin-top: 0; }
.lg-doc p { margin: 0 0 14px; }
.lg-doc h2 { margin: 34px 0 10px; font-size: 21px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: var(--lp-ink); scroll-margin-top: 96px; }
.lg-doc h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 800; color: var(--lp-ink); scroll-margin-top: 96px; }
.lg-doc h4 { margin: 18px 0 6px; font-size: 15.5px; font-weight: 800; color: var(--lp-ink); }
.lg-doc ul, .lg-doc ol { margin: 0 0 16px; padding-left: 22px; }
.lg-doc li { margin: 4px 0; }
.lg-doc li::marker { color: var(--lp-brand); }
/* The site resets list markers; the admin editor also saves bullet lists as
   <ol><li data-list="bullet"> with a helper span — give both their markers. */
.lg-doc ul { list-style: disc; }
.lg-doc ol { list-style: decimal; }
.lg-doc li[data-list="bullet"] { list-style-type: disc; }
.lg-doc li[data-list="ordered"] { list-style-type: decimal; }
.lg-doc .ql-ui { display: none; }
.lg-doc a { font-weight: 700; color: var(--lp-brand); text-decoration: underline; text-underline-offset: 2px; }
.lg-doc strong, .lg-doc b { color: var(--lp-ink); }
.lg-doc blockquote { margin: 0 0 16px; padding: 10px 16px; border-left: 3px solid var(--lp-brand); border-radius: 0 10px 10px 0; background: var(--lp-soft); }
.lg-doc table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 14.5px; }
.lg-doc th, .lg-doc td { padding: 8px 10px; border: 1px solid var(--lp-line); text-align: left; vertical-align: top; }
.lg-doc th { background: var(--lp-soft); color: var(--lp-ink); }
.lg-doc .ql-align-center { text-align: center; }
.lg-doc .ql-align-right { text-align: right; }
.lg-doc .ql-align-justify { text-align: justify; }
.lg-notice { margin-bottom: 18px; padding: 12px 16px; border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; font-size: 14.5px; color: #92400e; }

/* ---------- the takedown form (Copyright page) ---------- */
.lg .ip-dmca { margin-top: 36px; padding: 26px 28px; border: 1px solid var(--lp-line); border-radius: 20px; background: #fff; box-shadow: 0 24px 50px -36px rgba(15, 23, 42, .35); scroll-margin-top: 96px; }
.lg .ip-dmca h2 { margin: 0 !important; font-size: 21px; }
.lg .ip-dmca__intro { margin: 6px 0 16px !important; font-size: 14.5px; line-height: 1.6; color: var(--lp-muted); }
.lg .ip-form__row { gap: 0 16px; }
.lg .ip-form__group { gap: 5px; margin-bottom: 12px; }
.lg .ip-form__group > label { font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--lp-ink-2); }
.lg .ip-form input[type="text"], .lg .ip-form input[type="email"], .lg .ip-form input[type="url"], .lg .ip-form textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--lp-line); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; color: var(--lp-ink); box-shadow: none; }
.lg .ip-form textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; }
.lg .ip-form input:focus, .lg .ip-form textarea:focus { border-color: var(--lp-brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); outline: 0; }
.lg .ip-form__check { font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--lp-ink-2); }
.lg .ip-form__check input { accent-color: var(--lp-brand); }
.lg .ip-form .btn { width: 100%; height: 44px; border: 0; border-radius: 12px; background: var(--lp-brand); font-weight: 800; color: #fff; }
.lg .ip-form .btn:hover { background: var(--lp-brand-hover); }
.lg .ip-form-alert { margin-bottom: 14px; border-radius: 12px; font-size: 13.5px; }

/* ---------- tablet / phone ---------- */
@media (max-width: 900px) {
  .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lg-side { position: static; order: 2; margin-top: 28px; }
  .lg-toc { display: none; }
}
@media (max-width: 767px) {
  .lg { padding-bottom: 40px; }
  .lg-tabs { margin: 14px -12px 0; padding: 0 12px; }
  .lg-head { flex-direction: column; align-items: flex-start; padding: 20px 0 16px; }
  .lg-head h1 { font-size: 26px; }
  .lg-doc { font-size: 15.5px; }
  .lg-doc h2 { font-size: 19px; }
  .lg .ip-dmca { padding: 18px 16px; }
  .lg .ip-form__row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- print: just the document ---------- */
@media print {
  .site-header, .lg-tabs, .lg-print, .lg-side, .lp-crumbs, .site-footer, .mobile-bottom-nav, .ip-dmca, .ad-slot { display: none !important; }
  .lg-layout { display: block; padding: 0; }
  .lg-head { padding-top: 0; }
  .lg-doc { max-width: none; font-size: 12pt; }
}
