/* CornerCat Prep: text-first, compact, and consistent across all pages. */
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #20232d; background: #fff; line-height: 1.6;
  --blue: #2424df; --blue-dark: #1919ad; --ink: #20232d;
  --muted: #5d6170; --line: #e0e3ef; --tint: #f3f4ff;
}
* { box-sizing: border-box; }
body { max-width: 960px; margin: 0 auto; padding: 0 28px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 2px solid var(--blue); padding: 18px 0 15px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue); flex-shrink: 0; }
.brand img { display: block; width: 56px; height: 56px; object-fit: contain; }
.wordmark { font-size: 1.65rem; line-height: 1.15; font-weight: 750; letter-spacing: -.065em; }
.wordmark strong { font-weight: 400; letter-spacing: -.045em; }
.tagline { color: var(--muted); font-size: .82rem; text-align: right; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); text-decoration: none; }
:where(a,button,input,summary,select):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
main { max-width: 740px; margin: 28px auto 48px; min-height: 280px; }
h1 { font-size: clamp(1.65rem,4vw,2rem); line-height: 1.2; letter-spacing: -.035em; margin: 20px 0 12px; }
h2 { font-size: 1.1rem; line-height: 1.4; }
section { margin: 28px 0; }
section h2 { background: var(--tint); color: var(--blue-dark); padding: 8px 12px; border-bottom: 1px solid #d8dcff; font-size: 1rem; }
.muted,.meta,nav,footer { color: var(--muted); font-size: .88rem; }
nav { margin-bottom: 24px; line-height: 1.8; }
.topics { padding-left: 0; list-style: none; border-top: 1px solid var(--line); }
.topics li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.topics a { font-weight: 600; }
.notice { background: #f6f7fa; border-left: 3px solid #b7bdcd; padding: 9px 12px; font-size: .82rem; color: #535968; }
.meta,.pager { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.prompt { font-size: 1.15rem; font-weight: 500; white-space: pre-line; margin: 25px 0; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.choice { display: flex; gap: 10px; align-items: baseline; padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; margin: 7px 0; cursor: pointer; overflow-wrap: anywhere; }
.choice:hover { background: var(--tint); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--tint); }
input[type=radio] { accent-color: var(--blue); flex-shrink: 0; }
button,.button { display: inline-block; font: inherit; font-size: .93rem; font-weight: 600; background: var(--blue); color: #fff; border: 1px solid var(--blue); padding: 9px 15px; border-radius: 5px; cursor: pointer; text-decoration: none; }
button:hover:not(:disabled) { background: var(--blue-dark); }
button.secondary { background: #fff; color: var(--blue-dark); border-color: #c4c8eb; margin-left: 6px; }
button.secondary:hover:not(:disabled) { background: var(--tint); }
select { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c4c8eb; border-radius: 4px; padding: 6px 8px; }
details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; margin: 20px 0; }
summary { color: var(--blue-dark); cursor: pointer; }
details p { white-space: pre-line; }
.correct { color: #156633; }
.incorrect { color: #a12222; }
.progress { font-size: .85rem; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 18px 0; margin-top: 40px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
[hidden] { display: none !important; }
/* Random practice sessions */
.session-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0 10px; }
.session-toolbar button.secondary { margin-left: auto; }
.session-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#session-stats { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
#practice-session,#session-end { border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 6px; padding: 20px; margin: 18px 0; }
#session-solution { background: var(--tint); border-left: 3px solid var(--blue); padding: 12px 16px; margin: 18px 0; }
#session-solution h2 { margin: 0 0 8px; }
#solution-explanation { white-space: pre-line; margin: 0; }
#next-question { margin: 8px 0 0; }
button:disabled { opacity: .6; cursor: default; }
fieldset:disabled .choice { cursor: default; }
#session-feedback { font-weight: 600; }
#session-feedback:empty { display: none; }
@media (max-width: 540px) {
  body { padding: 0 16px; }
  header { flex-wrap: wrap; gap: 4px; padding: 12px 0; }
  .brand img { width: 48px; height: 48px; }
  .wordmark { font-size: 1.45rem; }
  .tagline { width: 100%; text-align: left; padding-left: 58px; font-size: .76rem; }
  main { margin-top: 20px; }
  #practice-session,#session-end { padding: 14px; }
  .session-toolbar button.secondary { margin-left: 0; }
  .prompt { font-size: 1.05rem; }
}
