:root {
  --bg: #f4f8fd;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-dark: #082357;
  --text: #082357;
  --muted: #415173;
  --line: #dce6f4;
  --line-strong: #b8c8df;
  --brand: #1557c8;
  --brand-strong: #082357;
  --brand-soft: #e8f1ff;
  --accent: #38a71f;
  --accent-soft: #e9f8e4;
  --success: #21880f;
  --error: #c62828;
  --shadow-lg: 0 26px 64px rgba(8, 35, 87, 0.14);
  --shadow-md: 0 14px 30px rgba(8, 35, 87, 0.10);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 9px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.98) 0 50%, rgba(255, 255, 255, 0.78) 50% 64%, rgba(21, 87, 200, 0.08) 64%),
    radial-gradient(circle at 84% 22%, rgba(56, 167, 31, 0.18), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  overflow-x: hidden;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

textarea {
  min-height: 120px;
  resize: vertical;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}

ul,
ol {
  margin: 0;
}

.container {
  width: min(1140px, calc(100% - clamp(1rem, 4vw, 2rem)));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - clamp(1rem, 4vw, 2rem)));
}

.page-shell {
  padding-bottom: 5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(21, 87, 200, 0.10);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
  min-width: 0;
}

.brand {
  flex: 0 0 auto;
  width: 190px;
}

.brand img {
  width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav-links > a,
.nav-links > form button {
  font-size: 0.96rem;
}

.inline-form {
  display: inline;
}

.hero {
  position: relative;
  padding: clamp(2rem, 5vw, 4.5rem) 0 2.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8vw 0 40%;
  height: 62%;
  background:
    linear-gradient(90deg, rgba(8, 35, 87, 0.05), rgba(8, 35, 87, 0.01)),
    repeating-linear-gradient(105deg, rgba(8, 35, 87, 0.10) 0 4px, transparent 4px 58px);
  clip-path: polygon(10% 18%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.hero-grid,
.grid-3,
.grid-2,
.pricing-grid,
.stats-grid,
.mode-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  min-height: 560px;
}

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

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

.pricing-grid,
.mode-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hero-card,
.card,
.price-card,
.mode-card,
.quiz-card {
  background: var(--surface);
  border: 1px solid rgba(21, 87, 200, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.6rem;
  min-width: 0;
}

.card,
.price-card,
.mode-card,
.quiz-card {
  backdrop-filter: blur(6px);
}

.hero-card {
  padding: 1.8rem;
  background:
    linear-gradient(145deg, rgba(8, 35, 87, 0.98), rgba(21, 87, 200, 0.94)),
    var(--surface-dark);
  color: #f7fbfc;
}

.hero-card p,
.hero-card li {
  color: rgba(247, 251, 252, 0.82);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.lead {
  max-width: 60ch;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
}

.hero-actions,
.row-between,
.inline-filters,
.hero-metrics,
.mode-card-top,
.quiz-top,
.quiz-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-metrics {
  margin-top: 2rem;
  justify-content: flex-start;
}

.hero-metrics div {
  min-width: 120px;
  display: grid;
  gap: 0.15rem;
}

.hero-metrics strong {
  color: var(--brand-strong);
  font-size: 1.45rem;
}

.section {
  padding: 2rem 0;
}

.section-alt {
  border-top: 1px solid rgba(21, 87, 200, 0.08);
  border-bottom: 1px solid rgba(21, 87, 200, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h1,
.section-head h2 {
  margin-bottom: 0.4rem;
}

.compact-list,
.feature-list {
  padding-left: 1.1rem;
}

.feature-list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 1.4rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, #1e6ae2, #0e4fbe);
  color: #fff;
  box-shadow: 0 12px 24px rgba(21, 87, 200, 0.22);
}

.btn-ghost {
  border-color: rgba(21, 87, 200, 0.20);
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-strong);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pill-free {
  background: rgba(20, 108, 67, 0.12);
  color: var(--success);
}

.pill-premium {
  background: var(--accent-soft);
  color: #9a5f12;
}

.pill-result-error {
  background: rgba(179, 58, 47, 0.12);
  color: var(--error);
}

.pill-progress {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.price {
  margin: 0.5rem 0 1rem;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--surface-dark);
}

.flash {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
}

.flash-success {
  border: 1px solid rgba(20, 108, 67, 0.2);
  background: rgba(20, 108, 67, 0.08);
  color: var(--success);
}

.flash-error {
  border: 1px solid rgba(179, 58, 47, 0.18);
  background: rgba(179, 58, 47, 0.08);
  color: var(--error);
}

.form-card form.stack,
.stack,
.choice-list {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 0.92rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface-strong);
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 95, 104, 0.42);
  box-shadow: 0 0 0 4px rgba(15, 95, 104, 0.10);
}

.metric-card {
  min-height: 170px;
}

.mode-card {
  position: relative;
  overflow: hidden;
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(15, 95, 104, 0.06);
}

.mode-card-premium {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96), rgba(252, 245, 234, 0.96));
}

.mode-card-free {
  background: linear-gradient(180deg, rgba(248, 253, 252, 0.96), rgba(243, 249, 248, 0.96));
}

.mode-card-wide {
  margin-top: 1.5rem;
}

.mode-wide-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.is-locked {
  border-color: rgba(200, 135, 55, 0.25);
}

.is-locked::after {
  content: "Premium";
  position: absolute;
  top: 1rem;
  right: -2.3rem;
  transform: rotate(35deg);
  background: linear-gradient(180deg, #d8a354, #bc7d26);
  color: white;
  padding: 0.35rem 2.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quiz-card {
  padding: 1.8rem;
}

.quiz-meta {
  color: var(--muted);
  font-weight: 700;
}

.quiz-title {
  margin-top: 0.35rem;
  font-size: clamp(1.65rem, 2vw, 2.15rem);
}

.quiz-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  max-height: 430px;
  margin: 1.2rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: linear-gradient(180deg, #eef4f4, #dfe8e8);
}

.choice-list {
  gap: 0.9rem;
}

.choice-card {
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 95, 104, 0.24);
}

.choice-card input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}

.choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
}

.choice-text {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.choice-card:has(input:checked) {
  border-color: rgba(15, 95, 104, 0.42);
  background: linear-gradient(180deg, #f6fbfb, #edf7f7);
  box-shadow: 0 14px 30px rgba(15, 95, 104, 0.12);
}

.choice-card:has(input:checked) .choice-letter {
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  color: white;
}

.table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.95rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--surface-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.thumb {
  width: 68px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #e6ecec;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--error);
  cursor: pointer;
}

.stack-lg {
  display: grid;
  gap: 1rem;
}

.result-card {
  border-radius: var(--radius-lg);
  padding: 1.45rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.result-card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}

.result-card-success {
  border: 1px solid rgba(20, 108, 67, 0.32);
  box-shadow: 0 16px 34px rgba(20, 108, 67, 0.12);
  background: linear-gradient(180deg, rgba(242, 251, 246, 0.96), rgba(251, 255, 252, 0.96));
}

.result-card-error {
  border: 1px solid rgba(179, 58, 47, 0.28);
  box-shadow: 0 16px 34px rgba(179, 58, 47, 0.11);
  background: linear-gradient(180deg, rgba(254, 245, 244, 0.97), rgba(255, 252, 251, 0.97));
}

.result-explanation {
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.result-explanation-success {
  color: var(--success);
  background: rgba(20, 108, 67, 0.08);
}

.result-explanation-error {
  color: var(--error);
  background: rgba(179, 58, 47, 0.08);
}

.study-hero,
.chapter-reader-hero {
  padding: clamp(2.4rem, 6vw, 4.5rem) 0 2rem;
}

.study-hero-grid,
.chapter-reader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1.6rem;
  align-items: stretch;
}

.study-hero-actions,
.reader-meta-row,
.chapter-book-meta,
.reader-pagination {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.study-hero-actions {
  margin-top: 1.4rem;
}

.study-summary-panel,
.reader-cover,
.reader-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow-md);
}

.study-summary-panel {
  display: grid;
  align-content: center;
  gap: 0.8rem;
  padding: 1.4rem;
}

.study-summary-panel strong {
  color: var(--surface-dark);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.1;
}

.chapter-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.chapter-book-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.chapter-book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.chapter-book-link {
  display: grid;
  height: 100%;
  color: inherit;
}

.chapter-book-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e7eeee;
  overflow: hidden;
}

.chapter-book-media img,
.reader-cover img,
.reader-illustration {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-book-number {
  position: absolute;
  right: 0.9rem;
  bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 52, 59, 0.9);
  color: #fff;
  font-weight: 800;
}

.chapter-book-body {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem;
}

.chapter-book-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.chapter-book-meta {
  padding-top: 0.35rem;
  color: var(--brand-strong);
  font-size: 0.85rem;
  font-weight: 800;
}

.chapter-book-meta span {
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.reader-back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--brand-strong);
  font-weight: 800;
}

.reader-cover {
  overflow: hidden;
  min-height: 320px;
}

.reader-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.reader-sidebar {
  position: sticky;
  top: 96px;
}

.reader-sidebar-inner {
  padding: 1rem;
  border: 1px solid rgba(15, 95, 104, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.65);
}

.reader-toc {
  display: grid;
  gap: 0.45rem;
}

.reader-toc a {
  padding: 0.58rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--surface-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.reader-toc a:hover {
  background: var(--brand-soft);
}

.reader-content {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.reader-card {
  padding: clamp(1rem, 2.6vw, 1.7rem);
}

.reader-section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.reader-section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-dark);
  color: #fff;
  font-weight: 800;
}

.reader-illustration {
  max-height: 360px;
  margin: 0.9rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #e7eeee;
}

.reader-copy {
  display: grid;
  gap: 0.8rem;
}

.reader-formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.reader-formula-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(15, 95, 104, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f6fbfb, #edf7f7);
}

.reader-formula-card span {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reader-formula-card strong {
  color: var(--surface-dark);
  font-size: 1.12rem;
}

.reader-examples {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(18, 52, 59, 0.06);
}

.reader-examples > strong {
  color: var(--surface-dark);
}

.reader-example-row {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(18, 52, 59, 0.1);
}

.reader-example-row span {
  color: var(--brand-strong);
  font-weight: 800;
}

.reader-rule-box {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.reader-rule-box strong {
  color: #8b560f;
}

.study-list {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}

.reader-highlight {
  border-color: rgba(200, 135, 55, 0.32);
  background: linear-gradient(180deg, rgba(255, 249, 240, 0.98), rgba(255, 253, 249, 0.96));
}

.study-checklist {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.study-checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  color: var(--muted);
  line-height: 1.55;
}

.study-checklist span {
  width: 22px;
  height: 22px;
  margin-top: 0.08rem;
  border: 2px solid var(--brand);
  border-radius: 6px;
  background: rgba(15, 95, 104, 0.08);
}

.reader-pagination {
  justify-content: space-between;
}

.print-document {
  width: min(920px, calc(100% - clamp(1rem, 4vw, 2rem)));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.print-cover-page,
.print-toc-page,
.print-chapter,
.print-block {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow-md);
}

.print-cover-page,
.print-toc-page,
.print-chapter {
  padding: clamp(1.2rem, 3vw, 2rem);
  margin-bottom: 1.2rem;
}

.print-cover-meta {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  color: var(--brand-strong);
  font-weight: 800;
}

.print-cover-meta span {
  padding: 0.42rem 0.65rem;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.print-toc-page ol {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  line-height: 1.6;
}

.print-chapter-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.print-block {
  padding: 1rem;
  margin-top: 1rem;
}

.print-block h3 {
  color: var(--surface-dark);
}

.print-block ul {
  display: grid;
  gap: 0.35rem;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
}

.print-image {
  width: 100%;
  max-height: 300px;
  margin: 0.7rem 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  object-fit: cover;
}

.print-formulas,
.print-examples,
.print-remember {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
}

.print-formulas {
  border: 1px solid rgba(15, 95, 104, 0.16);
  background: #edf7f7;
}

.print-examples {
  background: rgba(18, 52, 59, 0.06);
}

.print-remember,
.print-exam {
  background: var(--accent-soft);
}

.hero-copy {
  display: grid;
  justify-items: start;
}

.hero-logo {
  width: min(420px, 100%);
  margin-bottom: 1rem;
}

.hero-copy h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  color: var(--brand-strong);
  font-size: clamp(2.15rem, 5vw, 4.7rem);
  font-weight: 900;
  line-height: 1.02;
  text-transform: uppercase;
}

.hero-copy h1::first-line {
  color: var(--brand-strong);
}

.hero-copy .lead {
  color: #1c2f61;
  font-weight: 600;
}

.phone-stage {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 520px;
}

.phone {
  width: min(330px, 78vw);
  min-height: 520px;
  padding: 0.8rem;
  border: 8px solid #101828;
  border-radius: 38px;
  background: #101828;
  box-shadow: 0 28px 58px rgba(8, 35, 87, 0.28);
  transform: rotate(8deg);
}

.phone-bar {
  padding: 1.1rem 1rem 0.9rem;
  border-radius: 27px 27px 0 0;
  background: linear-gradient(180deg, #174fb2, #082357);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.phone-screen {
  display: grid;
  gap: 0.75rem;
  min-height: 430px;
  padding: 1rem;
  border-radius: 0 0 27px 27px;
  background: #fff;
}

.phone-screen p {
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.traffic-sign {
  position: relative;
  justify-self: center;
  width: 128px;
  height: 128px;
  margin: 0.3rem 0;
  border: 13px solid #dc1f2a;
  border-radius: 50%;
  background: #fff;
}

.traffic-sign span {
  position: absolute;
  bottom: 33px;
  width: 36px;
  height: 22px;
  border-radius: 5px 5px 3px 3px;
}

.traffic-sign span:first-child {
  left: 25px;
  background: #e83030;
}

.traffic-sign span:last-child {
  right: 25px;
  background: #111827;
}

.answer {
  padding: 0.62rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fbfcff;
  color: #111827;
  font-size: 0.74rem;
  font-weight: 700;
}

.answer-correct {
  border-color: rgba(56, 167, 31, 0.58);
  background: #edfbe9;
}

.good-answer {
  padding: 0.75rem;
  border-radius: 9px;
  background: #e4f8de;
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 900;
}

.free-badge {
  position: absolute;
  right: clamp(0rem, 2vw, 1.5rem);
  bottom: 2.4rem;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border: 8px solid #fff;
  border-radius: 50%;
  background: linear-gradient(180deg, #1557c8 0 48%, #38a71f 48% 66%, #082357 66%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.feature-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1e6ae2, #0d4dbc);
  color: #fff;
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(21, 87, 200, 0.18);
}

.feature-card:nth-child(2) .feature-icon {
  background: linear-gradient(180deg, #44bd25, #21880f);
}

.promo-strip {
  padding: 0.9rem 0;
  background: linear-gradient(90deg, #082357, #0d4dbc);
  color: #fff;
}

.promo-strip-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
}

.promo-strip strong,
.promo-strip span {
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.promo-strip span {
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.9rem;
}

.pricing-grid-single {
  max-width: 520px;
  margin: 0 auto;
}

.price-card {
  position: relative;
}

.pricing-grid-single .price-card {
  border-color: rgba(56, 167, 31, 0.62);
  box-shadow: 0 24px 58px rgba(56, 167, 31, 0.16), var(--shadow-md);
}

.popular-label {
  display: inline-flex;
  justify-content: center;
  width: min(260px, 100%);
  margin: -2.4rem auto 1rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #44bd25, #21880f);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .stats-grid,
  .mode-wide-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2rem;
    min-height: auto;
  }

  .phone-stage {
    min-height: 500px;
  }

  .promo-strip-inner {
    grid-template-columns: 1fr;
  }

  .promo-strip span {
    padding-left: 0;
    border-left: 0;
  }

  .mode-card-wide {
    margin-top: 1rem;
  }

  .study-hero-grid,
  .chapter-reader-grid,
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .reader-sidebar {
    position: static;
  }

  .reader-toc {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  html,
  body {
    background: #fff !important;
  }

  body {
    color: #111;
    font-family: Arial, sans-serif;
  }

  .site-header,
  .flash,
  .print-actions {
    display: none !important;
  }

  .page-shell {
    padding: 0;
  }

  .print-document {
    width: 100%;
    padding: 0;
  }

  .print-cover-page,
  .print-toc-page,
  .print-chapter,
  .print-block {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }

  .print-cover-page {
    min-height: 86vh;
    display: grid;
    align-content: center;
    page-break-after: always;
  }

  .print-toc-page {
    page-break-after: always;
  }

  .print-chapter {
    page-break-before: always;
    padding: 0;
  }

  .print-document-chapter .print-chapter {
    page-break-before: auto;
  }

  .print-block {
    break-inside: avoid;
    padding: 0.35rem 0;
    margin-top: 0.8rem;
  }

  .print-image {
    max-height: 180px;
    border-radius: 0;
  }

  h1,
  h2,
  h3,
  p,
  li {
    color: #111 !important;
  }

  .eyebrow {
    color: #555 !important;
  }

  a {
    color: #111;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .nav {
    align-items: center;
    padding: 0.85rem 0;
    flex-wrap: wrap;
    min-height: auto;
  }

  .brand {
    width: 210px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 0.55rem;
  }

  .nav-links > a:not(.btn) {
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(21, 87, 200, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.48);
  }

  .hero {
    padding-top: 2.25rem;
  }

  .quiz-card,
  .hero-card,
  .card,
  .price-card,
  .mode-card {
    padding: 1.25rem;
  }

  .hero-actions,
  .quiz-actions,
  .inline-filters,
  .row-between {
    align-items: stretch;
  }

  .inline-filters {
    margin-bottom: 1rem;
  }

  .inline-filters select {
    flex: 1 1 260px;
  }

  .quiz-image {
    min-height: 220px;
  }

  .choice-card {
    grid-template-columns: auto 1fr;
  }

  .choice-card input[type="radio"] {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 0.55rem;
  }
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  }

  .page-shell {
    padding-bottom: 3rem;
  }

  .section {
    padding: 1.35rem 0;
  }

  .section-head {
    margin-bottom: 1rem;
  }

  .hero-card,
  .card,
  .price-card,
  .mode-card,
  .quiz-card,
  .result-card {
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(17, 39, 43, 0.07);
  }

  .hero-actions,
  .quiz-actions,
  .row-between,
  .mode-card-top,
  .reader-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero-actions .btn,
  .nav-links .btn,
  .quiz-actions .btn,
  .mode-card .btn,
  .price-card .btn,
  .metric-card .btn,
  .inline-filters .btn,
  .form-card .btn,
  .study-hero-actions .btn,
  .reader-pagination .btn {
    width: 100%;
  }

  .reader-cover {
    min-height: 220px;
  }

  .reader-section-head {
    grid-template-columns: 1fr;
  }

  .reader-illustration {
    max-height: 260px;
  }

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

  .nav-links > a,
  .nav-links > form,
  .nav-links > form button {
    width: 100%;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .hero-metrics div {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(21, 87, 200, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
  }

  .hero-metrics strong {
    font-size: 1.25rem;
  }

  .hero-metrics span {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .price {
    font-size: 1.65rem;
  }

  .quiz-top {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .quiz-title {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }

  .quiz-image {
    aspect-ratio: 4 / 3;
    min-height: 180px;
    margin: 1rem 0;
  }

  .choice-card {
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .choice-letter {
    width: 34px;
    height: 34px;
  }

  .choice-text {
    font-size: 0.96rem;
  }

  th,
  td {
    padding: 0.75rem;
  }

  .is-locked::after {
    right: -2.6rem;
    top: 0.8rem;
  }

  .hero-logo {
    width: min(320px, 100%);
  }

  .phone-stage {
    min-height: 430px;
  }

  .phone {
    width: min(290px, 82vw);
    min-height: 455px;
    transform: rotate(4deg);
  }

  .phone-screen {
    min-height: 365px;
  }

  .free-badge {
    right: 0;
    bottom: 0.8rem;
    width: 112px;
    height: 112px;
    border-width: 6px;
    font-size: 0.78rem;
  }

  .promo-strip-inner {
    text-align: center;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: clamp(1.75rem, 10vw, 2.25rem);
  }

  .container,
  .narrow {
    width: min(100% - 0.8rem, 1140px);
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

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

  .pill,
  .eyebrow {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .choice-card {
    grid-template-columns: auto 1fr;
  }

  .choice-card input[type="radio"] {
    margin-top: 0.45rem;
  }
}
