/* Midnight: the site-wide corporate look (chosen Nov 2026, homepage Option A).
   Loaded LAST on every page, after the page's own stylesheets. It only overrides; the original design lives in
   site.css and the other stylesheets, untouched. To revert to the original design, remove the midnight.css link
   from the pages (scripts/apply_midnight.py --remove) and restore the old homepage from backups/. */

:root {
  --night: #160A19;
  --ink: #1B1020;
  --ink-2: #4A4150;
  --plum-3: #7B3E80;
  --blush: #F1E6EE;
  --blush-2: #E7C6CF;
  /* Original tokens, re-pointed to the Midnight palette */
  --ivory: #FFFFFF;
  --beige-mist: #F7F5F9;
  --beige-soft: #F0ECF2;
  --beige: #E4DAE8;
  --line: #E7E2EA;
  --charcoal: #1B1020;
  --muted: #5E5566;
  --rose: #A688B1;
  --rose-deep: #7B3E80;
  --rose-light: #E7C6CF;
  --rose-grad: linear-gradient(120deg, #35113A 0%, #55205B 100%);
  --shadow: 0 24px 60px -28px rgba(27, 16, 32, .32);
  --radius: 10px;
  --night-band: radial-gradient(900px 420px at 88% -10%, rgba(123, 62, 128, .55), transparent 62%),
                radial-gradient(700px 420px at 0% 120%, rgba(85, 32, 91, .55), transparent 65%), #160A19;
}

body { background: #fff; color: var(--ink); font-weight: 300; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
h3 { letter-spacing: -.01em; }
a { color: var(--plum-2); }
.eyebrow { font-size: .8rem; letter-spacing: .08em; color: var(--plum-3); }
.lede { color: var(--ink-2); }
.rule { background: var(--plum-3); }

/* Header: white, sentence-case menu */
.topbar { background: var(--night); letter-spacing: .08em; }
header.site { background: rgba(255, 255, 255, .96); border-bottom-color: var(--line); }
nav.main > a, nav.main .nav-top { font-size: .95rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); border-bottom-width: 2px; }
nav.main > a:hover, .nav-top:hover, .nav-drop.open .nav-top { border-bottom-color: var(--plum-3); }
nav.main a[aria-current="page"], .nav-top[aria-current="page"] { color: var(--plum-2); border-bottom-color: var(--plum-3); }
.nav-top::after { border-color: var(--plum-3); }
.nav-menu, .nav-submenu, .auth-menu { border-radius: 12px; border-color: var(--line); padding: 8px; }
nav.main .nav-item, .auth-menu .nav-item { font-size: .92rem; letter-spacing: 0; text-transform: none; border-radius: 8px; padding: 10px 14px; color: var(--ink); }
nav.main .nav-item:hover, nav.main .nav-item:focus-visible, .auth-menu .nav-item:hover { background: var(--blush); color: var(--plum); }
nav.main .nav-item span { color: var(--plum-3); }
.auth-btn { font-size: .92rem; letter-spacing: 0; text-transform: none; border-radius: 999px; padding: 10px 18px; background: var(--plum-2); }
.auth-btn:hover { background: var(--plum); }
header.site .nav-search { color: var(--ink); }
header.site .nav-search:hover { border-color: var(--line); background: var(--blush); }
header.site .brand::after { background: var(--plum-3); border-radius: 999px; padding: 5px 8px 4px 9px; }
@media (max-width: 1520px) { nav.main { gap: 22px; } nav.main > a, nav.main .nav-top { letter-spacing: 0; } }
@media (max-width: 1280px) { nav.main { gap: 16px; } nav.main > a, nav.main .nav-top { font-size: .88rem; letter-spacing: 0; } }
@media (max-width: 1080px) and (min-width: 721px) { nav.main { gap: 12px; } nav.main > a, nav.main .nav-top { font-size: .82rem; letter-spacing: 0; } }

/* Buttons: rounded, sentence case */
.btn { font-size: .95rem; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 13px 24px; border-radius: 999px; border-color: var(--plum-2); }
.btn-solid { background: var(--plum-2); color: #fff; border-color: transparent; }
.btn-solid:hover { background: var(--plum); filter: none; }
.btn-line { background: #fff; color: var(--plum-2); border-color: #D9CFDD; }
.btn-line:hover { background: var(--plum-2); border-color: var(--plum-2); color: #fff; }
.sheet-actions .btn, .cookie-bar .btn { padding: 8px 16px; }

/* Page headings: the dark Midnight band */
.pagehead, .lc-head { background: var(--night-band); border-bottom: 0; color: #fff; }
.pagehead h1, .lc-head h1, .pagehead h2, .lc-head h2 { color: #fff; }
.pagehead .eyebrow, .lc-head .eyebrow { color: var(--blush-2); }
.pagehead .lede, .lc-head .lede, .pagehead p, .lc-head p { color: rgba(255, 255, 255, .8); }
.pagehead a:not(.btn), .lc-head a:not(.btn) { color: var(--blush-2); }
.lc-head .lc-crumbs, .lc-head .lc-meta { color: rgba(255, 255, 255, .7); }
.lc-head .lc-meta b { color: #fff; }
.pagehead .btn-line, .lc-head .btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.pagehead .btn-line:hover, .lc-head .btn-line:hover { background: #fff; color: var(--plum); border-color: #fff; }
.pagehead .btn-solid, .lc-head .btn-solid { background: #fff; color: var(--plum); }
.pagehead .note, .lc-head .note { color: rgba(255, 255, 255, .7); }
.pagehead input, .pagehead select, .lc-head input, .lc-head select { color: var(--ink); }
.pagehead label.field, .lc-head label.field { color: rgba(255, 255, 255, .85); }
.pagehead .wrap { padding-top: 88px; padding-bottom: 72px; }
.lc-head .wrap { padding-top: 76px; padding-bottom: 60px; }

/* Sections and surfaces */
section.tint { background: var(--beige-mist); }
.card, .lc-track, .adm-card, .pi-card, .payer, .mapbox, .rate-form, .annual, .login-card, .plan-box, .sub-points li, .sub-all,
.search-results li, .cl-item, .cl-state, .cl-hero, .key, .disclaimer, .drop, .pi-key div, .cookie-bar { border-radius: 14px; border-color: var(--line); }
.card:hover, .pi-card:hover, .cl-state:hover { box-shadow: var(--shadow); border-color: #D9CFDD; }
.card .num, .card .card-more { letter-spacing: .08em; color: var(--plum-3); }
.amt { border-radius: 10px; }
.results table, .lc-table, .adm-table, .calc-table { border-radius: 12px; }
.results { overflow-x: auto; }
.cl-hero { border-left-width: 1px; }
.drop { border-color: #CDBFD3; }
.drop.over { background: var(--blush); }
.plan-box { border-color: var(--line); }
.plan-toggle button { letter-spacing: 0; text-transform: none; font-size: .92rem; }
.plan-toggle button[aria-checked="true"] { background: var(--plum-2); }
.plan-price b { font-weight: 500; letter-spacing: -.02em; color: var(--ink); }

/* Forms */
label.field { font-size: .85rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
select, input[type="number"], input[type="text"], input[type="email"], input[type="date"], input[type="password"], input[type="search"], input[type="tel"], textarea { border-radius: 10px; border-color: #DDD5E1; }
select:focus, input:focus, textarea:focus { outline: 2px solid rgba(123, 62, 128, .35); outline-offset: 1px; border-color: var(--plum-3); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237B3E80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Small uppercase labels: shorter tracking, as on the homepage */
.facts li span:first-child, .amt small, .annual th, .results th, .pill, .legal-table th, .disclaimer h4, .sr-section, .rate-form tr.grp td,
.lc-crumbs, .lc-meta, .course-nav h4, .key h4, .lc-table th, .sub-tabs a, .info-dl dt, details.srcs summary, .cert-eyebrow, .cert-foot span,
.px-controls label, .rf-hint, .px-offer-from, .calc-who legend, .calc-table thead th, .calc-months thead th, .calc-kind,
.adm-labels legend, .adm-table th, .comp-alert-eyebrow, .te-cols legend, .inv-totals span, .dash-dlg-in h3, .pop-controls label.field,
.cl-badge, .plan-toggle button span { letter-spacing: .06em; }
.lc-crumbs { text-transform: none; font-size: .85rem; }
.sub-tabs a { text-transform: none; font-size: .92rem; }

/* Tabs and small action buttons in Clinician Admin and elsewhere */
.adm-tabs button, .ref-views button { font-size: .95rem; letter-spacing: 0; text-transform: none; }
.adm-tabs button[aria-selected="true"] { color: var(--plum-2); border-bottom-color: var(--plum-3); }
.adm-actions button, .btn-link, .adm-list button, .px-controls button { letter-spacing: 0; text-transform: none; font-size: .85rem; }

/* Pop-ups, sign-in, footer */
.pop-head { background: var(--night-band); }
.pop-print { letter-spacing: 0; text-transform: none; font-size: .85rem; border-radius: 999px; }
.login-stage { background: var(--night-band); }
.login-card { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
footer.site { background: var(--night); color: rgba(255, 255, 255, .72); }
footer.site a { color: var(--blush-2); }
footer.site .legal-links { letter-spacing: 0; text-transform: none; font-size: .88rem; border-top-color: rgba(255, 255, 255, .14); }
footer.site .legal-links a { color: rgba(255, 255, 255, .85); }
footer.site .disc { color: rgba(255, 255, 255, .62); }
footer.site .fine { border-top-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .55); }
footer.site .crisis { color: var(--blush-2); }

/* Map colours follow the new palette */
#usmap path { stroke: #fff; }

@media print {
  .pagehead, .lc-head, .pop-head { background: #fff !important; color: var(--ink) !important; }
  .pagehead h1, .lc-head h1, .pop-head h2, .pagehead .lede, .lc-head .lede { color: var(--ink) !important; }
}

/* Adelic Patient landing and My Dashboard */
.px-stage { background: radial-gradient(900px 420px at 90% 0%, rgba(166, 136, 177, .22), transparent 60%), var(--beige-mist); }
.px-card, .px-choice { border-radius: 14px; }
.dash-page { background: var(--beige-mist); }
.dash-side { background: var(--night-band); }
.dash-head h1, .dash-big, .dash-tiles b, .dash-quote { font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.dash-quote { color: #fff; font-size: 1.05rem; }
.dash-card { background: #fff; border-radius: 14px; }
.dash-list li, .dash-tiles div { background: var(--beige-mist); }
.dash-link-dot { background: var(--blush); }

/* Small drop-downs in tables: leave room for the arrow */
.inv-table select, .adm-table select { padding-right: 21px; background-position: right 7px center; background-size: 9px 6px; }
.inv-group .inv-table select { max-width: 132px; }
