:root {
  color-scheme: dark;
  --bg: #121518;
  --surface: #191d21;
  --surface-2: #20252a;
  --surface-3: #15191d;
  --text: #d7dde4;
  --muted: #aeb7c0;
  --line: #343b43;
  --line-soft: #2a3036;
  --brand: #9273e0;
  --brand-2: #e3e8ee;
  --accent-green: #8ba891;
  --accent-coral: #b8948e;
  --accent-sky: #8fa6b7;
  --danger: #c79a96;
  --success: #8ba891;
  --warn: #d9bf7a;
  --radius: 10px;
  --shadow: 0 10px 28px #01040938;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.62;
}

a {
  color: var(--brand-2);
}

a:hover {
  color: #ffffff;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  color: #d8d3c7;
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.55rem, 2vw, 2.15rem);
}

h2 {
  font-size: clamp(1.08rem, 1.3vw, 1.35rem);
}

h3 {
  color: #b9c1c9;
  font-size: 1rem;
}

p {
  margin: 0.45rem 0 0;
}

ul,
ol {
  margin: 0.6rem 0 0;
  padding-left: 1.25rem;
}

li {
  margin: 0.38rem 0;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  border: 1px solid #493d72;
  border-radius: 0.5rem;
  background: #211b32;
  color: #efe9ff;
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  background: #121518ed;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  background: #2a2142;
  color: #efe9ff;
  font-weight: 900;
}

.brand strong {
  font-size: 0.95rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.5rem;
  color: #d5c9ff;
  padding: 0.42rem 0.55rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
nav a[aria-current="page"] {
  background: var(--surface-2);
}

.shell {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
}

.page-title {
  padding: 1.35rem 0 0.75rem;
}

.page-title p:not(.eyebrow) {
  max-width: 82ch;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 900;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 1rem;
  padding: 1.35rem 0;
}

.panel,
.card,
.question,
.source-panel,
.lesson-row,
.flash,
.hero > div,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: 1.15rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats,
.cards,
.domain-grid,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0;
}

.stat,
.mini {
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.85rem;
}

.stat:nth-child(4n + 2) {
  border-top-color: var(--accent-green);
}

.stat:nth-child(4n + 3) {
  border-top-color: var(--accent-coral);
}

.stat:nth-child(4n) {
  border-top-color: var(--accent-sky);
}

.stat strong,
.mini strong {
  display: block;
  color: #f4f0ff;
  font-size: 1.45rem;
}

.muted,
.card p,
.panel p,
.lesson-row p {
  color: var(--muted);
}

.toolbar,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.button,
button.option,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3b444d;
  border-radius: 0.55rem;
  background: var(--surface-2);
  color: #d5c9ff;
  padding: 0.62rem 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.button.primary {
  border-color: #5f4aa0;
  background: #2d2347;
  color: #efe9ff;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"] {
  border-color: var(--brand);
  background: #252b31;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid #3d3928;
  border-radius: 4px;
  background: #1f1e19;
  color: #d9bf7a;
  padding: 0.22rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 650;
}

.badge.level-a {
  border-color: #495a4d;
  color: #dce7dd;
  background: #1b271f;
}

.badge.level-aa {
  border-color: #51456f;
  color: #e2d8ff;
  background: #1d1b24;
}

.badge.level-aaa {
  border-color: #604b49;
  color: #ead6d4;
  background: #2a2020;
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.2rem;
  align-items: start;
}

.guided-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.2rem;
  align-items: start;
}

.guided-card {
  min-height: 26rem;
}

.guided-toolbar {
  justify-content: space-between;
  margin-top: 0;
}

.guided-big {
  max-width: 62ch;
  color: #f1eef8;
  font-size: clamp(1.12rem, 1.7vw, 1.45rem);
  line-height: 1.65;
}

.source-panel {
  position: sticky;
  top: 5rem;
}

.source-panel a {
  display: block;
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
  color: var(--brand-2);
  text-decoration: none;
}

.lesson-list {
  display: grid;
  gap: 0.6rem;
}

.lesson-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.78rem;
  text-decoration: none;
  color: inherit;
}

.lesson-row:hover,
.lesson-row:focus-visible {
  border-color: #5b6470;
  background: #1d2227;
}

.lesson-row h2 {
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
}

details.card,
details.panel {
  padding: 0;
}

details.card > summary,
details.panel > summary {
  display: grid;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 1rem;
  cursor: pointer;
}

details.card > summary strong,
details.panel > summary strong {
  color: #f4f0ff;
  font-size: 1.05rem;
}

details.card[open] > summary,
details.panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

details.card > :not(summary),
details.panel > :not(summary) {
  margin-left: 1rem;
  margin-right: 1rem;
}

details.card > :last-child,
details.panel > :last-child {
  margin-bottom: 1rem;
}

.tutorial-card {
  border-left: 4px solid var(--brand);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #3b444d;
  border-radius: 0.6rem;
  background: #171b1f;
  padding: 0.65rem 0.8rem;
}

.search input,
select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
}

select {
  width: auto;
  border: 1px solid #3b444d;
  border-radius: 0.55rem;
  background: #171b1f;
  padding: 0.62rem 0.78rem;
}

.plain-box,
.example-box,
.trap-box {
  margin: 1rem 0;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #171b1f;
  padding: 1rem;
}

.example-box {
  border-left-color: var(--accent-green);
}

.trap-box {
  border-left-color: var(--accent-coral);
}

.question {
  margin: 1rem 0 1.2rem;
  border-left: 4px solid var(--brand);
}

.question h2 {
  color: #f4f0ff;
  font-size: 1.03rem;
  font-weight: 600;
}

.options-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

button.option {
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  min-height: 3.1rem;
  color: #dbe1e7;
  background: #20252a;
  line-height: 1.55;
  text-align: left;
}

.option.correct {
  border-color: #4b5e50;
  background: #1b271f;
  color: #dce8df;
}

.option.wrong {
  border-color: #604b49;
  background: #2a2020;
  color: #ead6d4;
}

.feedback {
  margin-top: 0.8rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.progress {
  height: 0.85rem;
  margin: 0.8rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.table-wrap {
  margin: 1rem 0;
  padding: 0.75rem;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: #f4f0ff;
}

footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

@media (width <= 900px) {
  .topbar {
    display: block;
    padding: 0.65rem 0.75rem 0.55rem;
  }

  .brand {
    margin-bottom: 0.55rem;
  }

  nav {
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow: auto hidden;
    padding-bottom: 0.25rem;
  }

  nav a {
    flex: none;
    padding: 0.48rem 0.62rem;
    font-size: 0.86rem;
  }

  .shell {
    width: min(100% - 1rem, 1120px);
  }

  .hero,
  .grid.two,
  .lesson-layout,
  .guided-wrap {
    display: block;
  }

  .source-panel {
    position: static;
  }

  .toolbar,
  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .button,
  button.option,
  select {
    width: 100%;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr,
  td {
    display: block;
  }

  tr {
    margin-bottom: 0.7rem;
    border: 1px solid var(--line);
  }

  td {
    border: 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }
}

/* Serious accessibility-focused UI refinement */
:root {
  --bg: #101316;
  --surface: #181c20;
  --surface-2: #20262c;
  --surface-3: #13171b;
  --text: #e3e8ee;
  --muted: #b5bec8;
  --line: #38414a;
  --line-soft: #2c333a;
  --brand: #9273e0;
  --brand-2: #e3e8ee;
  --focus-ring: #ffffff;
  --radius: 8px;
  --shadow: none;
}

body {
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

.topbar {
  border-bottom-color: #303842;
  background: #101316f2;
}

.brand-logo {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #5d4c91;
  border-radius: 8px;
  background: #211b31;
  color: #ffffff;
  letter-spacing: 0;
}

nav {
  gap: 0.25rem;
}

nav a {
  min-height: 2.5rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #dfe5ec;
  padding: 0.48rem 0.7rem;
  font-weight: 650;
}

nav a:hover,
nav a:focus-visible {
  border-color: #4a5561;
  background: #1d2329;
}

nav a[aria-current="page"] {
  border-color: #6f58b0;
  background: #241d35;
  color: #ffffff;
}

.shell {
  width: min(1080px, 100% - 2rem);
}

.panel,
.card,
.question,
.source-panel,
.lesson-row,
.hero > div,
.table-wrap,
.stat,
.mini {
  border-color: #35404a;
  border-radius: 8px;
  background: #181c20;
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: clamp(1rem, 1.5vw, 1.35rem);
}

.button,
button.option,
.segmented button {
  min-height: 2.75rem;
  border-color: #4a5561;
  border-radius: 7px;
  background: #20262c;
  color: #ffffff;
  padding: 0.68rem 0.95rem;
  font-weight: 650;
  line-height: 1.25;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.button.primary {
  border-color: #8065cf;
  background: #30244d;
  color: #ffffff;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"] {
  border-color: #9273e0;
  background: #292f36;
}

.button.primary:hover {
  background: #3a2b5f;
}

.button:disabled,
button.option:disabled {
  cursor: not-allowed;
  opacity: 0.82;
}

.badge,
.meta-tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 1.75rem;
  border: 1px solid #4a5561;
  border-radius: 6px;
  background: #20262c;
  color: #e3e8ee;
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: normal;
}

.badge.level-a,
.badge.level-aa,
.badge.level-aaa {
  background: #20262c;
}

.badge.level-a {
  border-color: #55715c;
  color: #dcebdd;
}

.badge.level-aa {
  border-color: #705ca6;
  color: #e7ddff;
}

.badge.level-aaa {
  border-color: #86615c;
  color: #f1d9d6;
}

.guided-wrap {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
}

.guided-card {
  border-top: 4px solid #9273e0;
  min-height: 0;
  padding: clamp(1.1rem, 2vw, 1.65rem);
}

.guided-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  margin: 0 0 0.9rem;
}

.guided-big {
  max-width: 58ch;
  margin-top: 0.8rem;
  color: #f2f4f7;
  font-size: clamp(1.18rem, 1.6vw, 1.38rem);
  line-height: 1.75;
}

.guided-card .actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.progress {
  height: 0.7rem;
  border-color: #414b56;
  border-radius: 4px;
  background: #11161b;
}

.progress span {
  border-radius: inherit;
  background: #9273e0;
}

.plain-box,
.example-box,
.trap-box {
  border-color: #39434d;
  border-left-width: 3px;
  border-radius: 8px;
  background: #151a1f;
}

.example-box {
  border-left-color: #7fa989;
}

.trap-box {
  border-left-color: #b8948e;
}

details.card,
details.panel {
  border-radius: 8px;
  overflow: clip;
}

details.card > summary,
details.panel > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  color: #e3e8ee;
}

details.card > summary::marker,
details.panel > summary::marker {
  color: #e3e8ee;
}

details.card > summary strong,
details.panel > summary strong {
  color: #f2f4f7;
  font-size: 1rem;
}

.tutorial-card {
  border-left: 0;
  border-top: 3px solid #9273e0;
}

.lesson-row {
  border-left: 3px solid transparent;
}

.lesson-row:hover,
.lesson-row:focus-visible {
  border-left-color: #9273e0;
  border-color: #4b5661;
}

button.option {
  display: grid;
  gap: 0.25rem;
  border-radius: 8px;
}

.option.correct {
  border-color: #608068;
  background: #17251c;
}

.option.wrong {
  border-color: #8b625d;
  background: #281c1d;
}

.search {
  border-radius: 8px;
}

input,
select {
  min-height: 2.5rem;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (width <= 900px) {
  .shell {
    width: min(100% - 1rem, 1080px);
  }

  nav a {
    min-height: 2.65rem;
  }

  .guided-card .actions {
    grid-template-columns: 1fr;
  }
}

/* Solid brand pass: no lavender tint, no pill-shaped labels */
:root {
  --brand: #9273e0;
  --brand-2: #e3e8ee;
  --focus-ring: #ffffff;
  --link: #b7c9df;
  --link-hover: #ffffff;
  --label-bg: #14191e;
  --label-border: #404b56;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

.brand-logo {
  border-color: #9273e0;
  background: #191f25;
  color: #ffffff;
}

nav a {
  border-radius: 4px;
  color: #dfe5ec;
}

nav a:hover,
nav a:focus-visible {
  border-color: #596674;
  background: #1e252c;
  color: #ffffff;
}

nav a[aria-current="page"] {
  border-color: #9273e0;
  background: #241f32;
  color: #ffffff;
}

.eyebrow {
  color: #dfe5ec;
}

.button,
button.option,
.segmented button {
  border-radius: 4px;
  border-color: #566270;
  background: #1d242b;
  color: #ffffff;
}

.button.primary {
  border-color: #9273e0;
  background: #332852;
  color: #ffffff;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"] {
  border-color: #9273e0;
  background: #252d35;
  color: #ffffff;
}

.button.primary:hover {
  background: #3d3062;
}

.badge,
.meta-tag {
  min-height: 1.85rem;
  border: 1px solid var(--label-border);
  border-left: 3px solid #9273e0;
  border-radius: 4px;
  background: var(--label-bg);
  color: #e3e8ee;
  padding: 0.28rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.25;
  text-transform: none;
}

.badge.level-a {
  border-color: #4f6255;
  border-left-color: #7fa989;
  color: #e3e8ee;
  background: var(--label-bg);
}

.badge.level-aa {
  border-color: #5c4d86;
  border-left-color: #9273e0;
  color: #e3e8ee;
  background: var(--label-bg);
}

.badge.level-aaa {
  border-color: #6e5552;
  border-left-color: #b8948e;
  color: #e3e8ee;
  background: var(--label-bg);
}

.progress {
  border-radius: 4px;
}

.progress span {
  border-radius: 3px;
  background: #9273e0;
}

details.card > summary::marker,
details.panel > summary::marker {
  color: #e3e8ee;
}

.source-panel a,
.sources-inline a {
  color: var(--link);
}

.source-panel a:hover,
.sources-inline a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline-color: #ffffff;
}

/* High-contrast learning-card redesign */
:root {
  --bg: #090b0f;
  --surface: #f6f7fb;
  --surface-2: #ffffff;
  --surface-3: #eef1f7;
  --text: #111827;
  --muted: #4b5563;
  --line: #cfd6e1;
  --line-soft: #dce2ea;
  --brand: #9273e0;
  --brand-strong: #5b3ab7;
  --brand-dark: #241a3f;
  --label-bg: #f0eefb;
  --label-border: #9273e0;
}

body {
  background: var(--bg);
  color: #eef2f7;
}

.topbar {
  border-bottom: 1px solid #1f2937;
  background: #090b0ff5;
}

.brand,
.brand strong {
  color: #ffffff;
}

.brand-logo {
  border: 2px solid #9273e0;
  background: #9273e0;
  color: #ffffff;
}

nav a {
  border-radius: 3px;
  color: #ffffff;
}

nav a[aria-current="page"] {
  border-color: #9273e0;
  background: #5b3ab7;
  color: #ffffff;
}

.page-title {
  color: #eef2f7;
}

.page-title h1,
.page-title h2,
.page-title h3 {
  color: #ffffff;
}

.page-title p:not(.eyebrow) {
  color: #d1d8e2;
}

.eyebrow {
  color: #f5f7fb;
}

.panel,
.card,
.question,
.source-panel,
.lesson-row,
.hero > div,
.table-wrap,
.stat,
.mini,
details.card,
details.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.panel h1,
.panel h2,
.panel h3,
.card h1,
.card h2,
.card h3,
.question h1,
.question h2,
.question h3,
.source-panel h1,
.source-panel h2,
.source-panel h3,
.lesson-row h1,
.lesson-row h2,
.lesson-row h3,
.hero > div h1,
.hero > div h2,
.hero > div h3,
.stat strong,
.mini strong {
  color: #111827;
}

.muted,
.card p,
.panel p,
.lesson-row p,
.source-panel p,
.mini span {
  color: var(--muted);
}

.guided-card {
  border-top: 8px solid var(--brand);
  background: #ffffff;
}

.guided-big {
  color: #111827;
  font-size: clamp(1.22rem, 1.7vw, 1.48rem);
  font-weight: 500;
}

.source-panel {
  background: #ffffff;
}

.plain-box,
.example-box,
.trap-box {
  border: 1px solid #d7dde6;
  border-left: 5px solid var(--brand);
  background: #f8fafc;
  color: #111827;
}

.example-box {
  border-left-color: #2f7d4f;
}

.trap-box {
  border-left-color: #a15c4f;
}

.button,
button.option,
.segmented button {
  min-height: 2.9rem;
  border: 2px solid #667085;
  border-radius: 4px;
  background: #ffffff;
  color: #111827;
  font-weight: 750;
}

.button.primary {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #ffffff;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"] {
  border-color: var(--brand-strong);
  background: #f0eefb;
  color: #111827;
}

.button.primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #ffffff;
}

.badge,
.meta-tag {
  border: 1px solid var(--label-border);
  border-left: 5px solid var(--brand);
  border-radius: 3px;
  background: var(--label-bg);
  color: #111827;
}

.badge.level-a {
  border-color: #2f7d4f;
  border-left-color: #2f7d4f;
}

.badge.level-aa {
  border-color: #5b3ab7;
  border-left-color: #5b3ab7;
}

.badge.level-aaa {
  border-color: #a15c4f;
  border-left-color: #a15c4f;
}

.progress {
  border: 1px solid #8b95a5;
  background: #e5e7eb;
}

.progress span {
  background: var(--brand-strong);
}

.source-panel a,
.sources-inline a,
.panel a,
.card a {
  color: #4c2ba8;
}

.source-panel a:hover,
.sources-inline a:hover,
.panel a:hover,
.card a:hover {
  color: #241a3f;
}

.lesson-row:hover,
.lesson-row:focus-visible,
.card:hover {
  border-color: var(--brand);
  background: #ffffff;
}

details.card > summary,
details.panel > summary {
  color: #111827;
}

details.card > summary strong,
details.panel > summary strong {
  color: #111827;
}

table,
th,
td {
  color: #111827;
}

th {
  background: #eef1f7;
}

input,
select {
  color: #111827;
  background: #ffffff;
}

.search {
  background: #ffffff;
  color: #111827;
}

:focus-visible {
  outline: 4px solid #111827;
  outline-offset: 3px;
}

footer {
  border-top-color: #374151;
  color: #f5f7fb;
}

/* Muted professional study-guide theme */
:root {
  --bg: #111418;
  --surface: #1a1f25;
  --surface-2: #20262d;
  --surface-3: #171b20;
  --text: #e2e7ee;
  --muted: #aab4c0;
  --line: #343d47;
  --line-soft: #2a3139;
  --brand: #9273e0;
  --brand-strong: #7c61c6;
  --brand-dark: #32264f;
  --label-bg: #20262d;
  --label-border: #4b5563;
}

body {
  background: var(--bg);
  color: var(--text);
}

.topbar {
  border-bottom: 1px solid #2a3139;
  background: #111418f2;
}

.brand {
  gap: 0.65rem;
}

.brand,
.brand strong {
  color: #f1f4f8;
}

.brand-logo {
  width: auto;
  height: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f1f4f8;
  font-weight: 800;
  letter-spacing: 0.02em;
}

nav a {
  border-radius: 4px;
  color: #d7dee7;
}

nav a:hover,
nav a:focus-visible {
  border-color: #4b5563;
  background: #20262d;
  color: #ffffff;
}

nav a[aria-current="page"] {
  border-color: #7c61c6;
  background: #251f33;
  color: #ffffff;
}

.page-title,
.page-title h1,
.page-title h2,
.page-title h3 {
  color: #f1f4f8;
}

.page-title p:not(.eyebrow) {
  color: #c3ccd6;
}

.eyebrow {
  color: #c8b9f3;
}

.panel,
.card,
.question,
.source-panel,
.lesson-row,
.hero > div,
.table-wrap,
.stat,
.mini,
details.card,
details.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.panel h1,
.panel h2,
.panel h3,
.card h1,
.card h2,
.card h3,
.question h1,
.question h2,
.question h3,
.source-panel h1,
.source-panel h2,
.source-panel h3,
.lesson-row h1,
.lesson-row h2,
.lesson-row h3,
.hero > div h1,
.hero > div h2,
.hero > div h3,
.stat strong,
.mini strong {
  color: #f1f4f8;
}

.muted,
.card p,
.panel p,
.lesson-row p,
.source-panel p,
.mini span {
  color: var(--muted);
}

.guided-card {
  border-top: 4px solid var(--brand);
  background: var(--surface);
}

.guided-big {
  color: #f1f4f8;
  font-size: clamp(1.12rem, 1.5vw, 1.3rem);
  font-weight: 500;
}

.source-panel {
  background: var(--surface);
}

.plain-box,
.example-box,
.trap-box {
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--brand);
  background: var(--surface-3);
  color: var(--text);
}

.example-box {
  border-left-color: #7f9b83;
}

.trap-box {
  border-left-color: #a98d86;
}

.button,
button.option,
.segmented button {
  min-height: 2.8rem;
  border: 1px solid #56616e;
  border-radius: 4px;
  background: var(--surface-2);
  color: #f1f4f8;
  font-weight: 650;
}

.button.primary {
  border-color: var(--brand-strong);
  background: var(--brand-dark);
  color: #ffffff;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"] {
  border-color: var(--brand);
  background: #262d35;
  color: #ffffff;
}

.button.primary:hover {
  border-color: var(--brand);
  background: #3b2c61;
}

.badge,
.meta-tag {
  border: 1px solid var(--label-border);
  border-left: 4px solid var(--brand);
  border-radius: 4px;
  background: var(--label-bg);
  color: #e2e7ee;
}

.badge.level-a {
  border-color: #526756;
  border-left-color: #7f9b83;
}

.badge.level-aa {
  border-color: #66558e;
  border-left-color: var(--brand);
}

.badge.level-aaa {
  border-color: #745d58;
  border-left-color: #a98d86;
}

.progress {
  border: 1px solid #4b5563;
  background: #15191e;
}

.progress span {
  background: var(--brand);
}

.source-panel a,
.sources-inline a,
.panel a,
.card a,
td a {
  color: #c8b9f3;
}

.source-panel a:hover,
.sources-inline a:hover,
.panel a:hover,
.card a:hover,
td a:hover {
  color: #ffffff;
}

.lesson-row:hover,
.lesson-row:focus-visible,
.card:hover {
  border-color: #5f6a76;
  background: #1d232a;
}

details.card > summary,
details.panel > summary,
details.card > summary strong,
details.panel > summary strong {
  color: #f1f4f8;
}

table,
th,
td {
  color: #e2e7ee;
}

th {
  background: #20262d;
}

input,
select {
  color: #f1f4f8;
  background: #15191e;
}

.search {
  background: #15191e;
  color: #f1f4f8;
}

.site-footer {
  border-top: 1px solid #2a3139;
  background: #0e1115;
  color: #c3ccd6;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}

.footer-inner p {
  max-width: 72ch;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  border: 1px solid #3b4652;
  border-radius: 4px;
  background: #15191e;
  color: #e2e7ee;
  padding: 0.5rem 0.7rem;
  font-weight: 650;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  border-color: var(--brand);
  color: #ffffff;
}

.footer-links svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

.tutorial-dashboard {
  display: grid;
  gap: 1rem;
  border-top: 4px solid var(--brand);
}

.tutorial-controls {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(12rem, auto) auto;
  gap: 0.75rem;
  align-items: end;
}

.tutorial-controls label {
  display: grid;
  gap: 0.35rem;
}

.tutorial-search {
  display: grid;
  border-color: var(--line);
}

.tutorial-search.is-active {
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface-3);
  padding: 0.7rem 0.8rem;
  color: var(--muted);
}

.result-summary strong {
  color: var(--text);
}

.result-summary.is-filtering {
  border-color: var(--brand);
}

.tutorial-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.tutorial-result {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.tutorial-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tutorial-meta {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.tutorial-meta div {
  display: grid;
  gap: 0.15rem;
}

.tutorial-meta dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.tutorial-meta dd {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-list span {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  font-size: 0.82rem;
}

.tutorial-details {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface-3);
  padding: 0.75rem;
}

.tutorial-details summary {
  cursor: pointer;
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: left;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 0;
}

.pagination ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination-page {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid #56616e;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.pagination-page[aria-current="page"] {
  border-color: var(--brand);
  background: var(--brand-dark);
  color: #ffffff;
}

:focus-visible {
  outline: 3px solid #f1f4f8;
  outline-offset: 3px;
}

@media (width <= 900px) {
  .footer-inner {
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .tutorial-controls {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: flex-start;
  }
}

/* Site-wide learning dashboard system. This final layer replaces earlier experiments. */
:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --surface-3: #eef4ff;
  --text: #172033;
  --muted: #5b6475;
  --muted-2: #6b7280;
  --line: #dde3ee;
  --line-soft: #e8edf5;
  --brand: #2557d6;
  --brand-dark: #1d46ad;
  --accent-teal: #0f766e;
  --success: #047857;
  --warn: #b45309;
  --danger: #b42318;
  --focus: #1a73e8;
  --radius: 8px;
  --shadow: 0 12px 28px rgb(23 32 51 / 8%);
}

html {
  scroll-padding-top: 5rem;
}

body {
  background:
    linear-gradient(180deg, #eef4ff 0, #f7f9fc 17rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-dark);
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 760;
  letter-spacing: 0;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  color: var(--text);
  font-size: 1rem;
}

p,
li,
dd {
  color: var(--muted);
}

strong {
  color: var(--text);
}

.skip-link {
  border: 2px solid var(--focus);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 95%);
  box-shadow: 0 1px 0 rgb(23 32 51 / 4%);
}

.brand {
  color: var(--text);
}

.brand-logo {
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid #b7c6ea;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.brand strong {
  color: var(--text);
}

nav {
  gap: 0.25rem;
}

nav a {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 720;
}

nav a:hover,
nav a:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--brand-dark);
}

nav a[aria-current="page"] {
  border-color: #b7c6ea;
  background: #eef4ff;
  color: var(--brand-dark);
  box-shadow: inset 0 -3px 0 var(--brand);
}

.shell {
  width: min(1180px, 100% - 2rem);
}

.page-title {
  display: grid;
  gap: 0.5rem;
  padding: 2rem 0 1rem;
}

.page-title p:not(.eyebrow) {
  max-width: 76ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.eyebrow {
  color: var(--accent-teal);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.65fr);
  gap: 1.5rem;
  padding: 2rem 0;
}

.hero > div,
.panel,
.card,
.question,
.source-panel,
.lesson-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(23 32 51 / 4%);
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: 1.25rem;
}

.hero > div:first-child {
  display: grid;
  align-content: center;
  border-color: #c7d4ef;
  background: linear-gradient(135deg, #ffffff 0, #f9fbff 100%);
}

.hero h1 {
  max-width: 16ch;
  margin-bottom: 0.75rem;
}

.muted {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.button,
button.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.62rem 0.95rem;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 1px 1px rgb(23 32 51 / 5%);
}

.button:hover,
button.button:hover,
a.button:hover {
  border-color: #b7c6ea;
  background: var(--surface-2);
  color: var(--brand-dark);
}

.button.primary,
a.button.primary,
button.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.button.primary:hover,
a.button.primary:hover,
button.button.primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #ffffff;
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  border-color: var(--line-soft);
  background: #eef1f6;
  color: #7a8494;
  box-shadow: none;
}

.badge,
.meta-tag,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0.22rem 0.58rem;
  font-size: 0.82rem;
  font-weight: 760;
}

.level-a {
  border-color: #b8d8cd;
  background: #ecfdf7;
  color: var(--success);
}

.level-aa {
  border-color: #f5d19a;
  background: #fff7ed;
  color: var(--warn);
}

.level-aaa {
  border-color: #f2b9b3;
  background: #fff1f0;
  color: var(--danger);
}

.stats,
.grid,
.domain-grid,
.tutorial-results,
.standards-grid {
  display: grid;
  gap: 1rem;
}

.stats,
.domain-grid,
.tutorial-results,
.standards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.tutorial-result,
.standard-card {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.card:hover,
.tutorial-result:hover,
.standard-card:hover,
.lesson-row:hover {
  border-color: #c7d4ef;
  box-shadow: var(--shadow);
}

.toolbar,
.tutorial-dashboard {
  display: grid;
  gap: 1rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 1px 2px rgb(23 32 51 / 4%);
}

.toolbar {
  grid-template-columns: minmax(16rem, 1fr) minmax(8rem, 0.3fr) minmax(12rem, 0.45fr) auto;
  align-items: end;
}

.toolbar.is-filtering,
.tutorial-search.is-active,
.result-summary.is-filtering {
  border-color: #b7c6ea;
  box-shadow: inset 4px 0 0 var(--brand);
}

label,
.toolbar label,
.tutorial-controls label {
  display: grid;
  gap: 0.38rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 760;
}

input,
select,
.search {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

input,
select {
  padding: 0.62rem 0.75rem;
}

input::placeholder {
  color: #717b8c;
}

input:focus,
select:focus {
  border-color: var(--focus);
  outline: 3px solid rgb(26 115 232 / 24%);
  outline-offset: 1px;
}

.search {
  padding: 0.65rem;
}

.search input {
  margin-top: 0.25rem;
}

.tutorial-controls {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(14rem, 0.35fr) auto;
  gap: 1rem;
  align-items: end;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.85rem 1rem;
  color: var(--muted);
}

.lesson-list {
  display: grid;
  gap: 0.75rem;
}

.lesson-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
}

.lesson-row h2 {
  margin-top: 0.35rem;
}

.lesson-row p {
  margin-top: 0.35rem;
}

.tutorial-card-head,
.standard-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.criterion-number {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  padding: 0.25rem 0.55rem;
  font-weight: 850;
}

.tutorial-meta {
  display: grid;
  gap: 0.65rem;
}

.tutorial-meta dt {
  color: var(--text);
}

.tutorial-meta dd {
  margin: 0;
}

.tutorial-details,
details.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.85rem;
}

summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 760;
}

.plain-box,
.example-box,
.trap-box,
.feedback {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 1rem;
}

.example-box {
  border-left: 4px solid var(--accent-teal);
}

.trap-box {
  border-left: 4px solid var(--warn);
}

.feedback {
  border-left: 4px solid var(--brand);
  margin-top: 1rem;
}

.options-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.option {
  display: grid;
  gap: 0.3rem;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0.9rem 1rem;
  text-align: left;
}

.option:hover:not(:disabled),
.option:focus-visible {
  border-color: var(--brand);
  background: #eef4ff;
}

.option.correct {
  border-color: #86cbb3;
  background: #ecfdf7;
}

.option.wrong {
  border-color: #f0aaa2;
  background: #fff1f0;
}

.answer-state {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 0.18rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 780;
}

.progress {
  overflow: hidden;
  height: 0.65rem;
  border-radius: 999px;
  background: #dbe4f3;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.mini {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.85rem;
}

.mini span {
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #b7c6ea;
  background: #f9fbff;
}

.pagination {
  justify-content: center;
  margin: 1.25rem 0 0;
}

.pagination ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination-page {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.pagination-page:hover {
  border-color: var(--brand);
  background: #eef4ff;
}

.pagination-page[aria-current="page"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

th,
td {
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-links a {
  min-height: 44px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.panel h1,
.panel h2,
.panel h3,
.card h1,
.card h2,
.card h3,
.question h1,
.question h2,
.question h3,
.source-panel h1,
.source-panel h2,
.source-panel h3,
.lesson-row h1,
.lesson-row h2,
.lesson-row h3,
.hero > div h1,
.hero > div h2,
.hero > div h3,
.stat strong,
.mini strong,
#guided-title,
.guided-big {
  color: var(--text);
}

.muted a,
.source-panel a,
.card a,
.panel a {
  color: var(--brand-dark);
}

.stat span,
.card p,
.panel p,
.lesson-row p,
.source-panel p,
.mini span {
  color: var(--muted);
}

details.panel summary,
details.panel summary strong,
details.card summary,
details.card summary strong {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (width <= 1024px) {
  .stats,
  .domain-grid,
  .tutorial-results,
  .standards-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .tutorial-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width <= 720px) {
  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.18rem;
  }

  .shell {
    width: min(100% - 1rem, 1180px);
  }

  .topbar {
    position: static;
    display: grid;
    align-items: start;
    padding: 0.75rem;
  }

  nav a {
    flex: 1 1 auto;
    justify-content: center;
    padding-inline: 0.55rem;
  }

  .hero,
  .grid.two,
  .stats,
  .domain-grid,
  .tutorial-results,
  .standards-grid,
  .mini-grid,
  .toolbar,
  .tutorial-controls {
    grid-template-columns: 1fr;
  }

  .hero > div,
  .panel,
  .card,
  .question,
  .source-panel {
    padding: 1rem;
  }

  .lesson-row {
    display: grid;
  }

  .actions,
  .pagination {
    align-items: stretch;
  }

  .actions .button,
  .pagination .button {
    width: 100%;
  }

  .pagination ol {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    display: grid;
  }

.footer-links {
  justify-content: flex-start;
}
}

.tool-links,
.comparison-list {
  display: grid;
  gap: 0.65rem;
  margin: 0.85rem 0 0;
}

.tool-links a,
.comparison-list div {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-3);
  padding: 0.75rem 0.85rem;
  text-decoration: none;
}

.tool-links a:hover,
.tool-links a:focus-visible {
  border-color: var(--brand);
  background: var(--card-hover);
}

.tool-links strong,
.comparison-list dt {
  color: var(--text);
  font-weight: 650;
}

.tool-links span,
.comparison-list dd {
  margin: 0;
  color: var(--muted);
}

/* Rendered final: match the GH-600 study-site structure with a teal accent. */
:root {
  --bg: #121518;
  --bg-end: #121518;
  --surface: #191d21;
  --surface-2: #20252a;
  --surface-3: #15191d;
  --card: #191d21;
  --card-hover: #1d2227;
  --text: #d7dde4;
  --muted: #aeb7c0;
  --muted-2: #9ea8b2;
  --disabled: #727d88;
  --line: #343b43;
  --line-soft: #2a3036;
  --brand: #7dd3c7;
  --brand-dark: #4fb8ad;
  --brand-text: #071817;
  --brand-2: #c6eee8;
  --accent-teal: #7dd3c7;
  --accent-green: #8ba891;
  --accent-coral: #b8948e;
  --accent-sky: #8fa6b7;
  --success: #8ba891;
  --warn: #d0b36a;
  --danger: #c79a96;
  --info: #8fa6b7;
  --focus: #7dd3c7;
  --radius: 8px;
  --shadow: none;
}

html,
body {
  background: var(--bg);
}

body {
  min-height: 100vh;
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
}

a,
.source-panel a,
.panel a,
.footer-links a {
  color: var(--brand);
}

a:hover,
.source-panel a:hover,
.panel a:hover {
  color: var(--brand-2);
}

h1,
h2,
h3,
.page-title h1,
.page-title h2,
.page-title h3,
.panel h1,
.panel h2,
.panel h3,
.card h1,
.card h2,
.card h3,
.source-panel h1,
.source-panel h2,
.source-panel h3 {
  color: #d8d3c7;
  font-weight: 560;
}

h1 {
  font-size: clamp(1.5rem, 1.85vw, 2rem);
}

h2 {
  font-size: clamp(1.06rem, 1.2vw, 1.22rem);
}

h3 {
  color: #b9c1c9;
  font-weight: 540;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: auto;
  border-bottom: 1px solid var(--line);
  background: #121518f7;
  padding: 0.75rem clamp(0.9rem, 2vw, 1.35rem);
  box-shadow: none;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  border: 1px solid #315f5a;
  border-radius: 0.5rem;
  background: #152622;
  color: var(--brand-2);
}

.brand strong {
  color: #f4f1e8;
  font-size: 1rem;
  font-weight: 600;
}

nav {
  justify-content: flex-end;
  gap: 0.25rem;
}

nav a {
  color: #cbd3dc;
  border-radius: 0.5rem;
  padding: 0.43rem 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

nav a:hover,
nav a:focus-visible {
  color: #ffffff;
  background: #242b33;
}

nav a[aria-current="page"] {
  color: var(--brand-2);
  background: #142522;
  box-shadow: inset 0 0 0 1px rgb(125 211 199 / 38%);
}

.shell {
  width: min(1040px, 100% - 2rem);
}

.page-title {
  padding: 1.35rem 0 1rem;
}

.page-title p:not(.eyebrow),
.lesson-row p,
.domain-card p,
.card p,
.panel p,
.muted,
.toc-card ul,
.strategy-card p,
.qa-track-card p {
  color: var(--muted);
}

.eyebrow {
  color: var(--brand);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero > div,
.panel,
.card,
.question,
.source-panel,
.lesson-row,
.tutorial-result,
.standard-card,
.stat,
.mini,
details.card,
details.panel,
.table-wrap,
.guide-card,
.must-know,
.toc-card,
.strategy-card,
.qa-track-card,
.coverage-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: 1.15rem;
}

.card:hover,
.tutorial-result:hover,
.standard-card:hover,
.lesson-row:hover,
.toc-card:hover,
.qa-track-card:hover {
  border-color: #454d55;
  background: var(--card-hover);
  box-shadow: none;
}

.button,
button.button,
a.button,
button.option,
.segmented button,
.flash .actions button {
  border: 1px solid #3b444d;
  border-radius: 0.5rem;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 560;
}

.button.primary,
a.button.primary,
button.button.primary {
  border-color: #4a716c;
  background: #213b37;
  color: #e0fbf7;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"],
.flash .actions button:hover {
  border-color: #535c66;
  background: #252b31;
  color: var(--brand-2);
}

.badge,
.domain-card span,
.meta-tag,
.tag-list span,
.mock-badges span {
  border: 1px solid #2f4b47;
  background: #172421;
  color: var(--brand);
  font-weight: 600;
}

.toolbar,
.tutorial-dashboard,
.search,
select,
input {
  border-color: #3b444d;
  background: #171b1f;
  color: var(--text);
}

.progress span,
.course-mini-progress span {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}

.course-percent,
.question-counter,
.answer-state {
  border-color: #4a716c;
  background: #172421;
  color: var(--brand);
}

.coverage-stats strong,
.toc-card-head strong,
.assessment-row strong {
  color: var(--brand);
}

@media (width <= 760px) {
  .topbar {
    position: sticky;
    display: block;
    width: auto;
    padding: 0.65rem 0.75rem 0.55rem;
  }

  .brand {
    margin-bottom: 0.55rem;
  }

  nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-start;
    overflow: auto hidden;
    padding-bottom: 0.25rem;
  }

  nav a {
    flex: none;
    min-height: 44px;
    padding: 0.48rem 0.62rem;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .shell {
    width: min(100% - 1rem, 1040px);
  }
}

/* Final rendered theme: GH-600-style muted dark UI, teal accent instead of yellow. */
:root {
  --bg: #121518;
  --surface: #191d21;
  --surface-2: #20252a;
  --surface-3: #15191d;
  --card: #191d21;
  --card-hover: #1d2227;
  --text: #d7dde4;
  --muted: #aeb7c0;
  --disabled: #727d88;
  --line: #343b43;
  --line-soft: #2a3036;
  --brand: #7dd3c7;
  --brand-dark: #4fb8ad;
  --brand-text: #071817;
  --brand-2: #c6eee8;
  --accent-teal: #7dd3c7;
  --accent-green: #8ba891;
  --accent-coral: #b8948e;
  --accent-sky: #8fa6b7;
  --danger: #c79a96;
  --success: #8ba891;
  --warn: #d0b36a;
  --focus: #7dd3c7;
  --shadow: none;
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.72;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-2);
}

h1,
h2,
h3 {
  color: #d8d3c7;
  font-weight: 560;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.5rem, 1.85vw, 2rem);
}

h2 {
  font-size: clamp(1.06rem, 1.2vw, 1.22rem);
}

h3 {
  color: #b9c1c9;
  font-weight: 540;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: auto;
  border-bottom: 1px solid var(--line);
  background: #121518f7;
  padding: 0.75rem clamp(0.9rem, 2vw, 1.35rem);
  box-shadow: none;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  border: 1px solid #315f5a;
  border-radius: 0.5rem;
  background: #152622;
  color: var(--brand-2);
}

.brand strong {
  color: #f4f1e8;
  font-size: 1rem;
  font-weight: 600;
}

nav {
  justify-content: flex-end;
  gap: 0.25rem;
}

nav a {
  color: #cbd3dc;
  border-radius: 0.5rem;
  padding: 0.43rem 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

nav a:hover,
nav a:focus-visible {
  color: #ffffff;
  background: #242b33;
}

nav a[aria-current="page"] {
  color: var(--brand-2);
  background: #142522;
  box-shadow: inset 0 0 0 1px rgb(125 211 199 / 38%);
}

.shell {
  width: min(1040px, 100% - 2rem);
}

.page-title {
  padding: 1.35rem 0 1rem;
}

.page-title p:not(.eyebrow),
.lesson-row p,
.domain-card p,
.card p,
.panel p,
.muted,
.toc-card ul,
.strategy-card p,
.qa-track-card p {
  color: var(--muted);
}

.eyebrow {
  color: var(--brand);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero > div,
.panel,
.card,
.question,
.source-panel,
.lesson-row,
.tutorial-result,
.standard-card,
.stat,
.mini,
details.card,
details.panel,
.table-wrap,
.guide-card,
.must-know,
.toc-card,
.strategy-card,
.qa-track-card,
.coverage-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: 1.15rem;
}

.card:hover,
.tutorial-result:hover,
.standard-card:hover,
.lesson-row:hover,
.toc-card:hover,
.qa-track-card:hover {
  border-color: #454d55;
  background: var(--card-hover);
  box-shadow: none;
}

.card:focus-within,
.tutorial-result:focus-within,
.standard-card:focus-within,
.lesson-row:focus-within,
.question:focus-within,
.panel:focus-within {
  border-color: var(--line);
  box-shadow: none;
}

.button,
button.button,
a.button,
button.option,
.segmented button,
.flash .actions button {
  border: 1px solid #3b444d;
  border-radius: 0.5rem;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 560;
}

.button.primary,
a.button.primary,
button.button.primary {
  border-color: #4a716c;
  background: #213b37;
  color: #e0fbf7;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"],
.flash .actions button:hover {
  border-color: #535c66;
  background: #252b31;
  color: var(--brand-2);
}

.badge,
.domain-card span,
.meta-tag,
.tag-list span,
.mock-badges span {
  border: 1px solid #2f4b47;
  background: #172421;
  color: var(--brand);
  font-weight: 600;
}

.question {
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.question-counter,
.answer-state {
  border-color: #2f4b47;
  background: #172421;
  color: var(--brand);
}

.option,
button.option {
  border-color: #39424a;
  background: var(--surface-2);
  color: #dbe1e7;
}

.option.selected {
  border-color: #4a716c;
  background: #1c2a28;
}

.toolbar,
.tutorial-dashboard,
.search,
select,
input {
  border-color: #3b444d;
  background: #171b1f;
  color: var(--text);
}

.progress span,
.course-mini-progress span {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}

.course-percent,
.question-counter,
.answer-state {
  border-color: #4a716c;
  background: #172421;
  color: var(--brand);
}

.coverage-stats strong,
.toc-card-head strong,
.assessment-row strong {
  color: var(--brand);
}

.footer-links a {
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--brand);
}

@media (width <= 760px) {
  .topbar {
    position: sticky;
    display: block;
    width: auto;
    padding: 0.65rem 0.75rem 0.55rem;
  }

  .brand {
    margin-bottom: 0.55rem;
  }

  nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-start;
    overflow: auto hidden;
    padding-bottom: 0.25rem;
  }

  nav a {
    flex: none;
    min-height: 44px;
    padding: 0.48rem 0.62rem;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .shell {
    width: min(100% - 1rem, 1040px);
  }
}

/* GH-600-inspired calm dark study interface, with teal replacing the yellow accent. */
:root {
  color-scheme: dark;
  --bg: #121518;
  --surface: #191d21;
  --surface-2: #20252a;
  --surface-3: #15191d;
  --card: #191d21;
  --card-hover: #1d2227;
  --text: #d7dde4;
  --muted: #aeb7c0;
  --disabled: #727d88;
  --line: #343b43;
  --line-soft: #2a3036;
  --brand: #7dd3c7;
  --brand-dark: #4fb8ad;
  --brand-text: #071817;
  --brand-2: #c6eee8;
  --accent-teal: #7dd3c7;
  --accent-green: #8ba891;
  --accent-coral: #b8948e;
  --accent-sky: #8fa6b7;
  --danger: #c79a96;
  --success: #8ba891;
  --warn: #d0b36a;
  --focus: #7dd3c7;
  --shadow: none;
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-2);
}

h1,
h2,
h3 {
  color: #d8d3c7;
  font-weight: 560;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.5rem, 1.85vw, 2rem);
}

h2 {
  font-size: clamp(1.06rem, 1.2vw, 1.22rem);
}

h3 {
  color: #b9c1c9;
  font-weight: 540;
}

.skip-link {
  border-color: #315f5a;
  background: #11211f;
  color: var(--brand-2);
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: auto;
  border-bottom: 1px solid var(--line);
  background: #121518f7;
  padding: 0.75rem clamp(0.9rem, 2vw, 1.35rem);
  box-shadow: none;
}

.brand {
  min-width: max-content;
  gap: 0.65rem;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  border: 1px solid #315f5a;
  border-radius: 0.5rem;
  background: #152622;
  color: var(--brand-2);
}

.brand strong {
  color: #f4f1e8;
  font-size: 1rem;
  font-weight: 600;
}

nav {
  justify-content: flex-end;
  gap: 0.25rem;
  min-width: 0;
}

nav a {
  color: #cbd3dc;
  border-radius: 0.5rem;
  padding: 0.43rem 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

nav a:hover,
nav a:focus-visible {
  color: #ffffff;
  background: #242b33;
}

nav a[aria-current="page"] {
  color: var(--brand-2);
  background: #142522;
  box-shadow: inset 0 0 0 1px rgb(125 211 199 / 38%);
}

.shell {
  width: min(1040px, 100% - 2rem);
}

.page-title {
  padding: 1.35rem 0 1rem;
}

.page-title p:not(.eyebrow),
.lesson-row p,
.domain-card p,
.card p,
.panel p,
.muted,
.toc-card ul,
.strategy-card p,
.qa-track-card p {
  color: var(--muted);
}

.eyebrow {
  color: var(--brand);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 1rem;
  padding: 1.25rem 0;
}

.hero > div,
.panel,
.card,
.question,
.source-panel,
.lesson-row,
.tutorial-result,
.standard-card,
.stat,
.mini,
details.card,
details.panel,
.table-wrap,
.guide-card,
.must-know,
.toc-card,
.strategy-card,
.qa-track-card,
.coverage-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: 1.15rem;
}

.hero > div:first-child {
  border-color: var(--line);
  background: var(--surface);
}

.card:hover,
.tutorial-result:hover,
.standard-card:hover,
.lesson-row:hover,
.toc-card:hover,
.qa-track-card:hover {
  border-color: #454d55;
  background: var(--card-hover);
  box-shadow: none;
}

.card:focus-within,
.tutorial-result:focus-within,
.standard-card:focus-within,
.lesson-row:focus-within,
.question:focus-within,
.panel:focus-within {
  border-color: var(--line);
  box-shadow: none;
}

.button,
button.button,
a.button,
button.option,
.segmented button,
.flash .actions button {
  min-height: 44px;
  border: 1px solid #3b444d;
  border-radius: 0.5rem;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 560;
}

.button.primary,
a.button.primary,
button.button.primary {
  border-color: #4a716c;
  background: #213b37;
  color: #e0fbf7;
}

.button:hover,
button.option:hover,
.segmented button:hover,
.segmented button[aria-pressed="true"],
.flash .actions button:hover {
  border-color: #535c66;
  background: #252b31;
  color: var(--brand-2);
}

.button.primary:hover,
a.button.primary:hover,
button.button.primary:hover {
  border-color: var(--brand);
  background: #284a45;
  color: #f1fffd;
}

.badge,
.domain-card span,
.meta-tag,
.tag-list span,
.mock-badges span {
  border: 1px solid #2f4b47;
  border-radius: 999px;
  background: #172421;
  color: var(--brand);
  font-weight: 600;
}

.question {
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.question h2,
.card h2,
.panel h2,
.lab-card h2 {
  color: #d0cac0;
  font-weight: 540;
}

.question-counter,
.answer-state {
  border-color: #2f4b47;
  background: #172421;
  color: var(--brand);
  font-weight: 620;
}

.option,
button.option {
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  min-height: 3.1rem;
  margin: 0;
  border-color: #39424a;
  background: var(--surface-2);
  color: #dbe1e7;
  padding: 0.75rem 0.85rem;
  font-weight: 450;
  line-height: 1.55;
}

.option-prefix {
  border: 1px solid #3a4148;
  background: #171a1e;
  color: #c7cfd7;
  font-weight: 650;
}

.option.selected {
  border-color: #4a716c;
  background: #1c2a28;
  color: #e1f7f3;
}

.options-list .option.correct,
.option.correct {
  border-color: #4b5e50;
  background: #1b271f;
  color: #dce8df;
  box-shadow: inset 4px 0 0 var(--success);
}

.options-list .option.wrong,
.option.wrong {
  border-color: #604b49;
  background: #2a2020;
  color: #ead6d4;
  box-shadow: inset 4px 0 0 var(--danger);
}

.toolbar,
.tutorial-dashboard,
.search,
select,
input {
  border-color: #3b444d;
  background: #171b1f;
  color: var(--text);
}

.progress,
meter {
  background: #171b1f;
  accent-color: var(--brand);
}

.progress span,
.course-mini-progress span {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}

.domain-card:nth-child(n),
.stat:nth-child(n) {
  border-color: var(--line);
}

.domain-card:nth-child(6n+1),
.stat:nth-child(4n+1) {
  border-top-color: var(--brand);
}

.domain-card:nth-child(6n+2),
.stat:nth-child(4n+2) {
  border-top-color: var(--accent-green);
}

.domain-card:nth-child(6n+3),
.stat:nth-child(4n+3) {
  border-top-color: var(--accent-coral);
}

.domain-card:nth-child(6n+4),
.stat:nth-child(4n) {
  border-top-color: var(--accent-sky);
}

.course-percent {
  border-color: #4a716c;
  background: #172421;
  color: var(--brand);
}

.assessment-row {
  border-color: var(--line-soft);
  background: #1a1d23;
}

.assessment-row strong {
  color: var(--brand);
}

.coverage-stats strong,
.toc-card-head strong {
  color: var(--brand);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-links a {
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--brand);
}

.button:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.option:focus-visible,
.pagination-page:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (width <= 760px) {
  body {
    font-size: 16px;
    line-height: 1.68;
  }

  .topbar {
    position: sticky;
    display: block;
    width: auto;
    padding: 0.65rem 0.75rem 0.55rem;
  }

  .brand {
    margin-bottom: 0.55rem;
  }

  nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-start;
    overflow: auto hidden;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  nav a {
    flex: none;
    min-height: 44px;
    padding: 0.48rem 0.62rem;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .shell {
    width: min(100% - 1rem, 1040px);
  }

  .page-title {
    padding: 1rem 0 0.75rem;
  }

  h1 {
    font-size: 1.42rem;
  }

  h2 {
    font-size: 1.08rem;
  }

  .hero,
  .grid.two {
    display: block;
  }

  .question,
  .panel,
  .card,
  .source-panel,
  .hero > div {
    padding: 1rem;
  }

  .toolbar,
  .actions,
  .tutorial-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .button,
  .button.small,
  button.option {
    width: 100%;
  }
}

/* Refined dark surfaces: avoid large accidental-looking outline boxes. */
:root {
  --shadow: 0 12px 28px rgb(0 0 0 / 18%);
}

.topbar {
  box-shadow: 0 10px 24px rgb(0 0 0 / 18%);
}

.hero > div,
.panel,
.card,
.question,
.source-panel,
.lesson-row,
.tutorial-result,
.standard-card,
.stat,
.mini,
details.card,
details.panel,
.table-wrap {
  box-shadow: 0 1px 0 rgb(255 255 255 / 3%);
}

.card:hover,
.tutorial-result:hover,
.standard-card:hover,
.lesson-row:hover {
  box-shadow: 0 12px 28px rgb(0 0 0 / 18%);
}

.card:focus-within,
.tutorial-result:focus-within,
.standard-card:focus-within,
.lesson-row:focus-within,
.question:focus-within,
.panel:focus-within {
  border-color: var(--line);
  box-shadow: 0 1px 0 rgb(255 255 255 / 3%);
}

.button:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.option:focus-visible,
.pagination-page:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.course-paths {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.course-path-card {
  display: grid;
  gap: 1rem;
}

.course-path-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.course-percent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  min-height: 4.25rem;
  border: 1px solid rgb(56 189 248 / 45%);
  border-radius: 999px;
  background: rgb(56 189 248 / 10%);
  color: var(--brand);
  font-size: 1.25rem;
}

.course-progress {
  height: 0.8rem;
}

.course-list {
  display: grid;
  gap: 0.65rem;
}

.course-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 0.22fr) max-content;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-3);
  color: var(--text);
  padding: 0.85rem;
  text-decoration: none;
}

.course-row:hover {
  border-color: rgb(125 211 199 / 60%);
  background: var(--card-hover);
}

.course-row small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.course-status {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  color: var(--muted);
  font-weight: 800;
}

.course-mini-progress {
  display: block;
  overflow: hidden;
  width: min(9rem, 100%);
  height: 0.45rem;
  border-radius: 999px;
  background: #020617;
}

.course-mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-teal), var(--brand));
}

.assessment-list {
  display: grid;
  gap: 0.55rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1rem;
}

.assessment-list h3 {
  margin: 0;
}

.assessment-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgb(245 158 11 / 8%);
  color: var(--muted);
  padding: 0.7rem 0.85rem;
}

.assessment-row strong {
  color: var(--warn);
  white-space: nowrap;
}

.coverage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.coverage-stats div,
.strategy-card,
.toc-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-3);
  padding: 1rem;
}

.coverage-stats strong {
  display: block;
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1.1;
}

.coverage-stats span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.strategy-grid,
.toc-coverage-grid,
.qa-track-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.strategy-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.strategy-card {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.strategy-card h3,
.toc-card h3 {
  margin: 0;
  color: var(--text);
}

.strategy-card p {
  color: var(--muted);
}

.toc-coverage {
  margin: 1.5rem 0;
}

.qa-track-panel {
  display: grid;
  gap: 1rem;
}

.qa-track-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 0;
}

.qa-track-card {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-height: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-3);
  padding: 1rem;
}

.qa-track-card h3 {
  margin: 0;
  color: var(--text);
}

.qa-track-card p {
  color: var(--muted);
}

.qa-track-card .button {
  align-self: end;
  margin-top: 0.25rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-heading p:not(.eyebrow) {
  max-width: 46rem;
  color: var(--muted);
}

.toc-coverage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toc-card {
  display: grid;
  gap: 0.75rem;
}

.toc-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.toc-card-head strong {
  color: var(--brand);
  white-space: nowrap;
}

.toc-card ul {
  margin-top: 0;
  color: var(--muted);
}

.module-card {
  min-height: 100%;
}

@media (width <= 720px) {
  .course-path-head,
  .course-row {
    grid-template-columns: 1fr;
  }

  .course-path-head {
    display: grid;
  }

  .course-status {
    justify-items: start;
  }

  .coverage-stats,
  .strategy-grid,
  .toc-coverage-grid,
  .qa-track-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }
}

.page-title h1,
.page-title h2,
.page-title h3 {
  color: var(--text);
}

.page-title p:not(.eyebrow) {
  color: var(--muted);
}

.options-list .option strong {
  color: var(--text);
}

.options-list .option.correct {
  border-color: #86cbb3;
  background: #ecfdf7;
}

.options-list .option.wrong {
  border-color: #d97770;
  background: #fff1f0;
  box-shadow: inset 4px 0 0 var(--danger);
}

@media (width <= 720px) {
  nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 0.25rem;
    overflow: visible;
    padding-bottom: 0;
  }

  nav a {
    min-width: 0;
    justify-content: center;
    padding: 0.42rem 0.3rem;
    text-align: center;
    white-space: normal;
    font-size: 0.78rem;
  }
}

/* Final GH-600-inspired accessibility-training interface with teal accent. */
:root {
  color-scheme: dark;
  --bg: #121518;
  --bg-end: #121518;
  --surface: #191d21;
  --surface-2: #20252a;
  --surface-3: #15191d;
  --card: #191d21;
  --card-hover: #1d2227;
  --text: #d7dde4;
  --muted: #aeb7c0;
  --muted-2: #9ea8b2;
  --disabled: #727d88;
  --line: #343b43;
  --line-soft: #2a3036;
  --brand: #7dd3c7;
  --brand-dark: #4fb8ad;
  --brand-text: #071817;
  --brand-2: #c6eee8;
  --accent-teal: #7dd3c7;
  --success: #8ba891;
  --warn: #d0b36a;
  --danger: #c79a96;
  --info: #8fa6b7;
  --focus: #7dd3c7;
  --radius: 8px;
  --shadow: none;
}

html {
  background: var(--bg);
  scroll-padding-top: 5.5rem;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-2);
}

h1,
h2,
h3,
.page-title h1,
.page-title h2,
.page-title h3,
.panel h1,
.panel h2,
.panel h3,
.card h1,
.card h2,
.card h3,
.question h1,
.question h2,
.question h3,
.source-panel h1,
.source-panel h2,
.source-panel h3,
.lesson-row h1,
.lesson-row h2,
.lesson-row h3,
.hero > div h1,
.hero > div h2,
.hero > div h3,
.stat strong,
.mini strong,
#guided-title,
.guided-big,
summary,
details.panel summary,
details.panel summary strong,
details.card summary,
details.card summary strong {
  color: var(--text);
  font-weight: 560;
  letter-spacing: 0;
}

h1,
.page-title h1 {
  font-size: clamp(1.5rem, 1.85vw, 2rem);
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.06rem, 1.2vw, 1.22rem);
}

h3,
.card h3,
.panel h3 {
  font-size: 1rem;
}

p,
li,
dd,
.muted,
.page-title p:not(.eyebrow),
.card p,
.panel p,
.lesson-row p,
.source-panel p,
.mini span,
.stat span {
  color: var(--muted);
}

strong {
  color: var(--text);
}

.skip-link {
  z-index: 100;
  border: 1px solid #315f5a;
  border-radius: 8px;
  background: #11211f;
  color: var(--brand-2);
  box-shadow: var(--shadow);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  width: auto;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-top: 0;
  border-radius: 0;
  background: #121518f7;
  padding: 0.75rem clamp(0.9rem, 2vw, 1.35rem);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--text);
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  border: 1px solid #315f5a;
  border-radius: 0.5rem;
  background: #152622;
  color: var(--brand-2);
  font-size: 0.78rem;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgb(248 250 252 / 4%);
}

.brand strong {
  color: var(--text);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

nav a {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--muted);
  padding: 0.43rem 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

nav a[aria-current="page"] {
  border-color: rgb(125 211 199 / 38%);
  background: #142522;
  color: var(--brand-2);
  box-shadow: inset 0 0 0 1px rgb(125 211 199 / 38%);
}

.shell {
  width: min(1040px, 100% - 2rem);
  margin: 0 auto;
}

.page-title {
  display: grid;
  gap: 0.65rem;
  padding: 1.35rem 0 1rem;
}

.page-title p:not(.eyebrow) {
  max-width: 78ch;
  font-size: 1.05rem;
}

.eyebrow {
  color: var(--brand);
  text-transform: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.72fr);
  gap: 1rem;
  padding: 1.25rem 0;
}

.hero > div,
.panel,
.card,
.question,
.source-panel,
.lesson-row,
.tutorial-result,
.standard-card,
.stat,
.mini,
details.card,
details.panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

.hero > div:first-child {
  display: grid;
  align-content: center;
  border-color: var(--line);
  background: var(--surface);
}

.hero > div,
.panel,
.card,
.question,
.source-panel {
  padding: 1.15rem;
}

.hero h1 {
  max-width: 17ch;
  margin-bottom: 0.75rem;
}

.stats,
.grid,
.domain-grid,
.tutorial-results,
.standards-grid {
  display: grid;
  gap: 1.5rem;
}

.stats,
.domain-grid,
.tutorial-results,
.standards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.tutorial-result,
.standard-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.card:hover,
.tutorial-result:hover,
.standard-card:hover,
.lesson-row:hover {
  border-color: #454d55;
  background: var(--card-hover);
  box-shadow: none;
}

.card:focus-within,
.tutorial-result:focus-within,
.standard-card:focus-within,
.lesson-row:focus-within,
.question:focus-within,
.panel:focus-within {
  border-color: var(--line);
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.button,
button.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #3b444d;
  border-radius: 0.5rem;
  background: var(--surface-2);
  color: var(--brand);
  padding: 0.65rem 1rem;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover,
button.button:hover,
a.button:hover {
  border-color: #535c66;
  background: var(--surface-2);
  color: var(--brand-2);
}

.button.primary,
a.button.primary,
button.button.primary {
  border-color: var(--brand);
  background: #213b37;
  color: #e0fbf7;
}

.button.primary:hover,
a.button.primary:hover,
button.button.primary:hover {
  border-color: var(--brand-dark);
  background: #284a45;
  color: #f1fffd;
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  border-color: var(--line-soft);
  background: #111827;
  color: var(--disabled);
  opacity: 0.78;
}

.badge,
.meta-tag,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #2f4b47;
  border-radius: 999px;
  background: #172421;
  color: var(--brand);
  padding: 0.22rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 780;
}

.level-a {
  border-color: rgb(34 197 94 / 35%);
  background: rgb(34 197 94 / 10%);
  color: #86efac;
}

.level-aa {
  border-color: rgb(245 158 11 / 38%);
  background: rgb(245 158 11 / 11%);
  color: #fbbf24;
}

.level-aaa {
  border-color: rgb(96 165 250 / 38%);
  background: rgb(96 165 250 / 11%);
  color: #93c5fd;
}

.toolbar,
.tutorial-dashboard {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: none;
}

.toolbar {
  grid-template-columns: minmax(18rem, 1fr) minmax(8rem, 0.32fr) minmax(12rem, 0.45fr) auto;
  align-items: end;
}

.toolbar.is-filtering,
.tutorial-search.is-active,
.result-summary.is-filtering {
  border-color: rgb(56 189 248 / 55%);
  box-shadow: inset 4px 0 0 var(--brand);
}

label,
.toolbar label,
.tutorial-controls label {
  display: grid;
  gap: 0.42rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
.search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
}

input,
select {
  padding: 0.65rem 0.75rem;
}

input::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus {
  border-color: var(--focus);
  outline: 3px solid rgb(250 204 21 / 28%);
  outline-offset: 1px;
}

.search {
  padding: 0.7rem;
}

.tutorial-controls {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(14rem, 0.38fr) auto;
  gap: 1rem;
  align-items: end;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1rem;
  color: var(--muted);
}

.lesson-list {
  display: grid;
  gap: 0.9rem;
}

.lesson-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
}

.criterion-number {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  background: #171b1f;
  color: var(--text);
  padding: 0.25rem 0.6rem;
  font-weight: 900;
}

.tutorial-card-head,
.standard-card-head,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tutorial-meta {
  display: grid;
  gap: 0.65rem;
}

.tutorial-meta dt {
  color: var(--text);
}

.tutorial-meta dd {
  margin: 0;
}

.tutorial-details,
details.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-3);
  padding: 0.9rem;
}

summary {
  cursor: pointer;
  font-weight: 820;
}

.plain-box,
.example-box,
.trap-box,
.feedback {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  padding: 1rem;
}

.example-box {
  border-left: 4px solid var(--accent-teal);
}

.trap-box {
  border-left: 4px solid var(--warn);
}

.feedback {
  border-left: 4px solid var(--brand);
  margin-top: 1rem;
}

.options-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.option {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  min-height: 3.1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface-3);
  color: var(--text);
  padding: 0.95rem 1rem;
  text-align: left;
}

.option:hover:not(:disabled),
.option:focus-visible {
  border-color: var(--brand);
  background: var(--card-hover);
}

.options-list .option strong {
  color: var(--text);
}

.options-list .option.correct,
.option.correct {
  border-color: var(--success);
  background: rgb(34 197 94 / 12%);
  box-shadow: inset 4px 0 0 var(--success);
}

.options-list .option.wrong,
.option.wrong {
  border-color: var(--danger);
  background: rgb(248 113 113 / 12%);
  box-shadow: inset 4px 0 0 var(--danger);
}

.answer-state {
  display: inline-flex;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #172421;
  color: var(--brand);
  padding: 0.18rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 820;
}

.progress {
  overflow: hidden;
  height: 0.65rem;
  border-radius: 999px;
  background: #171b1f;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-teal), var(--brand));
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.mini {
  display: grid;
  gap: 0.3rem;
  border-color: var(--line-soft);
  background: var(--surface-3);
  padding: 0.9rem;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgb(125 211 199 / 55%);
  background: var(--surface);
}

.pagination {
  justify-content: center;
  margin: 1.4rem 0 0;
}

.pagination ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination-page {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface-3);
  color: var(--text);
}

.pagination-page:hover {
  border-color: var(--brand);
  background: var(--card-hover);
}

.pagination-page[aria-current="page"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-text);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

th,
td {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-3);
  color: var(--text);
}

.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  background: #080d1a;
  color: var(--muted);
}

.footer-links a {
  min-height: 44px;
  border-color: var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--brand);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  border-color: var(--brand);
  color: var(--brand-2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (width <= 1024px) {
  .topbar,
  .shell {
    width: min(100% - 1.5rem, 1040px);
  }

  .stats,
  .domain-grid,
  .tutorial-results,
  .standards-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .tutorial-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width <= 720px) {
  .topbar {
    position: sticky;
    display: block;
    width: auto;
    padding: 0.65rem 0.75rem 0.55rem;
  }

  .shell {
    width: min(100% - 1rem, 1040px);
  }

  nav {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0.35rem;
    justify-content: flex-start;
    overflow: auto hidden;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  nav a {
    flex: none;
    justify-content: center;
    min-height: 44px;
    padding: 0.48rem 0.62rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.86rem;
  }

  .hero,
  .grid.two,
  .stats,
  .domain-grid,
  .tutorial-results,
  .standards-grid,
  .mini-grid,
  .toolbar,
  .tutorial-controls {
    grid-template-columns: 1fr;
  }

  .page-title {
    padding-top: 1rem;
  }

  .hero > div,
  .panel,
  .card,
  .question,
  .source-panel {
    padding: 1rem;
  }

  .lesson-row {
    display: grid;
  }

  .actions,
  .pagination {
    align-items: stretch;
  }

  .actions .button,
  .pagination .button {
    width: 100%;
  }

  .pagination ol {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
