/* Speaking knowledge topics — editorial cards + article pages. */
.topics-page, .topic-page {
  background:
    radial-gradient(900px 500px at 86% -8%, rgba(221, 96, 58, .09), transparent 62%),
    radial-gradient(700px 420px at -4% 16%, rgba(46, 139, 104, .06), transparent 58%),
    var(--paper);
}
.topics-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(214, 201, 180, .64);
  background: rgba(245, 239, 227, .88);
  backdrop-filter: blur(18px) saturate(1.12);
}
.topics-topbar-inner {
  max-width: var(--max);
  height: 68px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.topics-nav { display: flex; align-items: center; gap: 22px; margin-left: 10px; }
.topics-nav a { color: var(--muted); font-size: 11px; }
.topics-nav a:hover, .topics-nav a.is-active { color: var(--ink); }
.topics-nav a.is-active { font-weight: 600; }
.topics-back { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 10.5px; }
.topics-back:hover { color: var(--accent-deep); }
.topics-back .ic { width: 14px; height: 14px; }
.topics-shell { max-width: var(--max); margin: 0 auto; padding: 0 40px 80px; }

.topics-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, .62fr);
  gap: 56px;
  align-items: end;
  padding: 55px 0 42px;
}
.topics-hero h1 {
  margin-top: 18px;
  font-size: clamp(41px, 5vw, 66px);
  line-height: 1.01;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.topics-hero h1 em { font-family: var(--serif); color: var(--accent); font-weight: 400; font-style: italic; }
.topics-deck { max-width: 620px; margin-top: 19px; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.topics-kicker { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.topics-stats { display: flex; gap: 27px; margin-top: 23px; }
.topics-stats > div { display: flex; flex-direction: column; gap: 2px; }
.topics-stats strong { font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.topics-stats span { color: var(--muted); font-size: 9px; }
.topics-stats > div + div { padding-left: 27px; border-left: 1px solid var(--line); }
.topics-path {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.path-row { display: flex; gap: 11px; align-items: baseline; margin-top: 13px; color: var(--ink-soft); font-size: 10.5px; line-height: 1.55; }
.path-row b { flex: 0 0 auto; color: var(--accent); font-family: var(--mono); font-size: 8.5px; }
.topics-path .btn { margin-top: 17px; width: 100%; }

.topics-toolbar { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.topics-filter { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.topics-filter .filter-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  transition: all .18s ease;
}
.topics-filter .filter-chip:hover { color: var(--ink); background: var(--surface-2); }
.topics-filter .filter-chip.is-active { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.topics-search { display: flex; align-items: center; gap: 7px; width: 280px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.topics-search:focus-within { border-color: var(--line-strong); }
.topics-search .ic { width: 13px; height: 13px; color: var(--muted); }
.topics-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10.5px; }
.topics-search input::placeholder { color: var(--muted-light); }
.topics-result { margin: 12px 0 14px; color: var(--muted); font-size: 9.5px; }
.topics-result b { color: var(--ink); font-weight: 600; font-size: 13px; }
.topics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.topic-card {
  position: relative;
  min-width: 0;
  padding: 18px 17px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  animation: fadeUp .45s both;
}
.topic-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 15px 30px rgba(54,43,23,.08); }
.topic-card.is-done { border-color: rgba(46,139,104,.28); }
.topic-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topic-card-cat { color: var(--accent-deep); font-size: 8.5px; font-weight: 600; letter-spacing: .04em; }
.topic-card-num { font-family: var(--mono); color: var(--muted-light); font-size: 9px; }
.topic-card h3 { min-height: 42px; margin-top: 10px; color: var(--ink); font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.topic-card p { min-height: 37px; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card-meta { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted-light); font-size: 8.5px; }
.topic-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.topic-card-done { display: inline-flex; align-items: center; gap: 3px; color: var(--green-deep); font-size: 8px; white-space: nowrap; }
.topic-card-done .ic { width: 10px; height: 10px; }
.topics-empty { padding: 70px 20px; text-align: center; color: var(--muted); font-size: 11px; border: 1px dashed var(--line-strong); border-radius: 14px; }
.topics-empty[hidden] { display: none; }
.topics-bottom { display: grid; grid-template-columns: 1fr .9fr; gap: 40px; align-items: end; margin-top: 52px; padding: 33px 35px; border-radius: 19px; background: #202820; color: #fbf7ea; }
.topics-bottom h2 { margin-top: 8px; font-family: var(--serif); font-size: clamp(29px, 3.5vw, 42px); line-height: 1.06; font-weight: 400; letter-spacing: -.02em; }
.topics-bottom h2 em { color: #efaf88; }
.topics-bottom p { max-width: 480px; color: rgba(251,247,234,.58); font-size: 11px; line-height: 1.8; }
.topics-bottom .btn { margin-top: 15px; background: #f3c2a6; color: #352b22; border-color: #f3c2a6; }
.topics-footer { max-width: var(--max); margin: 0 auto; padding: 20px 40px 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 9px; flex-wrap: wrap; }
.topics-footer a { color: var(--muted); }
.topics-footer a:hover { color: var(--accent-deep); }
.topics-footer span:last-child { display: flex; gap: 8px; align-items: center; }
.topics-footer i { width: 2px; height: 2px; border-radius: 50%; background: var(--line-strong); }

/* Topic article */
.topic-shell { max-width: 1120px; margin: 0 auto; padding: 38px 40px 75px; }
.topic-loading { padding: 70px 0; text-align: center; color: var(--muted); font-size: 12px; }
.topic-hero { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.topic-breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.topic-breadcrumb a { color: var(--muted); }
.topic-breadcrumb a:hover { color: var(--accent-deep); }
.topic-breadcrumb span:nth-child(2n) { color: var(--line-strong); }
.topic-cat-line { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.topic-cat { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-deep); font-size: 8.5px; font-weight: 600; }
.topic-level { color: var(--muted); font-size: 9px; }
.topic-hero h1 { max-width: 840px; margin-top: 10px; font-size: clamp(31px, 4vw, 48px); line-height: 1.12; letter-spacing: -.04em; font-weight: 500; text-wrap: balance; }
.topic-title-sub { display: inline; }
.topic-subtitle { max-width: 760px; margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.topic-intro { max-width: 850px; margin-top: 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.topic-keypoints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.topic-keypoints div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.topic-keypoints b { display: block; margin-bottom: 3px; color: var(--accent-deep); font-family: var(--mono); font-size: 8px; font-weight: 500; }
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 38px; align-items: start; padding-top: 28px; }
.topic-content { min-width: 0; }
.topic-section { padding: 0 0 30px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 82px; }
.topic-section h2 { font-size: 24px; font-weight: 500; letter-spacing: -.03em; line-height: 1.25; }
.topic-section > p { margin-top: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.topic-example { margin-top: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.topic-example-head { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.topic-example-en { color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.speak-btn { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.speak-btn:hover { color: var(--accent-deep); border-color: var(--line-strong); }
.speak-btn .ic { width: 12px; height: 12px; }
.topic-example-ipa { margin-top: 4px; color: var(--muted); font-family: "Segoe UI", "Lucida Sans Unicode", "Arial Unicode MS", sans-serif; font-size: 10.5px; line-height: 1.45; letter-spacing: .015em; font-variant-ligatures: none; }
.topic-example-zh { margin-top: 5px; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.topic-example-note { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.topic-practice { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.topic-practice h2 { font-size: 20px; }
.topic-practice ol { margin: 10px 0 0 17px; color: var(--ink-soft); font-size: 10.5px; line-height: 1.8; }
.topic-practice li { padding-left: 3px; }
.topic-mistakes { margin-top: 14px; padding: 16px 17px; border-radius: 11px; background: #fbf0e9; border: 1px solid #f0d7c6; }
.topic-mistakes h2 { font-size: 20px; color: var(--accent-deep); }
.topic-mistakes ul { margin: 8px 0 0 16px; color: #7a5a48; font-size: 10.5px; line-height: 1.75; }
.topic-takeaway { margin-top: 17px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--ink-soft); font-size: 11.5px; line-height: 1.75; }
.topic-takeaway b { display: block; margin-bottom: 4px; color: var(--accent-deep); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.topic-side { position: sticky; top: 90px; }
.topic-side-card { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.topic-side-card + .topic-side-card { margin-top: 9px; }
.topic-side-card h3 { font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: .04em; }
.topic-toc { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.topic-toc a { color: var(--ink-soft); font-size: 9.5px; line-height: 1.4; }
.topic-toc a:hover { color: var(--accent-deep); }
.topic-done-btn { width: 100%; height: 34px; margin-top: 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-2); color: var(--ink-soft); font-size: 9.5px; cursor: pointer; }
.topic-done-btn.is-done { color: var(--green-deep); background: var(--green-soft); border-color: #b9ddcd; }
.topic-side-note { margin-top: 7px; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.topic-related { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.topic-related a { color: var(--ink-soft); font-size: 9.5px; line-height: 1.4; }
.topic-related a:hover { color: var(--accent-deep); }
.topic-next { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; padding-top: 17px; border-top: 1px solid var(--line); }
.topic-next a { color: var(--ink-soft); font-size: 10px; }
.topic-next a:hover { color: var(--accent-deep); }
.topic-next span { display: block; color: var(--muted); font-size: 8px; margin-bottom: 4px; }
.topic-error { padding: 60px 20px; text-align: center; color: var(--muted); }

@media (max-width: 1050px) {
  .topics-hero { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .topics-path { max-width: 520px; }
  .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-layout { grid-template-columns: 1fr; }
  .topic-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; order: -1; }
  .topic-title-sub { display: block; }
  .topic-side-card + .topic-side-card { margin-top: 0; }
}
@media (max-width: 820px) {
  .topics-topbar-inner { height: 62px; padding: 0 20px; gap: 12px; }
  .topics-nav { display: none; }
  .topics-shell { padding-left: 20px; padding-right: 20px; }
  .topics-hero { padding: 33px 0 30px; }
  .topics-hero h1 { font-size: clamp(36px, 9vw, 49px); }
  .topics-deck { font-size: 13px; }
  .topics-toolbar { flex-direction: column; align-items: stretch; gap: 9px; }
  .topics-filter { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .topics-filter::-webkit-scrollbar { display: none; }
  .topics-filter .filter-chip { flex: 0 0 auto; }
  .topics-search { width: 100%; }
  .topics-grid { grid-template-columns: 1fr; gap: 8px; }
  .topics-bottom { grid-template-columns: 1fr; gap: 17px; padding: 25px 21px; margin-top: 38px; }
  .topics-footer { padding-left: 20px; padding-right: 20px; }
  .topic-shell { padding: 27px 20px 56px; }
  .topic-hero h1 { font-size: clamp(29px, 7.5vw, 38px); }
  .topic-keypoints { grid-template-columns: 1fr; }
  .topic-layout { gap: 25px; }
  .topic-side { grid-template-columns: 1fr; }
  .topic-section h2 { font-size: 22px; }
}
@media (max-width: 430px) {
  .topics-hero h1 { font-size: 35px; }
  .topics-stats { gap: 15px; }
  .topics-stats > div + div { padding-left: 15px; }
  .topics-stats strong { font-size: 19px; }
  .topics-back { font-size: 9.5px; }
  .topic-example-en { font-size: 16px; }
  .topic-next { flex-direction: column; }
}
