:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #1f2933;
  --muted: #667085;
  --line: #e6e0d8;
  --accent: #b45309;
  --accent-soft: #fff4e6;
  --green: #256f4a;
  --red: #b42318;
  --blue: #1d4ed8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  line-height: 1.7;
}
main {
  max-width: 880px;
  margin: 48px auto;
  padding: 0 24px 80px;
}
article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 38px;
  box-shadow: 0 12px 36px rgba(31, 41, 51, 0.06);
}
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }
h1 { font-size: 2.25rem; margin: 0 0 0.25rem; }
h2 { margin-top: 2.2rem; font-size: 1.35rem; color: var(--accent); }
h3 { margin-top: 1.4rem; font-size: 1.05rem; }
p.lede { font-size: 1.12rem; color: var(--muted); margin-top: 0.4rem; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card, .exercise, .answer-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: #fffdf9;
  margin: 18px 0;
}
.callout {
  border-left: 5px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 10px;
  margin: 18px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
button {
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 650;
}
button.secondary { background: white; color: var(--accent); }
textarea, input[type='text'] {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: white;
}
.feedback { margin-top: 10px; font-weight: 650; }
.good { color: var(--green); }
.warn { color: var(--red); }
.small { font-size: 0.92rem; color: var(--muted); }
code { background: #f2eee8; padding: 0.1em 0.35em; border-radius: 6px; }
footer { margin-top: 36px; color: var(--muted); font-size: 0.95rem; }
@media print {
  body { background: white; }
  main { margin: 0; max-width: none; }
  article { border: 0; box-shadow: none; padding: 0; }
  button, textarea { display: none; }
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}
th, td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
}
th {
  background: var(--accent-soft);
  color: var(--accent);
  text-align: left;
}
