:root {
  --bg:#f7faff; --paper:#fff; --ink:#172f52; --muted:#526987;
  --line:#d6e3f2; --green:#125db5; --lime:#65e3ca; --purple:#e8f2fc;
  --navy:#122847; --blue:#176ed1; --blue-hover:#1057af; --mint:#56dfc8; --pale:#e8f2fc;
  --shadow:0 2px 0 #e0ebf7;
  font-family:Arial,Helvetica,sans-serif;
}
body { background:var(--bg); font-size:16px; }
h1,h2,h3 { letter-spacing:-.04em; }
.bar { background:white; color:var(--ink); border-bottom:1px solid var(--line); }
.bar-inner { min-height:4.9rem; }
.brand strong { letter-spacing:-.065em; font-size:clamp(1rem,3.8vw,1.55rem); }
.brand strong b { color:#187bdc; }
.brand small { color:#526987; letter-spacing:.23em; font-size:.69rem; }
.brand-icon { background:#e8f7f7; border:1px solid #cbeded; }
.brand-icon i { background:#1261b8; }
.brand-icon i:nth-child(3) { background:#148073; }
.stats { gap:.55rem; }
.stat { background:var(--pale); color:var(--ink); border:1px solid #dce9f8; }
.stat b { color:var(--green); }
.stat.streak b { color:#8f5009; }
.icon-button { width:44px; height:44px; border:1px solid var(--line); border-radius:.75rem; background:var(--paper); color:var(--ink); font-size:1.25rem; flex:none; }
.icon-button:hover { background:var(--pale); }
.nav-link { color:var(--ink); gap:.5rem; }
.nav-link:hover,.nav-link[aria-current="page"] { color:#124f9a; background:var(--pale); border-color:var(--line); }
.principle { color:var(--ink); }
.principle .eyebrow,.eyebrow { color:#3c5a80; }
.hero {
  background:linear-gradient(116deg,#122847 0%,#17385e 66%,#195b7d 100%);
  color:#fff; border-color:#193f69; box-shadow:0 5px 0 #dbe7f5; min-height:17rem;
}
.hero .eyebrow { color:var(--mint); letter-spacing:.13em; }
.hero p { color:#d6e4f4; }
.hero .cta { background:var(--mint); color:#102e48; border-color:#75ebd8; box-shadow:0 3px 0 #0c5360; }
.hero .cta:hover:enabled { color:#102e48; background:#83efdc; }
.hero .quiet { background:#ffffff10; color:#fff; border-color:#ffffff55; }
.hero .quiet:hover { background:#ffffff25; }
.orbit { border-color:#78d9d3b0; box-shadow:0 0 0 12px #6be2ce18; }
.orbit::before { background:#56dfc8; }
.orbit::after { background:#6cbaff; }
.orb { color:#153857; background:linear-gradient(145deg,#e2fff9,#9de8ff); box-shadow:0 7px 0 #0b536f; }
.cta { background:var(--blue); border-color:var(--blue-hover); box-shadow:0 3px 0 #0a438b; }
.cta:hover:enabled { background:var(--blue-hover); }
.cta:active:enabled { box-shadow:0 1px 0 #0a438b; }
.cta:disabled { color:#566b86; background:#ecf1f8; border-color:#dbe6f4; }
.quiet,.country-control { border-color:var(--line); color:#155fb4; }
.quiet:hover { background:var(--pale); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,
.option:has(input:focus-visible) { outline-color:#146cc9; }
progress,progress::-webkit-progress-bar { background:#dceafb; }
progress::-webkit-progress-value { background:linear-gradient(90deg,#166ccc,#16a497); }
progress::-moz-progress-bar { background:#176ed1; }
.step-icon,.remember,.module.active,.paper-note,.maxim,.finish-tile { background:var(--pale); color:var(--ink); }
.step-icon:nth-child(2) { background:#e0f7f3; }
.select,.option,select,input[type="number"],input[type="text"],textarea { border-color:#bed1ea; }
.option:has(input:checked) { background:#e8f2ff; border-color:#6da6e8; }
.option input { accent-color:#176ed1; }
.quiz-subjects details { border-color:var(--line); }
.day b { background:#edf4fc; color:#4a6484; border-color:#dbe8f9; }
.day.done b { background:#dcf6f0; border-color:#72c7bb; color:#145d59; }
.day.today b { border-color:#176ed1; }
.feedback.correct { background:#def7ef; }
.feedback.correct h3 { color:#175e56; }
.finish-icon { background:var(--mint); color:var(--ink); }
.explain { background:#dff8f3; color:#154755; border-color:#73cabf; box-shadow:0 3px 0 #a5dcd7; }
.explain:hover { background:#ccf4eb; }
dialog { width:min(calc(100vw - 2rem),40rem); max-height:calc(100dvh - 2.4rem); border-color:var(--line); box-shadow:0 1rem 4rem #142f5260; }
dialog::backdrop { background:#132b4c8c; }
.dialog-body,.syllabus-filters,.exam-controls,.sync-settings { display:grid; gap:.85rem; }
.dialog-body p { margin:.4rem 0 0; }
.dialog-body > section,.worked-similar { padding:.85rem; border:1px solid var(--line); border-radius:.8rem; }
.dialog-body .practice-result { margin-top:.75rem; padding:.75rem; border-radius:.75rem; background:#e9f5ff; }
.study-tools { margin-top:1.1rem; }
.study-tools .panel { border-top:3px solid #a7cbf3; }
.study-tools h2,.study-tools h3 { margin-bottom:.45rem; }
.study-tools p { color:var(--muted); }
.exam-setup label,.syllabus-filters label,.sync-settings label { display:grid; gap:.35rem; font-weight:700; }
.syllabus-filters { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:.9rem; }
.syllabus-counts { display:flex; flex-wrap:wrap; gap:.55rem; margin-bottom:.8rem; }
.syllabus-counts span,.coverage-status { display:inline-block; padding:.3rem .55rem; border-radius:.6rem; font-weight:700; font-size:.88rem; background:var(--pale); }
.coverage-status[data-status="targeted"] { background:#def7f1; color:#175e56; }
.coverage-status[data-status="centre"] { background:#e6efff; color:#233f75; }
.coverage-status[data-status="gap"] { background:#fff2dc; color:#754613; }
.syllabus-list,.review-list,.report-list { display:grid; gap:.65rem; padding:0; list-style:none; }
.syllabus-list h3,.review-list h3,.report-list h3 { margin:.35rem 0; }
.syllabus-list .actions,.review-list .actions { justify-content:flex-start; }
.syllabus-list .quiet,.review-list .quiet { font-size:.95rem; text-align:left; justify-content:flex-start; }
.syllabus-list .module,.review-list .module { overflow-wrap:anywhere; }
.revision-tabs { display:flex; flex-wrap:wrap; gap:.5rem; }
.review-due { color:#7c4b12; }
.exam-attempt .exam-status { padding:.8rem; border-radius:.75rem; background:var(--pale); }
.exam-question-list,.exam-breakdown { margin:.85rem 0; }
.exam-jump { min-height:44px; }
.exam-review-item { overflow-wrap:anywhere; }
.exam-setup select { margin-bottom:.6rem; }
.settings-link { display:inline-flex; min-height:44px; align-items:center; }
@media (max-width:720px) {
  .rail nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .nav-link { font-size:.84rem; min-height:44px; gap:.34rem; white-space:normal; }
  .bar-inner { padding-inline:.72rem; }
  .hero { min-height:0; }
}
@media (max-width:465px) {
  .bar-inner .brand-icon { display:none; }
  .brand small { letter-spacing:.12em; }
  .stats { gap:.3rem; }
  .stat { padding:.38rem .48rem; font-size:.78rem; }
  .orbit { box-shadow:0 0 0 5px #6be2ce19; }
  .orb { box-shadow:0 4px 0 #0b536f; }
  .syllabus-filters { grid-template-columns:1fr; }
  dialog { padding:.9rem; }
}
