* {
  box-sizing: border-box;
  min-width: 0;
}
body {
  margin: 0;
  background: #f5f7f4;
  color: #173d39;
  font:
    16px/1.55 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  overflow-wrap: anywhere;
}
header {
  background: white;
  border-bottom: 1px solid #dae5df;
}
.wrap {
  width: min(1100px, 92%);
  margin: auto;
}
.top,
.actions,
nav,
.brand,
.line,
.choice {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.top,
.line {
  justify-content: space-between;
}
.top {
  padding: 17px 0;
}
.brand {
  font-size: 21px;
  letter-spacing: -0.7px;
  gap: 6px;
  color: #104743;
}
.brand span {
  font-weight: 400;
}
a {
  color: #09655a;
  text-decoration: none;
  font-weight: 650;
}
a:hover {
  text-decoration: underline;
}
nav a,
nav button {
  font-size: 14px;
  padding: 10px 4px;
}
nav a.active {
  box-shadow: 0 3px #d3a543;
}
main {
  margin: 30px 0;
}
main:focus {
  outline: none;
}
h1,
h2,
h3,
p {
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -1px;
  line-height: 1.18;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 17px;
}
small,
.muted,
footer {
  font-size: 14px;
  color: #526c68;
}
footer {
  padding: 20px 0 36px;
  border-top: 1px solid #d9e3de;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 42px);
  background: #104743;
  border-radius: 22px;
  color: white;
  margin-bottom: 20px;
}
.hero .eyebrow,
.hero .tag {
  color: #ffda87;
}
.hero p {
  color: #e2f0ec;
}
.hero .btn,
.hero button {
  background: #ffda87;
  color: #153d38;
  border: none;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 1.4px;
  font-weight: 750;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #496961;
}
.ring {
  flex: none;
  border: 6px solid #41736c;
  border-top-color: #efc975;
  border-radius: 50%;
  width: 134px;
  height: 134px;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring strong {
  font-size: 29px;
}
.grid,
.metrics,
.filters {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  margin: 16px 0;
}
.metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 152px), 1fr));
  gap: 10px;
}
.filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  align-items: end;
}
.card,
article,
.item,
.metric {
  background: white;
  border: 1px solid #dbe5de;
  border-radius: 16px;
  padding: 21px;
  display: block;
}
.item {
  margin: 10px 0;
  padding: 16px;
}
.metric {
  text-align: left;
  font-weight: 500;
  padding: 14px;
}
.metric b {
  display: block;
  font-size: 27px;
  color: #104743;
}
.metric.selected,
.item:hover {
  border-color: #167265;
  background: #edf6f1;
}
.tag,
.pill {
  font-weight: 650;
  font-size: 13px;
}
.pill {
  border-radius: 20px;
  padding: 5px 10px;
  background: #e5f2ec;
  color: #12584b;
}
.late,
#notice:not(:empty) {
  color: #8c3714;
  background: #fff1df;
}
#notice:not(:empty) {
  padding: 14px;
  border-radius: 12px;
  margin-top: 16px;
  position: sticky;
  top: 4px;
  z-index: 1;
}
button,
input,
select,
textarea,
.btn {
  color: inherit;
  background: white;
  border: 1px solid #becfc9;
  border-radius: 10px;
  font: inherit;
  padding: 10px 13px;
  min-height: 45px;
  max-width: 100%;
}
button,
.btn,
summary {
  cursor: pointer;
  font-weight: 650;
}
button:hover,
.btn:hover {
  filter: brightness(0.95);
  text-decoration: none;
}
.btn {
  display: inline-block;
  background: #11675e;
  color: white;
  border-color: transparent;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 5px;
}
input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  flex: none;
}
label {
  font-size: 14px;
  font-weight: 600;
  display: block;
}
label.choice {
  padding: 10px 0;
  min-height: 44px;
  flex-wrap: nowrap;
}
.actions {
  margin: 12px 0;
}
.stack > * + * {
  margin-top: 14px;
}
details {
  padding: 13px 0;
  border-bottom: 1px solid #e1e8e3;
}
summary {
  padding: 8px 0;
}
blockquote {
  margin: 18px 0;
  padding: 16px 18px;
  background: #f8f4e9;
  border-left: 4px solid #d6a846;
  border-radius: 0 10px 10px 0;
  font-size: 19px;
}
.reading {
  max-width: 790px;
  margin: 18px auto;
}
.answer {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 14px;
  padding: 16px;
  margin: 12px 0;
}
.answer b {
  color: #11675e;
  background: #e8f4ee;
  border-radius: 8px;
  padding: 5px 11px;
  flex: none;
}
.answer:hover {
  background: #f4faf6;
}
progress {
  accent-color: #167368;
  width: 100%;
  height: 11px;
  margin: 10px 0 16px;
}
.scroll {
  max-height: 280px;
  overflow: auto;
}
.section {
  margin-top: 26px;
}
*:focus-visible {
  outline: 3px solid #ad6a00;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.hero :focus-visible {
  outline-color: white;
}
.flag {
  color: #8b3615;
}
.session {
  font-size: 13px;
}
#clock {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .top {
    gap: 8px;
    padding: 12px 0;
  }
  nav {
    gap: 10px;
  }
  nav a,
  nav button {
    font-size: 13px;
  }
  .hero {
    display: block;
  }
  .ring {
    width: auto;
    height: auto;
    border: 0;
    display: block;
    text-align: left;
    margin-top: 12px;
  }
  .ring strong {
    font-size: 20px;
    margin-right: 6px;
  }
  main {
    margin: 18px 0;
  }
  article,
  .card {
    padding: 16px;
  }
  .metrics,
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters {
    gap: 10px;
  }
  .filters input,
  .filters select {
    padding: 9px 5px;
    font-size: 16px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .item .line {
    align-items: flex-start;
  }
  .metric {
    font-size: 14px;
  }
  .actions > * {
    flex-grow: 1;
    text-align: center;
  }
  .hero h1 {
    font-size: 28px;
  }
}
@media (max-width: 370px) {
  .filters {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 19px;
  }
}

/* Keep touch controls and native inputs usable on narrow screens. */
nav a,
summary {
  min-height: 44px;
}
fieldset {
  min-inline-size: 0;
  max-inline-size: 100%;
  margin: 0;
  border: 1px solid #90a9a1;
  border-radius: 10px;
  padding: 12px;
}
legend {
  max-inline-size: 100%;
  padding-inline: 6px;
}
input,
select,
textarea,
button {
  border-color: #748e86;
}
input[type='datetime-local'],
input[type='date'] {
  min-inline-size: 0;
  inline-size: 100%;
}
nav a {
  display: inline-flex;
  align-items: center;
}
input,
textarea {
  cursor: text;
}
@media (max-width: 480px) {
  .filters {
    grid-template-columns: 1fr;
  }
  .filters input,
  .filters select {
    min-height: 48px;
    padding-inline: 10px;
  }
  .actions .btn,
  .actions button {
    white-space: normal;
  }
  .reading {
    padding: 15px;
  }
  .answer {
    gap: 10px;
    padding: 12px;
  }
  .scroll {
    overscroll-behavior: contain;
  }
}

.save-line {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 14px;
  color: #385f58;
  font-size: 15px;
}
.save-line a,
.mistake a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
.answer:disabled {
  opacity: 1;
  color: #42605c;
}
.answer.chosen {
  background: #e5f2ec;
  border-color: #11675e;
  box-shadow: inset 3px 0 #11675e;
}
.right-answer {
  background: #e5f2ec;
  border-color: #11675e;
}
.your-answer,
.mistake p {
  overflow-wrap: anywhere;
}
.mistake summary {
  font-weight: 650;
  color: #104743;
}
.review-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.review-item > div {
  flex: 1 1 190px;
}
.catalog-count {
  font-variant-numeric: tabular-nums;
  color: #385f58;
}
#results .pill {
  display: inline-block;
  margin: 3px 0;
}
@media (max-width: 480px) {
  .review-item .btn {
    width: 100%;
    text-align: center;
  }
}

/* Keep the active question in view without covering an answer. */
#network:not(:empty) {
  padding: 12px 16px;
  margin-top: 12px;
  background: #fff1df;
  color: #743713;
  border-radius: 10px;
}
#focus { margin-bottom: 12px; }
.focused nav a:not([href="#account"]):not([href="#home"]), .focused footer { display: none; }
.save-line {
  gap: 10px;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid #c2d3cd;
}
.save-line a { padding: 0 14px; border: 1px solid; border-radius: 12px; }
@media (max-width: 740px) and (min-height: 500px) {
  .save-line { position: sticky; bottom: 0; z-index: 2; }
  .save-line button { flex: 1; }
  #saved { flex-basis: 100%; }
  .answer { scroll-margin-bottom: 10rem; }
  .reading:has(.answer, .save-line) { min-height: calc(100svh - 90px); display: flex; flex-direction: column; }
  .reading .save-line { margin-top: auto; }
}
@media (max-width: 740px) {
  nav { gap: 2px 12px; }
  .top { padding-block: 9px; }
  nav a, nav button { padding-block: 6px; }
  button, select, input, textarea, .btn { max-width: 100%; overflow-wrap:anywhere; white-space: normal; }
}
html[data-text="large"] body { font-size: 19px; }
html[data-text="larger"] body { font-size: 23px; }
html:not([data-text="normal"]) .reading :is(p,button,summary,label,small) { font-size: inherit; }
html[data-spacing="open"] :is(p,blockquote,li,.answer,summary) { line-height: 2; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #102422; color: #eff8f5; }
html[data-theme="dark"] :is(header,article,.item,.card,.metric,.save-line,details,fieldset,blockquote,
  input,textarea,select,button:not(.btn),.answer,.filters,.review-item,.right-answer,.stack .item) {
  background-color: #183733; color: #f0f7f3; border-color: #557c74;
}
html[data-theme="dark"] :is(small,.muted,footer,.eyebrow,.catalog-count,.session) { color: #bed6d1; }
html[data-theme="dark"] :is(a:not(.btn),summary,h1,h2,h3) { color: #ffdf92; }
html[data-theme="dark"] .flag { color: #ffbf98; }
html[data-theme="dark"] .answer.chosen { background: #24645b; }
html[data-theme="dark"] :focus-visible { outline-color: #ffdf92; }

.learn-tools {
  margin-block: 1rem;
}
.learn-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.learn-menu a {
  padding: 10px 14px;
  border: 1px solid #b6cfc6;
  border-radius: 12px;
}
.learn-menu [aria-current] {
  color: #fff;
  background: #104743;
  border-color: #104743;
}
.learn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.learn-row > div {
  flex: 1 1 220px;
}
.learn-panel label,
.learn-panel .item {
  overflow-wrap: anywhere;
}
.learn-panel .learn-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-block: 12px;
}
.learn-panel .learn-actions button {
  flex: 1 1 120px;
}
.learn-panel .learn-choice {
  display: flex;
  align-items: center;
  gap: 8px;
}
.learn-panel input[type='radio'] {
  flex: none;
  width: 20px;
  min-height: 20px;
  margin: 0;
}
.learn-chart {
  display: grid;
  grid-template-columns: auto minmax(35px, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
}
.learn-chart progress {
  height: 18px;
}
.learn-panel .reading {
  margin-inline: auto;
}
.learn-panel .learn-hide {
  display: none;
}
.learn-panel .learn-card {
  font-size: clamp(1.25rem, 3vw, 2rem);
  margin: 20px 0;
}
.learn-panel .learn-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.learn-note {
  white-space: pre-wrap;
}
@media print {
  body:has(#learn-paper) header,
  body:has(#learn-paper) footer,
  body:has(#learn-paper) #notice,
  body:has(#learn-paper) main > :not(.learn-panel),
  .learn-panel:has(#learn-paper) > :not(#learn-paper),
  .learn-private,
  .learn-tools {
    display: none !important;
  }
  #learn-paper {
    display: block;
    color: #111;
    background: white;
  }
  #learn-paper article,
  #learn-paper .item {
    break-inside: avoid;
    border: none;
    padding: 6pt;
  }
  #learn-paper .grid {
    display: block;
  }
}

.exam-studio {
  display: grid;
  gap: 16px;
}
.exam-studio .grid {
  align-items: start;
}
.exam-studio .reading {
  width: 100%;
}
.exam-studio form[aria-busy='true'] button {
  opacity: 0.65;
  cursor: progress;
}
.exam-studio textarea {
  width: 100%;
  max-width: 100%;
  min-height: 5em;
  resize: vertical;
}
.exam-studio fieldset {
  border: 1px solid #bdd3c8;
  border-radius: 12px;
  padding: 16px;
}
.exam-flag {
  margin-top: 16px;
}
.exam-flag form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding-block: 12px;
}
.exam-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.exam-compare > div {
  border-inline-start: 3px solid #8ca8a3;
  padding-inline-start: 12px;
}
.exam-compare > div + div {
  border-color: #bf8d38;
}
#exam-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
@media (max-width: 560px) {
  .exam-compare {
    grid-template-columns: 1fr;
  }
  .exam-studio .actions > label,
  .exam-studio .actions > button {
    width: 100%;
  }
}

.coach-desk {
  align-items: start;
}
.coach-desk .item form {
  margin-top: 12px;
}
.coach-branch {
  margin: 8px 0 0 10px;
  padding-left: 14px;
  border-left: 2px solid #acbeb7;
}
.coach-agenda {
  padding-left: 22px;
}
.coach-agenda li {
  margin: 14px 0;
}
.coach-agenda .actions {
  margin-top: 4px;
}
.coach-desk progress {
  display: block;
}
@media (max-width: 540px) {
  .coach-branch {
    margin-left: 2px;
    padding-left: 7px;
  }
  .coach-desk .item {
    padding: 12px;
  }
}
