:root { --ink: #1d2433; --muted: #5b6475; --bg: #f4f6fb; --card: #fff; --blue: #2f5bea; --green: #1f9d55; --red: #d64545; --amber: #c27c0e; --line: #dde2ee; }
* { box-sizing: border-box; }
body { margin: 0; font: 20px/1.55 -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: #1f2a44; color: #fff; }
.top .title { flex: 1; font-weight: 800; font-size: 22px; } .top .title span { font-weight: 500; opacity: .75; }
.ghost { background: transparent; color: #fff; border: 2px solid #ffffff66; border-radius: 10px; padding: 6px 12px; font-size: 17px; font-weight: 700; cursor: pointer; }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; opacity: .9; }
main { max-width: 820px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 14px 0; box-shadow: 0 2px 8px #1d243310; }
h1 { font-size: 30px; margin: 6px 0 4px; } h2 { font-size: 24px; margin: 0 0 8px; } h3 { font-size: 20px; margin: 14px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 16px; }
.btn { display: inline-block; border: 0; border-radius: 12px; padding: 12px 22px; font-size: 20px; font-weight: 700; cursor: pointer; background: var(--blue); color: #fff; margin: 6px 6px 0 0; }
.btn.alt { background: #e8ecf8; color: var(--ink); } .btn.green { background: #17803f; } .btn:disabled { opacity: .45; cursor: default; }
.tag { display: inline-block; font-size: 16px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #e8ecf8; color: var(--muted); margin-right: 6px; }
.tag.l1 { background: #e3f6ea; color: #17733f; } .tag.l2 { background: #fff2d6; color: #8a5a00; } .tag.l3 { background: #fde4e4; color: #a12b2b; }
.q { font-size: 22px; font-weight: 600; white-space: pre-wrap; margin: 10px 0 14px; }
.opt { display: block; width: 100%; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 16px; margin: 10px 0; font-size: 20px; cursor: pointer; color: var(--ink); }
.opt b { display: inline-block; width: 30px; color: var(--muted); }
.opt.sel { border-color: var(--blue); background: #eef2ff; } .opt.right { border-color: var(--green); background: #e7f7ee; } .opt.wrong { border-color: var(--red); background: #fdeeee; }
.opt:disabled { cursor: default; }
.hint { background: #fff8e6; border-left: 5px solid #f0b429; border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 18px; }
.verdict { font-size: 24px; font-weight: 800; margin: 12px 0 4px; } .verdict.ok { color: var(--green); } .verdict.no { color: var(--red); }
.why { background: #fdeeee; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0; }
.steps li { position: relative; padding: 10px 12px 10px 48px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: #fbfcff; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 16px; font-weight: 800; text-align: center; line-height: 26px; }
.steps .do { font-weight: 600; } .steps .wh { color: var(--muted); font-size: 17px; }
.check { font-size: 17px; color: var(--muted); }
.bar { height: 12px; background: #e3e7f2; border-radius: 99px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--green); }
.learn { white-space: pre-wrap; }
table { width: 100%; border-collapse: collapse; font-size: 16px; } td, th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.st-new { color: var(--muted); } .st-practicing { color: var(--amber); font-weight: 700; } .st-stable { color: var(--green); font-weight: 700; } .st-learning { color: var(--blue); font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 560px) { body { font-size: 18px; } .q { font-size: 20px; } .opt { font-size: 18px; } h1 { font-size: 26px; } }

ul.learn { margin: 6px 0 4px; padding-left: 22px; } ul.learn li { margin: 6px 0; line-height: 1.5; }

.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .9em; line-height: 1.15; margin: 0 .12em; }
.fr > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 .2em; }
.fr > span:last-child { padding: 0 .2em; }

.lesson-head { background: #1e2a4a; color: #fff; }
.lesson-head h1 { color: #fff; margin: 2px 0 0; }
.lesson-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .12em; color: #ffd76a; }
.card.center { text-align: center; }

.lesson-dots { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; } .lesson-dots i { width: 12px; height: 12px; border-radius: 50%; background: #d6dbe8; } .lesson-dots i.on { background: #3b5bdb; transform: scale(1.3); } .lesson-dots i.done { background: #2f9e44; } .lesson-dots span { margin-left: 6px; color: var(--muted); font-size: 16px; }
.learn.big { font-size: 22px; } .think { background: #fff8e1; border: 1px dashed #e0b84a; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-weight: 600; }
.steps li.pop { animation: pop .35s ease; } @keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.answer-line { font-size: 20px; background: #e9f7ee; border-radius: 10px; padding: 10px 12px; }
.lesson-nav { justify-content: space-between; margin-top: 6px; }
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 16px; font-weight: 700; color: #8a93a8; } .trail b { color: #c0c6d4; } .trail span { padding: 3px 9px; border-radius: 999px; background: #eef1f7; } .trail span.done { background: #e3f4e8; color: #2b8a3e; } .trail span.on { background: #3b5bdb; color: #fff; }
.meter-row { margin: 0 0 10px; font-size: 16px; font-weight: 600; } .meter-row small { color: var(--muted); font-weight: 400; }
.levelup { font-size: 24px; font-weight: 800; color: #fff; background: linear-gradient(90deg,#2f9e44,#37b24d); border-radius: 14px; padding: 12px 16px; margin: 10px 0; animation: pop .4s ease; }
.book-cover { background: #1e2a4a; color: #fff; } .book-cover h1 { color: #fff; } .book-cover .muted { color: #c9d2ea; }
.done-today { font-size: 20px; font-weight: 800; color: #ffd76a; }
.chap h2 { font-size: 21px; margin-bottom: 6px; } .toc { list-style: none; padding: 0; margin: 0; }
.toc li { border-top: 1px solid var(--line); } .toc li > button { display: flex; width: 100%; gap: 12px; align-items: baseline; background: none; border: 0; padding: 10px 4px; font: inherit; font-size: 18px; text-align: left; cursor: pointer; color: var(--ink); }
.toc li > button:hover { background: #f2f5fc; } .toc .no { font-weight: 800; color: var(--blue); min-width: 44px; } .toc .t { flex: 1; } .toc .st { font-weight: 800; color: var(--amber); }
.toc-done .st { color: var(--green); } .toc-done .t { color: var(--muted); }
.toc .extra { font-size: 16px; color: var(--muted); padding: 0 4px 8px 60px; } .toc .extra button { background: none; border: 0; color: var(--blue); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.toc-link { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 16px; cursor: pointer; color: var(--ink); }
.ex-bar { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; color: var(--muted); margin: 0 0 6px; } .ex-bar .bar { flex: 1; }
.big-score { font-size: 64px; font-weight: 900; color: var(--amber); } .big-score.ok { color: var(--green); }
.sheet-q .qn { color: var(--blue); font-weight: 900; margin-right: 4px; } .sheet-q .mark { float: right; }
.sheet-ok { border-left: 6px solid var(--green); } .sheet-no { border-left: 6px solid var(--red); }
b.no { color: var(--red); } b.okc { color: var(--green); } details summary { cursor: pointer; color: var(--blue); font-weight: 700; margin: 6px 0; }
.tagline { font-size: 16px; color: var(--amber); font-weight: 700; margin: -6px 0 6px; } .reteach { border-left: 6px solid #f0b429; }
/* textbook look (owner 11-03: 哥哥 does not want it to feel like AI) — plain paper, black text, one accent, no emoji */
body.tb { background: #fff; font-family: Georgia, "Times New Roman", serif; }
body.tb .top { background: #fff; color: #111; border-bottom: 3px solid #1f3a6b; } body.tb .top .ghost { color: #1f3a6b; border-color: #1f3a6b; }
body.tb .card { box-shadow: none; border-radius: 4px; border: 1px solid #cfd4dc; }
body.tb .lesson-head, body.tb .book-cover { background: #fff; color: #111; border: 0; border-bottom: 3px solid #1f3a6b; border-radius: 0; padding-left: 0; }
body.tb .lesson-head h1, body.tb .book-cover h1 { color: #111; } body.tb .lesson-kicker { color: #1f3a6b; letter-spacing: .06em; } body.tb .book-cover .muted { color: #555; }
body.tb h1, body.tb h2, body.tb h3 { font-family: Georgia, serif; color: #1f3a6b; } body.tb .q { font-family: Georgia, serif; font-weight: 400; }
body.tb .btn { border-radius: 4px; background: #1f3a6b; font-family: -apple-system, "Segoe UI", sans-serif; } body.tb .btn.green { background: #1f3a6b; } body.tb .btn.alt { background: #eef0f4; color: #1f3a6b; }
body.tb .opt { border-radius: 4px; } body.tb .tag { border-radius: 3px; background: #eef0f4; color: #333; }
body.tb .trail span { border-radius: 3px; } body.tb .trail span.on { background: #1f3a6b; } body.tb .trail span.done { background: #eef0f4; color: #333; }
body.tb .think, body.tb .hint { background: #f7f7f2; border: 0; border-left: 4px solid #1f3a6b; border-radius: 0; font-weight: 400; }
body.tb .levelup { background: none; color: #1f3a6b; font-size: 22px; padding: 4px 0; animation: none; }
body.tb .answer-line { background: #f3f5f9; border-radius: 0; } body.tb .steps li { border-radius: 2px; background: #fff; } body.tb .steps li::before { background: #1f3a6b; }
body.tb .big-score { color: #1f3a6b; } body.tb .big-score.ok { color: #1f3a6b; } body.tb .why { background: #fbf3f3; border-radius: 0; border-left: 4px solid #b03030; }
body.tb .lesson-dots i.on { background: #1f3a6b; } body.tb .lesson-dots i.done { background: #8a96ad; } body.tb .steps li.pop { animation: none; }
body.tb .pt-count { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a96ad; margin: 0 0 10px; }
body.tb .pt { font-size: 28px; line-height: 1.45; margin: 6px 0 14px; color: #111; } body.tb .pt.err { color: #b03030; text-decoration: line-through; text-decoration-thickness: 2px; }
body.tb .pt-why { font-size: 22px; line-height: 1.5; color: #333; }
@media (max-width: 560px) { body.tb .pt { font-size: 24px; } body.tb .pt-why { font-size: 19px; } }
/* owner 11-04: book-page colour (pale yellow paper) and math-first lessons */
body.tb { background: #f7efd4; } body.tb .top { background: #f7efd4; } body.tb main { background: transparent; }
body.tb .card { background: #fffaf0; border-color: #e3d6ae; } body.tb .opt { background: #fffdf7; border-color: #e3d6ae; } body.tb .opt.sel { background: #eef2fb; }
body.tb .steps li { background: #fffdf7; border-color: #eadfbf; } body.tb .tag, body.tb .trail span, body.tb .btn.alt { background: #efe5c6; }
body.tb .steps .do { font-size: 24px; font-weight: 400; font-family: "Cambria Math", Cambria, Georgia, serif; }
body.tb .steps .wh { font-size: 18px; color: #5a4f32; font-family: -apple-system, "Segoe UI", sans-serif; }
body.tb .mline { font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 26px; margin: 8px 0; padding-left: 34px; position: relative; }
body.tb .mline.wrong { color: #b03030; text-decoration: line-through; } body.tb .mline.wrong::before { content: "✗"; position: absolute; left: 4px; text-decoration: none; }
body.tb .mline.right { color: #1f6b3a; } body.tb .mline.right::before { content: "✓"; position: absolute; left: 4px; }
body.tb .why-small { font-size: 16px; color: #6b5f40; font-family: -apple-system, "Segoe UI", sans-serif; }
body.tb .q { font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 24px; }
body.tb details.wh { margin-top: 2px; } body.tb details.wh summary { font-size: 16px; color: #8a6a1f; cursor: pointer; list-style: none; display: inline-block; } body.tb details.wh[open] summary { display: none; }
body.tb .answer-line { font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 26px; background: #fff3cf; border-left: 4px solid #1f3a6b; }
/* owner 11-04: "太黃了" — a lighter, barely-warm paper */
body.tb, body.tb .top { background: #fbf8ef; } body.tb .card { background: #fffdf8; border-color: #e9e2cf; } body.tb .opt { background: #fff; border-color: #e6e0cf; }
body.tb .steps li { background: #fff; border-color: #ece6d6; } body.tb .tag, body.tb .trail span, body.tb .btn.alt { background: #f1ece0; }
body.tb .answer-line { background: #f6f2e7; } body.tb .lesson-head, body.tb .book-cover { background: transparent; }
/* ---- owner 11-04: a real textbook ---- */
/* contents: finished sections change colour */
body.tb .toc-done > button { background: #e6f1e8; } body.tb .toc-done .no, body.tb .toc-done .st { color: #2b7a46; } body.tb .toc-started > button { background: #fdf6e3; }
/* section overview + learning guide (like the printed workbook's Learning Guide) */
body.tb .card.guide { padding: 26px 28px; }
.guide-title { font-size: 34px; margin: 4px 0 16px; }
.guide-box { border: 1px solid #e6dcc3; background: #fff; border-radius: 6px; padding: 14px 18px; margin: 12px 0; } .guide-box h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: .03em; }
.guide-box p { margin: 6px 0; font-size: 19px; } .guide-box.plan ol { margin: 4px 0; padding-left: 22px; font-size: 18px; }
.kw { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; } .kw dt { font-weight: 700; color: #1f3a6b; } .kw dd { margin: 0; }
.guide-panel { border: 2px solid #1f3a6b; border-radius: 8px; overflow: hidden; }
.gp-head { display: flex; align-items: center; gap: 12px; background: #1f3a6b; color: #fff; padding: 10px 16px; } .gp-head h2 { color: #fff !important; margin: 0; font-size: 22px; }
.gp-n { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #1f3a6b; font-weight: 900; display: grid; place-items: center; font-family: -apple-system, sans-serif; }
.gp-body { display: grid; grid-template-columns: 1fr 220px; gap: 16px; padding: 16px; background: #fffdf8; } .gp-body:has(> .gp-main:only-child) { grid-template-columns: 1fr; }
.gp-q { font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 26px; margin: 0 0 12px; }
.gp-steps { list-style: none; counter-reset: g; padding: 0; margin: 0; } .gp-steps li { counter-increment: g; position: relative; padding: 6px 0 6px 40px; border-bottom: 1px dashed #e6dcc3; }
.gp-steps li::before { content: counter(g); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: #1f3a6b; color: #fff; font: 700 16px/26px -apple-system, sans-serif; text-align: center; }
.gp-do { display: block; font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 24px; } .gp-why { display: block; font: 16px -apple-system, "Segoe UI", sans-serif; color: #6b5f40; }
.gp-ans { margin: 14px 0 0; font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 26px; } .gp-ans span { font: 700 16px -apple-system, sans-serif; letter-spacing: .08em; text-transform: uppercase; background: #ffe58a; padding: 3px 8px; border-radius: 4px; margin-right: 8px; vertical-align: middle; }
.gp-tip { background: #fff4d6; border: 1px solid #f0d58a; border-radius: 10px; padding: 12px 14px; font: 16px/1.45 -apple-system, "Segoe UI", sans-serif; align-self: start; } .gp-tip b { display: block; color: #9a6b00; margin-bottom: 4px; }
@media (max-width: 680px) { .gp-body { grid-template-columns: 1fr; } .guide-title { font-size: 27px; } .gp-q, .gp-ans { font-size: 22px; } .gp-do { font-size: 21px; } }
/* practice zone: one problem per screen, framed like a page (Math Escape City style) */
.pz-head { display: flex; align-items: center; gap: 12px; background: #1f3a6b; color: #fff; border-radius: 8px 8px 0 0; padding: 10px 16px; margin-top: 8px; font: 700 16px -apple-system, sans-serif; letter-spacing: .05em; }
.pz-head .pz-t { flex: 1; } .pz-dots { display: flex; gap: 5px; flex-wrap: wrap; } .pz-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ffffff40; } .pz-dots i.on { background: #ffe58a; } .pz-dots i.ok { background: #7fd19a; } .pz-dots i.no { background: #f08a8a; }
.pz-head + .card { margin-top: 0; border-radius: 0 0 8px 8px; border-top: 0; min-height: 360px; }
.chap-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .btn.small { font-size: 16px; padding: 7px 14px; margin: 0; }
/* report 11-03: grey not started · blue learning · orange homework due · green done */
body.tb .toc-new > button { background: #fff; } body.tb .toc-new .no { color: #5f6878; }
body.tb .toc-started > button { background: #e8effb; } body.tb .toc-started .st, body.tb .toc-started .no { color: #2f5bea; }
body.tb .toc-hw > button { background: #fdf0e0; } body.tb .toc-hw .st, body.tb .toc-hw .no { color: #c2690e; }
body.tb .toc-done > button { background: #e6f1e8; } body.tb .toc-done .st, body.tb .toc-done .no { color: #2b7a46; }
.trail.tabs { gap: 4px; } .trail.tabs > button:not(.toc-link) { font: 700 16px -apple-system, "Segoe UI", sans-serif; padding: 8px 16px; border: 1px solid #d9d2bf; background: #f1ece0; color: #555; border-radius: 6px 6px 0 0; cursor: pointer; }
.trail.tabs > button.on { background: #1f3a6b; color: #fff; border-color: #1f3a6b; } .trail.tabs > button.done { background: #e6f1e8; color: #2b7a46; } .trail.tabs > button:disabled { opacity: .5; cursor: default; }
body.tb .done-today { color: #2b7a46; font-family: -apple-system, "Segoe UI", sans-serif; font-size: 18px; }

/* ===== owner mockup 11-04: navy sidebar + teal textbook page ===== */
body.tb { --teal: #0f6e64; --teal2: #e3f1ee; --navy: #13243d; --paper: #fbfaf6; background: var(--paper); font-family: Georgia, "Times New Roman", serif; }
body.tb .top.mob { display: none; }
.shell { display: flex; min-height: 100vh; }
#side { width: 270px; flex: none; background: var(--navy); color: #fff; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; box-sizing: border-box; font-family: -apple-system, "Segoe UI", sans-serif; }
#side .sb-brand { font: 700 24px Georgia, serif; padding: 4px 8px 16px; border-bottom: 1px solid #ffffff30; }
#side .sb-book { font: 700 30px Georgia, serif; padding: 14px 8px; border-bottom: 1px solid #ffffff30; }
#side .sb-toc { display: block; width: 100%; text-align: left; background: none; border: 0; color: #fff; font: 20px -apple-system, sans-serif; padding: 14px 8px; border-bottom: 1px solid #ffffff30; cursor: pointer; }
#side .sb-ch { padding: 14px 8px 10px; font-size: 19px; line-height: 1.3; } #side .sb-ch b { font-size: 20px; }
#side .sb-secs { list-style: none; margin: 0; padding: 0; border-top: 1px solid #ffffff30; }
#side .sb-secs button { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; color: #e8edf5; font: 17px/1.35 -apple-system, sans-serif; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
#side .sb-secs button.on { background: var(--teal); color: #fff; font-weight: 700; padding-left: 14px; }
#side .sm { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9d2df; box-sizing: border-box; font-style: normal; font-size: 16px; text-align: center; line-height: 18px; margin-top: 1px; }
#side .sm.done { background: #2fb36b; border-color: #2fb36b; color: #fff; } #side .sm.half { border-color: #6fb3ff; background: linear-gradient(90deg, #6fb3ff 50%, transparent 50%); }
body.tb main#app { flex: 1; min-width: 0; max-width: 1240px; padding: 14px 28px 28px; margin: 0; }
body.tb .lesson-head { background: none; border: 0; padding: 4px 0 8px; margin: 0; }
body.tb .lesson-head .crumb { margin: 0; font: 19px -apple-system, sans-serif; color: #555; } body.tb .lesson-head .crumb b { color: var(--teal); }
body.tb .lesson-head h1 { font-size: 44px; line-height: 1.15; margin: 6px 0 4px; color: var(--navy); }
body.tb .lesson-head .sub { margin: 0 0 8px; font-size: 22px; color: #444; }
body.tb .pill { display: inline-block; background: var(--teal2); color: #183; color: var(--navy); border-radius: 999px; padding: 4px 14px; font: 16px -apple-system, sans-serif; }
body.tb .trail.tabs { display: flex; gap: 0; margin: 14px 0 18px; border-bottom: 2px solid var(--teal); background: none; padding: 0; }
body.tb .trail.tabs button { flex: 0 1 240px; background: #fff; border: 1px solid #cfd8d6; border-bottom: 0; border-radius: 6px 6px 0 0; padding: 12px 16px; font: 20px Georgia, serif; color: var(--navy); cursor: pointer; }
body.tb .trail.tabs button.on { background: var(--teal); color: #fff; font-weight: 700; border-color: var(--teal); }
body.tb .trail.tabs button:disabled { color: #9aa; cursor: default; }
.tp { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tp-card { background: #fff; border: 1px solid #cfd8d6; border-radius: 8px; padding: 14px 20px 16px; margin: 0 0 18px; position: relative; }
.tp-card h2 { font-size: 26px; margin: 0 0 8px; color: var(--navy); }
.tp-goals { background: #eef5f3; border-color: #eef5f3; } .tp-goals ul { margin: 0; padding-left: 22px; } .tp-goals li::marker { color: var(--teal); } .tp-goals li { font-size: 20px; margin: 4px 0; }
.tp-tab { display: inline-block; margin: -14px 0 10px -20px; background: var(--teal2); color: var(--navy); font-size: 20px; padding: 4px 16px; border-radius: 8px 0 8px 0; }
.tp-key { border: 2px solid var(--teal); } .tp-key .tp-tab { background: var(--teal); color: #fff; }
.tp-kt { font-size: 25px; font-weight: 700; margin: 4px 0; } .tp-km { font-size: 26px; text-align: center; margin: 8px 0; }
.tp-q { font-size: 23px; margin: 4px 0 10px; }
.tp-steps { list-style: none; counter-reset: t; margin: 0; padding: 0; }
.tp-steps li { counter-increment: t; position: relative; padding: 6px 0 6px 50px; font-size: 21px; }
.tp-steps li::before { content: counter(t); position: absolute; left: 0; top: 5px; width: 34px; height: 34px; border-radius: 50%; background: var(--teal2); color: var(--navy); font: 700 18px -apple-system, sans-serif; text-align: center; line-height: 34px; }
.tp-ans { margin: 10px 0 0; font-size: 21px; } .tp-ans > span:first-child { background: var(--teal); color: #fff; font: 700 16px -apple-system, sans-serif; padding: 3px 10px; border-radius: 4px; margin-right: 8px; letter-spacing: .05em; text-transform: uppercase; }
.tp-kw { padding: 0; overflow: hidden; } .tp-kw h2 { background: var(--teal2); padding: 10px 20px; margin: 0; }
.tp-kw dl { margin: 0; padding: 4px 20px 8px; } .tp-kw dl div { border-bottom: 1px solid #dde3e1; padding: 8px 0; font-size: 19px; } .tp-kw dl div:last-child { border: 0; }
.tp-kw dt { display: inline; color: var(--teal); font-weight: 700; } .tp-kw dd { display: inline; margin: 0; }
.tp-pit { background: #fff8e6; border-color: #f0c96a; padding: 0; overflow: hidden; } .tp-pit h2 { background: #fde7a6; padding: 10px 20px; margin: 0; }
.tp-pit p { margin: 10px 20px; font-size: 19px; } .tp-pit .tp-pt { font-weight: 700; font-size: 21px; }
.tp-chk { padding: 0; overflow: hidden; } .tp-chk h2 { background: var(--teal2); padding: 10px 20px; margin: 0; } .tp-chk p { margin: 12px 20px; font-size: 20px; } .tp-chk .tp-think { color: #666; font-style: italic; font-size: 17px; }
.tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #dde3e1; padding: 16px 0 0; margin-top: 6px; }
.tp-foot .tp-saved { color: #555; font: 17px -apple-system, sans-serif; }
body.tb .btn.green { background: var(--teal); } body.tb .btn.alt { background: #fff; border: 2px solid var(--navy); color: var(--navy); }
@media (max-width: 900px) {
  body.tb .top.mob { display: flex; background: var(--navy); color: #fff; border: 0; } body.tb .top.mob .ghost { color: #fff; border-color: #fff; font-size: 22px; }
  #side { position: fixed; z-index: 20; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  body.sb-open #side { transform: none; box-shadow: 0 0 0 100vmax #0006; }
  body.tb main#app { padding: 10px 16px 24px; }
  .tp { grid-template-columns: 1fr; } body.tb .lesson-head h1 { font-size: 32px; }
  body.tb .trail.tabs button { font-size: 17px; padding: 10px 8px; }
  .tp-foot { flex-wrap: wrap; } .tp-foot .btn { flex: 1 1 100%; } .tp-foot .tp-saved { order: 3; }
}
body.tb { font-variant-numeric: lining-nums; }
body.tb .trail.tabs { flex-wrap: nowrap; }
@media (max-width: 900px) { body.tb .trail.tabs button { flex: 1 1 0; min-width: 0; font-size: 16px; padding: 10px 4px; } }
/* 24-chapter contents + GPT unit teaching extras (owner 11-04) */
body.tb .book-cover { background: none; border: 0; padding: 4px 0 10px; }
body.tb .book-cover h1 { font-size: 44px; margin: 6px 0; color: var(--navy); }
.toc-part { font: 700 16px -apple-system, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin: 26px 0 6px; }
details.chap > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
details.chap > summary::-webkit-details-marker { display: none; }
details.chap > summary h2 { margin: 0; font-size: 24px; } details.chap > summary h2::before { content: '▸ '; color: var(--teal); } details.chap[open] > summary h2::before { content: '▾ '; }
.toc-soon .t, .toc-soon .no { color: #5f6878 !important; } .toc-soon .st { color: #5f6878 !important; font-weight: 400 !important; font-size: 16px; } .toc-soon button { cursor: default; }
.tp-pre { background: #fff; border-left: 5px solid var(--teal); padding: 10px 16px; margin: 0 0 18px; font-size: 18px; }
.tp-meth .tp-steps li { font-size: 19px; }
.kw-e { color: #555; font-size: 16px; font-style: italic; }
.tp-pl { margin: 4px 20px 14px; padding-left: 18px; font-size: 17px; } .tp-pl li { margin: 4px 0; }
.tp-types { padding: 0; overflow: hidden; } .tp-types h2 { background: var(--teal2); padding: 10px 20px; margin: 0; }
.tp-types dl { margin: 0; padding: 4px 20px 8px; } .tp-types dl div { border-bottom: 1px solid #dde3e1; padding: 7px 0; font-size: 17px; } .tp-types dl div:last-child { border: 0; }
.tp-types dt { display: inline; font-weight: 700; color: var(--navy); } .tp-types dd { display: inline; margin: 0; }
.tp-chk2 { color: #555; font-size: 17px; margin: 6px 0 0; } .tp-try details summary { color: var(--teal); }
#side .sb-secs button.soon { color: #7d8aa0; cursor: default; }
body.tb .lesson-head h1, body.tb .book-cover h1 { font-variant-numeric: lining-nums; }
/* homework like Math Escape City: boxes on top, one problem per screen, a stamp with the score (owner 11-04) */
.hw-boxes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px; }
.hw-boxes .hb { width: 44px; height: 44px; border-radius: 8px; border: 2px solid #b9c7c5; background: #fff; font: 700 18px -apple-system, sans-serif; color: #7a8a88; cursor: pointer; }
.hw-boxes .hb.done { background: var(--teal2, #e3f1ee); border-color: var(--teal, #0f6e64); color: var(--teal, #0f6e64); }
.hw-boxes .hb.on { outline: 3px solid var(--navy, #13243d); outline-offset: 2px; }
.hw-boxes .hb-n { margin-left: 6px; font: 600 16px -apple-system, sans-serif; color: #555; }
.hw-one .q { font-size: 23px; }
.stamp-card { overflow: hidden; }
.hw-stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 220px; height: 220px; border-radius: 50%;
  border: 10px double #c0392b; color: #c0392b; transform: rotate(-12deg); margin: 18px auto 6px; animation: slam .55s cubic-bezier(.2, 1.4, .4, 1) both; font-family: -apple-system, sans-serif; }
.hw-stamp b { font-size: 62px; line-height: 1; } .hw-stamp span { font-weight: 800; letter-spacing: .18em; font-size: 18px; margin-top: 6px; }
.hw-stamp.ok { border-color: #1f8a4c; color: #1f8a4c; }
@keyframes slam { 0% { transform: scale(3) rotate(-30deg); opacity: 0; } 55% { transform: scale(.9) rotate(-10deg); opacity: 1; } 75% { transform: scale(1.06) rotate(-12deg); } 100% { transform: scale(1) rotate(-12deg); } }
.stamp-card .stamp-line { font-size: 20px; font-weight: 700; }
@media (max-width: 900px) { .hw-stamp { width: 180px; height: 180px; } .hw-stamp b { font-size: 50px; } .hw-boxes .hb { width: 40px; height: 40px; } }
body.tb .opt.right { border-color: #1f9d55; background: #e7f7ee; box-shadow: inset 4px 0 0 #1f9d55; } body.tb .opt.wrong { border-color: #d64545; background: #fdeeee; box-shadow: inset 4px 0 0 #d64545; }
/* Contents on every page; look-back buttons in homework (owner 11-04) */
body.tb .trail.tabs .tab-toc { flex: 0 0 auto; margin-left: auto; border: 0; background: none; color: var(--navy); font: 700 17px -apple-system, sans-serif; padding: 10px 6px; cursor: pointer; }
.look-back { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font: 600 16px -apple-system, sans-serif; color: #555; }
.look-back .btn { margin: 0; }
.back-hw { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff4d6; border: 1px solid #f0c96a; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font: 600 16px -apple-system, sans-serif; }
.back-hw .btn { margin: 0; }
@media (max-width: 900px) { body.tb .trail.tabs .tab-toc { font-size: 16px; } .look-back .btn { flex: 1 1 45%; } .back-hw { flex-wrap: wrap; } .back-hw .btn { flex: 1 1 100%; } }
.q-fig { margin: 6px 0 12px; } .q-fig img { max-width: min(520px, 100%); height: auto; background: #fff; border: 1px solid #dde3e1; border-radius: 8px; display: block; }
/* owner 11-06: easier to read — plain sans font, darker, wider line spacing, the question's ask in bold */
body.tb .q { font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-weight: 500; font-size: 24px; line-height: 1.6; color: #111; max-width: 42em; }
body.tb .q .qask { font-weight: 800; color: #0b2a5b; }
body.tb .opt { font-size: 21px; line-height: 1.4; color: #111; }
@media (max-width: 560px) { body.tb .q { font-size: 21px; } body.tb .opt { font-size: 19px; } }
/* owner 11-06: Key idea like a textbook — one sentence per line, math one group of ≤3 facts per row */
.tp-kt { white-space: pre-line; line-height: 1.5; } .tp-km { white-space: pre-line; line-height: 1.7; }
/* owner 11-06: teaching text keeps its own line breaks (one fact per line) */
.tp-steps, .tp-steps li, .tp-q, .tp-pt, .tp-pl, .tp-r, .tp-ans, .tp-chk2 { white-space: pre-line; }
.tp-steps li { line-height: 1.6; }
/* owner 11-06: clearly separate math groups (AB ≅ DE,   BC ≅ EF) */
.gsep { display: inline-block; width: 1.7em; }
/* owner 11-06: space on both sides of every math group; Key idea text a little smaller with a blank line between points */
.mg { display: inline-block; margin: 0 .4em; white-space: nowrap; }
.tp-kt { font-size: 21px; font-weight: 600; line-height: 1.45; }
/* owner 11-06: step labels — words normal weight, the letters bold so A, C, AB stand out */
.tp-steps .slab { font-weight: 500; color: #1d2a4a; } .tp-steps .slab b { font-weight: 800; color: #0b2a5b; }
/* owner 11-06: every 'Why' in worked steps on its own line, the word Why in a box */
.why-row { display: block; margin-top: 6px; }
.whybox { display: inline-block; border: 2px solid #0b2a5b; color: #0b2a5b; border-radius: 6px; padding: 0 8px; font-weight: 800; font-size: max(16px, .85em); margin-right: 6px; line-height: 1.5; }
/* owner 11-06: the Why box sits alone on its line; the explanation starts on the next line */
.whybox { display: table; margin: 4px 0 4px 0; }

/* owner 11-07: best score under 80% → orange, retest needed */
.toc-retest > button { background: #fff1e0 !important; border-color: #f0a050 !important; } .toc-retest .st, .toc-retest .no { color: #c2690e !important; font-weight: 800; }
#side .sm.retest { background: #f0a050; border-color: #f0a050; color: #fff; font-weight: 900; }

/* 11-25 mobile check: tap targets >= 44px (Show the answer / Solution, ☰ ⚙ buttons) */
details:not(.chap) > summary:not(.sb-ch) { padding-block: 8px; }
body.tb .top.mob .ghost { min-width: 44px; min-height: 44px; }
