@import "tailwindcss";

:root {
  --ink: #172033;
  --muted: #657084;
  --paper: #f7f5ef;
  --line: #d9d6cd;
  --blue: #2557d6;
  --blue-soft: #e7edff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}

nav { display: flex; gap: 30px; }
nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
nav a:hover { color: var(--blue); }

.hero,
.notes-section,
.about-section,
.contact-section,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.hero { padding: 120px 0 132px; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

.hero h1 {
  max-width: 940px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(48px, 8vw, 102px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hero-copy {
  max-width: 620px;
  margin: 38px 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.primary-link,
.featured-note a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.grammar-hero,
.grammar-preview {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.grammar-hero { padding: 112px 0 94px; }
.grammar-hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(52px, 8vw, 100px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.045em;
}
.grammar-hero > p:not(.eyebrow) {
  max-width: 650px;
  margin: 34px 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}
.grammar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.grammar-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: 96px;
}
.grammar-preview > div {
  min-height: 250px;
  padding: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.grammar-preview span {
  display: block;
  margin-bottom: 56px;
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 22px;
}
.grammar-preview strong { font-size: 21px; }
.grammar-preview p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}
.primary-link span,
.featured-note a span { margin-left: 6px; }

.home-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.home-practice {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding: 88px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 84px;
  border-top: 1px solid var(--line);
}
.home-practice h2,
.grammar-categories h2,
.privacy-article h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-weight: 500;
  letter-spacing: -.035em;
}
.home-practice h2 { max-width: 540px; font-size: clamp(42px, 5vw, 68px); line-height: 1.12; }
.home-practice > div:last-child > p { margin: 3px 0 28px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.home-practice ul { margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.home-practice li { padding: 22px 18px 22px 0; display: grid; gap: 6px; }
.home-practice li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.home-practice li strong { color: var(--blue); font: 500 34px Georgia, serif; }
.home-practice li span { color: var(--muted); font-size: 12px; }

.grammar-categories {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 104px;
  padding-top: 84px;
  border-top: 1px solid var(--line);
}
.grammar-categories header { margin-bottom: 36px; }
.grammar-categories h2 { font-size: clamp(40px, 5vw, 66px); }
.grammar-categories > div { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grammar-categories > div span { min-height: 116px; padding: 24px; display: grid; align-content: space-between; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 700; }
.grammar-categories small { color: var(--blue); font: 500 15px Georgia, serif; }

.privacy-article {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 108px;
}
.privacy-article > header { margin-bottom: 68px; }
.privacy-article h1 { font-size: clamp(56px, 8vw, 92px); }
.privacy-article > header > p:last-child { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.privacy-article section { padding: 32px 0; border-top: 1px solid var(--line); }
.privacy-article section h2 { margin: 0 0 12px; font: 500 26px Georgia, "Songti SC", serif; }
.privacy-article section p { margin: 0; color: var(--muted); line-height: 1.9; }
.privacy-article aside { margin-top: 30px; padding: 24px 26px; border-left: 3px solid var(--blue); background: #fff; color: var(--muted); line-height: 1.8; }

.notes-section {
  padding: 92px 0 104px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 44px;
}

.section-heading h2,
.about-grid h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 500;
}

.note-count {
  color: #a7a49b;
  font-family: Georgia, serif;
  font-size: 46px;
}

.featured-note {
  display: grid;
  grid-template-columns: 120px 1fr;
  background: #fff;
  border: 1px solid var(--line);
}

.note-index {
  padding: 38px;
  border-right: 1px solid var(--line);
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 24px;
}

.note-body { padding: 58px 64px 60px; }
.note-meta {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.note-body h3 {
  margin: 0 0 20px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.2;
}
.note-body > p:not(.note-meta) {
  max-width: 700px;
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.85;
}

.about-section,
.contact-section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.about-grid p,
.contact-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}
.about-grid .disclaimer {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.contact-grid h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 500;
}

.contact-grid .contact-note {
  margin-top: 22px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.article-header { width: min(1180px, calc(100% - 48px)); }

.article-hero,
.article-cover,
.article-lead,
.article-toc,
.article-section,
.article-footer {
  width: min(980px, calc(100% - 48px));
  margin-inline: auto;
}

.article-hero { padding: 108px 0 62px; }
.article-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(54px, 8vw, 98px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.article-deck {
  max-width: 720px;
  margin: 34px 0 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.85;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: 13px;
}

.article-cover { margin-top: 12px; }
.article-cover img {
  width: 100%;
  max-height: 740px;
  display: block;
  object-fit: cover;
  object-position: center 48%;
  border: 1px solid var(--line);
}
.article-cover figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.article-lead {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

.article-lead > p {
  max-width: 760px;
  margin: 0 0 24px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.75;
}

.article-lead aside {
  margin-top: 40px;
  padding: 20px 24px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  color: #425070;
  font-size: 14px;
  line-height: 1.8;
}

.article-toc {
  padding: 72px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 48px;
}
.article-toc .eyebrow { grid-column: 1 / -1; }
.article-toc a {
  padding: 16px 0;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  text-decoration: none;
}
.article-toc a:hover { color: var(--blue); }
.article-toc a span {
  color: var(--blue);
  font-family: Georgia, serif;
  font-weight: 400;
}

.article-section {
  padding: 94px 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.section-number {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 26px;
}
.article-content h2 {
  margin: 0 0 36px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(42px, 6vw, 66px);
  font-weight: 500;
}
.article-content > p {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 2;
}

.timeline { margin-top: 38px; }
.timeline > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.timeline time {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}
.timeline p {
  margin: 0;
  line-height: 1.9;
}

.takeaway {
  margin: 38px 0;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
}
.takeaway strong { color: var(--blue); }
.takeaway p { margin: 0; line-height: 1.8; }

.article-content blockquote {
  margin: 44px 0;
  padding: 4px 0 4px 28px;
  border-left: 3px solid var(--blue);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 25px;
  line-height: 1.7;
}

.summary-grid {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.summary-grid > div {
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.summary-grid span {
  display: block;
  margin-bottom: 22px;
  color: var(--blue);
  font-family: Georgia, serif;
}
.summary-grid strong { font-size: 18px; }
.summary-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.article-footer {
  padding: 48px 0 84px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 50px;
  border-top: 1px solid var(--line);
}
.article-footer > a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.article-footer p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

footer {
  padding: 28px 0 38px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--blue); }
.filing-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }

button,
input,
select,
textarea { font: inherit; }

button { color: inherit; }

.auth-page {
  min-height: 100vh;
  padding: 34px max(24px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, var(--paper) 0%, #eef2ff 100%);
}
.auth-brand { width: max-content; }
.auth-card {
  width: min(500px, 100%);
  margin: 86px auto 40px;
  padding: 46px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(23, 32, 51, .08);
}
.auth-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 42px;
  font-weight: 500;
}
.auth-intro { margin: 18px 0 28px; color: var(--muted); line-height: 1.8; }
.auth-form { display: grid; gap: 20px; }
.auth-form label,
.question-editor label,
.inline-create label,
.category-select { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.auth-form input,
.question-editor input,
.question-editor textarea,
.question-editor select,
.inline-create input,
.question-filters input,
.question-filters select,
.category-select select {
  width: 100%;
  border: 1px solid #c9cdd5;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  outline: none;
}
.auth-form input,
.inline-create input,
.question-filters input,
.question-filters select,
.category-select select { height: 48px; padding: 0 13px; }
.auth-form input:focus,
.question-editor textarea:focus,
.question-editor select:focus,
.inline-create input:focus,
.question-filters input:focus,
.question-filters select:focus,
.category-select select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 87, 214, .12); }
.auth-form small,
.question-editor small { color: #8a91a0; font-weight: 400; }
.auth-form .primary-button { border: 0; justify-content: center; cursor: pointer; }
.form-error { margin: 0; color: #a53232; font-size: 14px; line-height: 1.6; }

.workspace-page { min-height: 100vh; background: #f2f3f6; }
.account-header {
  min-height: 82px;
  padding: 18px max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.account-user { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
.account-user button,
.back-link,
.text-button,
.teacher-nav button,
.student-list button,
.question-list button,
.question-editor header button,
.pagination button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.account-user button:hover,
.back-link:hover,
.text-button:hover { color: var(--blue); }

.practice-home,
.results-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 74px 0 100px; }
.practice-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 48px; }
.practice-heading h1,
.panel-heading h2,
.result-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 500;
}
.practice-heading p:last-child,
.panel-heading > p:last-child,
.question-heading > div > p:last-child { max-width: 650px; margin: 18px 0 0; color: var(--muted); line-height: 1.8; }
.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.practice-config { padding: 34px; background: #fff; border: 1px solid var(--line); }
.mode-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mode-cards button {
  padding: 26px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}
.mode-cards button.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.mode-cards span { display: block; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.mode-cards strong { display: block; margin-top: 10px; font-size: 22px; }
.mode-cards p { margin: 10px 0 0; color: var(--muted); line-height: 1.7; }
.category-select { max-width: 440px; margin-top: 24px; }
.start-button { margin-top: 24px; border: 0; cursor: pointer; }
.history-section { margin-top: 72px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-title h2 { margin: 0; font: 500 38px Georgia, serif; }
.empty-state { padding: 30px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.history-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.history-list button { padding: 22px; display: grid; grid-template-columns: 1fr auto; gap: 8px; text-align: left; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.history-list button:hover { border-color: var(--blue); }
.history-list span { color: var(--muted); font-size: 12px; }
.history-list strong { grid-row: span 2; font-size: 28px; }
.history-list small { color: var(--ink); }

.exercise-shell { width: min(900px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.exercise-status { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.exercise-status div { display: grid; gap: 5px; }
.exercise-status span { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.exercise-status strong { font-size: 18px; }
.exercise-status time { color: var(--blue); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; margin-bottom: 18px; overflow: hidden; border-radius: 99px; background: #daddE4; }
.progress-track span { height: 100%; display: block; background: var(--blue); transition: width .2s ease; }
.exercise-card { padding: 38px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(23, 32, 51, .05); }
.question-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.dialogue-line { margin: 32px 0; display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; }
.dialogue-line b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.dialogue-line p { margin: 0; padding: 14px 18px; border-radius: 4px 14px 14px; background: #f2f3f6; font: 18px/1.6 Georgia, serif; }
.answer-label,
.bank-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sentence-builder { min-height: 88px; margin-top: 10px; padding: 18px 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 5px; border-bottom: 2px solid var(--ink); font: 18px/1.6 Georgia, serif; }
.frame-part { display: inline-flex; align-items: center; gap: 5px; white-space: pre-wrap; }
.answer-slot,
.placed-chunk,
.chunk-bank button { min-height: 42px; border-radius: 7px; font: 17px/1.25 Georgia, serif; }
.answer-slot { min-width: 92px; border: 1px dashed #b5bac5; background: #f7f7f8; }
.placed-chunk { padding: 8px 12px; border: 1px solid var(--blue); background: #fff; cursor: pointer; }
.bank-label { margin: 30px 0 10px; }
.chunk-bank { display: flex; flex-wrap: wrap; gap: 10px; }
.chunk-bank button { padding: 8px 13px; border: 1px solid #c9cdd5; background: #fbfaf7; box-shadow: 0 2px 5px rgba(23, 32, 51, .06); cursor: pointer; }
.chunk-bank button:disabled { opacity: .25; box-shadow: none; cursor: default; }
.exercise-actions { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; }
.exercise-actions > div { display: flex; gap: 10px; }
.exercise-actions .primary-button { border: 0; cursor: pointer; }
.text-button { color: var(--muted); }

.back-link { margin-bottom: 36px; color: var(--blue); font-weight: 700; }
.result-hero { padding: 44px; background: var(--ink); color: #fff; }
.result-hero h1 { font-size: 84px; }
.result-hero h1 span { color: #9da8bc; font-size: 34px; }
.result-hero > p:last-child { max-width: 620px; color: #c3cad6; line-height: 1.8; }
.breakdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.breakdown-grid div { padding: 22px; display: grid; gap: 16px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.breakdown-grid span { color: var(--muted); font-size: 13px; }
.breakdown-grid strong { font-size: 26px; }
.review-list { margin-top: 44px; display: grid; gap: 14px; }
.review-list article { padding: 26px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.review-list article.incorrect { border-left-color: #c34b4b; }
.review-list article header { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.review-list article header strong { color: var(--blue); }
.review-list article.incorrect header strong { color: #a53232; }
.review-list p { margin: 20px 0 0; font: 17px/1.7 Georgia, serif; }
.review-list p small { margin-bottom: 5px; display: block; color: var(--muted); font: 11px ui-sans-serif, sans-serif; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.review-context { color: var(--muted); }
.review-list aside { margin-top: 20px; padding: 16px 18px; background: var(--blue-soft); color: #425070; line-height: 1.7; }

.teacher-layout { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 90px; display: grid; grid-template-columns: 230px 1fr; gap: 54px; }
.teacher-nav { position: sticky; top: 24px; height: max-content; }
.teacher-nav h1 { margin: 0; font: 500 34px Georgia, serif; }
.teacher-nav nav { margin: 34px 0; display: grid; gap: 6px; }
.teacher-nav nav button { padding: 12px 14px; border-radius: 7px; text-align: left; color: var(--muted); font-weight: 700; }
.teacher-nav nav button.active { background: var(--blue); color: #fff; }
.teacher-content { min-width: 0; }
.panel-heading { margin-bottom: 34px; }
.panel-heading h2 { font-size: 54px; }
.question-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.question-heading .primary-button { flex-shrink: 0; border: 0; cursor: pointer; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-grid > div { min-height: 170px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; background: #fff; border: 1px solid var(--line); }
.metric-grid span { color: var(--muted); }
.metric-grid strong { font: 500 54px Georgia, serif; }
.data-section { margin-top: 46px; }
.data-section h3 { font-size: 22px; }
.attempt-table { background: #fff; border-top: 1px solid var(--line); }
.attempt-table > div { padding: 16px 18px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: center; gap: 20px; border: 1px solid var(--line); border-top: 0; }
.attempt-table > div > span:first-child { display: grid; }
.attempt-table small { color: var(--muted); }
.inline-create { margin-bottom: 28px; padding: 24px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; background: #fff; border: 1px solid var(--line); }
.inline-create .primary-button { border: 0; cursor: pointer; }
.student-list { display: grid; gap: 10px; }
.student-list article { padding: 20px; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--line); }
.student-list article.inactive,
.question-list article.inactive { opacity: .55; }
.student-list article > div:first-child { display: grid; }
.student-list article > div:nth-child(2) { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13px; }
.student-list article > div:last-child,
.question-list footer { display: flex; gap: 12px; }
.student-list button,
.question-list button { color: var(--blue); font-size: 13px; font-weight: 700; }
.question-filters { margin-bottom: 18px; display: grid; grid-template-columns: 1fr 220px auto; gap: 10px; }
.question-filters .secondary-button { border-radius: 9px; }
.question-list { display: grid; gap: 10px; }
.question-list article { padding: 20px; background: #fff; border: 1px solid var(--line); }
.question-list article > header { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.question-list article p { margin: 14px 0 0; font: 16px/1.55 Georgia, serif; }
.question-list article p small { width: 22px; display: inline-block; color: var(--blue); font: 800 11px ui-sans-serif, sans-serif; }
.question-list article > strong { margin-top: 14px; display: block; color: #245b3a; font: 15px/1.6 Georgia, serif; }
.question-list footer { width: auto; margin: 18px 0 0; padding: 14px 0 0; justify-content: flex-start; border-top: 1px solid var(--line); }
.pagination { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.pagination button { color: var(--blue); font-weight: 700; }
.pagination button:disabled { color: #aaa; cursor: default; }
.notice { margin: 0 0 20px; padding: 13px 16px; background: #fff7df; border: 1px solid #ead49a; color: #765917; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; padding: 24px; display: grid; place-items: center; background: rgba(15, 24, 43, .64); }
.modal-card { width: min(480px, 100%); padding: 34px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.modal-card h2 { margin: 0; font: 500 34px Georgia, serif; }
.modal-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.modal-card dl { margin: 24px 0; border-top: 1px solid var(--line); }
.modal-card dl > div { padding: 14px 0; display: grid; grid-template-columns: 110px 1fr; border-bottom: 1px solid var(--line); }
.modal-card dt { color: var(--muted); }
.modal-card dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; overflow-wrap: anywhere; }
.modal-card .primary-button { border: 0; cursor: pointer; }
.editor-backdrop { place-items: stretch end; padding: 0; }
.question-editor { width: min(620px, 100%); height: 100%; padding: 30px; display: grid; align-content: start; gap: 16px; overflow-y: auto; background: #fff; }
.question-editor header { display: flex; justify-content: space-between; align-items: flex-start; }
.question-editor h2 { margin: 0; font: 500 36px Georgia, serif; }
.question-editor textarea { min-height: 78px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.question-editor select { height: 46px; padding: 0 12px; }
.editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.question-editor > .primary-button { width: max-content; border: 0; cursor: pointer; }

@media (max-width: 720px) {
  .site-header,
  .hero,
  .notes-section,
  .about-section,
  .contact-section,
  footer { width: min(100% - 32px, 1180px); }
  .site-header { padding: 20px 0; }
  nav { gap: 18px; }
  .hero { padding: 78px 0 88px; }
  .hero h1 { font-size: 48px; }
  .hero-copy { font-size: 16px; }
  .grammar-hero,
  .grammar-preview { width: min(100% - 32px, 1180px); }
  .grammar-hero { padding: 72px 0 62px; }
  .grammar-hero h1 { font-size: 48px; }
  .grammar-actions { align-items: flex-start; flex-direction: column; }
  .grammar-preview { grid-template-columns: 1fr; margin-bottom: 72px; }
  .grammar-preview > div { min-height: 0; }
  .grammar-preview span { margin-bottom: 28px; }
  .home-actions { align-items: flex-start; flex-direction: column; }
  .home-practice { width: min(100% - 32px, 1180px); padding: 68px 0 74px; grid-template-columns: 1fr; gap: 42px; }
  .home-practice ul { grid-template-columns: 1fr; }
  .home-practice li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .grammar-categories { width: min(100% - 32px, 1180px); padding-top: 64px; margin-bottom: 76px; }
  .grammar-categories > div { grid-template-columns: repeat(2, 1fr); }
  .privacy-article { width: min(100% - 32px, 820px); padding: 70px 0 82px; }
  .notes-section { padding: 70px 0; }
  .featured-note { grid-template-columns: 1fr; }
  .note-index {
    padding: 20px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .note-body { padding: 34px 24px 38px; }
  .about-section,
  .contact-section { padding: 72px 0; }
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  footer { flex-direction: column; gap: 12px; }

  .article-header { width: min(100% - 32px, 1180px); }
  .article-hero,
  .article-cover,
  .article-lead,
  .article-toc,
  .article-section,
  .article-footer { width: min(100% - 32px, 980px); }
  .article-hero { padding: 72px 0 46px; }
  .article-hero h1 { font-size: 52px; }
  .article-deck { font-size: 17px; }
  .article-cover img { max-height: 560px; }
  .article-lead { padding: 56px 0; }
  .article-toc { grid-template-columns: 1fr; padding: 56px 0; }
  .article-section {
    padding: 70px 0;
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .timeline > div { grid-template-columns: 1fr; gap: 10px; }
  .takeaway { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .article-footer { grid-template-columns: 1fr; gap: 30px; }
  .filing-links { justify-content: flex-start; }

  .auth-card { margin-top: 54px; padding: 30px 24px; }
  .auth-card h1 { font-size: 36px; }
  .account-header { padding-inline: 16px; }
  .account-user > span { display: none; }
  .practice-home,
  .results-shell { width: min(100% - 32px, 1120px); padding: 52px 0 72px; }
  .practice-heading { align-items: flex-start; flex-direction: column; }
  .mode-cards,
  .history-list { grid-template-columns: 1fr; }
  .practice-config { padding: 22px; }
  .exercise-card { padding: 24px 18px; }
  .sentence-builder { padding-inline: 0; }
  .answer-slot { min-width: 70px; }
  .exercise-actions { align-items: flex-start; gap: 22px; flex-direction: column; }
  .exercise-actions > div { width: 100%; justify-content: flex-end; }
  .result-hero { padding: 30px 24px; }
  .result-hero h1 { font-size: 68px; }
  .breakdown-grid { grid-template-columns: repeat(2, 1fr); }
  .teacher-layout { width: min(100% - 32px, 1240px); grid-template-columns: 1fr; gap: 32px; }
  .teacher-nav { position: static; }
  .teacher-nav nav { grid-template-columns: repeat(3, 1fr); margin: 22px 0; }
  .teacher-nav nav button { text-align: center; }
  .question-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid > div { min-height: 130px; }
  .attempt-table > div { grid-template-columns: 1fr auto; }
  .attempt-table > div > span:nth-child(2),
  .attempt-table > div > span:nth-child(3) { display: none; }
  .inline-create { grid-template-columns: 1fr; }
  .student-list article { grid-template-columns: 1fr; }
  .question-filters { grid-template-columns: 1fr; }
  .editor-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 12px; }
  .brand small { display: none; }
  .breakdown-grid { grid-template-columns: 1fr; }
  .teacher-nav nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
