.topic-page {
  --topic-ink: #16382f;
  --topic-copy: #436157;
  --topic-rule: #d4ddd0;
  --topic-tint: #e7eee4;
  --topic-accent: #265f49;
  background: #f9f6ed;
  color: var(--topic-ink);
}

.topic-page[data-topic="ai"] { --topic-tint: #e6eaef; --topic-accent: #3b5278; }
.topic-page[data-topic="writing"] { --topic-tint: #f2eadf; --topic-accent: #784d30; }
.topic-page[data-topic="leadership"] { --topic-tint: #e7ece0; --topic-accent: #43613d; }
.topic-page[data-topic="psychology"] { --topic-tint: #ebe6ef; --topic-accent: #654c74; }
.topic-page[data-topic="money"] { --topic-tint: #e5ede1; --topic-accent: #23654c; }
.topic-page[data-topic="science"] { --topic-tint: #e2ecec; --topic-accent: #2e616c; }
.topic-page[data-topic="history"] { --topic-tint: #f2e8de; --topic-accent: #7b4d3b; }
.topic-page[data-topic="numbers"] { --topic-tint: #eee9db; --topic-accent: #6a531f; }

.topic-hero {
  padding: clamp(22px, 3vw, 38px) 0 clamp(25px, 4vw, 58px);
  background: linear-gradient(140deg, var(--topic-tint), #f9f6ed 72%);
}

.topic-shell { width: min(1170px, calc(100% - 80px)); }
.topic-hero-layout,
.topic-start,
.topic-speaking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 74px);
  align-items: center;
}

.topic-hero-layout { margin-top: 16px; }
.topic-hero .public-breadcrumb { margin: 0; color: var(--topic-copy); }
.topic-hero .public-breadcrumb a { color: inherit; }
.site-shell :is(.topic-hero, .topic-speaking-hero) .topic-intro h1 {
  max-width: none;
  margin: 0;
  color: inherit;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(43px, 5.7vw, 78px);
  font-weight: 450;
  line-height: 1.015;
  letter-spacing: -.051em;
  overflow-wrap: normal;
  text-wrap: balance;
}

.topic-intro h1 em { display: block; color: var(--topic-accent); font-weight: inherit; }
.topic-intro > p {
  max-width: 37ch;
  margin: 17px 0 0;
  color: var(--topic-copy);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55;
}

.topic-art { margin: 0; overflow: hidden; border-radius: 22px; background: #fbf8f0; }
.topic-art img { display: block; width: 100%; height: auto; }

.topic-start {
  align-items: start;
  padding: clamp(23px, 4vw, 52px) 0 26px;
}

.site-shell :is(.topic-page, .topic-speaking-picker) h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(23px, 2.4vw, 33px);
  line-height: 1.15;
}

.topic-course-list { list-style: none; margin: 15px 0 2px; padding: 0; border-top: 1px solid var(--topic-rule); }
.topic-course-list > li { border-bottom: 1px solid var(--topic-rule); }
.topic-course {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 23px;
  align-items: center;
  gap: 15px;
  min-height: 82px;
  padding: 9px 0;
  color: var(--topic-ink);
  text-decoration: none;
}

.topic-course img { display: block; width: 100%; height: auto; border-radius: 8px; }
.topic-course strong { display: block; font-weight: 800; font-size: 16px; line-height: 1.28; }
.topic-course > span > span { display: block; margin-top: 4px; color: var(--topic-copy); font-size: 14px; line-height: 1.5; }
.topic-arrow { color: var(--topic-accent); font-size: 21px; line-height: 1; }
.topic-course:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.topic-text-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 7px;
  min-height: 44px;
  color: var(--topic-accent, #265f49);
  font-size: 14px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.topic-check {
  padding: clamp(17px, 2.8vw, 30px);
  border: 1px solid color-mix(in srgb, var(--topic-accent) 16%, var(--topic-tint));
  border-radius: 21px;
  background: var(--topic-tint);
}

.topic-example-label { margin: 0 0 5px; color: var(--topic-accent, #265f49); font-size: 14px; font-weight: 800; }
.topic-prompt { margin: 10px 0 0; color: var(--topic-copy); font-size: 16px; line-height: 1.55; }
.topic-answers { display: grid; gap: 8px; margin-top: 16px; }
.topic-answer { min-width: 0; border-radius: 10px; border: 1px solid #c5d0c2; background: #fffdf6; }
.topic-answer summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 11px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.topic-answer summary::-webkit-details-marker { display: none; }
.topic-answer summary:hover { background: #f3f4eb; border-radius: 9px; }
.topic-answer[open] summary { background: color-mix(in srgb, var(--topic-tint) 63%, #fffdf6); border-radius: 9px 9px 0 0; }
.topic-choice-dot { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--topic-accent); border-radius: 50%; }
.topic-answer[open] .topic-choice-dot { background: radial-gradient(circle, var(--topic-accent) 43%, transparent 47%); }
.topic-tutor { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; padding: 11px; border-top: 1px solid #d9e0d4; }
.topic-tutor p { margin: 0; color: var(--topic-copy); font-size: 14px; line-height: 1.55; }
.topic-tutor strong { display: block; margin-bottom: 2px; color: var(--topic-ink); }

.topic-guide,
.topic-download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-top: 1px solid var(--topic-rule);
}

.topic-guide { padding-block: 4px; }
.topic-guide > span { font-size: 14px; color: var(--topic-copy); font-weight: 700; }
.topic-download { padding-block: 23px 30px; }
.topic-download h2 { font-size: clamp(22px, 2.2vw, 29px); }
.topic-download p { margin: 5px 0 0; color: var(--topic-copy); font-size: 15px; }
.topic-download .early-testing-note { margin: 6px 0 0; }
.topic-page .topic-store-buttons { justify-content: flex-start; gap: 8px; }
.topic-page .topic-store-buttons .course-store-badge-link { flex: 0 0 auto; width: auto; min-width: 0; padding: 0; }
.topic-page .topic-store-buttons .course-app-store-badge { width: auto; height: clamp(42px, 5vw, 56px); }

.public-page .topic-speaking-hero {
  --topic-accent: #e9cd87;
  --topic-copy: #dce8de;
  padding: clamp(22px, 3vw, 38px) 0 clamp(32px, 5vw, 68px);
  color: #fff9ef;
  background: var(--site-grain), var(--site-light), #133a31;
}

.public-page .topic-speaking-hero::before,
.public-page .topic-speaking-hero::after { content: none; }
.topic-speaking-hero .public-breadcrumb { margin: 0 0 17px; }
.topic-speaking-layout {
  grid-template-columns: minmax(0, .84fr) minmax(0, 1fr);
  grid-template-areas: "intro picker" "actions picker";
  row-gap: 0;
}
.topic-speaking-layout > .topic-intro { grid-area: intro; align-self: end; }
.topic-speaking-layout > .topic-speaking-picker { grid-area: picker; }
.topic-speaking-layout > .public-hero-actions { grid-area: actions; align-self: start; }
.topic-speaking-hero .topic-intro > p { color: var(--topic-copy); }
.topic-speaking-hero .public-hero-actions { margin-top: 21px; }
.topic-speaking-picker {
  --topic-accent: #265f49;
  min-width: 0;
  padding: clamp(17px, 3vw, 30px);
  border-radius: 22px;
  color: #16382f;
  background: #fbf8ee;
  box-shadow: var(--site-shadow-float);
}

.public-page .topic-speaking-picker h2 { color: #16382f; }
.topic-scenario-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 15px 0;
  padding: 0;
  border: 1px solid #c5d4c7;
  border-radius: 11px;
  gap: 1px;
  background: #c5d4c7;
}

.topic-sr-only,
.topic-scenario-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.topic-scenario-options label { position: relative; }
.topic-scenario-options label span {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 48px;
  padding: 6px;
  background: #fffdf6;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}

.topic-scenario-options label:first-of-type span { border-radius: 10px 0 0 10px; }
.topic-scenario-options label:last-of-type span { border-radius: 0 10px 10px 0; }
.topic-scenario-options input:checked + span { background: #e0ecdb; box-shadow: inset 0 -3px #2f7959; }
.topic-scenario-options input:focus-visible + span { outline: 2px solid #2f8f5c; outline-offset: -3px; }
.topic-scene { display: none; }
.topic-scenario-content:has(input[value="0"]:checked) [data-scene="0"],
.topic-scenario-content:has(input[value="1"]:checked) [data-scene="1"],
.topic-scenario-content:has(input[value="2"]:checked) [data-scene="2"] { display: block; }

.topic-opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(65px, 8vw, 100px);
  align-items: center;
  gap: 12px;
}

.topic-opening blockquote { margin: 0; color: #183b30; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.5; font-weight: 800; }
.topic-opening img { display: block; width: 100%; height: auto; border-radius: 9px; }
.topic-speaking-feedback { margin-top: 13px; border-top: 1px solid #d6e0d1; }
.topic-speaking-feedback summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: #265f49;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.topic-speaking-feedback summary::-webkit-details-marker { display: none; }
.topic-speaking-feedback summary::after { content: "+" / ""; font-size: 17px; }
.topic-speaking-feedback[open] summary::after { content: "−" / ""; }
.topic-speaking-feedback p { margin: 3px 0 6px; color: #3b5b4e; font-size: 14px; line-height: 1.55; }
.topic-speaking-feedback strong { color: #265f49; }

@media (max-width: 760px) {
  .topic-shell { width: calc(100% - 40px); }
  .topic-hero-layout, .topic-start, .topic-speaking-layout { gap: 25px; }
  .topic-course { grid-template-columns: 65px minmax(0, 1fr) 18px; gap: 10px; }
}

@media (max-width: 620px) {
  .topic-hero-layout, .topic-start, .topic-speaking-layout { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .site-shell :is(.topic-hero, .topic-speaking-hero) .topic-intro h1 { font-size: clamp(36px, 11vw, 54px); }
  .topic-intro > p { margin-top: 11px; }
  .topic-speaking-layout { grid-template-areas: "intro" "picker" "actions"; }
  .topic-speaking-hero .public-hero-actions { margin-top: 0; }
  .topic-art { border-radius: 13px; }
  .topic-start { padding-top: 18px; }
  .topic-check, .topic-speaking-picker { border-radius: 15px; }
  .topic-download { gap: 12px; }
  .topic-guide { gap: 0 12px; }
}
