:root {
  color-scheme: light;
  --ink: #172742;
  --muted: #4e607b;
  --blue: #244fc2;
  --blue-gradient: linear-gradient(112deg, #142d64 4%, #204aab 82%, #295ed0);
  --border: #dde5f1;
  --surface: #fff;
  --bg: #f6f8fc;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #5679e1; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { display: block; width: 1.2rem; height: 1.2rem; flex: none; }
[data-icon] { display: inline-grid; place-items: center; flex: none; }
.sidebar { display: flex; flex-direction: column; width: 235px; height: 100dvh; position: fixed; inset: 0 auto auto 0; padding: 1.6rem 1.15rem; border-right: 1px solid var(--border); background: white; }
.brand { display: flex; gap: .7rem; align-items: center; font-size: 1.16rem; font-weight: 700; letter-spacing: -.035em; padding: 0 .4rem; }
.brand strong { color: var(--blue); }
.brand-mark { background: var(--blue); color: white; width: 41px; height: 41px; border-radius: 12px; }
.sidebar nav { display: grid; gap: .35rem; margin-top: 2.25rem; }
.sidebar nav a { display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; color: var(--muted); font-weight: 600; border-radius: 9px; font-size: .94rem; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav a[aria-current] { background: #eaf0ff; color: #2148b2; }
.sidebar-note { margin-top: auto; display: flex; gap: .55rem; align-items: center; color: var(--muted); font-size: .81rem; padding: .6rem .35rem; }
.sidebar-note .icon { width: 1rem; }
.shell { margin-left: 235px; }
.dedication {
  padding: .7rem 1rem;
  background: var(--blue-gradient);
  color: white;
  font-size: clamp(1.12rem, 3.1vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.topbar { min-height: 76px; padding: .85rem clamp(1.25rem, 3.4vw, 3.25rem); background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.breadcrumb { font-weight: 650; }
main { max-width: 1320px; margin: 0 auto; padding: 2rem clamp(1.25rem, 3.4vw, 3.25rem) 3rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 43px; padding: .55rem .95rem; border: 1px solid transparent; border-radius: 9px; font-weight: 650; line-height: 1.3; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #1a3e9f; }
.secondary { background: white; color: var(--ink); border-color: var(--border); }
.secondary:hover { background: #edf2fc; }
.soft { background: #edf2ff; color: #2148b2; }
.soft:hover { background: #e0e9ff; }
.icon-button { min-width: 43px; padding: .5rem; }
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: 256px; display: flex; align-items: center; padding: clamp(1.5rem, 4vw, 3.3rem); border-radius: 19px; color: white; background: var(--blue-gradient); }
.hero-copy { z-index: 1; max-width: 550px; }
h1 { font-size: clamp(2rem, 3.9vw, 3.25rem); line-height: 1.13; letter-spacing: -.055em; }
.hero p { margin-top: .85rem; color: #e0e9ff; max-width: 33rem; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 42%; pointer-events: none; background-image: radial-gradient(#b5cbff35 1px, transparent 1px); background-size: 17px 17px; mask-image: linear-gradient(to right, transparent 0%, black 29%); }
.orbit { position: absolute; width: 285px; height: 285px; border: 1px solid #acc4ff55; border-radius: 50%; top: 50%; left: 59%; transform: translate(-50%, -50%); box-shadow: 0 0 0 23px #acc4ff16, inset 0 0 0 18px #acc4ff13; }
.paper { width: 120px; height: 154px; border-radius: 13px; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%) rotate(12deg); display: grid; align-content: center; gap: 11px; background: #f1f6ff; padding: 18px; box-shadow: 0 16px 32px #102e6270; }
.paper.back { transform: translate(-71%, -47%) rotate(-11deg); background: #83a6ff; }
.paper b { height: 9px; width: 42px; border-radius: 6px; background: #5175cb; margin-bottom: 1px; }
.paper i { height: 12px; border-left: 12px solid #7898ed; border-radius: 3px; background: linear-gradient(#b8c9ef,#b8c9ef) 9px center / 50px 4px no-repeat; }
.paper i:nth-of-type(2) { border-color: #315ecb; }
.clock-art { position: absolute; left: 65%; top: 56%; width: 62px; height: 62px; border-radius: 50%; border: 5px solid #f3f7ff; color: white; background: #2753c7; display: grid; place-items: center; box-shadow: 0 9px 20px #112a6260; }
.clock-art .icon { width: 33px; height: 33px; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.15rem 0 2rem; }
.stat, .card, .panel { border: 1px solid var(--border); border-radius: 14px; background: white; }
.stat { padding: .95rem 1rem; display: flex; align-items: center; gap: .8rem; }
.tile { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; color: #244fc2; background: #ebf1ff; flex: none; }
.tile.teal { color: #006963; background: #ddf7f0; }
.tile.purple { color: #6944b3; background: #f0eaff; }
.stat strong { display: block; font-size: 1.29rem; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .85rem; margin-bottom: 1rem; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); letter-spacing: -.035em; }
.search { display: flex; align-items: center; gap: .5rem; padding: 0 .7rem; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--muted); }
.search:focus-within { outline: 2px solid #5679e1; }
.search input { width: min(28vw, 185px); padding: .5rem 0; border: none; color: var(--ink); background: transparent; outline: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.15rem; min-width: 0; display: flex; flex-direction: column; gap: .85rem; }
.card-top, .card-bottom { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.card h3 { font-size: 1.2rem; overflow-wrap: anywhere; }
.card .topic { overflow-wrap: anywhere; }
.tag { color: #495d7a; border: 1px solid var(--border); border-radius: 20px; padding: .2rem .55rem; font-size: .81rem; text-align: center; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--muted); font-size: .875rem; }
.meta span { display: inline-flex; align-items: center; gap: .36rem; }
.meta .icon { height: 1rem; width: 1rem; }
.card-bottom { flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: .85rem; margin-top: auto; }
.panel { padding: clamp(1rem, 2.5vw, 1.6rem); }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 265px); gap: 1rem; align-items: start; }
.time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.4rem; color: #2048ad; }
.time.urgent, .error { color: #a51c31; }
.question-text, .choice { white-space: pre-wrap; overflow-wrap: anywhere; }
.question-text { font-size: 1.17rem; font-weight: 650; }
.choice { display: flex; gap: .7rem; align-items: center; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 10px; }
label.choice { cursor: pointer; }
label.choice:hover, .choice:has(input:checked) { border-color: #7898ed; background: #edf2ff; }
.choice input { accent-color: var(--blue); margin: 0; flex: none; }
.choice.correct { border-color: #56a98f; background: #ebfaf3; }
.choice.wrong { border-color: #d17a86; background: #fff1f3; }
.letter { font-weight: 700; color: var(--blue); }
.choice-list { display: grid; gap: .55rem; }
.jump-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .35rem; }
.jump-grid button { padding: .35rem .1rem; min-width: 0; border: 1px solid var(--border); border-radius: 7px; color: var(--ink); background: white; }
.jump-grid button.answered { background: #eaf0ff; color: var(--blue); }
.jump-grid button[aria-current] { background: var(--blue); color: white; }
.score { color: var(--blue); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 750; line-height: 1.1; }
dialog { width: min(100% - 2rem, 630px); max-height: 90dvh; padding: 1.3rem; border: 1px solid var(--border); border-radius: 16px; color: var(--ink); box-shadow: 0 20px 70px #142d6440; }
dialog::backdrop { background: #0f204966; }
form .field { display: grid; gap: .35rem; font-weight: 600; }
input:not([type=radio], [type=search]), select { min-width: 0; width: 100%; padding: .55rem .7rem; border: 1px solid #cbd7ea; border-radius: 8px; background: white; color: var(--ink); }
select { appearance: none; padding-right: 2.2rem; background: linear-gradient(45deg, transparent 50%, #516583 50%) right 17px center / 6px 6px no-repeat, linear-gradient(135deg, #516583 50%, transparent 50%) right 11px center / 6px 6px no-repeat, white; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(7rem, 30%); gap: .8rem; }
.import-question { padding-top: .75rem; border-top: 1px solid var(--border); }
.import-question ol { margin: .4rem 0 .6rem; padding-left: 1.6rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 3; bottom: 1.1rem; right: 1.1rem; max-width: calc(100% - 2.2rem); padding: .75rem 1rem; border-radius: 9px; background: #142d64; color: white; box-shadow: 0 8px 24px #142d6440; }
@media (max-width: 1100px) {
  .sidebar { width: 188px; }
  .shell { margin-left: 188px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .sidebar { position: static; width: auto; height: auto; padding: .65rem 1rem; flex-direction: row; align-items: center; justify-content: space-between; gap: .4rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { display: flex; gap: .1rem; margin: 0; }
  .sidebar nav a { gap: .3rem; padding: .5rem; }
  .sidebar-note { display: none; }
  .shell { margin-left: 0; }
  .hero-copy { max-width: 69%; }
}
@media (max-width: 560px) {
  .brand { padding: 0; gap: .4rem; font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .sidebar nav a { font-size: .82rem; }
  .sidebar nav a [data-icon] { display: none; }
  .topbar { min-height: auto; }
  main { padding-top: 1rem; }
  .hero { min-height: 190px; padding: 1.3rem; }
  .hero-art { opacity: .35; }
  .hero-copy { max-width: 100%; }
  .summary { gap: .4rem; }
  .stat { display: grid; gap: .45rem; padding: .6rem; }
  .stat .tile { width: 34px; height: 34px; }
  .section-head { align-items: stretch; flex-direction: column; }
  .search input { width: 100%; }
  .grid, .exam-layout { grid-template-columns: 1fr; }
}
