@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --line: #d8e0e8;
  --blue: #2f67a5;
  --blue-light: #e5eff9;
  --yellow: #f2b84b;
  --yellow-light: #fff2ce;
  --coral: #e7795d;
  --green: #347a61;
  --shadow: 0 16px 42px rgba(16, 42, 67, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Noto Sans SC', 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
body.dark {
  --ink: #eef4f8;
  --ink-soft: #acc0d0;
  --paper: #0c1c2b;
  --surface: #122b40;
  --line: #31506a;
  --blue: #8db7df;
  --blue-light: #1b405d;
  --yellow-light: #584619;
  --shadow: 0 16px 42px rgba(0, 0, 0, .2);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.site-shell { min-height: 100vh; overflow: hidden; }
.topbar {
  height: 76px; padding: 0 clamp(20px, 6vw, 92px); display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; color: #fff; background: var(--ink); font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: -.12em; }
.brand-sub { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.topnav { display: flex; gap: 30px; color: var(--ink-soft); font-size: 14px; }
.topnav a:hover { color: var(--blue); }
.theme-toggle { border: 1px solid var(--line); width: 36px; height: 36px; border-radius: 50%; background: var(--surface); color: var(--ink); }
.hero { max-width: 1220px; margin: 0 auto; padding: 110px clamp(20px, 6vw, 92px) 92px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(48px, 9vw, 150px); align-items: center; }
.eyebrow { margin: 0 0 18px; font: 500 12px/1 'DM Mono', monospace; letter-spacing: .14em; color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 26px; font-size: clamp(42px, 5.2vw, 76px); line-height: 1.12; letter-spacing: -.065em; font-weight: 800; }
h1 em { color: var(--coral); font-style: normal; }
.hero-intro { max-width: 550px; color: var(--ink-soft); font-size: 18px; line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: var(--paper); box-shadow: 0 8px 20px rgba(16,42,67,.16); }
.button-primary:hover { box-shadow: 0 12px 24px rgba(16,42,67,.22); }
.button-quiet { color: var(--ink-soft); border-color: var(--line); background: transparent; }
.hero-note { position: relative; padding: 31px 31px 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(2deg); }
.hero-note::before { content: ''; position: absolute; width: 70px; height: 8px; top: -4px; left: calc(50% - 35px); background: var(--yellow); transform: rotate(-3deg); }
.note-top { display: flex; align-items: center; gap: 9px; color: var(--blue); font: 500 12px 'DM Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.note-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.hero-note p { margin: 34px 0 6px; color: var(--ink-soft); font-size: 14px; }
blockquote { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 21px; line-height: 1.55; font-weight: 700; letter-spacing: -.04em; }
.note-footer { display: flex; justify-content: space-between; margin-top: 18px; color: var(--ink-soft); font: 12px 'DM Mono', monospace; }
.stat-strip { max-width: 1220px; margin: 0 auto; padding: 0 clamp(20px, 6vw, 92px) 72px; display: grid; grid-template-columns: repeat(3, 1fr) 1.5fr; gap: 1px; }
.stat-strip > div { min-height: 92px; padding: 18px 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.stat-strip strong { font: 500 28px 'DM Mono', monospace; color: var(--coral); }
.stat-strip span { color: var(--ink-soft); font-size: 13px; }
.stat-tip { gap: 4px; padding-left: 34px !important; }
.tip-icon { color: var(--blue); font: 22px 'DM Mono', monospace; }
.section-pad { max-width: 1220px; margin: 0 auto; padding-left: clamp(20px, 6vw, 92px); padding-right: clamp(20px, 6vw, 92px); }
.roadmap-section, .grammar-section, .practice-section { padding-top: 80px; padding-bottom: 100px; }
.grammar-section, .practice-section { border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 38px; }
h2 { margin-bottom: 0; font-size: clamp(28px, 3vw, 43px); line-height: 1.2; letter-spacing: -.06em; }
.section-lead { max-width: 370px; margin-bottom: 0; color: var(--ink-soft); font-size: 14px; }
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.roadmap-card { min-height: 255px; padding: 25px; border: 1px solid var(--line); background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.roadmap-card:hover, .roadmap-card.active { transform: translateY(-5px); border-color: var(--blue); }
.roadmap-card.active { background: var(--yellow-light); }
.roadmap-number { color: var(--coral); font: 500 13px 'DM Mono', monospace; }
.roadmap-card h3 { margin: 41px 0 11px; font-size: 20px; letter-spacing: -.04em; }
.roadmap-card p { min-height: 64px; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.roadmap-tag { display: inline-block; color: var(--blue); font: 500 12px 'DM Mono', monospace; }
.grammar-heading { align-items: center; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); background: transparent; font-size: 13px; }
.filter:hover, .filter.active { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.search-box { max-width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 50px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.search-box span { font-size: 24px; line-height: 0; transform: rotate(-20deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-box input::placeholder { color: #8fa3b5; }
.grammar-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.grammar-card { border: 1px solid var(--line); background: var(--surface); }
.grammar-card[hidden] { display: none; }
.card-head { width: 100%; padding: 22px 24px; display: grid; grid-template-columns: 38px 1fr 28px; gap: 14px; align-items: center; border: 0; background: transparent; color: var(--ink); text-align: left; }
.card-number { color: var(--coral); font: 500 12px 'DM Mono', monospace; }
.card-title { font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.card-summary { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 13px; font-weight: 400; }
.card-chevron { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--blue); transition: transform .2s ease; }
.grammar-card.open .card-chevron { transform: rotate(45deg); }
.card-body { display: none; padding: 0 24px 24px; }
.grammar-card.open .card-body { display: block; }
.memory-line { margin: 0 0 18px; padding: 10px 12px; border-left: 3px solid var(--yellow); background: var(--yellow-light); font-size: 14px; }
.formula { margin: 0 0 18px; padding: 16px; background: var(--blue-light); color: var(--ink); font-family: 'DM Mono', monospace; font-size: 14px; line-height: 1.8; white-space: pre-line; }
.example-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.example { padding: 14px; border: 1px solid var(--line); }
.example small, .mistake-label { display: block; margin-bottom: 7px; color: var(--blue); font: 500 11px 'DM Mono', monospace; letter-spacing: .08em; }
.example p { margin: 0; font-size: 15px; }
.example em { color: var(--coral); font-style: normal; font-weight: 700; }
.mistake { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.mistake-label { display: inline; margin-right: 8px; color: var(--coral); }
.empty-state { margin: 28px 0; text-align: center; color: var(--ink-soft); }
.parent-section { padding-top: 30px; padding-bottom: 100px; }
.parent-card { display: grid; grid-template-columns: .7fr 1.5fr .8fr; align-items: center; gap: 32px; padding: 31px 35px; background: var(--ink); color: var(--paper); }
.parent-label { align-self: start; color: var(--yellow); font: 500 12px 'DM Mono', monospace; letter-spacing: .1em; }
.parent-label span { margin-right: 9px; }
.parent-card h2 { font-size: clamp(22px, 2.5vw, 32px); }
.parent-card p { margin: 15px 0 0; color: #b7c8d5; font-size: 14px; line-height: 1.8; }
.parent-steps { justify-self: end; display: flex; flex-direction: column; gap: 8px; color: var(--yellow); font: 500 12px 'DM Mono', monospace; }
.quiz-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.quiz-item { min-height: 242px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.quiz-item.correct { border-color: var(--green); }
.quiz-item.wrong { border-color: var(--coral); }
.quiz-index { color: var(--coral); font: 500 12px 'DM Mono', monospace; }
.quiz-question { margin: 17px 0 18px; font-size: 15px; font-weight: 700; line-height: 1.65; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option { display: flex; align-items: flex-start; gap: 7px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.quiz-option input { accent-color: var(--coral); margin-top: 4px; }
.quiz-explain { display: none; margin: 15px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.quiz-item.checked .quiz-explain { display: block; }
.quiz-footer { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.quiz-result { color: var(--blue); font-weight: 700; }
.source-note { padding-top: 28px; padding-bottom: 72px; }
.source-note-inner { display: flex; align-items: flex-start; gap: 14px; padding: 17px 20px; border: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.source-note-inner p { margin: 0; }
.source-note strong { color: var(--ink); }
.source-icon { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border: 1px solid var(--blue); border-radius: 50%; color: var(--blue); font: 500 13px 'DM Mono', monospace; }
.footer { max-width: 1220px; margin: 0 auto; padding: 24px clamp(20px, 6vw, 92px) 34px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 74px; }
  .hero-note { max-width: 520px; transform: rotate(1deg); }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .stat-tip { grid-column: 1 / -1; padding-left: 22px !important; }
  .quiz-list { grid-template-columns: repeat(2, 1fr); }
  .quiz-item:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar { height: 64px; }
  .topnav { display: none; }
  .hero { padding-top: 62px; padding-bottom: 60px; }
  h1 { font-size: 43px; }
  .hero-intro { font-size: 16px; }
  .stat-strip { padding-bottom: 46px; grid-template-columns: repeat(3, 1fr); }
  .stat-strip > div { padding: 14px 9px; }
  .stat-strip strong { font-size: 22px; }
  .stat-strip span { font-size: 11px; }
  .section-heading, .grammar-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .roadmap-section, .grammar-section, .practice-section { padding-top: 58px; padding-bottom: 66px; }
  .roadmap-grid, .grammar-list, .quiz-list { grid-template-columns: 1fr; }
  .quiz-item:last-child { grid-column: auto; }
  .parent-card { grid-template-columns: 1fr; padding: 25px; gap: 16px; }
  .parent-steps { justify-self: start; flex-direction: row; gap: 18px; }
  .example-row { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 5px; }
}
