:root {
  --ink: #171513;
  --muted: #6f675f;
  --paper: #fbfaf7;
  --surface: #fff;
  --soft: #f2ece5;
  --line: #e8dfd5;
  --accent: #9b2f2f;
  --shadow: 0 16px 48px rgba(50, 35, 20, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; letter-spacing: normal; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { color: var(--muted); font-size: 16px; }
h1, h2, h3 { line-height: 1.08; }
h1 { max-width: 760px; margin: 14px 0 18px; font-size: clamp(38px, 5vw, 62px); letter-spacing: normal; }
h2 { margin: 9px 0 14px; font-size: clamp(28px, 3.3vw, 42px); letter-spacing: normal; }
h3 { margin: 8px 0; }

.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; padding: 14px 5vw; border-bottom: 1px solid rgba(232, 223, 213, .8); background: rgba(251, 250, 247, .9); backdrop-filter: blur(14px); }
.brand { font-size: 22px; font-weight: 850; letter-spacing: normal; }
.site-header nav { display: flex; gap: 22px; margin-left: auto; color: var(--muted); font-size: 14px; }
.site-header nav a:hover, .text-link:hover, .footer-links a:hover { color: var(--accent); }
.language-toggle { margin-left: 18px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 800; }

.section, .hero { width: min(calc(100% - 10vw), 1180px); margin: 0 auto; padding: 58px 0; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.section-heading { max-width: 700px; margin-bottom: 26px; }
.section-heading p { margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.center-row { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 19px; border: 0; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 800; transition: transform .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .62; transform: none; }
.btn:focus-visible, a:focus-visible { outline: 3px solid rgba(155, 47, 47, .28); outline-offset: 3px; }
.primary { background: var(--ink); color: #fff; }
.secondary { background: var(--soft); color: var(--ink); }
.pill, .tag-list span, .credentials span, .trust-row span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; }
.tag-list, .credentials, .trust-row { display: flex; flex-wrap: wrap; gap: 7px; }
.microcopy { margin-bottom: 0; font-size: 11px; }

.hero { display: grid; grid-template-columns: 1.18fr .82fr; gap: 36px; align-items: center; max-width: 1050px; padding-top: 36px; padding-bottom: 42px; }
.hero h1 { font-size: clamp(36px, 4.2vw, 54px); }
.hero-copy > p { max-width: 600px; margin: 0; font-size: 17px; }
.trust-row { margin-top: 20px; }
.hero-visual { position: relative; min-height: 280px; max-height: 340px; overflow: hidden; border-radius: 24px; box-shadow: var(--shadow); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-slogan { position: absolute; right: 16px; bottom: 16px; left: 16px; padding: 11px 14px; border-radius: 13px; background: rgba(251, 250, 247, .9); font-size: 17px; line-height: 1.2; backdrop-filter: blur(10px); }

.home-offerings { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: min(calc(100% - 10vw), 1180px); margin: 0 auto; padding: 38px 0 48px; }
.home-preview { min-width: 0; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.lessons-preview { background: var(--soft); }
.compact-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 18px; }
.compact-heading h2 { margin-bottom: 0; font-size: 25px; }
.text-link { flex: none; color: var(--accent); font-size: 13px; font-weight: 800; }
.material-preview-card { display: grid; grid-template-columns: 145px 1fr; gap: 18px; align-items: center; }
.material-preview-card h3 { font-size: 18px; }
.material-preview-card p, .preview-intro, .teacher-mini-main p { margin: 5px 0 0; font-size: 13px; }
.material-cover { display: flex; min-height: 130px; padding: 15px; flex-direction: column; justify-content: space-between; border-radius: 17px; background: linear-gradient(145deg, #ead8cd, #cfae9b); }
.material-cover span { font-size: 10px; font-weight: 850; letter-spacing: 1.5px; }
.material-cover strong { color: var(--accent); font-family: serif; font-size: 48px; line-height: 1; }
.teacher-mini-card { display: grid; grid-template-columns: 68px 1fr; gap: 13px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); align-items: center; }
.teacher-mini-card img { width: 68px; height: 68px; border-radius: 14px; object-fit: cover; }
.teacher-mini-main h3 { margin: 0; font-size: 19px; }
.teacher-facts { grid-column: 1 / -1; display: flex; gap: 7px; align-items: center; }
.teacher-facts span, .teacher-facts strong { padding: 5px 9px; border-radius: 999px; background: var(--surface); font-size: 12px; }
.teacher-facts strong { margin-left: auto; color: var(--accent); font-size: 17px; }

.about-project { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; }
.about-project p { margin-top: 0; }
.final-cta { padding-top: 44px; padding-bottom: 54px; text-align: center; }
.final-cta h2 { max-width: 680px; margin-right: auto; margin-left: auto; }

.page-intro { padding-bottom: 42px; }
.page-intro > p { max-width: 720px; margin: 0; font-size: 17px; }
.lesson-highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 940px; margin: 24px 0 0; }
.lesson-highlights article { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lesson-highlights strong { display: block; color: var(--ink); font-size: 17px; }
.lesson-highlights p { margin: 5px 0 0; font-size: 13px; }
.teachers-section { padding-top: 46px; border-top: 1px solid var(--line); }
.teacher-card-featured { display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.teacher-photo { width: 220px; height: 220px; border-radius: 18px; object-fit: cover; }
.teacher-summary { align-self: center; }
.teacher-summary h3 { margin: 0; font-size: 28px; }
.teacher-role { margin: 2px 0 12px; font-size: 13px; }
.compact-credentials { margin-bottom: 16px; }
.teacher-meta { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 9px; }
.teacher-meta span { padding: 10px 12px; border-radius: 14px; background: var(--soft); font-size: 14px; font-weight: 700; }
.teacher-meta small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.teacher-meta strong { color: var(--accent); font-size: 18px; }
.teacher-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.teacher-more { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 22px 0 2px; border-top: 1px solid var(--line); }
.teacher-more[hidden] { display: none; }
.teacher-more h3 { font-size: 22px; }
.teacher-more p { margin: 8px 0; font-size: 14px; }
.booking-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 15px; padding: 15px 18px; border-radius: 16px; background: var(--soft); }
.booking-note > p:first-child { flex: 1; margin: 0; font-size: 13px; }
.booking-note .microcopy { max-width: 180px; margin: 0; }

.catalogue-page { max-width: 1180px; }
.catalogue-grid { margin-top: 28px; }
.product-card { display: grid; grid-template-columns: 300px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.product-art { position: relative; display: flex; min-height: 290px; padding: 24px; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, #ead8cd, #cfae9b); }
.product-label { font-size: 11px; font-weight: 850; letter-spacing: 1.8px; }
.hanzi { color: var(--accent); font-family: serif; font-size: 72px; line-height: 1; }
.product-art > p { max-width: 60%; margin: 0; color: var(--ink); font-size: 12px; }
.product-info { padding: 26px 30px; }
.product-info h2 { margin: 10px 0; font-size: 25px; }
.product-info > p { margin: 7px 0; font-size: 14px; }
.product-info ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px 22px; margin: 12px 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; }
.price-row strong { font-size: 27px; }
.product-actions { display: flex; gap: 9px; }
.cover-tools { position: absolute; right: 18px; bottom: 17px; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.cover-tools .pill, .cover-tools .btn { background: rgba(255, 255, 255, .82); color: var(--ink); }

#workbook-preview { width: min(94vw, 960px); max-height: calc(100dvh - 32px); padding: 22px 28px 24px; overflow: hidden; border: 0; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
#workbook-preview[open] { display: flex; flex-direction: column; }
#workbook-preview::backdrop { background: rgba(23, 21, 19, .58); }
#workbook-preview h2 { margin: 0 38px 5px 0; font-size: 28px; }
.preview-close { position: absolute; top: 10px; right: 16px; border: 0; background: transparent; cursor: pointer; font-size: 28px; }
.pdf-preview-intro { flex: none; }
.pdf-preview-intro p { max-width: 780px; margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.pdf-preview-frame { display: block; width: 100%; height: min(66vh, 660px); min-height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pdf-fallback { align-self: flex-end; margin-top: 7px; color: var(--accent); font-size: 12px; font-weight: 800; }

/* Retained only for the unlinked legacy teachers.html page. */
.teacher-detail-page { max-width: 1050px; }
.teacher-detail-card { display: grid; grid-template-columns: 300px 1fr; gap: 32px; }
.teacher-detail-sidebar img { width: 100%; border-radius: 22px; }
.teacher-detail-copy h2 { font-size: 32px; }
.teacher-detail-video { margin: 20px 0; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 9; }
.teacher-detail-video iframe { width: 100%; height: 100%; border: 0; }
.booking-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }

footer { display: grid; grid-template-columns: 1fr auto auto; gap: 26px; align-items: center; padding: 28px 5vw; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer strong { color: var(--ink); font-size: 17px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 820px) {
  .site-header nav { display: none; }
  .language-toggle { margin-left: auto; }
  .section, .hero, .home-offerings { width: min(calc(100% - 36px), 680px); }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 30px 0 34px; }
  .hero-visual { min-height: 230px; max-height: 270px; }
  .home-offerings { grid-template-columns: 1fr; padding: 24px 0 36px; }
  .about-project, .teacher-more, .teacher-detail-card { grid-template-columns: 1fr; gap: 22px; }
  .teacher-card-featured { grid-template-columns: 160px 1fr; }
  .teacher-photo { width: 160px; height: 160px; }
  .booking-note { flex-wrap: wrap; }
  footer { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 620px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .section { padding: 40px 0; }
  .hero h1 { font-size: 37px; }
  .hero-visual { min-height: 205px; }
  .home-preview { padding: 19px; }
  .compact-heading { display: block; }
  .compact-heading .text-link { display: inline-block; margin-top: 8px; }
  .material-preview-card { grid-template-columns: 105px 1fr; gap: 13px; }
  .material-cover { min-height: 110px; padding: 12px; }
  .material-cover strong { font-size: 38px; }
  .lesson-highlights { grid-template-columns: 1fr; gap: 7px; }
  .lesson-highlights article { padding: 13px 15px; }
  .teacher-card-featured { grid-template-columns: 88px 1fr; gap: 15px; padding: 16px; }
  .teacher-photo { width: 88px; height: 108px; }
  .teacher-summary { display: contents; }
  .teacher-summary > div:first-child { align-self: center; }
  .teacher-summary h3 { font-size: 23px; }
  .compact-credentials { grid-column: 1 / -1; }
  .teacher-meta { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .teacher-actions { grid-column: 1 / -1; }
  .teacher-actions .btn { flex: 1; }
  .teacher-more, .booking-note { grid-column: 1 / -1; }
  .booking-note .btn { width: 100%; }
  .booking-note .microcopy { max-width: none; }
  .product-card { grid-template-columns: 1fr; }
  .product-art { min-height: 210px; }
  .product-info { padding: 22px; }
  .product-info ul { grid-template-columns: 1fr; }
  #workbook-preview { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 18px 14px 14px; border-radius: 16px; }
  #workbook-preview h2 { font-size: 23px; }
  .pdf-preview-intro p { margin-bottom: 10px; font-size: 13px; }
  .pdf-preview-frame { height: 64dvh; min-height: 300px; border-radius: 10px; }
  .pdf-fallback { margin-top: 5px; font-size: 11px; }
}

html[lang="zh-CN"] .eyebrow { letter-spacing: .08em; }

@media (max-width: 420px) {
  .teacher-actions { flex-direction: column; }
  .teacher-actions .btn { width: 100%; }
  .teacher-meta span { padding-right: 8px; padding-left: 8px; }
}
