/* english-coach 子站 — 与 website/css/style.css 同源（品牌色见《战略/品牌规范方案》） */
:root {
  --primary: #3380F7;
  --primary-dark: #2563EB;
  --primary-light: #EFF6FF;
  --bg-warm: #FDFBF7;
  --text: #000000;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-warm);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero 区略放宽，便于四张截图横排 */
.hero .container {
  max-width: 960px;
}

.header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: flex-end;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
}

.nav a:hover { color: var(--primary); }

.hero {
  padding: 48px 0 56px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 700;
}

.hero-subtitle {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.hero-lead {
  margin: 0 auto 12px;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  text-align: center;
}

.hero-legacy {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* 首屏：产品特点（与下文「核心练法」叙事衔接，避免重复堆叠大块白卡） */
.hero-features {
  margin: 0 auto 20px;
  max-width: 40rem;
  text-align: left;
}

.hero-features__title {
  margin: 0 0 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.hero-features__list {
  margin: 0;
  padding: 14px 16px 16px;
  padding-left: calc(16px + 1.25rem);
  list-style-position: outside;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  background: rgba(239, 246, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hero-features__list strong {
  color: var(--text);
}

/* 与 pic2english.com 根站对齐的产品说明块（首页 Hero 截图下方） */
.ec-product-sync {
  margin: 0 auto 28px;
  max-width: 640px;
  padding: 20px 18px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ec-product-sync__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.ec-three-list {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.ec-three-list strong {
  color: var(--text);
}

.ec-textbook-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.hero-slogan {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
}

.hero-hint {
  margin: 0 0 24px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-hint--before-shots {
  margin-bottom: 16px;
}

/* 首页 Hero：截图区 — 手机单列四行；宽屏 2×2；图片按源文件比例缩放（不裁切）。img 的 width/height 占位与常见竖屏比一致，减轻 CLS。 */
.hero-screens {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 auto 24px;
  max-width: 920px;
  width: 100%;
  text-align: center;
  padding: 18px 14px 20px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.85) 0%, rgba(253, 251, 247, 0.4) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-screen-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.hero-screen-thumb {
  width: 100%;
  max-width: min(304px, 88vw);
  margin: 0 auto;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  line-height: 0;
}

.hero-screen-thumb img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: bottom;
}

.hero-screen-step {
  display: inline-block;
  margin-right: 4px;
  font-weight: 700;
  color: var(--primary);
}

.hero-screen-item figcaption {
  margin-top: 10px;
  padding: 0 6px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
  max-width: 320px;
}

@media (min-width: 768px) {
  .hero-screens {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 20px;
    margin-bottom: 28px;
    padding: 20px 18px 22px;
  }

  .hero-screen-thumb {
    max-width: min(328px, 100%);
  }

  .hero-screen-item figcaption {
    font-size: 0.8125rem;
    max-width: min(360px, 100%);
  }
}

@media (max-width: 520px) {
  .hero-screens {
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px 10px 18px;
  }

  .hero-screen-thumb {
    max-width: min(280px, 90vw);
  }

  .hero-screen-item figcaption {
    font-size: 0.75rem;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

.btn-primary {
  background: var(--primary);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(51, 128, 247, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
}

button.btn:disabled,
button.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

.btn-icon { font-size: 1.25em; }

.features {
  padding: 40px 0 48px;
}

.features h2, .scenarios h2, .cta h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.section-intro {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-icon { font-size: 2rem; margin-bottom: 12px; }

.card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.scenarios { padding: 32px 0 40px; }

.faq-textbook-list {
  margin: 12px 0 16px;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.faq-textbook-list li {
  margin-bottom: 6px;
}

.scenario-list { margin: 0; padding-left: 20px; }

.scenario-list li { margin-bottom: 10px; }

.cta {
  padding: 40px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, transparent 100%);
}

.cta p { margin: 0 0 24px; color: var(--text-muted); }

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  background: #fff;
}

.footer-company {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text);
}

.footer-icp {
  margin: 0 0 16px;
  font-size: 0.85rem;
}

.footer-icp a { color: var(--text-muted); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-nav a:hover { color: var(--primary); }

.footer-contact {
  margin: 16px 0 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: #999;
}

.page-header { padding: 32px 0 24px; }

.page-header--topic {
  text-align: center;
}

.page-header--topic h1 {
  margin-bottom: 0;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.page-content { padding: 0 0 48px; }

/* 首页：产品方案叙事（缘起、核心练法、课本与故事） */
.ec-narrative {
  padding-top: 8px;
}

.ec-narrative .container > h2:first-of-type {
  margin-top: 0;
}

.ec-narrative__lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.ec-narrative__steps,
.ec-narrative__bullets {
  margin: 0 0 18px;
  padding-left: 1.35rem;
  line-height: 1.65;
  font-size: 0.95rem;
}

.ec-narrative__steps li,
.ec-narrative__bullets li {
  margin-bottom: 8px;
}

.ec-narrative__note {
  font-size: 0.875rem;
  margin: 12px 0 0;
  line-height: 1.55;
}

.ec-narrative__bridge {
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.ec-narrative__bridge a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.ec-narrative__bridge a:hover {
  text-decoration: underline;
}

/* 首页：故事书选择说明（与 App 内「选书说明」同源） */
.ec-story-books-intro {
  padding-top: 0;
}

.ec-story-books-intro .container > h2:first-of-type {
  margin-top: 0;
}

.ec-story-books-intro__lead {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.ec-story-books-intro h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.ec-story-books-intro h3:first-of-type {
  margin-top: 0;
}

.ec-story-books-intro p {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* 叙事区内：课本库说明（与 App 内 TextbookLibraryHelpView 同源） */
.ec-narrative .ec-textbook-library-help h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.ec-narrative .ec-textbook-library-help h3:first-of-type {
  margin-top: 0;
}

.ec-narrative .ec-textbook-library-help p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.65;
}

.ec-narrative .ec-textbook-library-help .ec-textbook-library-help__numbered {
  margin-bottom: 8px;
}

.page-content h2 {
  margin: 28px 0 12px;
  font-size: 1.25rem;
}

.page-content p, .page-content li { color: var(--text-muted); }

.notice-legal {
  padding: 12px 16px;
  margin-bottom: 24px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #92400E;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.pricing-card {
  padding: 28px 24px;
  background: #fff;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(51, 128, 247, 0.15);
}

.pricing-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: var(--text);
}

.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 12px 0;
}

.pricing-card p {
  margin: 0 0 20px;
  font-size: 0.9rem;
}

.apk-meta {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin: 16px 0;
}

@media (max-width: 600px) {
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .header {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .header .container {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding: 32px 0 40px;
  }

  .hero h1 { font-size: 1.625rem; }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

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

  .features h2,
  .scenarios h2,
  .cta h2 {
    font-size: 1.35rem;
  }

  .page-header {
    padding: 24px 0 20px;
  }

  .page-header h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .page-content h2 {
    font-size: 1.15rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pricing-card {
    padding: 22px 18px;
  }

  .pricing-price {
    font-size: 1.75rem;
  }

  .notice-legal {
    font-size: 0.875rem;
  }
}

/* 栏目页：教材 textbooks.html / 故事 stories.html */
.page-header .topic-lead {
  margin: 14px auto 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: center;
}

.topic-page .topic-cta {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.topic-page .topic-page__numbered {
  margin-bottom: 12px;
}

/* textbooks.html：人教版示例流程（视频 + 分步截屏） */
.textbooks-flow {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.textbooks-flow > h2 {
  margin-top: 0;
}

.textbooks-flow__meta {
  margin: 0 0 20px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.textbooks-flow__h3 {
  margin: 28px 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.textbooks-flow__h3:first-of-type {
  margin-top: 0;
}

.textbooks-flow__hint {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.textbooks-flow__video-wrap {
  margin: 0 0 24px;
  text-align: center;
}

.textbooks-flow__video {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
  vertical-align: middle;
}

.textbooks-flow__figcaption {
  margin: 10px auto 0;
  max-width: 36rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.textbooks-flow__step {
  margin-bottom: 28px;
}

.textbooks-flow__step-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.textbooks-flow__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: start;
}

.textbooks-flow__gallery--two {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  max-width: 520px;
}

.textbooks-flow__fig {
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.textbooks-flow__fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.textbooks-flow__cta-mid {
  margin: 24px 0 0;
  font-size: 0.95rem;
  text-align: center;
}

.textbooks-flow__cta-mid a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.textbooks-flow__cta-mid a:hover {
  text-decoration: underline;
}

.nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}
