/* 像一份文档：一栏文字、一种链接色、几条细线。没有卡片，没有标签。 */
:root {
  --text: #1c1c1c;
  --muted: #6e6e6e;
  --line: #e4e4e4;
  --link: #0b57d0;
  --bg: #fff;
  --problem: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #9b9b9b;
    --line: #363636;
    --link: #8ab4f8;
    --bg: #161616;
    --problem: #f28b82;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Hiragino Kaku Gothic ProN", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }

a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
b { font-weight: 600; }
p { margin: 0 0 8px; }
h1 { font-size: 26px; line-height: 1.35; font-weight: 600; margin: 0 0 12px; }
h2 { font-size: 18px; line-height: 1.4; font-weight: 600; margin: 36px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* 站头 */
#站头 { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 28px; }
.brand { color: inherit; text-decoration: none; font-weight: 600; }
.right { display: flex; align-items: center; gap: 14px; font-size: 15px; white-space: nowrap; }
.lang { border: 0; background: transparent; color: var(--muted); font: inherit; padding: 2px 0; cursor: pointer; field-sizing: content; }

/* 课程里的那一行导航 */
.coursebar { display: flex; flex-wrap: wrap; gap: 2px 16px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--line); font-size: 15px; }
.coursebar a { color: var(--muted); text-decoration: none; }
.coursebar a.on { color: var(--text); font-weight: 600; }

/* 首页的课程清单 */
.tagline { margin-bottom: 36px; }
.course-entry { margin-bottom: 28px; }
.course-entry h2 { margin: 0 0 2px; }
.course-entry h2 a { color: inherit; }

/* 步骤清单：编号一列，文字一列 */
.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { display: grid; grid-template-columns: 28px 1fr; margin-bottom: 18px; }
.steps .num { color: var(--muted); }
.steps .title { font-weight: 600; }
.steps .done .title, .steps > li.done .title { font-weight: 400; }
.steps .short { color: var(--muted); font-size: 15px; }
.steps .links { font-size: 15px; }
.here { color: var(--muted); font-size: 15px; }
.dot { color: var(--muted); margin: 0 4px; }

.toc { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.toc li { display: grid; grid-template-columns: 56px 1fr; }

/* 步骤页 */
.crumb { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.guide { margin-bottom: 8px; }
.guide.past { color: var(--muted); }
.guide.past b { font-weight: inherit; }
.help { font-size: 15px; margin: 12px 0 0; }
.lab-area { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

/* 表单 */
input, select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid #a8a8a8; border-radius: 3px; padding: 5px 8px; }
input[inputmode="decimal"] { width: 7em; }
input[type="email"], input.wide, select.wide { width: 100%; max-width: 340px; }
button { font: inherit; color: inherit; }
.primary { background: var(--text); color: var(--bg); border: 0; border-radius: 3px; padding: 7px 18px; cursor: pointer; }
.primary:disabled { opacity: .35; cursor: default; }
.primary + .primary { margin-left: 8px; }
.linklike { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; font-size: inherit; }
.tabs { margin-bottom: 12px; }
.tabs button { background: none; border: 0; padding: 0 0 2px; margin-right: 16px; color: var(--muted); cursor: pointer; }
.tabs button.on { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--text); }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-bottom: 14px; }
.field .linklike { font-size: 15px; }
.problem { color: var(--problem); font-size: 15px; min-height: 0; }
.problem:empty { display: none; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 15px; color: var(--muted); }
.inline-fields { display: flex; flex-wrap: wrap; gap: 0 16px; }
.inline-fields input { width: 6em; }

/* 池子和手上的币：一列标签，一列数字 */
.facts { border-collapse: collapse; margin-bottom: 14px; }
.facts th { font-weight: 400; color: var(--muted); text-align: left; vertical-align: top; white-space: nowrap; padding: 1px 16px 1px 0; }
.facts td { padding: 1px 0; }
.done-title { font-weight: 600; margin-bottom: 8px; }
[hidden] { display: none !important; }
.small:empty { display: none; }

/* 账单和图并排，窄屏上下排 */
.split { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; margin-bottom: 14px; }
.split > :first-child { flex: 1 1 250px; min-width: 0; }
.figure { flex: 1 1 250px; max-width: 300px; color: var(--text); }
.figure:empty { display: none; }
.figure-svg { width: 100%; height: auto; display: block; }
.receipt { border-collapse: collapse; width: 100%; font-size: 15px; }
.receipt td { padding: 2px 0; }
.receipt td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.receipt .total td { border-top: 1px solid var(--line); font-weight: 600; font-size: 17px; }

.ledger { border-collapse: collapse; width: 100%; font-size: 15px; margin: 14px 0; }
.ledger th { font-weight: 400; color: var(--muted); text-align: right; padding: 2px 0; border-bottom: 1px solid var(--line); }
.ledger td { text-align: right; padding: 2px 0; }
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger .total td { border-top: 1px solid var(--line); font-weight: 600; }

/* 做完后和视频对数字 */
.verify { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.verify h2 { margin: 0 0 8px; font-size: 17px; }
.checks { list-style: none; margin: 0 0 14px; padding: 0; }
.checks li { display: grid; grid-template-columns: 22px 1fr; margin-bottom: 8px; }
.checks .mark { color: var(--muted); }
.checks .when { font-size: 14px; white-space: nowrap; margin-left: 4px; }
.pager { margin-top: 24px; }
.pager .next { font-weight: 600; }
.pager-more { font-size: 15px; margin-top: 8px; }

/* 问 AI */
.ask { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--line); }
.ask-form { display: flex; gap: 8px; margin: 8px 0; max-width: 480px; }
.ask-form input { flex: 1; min-width: 0; }
.ask-qa { margin-top: 14px; }
.ask-q { font-weight: 600; }

/* 表格（主账户、账户页） */
.plain-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.plain-table th { font-weight: 400; color: var(--muted); text-align: left; padding: 3px 10px 3px 0; border-bottom: 1px solid var(--line); }
.plain-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.nowrap { white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* 模拟：一张图、几行字、几根细滑杆。不加框，图上要什么样由课程自己定 */
.sim-list { list-style: none; margin: 0; padding: 0; }
.sim-list li { margin-bottom: 12px; }
.sim-list .short { color: var(--muted); font-size: 15px; }
.sim { margin-top: 20px; }
.sim-figure { width: 100%; color: var(--text); -webkit-user-select: none; user-select: none; }
.sim-figure svg { display: block; touch-action: pan-y; }
.sim-figure text { font-family: inherit; }
.sim-figure [data-把手] { cursor: grab; touch-action: none; }
.sim-note { margin: 14px 0; min-height: 3.4em; }
.sim-sliders { display: grid; grid-template-columns: fit-content(36%) minmax(60px, 1fr) fit-content(36%); gap: 2px 12px; align-items: center; font-size: 15px; line-height: 1.35; margin: 12px 0; }
.sim-slider { display: contents; }
.sim-slider > span { color: var(--muted); }
.sim-slider > output { text-align: right; }
.sim-tabs { margin: 10px 0; }
.sim-try { font-size: 15px; margin: 12px 0; }
.sim-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0; }
.sim-player { display: flex; align-items: center; gap: 2px; margin: 8px 0; }
.sim-player input { flex: 1; min-width: 40px; margin: 0 8px; }
.sim-icon { background: none; border: 0; padding: 0; width: 30px; height: 30px; flex: none; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.sim-icon svg { width: 16px; height: 16px; }
.sim-speed { font-size: 14px; min-width: 2.2em; text-align: right; }
.sim input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sim input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: color-mix(in srgb, var(--muted) 50%, transparent); }
.sim input[type="range"]::-moz-range-track { height: 2px; background: color-mix(in srgb, var(--muted) 50%, transparent); }
.sim input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; background: var(--text); }
.sim input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--text); }
.sim input[type="range"]:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

#页脚 { margin-top: 56px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

#提示条 { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 3px; font-size: 15px; }
/* Hosted PayPal checkout and account receipts. */
.payment-products { margin: 24px 0; }
.payment-product { border-top: 1px solid var(--line); padding: 24px 0; }
.payment-product h2 { margin-top: 0; }
.payment-price { font-size: 1.5rem; font-weight: 600; }
.paypal-button { color: #003087; background: #ffc439; border: 0; border-radius: 6px; padding: 12px 24px; font-weight: 700; cursor: pointer; }
.paypal-button:disabled { opacity: .55; cursor: wait; }
.payment-sandbox { padding: 12px 16px; background: #fff4d8; color: #6d4a00; border-radius: 6px; }
.payment-message { padding: 12px 0; }
.payment-message.error { color: var(--problem); }
.payment-orders small { display: block; }
.payment-reference { overflow-wrap: anywhere; font-size: .72rem; }
.payment-orders button { display: block; margin-top: 8px; }
@media (max-width: 420px) {
  #站头 { flex-wrap: wrap; }
  #站头 .right { flex-wrap: wrap; gap: 10px; }
}
