:root {
  color-scheme: light;
  --page: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5fa;
  --ink: #14243a;
  --muted: #52657d;
  --line: #dce5ef;
  --blue: #165fae;
  --blue-strong: #0e4e96;
  --blue-soft: #e8f1ff;
  --focus: #2b7fff;
  --shadow: 0 24px 60px rgba(18, 43, 76, .07);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #071522;
  --surface: #102336;
  --surface-soft: #172e45;
  --ink: #f4f8fc;
  --muted: #b8c9dc;
  --line: #2b455d;
  --blue: #79b2ff;
  --blue-strong: #a1caff;
  --blue-soft: #193858;
  --focus: #91c3ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 10; padding: 10px 14px; background: var(--surface); color: var(--ink); border: 2px solid var(--focus); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 19px; min-width: 0; }
.brand-logo { display: block; width: 170px; line-height: 0; flex: none; }
.brand-logo img { display: block; width: 100%; height: auto; aspect-ratio: 600.44 / 166.17; }
.brand-logo .logo-dark { display: none; }
[data-theme="dark"] .brand-logo .logo-dark { display: block; }
[data-theme="dark"] .brand-logo .logo-light { display: none; }
.brand-divider { height: 31px; width: 1px; background: var(--line); flex: none; }
.brand-product { font-size: 22px; line-height: 1; font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex: none; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle-icon { color: var(--blue); font-size: 18px; line-height: 1; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: clamp(34px, 7vw, 96px); align-items: end; padding-block: clamp(62px, 8vw, 112px) clamp(68px, 8vw, 105px); }
.eyebrow, .section-kicker { margin: 0 0 25px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.eyebrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.eyebrow-rule { width: 28px; height: 1px; background: var(--line); }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.045em; }
.hero h1 { margin-bottom: 25px; font-size: clamp(42px, 5.7vw, 72px); font-weight: 750; }
.hero h1 span { color: var(--blue); }
.hero-description { max-width: 645px; margin: 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.7; }
.hero-note { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 24px; border-top: 2px solid var(--blue); border-bottom: 1px solid var(--line); }
.hero-note-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.hero-note-number { margin-block: auto; color: var(--blue); font-size: 76px; line-height: 1.4; letter-spacing: -.09em; font-weight: 650; }
.hero-note p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.episode-section { padding: clamp(28px, 5vw, 58px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.section-intro { max-width: 840px; }
.section-kicker { margin-bottom: 14px; }
.section-intro h2, .section-heading h2 { margin-bottom: 10px; font-size: clamp(29px, 3.3vw, 42px); }
.episode-subtitle { margin: 0; color: var(--blue); font-size: clamp(16px, 1.7vw, 19px); font-weight: 650; }
.episode-description { max-width: 790px; margin: 21px 0 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.episode-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 38px 0 32px; padding-block: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.episode-facts > div { min-width: 0; padding-inline: 23px; border-right: 1px solid var(--line); }
.episode-facts > div:first-child { padding-left: 0; }
.episode-facts > div:last-child { border-right: 0; }
.episode-facts dt { color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.episode-facts dd { margin: 5px 0 0; font-size: 17px; font-weight: 750; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.download-card { display: flex; flex-direction: column; min-width: 0; min-height: 264px; padding: 25px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.download-card-primary { border-color: var(--blue); background: var(--blue-soft); }
.format-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.format-icon { display: inline-grid; place-items: center; width: 47px; height: 39px; border-radius: 7px; color: var(--blue); background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.format-badge { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-align: right; }
.format-badge-subtle { color: var(--muted); }
.download-card h3 { margin: 19px 0 7px; font-size: 22px; }
.download-card p { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.download-button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; margin-top: auto; padding: 12px 15px; border-radius: 8px; font-size: 14px; font-weight: 750; text-decoration: none; }
.download-button span:last-child { font-size: 22px; line-height: 1; }
.download-button-primary { color: #fff; background: #165fae; }
.download-button-primary:hover { background: #0e4e96; }
.download-button-secondary { color: var(--ink); border: 1px solid var(--line); background: var(--surface-soft); }
.download-button-secondary:hover { border-color: var(--blue); color: var(--blue-strong); }
.file-detail { margin-top: 10px; color: var(--muted); font-size: 12px; }

.chapters-section, .listen-section { padding-top: clamp(70px, 8vw, 108px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 0; }
.section-aside { margin: 0 0 5px; color: var(--muted); font-size: 14px; text-align: right; }
.chapter-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.chapter-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 16px 24px; cursor: pointer; font-size: 15px; font-weight: 750; list-style: none; }
.chapter-panel summary::-webkit-details-marker { display: none; }
.summary-action { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chapter-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.chapter-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: baseline; gap: 15px; padding: 15px 24px; border-bottom: 1px solid var(--line); }
.chapter-list li:last-child { border-bottom: 0; }
.chapter-number { color: var(--blue); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chapter-title { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.chapter-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.listen-section { padding-bottom: clamp(75px, 8vw, 110px); }
.listen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.listen-card { padding: 27px 29px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.listen-card h3 { margin-bottom: 17px; font-size: 21px; }
.listen-card ol { margin: 0; padding-left: 21px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.listen-card li { padding-left: 6px; margin-top: 7px; }
.listen-card li::marker { color: var(--blue); font-weight: 800; }
.format-fallback { margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 15px; padding-block: 22px; color: var(--muted); font-size: 12px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 68px 64px; }
  .hero-note { display: none; }
  .episode-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 17px; }
  .episode-facts > div:nth-child(2) { border-right: 0; }
  .episode-facts > div:nth-child(3) { padding-left: 0; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 32px, 1120px); }
  .header-inner { min-height: 76px; gap: 12px; }
  .brand { gap: 10px; }
  .brand-logo { width: 126px; }
  .brand-divider { height: 24px; }
  .brand-product { font-size: 19px; }
  .theme-toggle { min-width: 40px; padding: 8px 10px; }
  .theme-toggle-label { display: none; }
  .hero { padding-block: 65px 58px; }
  .hero h1 { font-size: clamp(38px, 9vw, 53px); }
  .episode-section { padding: 24px 19px; border-radius: 16px; }
  .episode-facts { margin-block: 26px 23px; }
  .episode-facts > div { padding-inline: 13px; }
  .episode-facts dd { font-size: 15px; }
  .download-grid, .listen-grid { grid-template-columns: minmax(0, 1fr); }
  .download-card { min-height: 248px; padding: 20px; }
  .section-heading { display: block; }
  .section-aside { text-align: left; margin: 12px 0 0; }
  .chapter-panel summary { padding-inline: 16px; }
  .chapter-list li { grid-template-columns: 25px minmax(0, 1fr); gap: 4px 9px; padding: 14px 16px; }
  .chapter-time { grid-column: 2; }
  .listen-card { padding: 23px; }
}
@media (max-width: 380px) {
  .brand-logo { width: 105px; }
  .brand-product { font-size: 17px; }
  .brand-divider { height: 20px; }
  .container { width: calc(100% - 28px); }
}
