/* Dark by default, with a user-selectable light palette. */
:root { color-scheme: dark; --bg:#0b111c; --header:#101b2b; --panel:#151f2d; --panel-subtle:#101a29; --text:#e5edf7; --muted:#9db0c6; --label:#c0cede; --line:#314054; --input:#0f1927; --input-line:#425268; --input-text:#f1f7ff; --accent:#5cc5ee; --link:#95ddff; --btn:#117db3; --btn-hover:#1493c8; --btn-text:#ffffff; --secondary:#22384e; --secondary-hover:#314960; --thead:#22354a; --sticky:#1d2e42; --row-hover:#263e54; --shadow:0 8px 24px #02081266; }
:root[data-theme="light"] { color-scheme: light; --bg:#f5f8fc; --header:#10283d; --panel:#ffffff; --panel-subtle:#f6fafc; --text:#142739; --muted:#5c6f82; --label:#42536a; --line:#d8e3ed; --input:#ffffff; --input-line:#cbd7e2; --input-text:#132539; --accent:#2d9bd5; --link:#256897; --btn:#1366a4; --btn-hover:#0d4c7c; --btn-text:#ffffff; --secondary:#eaf3fa; --secondary-hover:#d7eaf7; --thead:#eaf0f6; --sticky:#f1f6fa; --row-hover:#edf6fc; --shadow:0 3px 12px #14283810; }
* { box-sizing:border-box; }
html { font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif; }
body { margin:0; background:var(--bg); color:var(--text); }
h1,h2,h3,p { margin-top:0; }
a { color:var(--link); }
.shell { width:min(1160px,calc(100% - 36px)); margin:auto; }
.site-header { background:var(--header); color:#f8fbff; padding:30px 0 28px; border-bottom:1px solid #26364a; }
.masthead { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.eyebrow { font-size:11px; letter-spacing:.17em; color:#89c5e8; font-weight:800; margin-bottom:5px; }
h1 { font-size:clamp(30px,4vw,43px); letter-spacing:-.045em; line-height:1.15; margin-bottom:4px; }
.accent { color:var(--accent); }
.masthead p { color:#b9ccdb; margin:0; font-size:14px; }
.header-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.home-link,.theme-toggle { border:1px solid #506880; padding:10px 13px; border-radius:9px; text-decoration:none; font-weight:700; font-size:13px; white-space:nowrap; color:#ecf6ff; background:#1a2c40; }
.home-link:hover,.theme-toggle:hover { background:#27455e; }
.theme-toggle { cursor:pointer; font-family:inherit; }
.top-note { font-size:13px; color:var(--muted); margin:20px 0 15px; line-height:1.55; }
.panel { background:var(--panel); border:1px solid var(--line); box-shadow:var(--shadow); border-radius:13px; padding:22px 23px; margin-bottom:16px; }
.panel h2 { font-size:18px; letter-spacing:-.02em; margin-bottom:16px; }
.panel h3 { font-size:14px; margin-bottom:13px; }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 18px; }
label { font-size:12px; font-weight:700; color:var(--label); display:flex; flex-direction:column; gap:6px; }
select,input { width:100%; min-height:40px; border:1px solid var(--input-line); border-radius:8px; background:var(--input); color:var(--input-text); padding:8px 10px; font:inherit; font-size:14px; font-weight:500; outline-offset:2px; }
select:focus,input:focus,button:focus-visible,a:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.span-two { grid-column:1/-1; }
.section-gap { margin-top:16px; }
.fluid-panel { background:var(--panel-subtle); border:1px solid var(--line); border-radius:10px; padding:16px; }
.actions { display:flex; align-items:center; gap:16px; margin-top:20px; flex-wrap:wrap; }
button { border:0; border-radius:8px; padding:12px 18px; background:var(--btn); color:var(--btn-text); font-size:14px; font-weight:800; cursor:pointer; }
button:hover { background:var(--btn-hover); }
button:disabled { opacity:.6; cursor:wait; }
button span { padding-left:8px; }
button.secondary { background:var(--secondary); color:var(--text); border:1px solid var(--input-line); padding:9px 14px; }
button.secondary:hover { background:var(--secondary-hover); }
#message { font-size:13px; color:var(--muted); }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:4px; }
.section-heading h2 { margin-bottom:4px; }
.section-heading p { margin-bottom:0; color:var(--muted); font-size:12px; }
.export-help { font-size:12px; color:var(--muted); margin:0 0 15px; }
.table-scroll { overflow:auto; border:1px solid var(--line); border-radius:8px; max-height:620px; }
table { border-collapse:collapse; width:100%; font-size:12px; font-variant-numeric:tabular-nums; }
th,td { padding:10px 11px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap; }
th { background:var(--thead); color:var(--text); font-weight:800; position:sticky; top:0; z-index:1; }
td { color:var(--label); background:var(--panel); }
td:first-child,th:first-child { position:sticky; left:0; text-align:left; background:var(--sticky); z-index:2; box-shadow:1px 0 var(--line); }
th:first-child { z-index:3; }
tr:hover td,tr:hover td:first-child { background:var(--row-hover); }
.summary { margin-top:16px; border-top:1px solid var(--line); padding-top:14px; }
summary { font-weight:700; cursor:pointer; font-size:13px; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.6; color:var(--label); }
.disclaimer { color:var(--muted); font-size:13px; line-height:1.7; }
.disclaimer h2 { color:var(--text); margin-bottom:14px; }
.disclaimer p { margin:0 0 13px; }
.disclaimer ul { padding-left:20px; margin:0 0 14px; }
.disclaimer li { padding:2px 0; }
.disclaimer p:last-child { margin-bottom:0; }
.footer { display:flex; gap:12px; justify-content:space-between; flex-wrap:wrap; font-size:12px; color:var(--muted); padding:8px 0 30px; }
.footer a { color:var(--link); }
.build-id { font-variant-numeric:tabular-nums; color:var(--muted); }
[hidden] { display:none!important; }
@media(max-width:650px) { .field-grid { grid-template-columns:1fr; } .span-two { grid-column:1; } .panel { padding:18px 15px; } .masthead { align-items:start; } .header-actions { gap:6px; } .home-link,.theme-toggle { font-size:11px; padding:8px; } .shell { width:min(100% - 24px,1160px); } }
@media(max-width:430px) { .masthead { align-items:flex-start; flex-direction:column; } .header-actions { width:100%; justify-content:flex-start; } .section-heading { flex-wrap:wrap; } }

/* Static help/privacy copy remains readable in dark and light modes. */
.help-panel,.privacy-panel { font-size:13px; line-height:1.7; color:var(--muted); }
.help-panel strong,.privacy-panel strong { color:var(--text); }
.help-panel p,.privacy-panel p { margin:0 0 12px; }
.help-panel p:last-child,.privacy-panel p:last-child { margin-bottom:0; }
.privacy-panel ul { padding-left:20px; margin-top:0; }
.privacy-panel h3 { margin:20px 0 8px; color:var(--text); }
.privacy-hero { color:var(--muted); font-size:13px; margin:22px 0 14px; }

/* Terms acceptance gate: match both light and dark palettes. */
.terms-gate { padding:15px 16px; border:1px solid var(--line); border-radius:9px; background:var(--panel-subtle); }
.terms-heading { color:var(--text); font-weight:750; font-size:13px; margin-bottom:9px; }
.terms-check { display:flex; align-items:flex-start; gap:11px; cursor:pointer; font-size:13px; line-height:1.65; color:var(--label); }
.terms-check input[type="checkbox"] { flex:none; appearance:auto; width:18px; height:18px; min-height:0; margin:3px 0 0; padding:0; border:0; border-radius:3px; accent-color:var(--btn); cursor:pointer; }
.terms-check a { color:var(--link); text-underline-offset:2px; }
.terms-check input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
#terms-help { margin:8px 0 0 29px; font-size:12px; line-height:1.5; color:var(--muted); }
#runBtn:disabled { opacity:.47; cursor:not-allowed; filter:grayscale(.22); }
#runBtn:disabled:hover { background:var(--btn); }
@media(max-width:650px) { .terms-gate { padding:13px; } #terms-help { margin-left:29px; } }
