/* Shared semantic palette for the preserved standalone study application. */
:root {
  --study-primary: #2347d6;
  --study-primary-hover: #1c38ab;
  --study-on-primary: #ffffff;
  --study-background: #f5f6fb;
  --study-surface: #ffffff;
  --study-soft: #eef1fb;
  --study-border: #e2e6f2;
  --study-ink: #1b2340;
  --study-muted: #5b6478;
  --study-success: #1e9e5a;
  --study-danger: #d64545;
  --study-chart-1: var(--study-primary);
  --study-chart-2: #f29d1f;
  --study-chart-3: #4f6ef2;
  --study-chart-4: #f7b955;
  --study-chart-5: #7a8ff5;
  --study-chart-6: #2f9e8f;
  --study-chart-7: #e2673c;
  --study-chart-8: #8a93ad;
  --tx: var(--study-ink);
  --mut: var(--study-muted);
  --ac: var(--study-primary);
  --ac2: var(--study-primary-hover);
  --sun: #f29d1f;
  --ok: var(--study-success);
  --no: var(--study-danger);
  --bg: var(--study-background);
  --cd: var(--study-surface);
  --card: var(--study-surface);
  --bd: var(--study-border);
  --sep: var(--study-border);
  --fill: var(--study-soft);
  --sh: 0 2px 12px color-mix(in oklab,var(--study-ink) 5%,transparent);
  --home-bg: #ffffff;
  --home-ink: #1d1d1f;
  --home-muted: #6e6e73;
  --home-surface: #ffffff;
  --home-soft: #f5f5f7;
  --home-accent: #1d1d1f;
  --home-border: #e5e5ea;
  --home-shadow: var(--sh);
}
html, body, #shell, #shell.hm, #ex { background: var(--study-background); color: var(--study-ink); }
.hero { background: linear-gradient(135deg,var(--study-primary),var(--study-primary-hover))!important; color: var(--study-on-primary); box-shadow: var(--sh)!important; }
.ap-hero { background: var(--home-accent)!important; color: var(--study-on-primary); box-shadow: 0 12px 28px color-mix(in oklab,var(--home-accent) 25%,transparent)!important; }
.hero::after { display: none; }
.ap-hero h1, .hero h2, .ap-seg button { color: var(--study-on-primary); }
.ap-seg button.on { background: var(--study-surface); color: var(--home-accent); }
.ap-g i { background: color-mix(in srgb,var(--c) 12%,#fff); color: var(--c); }
.ap-g b { color: var(--home-ink); }
.ap-g span { color: var(--home-muted); }
.ti { background: var(--study-primary)!important; background-image: none; box-shadow: none; }
.btn, .chip.on, .rb.hot, .cvbar u { background: var(--study-primary); box-shadow: none; }
.btn.s { background: var(--study-surface); }
.opt, .ps, .nv2, .fm { background: var(--study-background); }
.opt.ok { background: color-mix(in oklab,var(--study-success) 10%,var(--study-surface)); }
.opt.no { background: color-mix(in oklab,var(--study-danger) 10%,var(--study-surface)); }
.exp, .rp, .ro.on { background: var(--study-soft); color: var(--study-ink); }
#nav button { color: var(--study-muted); }
#nav button.on { background: var(--study-primary)!important; color: var(--study-on-primary)!important; }
.xb.b, .ar, .ci em { background: var(--study-primary); }
.pb.m, .pb.am { background: var(--study-ink); }
.pb.am::after { background: var(--study-success); }
.ro.on { border-color: var(--study-primary); }
input, select { accent-color: var(--study-primary); }
@media(hover:hover) { .btn:not(.s):hover, .xb.b:hover { background: var(--study-primary-hover); } }
/* Real CBT exam palette (reference screenshot) */
:root{--exam-green:#72b663;--exam-orange:#e0aa62;--exam-blue:#5479b4;--exam-red:#c9573a;--exam-purple:#4b2f91;--exam-timer:#3e7be0;--exam-grey:#e9e9ec}
.xb.g{background:var(--exam-green)!important}
.xb.o{background:var(--exam-orange)!important}
.xb.b{background:var(--exam-blue)!important}
@media(hover:hover){.xb.b:hover{background:color-mix(in oklab,var(--exam-blue) 85%,black)!important}}
.pb.na{background:var(--exam-red)!important}
.pb.a{background:var(--exam-green)!important}
.pb.m,.pb.am{background:var(--exam-purple)!important}
.pb.am::after{background:#6fd36a!important}
/* Apple-style home: white, black text, iOS system colours on icons */
.ap-g button{background:#fff!important;border-color:var(--home-border)!important}
.ap-g button:nth-child(1){--c:#ff9500}.ap-g button:nth-child(2){--c:#34c759}.ap-g button:nth-child(3){--c:#ff3b30}
.ap-g button:nth-child(4){--c:#af52de}.ap-g button:nth-child(5){--c:#5ac8fa}.ap-g button:nth-child(6){--c:#ff2d55}
#shell.hm, body:has(#shell.hm){background:#fff!important;color:#1d1d1f}
.ap-g button:nth-child(1) i{--c:#ff9500!important}.ap-g button:nth-child(2) i{--c:#34c759!important}.ap-g button:nth-child(3) i{--c:#ff3b30!important}
.ap-g button:nth-child(4) i{--c:#af52de!important}.ap-g button:nth-child(5) i{--c:#5ac8fa!important}.ap-g button:nth-child(6) i{--c:#ff2d55!important}
.ap-g i{background:color-mix(in srgb,var(--c) 13%,#fff)!important;color:var(--c)!important}
