:root{--page-bg:#f4f6fa;--panel-bg:#fff;--ink:#18253e;--subtle:#5c6c83;--line:#dee5ef;color-scheme:light}
.theme-purple,.project.purple{--accent:#7753a0;--accent-ink:#684090;--tint:#f1eafa}.project-symbol.purple{background:#34233f;color:#e2bfff}
html[data-theme=dark] .theme-purple,html[data-theme=dark] .project.purple{--accent:#cfb2f0;--accent-ink:#dfc5ff;--tint:#30243f}
.badge-strip img[src*="p19-memorial"]{width:44px;height:44px;object-fit:contain}#badges .badge-commemorative{border-color:#b89555;background:linear-gradient(140deg,#fbf5ff,#f6ecd4)}#badges .badge-commemorative img{width:160px;height:160px}html[data-theme=dark] #badges .badge-commemorative{background:linear-gradient(140deg,#261735,#191a29);border-color:#b89555}
.theme-pink{--accent:#c84486;--tint:#fff0f7}.project.pink{--accent:#c84486}.project-symbol.pink{background:#43273d;color:#f7b0d6}
.theme-lime{--accent:#65a30d;--accent-ink:#466e0a;--tint:#f3fae7}.project.lime{--accent:#65a30d;--accent-ink:#466e0a}.project-symbol.lime{background:#2c3c17;color:#c7ee91}
html[data-theme=dark] .theme-lime{--accent:#bef264;--accent-ink:#bef264;--tint:#2a351d}html[data-theme=dark] .project.lime{--accent:#bef264;--accent-ink:#bef264}
.theme-lime main a:not(.primary):not(.secondary),.theme-lime .topbar a,.theme-lime .math-panel,.theme-lime .version{color:var(--accent-ink)}
.theme-lime .primary{color:#152706}.project.lime .card-formula,.project.lime .number,.project.lime .project-link{color:var(--accent-ink)}
@media(max-width:850px){.theme-lime .global-nav{flex-wrap:wrap}.theme-lime .topbar{height:auto;min-height:60px;padding-top:12px;padding-bottom:12px}}
html[data-theme=dark] .theme-pink{--accent:#f29bc9;--tint:#382436}html[data-theme=dark] .project.pink{--accent:#f29bc9}
.history-note{font-size:12px;line-height:1.65;color:var(--subtle);padding:12px 16px;border:1px solid var(--line);border-radius:8px;background:var(--panel-bg)}.next-task-id{font-size:32px;font-variant-numeric:tabular-nums;color:var(--accent)}
:root[data-theme=dark]{--page-bg:#101720;--panel-bg:#18222f;--ink:#e8eef6;--subtle:#a9b8cb;--line:#344354;color-scheme:dark;background:var(--page-bg);color:var(--ink)}
html,body{background:var(--page-bg);color:var(--ink)}
.theme-red{--accent:#be3542;--tint:#fff0f1}.theme-orange{--accent:#b35a18;--tint:#fff2e8}.theme-yellow{--accent:#edc438;--accent-ink:#806200;--accent-number:#9c7800;--tint:#fff5c2}.theme-green{--accent:#197645;--tint:#eaf7ee}.theme-cyan{--accent:#087f9a;--tint:#e8f8fc}.theme-blue{--accent:#2563eb;--tint:#edf3ff}
.project.red{--accent:#be3542}.project.orange{--accent:#b35a18}.project.yellow{--accent:#edc438;--accent-ink:#806200;--accent-number:#9c7800}.project.green{--accent:#197645}.project.cyan{--accent:#087f9a}.project.blue{--accent:#2563eb}
.project-symbol{min-width:94px;width:94px;height:42px;padding:4px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;font-family:"Cambria Math",Cambria,serif;font-size:15px;line-height:1.15;border-radius:8px;white-space:nowrap;flex-shrink:0}
.project-symbol.red{background:#412631;color:#ffb4bf}.project-symbol.orange{background:#432d24;color:#ffbf8f}.project-symbol.yellow{background:#3a3b24;color:#eadb7a}.project-symbol.green{background:#163b30;color:#9fdfb7}.project-symbol.cyan{background:#133a49;color:#8fdded}.project-symbol.blue{background:#1a3157;color:#b3ceff}
.project-symbol sup{font-size:.7em;align-self:center;position:relative;top:-.3em}.project-link{min-height:50px;gap:8px}.sidebar{width:292px}.workspace{margin-left:292px}.brand{white-space:nowrap;letter-spacing:-.02em;font-size:1.2rem}.brand small{letter-spacing:.035em;font-size:.65rem}.sidebar .brand-mark{flex-shrink:0}
.global-nav{display:flex;flex-direction:column;gap:4px;margin-top:4px}.global-nav a{padding:9px 12px;color:#c1ccdd;font-size:.875rem;border-radius:7px}.global-nav a:hover{color:#fff;background:#203047;text-decoration:none}.nav a:last-child{border-top:0;margin-top:0;padding-top:10px}
.theme-toggle{display:inline-flex;gap:7px;align-items:center;justify-content:center;background:var(--panel-bg);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:8px 11px;white-space:nowrap;font-size:.8rem;cursor:pointer}.theme-toggle:hover{filter:brightness(.96)}.topbar-right{gap:12px}.topbar-right .theme-toggle{min-height:34px}
.sidebar .project-link{padding:4px 8px;margin-bottom:4px;min-height:50px}.sidebar .nav a{padding:8px 12px;min-height:34px}.sidebar .sidebar-section{margin-top:18px;margin-bottom:10px}
html[data-theme=dark] .stat-top,html[data-theme=dark] .topbar-context,html[data-theme=dark] .math-note,html[data-theme=dark] .file-note,html[data-theme=dark] .footnote,html[data-theme=dark] .empty p{color:var(--subtle)}
html[data-theme=dark] .migration-strip{background:#223247;color:#d9e6f5}html[data-theme=dark] progress::-webkit-progress-bar{background:#304052}html[data-theme=dark] progress::-webkit-progress-value{background:var(--accent)}
.projects{grid-template-columns:repeat(3,minmax(0,1fr))}.project{border-top-color:var(--accent)}.project .card-formula,.project .number,.project .project-link{color:var(--accent)}
html[data-theme=dark] .theme-red{--accent:#f28d9a;--tint:#34222c}html[data-theme=dark] .theme-orange{--accent:#efb17d;--tint:#362a25}html[data-theme=dark] .theme-yellow{--accent:#f4d354;--accent-ink:#f4d354;--accent-number:#f4d354;--tint:#33301b}html[data-theme=dark] .theme-green{--accent:#86d0a1;--tint:#1a3029}html[data-theme=dark] .theme-cyan{--accent:#78d5ec;--tint:#19313c}html[data-theme=dark] .theme-blue{--accent:#8cb7ff;--tint:#202d45}
html[data-theme=dark] .project.red{--accent:#f28d9a}html[data-theme=dark] .project.orange{--accent:#efb17d}html[data-theme=dark] .project.yellow{--accent:#f4d354;--accent-ink:#f4d354;--accent-number:#f4d354}html[data-theme=dark] .project.green{--accent:#86d0a1}html[data-theme=dark] .project.cyan{--accent:#78d5ec}html[data-theme=dark] .project.blue{--accent:#8cb7ff}
html[data-theme=dark] .panel,html[data-theme=dark] .stat,html[data-theme=dark] .project,html[data-theme=dark] .network-note,html[data-theme=dark] header,html[data-theme=dark] .topbar,html[data-theme=dark] .findings-list,html[data-theme=dark] .prime-panel,html[data-theme=dark] .resource-card{background:var(--panel-bg);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .lead,html[data-theme=dark] .family,html[data-theme=dark] .muted,html[data-theme=dark] .stat-note,html[data-theme=dark] .eyebrow,html[data-theme=dark] .release,html[data-theme=dark] .project-note p,html[data-theme=dark] .progress-caption,html[data-theme=dark] .lifetime span,html[data-theme=dark] .findings-caption,html[data-theme=dark] footer,html[data-theme=dark] .card-head,html[data-theme=dark] .client-band p{color:var(--subtle)}
html[data-theme=dark] .brand,html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3,html[data-theme=dark] .topbar-project,html[data-theme=dark] .stat strong,html[data-theme=dark] .lifetime strong,html[data-theme=dark] dd{color:var(--ink)}
html[data-theme=dark] .client-band,html[data-theme=dark] .list-toolbar,html[data-theme=dark] .segmented,html[data-theme=dark] th{background:#141e2b;border-color:var(--line);color:var(--subtle)}
html[data-theme=dark] td,html[data-theme=dark] .panel-heading,html[data-theme=dark] .pagination,html[data-theme=dark] .section-head,html[data-theme=dark] .findings-toolbar,html[data-theme=dark] .card-formula{border-color:var(--line)}
html[data-theme=dark] tbody tr:hover{background:#202e3f}html[data-theme=dark] .secondary,html[data-theme=dark] select,html[data-theme=dark] input,html[data-theme=dark] .segmented a[aria-current=page]{background:#202e3f;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .primary{color:#0b1624}html[data-theme=dark] .notice{color:var(--ink)}html[data-theme=dark] .badge{background:#293a4f;color:#d7e5fa}html[data-theme=dark] .badge.done,html[data-theme=dark] .badge.true{background:#1a4233;color:#a1e3bb}html[data-theme=dark] .badge.failed{background:#492c35;color:#f3b7bb}
html[data-theme=dark] .detail-panel pre,html[data-theme=dark] pre,html[data-theme=dark] .prime-digits{background:#0c1420;color:#dbe7f8}html[data-theme=dark] .mark,html[data-theme=dark] .button{background:#356bd3;color:white}
@media(max-width:1180px){.sidebar{width:272px}.workspace{margin-left:272px}.project-symbol{width:90px;min-width:90px;font-size:14px}}
@media(max-width:850px){.sidebar{width:100%;position:static}.workspace{margin-left:0}.project-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.project-link{min-width:0}.project-symbol{width:82px;min-width:82px;font-size:13px}.global-nav{flex-direction:row;margin-bottom:12px}.projects{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar-right{margin-left:auto}.topbar-right .theme-toggle{padding:6px 9px}}
@media(max-width:600px){.project-switcher{grid-template-columns:repeat(2,minmax(0,1fr))}.projects{grid-template-columns:1fr}.project-symbol{width:77px;min-width:77px;font-size:12px}.project-link{font-size:.8rem;padding:6px}.brand{font-size:1.1rem}header{height:auto;min-height:92px;flex-wrap:wrap;padding-top:16px;padding-bottom:16px;gap:12px}header nav{order:3;width:100%;gap:16px;margin:0;flex-wrap:wrap}header>.theme-toggle{margin-left:auto}}

/* Bright gold surfaces use dark ink in daylight; small text stays readable. */
.theme-yellow main a:not(.primary):not(.secondary),.theme-yellow .topbar a,.theme-yellow .math-panel,.theme-yellow .resource-icon,.theme-yellow .version,.theme-yellow .segmented a[aria-current=page]{color:var(--accent-ink)}
.theme-yellow .stat:first-child strong,.theme-yellow .large-percent,.theme-yellow .next-task-id{color:var(--accent-number)}.theme-red .stat:first-child strong,.theme-orange .stat:first-child strong,.theme-yellow .stat:first-child strong,.theme-green .stat:first-child strong,.theme-cyan .stat:first-child strong,.theme-lime .stat:first-child strong,.theme-pink .stat:first-child strong,.theme-purple .stat:first-child strong{color:var(--ink)}
.theme-yellow .primary{background:var(--accent);border-color:var(--accent);color:#352d0a}
.project.yellow .card-formula,.project.yellow .number,.project.yellow .project-link{color:var(--accent-ink)}
.project.yellow .queued dd{color:var(--accent-number)}
.project .number{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:28px;padding:0 7px;border:1px solid currentColor;border-radius:6px;background:transparent;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent-ink,var(--accent));line-height:1;font-weight:650;font-variant-numeric:tabular-nums}
/* Restore semantic accent borders after the neutral panel border rule. */
html[data-theme=dark] .project,html[data-theme=dark] .stat:first-child{border-top-color:var(--accent)}

/* Findings cells/links declare their own day colors; body inheritance alone
   cannot recolor them. Keep the overrides scoped to findings and its detail. */
html[data-theme=dark] .findings-list .prime-expression,
html[data-theme=dark] .findings-list td.digits,
html[data-theme=dark] .findings-list .prime-type,
html[data-theme=dark] .findings-list .discovered-time{color:var(--ink)}
html[data-theme=dark] .findings-list .multiply{color:inherit}
html[data-theme=dark] .findings-list .rank,
html[data-theme=dark] .findings-list .timezone,
html[data-theme=dark] .findings-toolbar p,
html[data-theme=dark] .findings-search,
html[data-theme=dark] .findings-stats dt,
html[data-theme=dark] .findings-stats dd span,
html[data-theme=dark] #findings-empty{color:var(--subtle)}
html[data-theme=dark] .findings-search input::placeholder{color:var(--subtle);opacity:1}
html[data-theme=dark] .findings-list tbody tr:nth-child(-n+3) .rank,
html[data-theme=dark] .findings-list .prime-expression:hover{color:#a8c7ff}
html[data-theme=dark] .findings-list tbody tr+tr{border-top-color:var(--line)}
html[data-theme=dark] .findings-stats{border-color:var(--line)}
html[data-theme=dark] .decimal-panel{background:var(--panel-bg);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .decimal-panel p,
html[data-theme=dark] #decimal-result label,
html[data-theme=dark] .prime-metadata dt{color:var(--subtle)}
html[data-theme=dark] #decimal-digits{background:#0c1420;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] header nav,
html[data-theme=dark] .hero h1 span,
html[data-theme=dark] .network-note p{color:var(--subtle)}
html[data-theme=dark] .network-note .formula{color:var(--ink)}
html[data-theme=dark] .network-note .formula span{color:var(--subtle)}
html[data-theme=dark] header nav a[aria-current=page],
html[data-theme=dark] .hero .text-link,
html[data-theme=dark] .client-band .text-link,
html[data-theme=dark] .prime-detail .text-link{color:#a8c7ff}
/* All project API links follow their theme; yellow keeps its accessible ink. */
.topbar-right>a[href$="/api/status"]{color:var(--accent-ink,var(--accent));font-weight:600}
.contributor-sort-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap;width:100%}.contributor-sort-controls label{display:flex;align-items:center;gap:10px;font-size:.9rem;font-weight:600}.contributor-sort-controls select{min-height:38px;min-width:144px;padding:7px 30px 7px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel-bg);color:var(--ink);font:inherit}.contributor-sort-controls .sort-note{font-size:.8rem;color:var(--subtle)}body[data-page=users] th[aria-sort=descending]{background:var(--tint);color:var(--accent-ink,var(--accent));font-weight:750}@media(max-width:600px){.contributor-sort-controls{gap:10px}.contributor-sort-controls .sort-note{width:100%}}
.project-label{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}.project-name{line-height:1.25}.sidebar .project-queue-digits{display:block;max-width:100%;font-size:11px;line-height:1.4;font-weight:400;color:#a8bbd2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar .project-queue-digits[data-state=stale],.sidebar .project-queue-digits[data-state=unavailable]{color:#e8bd82}.sidebar .project-current{flex-shrink:0}
body[data-page=prps] th[aria-sort=descending]{background:var(--tint);color:var(--accent-ink,var(--accent));font-weight:750}
@media(max-width:420px){.project-link{gap:5px}.project-symbol{width:70px;min-width:70px;font-size:11.5px}.sidebar .project-queue-digits{font-size:10.5px}}
