:root {
  color-scheme: light;
  --ink: #122b3d;
  --subtle: #4e6271;
  --navy: #0d293d;
  --blue: #175d85;
  --blue-light: #e9f4fb;
  --line: #dbe5ec;
  --page: #f5f8fa;
  --white: #fff;
  --radius: 16px;
  font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
}
*, *::after, *::before { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -.022em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: 1.08rem; }
p { max-width: 68ch; }
a { color: var(--blue); text-underline-offset: .2em; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #3283b5; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: default; }
img { display: block; max-width: 100%; object-fit: contain; }
progress { width: 100%; height: .55rem; accent-color: var(--blue); }
ul, ol { margin: 0; padding-inline-start: 1.25rem; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: .6rem; left: .6rem; z-index: 5; padding: .65rem 1rem;
  background: var(--white); border-radius: .5rem; transform: translateY(-180%);
}
.skip:focus { transform: translateY(0); }
.header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  grid-template-areas: "brand app" "search search"; gap: .65rem;
  max-width: 1520px; margin: auto; padding: .6rem 1rem .8rem;
}
.brand {
  grid-area: brand; display: flex; align-items: center; gap: .8rem;
  width: fit-content; min-height: 44px; text-decoration: none; color: var(--ink);
}
.brand img { width: 126px; height: 36px; }
.brand span { display: none; }
.open-app {
  grid-area: app; display: inline-flex; min-height: 44px; align-items: center;
  gap: .42rem; font-weight: 700; font-size: .83rem; text-decoration: none;
  white-space: nowrap;
}
.search {
  grid-area: search; display: flex; min-width: 0; align-items: center; gap: .55rem;
  background: var(--page); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 .3rem 0 .65rem;
}
.search-icon {
  width: 12px; height: 12px; border: 1.6px solid var(--subtle);
  border-radius: 50%; position: relative; flex: 0 0 12px;
}
.search-icon::after {
  position: absolute; content: ""; width: 6px; height: 1.6px;
  background: var(--subtle); transform: rotate(45deg); inset: 9px 0 0 8px;
}
.search input {
  background: transparent; color: var(--ink); border: 0; flex: 1; min-width: 0;
  min-height: 46px; padding: .35rem .25rem;
}
.search input::placeholder { color: var(--subtle); }
.search button {
  border: 0; border-radius: 8px; min-height: 44px; padding: 0 .55rem;
  background: transparent; color: var(--blue); font-size: .875rem; font-weight: 700;
}
.search button:hover { background: var(--blue-light); }
.shell { max-width: 1520px; margin: auto; min-width: 0; }
.sidebar { display: none; }
.mobile-navigation {
  margin: .75rem 1rem 0; border: 1px solid var(--line);
  background: var(--white); border-radius: 12px;
}
.mobile-navigation > summary { padding: .65rem .85rem; min-height: 44px; font-weight: 700; }
.mobile-navigation > nav { padding: 0 .55rem .6rem; }
.nav-label {
  margin: .9rem .65rem .25rem; color: var(--subtle); font-size: .75rem;
  font-weight: 750; text-transform: uppercase; letter-spacing: .07em;
}
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  min-height: 44px; padding: .45rem .65rem; border-radius: 8px;
  font-size: .91rem; font-weight: 600; color: var(--ink); text-decoration: none;
}
.nav-link:hover { background: var(--page); }
.nav-link[aria-current="page"] { color: #124f74; background: #e5f1fa; }
.nav-link span[aria-hidden] { color: var(--blue); font-size: 1.04rem; }
.content { padding: 1rem 1rem 2.5rem; min-width: 0; overflow-wrap: anywhere; }
.content:focus { outline-offset: -3px; }
.content > section + section { margin-top: 1.7rem; }
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  margin: 0 1rem; padding: 1rem 0 1.55rem; border-top: 1px solid var(--line);
  color: var(--subtle); font-size: .86rem;
}
.hero {
  display: grid; gap: 1.2rem; background: var(--navy);
  background-image: radial-gradient(ellipse at 93% 0, #215879 0, transparent 72%);
  border-radius: 20px; color: var(--white); padding: 1.45rem;
}
.hero p { color: #d7e8f4; margin-top: .65rem; }
.hero .actions { margin-top: 1.1rem; }
.hero-progress {
  align-self: center; min-width: 0; padding: .95rem 1.1rem; border-radius: 14px;
  background: #11384f; border: 1px solid #477087;
}
.hero-progress strong { display: block; font-size: 1rem; }
.hero-progress p { margin-top: .25rem; font-size: .88rem; }
.hero-progress progress { accent-color: #90d0f7; }
.button {
  display: inline-flex; justify-content: center; align-items: center;
  gap: .5rem; min-height: 44px; border: 1px solid transparent; border-radius: 9px;
  padding: .55rem .86rem; font-size: .92rem; font-weight: 700;
  background: var(--blue); color: var(--white); text-decoration: none;
}
.button:hover:not(:disabled) { background: #0f4a6b; }
.button-outline { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-outline:hover:not(:disabled) { background: var(--blue-light); }
.hero .button { background: #d6efff; color: #0d344d; }
.hero .button:hover { background: #bce4fb; }
.hero .button-outline { background: transparent; color: #eef8ff; border-color: #7194aa; }
.hero .button-outline:hover { background: #254e66; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.section-heading > a { font-size: .87rem; font-weight: 700; }
.grid { display: grid; gap: .65rem; }
.card {
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: .45rem .6rem;
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.05rem; text-decoration: none;
}
.card:hover { border-color: #8ab4cf; }
.card p { grid-column: 1 / -1; color: var(--subtle); font-size: .88rem; }
.card > span { color: var(--blue); }
.card .card-status { font-weight: 700; font-size: .86rem; }
.card .card-detail { font-size: .8rem; font-weight: 600; color: var(--blue); }
.bread {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .55rem;
  margin-bottom: .65rem; color: var(--subtle); font-size: .87rem;
}
.page-heading { margin: 0 0 1.05rem; }
.page-heading p { margin-top: .55rem; color: var(--subtle); }
.doc-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; min-width: 0;
}
.doc-panel + .doc-panel { margin-top: .75rem; }
.doc-panel > * + * { margin-top: .6rem; }
.doc-panel > p, .doc-panel li { color: var(--subtle); }
.rule { scroll-margin-top: 6rem; }
.rule.is-target { background: var(--blue-light); }
.rule > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.step { display: grid; gap: .1rem; padding: .55rem 0; }
.step strong { color: var(--ink); }
.step + .step { border-top: 1px solid var(--line); }
.guide-controls { margin-top: .95rem; display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.guide-controls > span { color: var(--blue); font-size: .88rem; }
.note { padding: .75rem .9rem; border-radius: 10px; background: var(--blue-light); color: var(--ink); font-size: .89rem; }
.details-group {
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  margin-top: .55rem; overflow: clip;
}
.details-group > summary {
  min-height: 50px; padding: .7rem .9rem; font-weight: 750; line-height: 1.45;
}
.details-group > summary:hover { background: var(--page); }
.details-group[open] > summary { border-bottom: 1px solid var(--line); background: #f8fbfd; }
.glossary { margin: 0; padding: .2rem .85rem; }
.glossary div { padding: .6rem .3rem; scroll-margin-top: 6rem; }
.glossary div + div { border-top: 1px solid #e9eef3; }
.glossary div.is-target { background: var(--blue-light); border-radius: .45rem; }
.glossary dt { font-weight: 700; color: var(--ink); }
.glossary dd { color: var(--subtle); margin: .15rem 0 0; font-size: .91rem; }
.module-actions { margin-top: .85rem; }
.module-list + .module-list { margin-top: 1.4rem; }
.exercise-box { margin-top: .9rem; }
.exercise-steps { color: var(--subtle); font-size: .86rem; font-weight: 700; margin-bottom: .4rem; }
.options { display: grid; gap: .55rem; margin-top: .85rem; }
.option {
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  color: var(--ink); min-height: 47px; padding: .65rem .75rem; text-align: left;
}
.option:hover:not(:disabled) { border-color: #82abc4; background: #f3f9fd; }
.option[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-light); }
.feedback { margin-top: .75rem; padding: .65rem .8rem; border-radius: 8px; background: #eaf5ec; color: #234e31; }
.feedback:empty { margin: 0; padding: 0; }
.feedback[data-wrong="true"] { background: #fff3e8; color: #74381e; }
.search-results { display: grid; gap: .55rem; }
.result > .location { grid-column: 1 / -1; font-size: .8rem; font-weight: 700; color: var(--blue); }
.result > h2 { font-size: 1.08rem; }
.result > p { margin: 0; }
@media (min-width: 580px) {
  .header-inner { padding-inline: 1.25rem; }
  .content { padding-inline: 1.25rem; }
  .mobile-navigation, .footer { margin-inline: 1.25rem; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { padding: 1.8rem; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
  .doc-panel { padding: 1.2rem; }
}
@media (min-width: 960px) {
  .header { position: sticky; top: 0; z-index: 2; }
  .header-inner { grid-template-columns: minmax(15rem,1fr) minmax(19rem,1.6fr) minmax(11rem,1fr); grid-template-areas: "brand search app"; padding: .75rem 1.55rem; gap: 1rem; }
  .brand img { width: 132px; }
  .brand span { display: inline; padding-left: .65rem; border-left: 1px solid var(--line); font-size: .82rem; font-weight: 700; white-space: nowrap; }
  .open-app { justify-self: end; font-size: .9rem; }
  .shell { display: grid; grid-template-columns: 240px minmax(0,1fr); }
  .sidebar {
    grid-row: 1 / 3; display: block; position: sticky; top: 75px;
    align-self: start; max-height: calc(100dvh - 75px); overflow-y: auto;
    padding: 1rem .8rem 1.25rem; border-right: 1px solid var(--line);
    background: var(--white);
  }
  .mobile-navigation { display: none; }
  .content { padding: 1.45rem clamp(1.4rem,4vw,3.5rem) 3rem; }
  .footer { grid-column: 2; margin-inline: clamp(1.4rem,4vw,3.5rem); }
  .grid.triple { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hero { padding: 2.25rem; grid-template-columns: minmax(0,1fr) minmax(12rem,15rem); align-items: center; }
  .glossary div { display: grid; grid-template-columns: minmax(12rem, .65fr) minmax(0,1.35fr); align-items: baseline; gap: .85rem; }
  .glossary dd { margin-top: 0; }
}
