:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #172535;
  background: #f4f7fa;
  line-height: 1.5;
  --accent: #194880;
  --outline: #2859a0;
  --border: #b5c4d3;
  --lab-red: #cf1226;
  --button-accent: #8b3045;
  --button-accent-dark: #692337;
  --button-accent-light: #f7edf0;
  --lab-border: #e9bbc2;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: var(--accent); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--outline); outline-offset: 4px; }
h1:focus, #main:focus { outline: none; }
.page-width { width: min(100% - 2rem, 49rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 9;
  top: .5rem;
  left: .5rem;
  transform: translateY(-160%);
  background: white;
  padding: .65rem 1rem;
}
.skip-link:focus { transform: none; }
.site-header {
  background: white;
  border-top: .3rem solid var(--lab-red);
  border-bottom: 1px solid #d6dfe7;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding-block: .9rem;
}
.header-brand {
  display: flex;
  flex: 1 1 22rem;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}
.header-title {
  margin: 0;
  font-size: clamp(1rem, 2.25vw, 1.2rem);
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .7rem;
}
.header-controls .header-home {
  min-height: 2.75rem;
}
:root[data-inner-screen] { scroll-padding-top: var(--site-header-offset, 10.5rem); }
[data-inner-screen] .site-header { position: sticky; top: 0; z-index: 5; }
.wordmark {
  flex: 0 0 auto;
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.wordmark img {
  display: block;
  height: clamp(2.875rem, calc(25vw - 2.125rem), 3.75rem);
  width: auto;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: white;
  transition: opacity 500ms;
}
.splash[hidden] { display: none; }
.splash-leaving { opacity: 0; }
.splash-logo {
  width: 18rem;
  max-width: 75vw;
  height: auto;
  opacity: 0;
  animation: splash-logo-in 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.splash-text {
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(215.4 16.3% 46.9%);
  opacity: 0;
  animation: splash-text-in 600ms cubic-bezier(0.22, 1, 0.36, 1) 450ms forwards;
}
@keyframes splash-logo-in {
  0% { opacity: 0; transform: translateY(24px) scale(0.94); }
  60% { opacity: 1; transform: translateY(-4px) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes splash-text-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .splash, .splash-logo, .splash-text { animation: none; transition: none; opacity: 1; }
}
.language { display: flex; flex-wrap: wrap; gap: .25rem; }
.language button {
  min-height: 2.75rem;
  padding: .45rem .8rem;
  border-radius: .45rem;
  border: 1px solid var(--border);
  background: white;
  font-size: .95rem;
  font-weight: 650;
}
.language button[aria-pressed="true"] {
  color: var(--button-accent-dark);
  background: var(--button-accent-light);
  border-color: var(--button-accent);
  box-shadow: inset 0 0 0 1px var(--button-accent);
}
main { padding-top: clamp(1.75rem, 6vw, 4rem); }
.intro { margin-bottom: 1.6rem; }
.home-info-heading { font-size: clamp(1.4rem, 4vw, 2.1rem); }
.home-info-heading a {
  display: flex;
  align-items: center;
  min-height: clamp(5.25rem, 12vw, 7.5rem);
  padding: .9rem 1.15rem;
  color: #29232c;
  background: #fff5f6;
  border: 1px solid var(--lab-border);
  border-inline-start: .3rem solid var(--lab-red);
  border-radius: .65rem;
  text-decoration: none;
}
.home-info-heading a:hover { background-color: #ffecef; text-decoration: underline; }
h1, h2 { line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 5vw, 2.9rem); letter-spacing: -.035em; }
h2 { font-size: 1.25rem; }
p { margin: .9rem 0 0; font-size: 1.125rem; }
.resume-category { font-size: .95rem; font-weight: 500; }
.category-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  padding: 0;
  margin: 0;
}
.category {
  width: 100%;
  height: 100%;
  min-height: 7rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  text-align: start;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: white;
}
.category:hover, .secondary:hover { border-color: var(--button-accent); background: var(--button-accent-light); }
.category strong { display: block; font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.category-hint { display: block; margin-top: .27rem; color: #3b4c60; }
.category-icon {
  --icon-color: #24558b;
  color: var(--icon-color);
  background: #e4effb;
  display: grid;
  place-items: center;
  position: relative;
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 2.85rem;
  border-radius: .55rem;
}
.category-icon::before, .category-icon::after { content: ""; position: absolute; }
.icon-book::before { width: 1.1rem; height: 1.22rem; border: 2px solid; border-radius: .16rem; }
.icon-book::after { height: .7rem; width: .52rem; border-block: 2px solid; }
.icon-cross { --icon-color: #125c52; background: #dff2ed; }
.icon-cross::before { width: 1.3rem; height: .26rem; background: currentColor; border-radius: .12rem; }
.icon-cross::after { width: .26rem; height: 1.3rem; background: currentColor; border-radius: .12rem; }
.icon-people { --icon-color: #634187; background: #f0e9f8; }
.icon-people::before { width: .44rem; height: .44rem; border: 2px solid; border-radius: 50%; top: .65rem; }
.icon-people::after { width: 1.2rem; height: .58rem; border: 2px solid; border-radius: .6rem .6rem .2rem .2rem; bottom: .63rem; }
.icon-tools { --icon-color: #754b13; background: #faeed5; }
.icon-tools::before { width: 1.25rem; height: .83rem; border: 2px solid; border-radius: .2rem; bottom: .76rem; }
.icon-tools::after { width: .44rem; height: .24rem; border: 2px solid; border-bottom: 0; border-radius: .15rem .15rem 0 0; top: .7rem; }
.panel {
  border: 1px solid var(--border);
  background: white;
  border-radius: .9rem;
  padding: clamp(1rem, 5vw, 2rem);
}
.panel h1 { font-size: clamp(1.55rem, 4.5vw, 2.3rem); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.35rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  line-height: 1.35;
}
.primary { color: white; background: var(--button-accent); }
.primary:hover { background: var(--button-accent-dark); }
.secondary { color: var(--button-accent-dark); background: white; border-color: var(--button-accent); }
.source-link { display: inline-block; margin-top: 1.2rem; }
.study-note { color: #3b4c60; }
.progress { margin: 0 0 .65rem; color: var(--accent); font-weight: 700; }
.practice h1, .option span, .reading-aid p { white-space: pre-line; }
.reading-aid { background: #f4f7fa; border: 1px solid var(--border); border-radius: .55rem; margin-top: 1rem; padding: .85rem; }
.reading-aid h2 { font-size: 1rem; }
.reading-aid p { margin-top: .35rem; font-size: 1rem; }
fieldset { margin: 1.2rem 0 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: .6rem; }
.options { display: grid; gap: .55rem; }
.option {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem;
  min-height: 3.4rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  font-size: 1.05rem;
  cursor: pointer;
}
.option:hover, .option:has(input:checked) { background: #eaf2fd; border-color: var(--accent); }
.option input { width: 1.25rem; height: 1.25rem; flex: 0 0 1.25rem; margin: 0; accent-color: var(--accent); }
.source-links { display: flex; gap: .7rem; flex-wrap: wrap; }
.site-footer { margin-block: 2rem; border-top: 1px solid #c9d5e1; padding-top: .65rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.guide-intro .guide-back { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: .65rem; }
.guide-stack { display: grid; gap: 1rem; }
.guide-card h2 { font-size: 1.35rem; }
.guide-card ul, .guide-card dl { margin: .8rem 0 0; }
.guide-card ul { padding-inline-start: 1.4rem; font-size: 1.125rem; }
.guide-card li + li { margin-top: .4rem; }
.guide-card dl div { padding-block: .7rem; }
.guide-card dl div + div { border-top: 1px solid #d6dfe7; }
.guide-card dt { font-size: 1.08rem; font-weight: 750; }
.guide-card dd { margin: .25rem 0 0; }
.guide-notice { background: #eaf2fd; border-inline-start: .3rem solid var(--accent); }
.guide-topics, .guide-contact { margin-top: 1.4rem; }
.guide-stack .guide-contact { margin-top: 0; }
.guide-topics h2 { margin-bottom: .65rem; }
.guide-topic { color: inherit; text-decoration: none; }
.guide-links { display: flex; flex-wrap: wrap; column-gap: 1.1rem; }
.guide-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.guide-reviewed { color: #3b4c60; font-size: .95rem; }
@media (max-width: 37rem) {
  .category-list { grid-template-columns: 1fr; gap: .7rem; }
  .category { min-height: 5.6rem; }
  .actions .button { width: 100%; }
}

.home-actions { margin-top: .9rem; }
#pick-topic { scroll-margin-top: 1rem; margin-bottom: .75rem; }
.resume { flex-direction: column; align-items: start; text-align: start; gap: .25rem; margin-bottom: .9rem; }
.question-reference { color: #3b4c60; font-size: .95rem; }
.button[hidden] { display: none; }
.button.plain { margin-top: .5rem; background: transparent; color: var(--button-accent-dark); text-decoration: underline; }
.guide-card ol { margin: .8rem 0 0; padding-inline-start: 1.4rem; font-size: 1.125rem; }
.guide-card h2[tabindex] { scroll-margin-top: 1rem; }
.simulation-review { margin-block: 1rem; }
.simulation-review summary { color: var(--accent); cursor: pointer; padding-block: .65rem; font-weight: 700; }
.simulation-review ol { margin: 0; padding-inline-start: 1.25rem; }
.simulation-review li { margin-block: .75rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border); }
.simulation-review li p { margin-top: .35rem; }
.simulation-positions { gap: .4rem; margin-top: .25rem; }
.simulation-positions .button { width: auto; min-width: 3rem; padding-inline: .5rem; }
.simulation-positions .button:has(span) { border-style: dashed; }
.option span { min-width: 0; overflow-wrap: anywhere; }
.storage-status { margin: 1rem auto 0; padding: .75rem; border: 1px solid var(--border); border-radius: .55rem; font-size: 1rem; }
.registration-reminder { margin-top: 1rem; }
.registration-shortcuts { margin-top: .85rem; }
.registration-shortcuts .button { flex: 1 1 auto; }

@media (max-width: 37rem) {
  .home-actions .button, .registration-shortcuts .button { width: auto; flex: 1 1 auto; }
  .resume { width: 100%; }
}

.reading-button { padding-inline: .25rem; }
.reading-status { margin-top: .35rem; }
.reading-status:empty { margin: 0; }

.instant-options { margin: 1rem 0 0; padding: 0; list-style: none; }
.instant-option {
  width: 100%;
  background: white;
  text-align: start;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem .75rem;
}
button.instant-option { min-height: 3.5rem; }
li.instant-option { cursor: default; }
li.instant-option:not(.instant-correct, .instant-wrong):hover { background: white; border-color: var(--border); }
.instant-option.instant-draft { border-color: var(--accent); background: #eaf2fd; }
.instant-option.instant-correct, .instant-feedback.instant-correct {
  background: #e1f5e8;
  border-color: #237149;
  color: #164b31;
}
.instant-option.instant-wrong, .instant-feedback.instant-wrong {
  background: #fde8e8;
  border-color: #a52823;
  color: #78201c;
}
.instant-option:is(.instant-correct, .instant-wrong) { border-width: 2px; }
.option-mark { white-space: normal; font-size: .95rem; font-weight: 750; }
.instant-feedback {
  margin-top: .85rem;
  border-inline-start: .3rem solid;
  padding: .75rem .9rem;
  border-radius: .45rem;
}
.instant-explanation { margin-top: .9rem; }
.instant-explanation summary { min-height: 2.75rem; cursor: pointer; color: var(--accent); font-weight: 700; }

@media (max-width: 44rem) {
  .header-brand, .header-controls { flex-basis: 100%; }
  .header-controls { justify-content: space-between; }
  .header-controls .header-home { font-size: .9rem; padding-inline: .55rem; }
  .header-controls .language button { padding-inline: .55rem; }
}
@media (max-height: 420px) {
  :root[data-inner-screen] { scroll-padding-top: 0; }
  [data-inner-screen] .site-header { position: static; }
}
