:root {
  color-scheme: light;
  font: 100%/1.65 system-ui, sans-serif;
  color: #10213a;
  background: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow-wrap: anywhere; }
.wrap { width: min(74rem, calc(100% - 2rem)); margin-inline: auto; }
.section, .hero { padding-block: clamp(2rem, 5vw, 4rem); }
.intro { padding-block: 1.25rem; }
.dark { background: #08172d; color: #fff; }
.band { background: #eef3fa; }
a { color: #1448a0; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #0a326f; }
.dark a { color: #d7e7ff; }
.dark a:hover { color: #fff; }
:focus-visible { outline: 3px solid #2056a8; outline-offset: 3px; }
.dark :focus-visible { outline-color: #ffd185; }
.skip { position: absolute; z-index: 2; top: .5rem; left: .5rem; background: #fff; padding: .75rem; transform: translateY(-180%); }
.skip:focus { transform: none; }
h1, h2, h3 { line-height: 1.15; }
h1 { margin: .55em 0 .35em; max-width: 17ch; font-size: clamp(2.15rem, 5.2vw, 3.8rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); margin-top: 0; }
h3 { font-size: 1.2rem; }
.lead { font-size: clamp(1.12rem, 2vw, 1.5rem); }
.hero-grid, .grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-grid { grid-template-columns: minmax(0, 1.9fr) minmax(17rem, .75fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.hero-grid > div > p:not(.lead) { max-width: 68ch; }
.case, .card { padding: 1.25rem; border-radius: 1rem; }
.case { background: #142c4e; border: 1px solid #738fb5; color: #fff; }
.case > strong { font-size: 1.5rem; }
.case dt { font-weight: 700; color: #d4e4fc; }
.case dd { margin: 0 0 .65rem; }
.card { background: #fff; color: #10213a; border: 1px solid #a2b6d3; }
.card h3, .case h3 { margin-top: 0; }
.card p, .case p { margin-bottom: 0; }
.course, .dark .course {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: .7rem 1.05rem; border: 2px solid #ff858f; border-radius: .65rem;
  background: #a70e25; color: #fff; font-weight: 800; text-decoration: none; text-align: center;
  box-shadow: 0 0 14px #ff66713b;
}
.course:hover, .course:active, .dark .course:hover, .dark .course:active { background: #810b1e; color: #fff; }
.index, .controls, .carousel-head, .cta-panel, .footer { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.index a { background: #eef3fa; border: 1px solid #a2b6d3; border-radius: .5rem; padding: .55rem .8rem; min-height: 44px; font-weight: 650; }
.carousel { min-width: 0; margin: 1.4rem 0 .25rem; border: 1px solid #29496f; border-radius: 1rem; padding: 1.15rem; box-shadow: 0 12px 32px #07152a22; }
.carousel-head { justify-content: space-between; padding-bottom: .6rem; }
.carousel-head h2 { margin: 0; font-size: 1.25rem; }
.controls[hidden] { display: none; }
.controls button { font: inherit; min-height: 44px; border: 1px solid #a2b6d3; border-radius: .5rem; padding: .3rem .65rem; color: #10213a; background: #fff; cursor: pointer; }
.controls button:hover { background: #d7e7ff; }
.rail { display: flex; gap: .9rem; margin: 0; padding: .55rem .4rem .9rem; list-style: none; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-color: #6685ac #dce6f2; scrollbar-width: thin; }
.rail li { flex: 0 0 min(15rem, 100%); min-width: 0; scroll-snap-align: start; scroll-margin-inline: .3rem; }
.rail li:nth-child(1) { --card-accent: #ff465c; --card-glow: #ff465c66; }
.rail li:nth-child(2) { --card-accent: #ff9f1c; --card-glow: #ff9f1c66; }
.rail li:nth-child(3) { --card-accent: #3b82f6; --card-glow: #3b82f666; }
.rail li:nth-child(4) { --card-accent: #20d49a; --card-glow: #20d49a66; }
.rail li:nth-child(5) { --card-accent: #b97aff; --card-glow: #b97aff66; }
.rail li:nth-child(6) { --card-accent: #ffd166; --card-glow: #ffd16666; }
.rail li:nth-child(7) { --card-accent: #25d9ee; --card-glow: #25d9ee66; }
.rail li:nth-child(8) { --card-accent: #ff647c; --card-glow: #ff647c66; }
.rail li:nth-child(9) { --card-accent: #36d399; --card-glow: #36d39966; }
.rail a { display: flex; flex-direction: column; align-items: flex-start; min-height: 158px; height: 100%; border: 2px solid var(--card-accent); border-radius: .8rem; background: #183457; color: #fff; padding: 1rem; font-weight: 650; text-decoration: none; box-shadow: 0 0 12px var(--card-glow), inset 0 0 12px #ffffff0a; transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease; }
.rail strong { font-size: 1.06rem; line-height: 1.25; }
.rail span { margin-top: .55rem; color: #bcd7ff; font-size: .82rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.rail small { display: block; margin-top: .35rem; color: #fff; font-size: .9rem; font-weight: 450; line-height: 1.45; }
.rail a:hover, .rail a:focus-visible { background: #24476f; box-shadow: 0 0 20px var(--card-glow), 0 0 5px var(--card-accent), inset 0 0 16px #ffffff12; transform: translateY(-2px); }
.rail a[aria-current="page"], .rail a[aria-current="page"]:hover { background: #e0ecff; color: #10213a; }
.rail a[aria-current="page"] { box-shadow: 0 0 20px var(--card-glow), 0 0 5px var(--card-accent); }
.rail a[aria-current="page"] span { color: #244f87; }
.rail a[aria-current="page"] small { color: #10213a; }
.carousel-status { margin: .4rem .3rem 0; color: #d7e7ff; font-size: .9rem; }
.table-box { overflow-x: auto; border: 1px solid #a2b6d3; border-radius: .65rem; }
table { border-collapse: collapse; width: 100%; min-width: 42rem; background: #fff; color: #10213a; }
table.lab { min-width: 51rem; }
th, td { padding: .78rem; text-align: left; vertical-align: top; border-bottom: 1px solid #cad6e6; }
thead { background: #142c4e; color: #fff; }
tbody tr:nth-child(even) { background: #f0f5fb; }
.note { padding: 1rem; border-left: 4px solid #2056a8; background: #eef3fa; }
.cta-panel { justify-content: space-between; margin-top: 1.5rem; border-radius: .75rem; padding: 1.2rem; }
.cta-panel p { margin: 0; }
.checklist { display: grid; gap: .45rem; }
.checklist label { min-height: 44px; display: flex; align-items: center; gap: .6rem; }
.checklist input { flex: none; width: 1.2rem; height: 1.2rem; }
details { background: #fff; color: #10213a; border: 1px solid #a2b6d3; border-radius: .6rem; margin-bottom: .65rem; padding: 0 .85rem; }
summary { min-height: 44px; padding: .6rem 0; font-weight: 700; cursor: pointer; }
details + h2 { margin-top: 2rem; }
.footer { justify-content: space-between; padding-block: 1.3rem; }
@media (max-width: 768px) {
  .hero-grid, .grid { grid-template-columns: minmax(0, 1fr); }
  .rail li { flex-basis: 100%; }
  .rail a { min-height: 172px; padding: 1.1rem; }

  .hero, .section { padding-block: 2rem; }
  .case, .card { padding: 1rem; }
  .carousel { margin-inline: -.15rem; padding: .9rem; }
  .carousel-head { align-items: stretch; }
  .controls { display: grid; grid-template-columns: 3.2rem 3.2rem minmax(0, 1fr); width: 100%; }
  .controls button { width: 100%; }
  .controls [data-pause] { grid-column: auto; }
  .cta-panel { align-items: stretch; }
  .cta-panel .course { width: 100%; }
  .table-box { overflow: visible; border: 0; border-radius: 0; }
  table, table.lab { min-width: 0; width: 100%; background: transparent; }
  table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table tbody { display: grid; gap: .9rem; }
  table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid #a2b6d3;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 5px 16px #0b25400d;
  }
  table tbody tr:nth-child(even) { background: #fff; }
  table tbody th,
  table tbody td {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    font-size: 1rem;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }
  table tbody th {
    padding: .75rem 1rem;
    background: #142c4e;
    color: #fff;
    font-size: 1.08rem;
  }
  table tbody td {
    position: relative;
    padding: 2rem 1rem .8rem;
  }
  table tbody td::before {
    content: attr(data-label);
    position: absolute;
    top: .45rem;
    left: 1rem;
    right: 1rem;
    color: #526985;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  code { font-size: .9em; overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
  .wrap { width: min(100% - 1.5rem, 74rem); }
  h1 { font-size: 1.9rem; line-height: 1.08; letter-spacing: -.025em; }
  h2 { font-size: 1.45rem; line-height: 1.18; }
  h3 { font-size: 1.1rem; line-height: 1.25; }
  .lead { font-size: 1.05rem; line-height: 1.55; }
  .hero nav { font-size: .9rem; line-height: 1.5; }
  .hero-grid { gap: 1.25rem; }
  .hero .case dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; margin-bottom: 0; }
  .hero .case dd { margin-bottom: 0; }
  .carousel-head h2 { font-size: 1.15rem; }
  .controls { grid-template-columns: 3rem 3rem minmax(0, 1fr); gap: .45rem; }
  .controls button { padding-inline: .35rem; font-size: .9rem; }
  .controls [data-prev], .controls [data-next] { font-size: 0; }
  .controls [data-prev]::before { content: "‹"; font-size: 1.45rem; line-height: 1; }
  .controls [data-next]::before { content: "›"; font-size: 1.45rem; line-height: 1; }
  .rail { scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .intro ul, .section ul { padding-left: 1.3rem; }
  .index { display: grid; grid-template-columns: minmax(0, 1fr); }
  .index a { display: flex; align-items: center; width: 100%; }
  .course { width: 100%; }
  summary { line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .rail a { transition: none; }
  .rail a:hover, .rail a:focus-visible { transform: none; }
}
