:root {
  color-scheme: light;
  --ink: #14233c;
  --muted: #4e607a;
  --brand: #284fc1;
  --brand-dark: #1b3b9d;
  --line: #dce4ef;
  --paper: #fff;
  --wash: #f5f7fb;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wash);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 3px solid #426be2; }
main:focus, .decision:focus { outline: none; }
h1, h2, h3, p { margin: 0 0 .65em; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.03em; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.17rem; }
p { color: var(--muted); }
.skip { position: fixed; z-index: 5; top: 12px; left: 12px; background: white; padding: 10px; transform: translateY(-160%); }
.skip:focus { transform: none; }
.wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, .header-inner nav, .workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-inner { min-height: 75px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: 760; letter-spacing: -.045em; white-space: nowrap; }
.brand > span:last-child { color: var(--brand); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 9px; background: #203762; color: white; font-size: 1rem; }
.nav-link, .text-link { font-weight: 650; text-decoration: none; }
.nav-link:hover, .text-link:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; min-height: 45px; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; background: var(--brand); color: white; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--brand-dark); }
.button:disabled { opacity: .55; cursor: wait; }
.button.secondary { border-color: var(--line); background: var(--paper); color: var(--ink); }
.button.secondary:hover { background: #eaf0fe; border-color: #bdcdee; }
.hero { display: grid; grid-template-columns: 1.23fr .87fr; align-items: center; gap: clamp(26px, 5vw, 76px); padding: 75px 0 63px; }
.hero h1 { font-size: clamp(2.7rem, 5.1vw, 4.55rem); letter-spacing: -.065em; margin: 0 0 20px; }
.hero h1 em { display: block; color: var(--brand); font-style: normal; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--brand-dark); font-size: .75rem; font-weight: 750; letter-spacing: .085em; }
.eyebrow span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #557eec; }
.hero-copy { max-width: 53ch; font-size: 1.11rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.actions.spread { justify-content: space-between; }
.hero-note, .field-hint { margin-top: 10px; font-size: .88rem; }
.hero-visual { min-width: 0; padding: clamp(22px, 3.1vw, 40px); border-radius: 20px; color: white; background: radial-gradient(ellipse at top right, #37568b 0%, #1f3459 49%, #172943 100%); box-shadow: 0 20px 42px #12254a29; }
.visual-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.visual-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #c8d6ff; background: #ffffff18; font-size: 1.5rem; }
.visual-label { font-size: .85rem; color: #e0e9ff; }
.hero-visual h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); }
.visual-steps { list-style: none; padding: 0; margin: 24px 0 0; }
.visual-steps li { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 8px 0; border: 1px solid #ffffff29; border-radius: 9px; background: #ffffff0c; }
.visual-steps span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 6px; background: #ffffff18; color: #dfe8ff; }
.features { padding-bottom: 40px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { min-width: 0; padding: clamp(17px, 2.6vw, 28px); background: var(--paper); border: 1px solid var(--line); border-radius: 13px; overflow-wrap: anywhere; }
.panel + .panel { margin-top: 16px; }
.feature-grid .panel { margin-top: 0; }
.feature { display: flex; flex-direction: column; align-items: start; }
.feature .text-link { margin-top: auto; padding-top: 6px; }
.feature-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; background: #eaf0fe; color: var(--brand); border-radius: 10px; font-size: 1.35rem; }
.mission { padding: 25px 0; border-top: 1px solid var(--line); }
.footer { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .87rem; }
.dashboard { display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; align-self: start; min-height: 100vh; max-height: 100vh; overflow: auto; padding: 23px 16px 14px; background: var(--paper); border-right: 1px solid var(--line); }
.sidebar .brand { margin: 0 9px 25px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; min-height: 41px; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; line-height: 1.3; color: var(--muted); font-size: .91rem; font-weight: 600; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: var(--brand-dark); background: #eaf0fe; }
.sidebar nav span { flex: 0 0 18px; text-align: center; font-size: 1.05rem; color: var(--brand); }
.sidebar-footer { margin-top: auto; padding: 20px 9px 4px; color: var(--muted); font-size: .8rem; }
.menu-toggle { display: none; }
.workspace { width: min(100%, 1070px); padding: 23px clamp(20px, 4vw, 60px) 60px; }
.workspace-top { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 27px; color: var(--muted); font-size: .9rem; }
.quiz { max-width: 770px; padding: 38px 0 65px; }
.quiz-panel { margin-top: 15px; }
.notice { padding: 13px 15px; background: #eaf0fe; border: 1px solid #d2dfff; border-radius: 9px; color: #293f69; margin-bottom: 18px; }
label { display: block; font-weight: 650; }
select, textarea, .context-input { display: block; width: 100%; border: 1px solid #a7b6cd; border-radius: 8px; padding: 10px 12px; margin: 6px 0 15px; background: white; color: var(--ink); }
.context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
textarea { resize: vertical; }
fieldset { padding: 0; margin: 18px 0 0; border: 0; min-width: 0; }
legend { font-weight: 720; line-height: 1.3; font-size: clamp(1.12rem, 3.5vw, 1.42rem); margin-bottom: 13px; }
.option { display: flex; align-items: start; gap: 10px; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; font-weight: 500; cursor: pointer; }
.option:hover, .option:has(input:checked) { background: #eaf0fe; border-color: #9fb6f4; }
.option input { margin: .35em 0 0; accent-color: var(--brand); flex-shrink: 0; }
.progress-meta, .score-row > div { display: flex; justify-content: space-between; gap: 12px; }
.progress-meta { color: var(--muted); font-size: .91rem; }
progress, meter { display: block; width: 100%; height: 12px; accent-color: var(--brand); }
progress { margin-top: 7px; }
meter::-webkit-meter-optimum-value { background: var(--brand); }
.score-row { margin: 15px 0; }
.score-row span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.profile-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.score-total strong, .score-total span { display: block; }
.score-total strong { color: var(--brand); font-size: 2rem; }
.score-total span { color: var(--muted); }
.practice, .decision ol { padding-inline-start: 22px; }
.practice li, .decision li { margin-bottom: 8px; }
.library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
details { border-top: 1px solid var(--line); padding: 10px 0 3px; margin-top: 8px; }
summary { color: var(--brand-dark); cursor: pointer; font-weight: 650; }
details p { margin: 8px 0; }
.user-text { white-space: pre-wrap; }
dt { font-weight: 650; }
dd { margin: 0 0 10px; color: var(--muted); }
@media (max-width: 820px) {
  .hero { padding-top: 44px; grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .dashboard { display: block; }
  .sidebar { position: static; min-height: 0; max-height: none; padding: 12px 20px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0; }
  .sidebar-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .sidebar nav, .sidebar-footer { display: none; }
  .sidebar nav.open { display: grid; margin-top: 10px; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .feature-grid, .library-grid, .context-grid { grid-template-columns: 1fr; }
  .header-inner { min-height: 62px; gap: 8px; }
  .header-inner nav .nav-link { display: none; }
  .header-inner .button { font-size: .84rem; padding-inline: 9px; min-height: 40px; }
  .hero .actions .button { width: 100%; }
  .quiz .actions.spread { align-items: stretch; }
  .quiz .actions.spread .button { flex-grow: 1; }
}
