/* ============================================================
   WeVote — Legal / Policy pages (Terms of Service, Privacy Policy)
   Same system as Support Us: kit tokens, civic emerald, first-class
   light + dark. Long-form, highly readable: sticky TOC, numbered
   section cards, callouts. The app topbar (PublicTopbarComponent)
   supplies the header, so no page-local bar is defined here.
   ============================================================ */
:root {
  --su-mint: #10B981;
  --su-mint-ink: #065F46;
  --su-tint: #EDF7F1;
}
.dark {
  --su-mint: #34D399;
  --su-mint-ink: #6EE7B7;
  --su-tint: rgba(52, 211, 153, .15);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* reading progress */
.pol-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--su-mint); z-index: 100; transition: width .08s linear; }

/* page shell */
.pol-wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px 96px; }
@media (max-width: 720px) { .pol-wrap { padding: 0 18px 72px; } }

/* title */
.pol-head { text-align: center; padding: 48px 0 40px; }
.pol-eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--su-mint-ink); }
.pol-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(34px, 5.5vw, 60px); line-height: 1.02; color: var(--ink); margin: 14px 0 12px; }
.pol-eff { font-family: var(--font-mono); font-size: 13px; color: var(--faint); }

/* two-column: sticky TOC + content */
.pol-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 52px; align-items: start; }
@media (max-width: 1000px) { .pol-layout { grid-template-columns: 1fr; gap: 0; } }

.pol-toc { position: sticky; top: 32px; }
@media (max-width: 1000px) { .pol-toc { display: none; } }
.pol-toc-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 0 12px 12px; }
.pol-toc-list { display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 130px); overflow-y: auto; scrollbar-width: thin; }
.pol-toc-link { display: flex; gap: 10px; padding: 8px 12px; border-radius: 9px; font-size: 13px; line-height: 1.35; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; transition: background .15s ease, color .15s ease; }
.pol-toc-link .n { font-family: var(--font-mono); font-size: 11px; color: var(--faint); flex: none; width: 18px; }
.pol-toc-link:hover { background: var(--sunken); color: var(--ink); }
.pol-toc-link.is-active { background: var(--su-tint); color: var(--su-mint-ink); font-weight: 600; }
.pol-toc-link.is-active .n { color: var(--su-mint-ink); }

/* intro */
.pol-intro { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-soft); margin-bottom: 22px; }
.pol-intro > p { font-size: 15px; color: var(--muted); line-height: 1.65; }
.pol-intro > p + p { margin-top: 12px; }

/* callouts */
.callout { border-radius: 14px; padding: 16px 18px; margin-top: 16px; }
.callout p { margin: 0; line-height: 1.55; }
.callout p + p { margin-top: 6px; }
.callout-warn { background: var(--st-pending-bg); border: 1px solid color-mix(in srgb, var(--st-pending-dot) 34%, transparent); }
.callout-warn .t { font-size: 13.5px; font-weight: 700; color: var(--st-pending-fg); letter-spacing: .02em; }
.callout-warn .b { font-size: 13.5px; color: var(--st-pending-fg); }
.callout-danger { background: var(--st-unres-bg); border: 1px solid color-mix(in srgb, var(--st-unres-dot) 34%, transparent); }
.callout-danger p { font-size: 13.5px; font-weight: 700; color: var(--st-unres-fg); letter-spacing: .02em; }
.callout-good { background: var(--su-tint); border: 1px solid color-mix(in srgb, var(--su-mint) 30%, transparent); }
.callout-good .t { font-size: 14px; font-weight: 700; color: var(--su-mint-ink); }
.callout-good .b { font-size: 13.5px; color: var(--su-mint-ink); }

/* section cards */
.pol-sec { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 28px 30px; box-shadow: var(--shadow-soft);
  margin-bottom: 18px; scroll-margin-top: 28px; transition: box-shadow .25s ease, border-color .25s ease; }
.pol-sec:hover { box-shadow: var(--shadow-card); border-color: var(--hairline-strong); }
@media (max-width: 720px) { .pol-sec { padding: 22px 20px; } }
.pol-h2 { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.4vw, 23px); letter-spacing: -.02em; color: var(--ink); margin: 0 0 18px; }
.pol-num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--su-tint); color: var(--su-mint-ink); font-family: var(--font-mono); font-weight: 700; font-size: 13px; }
.pol-sub { margin-top: 22px; }
.pol-sub:first-child { margin-top: 0; }
.pol-h3 { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: var(--ink); margin: 0 0 8px; }
.pol-h4 { font-size: 14px; font-weight: 700; color: var(--muted); margin: 16px 0 8px; }
.pol-h4:first-child { margin-top: 0; }
.pol-p { font-size: 14.5px; color: var(--muted); line-height: 1.65; margin: 0 0 10px; }
.pol-p:last-child { margin-bottom: 0; }
.pol-list { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.pol-list li::marker { color: var(--su-mint); }
.pol-list strong { color: var(--ink); font-weight: 700; }
.pol-sec a { color: var(--su-mint-ink); font-weight: 600; text-decoration: none; }
.pol-sec a:hover { text-decoration: underline; }

/* tables */
.pol-table-wrap { overflow-x: auto; margin: 8px 0 4px; border: 1px solid var(--hairline); border-radius: 12px; }
.pol-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.pol-table th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 12px 14px; background: var(--sunken); border-bottom: 1px solid var(--hairline); }
.pol-table td { padding: 12px 14px; color: var(--muted); line-height: 1.5; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.pol-table tr:last-child td { border-bottom: 0; }
.pol-table td:first-child { font-weight: 700; color: var(--ink); }

/* uppercase legal block */
.legal-block { background: var(--sunken); border: 1px solid var(--hairline); border-radius: 12px; padding: 16px 18px; margin: 8px 0; }
.legal-block p { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; letter-spacing: .01em; text-transform: uppercase; color: var(--muted); }

/* contact section (emerald) */
.pol-sec.pol-contact { background: var(--su-tint); border-color: color-mix(in srgb, var(--su-mint) 26%, transparent); }
.pol-contact-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: 18px; margin-top: 4px; }
.pol-contact-card .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 0 8px; }
.pol-contact-card a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.pol-note { font-size: 12.5px; color: var(--faint); font-style: italic; margin-top: 16px; line-height: 1.55; }

/* footer links */
.pol-foot { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pol-flink { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; transition: transform .18s cubic-bezier(.34,1.3,.5,1), box-shadow .2s ease, background .15s ease, border-color .15s ease, color .15s ease; }
.pol-flink.ghost { background: var(--surface); border: 1.5px solid var(--hairline-strong); color: var(--ink); }
.pol-flink.ghost:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.pol-flink.mint { background: var(--su-mint); color: #fff; }
.pol-flink.mint:hover { background: var(--accent); transform: translateY(-2px); }
.dark .pol-flink.mint { background: var(--accent); }
.dark .pol-flink.mint:hover { background: var(--accent-hover); }

/* back to top */
.pol-top { position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--surface); color: var(--muted); box-shadow: var(--shadow-lift); display: grid; place-items: center; cursor: pointer; z-index: 50; transition: color .15s ease; }
.pol-top:hover { color: var(--su-mint-ink); }

/* subtle entrance for section cards, driven by the scroll-reveal controller */
.pol-sec[data-reveal].rv { opacity: 0; transform: translateY(20px); }
.pol-sec[data-reveal].rv.is-in { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.34,1.3,.5,1); }
