:root {
  color-scheme: light; --page: #edf4f8; --paper: #fff; --ink: #172d3e; --muted: #465f70;
  --line: #c9d9e5; --blue: #154b71; --marker: #9c3c17; --mark-bg: #fff0df;
  font: 16px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.bar { background: #f8fcff; border-bottom: 1px solid var(--line); }
.mast { min-height: 3.5rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.brand { color: var(--ink); text-decoration: none; font-weight: 750; }
.mark { display: inline-grid; place-content: center; width: 1.6rem; height: 1.6rem; margin-right: .35rem; color: white; background: var(--blue); border-radius: .25rem; }
.tag, .eyebrow, .small { color: var(--muted); font-size: .86rem; }
.eyebrow { margin: 0 0 .25rem; font-weight: 700; }
h1, h2, h3, p { margin-block: 0 .75rem; }
h1 { font: 700 clamp(1.65rem, 3.2vw, 2.55rem)/1.25 "Songti SC", "Noto Serif CJK SC", serif; letter-spacing: -.02em; }
h2 { font-size: 1.14rem; }
h3 { font-size: 1rem; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; padding: 0; margin: .85rem 0 1.2rem; font-size: .84rem; color: var(--muted); }
.steps li { border-bottom: 2px solid var(--line); padding: .25rem .2rem .45rem; }
.steps [aria-current] { border-color: var(--blue); color: var(--blue); font-weight: 750; }
.page-heading { margin: 2.5rem 0 1.35rem; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; max-width: 55rem; padding-bottom: 1rem; }
.choice { position: relative; min-height: 10.5rem; padding: 1.25rem 3rem 1.25rem 1.3rem; text-align: left; background: var(--paper); border-left: 4px solid var(--blue); }
.choice span, .choice small { display: block; color: var(--muted); font-weight: 500; }
.choice strong { display: block; font-size: 1.35rem; margin: .3rem 0 .55rem; }
.choice i { position: absolute; right: 1.2rem; top: 50%; color: var(--blue); font-style: normal; }
.choice:hover { background: #f9fcfe; border-color: var(--blue); }
.work-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.12fr) minmax(0, 1fr); align-items: start; gap: .75rem; padding-bottom: 1.25rem; }
.layout[data-layout="b"], .layout[data-layout="c"], .solo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout[data-layout="b"] #coach-slot { display: none; }
.layout[data-layout="c"] .paper { grid-column: 1 / -1; }
.only-b { display: none; }
.layout[data-layout="b"] .only-b { display: inline-block; }
.panel { padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: .35rem; min-width: 0; }
#review-paused { margin-bottom: .75rem; }
#resume-practice { display: inline-block; }
.stem { font-weight: 700; }
.material-copy { max-height: 16rem; overflow-y: auto; padding-right: .25rem; }
.layout[data-layout="b"] .material-copy { max-height: none; }
.evidence { padding-left: .75rem; border-left: 2px solid var(--line); }
.evidence.accent { border-color: var(--marker); background: var(--mark-bg); }
.evidence b { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .78rem; }
.reverse { display: grid; gap: .45rem; }
.reverse-end { font-size: .82rem; color: var(--muted); margin: 0; }
.current { border-left: 3px solid var(--marker); padding: .65rem .55rem .5rem .75rem; background: var(--mark-bg); }
.current .eyebrow { color: var(--marker); }
.current .cue { margin: 0 0 .55rem; font-size: .86rem; }
.goal { padding: .6rem .65rem; background: var(--page); }
.goal label { color: var(--blue); font-weight: 750; }
.saved-nodes { padding-inline-start: 1.2rem; margin: .6rem 0 0; overflow-wrap: anywhere; }
label { display: block; font-weight: 650; margin-bottom: .25rem; }
textarea, input { width: 100%; color: var(--ink); background: white; border: 1px solid #8ca8bb; border-radius: .25rem; padding: .5rem .65rem; font: inherit; }
textarea { resize: vertical; display: block; margin-bottom: .55rem; }
button { border: 1px solid var(--line); color: var(--ink); border-radius: .3rem; background: white; font: inherit; font-weight: 650; cursor: pointer; min-height: 2.75rem; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #216d9d; outline-offset: 2px; }
.primary, .secondary, .text-button { padding: .35rem .7rem; margin: .2rem .1rem .2rem 0; }
.primary { background: var(--blue); color: white; border-color: var(--blue); }
.text-button { border: 0; background: transparent; color: var(--blue); text-decoration: underline; }
.switch { padding: 0; border: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .25rem; }
.switch legend { font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.switch button { font-size: .81rem; padding: .28rem .5rem; min-height: 2.6rem; }
.switch [aria-pressed="true"] { color: var(--blue); border-color: var(--blue); background: var(--page); }
.hint { border-top: 1px solid #d4a481; margin-top: .35rem; padding-top: .55rem; }
.hint button { display: block; width: 100%; margin-bottom: .25rem; text-align: left; padding: .35rem .55rem; }
.reflection { margin-bottom: 1.25rem; max-width: 46rem; }
.reflection details { margin-bottom: 1rem; }
.solo-material summary { min-height: 2.75rem; padding-block: .55rem; color: var(--blue); font-weight: 650; cursor: pointer; }
.solo-material[open] summary { margin-bottom: .25rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
dialog { padding: 1rem; border: 1px solid var(--line); border-radius: .35rem; max-width: min(100% - 1rem, 40rem); max-height: 88dvh; overflow: auto; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #1a344a88; }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.dialog-bar h2 { margin: 0; }
#coach-dialog .panel { border: 0; padding: .5rem; }
@media (orientation: portrait) {
  .solo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 610px) {
  .choices, .layout, .layout[data-layout="b"], .layout[data-layout="c"], .solo { grid-template-columns: 1fr; }
  .steps { font-size: .73rem; }
  .wrap { width: calc(100% - 1rem); }
  .page-heading { margin-top: 1.3rem; }
  .choice { min-height: 8rem; }
}
