:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #566579;
  --paper: #f7fafc;
  --panel: #ffffff;
  --line: #d8e0ea;
  --teal: #116f72;
  --blue: #2f5faa;
  --amber: #b56c1f;
  --rose: #b84263;
  --soft-teal: #e4f5f3;
  --soft-blue: #eaf1ff;
  --soft-amber: #fff3df;
  --soft-rose: #fff0f4;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f5f9fc 0%, #ffffff 42%, #f7f4ef 100%);
  color: var(--ink);
  line-height: 1.75;
}

a {
  color: inherit;
}

.speaker-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.speaker-hero {
  display: grid;
  gap: 24px;
  min-height: 58vh;
  align-content: center;
  padding: 26px 0 32px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.lead {
  max-width: 780px;
  color: #34465f;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  max-width: 620px;
}

.hero-link,
.related-grid a {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hero-link {
  padding: 15px 18px;
  font-weight: 800;
}

.hero-link.primary {
  border-color: rgba(17, 111, 114, .45);
  background: var(--teal);
  color: #fff;
}

.hero-link:hover,
.related-grid a:hover {
  border-color: rgba(17, 111, 114, .5);
  box-shadow: 0 12px 26px rgba(24, 32, 51, .1);
  transform: translateY(-2px);
}

.tool-panel,
.info-card,
.comments-note,
.volume-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
}

.tool-panel {
  padding: 22px;
}

.section-head {
  max-width: 780px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.22;
}

.section-head p {
  color: var(--muted);
}

.support-alert {
  margin-bottom: 16px;
  border: 1px solid rgba(47, 95, 170, .35);
  border-radius: 8px;
  background: var(--soft-blue);
  padding: 12px 14px;
  color: #244372;
  font-weight: 700;
}

.support-alert.is-error {
  border-color: rgba(184, 66, 99, .35);
  background: var(--soft-rose);
  color: #74213b;
}

.volume-panel {
  margin-bottom: 18px;
  padding: 16px;
}

.volume-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 800;
}

.volume-panel input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.volume-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .94rem;
}

.channel-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.channel-card {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.channel-card span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.channel-card strong {
  display: block;
  font-size: clamp(1.3rem, 4vw, 2rem);
}

.channel-card.is-active {
  border-color: rgba(17, 111, 114, .55);
  background: var(--soft-teal);
  transform: translateY(-2px);
}

.channel-card.center.is-active {
  border-color: rgba(181, 108, 31, .5);
  background: var(--soft-amber);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sound-button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sound-button:hover {
  filter: brightness(1.05);
}

.sound-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.sound-button.stop {
  background: var(--rose);
}

.status-message {
  min-height: 1.8em;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.info-grid,
.related-grid {
  display: grid;
  gap: 16px;
}

.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.info-card,
.comments-note {
  padding: 18px;
}

.info-card h2 {
  font-size: 1.25rem;
}

.info-card li + li {
  margin-top: 6px;
}

.related-section {
  margin-top: 32px;
}

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

.related-grid a {
  padding: 16px;
}

.related-grid strong {
  display: block;
}

.related-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .92rem;
}

.comments-note {
  margin-top: 28px;
  background: var(--soft-amber);
  color: #5d3d16;
}

.comments-note p {
  margin: 0;
}

.comments-wrap {
  margin-top: 28px;
}

.site-return-link {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  text-align: center;
}

.site-return-link span {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.site-return-link a {
  color: var(--blue);
  font-weight: 800;
}

footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

@media (max-width: 860px) {
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .speaker-page {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .speaker-hero {
    min-height: auto;
    padding: 18px 0 26px;
  }

  .hero-actions,
  .channel-stage,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .tool-panel {
    padding: 16px;
  }

  .channel-card {
    min-height: 86px;
  }
}
