/* =====================================================================
 * 42 · 转专业与辅修怎么选 —— 独立设计
 * 视觉原型：学术衬线大标题 + 横向状态输入条 + 三条分岔路径卡 + 决策表。
 * 与 41 的「检索台」完全不同：没有侧栏、没有色阶，改用纸感分岔结构。
 * ===================================================================== */
.p42 {
    --g5c-bg: #f7f6f0;
    --g5c-bg2: #eceee2;
    --g5c-surface: #fffdf7;
    --g5c-surface2: #f4f5ea;
    --g5c-ink: #243027;
    --g5c-ink2: #556254;
    --g5c-muted: #929b89;
    --g5c-line: #e0e3d5;
    --g5c-line2: #c9d0ba;
    --g5c-accent: #1d6b58;
    --g5c-accent2: #a5762e;
    --g5c-on: #ffffff;
    --g5d-bg: #121a15;
    --g5d-bg2: #1b261e;
    --g5d-surface: #1a241d;
    --g5d-surface2: #212e25;
    --g5d-ink: #eef3e9;
    --g5d-ink2: #b9c8b6;
    --g5d-muted: #879b88;
    --g5d-line: #304032;
    --g5d-line2: #40573f;
    --g5d-accent: #78c9a9;
    --g5d-accent2: #e0b774;
    --g5d-on: #101a13;
    --g5-h: Georgia, "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
    --g5-body: 15px;
    --g5-lh: 1.88;
    --g5-h1: clamp(2.4rem, 4.8vw, 3.6rem);
    --g5-r: 6px;
    --g5-r-sm: 5px;
}

/* ---------- 首屏 ---------- */
.mtg-hero { padding: 8px 0 30px; }
.mtg-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.mtg-kicker {
    font-family: var(--g5-m); font-size: 11px; font-weight: 700;
    letter-spacing: .17em; color: var(--g5-accent); text-transform: uppercase; margin-bottom: 16px;
}
.mtg-hero h1 { font-size: var(--g5-h1); line-height: 1.22; letter-spacing: -.025em; margin: 0 0 16px; font-weight: 700; }
.mtg-hero h1 span { color: var(--g5-accent); }
.mtg-lede { max-width: 660px; font-size: 16px; line-height: 1.95; color: var(--g5-ink2); margin: 0; }
.mtg-lede b { color: var(--g5-ink); border-bottom: 1px solid var(--g5-line2); }
.mtg-seal {
    flex: none; width: 138px; height: 138px; border-radius: 50%;
    border: 2px solid var(--g5-line2); outline: 1px dashed var(--g5-line2); outline-offset: 6px;
    display: grid; place-content: center; text-align: center; color: var(--g5-accent);
    background: var(--g5-surface); transform: rotate(-8deg);
}
.mtg-seal b { display: block; font-family: Georgia, serif; font-size: 48px; line-height: 1; font-weight: 700; }
.mtg-seal span { display: block; font-size: 11px; line-height: 1.6; letter-spacing: .08em; margin-top: 6px; }

.mtg-inputbar {
    margin-top: 30px; background: var(--g5-surface);
    border: 1px solid var(--g5-line2); border-radius: var(--g5-r);
    box-shadow: 4px 4px 0 var(--g5-bg2); overflow: hidden;
}
.mtg-inputbar-hd {
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    padding: 13px 20px; border-bottom: 1px solid var(--g5-line);
    background: var(--g5-surface2);
}
.mtg-inputbar-hd b { font-size: 14.5px; letter-spacing: .03em; }
.mtg-inputbar-hd span { font-size: 12px; color: var(--g5-muted); }
.mtg-inputs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 13px; padding: 18px 20px 20px; align-items: end; }
.mtg-inputs label { min-width: 0; }
.mtg-inputs label > span { display: block; font-size: 11.8px; font-weight: 700; color: var(--g5-ink2); margin-bottom: 5px; }
.mtg-inputs input { font-family: var(--g5-m); font-size: 13px; padding: 8px 9px; }
.mtg-inputs .g5-btn { min-height: 38px; }
.mtg-msg { margin: 0 20px 16px; padding: 9px 13px; border-radius: 5px; background: var(--g5-okbg); color: var(--g5-ok); font-size: 12.6px; }
.mtg-msg.is-err { background: var(--g5-badbg); color: var(--g5-bad); }

/* ---------- 章节标题 ---------- */
.mtg-sec-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mtg-sec-hd > i {
    font-family: Georgia, serif; font-style: italic; font-size: 15px; font-weight: 700;
    width: 28px; height: 28px; display: grid; place-items: center;
    border: 1px solid var(--g5-line2); border-radius: 50%; color: var(--g5-accent);
}
.mtg-sec-hd h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.mtg-sec-hd > span { margin-left: auto; font-size: 12px; color: var(--g5-muted); }

/* ---------- 三轨分岔 ---------- */
.mtg-tracks { margin-top: 34px; }
.mtg-fork { display: flex; justify-content: space-around; height: 24px; margin: 0 12% 0; }
.mtg-fork span { display: block; width: 2px; height: 24px; background: linear-gradient(var(--g5-line2), var(--g5-accent)); }
.mtg-track-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mtg-track {
    background: var(--g5-surface); border: 1px solid var(--g5-line);
    border-top: 3px solid var(--g5-accent); border-radius: var(--g5-r);
    padding: 18px 18px 20px; box-shadow: var(--g5-shadow);
}
.mtg-track[data-track="1"] { border-top-color: var(--g5-accent2); }
.mtg-track[data-track="2"] { border-top-color: var(--g5-muted); }
.mtg-track-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.mtg-track-hd > i {
    font-family: Georgia, serif; font-style: normal; font-size: 12px; font-weight: 700;
    width: 24px; height: 24px; display: grid; place-items: center;
    border-radius: 50%; background: var(--g5-bg2); color: var(--g5-accent); flex: none;
}
.mtg-track-hd h3 { font-size: 18px; font-weight: 700; }
.mtg-track-hd small { color: var(--g5-muted); font-size: 11.5px; }
.mtg-fields { display: grid; gap: 10px; }
.mtg-fields label > span { display: block; font-size: 11.5px; font-weight: 700; color: var(--g5-ink2); margin-bottom: 4px; }
.mtg-fields input { font-family: var(--g5-m); font-size: 12.8px; padding: 7px 9px; }
.mtg-meter { height: 7px; border-radius: 99px; background: var(--g5-bg2); margin: 18px 0 12px; overflow: hidden; }
.mtg-meter-fill { height: 100%; width: 0; border-radius: 99px; background: var(--g5-accent); transition: width .3s ease; }
.mtg-meter-fill.is-over { background: var(--g5-bad); }
.mtg-track-out {
    font-size: 13px; font-weight: 750; line-height: 1.7; padding: 8px 11px;
    border-radius: 5px; background: var(--g5-surface2); color: var(--g5-ink);
}
.mtg-track-out.is-ok { background: var(--g5-okbg); color: var(--g5-ok); }
.mtg-track-out.is-bad { background: var(--g5-badbg); color: var(--g5-bad); }
.mtg-track-out.is-warn { background: var(--g5-warnbg); color: var(--g5-warn); }
.mtg-track-notes { list-style: none; padding: 0; margin: 12px 0 0; font-size: 12px; line-height: 1.85; color: var(--g5-ink2); }
.mtg-track-notes li { padding-left: 14px; position: relative; margin-bottom: 4px; }
.mtg-track-notes li::before { content: '—'; position: absolute; left: 0; color: var(--g5-muted); }
.mtg-err { margin-top: 12px; padding: 9px 13px; border-radius: 5px; background: var(--g5-badbg); color: var(--g5-bad); font-size: 12.8px; }

/* ---------- 决策表 / 批量 ---------- */
.mtg-matrix, .mtg-batch {
    margin-top: 30px; padding: 22px 24px 24px;
    background: var(--g5-surface); border: 1px solid var(--g5-line);
    border-radius: var(--g5-r); box-shadow: var(--g5-shadow);
}
.mtg-matrix .mtg-sec-hd, .mtg-batch .mtg-sec-hd { padding-bottom: 13px; border-bottom: 1px solid var(--g5-line); }
.mtg-table { width: 100%; min-width: 720px; font-size: 13px; }
.mtg-table th {
    text-align: left; padding: 10px; font-size: 11.5px; font-weight: 750;
    color: var(--g5-muted); letter-spacing: .04em; border-bottom: 1px solid var(--g5-line2); white-space: nowrap;
}
.mtg-table td { padding: 11px 10px; border-bottom: 1px solid var(--g5-line); vertical-align: middle; }
.mtg-table tr:last-child td { border-bottom: 0; }
.mtg-table .g5-num { font-family: var(--g5-m); font-weight: 700; }
.mtg-table .mtg-path { font-weight: 750; }
.mtg-table .mtg-empty { text-align: center; color: var(--g5-muted); padding: 26px 10px !important; }
.mtg-hint { font-size: 12.6px; line-height: 1.85; color: var(--g5-ink2); margin: 14px 0 10px; }
.mtg-batch textarea { font-family: var(--g5-m); font-size: 12.4px; line-height: 1.75; }
.mtg-clean {
    display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
    margin-top: 13px; padding: 12px; border-radius: 6px;
    background: var(--g5-surface2); border: 1px dashed var(--g5-line2);
}
.mtg-clean > b { font-size: 12px; color: var(--g5-ink2); }
.g5-check {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    border: 1px solid var(--g5-line); border-radius: 4px;
    background: var(--g5-surface); color: var(--g5-ink2);
    font-size: 11.8px; font-weight: 650; cursor: pointer; user-select: none;
}
.g5-check input { width: 14px; height: 14px; margin: 0; }
.g5-check.is-on { border-color: var(--g5-accent); color: var(--g5-accent); background: var(--g5-bg2); }
#mtgPreview { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mtg-table-sm { min-width: 580px; margin-top: 16px; }

/* ---------- 阅读区 ---------- */
.mtg-read { margin-top: 42px; padding: 28px 30px 8px; border-top: 2px solid var(--g5-ink); }
.mtg-read h2 { font-size: 23px; font-weight: 700; margin-bottom: 16px; }
.mtg-read p { font-size: 14.4px; line-height: 2.1; color: var(--g5-ink2); margin-bottom: 15px; }
.mtg-read b { color: var(--g5-accent); font-weight: 700; }

@media (max-width: 1080px) {
    .mtg-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mtg-inputs .g5-btn { grid-column: span 3; }
}
@media (max-width: 860px) {
    .mtg-track-grid { grid-template-columns: 1fr; }
    .mtg-fork { display: none; }
    .mtg-seal { display: none; }
}
@media (max-width: 620px) {
    .mtg-inputs { grid-template-columns: 1fr 1fr; }
    .mtg-inputs .g5-btn { grid-column: span 2; }
    .mtg-matrix, .mtg-batch { padding: 16px 14px 18px; }
    .mtg-read { padding: 22px 16px 6px; }
}
