:root {
  --ink: #243047;
  --muted: #65738a;
  --line: #d9e1ec;
  --paper: #ffffff;
  --page: #f6f9fd;
  --sky: #e8f6ff;
  --blue: #2b6cb0;
  --green: #2f9e44;
  --yellow: #ffd166;
  --coral: #ff7a59;
  --focus: #174ea6;
  --shadow: 0 10px 24px rgba(36, 48, 71, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--sky) 0, rgba(232, 246, 255, 0) 260px),
    var(--page);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(217, 225, 236, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: clamp(17px, 3.2vw, 21px);
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-size: 15px;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.top-nav a,
.ghost-link,
.button-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
}

.top-nav a,
.ghost-link {
  padding: 0 14px;
  color: var(--blue);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px) 0 56px;
}

.hero {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p,
.section-lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
}

.grid {
  display: grid;
  gap: 14px;
}

.book-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.primary-grade-list,
.junior-grade-list {
  display: grid;
  gap: 18px;
}

.primary-grade-row,
.junior-grade-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.book-stage {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.stage-heading {
  display: grid;
  gap: 4px;
}

.stage-heading h2 {
  margin: 0;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.18;
}

.stage-heading p {
  margin: 0;
  color: var(--muted);
}

.unit-grid,
.section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-card,
.unit-card,
.section-card,
.empty-state,
.reader-surface,
.word-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.book-card,
.unit-card,
.section-card {
  display: grid;
  min-height: 164px;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.book-card:hover,
.unit-card:hover,
.section-card:hover {
  transform: translateY(-2px);
  border-color: rgba(43, 108, 176, 0.5);
  box-shadow: 0 16px 30px rgba(36, 48, 71, 0.12);
}

.card-kicker,
.meta-line {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.book-card h2,
.unit-card h2,
.section-card h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.section-card h2 {
  font-size: clamp(21px, 2.6vw, 26px);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  background: rgba(47, 158, 68, 0.12);
  color: #247338;
  font-size: 13px;
  font-weight: 800;
}

.badge.is-pending {
  background: rgba(255, 209, 102, 0.28);
  color: #805600;
}

.badge.is-coral {
  background: rgba(255, 122, 89, 0.14);
  color: #9c3f2c;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--blue);
}

.crumb-separator {
  color: #94a3b8;
}

.crumb-current {
  color: var(--muted);
}

.page-title {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.page-title h1 {
  font-size: clamp(30px, 4.5vw, 48px);
}

.page-title p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.empty-state h2 {
  margin: 0;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.button-link,
.control-button,
.mode-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.button-link {
  padding: 0 16px;
}

.button-link.is-primary,
.control-button.is-primary,
.mode-button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button-link.is-green {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button-link.is-coral {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.button-link.is-ink {
  border-color: #101c36;
  background: #101c36;
  color: #fff;
}

.disabled-card {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.disabled-card:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.reader-surface,
.word-surface,
.knowledge-surface {
  overflow: hidden;
}

.reader-toolbar,
.word-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.control-group,
.mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mode-group {
  min-width: 0;
}

.control-button,
.mode-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 13px;
  font-weight: 800;
}

.control-button {
  min-width: 84px;
}

.control-button.icon-button {
  min-width: 44px;
  width: 44px;
  padding: 0;
  font-size: 18px;
}

.toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.line-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.line-group-title {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f1f7ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.line-row {
  display: grid;
  width: 100%;
  min-height: 78px;
  gap: 5px;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.line-row:hover,
.word-button:hover {
  background: #f8fbff;
}

.line-row.is-active,
.word-button.is-active {
  background: #fff7df;
  box-shadow: inset 4px 0 0 var(--yellow);
}

.line-index {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.line-en {
  font-size: clamp(19px, 3vw, 25px);
  font-weight: 800;
  line-height: 1.28;
}

.line-zh {
  color: var(--muted);
  font-size: clamp(15px, 2.4vw, 18px);
}

.line-row[data-mode="english"] .line-zh,
.line-row[data-mode="chinese"] .line-en {
  display: none;
}

.line-row[data-mode="chinese"] {
  min-height: 64px;
}

.line-row[data-mode="chinese"] .line-zh {
  color: var(--ink);
  font-size: clamp(18px, 2.8vw, 23px);
  font-weight: 800;
}

.word-groups {
  display: grid;
  gap: 0;
}

.word-group {
  border-bottom: 1px solid var(--line);
}

.word-group:last-child {
  border-bottom: 0;
}

.word-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 0;
}

.word-group-header h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.2;
}

.word-group-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.word-button {
  display: grid;
  min-height: 148px;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.word-en {
  font-size: clamp(22px, 3.5vw, 31px);
  font-weight: 900;
  line-height: 1.1;
}

.word-phonetic {
  min-height: 22px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

.word-zh {
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.word-note {
  min-height: 20px;
  color: #8795aa;
  font-size: 13px;
  font-weight: 800;
}

.word-button[data-word-type="black"] {
  border-color: rgba(43, 108, 176, 0.42);
}

.word-button[data-word-type="black"] .word-en {
  color: var(--blue);
}

.word-button[data-word-type="white"] .word-en {
  color: #364258;
  font-weight: 750;
}

.word-button[data-mode="english"] .word-zh,
.word-button[data-mode="chinese"] .word-en,
.word-button[data-mode="chinese"] .word-phonetic,
.word-button[data-mode="chinese"] .word-note {
  display: none;
}

.word-button[data-mode="chinese"] .word-zh {
  color: var(--ink);
  font-size: 24px;
}

.knowledge-surface {
  display: grid;
  gap: 14px;
}

.knowledge-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.knowledge-group-header {
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}

.knowledge-group-header h2 {
  margin: 3px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.knowledge-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.knowledge-item {
  min-height: 132px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.knowledge-item:nth-child(2n) {
  border-right: 0;
}

.knowledge-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.knowledge-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.knowledge-item p,
.knowledge-item li {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.knowledge-item p {
  margin: 0;
}

.knowledge-item ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.note-band {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 122, 89, 0.28);
  border-radius: 8px;
  background: rgba(255, 122, 89, 0.08);
  color: #7b3b2d;
  font-size: 14px;
}

.note-band strong {
  flex: 0 0 auto;
}

.phonics-entry,
.grammar-entry,
.library-entry {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-content: space-between;
  min-height: 220px;
  width: calc(33.333% - 12px);
  vertical-align: top;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(47, 158, 68, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.phonics-entry,
.grammar-entry {
  margin-right: 14px;
}

.phonics-entry h2,
.grammar-entry h2,
.library-entry h2 {
  margin: 2px 0 4px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.phonics-entry p,
.grammar-entry p,
.library-entry p {
  margin: 0;
  color: var(--muted);
}

.phonics-entry .button-link,
.grammar-entry .button-link,
.library-entry .button-link {
  justify-self: start;
}

.grammar-entry {
  border-color: rgba(43, 108, 176, 0.24);
}

.library-entry {
  border-color: rgba(255, 122, 89, 0.28);
}

.review-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 30px;
  padding: 22px;
  border: 1px solid rgba(92, 225, 230, 0.34);
  border-radius: 8px;
  color: #f8fbff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #101c36 0%, #174ea6 54%, #0f8b8d 100%);
  background-size:
    22px 22px,
    22px 22px,
    auto;
  box-shadow: 0 22px 42px rgba(16, 28, 54, 0.2);
}

.review-entry-copy,
.review-entry-actions {
  display: grid;
  gap: 14px;
}

.review-entry .eyebrow {
  color: #83e7ff;
}

.review-entry h2 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.08;
}

.review-entry p {
  margin: 0;
  color: rgba(248, 251, 255, 0.82);
}

.review-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-entry-tags span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #eef8ff;
  font-size: 13px;
  font-weight: 900;
}

.review-entry-actions {
  align-content: space-between;
  padding: 16px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.review-entry-actions .button-link {
  justify-self: start;
}

.phonics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.phonics-summary,
.phonics-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.phonics-summary {
  display: grid;
  gap: 6px;
  min-height: 118px;
  align-content: center;
  padding: 18px;
}

.phonics-summary strong {
  font-size: 20px;
}

.phonics-summary span {
  color: var(--muted);
  font-weight: 700;
}

.phonics-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
}

.phonics-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phonics-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.phonics-table th,
.phonics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.phonics-table th {
  background: #f1f7ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.phonics-table td:first-child,
.phonics-table td:nth-child(2) {
  font-weight: 900;
}

.phonics-table td:nth-child(2) {
  color: var(--blue);
  font-size: 18px;
}

.phonics-table tr:last-child td {
  border-bottom: 0;
}

.compact-table {
  min-width: 560px;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.letter-grid article {
  display: grid;
  min-height: 118px;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.letter-grid strong {
  font-size: 22px;
  line-height: 1.1;
}

.letter-grid span {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.letter-grid em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.phonics-page {
  display: grid;
  gap: 22px;
}

.phonics-jump {
  position: sticky;
  top: 65px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.phonics-jump a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 12px;
  background: #f1f7ff;
  color: var(--blue);
  font-weight: 900;
}

.phonics-jump a.is-classroom-pack {
  background: rgba(255, 122, 89, 0.12);
  color: #a24632;
}

.phonics-page .phonics-section {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.learning-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.learning-steps article,
.phonics-group,
.teacher-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.learning-steps article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  align-content: start;
  padding: 16px;
}

.learning-steps span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(43, 108, 176, 0.12);
  color: var(--blue);
  font-weight: 900;
}

.learning-steps strong {
  font-size: 20px;
}

.learning-steps p,
.phonics-group-head p,
.teacher-note p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.sound-board {
  display: grid;
  gap: 16px;
}

.phonics-group {
  overflow: hidden;
}

.phonics-group-head {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f1f7ff;
}

.phonics-group-head h3 {
  margin: 0;
  font-size: clamp(20px, 2.7vw, 27px);
  line-height: 1.2;
}

.sound-card-grid,
.letter-board,
.rule-board {
  display: grid;
  gap: 12px;
}

.sound-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
}

.letter-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rule-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.play-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.play-card:hover,
.play-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(43, 108, 176, 0.55);
  background: #f8fbff;
  box-shadow: 0 14px 26px rgba(36, 48, 71, 0.1);
  outline: 0;
}

.play-card.is-speaking {
  border-color: rgba(255, 209, 102, 0.95);
  background: #fff7df;
  box-shadow: inset 4px 0 0 var(--yellow);
}

.sound-card {
  display: grid;
  min-height: 230px;
  gap: 8px;
  align-content: start;
  padding: 16px;
}

.sound-symbol {
  color: var(--blue);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.sound-name {
  font-size: 17px;
  font-weight: 900;
}

.sound-mouth,
.sound-pattern,
.rule-summary,
.rule-tip {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.42;
}

.sound-pattern {
  color: #2f6f3e;
}

.sound-examples,
.rule-examples,
.letter-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sound-examples em,
.rule-examples em,
.letter-card em {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.play-hint,
.letter-card b,
.rule-card b {
  align-self: end;
  color: #247338;
  font-size: 13px;
  font-weight: 900;
}

.letter-card {
  display: grid;
  min-height: 160px;
  gap: 8px;
  align-content: start;
  padding: 14px;
}

.letter-card strong {
  font-size: 24px;
  line-height: 1;
}

.letter-card span {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.rule-card {
  display: grid;
  min-height: 224px;
  gap: 9px;
  align-content: start;
  padding: 16px;
}

.rule-number {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 122, 89, 0.14);
  color: #9c3f2c;
  font-weight: 900;
}

.rule-card strong {
  font-size: 21px;
  line-height: 1.15;
}

.rule-tip {
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.teacher-note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-color: rgba(255, 122, 89, 0.28);
  background: rgba(255, 122, 89, 0.08);
  color: #7b3b2d;
}

.pdf-lesson-page {
  width: min(1380px, calc(100% - 32px));
  display: grid;
  gap: 22px;
}

.pdf-lesson-hero,
.pdf-lesson-viewer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.pdf-lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
  padding: 22px;
}

.pdf-lesson-copy,
.pdf-lesson-actions {
  display: grid;
  gap: 14px;
  align-content: start;
}

.pdf-lesson-copy h1 {
  margin: 0;
}

.pdf-lesson-copy p,
.pdf-lesson-actions p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.pdf-lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-lesson-tags span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.pdf-lesson-actions {
  padding: 18px;
  border: 1px solid rgba(47, 158, 68, 0.2);
  border-radius: 8px;
  background: #f8fbff;
}

.pdf-lesson-actions .button-link {
  justify-self: start;
}

.pdf-lesson-viewer {
  overflow: hidden;
  padding: 12px;
}

.pdf-render-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 14px;
}

.pdf-render-head strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.pdf-render-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.pdf-render-head span {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.pdf-render-list {
  display: grid;
  gap: 16px;
}

.pdf-page-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(43, 108, 176, 0.16);
  border-radius: 8px;
  background: #f8fbff;
}

.pdf-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pdf-page-head span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(47, 158, 68, 0.12);
  color: #247338;
  font-size: 13px;
  font-weight: 900;
}

.pdf-page-surface {
  width: min(100%, 1080px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(36, 48, 71, 0.08);
}

.pdf-page-placeholder {
  display: grid;
  min-height: 320px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(232, 246, 255, 0.88) 0, rgba(248, 251, 255, 0.96) 100%);
}

.pdf-page-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.pdf-page-card.is-error .pdf-page-placeholder {
  background: #fff5f1;
  color: #a24632;
}

.grammar-page {
  display: grid;
  gap: 22px;
}

.grammar-intro-grid,
.roadmap-grid,
.grammar-catalog-grid,
.pitfall-grid,
.teaching-grid {
  display: grid;
  gap: 14px;
}

.grammar-intro-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-grid,
.pitfall-grid,
.teaching-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grammar-catalog-grid,
.lesson-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grammar-intro-card,
.roadmap-card,
.grammar-catalog-card,
.grammar-lesson-card,
.pitfall-card,
.teaching-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.grammar-intro-card,
.roadmap-card,
.pitfall-card,
.teaching-step {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
}

.grammar-intro-card strong,
.roadmap-head strong,
.grammar-catalog-head strong,
.pitfall-card > strong,
.pitfall-line strong,
.teaching-step strong {
  font-size: 20px;
  line-height: 1.2;
}

.grammar-intro-card p,
.roadmap-card p,
.grammar-catalog-card p,
.pitfall-card p,
.teaching-step p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.grammar-jump {
  position: sticky;
  top: 65px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.grammar-jump a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  background: #f1f7ff;
  color: var(--blue);
  font-weight: 900;
}

.grammar-section {
  display: grid;
  gap: 14px;
  scroll-margin-top: 92px;
}

.roadmap-head,
.grammar-catalog-head,
.lesson-head,
.pitfall-line {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.roadmap-head span,
.grammar-catalog-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.roadmap-points,
.lesson-focus {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 700;
}

.roadmap-points li,
.lesson-focus li {
  margin: 0 0 6px;
}

.grammar-catalog-card {
  display: grid;
  gap: 10px;
  min-height: 176px;
  align-content: start;
  padding: 18px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.grammar-catalog-card:hover,
.grammar-catalog-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(43, 108, 176, 0.5);
  box-shadow: 0 16px 30px rgba(36, 48, 71, 0.12);
  outline: 0;
}

.grammar-catalog-card--featured {
  border-color: rgba(255, 122, 89, 0.36);
  background: linear-gradient(180deg, #fff8f5 0, rgba(255, 255, 255, 0.96) 100%);
}

.grammar-catalog-card--featured .grammar-catalog-head strong {
  color: #a24632;
}

.catalog-tags,
.lesson-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-tags span,
.lesson-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
}

.catalog-tags span {
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
}

.lesson-badge--primary {
  background: rgba(47, 158, 68, 0.12);
  color: #247338;
}

.lesson-badge--bridge {
  background: rgba(255, 209, 102, 0.24);
  color: #8c6a00;
}

.lesson-badge--junior {
  background: rgba(43, 108, 176, 0.12);
  color: var(--blue);
}

.lesson-badge--exam {
  background: rgba(255, 122, 89, 0.14);
  color: #a24632;
}

.grammar-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.grammar-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
}

.grammar-table th,
.grammar-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.grammar-table th {
  background: #f1f7ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.grammar-table td:first-child,
.grammar-table td:nth-child(2) {
  font-weight: 900;
}

.grammar-table tr:last-child td {
  border-bottom: 0;
}

.stage-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.filter-chip.is-active,
.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  outline: 0;
}

.lesson-grid {
  display: grid;
  gap: 14px;
}

.grammar-lesson-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
}

.grammar-lesson-card.has-visual {
  grid-column: 1 / -1;
}

.grammar-lesson-card h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.8vw, 28px);
  line-height: 1.15;
}

.lesson-head {
  align-items: start;
}

.lesson-formula {
  max-width: 320px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(43, 108, 176, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.lesson-summary {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.lesson-examples {
  display: grid;
  gap: 10px;
}

.lesson-example {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(43, 108, 176, 0.16);
  border-radius: 8px;
  background: #f8fbff;
}

.lesson-example strong {
  color: var(--blue);
  font-size: 16px;
  line-height: 1.4;
}

.lesson-example span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.lesson-image-card {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(43, 108, 176, 0.18);
  border-radius: 8px;
  background: #f8fbff;
}

.lesson-image-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.lesson-image-card figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.pronoun-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(43, 108, 176, 0.2);
  border-radius: 8px;
  background: #fff;
}

.pronoun-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.pronoun-table th,
.pronoun-table td {
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.pronoun-table th {
  background: #f1f7ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.pronoun-table td:first-child,
.pronoun-table td:nth-child(2),
.pronoun-table td:nth-child(3) {
  color: var(--muted);
  font-weight: 900;
}

.pronoun-table th:last-child,
.pronoun-table td:last-child {
  border-right: 0;
}

.pronoun-table tbody tr:last-child td {
  border-bottom: 0;
}

.speak-token {
  min-width: 76px;
  min-height: 38px;
  border: 1px solid rgba(43, 108, 176, 0.2);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.speak-token:hover,
.speak-token:focus-visible,
.speak-token.is-speaking {
  transform: translateY(-1px);
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  outline: 0;
}

.lesson-tip {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: rgba(47, 158, 68, 0.08);
}

.lesson-tip strong {
  color: #247338;
  font-size: 14px;
}

.lesson-tip p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.pitfall-grid,
.teaching-grid {
  display: grid;
  gap: 14px;
}

.pitfall-line {
  align-items: center;
}

.pitfall-line span {
  font-weight: 800;
  text-align: right;
}

.pitfall-line--wrong span {
  color: #a24632;
}

.pitfall-line--better span {
  color: #247338;
}

.teaching-step {
  min-height: 160px;
}

.teaching-step span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(43, 108, 176, 0.12);
  color: var(--blue);
  font-weight: 900;
}

.is-hidden {
  display: none !important;
}

.family-groups {
  display: grid;
  gap: 18px;
}

.family-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.family-group-head {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f1f7ff;
}

.family-group-head h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}

.family-group-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.family-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px;
}

.family-letter-card {
  display: grid;
  min-height: 210px;
  gap: 8px;
  align-content: start;
  justify-items: center;
  padding: 16px 14px;
  text-align: center;
}

.family-letter-card strong {
  color: var(--blue);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.family-letter-card span {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.family-letter-card em {
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.family-ipa-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 34px;
}

.family-ipa-list b {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.family-letter-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.family-letter-card i {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.alphabet-sound-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.alphabet-card {
  display: grid;
  grid-template-rows: 168px minmax(0, 1fr);
  min-height: 620px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(43, 108, 176, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.alphabet-name {
  display: grid;
  width: 100%;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  text-align: center;
}

.alphabet-name strong {
  color: var(--blue);
  font-size: clamp(58px, 7vw, 84px);
  font-weight: 900;
  line-height: 1;
}

.alphabet-name span {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.alphabet-name em {
  color: var(--muted);
  font-size: 19px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.alphabet-sounds {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  background: #f8fbff;
}

.alphabet-sound-row {
  display: grid;
  width: 100%;
  min-height: 112px;
  gap: 10px;
  align-content: center;
  justify-items: center;
  padding: 18px 16px;
  border: 1px solid rgba(43, 108, 176, 0.18);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.sound-row-ipa {
  color: var(--blue);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  margin: 0;
}

.sound-row-title {
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
}

.sound-row-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  min-height: 34px;
}

.sound-row-examples em,
.pattern-card em {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.rule-lesson-grid,
.skill-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pattern-card {
  display: grid;
  min-height: 188px;
  gap: 8px;
  align-content: start;
  padding: 16px;
}

.pattern-card strong {
  color: var(--ink);
  font-size: 27px;
  line-height: 1.1;
}

.pattern-card span {
  color: var(--blue);
  font-size: 23px;
  font-weight: 900;
}

.pattern-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pattern-card b {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.38;
}

.rule-lesson-card,
.skill-case-card {
  display: grid;
  min-height: 220px;
  gap: 10px;
  align-content: start;
  padding: 16px;
}

.rule-lesson-card strong,
.skill-case-card strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.12;
}

.rule-lesson-card span,
.skill-case-card span {
  color: var(--blue);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
}

.rule-lesson-card small,
.skill-case-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rule-lesson-card em,
.skill-case-card em {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.skill-case-card u {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.rule-lesson-card b,
.skill-case-card b {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.42;
}

.review-body {
  color: #e8eefc;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.3) 0, transparent 28%),
    radial-gradient(circle at top right, rgba(15, 139, 141, 0.22) 0, transparent 24%),
    linear-gradient(180deg, #08111f 0, #0b1220 40%, #111827 100%);
}

.review-body .site-header {
  background: rgba(8, 17, 31, 0.9);
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.review-body .brand,
.review-body .top-nav a {
  color: #eef6ff;
}

.review-body .top-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.review-body .brand-mark {
  border-color: #60a5fa;
  color: #83e7ff;
  background: rgba(255, 255, 255, 0.04);
}

.page-shell.review-page {
  width: min(1380px, calc(100% - 32px));
}

.review-page {
  display: grid;
  gap: 20px;
}

.review-hero,
.review-control-bar,
.review-outline-panel,
.review-section,
.review-empty {
  border-radius: 8px;
}

.review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 22px;
  align-items: stretch;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(96, 165, 250, 0.22);
  background:
    linear-gradient(rgba(125, 211, 252, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, rgba(16, 28, 54, 0.96) 0%, rgba(12, 37, 74, 0.96) 48%, rgba(11, 76, 94, 0.96) 100%);
  background-size:
    28px 28px,
    28px 28px,
    auto;
  box-shadow: 0 24px 46px rgba(7, 12, 24, 0.3);
}

.review-hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.review-eyebrow {
  margin: 0;
  color: #83e7ff;
  font-weight: 900;
}

.review-hero h1 {
  max-width: 980px;
  color: #fff;
}

.review-hero p {
  margin: 0;
  color: rgba(232, 238, 252, 0.82);
  font-size: clamp(16px, 2vw, 20px);
}

.review-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: center;
}

.review-stat-card {
  display: grid;
  gap: 6px;
  min-height: 138px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.review-stat-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.review-stat-card strong {
  color: #ffd166;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1;
}

.review-stat-card span {
  color: rgba(232, 238, 252, 0.82);
  font-weight: 800;
}

.review-control-bar {
  position: sticky;
  top: 74px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(8, 17, 31, 0.86);
  box-shadow: 0 16px 30px rgba(7, 12, 24, 0.24);
  backdrop-filter: blur(12px);
}

.review-search {
  display: grid;
  gap: 6px;
}

.review-search span {
  color: #dbe7ff;
  font-size: 14px;
  font-weight: 900;
}

.review-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #09111f;
  color: #fff;
  font: inherit;
}

.review-search input:focus {
  outline: 3px solid rgba(96, 165, 250, 0.18);
  border-color: #60a5fa;
}

.review-filter-group,
.review-actions,
.review-card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-filter-button,
.review-actions button,
.review-card-tools button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 8px;
  background: #0f1a2d;
  color: #8bd3ff;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.review-filter-button.is-active,
.review-filter-button:hover,
.review-filter-button:focus-visible,
.review-actions button:hover,
.review-actions button:focus-visible,
.review-card-tools button:hover,
.review-card-tools button:focus-visible {
  transform: translateY(-1px);
  border-color: #60a5fa;
  background: #2563eb;
  color: #fff;
  outline: 0;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.review-outline {
  position: sticky;
  top: 152px;
}

.review-outline-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(8, 17, 31, 0.78);
  box-shadow: 0 16px 30px rgba(7, 12, 24, 0.22);
}

.review-outline-panel strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
}

.review-outline-panel p {
  margin: 0;
  color: #c6d5ef;
  font-weight: 700;
}

.review-outline-links,
.review-sections {
  display: grid;
  gap: 14px;
}

.review-outline-link {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 8px;
  background: #0f1a2d;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.review-outline-link:hover,
.review-outline-link:focus-visible {
  transform: translateY(-1px);
  border-color: #60a5fa;
  background: #12233f;
  outline: 0;
}

.review-outline-link span {
  color: #83e7ff;
  font-size: 13px;
  font-weight: 900;
}

.review-outline-link strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.review-outline-link em {
  color: #c6d5ef;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.review-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(11, 18, 32, 0.9);
  background-size:
    26px 26px,
    26px 26px,
    auto;
  box-shadow: 0 18px 34px rgba(7, 12, 24, 0.22);
  scroll-margin-top: 144px;
}

.review-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.review-section-head > div {
  display: grid;
  gap: 6px;
}

.review-section-kicker {
  margin: 0;
  color: var(--review-accent, #83e7ff);
  font-weight: 900;
}

.review-section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
}

.review-section-head p {
  max-width: 860px;
  margin: 0;
  color: #c6d5ef;
  font-weight: 700;
}

.review-section-head > span {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--review-accent, #83e7ff);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--review-accent, #83e7ff);
  font-size: 14px;
  font-weight: 900;
}

.review-lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.review-card {
  overflow: hidden;
  border: 1px solid rgba(43, 108, 176, 0.16);
  border-top: 4px solid var(--review-accent, #2563eb);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.review-card details {
  display: grid;
}

.review-card summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.review-card summary::-webkit-details-marker {
  display: none;
}

.review-card summary:hover {
  background: #f8fbff;
}

.review-card details[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.review-card-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: var(--review-accent, #2563eb);
  color: #fff;
  font-weight: 900;
}

.review-card-title b {
  display: block;
  color: var(--ink);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.18;
}

.review-card-title small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.review-stage-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.review-stage-badge--primary {
  background: rgba(47, 158, 68, 0.12);
  color: #247338;
}

.review-stage-badge--bridge {
  background: rgba(255, 209, 102, 0.24);
  color: #8c6a00;
}

.review-stage-badge--junior {
  background: rgba(43, 108, 176, 0.12);
  color: var(--blue);
}

.review-stage-badge--exam {
  background: rgba(255, 122, 89, 0.14);
  color: #a24632;
}

.review-card-tools {
  justify-content: flex-end;
  padding: 0 16px 12px;
}

.review-card-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  background: #fbfdff;
}

.review-card-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(43, 108, 176, 0.12);
  border-radius: 8px;
  background: #fff;
}

.review-card-block h3,
.review-card-block p,
.review-card-block ul {
  margin: 0;
}

.review-card-block h3 {
  font-size: 16px;
  line-height: 1.2;
}

.review-card-block p,
.review-card-block ul {
  color: var(--muted);
  font-weight: 700;
}

.review-card-block ul {
  padding-left: 20px;
}

.review-card-block li + li {
  margin-top: 6px;
}

.review-card-block--formula {
  border-color: rgba(43, 108, 176, 0.22);
  background: #f2f8ff;
}

.review-card-block--formula p {
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}

.review-card-block--tip {
  border-left: 4px solid var(--green);
  background: rgba(47, 158, 68, 0.08);
}

.review-example-list {
  display: grid;
  gap: 10px;
}

.review-example-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 122, 89, 0.18);
  border-radius: 8px;
  background: #fff7f4;
}

.review-example-card strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.review-example-card span {
  color: #a24632;
  font-weight: 900;
}

.review-example-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.review-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 32px;
  border: 1px dashed rgba(125, 211, 252, 0.24);
  background: rgba(8, 17, 31, 0.72);
  color: #dbe7ff;
  font-weight: 900;
  text-align: center;
}

.review-screen-mode .page-shell.review-page {
  width: min(1500px, calc(100% - 28px));
}

.review-screen-mode .review-layout {
  grid-template-columns: 1fr;
}

.review-screen-mode .review-outline {
  position: static;
}

.review-screen-mode .review-hero h1 {
  font-size: clamp(44px, 6vw, 84px);
}

.review-screen-mode .review-section-head h2 {
  font-size: clamp(34px, 4vw, 50px);
}

.review-screen-mode .review-card-title b {
  font-size: clamp(28px, 3vw, 36px);
}

.review-screen-mode .review-card-block,
.review-screen-mode .review-example-card {
  font-size: clamp(18px, 1.8vw, 24px);
}

.library-page {
  display: grid;
  gap: 22px;
}

.library-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.library-stat-card,
.library-list,
.material-hero,
.material-source-note,
.library-section-card,
.library-note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.library-stat-card {
  display: grid;
  gap: 8px;
  min-height: 140px;
  align-content: start;
  padding: 18px;
}

.library-stat-card span,
.library-list-head span,
.material-card span,
.material-card em,
.library-step-card span {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.library-stat-card strong {
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.2;
}

.library-stat-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.library-jump {
  position: sticky;
  top: 65px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.library-jump a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff5f1;
  color: #a24632;
  font-weight: 900;
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.library-list {
  position: sticky;
  top: 128px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.library-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.library-list-head strong {
  font-size: 20px;
}

.material-card-list,
.material-detail {
  display: grid;
  gap: 14px;
}

.material-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.material-card:hover,
.material-card:focus-visible,
.material-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 89, 0.55);
  box-shadow: 0 12px 24px rgba(36, 48, 71, 0.1);
  outline: 0;
}

.material-card strong {
  font-size: 21px;
  line-height: 1.18;
}

.material-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.material-card em {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(47, 158, 68, 0.12);
  color: #247338;
}

.material-hero {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.material-hero h2 {
  margin: 2px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
}

.material-hero p,
.library-section-heading p,
.material-source-note p,
.library-step-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-tags span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.material-source-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(255, 209, 102, 0.16);
}

.material-source-note strong {
  flex: 0 0 auto;
  color: #8c6a00;
}

.library-section-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  scroll-margin-top: 128px;
}

.library-section-heading {
  display: grid;
  gap: 6px;
}

.library-section-heading h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.library-check-list,
.policy-card ul,
.library-note-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 750;
}

.library-check-list li,
.policy-card li,
.library-note-card li {
  margin: 0 0 8px;
}

.policy-grid,
.library-step-grid,
.library-word-group-list,
.library-number-group-list {
  display: grid;
  gap: 14px;
}

.policy-grid,
.library-step-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.policy-card,
.library-step-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 180px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.policy-card strong,
.library-step-card strong,
.library-note-card strong {
  font-size: 21px;
  line-height: 1.22;
}

.library-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.library-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #fff;
}

.library-table th,
.library-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.library-table th {
  background: #fff5f1;
  color: #a24632;
  font-weight: 900;
}

.library-table td:first-child {
  width: 116px;
  color: var(--ink);
  font-weight: 900;
}

.library-table tr:last-child td {
  border-bottom: 0;
}

.library-step-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(43, 108, 176, 0.1);
  color: var(--blue);
}

.library-word-group,
.library-number-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.library-word-group header,
.library-number-group header {
  display: grid;
  gap: 4px;
}

.library-word-group strong,
.library-number-group strong {
  font-size: 22px;
  line-height: 1.2;
}

.library-word-group p,
.library-number-group p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.library-word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.library-speak-card,
.library-speak-pill {
  border: 1px solid rgba(43, 108, 176, 0.2);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.library-speak-card {
  display: grid;
  min-height: 128px;
  gap: 6px;
  align-content: center;
  justify-items: center;
  padding: 12px;
  text-align: center;
}

.library-speak-card span {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.16;
}

.library-speak-card em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.library-word-meta {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 42px;
}

.library-word-meta b,
.library-speak-pill small {
  color: #247338;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.library-word-meta i,
.library-speak-pill em {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(47, 158, 68, 0.12);
  color: #247338;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.library-speak-pill {
  display: grid;
  min-width: 126px;
  min-height: 72px;
  gap: 3px;
  align-content: center;
  justify-items: center;
  padding: 7px 12px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}

.library-speak-pill span {
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
}

.library-speak-card:hover,
.library-speak-card:focus-visible,
.library-speak-card.is-speaking,
.library-speak-pill:hover,
.library-speak-pill:focus-visible,
.library-speak-pill.is-speaking {
  transform: translateY(-1px);
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  outline: 0;
}

.library-speak-card:hover span,
.library-speak-card:focus-visible span,
.library-speak-card.is-speaking span,
.library-speak-card:hover em,
.library-speak-card:focus-visible em,
.library-speak-card.is-speaking em,
.library-speak-card:hover b,
.library-speak-card:focus-visible b,
.library-speak-card.is-speaking b,
.library-speak-card:hover i,
.library-speak-card:focus-visible i,
.library-speak-card.is-speaking i,
.library-speak-pill:hover span,
.library-speak-pill:focus-visible span,
.library-speak-pill.is-speaking span,
.library-speak-pill:hover small,
.library-speak-pill:focus-visible small,
.library-speak-pill.is-speaking small,
.library-speak-pill:hover em,
.library-speak-pill:focus-visible em,
.library-speak-pill.is-speaking em,
.library-speak-pill:hover,
.library-speak-pill:focus-visible,
.library-speak-pill.is-speaking {
  color: #fff;
}

.library-speak-card:hover i,
.library-speak-card:focus-visible i,
.library-speak-card.is-speaking i,
.library-speak-pill:hover em,
.library-speak-pill:focus-visible em,
.library-speak-pill.is-speaking em {
  background: rgba(255, 255, 255, 0.18);
}

.library-number-table {
  min-width: 760px;
}

.library-number-table td:first-child {
  width: 90px;
  text-align: center;
}

.library-number-table td:nth-child(2),
.library-number-table td:nth-child(3) {
  width: 190px;
}

.library-note-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-color: rgba(255, 122, 89, 0.28);
  background: rgba(255, 122, 89, 0.08);
}

.grade7-grammar-home-card {
  color: #f8fbff;
  border-color: rgba(58, 210, 255, 0.5);
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #12335f 0%, #174ea6 48%, #0f8b8d 100%);
  background-size:
    22px 22px,
    22px 22px,
    auto;
  box-shadow: 0 18px 34px rgba(23, 78, 166, 0.22);
}

.grade7-grammar-home-card .card-kicker,
.grade7-grammar-home-card .meta-line,
.grade7-grammar-home-card p {
  color: rgba(248, 251, 255, 0.82);
}

.page-shell.grade7-grammar-page {
  width: min(1240px, calc(100% - 32px));
}

.grade7-hero,
.grade7-control-deck,
.grade7-favorites,
.grade7-map-card,
.grade7-term-section,
.grade7-grammar-card {
  border-radius: 8px;
}

.grade7-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 22px;
  align-items: stretch;
  padding: clamp(22px, 4vw, 34px);
  color: #f8fbff;
  border: 1px solid rgba(92, 225, 230, 0.38);
  background:
    linear-gradient(rgba(92, 225, 230, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 225, 230, 0.08) 1px, transparent 1px),
    #101c36;
  background-size:
    28px 28px,
    28px 28px,
    auto;
  box-shadow: 0 22px 46px rgba(16, 28, 54, 0.22);
}

.grade7-hero h1 {
  max-width: 860px;
}

.grade7-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(248, 251, 255, 0.78);
  font-size: clamp(16px, 2vw, 19px);
}

.grade7-hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.grade7-hero-panel {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.grade7-hero-panel strong {
  color: #ffd166;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
}

.grade7-hero-panel span {
  color: rgba(248, 251, 255, 0.76);
  font-weight: 800;
}

.grade7-control-deck {
  position: sticky;
  top: 74px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(43, 108, 176, 0.24);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.grade7-search {
  display: grid;
  gap: 6px;
}

.grade7-search label,
.grade7-favorites strong {
  color: var(--ink);
  font-weight: 900;
}

.grade7-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.grade7-search input:focus {
  outline: 3px solid rgba(43, 108, 176, 0.18);
  border-color: var(--blue);
}

.grade7-term-tabs,
.grade7-actions,
.grade7-favorite-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grade7-term-button,
.grade7-actions button,
.grade7-card-tools button,
.grade7-favorite-rail a {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(43, 108, 176, 0.28);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.grade7-term-button.is-active,
.grade7-actions button:hover,
.grade7-card-tools button:hover,
.grade7-favorite-rail a:hover {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.grade7-favorites {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(47, 158, 68, 0.26);
  background: rgba(47, 158, 68, 0.08);
}

.grade7-favorites span,
.grade7-muted {
  color: var(--muted);
}

.grade7-favorite-rail a {
  border-color: rgba(47, 158, 68, 0.34);
  color: #157f3b;
}

.grade7-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.grade7-map-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(43, 108, 176, 0.22);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.grade7-map-card span {
  color: var(--green);
  font-weight: 900;
}

.grade7-map-card strong {
  font-size: clamp(24px, 3vw, 34px);
}

.grade7-map-card p {
  margin: 0;
  color: var(--muted);
}

.grade7-map-card a {
  color: var(--blue);
  font-weight: 900;
}

.grade7-term-section {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(36, 48, 71, 0.12);
  background:
    linear-gradient(rgba(43, 108, 176, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 158, 68, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.86);
  background-size:
    26px 26px,
    26px 26px,
    auto;
}

.grade7-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.grade7-section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 38px);
}

.grade7-section-heading p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.grade7-section-heading > span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.grade7-lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grade7-grammar-card {
  border: 1px solid rgba(43, 108, 176, 0.2);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.grade7-grammar-card details {
  display: grid;
}

.grade7-grammar-card summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.grade7-grammar-card summary::-webkit-details-marker {
  display: none;
}

.grade7-card-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.grade7-grammar-card b {
  display: block;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.2;
}

.grade7-grammar-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.grade7-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.grade7-card-tags em {
  padding: 4px 8px;
  border-radius: 8px;
  color: #17653a;
  background: rgba(47, 158, 68, 0.12);
  font-style: normal;
  font-weight: 900;
}

.grade7-card-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 14px;
}

.grade7-card-tools button.is-saved {
  color: #fff;
  border-color: var(--coral);
  background: var(--coral);
}

.grade7-content-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.grade7-block {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-left: 6px solid var(--blue);
}

.grade7-block + .grade7-block {
  border-top: 1px solid var(--line);
}

.grade7-block h3,
.grade7-block p,
.grade7-block ul {
  margin: 0;
}

.grade7-block h3 {
  font-size: 16px;
}

.grade7-block ul {
  padding-left: 20px;
}

.grade7-block li + li {
  margin-top: 6px;
}

.grade7-block.is-concept {
  border-left-color: var(--blue);
  background: rgba(43, 108, 176, 0.07);
}

.grade7-block.is-usage {
  border-left-color: var(--green);
  background: rgba(47, 158, 68, 0.08);
}

.grade7-block.is-examples {
  border-left-color: var(--coral);
  background: rgba(255, 122, 89, 0.08);
}

.grade7-example-list {
  display: grid;
  gap: 10px;
}

.grade7-example {
  display: grid;
  gap: 4px;
  padding: 10px 0 0;
  border-top: 1px dashed rgba(36, 48, 71, 0.2);
}

.grade7-example:first-child {
  padding-top: 0;
  border-top: 0;
}

.grade7-example p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
}

.grade7-example strong {
  color: var(--ink);
}

.grade7-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 20px;
  border: 1px dashed rgba(43, 108, 176, 0.35);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.grade7-screen-mode .page-shell.grade7-grammar-page {
  width: min(1440px, calc(100% - 28px));
}

.grade7-screen-mode .grade7-hero h1 {
  font-size: clamp(42px, 5.8vw, 76px);
}

.grade7-screen-mode .grade7-grammar-card b {
  font-size: clamp(24px, 2.8vw, 34px);
}

.grade7-screen-mode .grade7-block,
.grade7-screen-mode .grade7-example {
  font-size: clamp(18px, 1.8vw, 24px);
}

@media (max-width: 920px) {
  .grade7-hero,
  .grade7-control-deck,
  .grade7-favorites,
  .grade7-map,
  .grade7-lesson-grid {
    grid-template-columns: 1fr;
  }

  .grade7-control-deck {
    top: 72px;
  }

  .grade7-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell.grade7-grammar-page {
    width: min(100% - 24px, 1240px);
  }

  .grade7-hero,
  .grade7-term-section {
    padding: 14px;
  }

  .grade7-control-deck {
    position: static;
  }

  .grade7-term-tabs,
  .grade7-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grade7-search,
  .grade7-term-button,
  .grade7-actions button,
  .grade7-card-tools button {
    width: 100%;
  }

  .grade7-grammar-card summary {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .grade7-card-tags {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .grade7-card-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grade7-example p {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.error-box {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 122, 89, 0.35);
  border-radius: 8px;
  background: #fff5f1;
}

.error-box h1 {
  font-size: 28px;
}

.error-box code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(36, 48, 71, 0.08);
}

@media (max-width: 920px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-grade-row,
  .junior-grade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-grid,
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-toolbar,
  .word-toolbar {
    grid-template-columns: 1fr;
  }

  .phonics-entry,
  .grammar-entry,
  .library-entry,
  .phonics-grid,
  .review-entry {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .phonics-entry,
  .grammar-entry {
    margin-right: 0;
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .library-list {
    position: static;
  }

  .grammar-intro-grid,
  .roadmap-grid,
  .grammar-catalog-grid,
  .lesson-grid,
  .pitfall-grid,
  .teaching-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-steps,
  .sound-card-grid,
  .rule-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .letter-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-hero,
  .review-control-bar,
  .review-layout,
  .review-lesson-grid {
    grid-template-columns: 1fr;
  }

  .review-control-bar {
    top: 72px;
  }

  .review-outline {
    position: static;
  }

  .review-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .alphabet-sound-grid,
  .pattern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rule-lesson-grid,
  .skill-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdf-lesson-hero {
    grid-template-columns: 1fr;
  }

  .alphabet-card {
    min-height: 0;
  }

  .letter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 58px;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
  }

  .brand {
    gap: 8px;
    width: 100%;
    font-size: 18px;
  }

  .brand span:last-child {
    white-space: nowrap;
  }

  .brand-mark {
    width: 40px;
    height: 32px;
  }

  .top-nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 9px;
    font-size: 14px;
  }

  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-bottom: 34px;
  }

  .pdf-lesson-page {
    width: min(100% - 24px, 1380px);
  }

  .page-shell.review-page {
    width: min(100% - 24px, 1380px);
  }

  .book-grid,
  .primary-grade-row,
  .junior-grade-row,
  .unit-grid,
  .section-grid,
  .word-grid,
  .knowledge-list {
    grid-template-columns: 1fr;
  }

  .knowledge-item,
  .knowledge-item:nth-child(2n),
  .knowledge-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .knowledge-item:last-child {
    border-bottom: 0;
  }

  .book-card,
  .unit-card,
  .section-card {
    min-height: 138px;
  }

  .reader-toolbar,
  .word-toolbar {
    position: sticky;
    top: 102px;
    z-index: 10;
  }

  .control-group,
  .mode-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .control-group {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .control-button,
  .mode-button,
  .toggle {
    width: 100%;
  }

  .toggle {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .line-row {
    min-height: 74px;
    padding: 14px;
  }

  .phonics-section {
    padding: 14px;
  }

  .phonics-page .phonics-section {
    padding: 0;
  }

  .phonics-jump {
    top: 103px;
  }

  .grammar-jump,
  .library-jump {
    top: 103px;
  }

  .review-entry,
  .review-hero,
  .review-section {
    padding: 14px;
  }

  .review-control-bar {
    position: static;
    grid-template-columns: 1fr;
  }

  .review-filter-group,
  .review-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-filter-button,
  .review-actions button {
    width: 100%;
  }

  .review-stat-grid,
  .review-lesson-grid {
    grid-template-columns: 1fr;
  }

  .review-card summary {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .review-card-tools {
    padding: 0 14px 12px;
  }

  .learning-steps,
  .sound-card-grid,
  .letter-board,
  .rule-board,
  .alphabet-sound-grid,
  .pattern-grid,
  .family-card-grid,
  .rule-lesson-grid,
  .skill-case-grid,
  .grammar-intro-grid,
  .roadmap-grid,
  .grammar-catalog-grid,
  .lesson-grid,
  .pitfall-grid,
  .teaching-grid,
  .library-dashboard,
  .policy-grid,
  .library-step-grid {
    grid-template-columns: 1fr;
  }

  .sound-card,
  .rule-card,
  .alphabet-card,
  .alphabet-sound-row,
  .pattern-card,
  .rule-lesson-card,
  .skill-case-card {
    min-height: auto;
  }

  .alphabet-card {
    grid-template-rows: 156px minmax(0, 1fr);
    min-height: 0;
  }

  .letter-grid {
    grid-template-columns: 1fr;
  }

  .pdf-lesson-hero {
    padding: 14px;
  }

  .pdf-lesson-actions {
    padding: 14px;
  }

  .pdf-lesson-actions .button-link {
    width: 100%;
    justify-self: stretch;
  }

  .pdf-lesson-viewer {
    padding: 8px;
  }

  .pdf-lesson-viewer iframe {
    height: 72vh;
  }
}
