:root {
  color-scheme: light;
  --page: #f5f7f7;
  --ink: #132c30;
  --muted: #4e6266;
  --line: #d8e3e3;
  --surface: #fff;
  --teal: #0f625e;
  --deep: #123c3c;
  --mint: #e4f2ee;
  --lime: #dbf7ae;
  --radius: 16px;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal); }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #087973; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.125rem; line-height: 1.3; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; z-index: 5; inset: 0 auto auto 1rem; transform: translateY(-110%); background: white; padding: .75rem; }
.skip:focus { transform: none; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .shell, .site-footer { max-width: 1320px; margin-inline: auto; }
.header-inner { min-height: 72px; padding: .65rem clamp(1rem, 4vw, 3.15rem); display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.brand, .header-actions, .text-link, .button, .sidebar-note { display: inline-flex; gap: .65rem; align-items: center; }
.brand { color: var(--ink); text-decoration: none; font-weight: 750; min-height: 44px; line-height: 1.2; }
.brand strong { color: var(--teal); font-weight: inherit; }
.brand-mark { display: grid; flex: none; place-items: center; background: var(--deep); color: #c6f2e4; width: 38px; height: 38px; border-radius: 10px; }
.brand-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.text-link { min-height: 44px; font-weight: 670; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.header-actions { justify-content: flex-end; flex-wrap: wrap; }
.shell { display: grid; grid-template-columns: minmax(145px, 208px) minmax(0, 1fr); gap: clamp(1.15rem, 4vw, 3.3rem); padding: clamp(1.15rem, 3.6vw, 3rem) clamp(1rem, 4vw, 3.15rem) 3.5rem; min-height: 78vh; }
.shell.is-auth { display: block; max-width: 36rem; }
.is-auth .sidebar { display: none; }
.is-auth .auth { padding: clamp(1.15rem, 5vw, 2.2rem); }
.is-auth .auth h1 { font-size: clamp(1.8rem, 4.8vw, 2.65rem); margin-bottom: .65rem; }
.sidebar { padding-top: .6rem; }
.overline { color: var(--teal); font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav-label { margin: 0 0 1rem .7rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav button { display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .6rem .7rem; text-align: left; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 620; }
.sidebar nav button:hover { background: white; border-color: var(--line); }
.sidebar nav button[aria-current] { background: #dbece8; color: #104c49; border-color: #cfe3dd; }
.sidebar-note { margin: 1.8rem 0 0 .65rem; font-size: .83rem; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #43847a; flex: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(185px, 36%); position: relative; isolation: isolate; overflow: hidden; align-items: center; min-height: 270px; margin-bottom: 1.5rem; border-radius: 20px; background: linear-gradient(115deg, #122f32, #14504d); color: white; }
.hero-content { z-index: 1; padding: clamp(1.45rem, 4.3vw, 2.9rem); padding-right: 0; }
.hero-badge { display: inline-flex; color: #d3f4e8; font-family: ui-monospace, monospace; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; align-items: center; gap: .55rem; margin-bottom: 1rem; }
.hero-badge .status-dot { background: var(--lime); }
.hero h1 { font-size: clamp(2.5rem, 5.3vw, 4.3rem); max-width: 16ch; }
.hero p { color: #dcf1ec; margin-top: .95rem; max-width: 41ch; }
.hero-actions:not(:empty) { margin-top: 1.3rem; }
.scan-art { display: flex; align-self: stretch; align-items: center; justify-content: center; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 16%); }
.scan-art svg { flex: none; width: max(100%, 260px); max-height: 310px; }
.button { min-height: 44px; justify-content: center; padding: .55rem .95rem; border-radius: 8px; border: 1px solid transparent; font-weight: 685; text-decoration: none; line-height: 1.3; text-align: center; color: var(--ink); background: white; }
.button.primary { background: var(--teal); color: white; }
.button.primary:hover { background: #0b4d49; }
.button.hero-button { background: var(--lime); color: #203a26; }
.button.hero-button:hover { background: #ebfcd2; }
.button.quiet { border-color: var(--line); }
.button.quiet:hover, .button.quiet[aria-pressed="true"] { background: var(--mint); border-color: #a7c9c2; }
.button:disabled { opacity: .65; }
.section-heading { display: grid; gap: .45rem; margin-bottom: 1.15rem; }
.section-heading p:not(.overline), .muted { color: var(--muted); }
.grid-split { display: grid; gap: 1.35rem; grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); align-items: start; }
.categories, .metric-grid { display: grid; gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.7rem; }
.surface, .metric, .category, .list-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.surface { padding: clamp(1rem, 2.65vw, 1.65rem); min-width: 0; }
.category { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .875rem; text-align: left; color: var(--ink); text-decoration: none; }
.category:hover, button.list-row:hover { border-color: #76a99f; background: #fbfefc; }
.category strong, .category .muted { grid-column: 1 / -1; }
.category .category-arrow { align-self: start; color: var(--teal); }
.icon-chip { display: inline-grid; place-items: center; color: var(--teal); background: var(--mint); border-radius: 8px; width: 36px; height: 36px; }
.auth { border-top: 3px solid var(--teal); scroll-margin-top: 1rem; }
.auth:has(> #auth-title:focus) { outline: 3px solid var(--teal); outline-offset: 3px; }
#auth-title:focus { outline: none; }
.auth .icon-chip { margin-bottom: .8rem; }
.auth p, .auth h3 { margin-bottom: .65rem; }
.auth form { display: grid; gap: .7rem; margin-top: 1rem; }
.auth label { display: grid; gap: .25rem; font-weight: 650; }
.auth input { display: block; min-width: 0; width: 100%; min-height: 45px; padding: .5rem .65rem; color: var(--ink); border: 1px solid #adc0c1; border-radius: 8px; }
.password-field { position: relative; }
.password-field input { padding-right: 4.5rem; }
.password-toggle { position: absolute; right: 1px; bottom: 1px; min-width: 4rem; min-height: 43px; padding: .35rem .55rem; color: var(--teal); border: 0; background: transparent; }
.password-toggle:hover { text-decoration: underline; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: .45rem; }
.auth .auth-message { margin: 0; }
.auth-message:not(:empty) { border-radius: 8px; padding: .65rem .75rem; background: var(--mint); color: var(--deep); }
.auth-message.is-error { background: #fcf0e9; color: #65381e; }
.auth .link-button { justify-self: start; background: none; padding-inline: 0; color: var(--teal); border: 0; }
.link-button:hover { text-decoration: underline; }
.form-message { color: var(--muted); }
.metric { padding: .85rem 1rem; }
.metric .icon { color: var(--teal); }
.metric strong { display: block; font-size: clamp(1.35rem, 3vw, 1.9rem); font-family: Georgia, serif; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); }
.metric progress { display: block; width: 100%; margin: .35rem 0 .15rem; accent-color: var(--teal); }
.control-row, .filters, .split-line, .item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.split-line { justify-content: space-between; }
.control-row { margin-bottom: 1rem; }
.filters { margin-bottom: 1.05rem; }
.list { display: grid; gap: .6rem; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: .65rem; text-align: left; padding: .9rem 1rem; color: var(--ink); }
.list-row small { display: block; color: var(--muted); }
.list-row .icon { color: var(--teal); }
.reader { max-width: 52rem; }
.reading-text, .explanation { white-space: pre-wrap; }
.reading-text { margin: 1rem 0 1.25rem; line-height: 1.75; }
.protocols { border-top: 1px solid var(--line); padding: 1rem 0; }
.protocols > p { margin: .25rem 0 .75rem; }
.protocol-reference { margin-top: .5rem; border: 1px solid var(--line); border-radius: 8px; }
.protocol-reference summary { cursor: pointer; padding: .65rem .85rem; font-weight: 700; }
.protocol-reference dl { margin: 0; padding: 0 .85rem .85rem; }
.protocol-reference dt { font-weight: 700; }
.protocol-reference dd { margin: 0 0 .55rem; white-space: pre-wrap; }
.badge { display: inline-flex; align-items: center; padding: .25rem .55rem; background: var(--mint); border-radius: 5px; color: #194e48; font-size: .85rem; font-weight: 650; }
.quiz-title { margin: .8rem 0 1rem; font-size: clamp(1.25rem, 3vw, 1.65rem); }
.anatomy-title { margin-top: .85rem; font-weight: 700; color: var(--teal); }
.anatomy-title + .quiz-title { margin-top: .35rem; }
.practice-image { margin: 0 0 1rem; }
.practice-image-frame, .image-viewport { background: #152629; }
.practice-image-frame { border-radius: 10px; overflow: hidden; }
.practice-image img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.practice-image-frame img { max-height: 56vh; }
.practice-image figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .5rem; color: var(--muted); font-size: .9rem; }
.image-viewer { width: min(72rem, calc(100% - 1rem)); max-width: none; max-height: calc(100% - 1rem); padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); }
.image-viewer::backdrop { background: #0d2024d9; }
body:has(.image-viewer[open]) { overflow: hidden; }
.image-viewer-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; padding: .65rem .85rem; }
.image-viewer-bar p { font-size: .875rem; }
.image-viewer-bar .control-row { margin: 0; }
.image-viewport { overflow: auto; max-height: 73dvh; }
.image-viewport img { max-height: 73dvh; }
.image-viewport.full-resolution img { max-width: none; max-height: none; }
.choices { display: grid; gap: .5rem; margin-bottom: .9rem; }
.choice { display: flex; width: 100%; min-height: 48px; align-items: center; gap: .7rem; text-align: left; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.choice:not(:disabled):hover, .choice.correct { border-color: #7db5a6; background: #e7f5ec; }
.choice.incorrect { border-color: #c38a72; background: #f9eae1; }
.choice-letter { display: grid; flex: none; place-items: center; width: 30px; height: 30px; font-family: ui-monospace, monospace; background: #edf4f4; border-radius: 5px; color: var(--teal); }
.notice, .feedback { padding: .85rem 1rem; border-radius: 10px; border: 1px solid #adcfc6; background: #e8f4ef; color: #254e46; }
.notice { margin-bottom: 1rem; }
.feedback { margin: .65rem 0 .85rem; }
.feedback p { margin-top: .3rem; }
.feedback.error { background: #fcf0e9; border-color: #e2b9a7; color: #65381e; }
.flash-face { display: grid; gap: 1rem; align-content: center; min-height: 165px; background: #f5faf8; border-radius: 12px; margin: .8rem 0; padding: clamp(1rem, 4vw, 1.75rem); }
.day-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .85rem; align-items: start; }
.day-row .item-actions { grid-column: 2; }
.day-task { margin-top: .4rem; }
.day-number { min-width: 2.35rem; text-align: center; }
.day-row.is-current { border-color: #7db5a6; }
.loading { padding: 1rem; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; padding: 1.25rem clamp(1rem, 4vw, 3.15rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.site-footer span:first-child { font-weight: 750; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 1020px) {
  .grid-split { grid-template-columns: 1fr; }
  .grid-split .auth { grid-row: 1; }
}
@media (max-width: 760px) {
  .shell { display: block; padding-top: .85rem; }
  .sidebar { padding: 0 0 .85rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: .2rem; }
  .sidebar nav button { min-height: 44px; gap: .35rem; padding: .4rem .55rem; }
  .nav-label, .sidebar-note { display: none; }
  .hero { min-height: 232px; }
}
@media (max-width: 480px) {
  .header-inner { min-height: 62px; }
  .brand span:last-child { max-width: 8ch; }
  .header-actions { gap: .35rem; }
  .header-actions .text-link .icon { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-content { padding-right: 1.4rem; }
  .hero p { max-width: 30ch; }
  .scan-art { position: absolute; z-index: -1; right: -78px; bottom: -56px; width: 245px; opacity: .37; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
