/* =========================================================
   textbook-legacy.css — ui08、ui09（舊 stage 版型）改成「教科書版」排版（2026-11-16）
   放在 course-theme.css 之後載入。只改字體、行距、留白、配色，不動結構與互動。
   要撤回：兩頁拿掉這支 CSS 連結即可。
   ========================================================= */
:is(.ui08-page, .ui09-page) {
	--u-ink: #16211F; --u-ink-2: #3D4946; --u-ink-3: #7B8581;
	--u-paper: #FFFFFF; --u-bg: #F6F4EE; --u-line: #E0DCD2; --u-dot: transparent;
	--u-brand: #0E7C74; --u-brand-strong: #095A54; --u-brand-soft: #E1EEEA;
	--u-agent: #5A4E9E; --u-agent-soft: #EEEBF5;
	--u-figjam: #A3561F; --u-figjam-soft: #FBF4E4;
	--u-select: #0E7C74; --u-select-soft: rgba(14,124,116,.08);
	--u-font-display: "Noto Serif TC", "Songti TC", serif;
	--r: 6px;
	background-image: none;
	font-size: 17px; line-height: 1.95;
}
:is(.ui08-page, .ui09-page) p { font-size: 17px; line-height: 1.95; letter-spacing: .01em; }
:is(.ui08-wrap, .ui09-wrap) { max-width: 1200px; padding: 0 32px; }

/* 頁內選單 */
:is(.ui08-subnav, .ui09-subnav) { background: rgba(246,244,238,.96); }
:is(.ui08-subnav, .ui09-subnav) a { font-size: 14.5px; padding: 15px 15px 13px; }

/* 各段：留白加大、標題用襯線 */
:is(.ui08-page, .ui09-page) .stage { padding: 92px 0; border-bottom-color: var(--u-line); }
:is(.ui08-page, .ui09-page) .stage-grid { grid-template-columns: minmax(0, .4fr) minmax(0, .6fr); gap: 64px; }
:is(.ui08-page, .ui09-page) .stage-num { font: italic 400 22px/1 "Instrument Serif", serif; letter-spacing: .02em; background: none; padding: 0; color: var(--u-brand); border-radius: 0; }
:is(.ui08-page, .ui09-page) .stage-intro h3 { margin-top: 10px; font-size: clamp(25px, 2.6vw, 32px); line-height: 1.4; font-weight: 900; }
:is(.ui08-page, .ui09-page) .stage-intro .stage-def { margin-top: 18px; font-size: 17px; line-height: 2; max-width: 30em; }
:is(.ui08-page, .ui09-page) .stage-intro .stage-tip { margin-top: 22px; font-size: 15.5px; line-height: 1.9; background: #FBF6E6; border-left: 3px solid #E9B949; border-radius: 0; padding: 14px 18px; }
:is(.ui08-page, .ui09-page) .stage-intro .stage-tip b { font: 700 13px/1.4 "Noto Serif TC", serif; letter-spacing: .08em; text-transform: none; color: #8A5A12; margin-bottom: 6px; }
:is(.ui08-page, .ui09-page) .stage-interactive { border: 1px solid var(--u-ink); border-radius: 2px; box-shadow: none; padding: clamp(22px, 3vw, 34px); }
:is(.ui08-page, .ui09-page) .stage-interactive .si-label { font-size: 12.5px; letter-spacing: .1em; margin-bottom: 18px; }
:is(.ui08-page, .ui09-page) .stage-interactive .si-label::before { content: "—"; }
:is(.ui08-page, .ui09-page) .ui08-badge, :is(.ui08-page, .ui09-page) .ui09-badge { font-size: 12px; border-radius: 2px; padding: 3px 10px; }

/* 區段標題 */
:is(.ui08-section-head, .ui09-section-head) { margin-bottom: 34px; padding-bottom: 18px; border-bottom: 2px solid var(--u-ink); }
:is(.ui08-section-head, .ui09-section-head) h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.35; }
:is(.ui08-section-head, .ui09-section-head) p { font-size: 15.5px; }
:is(.ui08-page, .ui09-page) :is(.ui08-section, .ui09-section) { padding-top: 88px; padding-bottom: 88px; }

/* 說明卡、提示、連結列 */
:is(.ui08-note, .ui09-note) { font-size: 15.5px; line-height: 1.9; border-radius: 2px; padding: 18px 22px; background: #fff; border: 1px solid var(--u-line); border-top: 3px solid var(--u-brand); }
:is(.ui08-note, .ui09-note) b { font: 700 13.5px/1.4 "Noto Serif TC", serif; letter-spacing: .06em; text-transform: none; margin-bottom: 8px; }
:is(.ui08-note, .ui09-note).agent { border-top-color: var(--u-agent); }
:is(.ui08-page, .ui09-page) .stage-links .sl-item { font-size: 15px; border-radius: 2px; padding: 12px 15px; }
:is(.ui08-page, .ui09-page) .stage-links .sl-label { font-size: 12.5px; }
:is(.ui08-page, .ui09-page) .stage-pills a { font-size: 14px; border-radius: 2px; }

/* 對話卡、樹狀清單、範例 */
:is(.ui08-page, .ui09-page) .chat-card { border-radius: 2px; border-color: var(--u-line); }
:is(.ui08-page, .ui09-page) .chat-card .cbar { font-size: 12px; }
:is(.ui08-page, .ui09-page) .chat-card .bubble { font-size: 15px; line-height: 1.85; padding: 11px 14px; border-radius: 4px; }
:is(.ui08-page, .ui09-page) .chat-card .ccap { font-size: 12px; }
:is(.ui08-page, .ui09-page) .ia-tree details { border-radius: 2px; background: #fff; }
:is(.ui08-page, .ui09-page) .ia-tree summary { font-size: 15.5px; padding: 14px 16px; }
:is(.ui08-page, .ui09-page) .ia-tree .ia-body .ia-child { font-size: 15px; line-height: 1.85; border-radius: 2px; padding: 10px 13px; }
:is(.ui08-page, .ui09-page) .example-card, :is(.ui08-page, .ui09-page) .example-card img { border-radius: 2px; }
:is(.ui08-page, .ui09-page) .example-card .cap, :is(.ui08-page, .ui09-page) .cap { font-size: 13.5px; line-height: 1.7; }

/* 作業卡：深底改紙本 */
:is(.ui08-page, .ui09-page) .hw-card { background: #fff; color: var(--u-ink); border: 1px solid var(--u-ink); border-radius: 2px; }
:is(.ui08-page, .ui09-page) .hw-card h4 { color: var(--u-ink); font-family: "Noto Serif TC", serif; font-size: 22px; }
:is(.ui08-page, .ui09-page) .hw-card li { font-size: 16px; line-height: 1.95; color: var(--u-ink-2); }
:is(.ui08-page, .ui09-page) .hw-card a { color: var(--u-brand); }
:is(.ui08-page, .ui09-page) .hw-card a:hover { color: var(--u-brand-strong); }
:is(.ui08-page, .ui09-page) .dl { border-radius: 2px; }

/* ui08 真實操作（u8r-） */
.ui08-page .u8r-lead { font-size: 17px; line-height: 2; max-width: 46em; }
.ui08-page .u8r-ch button { font-size: 14.5px; border-radius: 2px; padding: 9px 12px; }
.ui08-page .u8r-frame { border-radius: 2px; }
.ui08-page .u8r-five > div { border-radius: 2px; }
.ui08-page .u8r-five p { font-size: 15px; line-height: 1.85; }
.ui08-page .u8r-seg { border-radius: 2px; }
.ui08-page .u8r-steps li { font-size: 15px; line-height: 1.85; }
.ui08-page .u8r-check { border-radius: 2px; background: #fff; border: 1px solid var(--u-line); }
.ui08-page .u8r-check label { font-size: 15.5px; line-height: 1.8; }

/* ui09 動態操作（mo-） */
.ui09-page .mo-sec { padding-top: 96px; }
.ui09-page .mo-head .no { font: italic 400 84px/.9 "Instrument Serif", serif; }
.ui09-page .mo-head h3 { font-size: clamp(27px, 3vw, 36px); line-height: 1.4; }
.ui09-page .mo-head p { font-size: 17px; line-height: 1.95; max-width: 40em; }
.ui09-page .mo-mean { border-radius: 2px; border-left-width: 3px; padding: 18px 22px; }
.ui09-page .mo-card { border-radius: 2px; box-shadow: none; }
.ui09-page .mo-card p, .ui09-page .mo-card li { font-size: 15.5px; line-height: 1.85; }

/* 本週交付項目勾選清單（hw-check.css 原為深底白字）→ 紙本白底深字 */
:is(.ui08-page, .ui09-page) .hw-card .hwc-item { background: #FAF8F3; border: 1px solid var(--u-line); border-radius: 2px; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-item:hover { background: #fff; border-color: var(--u-ink-3); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-box { border-color: var(--u-ink-3); border-radius: 3px; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-item input:checked + .hwc-box { background: var(--u-brand); border-color: var(--u-brand); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-no { color: var(--u-brand); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-item.opt .hwc-no { color: #A3561F; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-tx { color: var(--u-ink-2); font-size: 15.5px; line-height: 1.85; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-tx b, :is(.ui08-page, .ui09-page) .hw-card .hwc-tx strong { color: var(--u-ink); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-list li.done .hwc-item { background: var(--u-brand-soft); border-color: rgba(14,124,116,.35); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-list li.done .hwc-tx { color: var(--u-ink-3); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-num { color: var(--u-ink-2); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-num b { color: var(--u-brand); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-track { background: var(--u-line); border-radius: 0; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-track i { background: var(--u-brand); border-radius: 0; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-reset { color: var(--u-ink-2); border-color: var(--u-line); border-radius: 2px; }
:is(.ui08-page, .ui09-page) .hw-card .hwc-reset:hover { color: var(--u-ink); border-color: var(--u-ink); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-msg { color: var(--u-brand); }
:is(.ui08-page, .ui09-page) .hw-card .hwc-msg a { color: var(--u-brand-strong); }

@media (max-width: 991px) {
	:is(.ui08-page, .ui09-page) .stage { padding: 64px 0; }
	:is(.ui08-page, .ui09-page) .stage-grid { gap: 28px; }
	:is(.ui08-wrap, .ui09-wrap) { padding: 0 20px; }
}
@media (max-width: 600px) {
	:is(.ui08-page, .ui09-page), :is(.ui08-page, .ui09-page) p, :is(.ui08-page, .ui09-page) .stage-intro .stage-def { font-size: 16px; line-height: 1.9; }
	:is(.ui08-wrap, .ui09-wrap) { padding: 0 16px; }
	:is(.ui08-page, .ui09-page) .stage { padding: 52px 0; }
	.ui09-page .mo-head .no { font-size: 56px; }
}
