/* 二試批改：答案卷＋紅筆。紅色只留給批改記號，其餘保持安靜。 */
:root {
  --paper: #fcfcfa;
  --sheet: #ffffff;
  --ink: #1b2a3a;
  --muted: #5b6875;
  --rule: #d6e2eb;
  --line: #e6ecf1;
  --red: #c42b2b;
  --red-soft: #fbe9e7;
  --ok: #2f7a4d;
  --amber: #8a6a12;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121820; --sheet: #18212b; --ink: #e4e9ee; --muted: #9aa6b2;
    --rule: #2a3946; --line: #24313d; --red: #ff7a6e; --red-soft: #3a2020; --ok: #6fca93; --amber: #e0c063;
  }
}
:root[data-theme="dark"] {
  --paper: #121820; --sheet: #18212b; --ink: #e4e9ee; --muted: #9aa6b2;
  --rule: #2a3946; --line: #24313d; --red: #ff7a6e; --red-soft: #3a2020; --ok: #6fca93; --amber: #e0c063;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.75 var(--sans); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .4em; }
h3 { font-size: 1.1rem; margin: 0 0 .3em; }

.head { border-bottom: 1px solid var(--line); }
.head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 1.15rem var(--serif); text-decoration: none; }
.head nav { display: flex; gap: 18px; font-size: .95rem; }
.head nav a { text-decoration: none; color: var(--muted); }
.head nav a:hover { color: var(--ink); }

.btn { display: inline-block; background: var(--ink); color: var(--paper); padding: .7em 1.4em; border-radius: 4px;
  font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--red); }
.btn.big { font-size: 1.15rem; padding: .85em 1.8em; }
.btn.is-off { background: var(--line); color: var(--muted); cursor: not-allowed; }
.link { color: var(--muted); }

/* 首屏：左文案、右答案卷 */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.kicker { color: var(--muted); margin: 0 0 .5em; font-size: .95rem; }
.nw { display: inline-block; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 900; margin: 0 0 .5em; letter-spacing: .02em; }
.lead { font-size: 1.08rem; max-width: 34em; }
.hero-cta { display: flex; align-items: center; gap: 20px; margin: 1.6em 0 .8em; flex-wrap: wrap; }
.note { color: var(--muted); font-size: .9rem; }

.sheet { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-left: 3px double var(--red);
  padding: 20px 22px 18px 26px; box-shadow: 0 1px 0 var(--rule);
  background-image: repeating-linear-gradient(var(--sheet) 0 31px, var(--rule) 31px 32px); background-position: 0 52px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; color: var(--muted);
  border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 4px; background: var(--sheet); }
.score { font: 900 2.4rem/1 var(--serif); transform: rotate(-4deg); }
.score small { font-size: 1rem; }
.red { color: var(--red); }
.hand { font: 500 1rem/32px var(--serif); margin: 0; }
.hand mark { background: none; color: inherit; text-decoration: underline wavy var(--red); text-underline-offset: 5px; }
.margin { font-size: .88rem; line-height: 32px; margin: 0 0 0 1.2em; font-weight: 500; }

/* 範例 */
.examples { padding: 56px 0; border-top: 1px solid var(--line); }
.sub { color: var(--muted); max-width: 40em; }
.qtabs, .atabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 12px; }
.qtab, .atab { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 4px;
  padding: .5em 1em; cursor: pointer; text-align: left; }
.qtab small { display: block; color: var(--muted); font-size: .8rem; }
.qtab[aria-selected="true"], .atab[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.atab b { margin-left: .6em; font-family: var(--serif); color: var(--red); }
.facts { background: var(--sheet); border: 1px solid var(--line); padding: 10px 16px; border-radius: 4px; }
.facts summary { cursor: pointer; font-weight: 700; }
.facts p { margin: .6em 0; }
.ask { font-weight: 700; }

.res-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin-top: 8px; }
.paper { background: var(--sheet); border: 1px solid var(--rule); padding: 18px 22px; font: 500 .98rem/1.95 var(--serif); }
.paper h3 { font-size: .9rem; color: var(--muted); font-family: var(--sans); }
.total { font: 900 2.6rem/1 var(--serif); color: var(--red); margin: 0 0 12px; }
.total small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.marks h4 { font-size: .95rem; margin: 1.2em 0 .3em; }
.checks { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.checks li { padding: 2px 0; }
.checks .bad { color: var(--red); font-weight: 500; }
.checks .ok { color: var(--ok); }
.checks .unk { color: var(--amber); }
.marks ol { padding-left: 1.3em; margin: 0; }

.table-scroll { overflow-x: auto; margin-top: 28px; }
.rubric { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.rubric th, .rubric td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rubric thead th { font-size: .85rem; color: var(--muted); border-bottom: 2px solid var(--rule); }
.rubric tbody th { width: 26%; font-weight: 500; }
.pts { font: 700 1.1rem var(--serif); white-space: nowrap; }
.pts small { font-size: .8rem; color: var(--muted); }
.pts.low { color: var(--red); }

/* 怎麼批改 */
.how { padding: 56px 0; border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 24px 0 36px; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 12px; }
.steps li::before { content: counter(s); font: 900 1.8rem var(--serif); color: var(--red); display: block; }
.steps p { color: var(--muted); margin: 0; }
.honest { border-left: 3px solid var(--rule); padding: 4px 0 4px 18px; max-width: 46em; }
.honest ul { margin: 0; padding-left: 1.2em; color: var(--muted); }

/* 登記 */
.join { padding: 56px 0 72px; border-top: 1px solid var(--line); }
.join-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.join p { max-width: 36em; }
.price { color: var(--muted); font-size: .92rem; }
.join-cta { text-align: center; }

.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: .88rem; color: var(--muted); }
.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; }
.fine { flex-basis: 100%; }

.doc { padding: 40px 16px 64px; max-width: 720px; }
.doc h2 { font-size: 1.2rem; margin-top: 1.6em; }

@media (max-width: 820px) {
  .hero-grid, .res-grid, .join-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .join-cta { text-align: left; }
}
