@font-face { font-family: Inter; src: url("/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Plex; src: url("/plex.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #edf3e8; --sheet: #fbfdf6; --ink: #173b35; --muted: #536a5d;
  --line: #b3c8b2; --green: #225d4a; --bright: #d8eead; --code: #142c29; --mint: #c6dfc0;
  --mono: Plex, ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 15px/1.5 Inter, Arial, sans-serif; }
h1, h2, h3, p, pre { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: #2d775a; }
:focus-visible { outline: 3px solid #a9771c; outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 100px)); margin-inline: auto; }
.skip { position: fixed; z-index: 3; left: 1rem; top: 1rem; padding: 8px 12px; background: var(--bright); transform: translateY(-220%); }
.skip:focus { transform: none; }
.mast { border-bottom: 1px solid #a8bea8; }
.mast-inner { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 61px; }
.brand { font: 750 1.45rem/1 Inter,sans-serif; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; letter-spacing: -.065em; }
.brand-mark { font: 600 .77rem/1 var(--mono); color: #e7f6cb; background: var(--green); padding: 8px 5px; border-radius: 3px; letter-spacing: -.08em; }
.brand-end { margin-left: -6px; color: var(--green); }
.mast nav { display: flex; gap: 22px; align-items: center; }
.mast nav a, .text-button { color: inherit; font-size: .8rem; font-weight: 680; text-decoration: none; }
.text-button { background: none; border: 0; padding: 7px 0; }
.text-button:hover, .mast nav a:hover { text-decoration: underline; }
.intro { display: grid; grid-template-columns: 1fr minmax(240px,.58fr); align-items: end; gap: 12px 27px; padding: 33px 0 27px; }
.eyebrow { margin-bottom: 5px; color: #49604e; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
h1 { font: 800 clamp(3.2rem,6.45vw,5.9rem)/.88 Inter,sans-serif; letter-spacing: -.075em; }
h1 span { color: var(--green); }
.intro > p { color: var(--muted); font-size: 1rem; max-width: 320px; padding-bottom: 2px; }
.practice { display: grid; grid-template-columns: minmax(185px,.42fr) minmax(0,1.8fr); align-items: start; column-gap: 18px; }
.decks { padding-top: 7px; }
.decks h2 { font-size: .8rem; font-weight: 750; margin-bottom: 10px; }
#decks { display: grid; gap: 6px; }
.deck {
  display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 7px;
  width: 100%; min-height: 68px; text-align: left; padding: 10px 8px;
  border: 1px solid #b7ccb4; border-radius: 4px; background: #f8fcf2; color: var(--ink);
}
.deck:hover { background: #e4efd9; }
.deck[aria-pressed="true"] { color: #e9f7df; border-color: var(--green); background: var(--green); }
.deck-icon { align-self: center; text-align: center; white-space: nowrap; font: 500 1.12rem/1 var(--mono); }
.deck strong { display: block; font-size: .78rem; line-height: 1.35; }
.deck small { display: block; font-size: .67rem; font-weight: 470; margin-top: 4px; color: var(--muted); }
.deck[aria-pressed="true"] small { color: #d4e8d0; }
#local-note { font-size: .7rem; color: var(--muted); margin-top: 10px; }
.work { min-width: 0; background: var(--sheet); border: 1px solid #8eaf9a; border-radius: 5px; overflow: clip; }
.card-head { display: flex; gap: 8px 15px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 8px 15px; background: #dcebd4; border-bottom: 1px solid #a7c19f; font-size: .72rem; font-weight: 670; }
.card-progress { display: flex; gap: 14px; flex-wrap: wrap; }
.catalog-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.catalog-topic { background: var(--sheet); border: 1px solid var(--line); border-radius: 5px; padding: 16px; }
.catalog-topic h2 { font-size: 1.25rem; letter-spacing: -.035em; }
.catalog-topic > p { color: var(--muted); margin-top: 4px; font-size: .83rem; }
.catalog-topic ol { padding: 0; list-style: none; margin: 15px 0 0; }
.catalog-topic li + li { border-top: 1px solid var(--line); }
.catalog-topic a { display: block; padding: 12px 0; font-size: .88rem; }
.guide.study h1 { font-size: clamp(2rem,4.5vw,3.4rem); line-height: 1.02; }
.study .options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding: 0; list-style: none; margin-top: 14px; counter-reset: answer; }
.study .options li { counter-increment: answer; border: 1px solid var(--line); background: var(--sheet); border-radius: 4px; padding: 10px; }
.study .options li::before { content: counter(answer,upper-alpha); font: 650 .72rem/1.5 Inter,sans-serif; color: var(--muted); }
.study .options pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .79rem/1.6 var(--mono); margin-top: 4px; }
.study details { margin-top: 18px; border: 1px solid #91b08f; border-radius: 5px; background: #e3efd8; padding: 14px; }
.study summary { cursor: pointer; font-weight: 740; }
.study details p { margin-top: 10px; }
.study details ol { padding-left: 21px; font-size: .9rem; }
.study details li + li { margin-top: 7px; }
.study details .guide-code { margin-bottom: 0; }
.study .study-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.study .study-links .primary { margin-top: 0; }
.question, .finished { padding: 16px; }
#card-title { font-size: clamp(1.25rem,3vw,1.75rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 740; }
.code-window { background: var(--code); border: 1px solid #264b42; color: #e5f0df; border-radius: 5px; margin-top: 13px; overflow: hidden; }
.code-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; background: #1d3933; border-bottom: 1px solid #456157; padding: 7px 11px; color: #b7d3bb; font: .68rem/1.5 var(--mono); }
#source { max-width: 100%; overflow: auto; padding-block: 12px 14px; font: .81rem/1.75 var(--mono); tab-size: 2; }
#source code { display: block; width: fit-content; min-width: 100%; font: inherit; }
.code-line { display: flex; width: 100%; padding: 0 13px 0 0; white-space: pre; }
.line-number { padding: 0 10px 0 9px; width: 37px; text-align: right; color: #7d9f8e; flex-shrink: 0; user-select: none; }
.line-current { background: #354c33; box-shadow: inset 3px 0 #cbeba5; }
.token-string { color: #e9c791; }
.token-keyword { color: #c2aae4; }
.token-built-in { color: #9bd9d7; }
.token-number { color: #c9e5a4; }
fieldset { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
legend { font-size: .85rem; font-weight: 720; margin-bottom: 6px; padding: 0; }
#answers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.answer {
  display: flex; gap: 8px; align-items: flex-start; background: #f4f8ed;
  border: 1px solid #b4c7a9; border-radius: 4px; padding: 9px;
  min-height: 52px; cursor: pointer;
}
.answer:hover { background: #eaf2dd; border-color: #6a987b; }
.answer input { flex: none; margin: 4px 0 0; accent-color: var(--green); }
.answer-output { display: block; overflow-wrap: anywhere; white-space: pre-wrap; color: #173b35; font: .8rem/1.6 var(--mono); min-width: 0; }
.answer-caption { font: 650 .65rem/1.5 Inter,sans-serif; }
.answer:has(input:checked) { border-color: #276342; background: #e0edd4; box-shadow: inset 0 0 0 1px #276342; }
.answer.is-correct { border-color: #42744c; background: #d7eccd; }
.answer.is-wrong { border-color: #ad7455; background: #f5e3d1; box-shadow: inset 0 0 0 1px #ad7455; }
.answer:has(input:disabled) { cursor: default; }
.primary, .quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid #7c9b7b; border-radius: 3px; padding: 6px 10px; min-height: 37px;
  background: transparent; color: var(--ink); font-size: .76rem; font-weight: 730;
  text-decoration: none; text-align: center;
}
.primary { background: var(--green); border-color: var(--green); color: #f5fce9; }
.primary:hover { background: #174e3c; color: #fff; }
.quiet:hover { background: #e2eed5; }
button:disabled { opacity: .45; cursor: default; }
#check { margin-top: 10px; }
.reveal { margin-top: 12px; border-top: 1px solid #b7caaa; padding-top: 9px; }
#verdict { font-size: .85rem; font-weight: 770; color: #2d693c; }
#verdict[data-correct="false"] { color: #8d4c25; }
#explanation { margin-top: 4px; color: var(--muted); font-size: .84rem; }
.trace { background: #eaf0de; border: 1px solid #b8c8a5; border-radius: 4px; padding: 9px 10px; margin-top: 11px; }
.trace-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trace h3 { font-size: .81rem; }
#trace-count { color: var(--muted); font: .68rem/1.2 var(--mono); }
#trace-text { color: #36563d; margin-top: 5px; font-size: .81rem; }
.trace-controls { display: flex; gap: 6px; margin-top: 8px; }
.trace-controls button { min-height: 30px; font-size: .7rem; }
.reveal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 10px; }
#reference { font-size: .73rem; color: #42694e; }
.finished h2 { font-size: 1.7rem; line-height: 1.05; letter-spacing: -.055em; }
#finished-result { font-size: .94rem; color: var(--muted); margin-top: 8px; }
#session-review { display: grid; margin-top: 13px; gap: 5px; }
.review-item { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid #b8cdb0; border-radius: 4px; background: #f5faed; font-size: .78rem; }
.review-item > strong { color: var(--muted); font-size: .68rem; }
.review-item[data-correct="false"] { border-color: #d1bda4; background: #faf1e2; }
.finish-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.schedule-note { margin-top: 10px; color: var(--muted); font-size: .75rem; }
footer { margin-top: 15px; padding: 13px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; font-size: .76rem; color: var(--muted); border-top: 1px solid var(--line); }
footer span { font-weight: 750; }
.notice { margin-block: 10px; padding: 8px; border-radius: 3px; background: #f2e3c6; }
dialog {
  width: min(445px,calc(100% - 24px)); color: var(--ink); background: var(--sheet);
  border: 1px solid #7c9c85; border-radius: 5px; padding: 18px; max-height: calc(100% - 26px);
}
dialog::backdrop { background: #19382e9e; }
dialog h2 { font-size: 1.48rem; line-height: 1.08; letter-spacing: -.045em; }
#progress-summary { margin-top: 10px; color: var(--muted); font-size: .88rem; }
#topic-progress { list-style: none; padding: 0; margin: 13px 0; display: grid; gap: 5px; font-size: .81rem; }
#topic-progress li { padding-top: 5px; border-top: 1px solid var(--line); }
.progress-files { display: flex; flex-wrap: wrap; gap: 6px; }
#close-progress { margin-top: 12px; }
#import-form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
#import-form label { display: block; font-weight: 690; font-size: .8rem; }
#import-form input { display: block; margin-top: 6px; max-width: 100%; font-size: .77rem; }
#import-form p { margin-block: 6px; font-size: .78rem; color: var(--muted); }
#import-error { color: #984c2d !important; }
.guide { width: min(775px,100%); margin: 38px auto 30px; }
.guide h1 { font-size: clamp(3.05rem,6.2vw,5.4rem); }
.guide .lead { margin-top: 15px; font-size: 1.03rem; color: var(--muted); }
.guide section { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 11px; }
.guide h2 { font-size: clamp(1.17rem,3vw,1.5rem); line-height: 1.1; letter-spacing: -.035em; }
.guide section p { margin-top: 7px; color: var(--muted); }
.guide-code { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 12px; color: #e4f5da; background: var(--code); padding: 13px; border-radius: 4px; font: .8rem/1.7 var(--mono); }
.guide .primary { margin-top: 16px; }
.guide p code { font-family: var(--mono); font-size: .9em; background: #dfebd5; padding: 1px 3px; border-radius: 3px; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 56px); }
  .practice { grid-template-columns: minmax(165px,.47fr) minmax(0,1.8fr); gap: 11px; }
  #source { font-size: .74rem; }
  .intro p { font-size: .91rem; }
}
@media (max-width: 650px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .shell { width: calc(100% - 24px); }
  .mast-inner { min-height: 52px; }
  .mast nav { gap: 12px; }
  .mast nav a, .text-button { font-size: .72rem; }
  .brand { font-size: 1.24rem; }
  .intro { grid-template-columns: 1fr; padding: 24px 0 17px; gap: 12px; }
  h1 { font-size: clamp(2.9rem,10.2vw,4.45rem); }
  .intro > p { max-width: 460px; }
  .practice { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .decks { padding-top: 0; }
  .decks h2 { margin-bottom: 5px; }
  #decks { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  .deck { min-height: 59px; padding: 8px 6px; grid-template-columns: 23px minmax(0,1fr); gap: 5px; }
  .deck small { font-size: .61rem; margin-top: 3px; }
  .deck strong { font-size: .72rem; }
  .deck-icon { font-size: .9rem; }
  #local-note { margin-top: 6px; }
  .card-head { padding: 7px 10px; font-size: .68rem; }
  .question, .finished { padding: 11px; }
  .primary, .quiet { min-height: 40px; }
}
@media (max-width: 360px) {
  #answers { grid-template-columns: minmax(0,1fr); }
  .answer { min-height: 44px; padding: 7px; }
  .line-number { width: 28px; padding-inline: 4px 6px; }
  .mast nav { gap: 7px; }
  .mast nav a, .text-button { font-size: .65rem; }
}

/* RSIO Fleet SSR Overview — zero-JS readable summary, inherits site theme */
.rsio-ssr-overview {
  margin: 2.5rem auto 1.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 3%, transparent);
  max-width: 74rem;
}
.rsio-ssr-overview h2 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  line-height: 1.3;
}
.rsio-ssr-overview h3 {
  margin: 1.15rem 0 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
}
.rsio-ssr-overview p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
  max-width: 72ch;
}
.rsio-ssr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.rsio-ssr-card {
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 8px;
}
.rsio-ssr-card ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.55;
}
.rsio-ssr-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}
.rsio-ssr-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
