/* ==========================================================================
 * 育兒補考 · 育兒執照考試 — style.css
 * 設計語彙：執照感（深藍 #0d1b2a × 金 #d4a24c），其餘留白給內容。
 * ========================================================================== */
:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #f4f6f9;
  --paper: #ffffff;
  --brand: #0d1b2a;
  --brand-2: #16324f;
  --gold: #c8963c;
  --gold-2: #d4a24c;
  --teal: #0f766e;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 24px 60px rgba(13, 27, 42, .18);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif TC", "Songti TC", "Times New Roman", "Noto Sans TC", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.5rem; margin-top: .2em; }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
kbd {
  display: inline-block; padding: .1em .45em; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; background: #fff; font-size: .8em;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ---------- 導覽 ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 6px;
  padding: 10px clamp(12px, 4vw, 40px);
  background: var(--brand); color: #fff;
  flex-wrap: wrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.nav a {
  color: #cbd5e1; text-decoration: none; font-size: .93rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; transition: .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.nav a.on { background: var(--gold-2); color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-brand {
  display: flex; align-items: center; gap: 8px; margin-right: auto;
  color: #fff !important; font-weight: 800; font-size: 1rem; letter-spacing: .06em;
  padding: 6px 12px 6px 6px !important; text-decoration: none; white-space: nowrap;
}
.nav-brand b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--gold-2); color: var(--brand); font-size: .92rem; font-weight: 800;
}
.nav-brand:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }

/* ---------- 區塊與卡片 ---------- */
.sec { padding: clamp(20px, 4vw, 44px) clamp(14px, 4vw, 40px); max-width: 1180px; margin: 0 auto; width: 100%; }
.sec.narrow { max-width: 820px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: .95rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid.dims { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.levels { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.records { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } h1 { font-size: 1.8rem; } }

/* ---------- 首頁 ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(212, 162, 76, .22), transparent 60%),
    linear-gradient(180deg, #0d1b2a 0%, #14283d 62%, #0d1b2a 100%);
  color: #eef2f7;
  padding: clamp(34px, 7vw, 84px) clamp(14px, 4vw, 40px) clamp(28px, 5vw, 56px);
  text-align: center;
}
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); margin-bottom: .3em; }
.hero .lead { color: #cbd5e1; max-width: 760px; margin: 0 auto 1.6em; font-size: clamp(.95rem, 1.6vw, 1.05rem); }
.hero .lead strong { color: var(--gold-2); }
.badge {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  background: rgba(212, 162, 76, .14); border: 1px solid rgba(212, 162, 76, .5);
  color: var(--gold-2); font-size: .78rem; font-weight: 600; letter-spacing: .02em;
}
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; max-width: 840px; margin: 28px auto 0;
}
.stats div {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px; padding: 12px 8px;
}
.stats b { display: block; font-size: 1.6rem; color: var(--gold-2); letter-spacing: .02em; }
.stats span { font-size: .78rem; color: #b9c4d4; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: .95rem;
  cursor: pointer; font-family: inherit; transition: .15s; text-decoration: none;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.primary.big { padding: 14px 26px; font-size: 1.05rem; width: 100%; }
.btn.danger { background: #fff; border-color: #f3b6b6; color: var(--danger); }
.btn.danger:hover { background: #fef2f2; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.btn:focus-visible, .option:focus-visible, .nav a:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.link { background: none; border: none; padding: 0; color: var(--brand-2); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--danger); }

/* ---------- 卡片細節 ---------- */
.dim-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: .18s; }
.dim-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; border-color: #cbd5e1; }
.dim-card p { color: var(--ink-2); font-size: .93rem; flex: 1; }
.dim-key {
  display: inline-block; width: 34px; height: 26px; line-height: 26px; text-align: center;
  border-radius: 7px; background: rgba(200, 150, 60, .14); color: #8a6218;
  font-family: ui-monospace, monospace; font-weight: 700; font-size: .78rem; margin-bottom: 10px;
}
.card-foot { color: var(--muted); font-size: .86rem; font-weight: 600; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step-n {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--gold-2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px;
}
.step p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.level-card { border-left: 5px solid var(--c); }
.level-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.level-head span { color: var(--c); font-weight: 800; }
.level-score { font-size: .86rem; color: var(--muted); }
.level-licence { font-weight: 700; color: var(--c); margin: 2px 0 8px; }
.level-card p { font-size: .89rem; color: var(--ink-2); margin: 0; }

/* ---------- 表單 ---------- */
.form { display: flex; flex-direction: column; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form.inline { flex-direction: row; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form.inline label { flex: 1; min-width: 240px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.form input[type=text], .form select {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit;
  background: #fcfcfd; color: var(--ink); width: 100%;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 162, 76, .18); }
.field-group { display: flex; flex-direction: column; gap: 10px; }
.group-label { font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.radio-card {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; background: #fcfcfd; font-weight: 500; transition: .15s;
}
.radio-card:hover { border-color: #cbd5e1; }
.radio-card input { margin-right: 8px; }
.radio-card span { font-size: .95rem; }
.radio-card em { font-style: normal; color: var(--muted); font-size: .86rem; }
.radio-card:has(input:checked) { border-color: var(--gold); background: rgba(212, 162, 76, .08); }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; font-size: .9rem; color: var(--ink-2); }

/* ---------- 公告 ---------- */
.notice { border-radius: 12px; padding: 15px 18px; margin-bottom: 18px; font-size: .93rem; border: 1px solid var(--line); background: #f8fafc; color: var(--ink-2); }
.notice b { color: var(--ink); }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice.warn { background: #fffbeb; border-color: #fcd68a; color: #7c4a03; }
.notice.warn b { color: #7c4a03; }
.notice.danger { background: #fef2f2; border-color: #f5b9b9; color: #9b1c1c; }
.notice.danger b { color: #9b1c1c; }
.notice.ok { background: #f0fdf4; border-color: #b7e6c4; color: #14603a; }
.notice.ok b { color: #14603a; }
.disclaimer p { color: var(--ink-2); font-size: .93rem; }

/* ---------- 測驗 ---------- */
.exam { max-width: 900px; }
.exam-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.exam-title { font-size: .9rem; color: var(--muted); }
.exam-count { font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.progress { height: 9px; background: #e8ecf1; border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .25s ease; }
.qmeta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: rgba(13, 27, 42, .07); color: var(--brand-2);
}
.tag.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.qcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); margin-bottom: 18px; }
.qstem { font-size: 1.06rem; line-height: 1.7; margin-bottom: 20px; font-weight: 600; white-space: pre-line; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfd;
  font: inherit; font-size: .98rem; color: var(--ink); cursor: pointer; transition: .14s; line-height: 1.6;
}
.option:hover { border-color: var(--gold); background: #fffdf7; }
.option.sel { border-color: var(--brand); background: #eef4fa; box-shadow: 0 0 0 2px rgba(13, 27, 42, .08); }
.opt-key {
  flex: none; width: 26px; height: 26px; border-radius: 8px; background: #eef2f7; color: var(--brand-2);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .82rem;
}
.option.sel .opt-key { background: var(--brand); color: var(--gold-2); }
.opt-text { flex: 1; }
.opt-check { color: var(--brand); font-weight: 800; }
.exam-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.exam-nav .btn { flex: 1; min-width: 130px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 14px; }
.jump-panel { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.jump-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 7px; }
.jump-dot { padding: 7px 0; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-size: .8rem; color: var(--muted); }
.jump-dot.done { background: #eef4fa; border-color: #c7d7ea; color: var(--brand-2); font-weight: 700; }
.jump-dot.cur { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212, 162, 76, .3); }
.jump-legend { margin-top: 10px; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.jump-legend .dot { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.jump-legend .dot.done { background: #eef4fa; border-color: #c7d7ea; }

/* ---------- 成績單 ---------- */
.verdict { display: grid; grid-template-columns: 190px 1fr; gap: 22px; border-left: 6px solid var(--c); }
@media (max-width: 700px) { .verdict { grid-template-columns: 1fr; } }
.verdict-grade { font-family: var(--serif); font-size: 3rem; font-weight: 800; color: var(--c); line-height: 1; }
.verdict-score b { font-size: 2.6rem; letter-spacing: -.02em; }
.verdict-score span { color: var(--muted); font-size: 1rem; margin-left: 5px; }
.verdict-name { font-size: 1.28rem; font-weight: 800; color: var(--c); margin-top: 8px; }
.verdict-meta { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.verdict-line { color: var(--muted); font-size: .95rem; font-style: italic; margin-bottom: 10px; }
.verdict-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.cert-strip {
  margin-top: 12px; font-size: .86rem; color: var(--ink-2); background: #f8fafc;
  border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px;
}
.strike-strip { margin-top: 10px; padding: 8px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600;
  background: #fffbeb; border: 1px solid #fcd68a; color: #7c4a03; }
.strike-strip.veto { background: #fef2f2; border-color: #f5b9b9; color: #9b1c1c; }
.strike-strip.ok { background: #f0fdf4; border-color: #b7e6c4; color: #14603a; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #fff; background: var(--c); }
.chart-card { display: flex; flex-direction: column; }
.chart-card svg { width: 100%; height: auto; max-height: 380px; margin: 0 auto; }
.chart-note { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.radar-ring { fill: none; stroke: #e4e7ec; stroke-width: 1; }
.radar-ring-pass { stroke: #d9c08a; stroke-dasharray: 4 3; }
.radar-axis { stroke: #eef1f5; stroke-width: 1; }
.radar-area { fill: rgba(22, 50, 79, .18); stroke: var(--brand-2); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--gold); stroke: #fff; stroke-width: 1.5; }
.radar-label { font-size: 11px; fill: var(--ink-2); font-weight: 600; font-family: var(--font); }
.radar-score { fill: var(--muted); font-size: 9.5px; font-weight: 500; }
.quad-box { fill: #fbfcfd; stroke: var(--line); }
.quad-fill { fill: rgba(200, 150, 60, .06); }
.quad-fill.dim { fill: rgba(13, 27, 42, .04); }
.quad-mid { stroke: #d8dee6; stroke-dasharray: 4 4; }
.quad-cross { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.quad-dot { fill: var(--brand); stroke: #fff; stroke-width: 3; }
.quad-tag { font-size: 10px; fill: #9aa4b2; font-family: var(--font); }
.quad-axis { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.style-name { font-weight: 800; font-size: 1.12rem; text-align: center; margin-top: 8px; }
.style-name span { font-weight: 500; color: var(--muted); font-size: .85rem; }
.bars { display: flex; flex-direction: column; gap: 16px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.bar-name { font-size: .98rem; }
.bar-status { font-size: .82rem; font-weight: 700; color: var(--c); }
.bar-track { position: relative; height: 22px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.bar-fill { height: 100%; background: var(--c); border-radius: 999px; transition: width .6s ease; }
.bar-value { position: absolute; right: 10px; top: 0; line-height: 22px; font-size: .8rem; font-weight: 800; color: var(--brand); }
.bar-meta { font-size: .8rem; color: var(--muted); }
.rec { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; background: #fcfcfd; }
.rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-n { width: 24px; height: 24px; border-radius: 8px; background: var(--brand); color: var(--gold-2); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; }
.rec-score { color: var(--muted); font-size: .85rem; margin-left: auto; }
.rec-item { font-size: .92rem; margin: 10px 0 6px; color: var(--ink-2); white-space: pre-line; }
.rec-advice { margin: 6px 0 10px; padding-left: 20px; color: var(--ink-2); font-size: .93rem; }
.review { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fcfcfd; }
.review summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; flex-wrap: wrap; }
.review summary .r-stem { flex: 1; min-width: 200px; font-size: .94rem; color: var(--ink-2); white-space: pre-line; }
.review .r-score { font-weight: 800; color: var(--danger); font-size: .9rem; }
.review-body { padding: 0 16px 16px; font-size: .93rem; }
.ans { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; color: var(--ink-2); white-space: pre-line; }
.ans.wrong { background: #fef2f2; border: 1px solid #f5d4d4; }
.ans.wrong span { color: var(--danger); font-weight: 700; }
.ans.right { background: #f0fdf4; border: 1px solid #c9e8d3; }
.ans.right span { color: var(--ok); font-weight: 700; }
.explain, .advice { margin-top: 8px; color: var(--ink-2); }
.trend { width: 100%; height: auto; max-height: 220px; }
.trend-grid { stroke: #eef1f5; }
.trend-grid.pass { stroke: #d9c08a; stroke-dasharray: 4 3; }
.trend-line { fill: none; stroke: var(--brand-2); stroke-width: 2.5; stroke-linejoin: round; }
.trend-dot { fill: var(--gold); stroke: #fff; stroke-width: 2; }
.trend-axis { font-size: 10px; fill: var(--muted); font-family: var(--font); }

/* ---------- 我的成績 ---------- */
.record { border-left: 5px solid var(--c); }
.record-head { display: flex; align-items: baseline; gap: 8px; }
.record-head b { font-size: 1.6rem; }
.record-head span { color: var(--c); font-weight: 800; }
.record-name { font-weight: 700; font-size: .95rem; }
.record-meta { font-size: .85rem; color: var(--muted); margin: 6px 0 12px; }
.record-actions { display: flex; gap: 14px; font-size: .88rem; }

/* ---------- 學習中心 / 資源 ---------- */
.actions, .myths, .resources { margin: 0; padding-left: 0; list-style: none; }
.actions li, .myths li { position: relative; padding-left: 24px; margin-bottom: 12px; color: var(--ink-2); }
.actions li::before { content: "→"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.myths li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 800; }
.resources li { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); font-size: .93rem; }
.resources li:last-child { border-bottom: none; }
.resources b { min-width: 190px; }
.tel { font-family: ui-monospace, monospace; font-weight: 800; color: var(--brand); background: rgba(212, 162, 76, .14); padding: 3px 10px; border-radius: 8px; }
.resources span { flex: 1; min-width: 200px; color: var(--muted); font-size: .88rem; }

/* ---------- 證書 ---------- */
.cert-wrap { max-width: 900px; }
.cert-actions { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.cert-sheet {
  background: #fffdf7; border: 2px solid var(--gold); border-radius: 6px;
  padding: clamp(14px, 3vw, 26px); box-shadow: var(--shadow-lg);
  position: relative;
}
.cert-sheet::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(200, 150, 60, .45); border-radius: 3px; pointer-events: none;
}
.cert-inner { border: 1px solid rgba(200, 150, 60, .7); padding: clamp(20px, 5vw, 46px); text-align: center; position: relative; }
.cert-head { font-family: var(--serif); font-size: 1.4rem; font-weight: 800; color: var(--brand); letter-spacing: .1em; }
.cert-head span { display: block; font-size: .72rem; letter-spacing: .22em; color: var(--gold); font-family: var(--font); font-weight: 600; }
.cert-title { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; color: var(--brand); letter-spacing: .16em; margin: 18px 0 6px; }
.cert-sub { color: var(--gold); font-weight: 700; letter-spacing: .08em; font-size: .9rem; }
.cert-holder { margin: 26px 0 16px; font-size: 1rem; color: var(--ink-2); }
.cert-holder b {
  display: block; font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--ink);
  border-bottom: 2px solid rgba(200, 150, 60, .6); padding: 0 24px 6px; margin: 8px auto 6px; max-width: 460px;
}
.cert-text { color: var(--ink-2); font-size: .95rem; line-height: 2; }
.cert-text b { color: var(--brand); font-size: 1.15rem; }
.cert-band {
  display: inline-block; margin: 12px 0 24px; padding: 8px 26px; border-radius: 999px;
  background: var(--c); color: #fff; font-weight: 800; letter-spacing: .06em;
}
.cert-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; text-align: left; margin-top: 10px; }
.cert-foot div { border-top: 1px dashed rgba(200, 150, 60, .5); padding-top: 8px; }
.cert-foot span { display: block; font-size: .75rem; color: var(--muted); letter-spacing: .05em; }
.cert-foot b { font-family: ui-monospace, monospace; font-size: .92rem; color: var(--brand); }
.cert-sign { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 30px; gap: 20px; flex-wrap: wrap; }
.sign-line { border-top: 1px solid var(--ink-2); padding-top: 6px; font-size: .85rem; color: var(--ink-2); font-weight: 600; min-width: 200px; text-align: center; }
.cert-seal {
  width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--danger); color: var(--danger);
  display: flex; align-items: center; justify-content: center; text-align: center; font-size: .78rem;
  font-weight: 800; transform: rotate(-12deg); line-height: 1.3; opacity: .85;
}
.cert-disc { font-size: .78rem; color: var(--muted); margin-top: 22px; text-align: left; line-height: 1.6; }

/* ---------- 頁尾 ---------- */
.foot {
  background: var(--brand); color: #9fb0c4; padding: 26px clamp(14px, 4vw, 40px); text-align: center;
  font-size: .85rem; margin-top: 40px;
}
.foot-links { display: flex; gap: 18px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.foot-links a { color: #cbd5e1; }
.foot-disc { max-width: 720px; margin: 10px auto 0; font-size: .78rem; color: #7d8ea3; line-height: 1.7; }

/* ---------- 提示訊息 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: .93rem; font-weight: 600; z-index: 99;
  opacity: 0; transition: .25s; max-width: min(92vw, 460px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #14603a; }

/* ---------- 列印 ---------- */
@media print {
  body { background: #fff; }
  .nav, .foot, .cert-actions, .toast, .verdict-actions, .exam-nav, .hint { display: none !important; }
  .sec { padding: 0; max-width: none; }
  .card, .cert-sheet { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .cert-sheet { border: 2px solid #c8963c; }
  .review { break-inside: avoid; }
  .review[open] { display: block; }
  a { color: inherit; }
}
