:root {
  /* One dark scheme with a baby blue accent. Green is kept for money/claim actions; amber and orange for deadlines. */
  --page: #0d1520; --surface: #152131; --ink: #e9f1f8; --muted: #a3b6c8; --line: #263a4f; --soft: #1b2b3d;
  --brand: #8ecdf4; --brand-ink: #06121c; --brand-soft: #173149;
  --money: #4fd1a1; --money-ink: #04170f; --money-soft: #12382c;
  --warn: #f2c86b; --hot: #ffa15c;
  /* Full width (2026-10-24): every page spans the window inside this gutter; nothing is boxed to a middle column.
     Text keeps its own line-length caps (ch) so paragraphs stay readable on wide screens. */
  --gutter: clamp(16px, 2.5vw, 40px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink);
       font: 16px/1.55 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

main { max-width: none; margin: 0 auto; padding: 40px var(--gutter) 64px; }
/* Text pages (privacy, membership) and the settlement page keep to a 1240px column: the full-width pages are the board,
   the map and the search; a page of paragraphs beside 800px of empty panel is not full width, it is lopsided. */
main.wide { max-width: 1240px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
h1 { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.hl { background: linear-gradient(92deg, var(--brand) 0%, var(--money) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--muted); font-size: 17px; margin: 0 0 32px; max-width: 58ch; }

.btn { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 13px 28px; cursor: pointer; text-decoration: none; display: inline-block;
       transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active, .btn.is-clicked { transform: translateY(0) scale(.97); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(142, 205, 244, .25); }
.btn-link { background: none; color: var(--brand); padding: 13px 4px; }
.btn-money { background: var(--money); color: var(--money-ink); }
.btn-money:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(79, 209, 161, .3); }

/* ---- Home page intro ---- */
.intro { margin-bottom: 28px; }
.intro .sub { margin-bottom: 20px; font-size: 18px; }
.intro .stats { margin-top: 0; }
/* "Free to use / No sign-up / No catch": big enough to be the first thing read. */
.promise { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.promise li { display: inline-flex; align-items: center; gap: 9px; padding: 8px 18px 8px 10px; border-radius: 999px; font-size: 15px; font-weight: 800;
              letter-spacing: .05em; text-transform: uppercase; color: var(--money); background: var(--money-soft); border: 1px solid rgba(79, 209, 161, .38);
              box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.promise svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--money); color: var(--money-ink); }
@media (max-width: 600px) { .promise li { font-size: 13px; padding: 7px 14px 7px 8px; } }

.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 28px 24px; margin-bottom: 24px; display: flex; gap: 20px; align-items: flex-start; }
.hero-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--money-soft); color: var(--money); display: grid; place-items: center; }
.hero-icon svg { width: 30px; height: 30px; }
.hero h1 { margin-bottom: 6px; }
.hero p { margin: 0; color: var(--muted); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.stat { flex: 1 1 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 12px;
        transition: opacity .55s cubic-bezier(.2, .7, .2, 1), transform .55s cubic-bezier(.2, .7, .2, 1); }
.stat b { display: block; font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat.money b { color: var(--money); }
.stat.hot b { color: var(--hot); }
.answers { font-size: 14px; color: var(--muted); margin: -8px 0 20px; }

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 14px;
        transition: opacity .55s cubic-bezier(.2, .7, .2, 1), transform .55s cubic-bezier(.2, .7, .2, 1), border-color .2s ease, box-shadow .2s ease; }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); border-color: rgba(142, 205, 244, .45); box-shadow: 0 12px 32px rgba(0, 0, 0, .38), 0 0 0 1px rgba(142, 205, 244, .08); }
}
.card:has(a.is-clicked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); transform: scale(.995); }
.card-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.card h2 { font-size: 18px; line-height: 1.35; margin: 0 0 6px; }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--brand); text-decoration: underline; }
.card .summary { color: var(--muted); margin: 0 0 12px; font-size: 15px; max-width: 64ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.chip.why { background: var(--brand-soft); color: var(--brand); }
.chip.easy { background: var(--money-soft); color: var(--money); }
.due { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.due b { display: block; font-size: 15px; }
.due span { font-size: 13px; color: var(--muted); }
.due.hot b, .due.hot span { color: var(--hot); }
.due.hot span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--hot); margin-right: 6px; vertical-align: 1px;
                         animation: due-pulse 1.6s ease-in-out infinite; }
@keyframes due-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .due.hot span::before { animation: none; } }
.due.warm b, .due.warm span { color: var(--warn); }
.payout { font-weight: 700; color: var(--money); }
.card-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
details.more > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 14px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }
.desc { margin-top: 12px; padding: 14px 16px; background: var(--soft); border-radius: 8px; font-size: 14px; max-height: 420px; overflow: auto; }
.desc h4 { margin: 12px 0 4px; font-size: 14px; }
.desc h4:first-child { margin-top: 0; }
.desc p { margin: 0 0 8px; }
.desc ul { margin: 0 0 8px; padding-left: 20px; }
.empty, .error { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; text-align: center; color: var(--muted); }
.error { color: var(--hot); text-align: left; }
.notice { font-size: 14px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 24px; }

/* ---- Recently closed: X-marked cards that fade to red at the bottom, so nobody mistakes them for open claims ---- */
:root { --past: #ff6b6b; --past-soft: rgba(255, 90, 90, .14); --past-line: rgba(255, 107, 107, .34); }
.past-section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 21px; letter-spacing: -.01em; }
.section-head h2 .ico { width: 22px; height: 22px; color: var(--past); }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 60ch; }
.past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.past-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit;
             background: linear-gradient(180deg, var(--surface) 45%, var(--past-soft) 100%); border: 1px solid var(--past-line); border-radius: 12px;
             padding: 16px 18px 22px; transition: opacity .55s cubic-bezier(.2, .7, .2, 1), transform .55s cubic-bezier(.2, .7, .2, 1), border-color .2s, box-shadow .2s; }
.past-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--past) 30%, var(--past) 70%, transparent); opacity: .85; }
@media (hover: hover) { .past-card:hover { transform: translateY(-2px); border-color: var(--past); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); } }
.past-card h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.past-card .past-amount { font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 107, 107, .6); }
.past-more { margin: 14px 0 0; font-size: 14px; }
.past-more a { color: var(--muted); text-decoration: none; }
.past-more a:hover { color: var(--past); text-decoration: underline; }

/* The same treatment on a closed settlement's own page. */
.detail-main.past, .facts-card.past { border-color: var(--past-line); background: linear-gradient(180deg, var(--surface) 70%, var(--past-soft) 100%); }
.closed { display: flex; gap: 10px; align-items: center; background: var(--past-soft); border: 1px solid var(--past-line); border-radius: 8px; padding: 10px 12px;
          font-size: 14px; font-weight: 600; color: var(--past); margin: 0 0 14px; }
.closed .ico { flex: none; width: 20px; height: 20px; }
.facts .past dd, .facts .past dd small { color: var(--past); }
.facts .past dd { text-decoration: line-through; text-decoration-color: rgba(255, 107, 107, .6); }
.facts .past dd small { text-decoration: none; }

/* "No longer listed": the source dropped it while the deadline still looks open. Amber, a strong hint rather than proof. */
:root { --unlisted: #f2c86b; --unlisted-soft: rgba(242, 200, 107, .12); --unlisted-line: rgba(242, 200, 107, .4); }
.detail-main.unlisted, .facts-card.unlisted { border-color: var(--unlisted-line); background: linear-gradient(180deg, var(--surface) 70%, var(--unlisted-soft) 100%); }
.closed.unlisted { background: var(--unlisted-soft); border-color: var(--unlisted-line); color: var(--unlisted); align-items: flex-start; }
.closed.unlisted span { font-weight: 500; color: var(--ink); }
.closed.unlisted span b { display: block; color: var(--unlisted); }
.btn.btn-quiet { background: transparent; color: var(--unlisted); border: 2px solid var(--unlisted-line); padding: 11px 22px; }
.btn.btn-quiet:hover { border-color: var(--unlisted); }

/* "Not open for claims yet": approved or announced, no deadline, nothing to file. Lavender, so it reads as "coming", not "closed". */
:root { --soon: #c3a6ff; --soon-soft: rgba(195, 166, 255, .12); --soon-line: rgba(195, 166, 255, .4); }
.detail-main.soon, .facts-card.soon { border-color: var(--soon-line); background: linear-gradient(180deg, var(--surface) 70%, var(--soon-soft) 100%); }
.closed.soon { background: var(--soon-soft); border-color: var(--soon-line); color: var(--soon); align-items: flex-start; }
.closed.soon span { font-weight: 500; color: var(--ink); }
.closed.soon span b { display: block; color: var(--soon); }
.btn.btn-quiet.soon { color: var(--soon); border-color: var(--soon-line); }
.btn.btn-quiet.soon:hover { border-color: var(--soon); }
.soon-more { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px;
             color: var(--muted); background: var(--soon-soft); border: 1px solid var(--soon-line); }
.soon-more .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--soon); }
.soon-more a { color: var(--soon); font-weight: 700; white-space: nowrap; }

@media (max-width: 600px) {
  main { padding-top: 28px; }
  .hero { flex-direction: column; padding: 22px; }
  .card-top { flex-direction: column; }
  .due { text-align: left; }
}

/* ---- Settlement detail page ---- */
main.detail { max-width: 1240px; padding-bottom: 64px; }
.crumbs { font-size: 14px; margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.detail-main { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 30px; min-width: 0; }
.detail-main h1 { font-size: clamp(24px, 3.4vw, 30px); }
.detail-main .lead { font-size: 17px; color: var(--muted); margin: 0 0 8px; max-width: none; }   /* the text runs the width of the card, like the sidebar beside it */
.detail-main h2 { font-size: 18px; margin: 26px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.prose { max-width: 72ch; }
.detail-main .prose { max-width: none; }
.prose h4 { font-size: 15px; margin: 18px 0 6px; }
.prose h4:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.source-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.source-list li { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.source-list span { color: var(--muted); font-size: 14px; }
.source-missing { margin: 0; font-size: 15px; color: var(--muted); }

.detail-side { display: grid; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.side-card h2 { font-size: 16px; margin: 0 0 6px; }
.side-card > p { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.facts { margin: 0 0 18px; display: grid; gap: 12px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); font-size: 14px; flex: none; }
.facts dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.facts dd small { display: block; font-weight: 600; font-size: 13px; color: var(--muted); }
.facts .hot dd, .facts .hot dd small { color: var(--hot); }
.facts .warm dd, .facts .warm dd small { color: var(--warn); }
.facts dd.payout { color: var(--money); }
.side-card .btn { display: block; width: 100%; text-align: center; }
.side-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }


.sub-form label.field { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.sub-form input[type=email] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.sub-form input[type=email]:focus { border-color: var(--brand); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 12px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.sub-form .btn { margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { border-radius: 8px; padding: 12px 14px; font-size: 14px; margin: 0 0 14px; border-left: 4px solid; background: var(--soft); }
.flash.ok { border-color: var(--money); color: var(--money); font-weight: 600; background: var(--money-soft); }
.flash.bad { border-color: var(--hot); color: var(--hot); }
.about-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; font-size: 14px; }
.about-list b { display: block; margin-bottom: 1px; }
.about-list span { color: var(--muted); }

/* Phones and small tablets: key facts first, then the write-up, then signup and disclaimers. */
@media (max-width: 900px) {
  .detail-grid { display: flex; flex-direction: column; gap: 16px; }
  .detail-side { display: contents; }
  .facts-card { order: 1; }
  .detail-main { order: 2; padding: 22px; }
  .subscribe-card { order: 3; }
  .about-card { order: 4; }
}

/* ---- Plain text pages (privacy, unsubscribe) ---- */
.page-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 30px; }
.page-card h2 { font-size: 19px; margin: 28px 0 8px; }
.page-card h2:first-of-type { margin-top: 8px; }
.page-card p, .page-card li { max-width: 72ch; }
.page-card ul { padding-left: 22px; }
.page-card table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0 12px; }
.page-card th, .page-card td { text-align: left; vertical-align: top; padding: 9px 10px; border-top: 1px solid var(--line); }
.page-card th { color: var(--muted); font-weight: 600; border-top: 0; }
.table-scroll { overflow-x: auto; }
@media (max-width: 600px) { .page-card { padding: 22px; } }

/* ---- "Analyze online news & media" (yellow button) and its lightbox ---- */
:root { --ai: #ffd84d; --ai-ink: #1c1600; --ai-soft: #3a3010; }
.btn-ai { background: var(--ai); color: var(--ai-ink); }
.btn-ai:hover { filter: brightness(1.06); }
.btn-ai:disabled { opacity: .6; cursor: progress; filter: none; }
.side-card .btn + .btn-ai { margin-top: 10px; }

/* "Help me with this application": a quiet outlined button that opens the visitor's mail program (Site::helpButton). */
.btn-help { background: transparent; color: var(--brand); border: 2px solid var(--brand-soft); padding: 11px 22px; }
.btn-help:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(142, 205, 244, .18); }
.side-card .btn + .btn-help { margin-top: 10px; }

/* ---- Documents & history (case.php, src/Documents.php) ---- */
.history h3 { font-size: 15px; margin: 18px 0 8px; }
.history-sum { color: var(--muted); font-size: 14px; margin: 0 0 6px; max-width: 72ch; }
.timeline { list-style: none; margin: 0 0 4px; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 10px; max-width: 72ch; }
.timeline li { position: relative; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--surface); }
.timeline li.ev-final_approval::before, .timeline li.ev-payment::before { background: var(--money); }
.timeline li.ev-deadline::before { background: var(--warn); }
.timeline li.upcoming::before { background: var(--surface); border: 2px solid var(--brand); width: 6px; height: 6px; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline li span small, .doclist li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.doclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 72ch; }
.doclist li { font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.doclist li a { font-weight: 600; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }
/* "Court docket" (src/views/court-docket.php): date and filing type per line, the ten newest, the rest under "Show all". */
.detail-main .docket h2 { margin-top: 26px; }
.docket-list { list-style: none; margin: 0; padding: 0; max-width: 72ch; }
.docket-list li { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.docket-list li:first-child { border-top: 0; }
.docket-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.docket-more { max-width: 72ch; }
.docket-more > summary { cursor: pointer; margin: 8px 0 4px; color: var(--brand); font-size: 14px; font-weight: 600; }
.docket-more[open] > summary { margin-bottom: 0; }
.docket-more .docket-list li:first-child { border-top: 1px solid var(--line); }
body.has-lightbox { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(4, 9, 16, .74); }
.lightbox-panel { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; outline: none;
                  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px 22px;
                  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
                  background: var(--soft); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: var(--line); }
.ai-disclaimer { margin: 0 44px 18px 0; padding: 12px 14px; border-radius: 8px; border-left: 4px solid var(--ai);
                 background: var(--ai-soft); color: var(--ink); font-size: 14px; line-height: 1.5; }
.ai-disclaimer strong { color: var(--ai); display: block; margin-bottom: 2px; }
.lightbox-panel .eyebrow { color: var(--ai); margin-bottom: 6px; }
.lightbox-panel h2 { font-size: 20px; line-height: 1.3; margin: 0 0 14px; }
.ai-status { margin: 0 0 12px; padding: 12px 14px; border-radius: 8px; background: var(--soft); font-size: 15px; color: var(--muted); }
.ai-status[hidden] { display: none; }
.ai-status.wait { display: flex; gap: 12px; align-items: center; }
.ai-status.wait::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
                          border: 3px solid var(--line); border-top-color: var(--ai); animation: ai-spin .9s linear infinite; }
.ai-status.bad { color: var(--hot); border-left: 4px solid var(--hot); }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-body { max-width: none; }
.ai-sources { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-sources h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); }
.ai-sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ai-sources li { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.ai-sources span { color: var(--muted); font-size: 13px; }
.ai-meta { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
@media (prefers-reduced-motion: reduce) { .ai-status.wait::before { animation: none; } }
@media (max-width: 600px) { .lightbox { padding: 10px; } .lightbox-panel { padding: 20px 18px 18px; max-height: calc(100vh - 20px); } }
/* "Super admins only" tag inside the yellow button while AI_ALLOWED_IPS limits the feature to admins. */
.btn-ai .ai-admin-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--ai-ink); color: var(--ai);
                        font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; white-space: nowrap; }

/* ---- Membership (member.php): Free next to Member, the member panel, the sign-in card ---- */
main.members { max-width: none; }
.flash.note { border-color: var(--brand); color: var(--ink); }
.flash.test-mode { border-color: var(--warn); color: var(--ink); background: rgba(242, 200, 107, .1); }
.flash.test-mode b { color: var(--warn); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 8px 0 24px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px 24px; }
.plan-paid { border-color: rgba(142, 205, 244, .55); background: linear-gradient(180deg, var(--surface) 0%, #16263a 100%);
             box-shadow: 0 0 0 1px rgba(142, 205, 244, .16), 0 18px 48px rgba(0, 0, 0, .35); }
.plan-tag { position: absolute; top: -12px; left: 24px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em;
            text-transform: uppercase; background: var(--brand); color: var(--brand-ink); }
.plan h2 { font-size: 22px; margin: 0; }
.plan-price { display: flex; align-items: baseline; gap: 7px; margin: 10px 0 6px; }
.plan-price b { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-paid .plan-price b { color: var(--brand); }
.plan-price span { color: var(--muted); font-size: 15px; font-weight: 600; }
.plan-blurb { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.benefits { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 13px; font-size: 15px; }
.benefits li { display: flex; gap: 11px; align-items: flex-start; }
.benefits .ico { flex: none; width: 21px; height: 21px; padding: 4px; border-radius: 50%; background: var(--money-soft); color: var(--money); margin-top: 1px; vertical-align: 0; }
.plan-paid .benefits .ico { background: var(--brand-soft); color: var(--brand); }
.benefits b { display: block; line-height: 1.35; }
.benefits span { display: block; color: var(--muted); font-size: 14px; margin-top: 1px; }
.plan-cta { margin-top: auto; }
.plan-cta .btn { display: block; width: 100%; text-align: center; }
.plan-free .plan-cta .btn { background: var(--soft); color: var(--ink); }
.plan-cta small { display: block; text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.plan-cta .btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.member-panel { display: flex; gap: 14px 24px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid rgba(79, 209, 161, .4);
                border-left: 4px solid var(--money); border-radius: 14px; padding: 18px 22px; margin: 0 0 24px; }
.member-panel.lapsed { border-color: rgba(242, 200, 107, .4); border-left-color: var(--warn); }
.member-panel h2 { font-size: 17px; margin: 0 0 2px; }
.member-panel h2 small { font-weight: 500; font-size: 14px; color: var(--muted); }
.member-panel p { margin: 0; color: var(--muted); font-size: 14px; max-width: 64ch; }
.member-panel .grow { flex: 1 1 320px; }
.member-panel form { display: inline; }
.member-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.member-actions .btn { padding: 11px 20px; }
.btn-ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand-soft); padding: 11px 22px; }
.btn-ghost:hover { border-color: var(--brand); }
.signin-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.signin-card h2 { font-size: 18px; margin: 0 0 4px; }
.signin-card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; max-width: 72ch; }
.signin-form { display: flex; gap: 10px; flex-wrap: wrap; }
.signin-form input[type=email] { flex: 1 1 260px; font: inherit; color: var(--ink); background: var(--page); border: 2px solid var(--line); border-radius: 8px; padding: 11px 12px; }
.signin-form input[type=email]:focus { border-color: var(--brand); outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) { .plan { padding: 24px 20px 20px; } .plan-price b { font-size: 36px; } }

/* The members card on a case page: what a non-member would get, with the join button (case.php). */
.members-card { border-color: rgba(142, 205, 244, .45); background: linear-gradient(180deg, var(--surface) 0%, #16263a 100%); }
.members-card .benefits { font-size: 14px; gap: 10px; margin: 12px 0 16px; }
.members-card .benefits .ico { width: 19px; height: 19px; padding: 4px; background: var(--brand-soft); color: var(--brand); }
.members-card .benefits span { font-size: 13px; }
.members-card .side-note a { color: var(--brand); font-weight: 600; }
.members-card .price { font-weight: 800; color: var(--brand); }
