/* Editorial design tokens */
:root {
  --ctfn-paper: #fbfaf7;
  --ctfn-ink: #121316;
  --ctfn-ink-muted: rgba(18, 19, 22, 0.72);

  --ctfn-accent: #0d9488;
  --ctfn-accent-ink: #ffffff;

  --ctfn-border: rgba(18, 19, 22, 0.12);
  --ctfn-surface: rgba(255, 255, 255, 0.72);

  --ctfn-radius: 16px;

  --ctfn-font-sans: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif;
  --ctfn-font-serif: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif;
}

body {
  font-family: var(--ctfn-font-sans);
  background-color: var(--ctfn-paper);
  background-image:
    linear-gradient(to right, rgba(18, 19, 22, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 19, 22, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: -1px -1px;
  color: var(--ctfn-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ctfn-font-serif);
  font-weight: 560;
  letter-spacing: -0.01em;
}

.ctfn-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* color: var(--ctfn-ink-muted); */
}

.ctfn-kicker-brand {
  display: inline-block;
  color: var(--ctfn-ink-muted);
  text-decoration: none;
  text-decoration-color: transparent;
  -webkit-transition: color 140ms ease, text-decoration-color 140ms ease;
  transition: color 140ms ease, text-decoration-color 140ms ease;
  position: relative;
}

.ctfn-kicker-brand::after {
  content: "";
  position: absolute;
  bottom: -0.12em;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--ctfn-accent);
  -webkit-transition: width 140ms ease;
  transition: width 140ms ease;
}

.ctfn-kicker-brand:hover {
  color: var(--ctfn-accent);
  text-decoration-color: transparent;
}

.ctfn-kicker-brand:hover::after {
  width: 100%;
}

.ctfn-title {
  line-height: 1.02;
}

.ctfn-tagline {
  /* max-width: 48ch; */
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ctfn-ink-muted);
}

@media (min-width: 768px) {
  .ctfn-tagline {
    max-width: none;
    white-space: nowrap;
  }
}

.ctfn-section-title {
  font-size: 1.35rem;
  line-height: 1.2;
}

.ctfn-section-meta {
  font-size: 0.95rem;
  color: var(--ctfn-ink-muted);
}

/* Button */
.btn-ctfn {
  --bs-btn-font-weight: 650;
  --bs-btn-color: var(--ctfn-accent-ink);
  --bs-btn-bg: var(--ctfn-accent);
  --bs-btn-border-color: var(--ctfn-accent);

  --bs-btn-hover-color: var(--ctfn-accent-ink);
  --bs-btn-hover-bg: #0f766e;
  --bs-btn-hover-border-color: #0f766e;

  --bs-btn-active-color: var(--ctfn-accent-ink);
  --bs-btn-active-bg: #115e59;
  --bs-btn-active-border-color: #115e59;

  --bs-btn-focus-shadow-rgb: 13, 148, 136;

  border-radius: calc(var(--ctfn-radius) - 4px);
  -webkit-box-shadow: 0 8px 22px rgba(18, 19, 22, 0.12);
          box-shadow: 0 8px 22px rgba(18, 19, 22, 0.12);
  -webkit-transition: -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease, -webkit-filter 140ms ease;
  transition: -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease, -webkit-filter 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease, -webkit-filter 140ms ease;
}

.btn-ctfn:hover {
  -webkit-transform: translateY(-1px);
          transform: translateY(-1px);
  -webkit-box-shadow: 0 12px 28px rgba(18, 19, 22, 0.16);
          box-shadow: 0 12px 28px rgba(18, 19, 22, 0.16);
}

.btn-ctfn:active {
  -webkit-transform: translateY(0);
          transform: translateY(0);
  -webkit-box-shadow: 0 8px 22px rgba(18, 19, 22, 0.12);
          box-shadow: 0 8px 22px rgba(18, 19, 22, 0.12);
}

/* Hero CTA sizing */
.ctfn-cta__button {
  width: 100% !important;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

/* Subscribe buttons */
.ctfn-subscribe__label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ctfn-ink-muted);
}

.ctfn-subscribe__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--ctfn-accent);
  color: var(--ctfn-accent-ink);
  text-decoration: none;
  -webkit-box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
          box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  -webkit-transition: background-color 140ms ease, -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease;
  transition: background-color 140ms ease, -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease;
}

.ctfn-subscribe__btn:hover {
  -webkit-transform: translateY(-2px) scale(1.05);
          transform: translateY(-2px) scale(1.05);
  -webkit-box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
          box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
  background-color: #0f766e;
  color: var(--ctfn-accent-ink);
}

.ctfn-subscribe__btn:active {
  -webkit-transform: translateY(0) scale(0.98);
          transform: translateY(0) scale(0.98);
  -webkit-box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
          box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.ctfn-subscribe__btn:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.6);
  outline-offset: 3px;
}

.ctfn-subscribe__icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

footer {
  font-size: 0.85rem;
}

footer.ctfn-footer {
  border-top: 1px solid var(--ctfn-border);
  color: var(--ctfn-ink-muted);
}

footer.ctfn-footer a {
  color: inherit;
  text-decoration-color: rgba(18, 19, 22, 0.22);
}

footer.ctfn-footer a:hover {
  color: var(--ctfn-ink);
  text-decoration-color: rgba(18, 19, 22, 0.45);
}

footer.ctfn-footer .ctfn-cc-icon {
  max-width: 1em;
  max-height: 1em;
  margin-left: 0.2em;
  vertical-align: -0.12em;
}

.ctfn-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  stroke: currentColor;
}

/* Links + focus */
a {
  color: var(--ctfn-accent);
  text-decoration-color: rgba(13, 148, 136, 0.35);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-color: rgba(13, 148, 136, 0.7);
}

:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.6);
  outline-offset: 3px;
}

/* Episodes */
.ctfn-episode-list {
  display: -ms-grid;
  display: grid;
  gap: 10px;
}

.ctfn-episode__link {
  display: block;
  position: relative;
  padding: 28px 44px 12px 22px;
  border: 1px solid rgba(18, 19, 22, 0.14);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.85);
  color: inherit;
  text-decoration: none;
  -webkit-box-shadow:
    0 1px 0 rgba(18, 19, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(18, 19, 22, 0.06);
          box-shadow:
    0 1px 0 rgba(18, 19, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(18, 19, 22, 0.06);
  -webkit-transition: background-color 140ms ease, border-color 140ms ease, -webkit-box-shadow 140ms ease;
  transition: background-color 140ms ease, border-color 140ms ease, -webkit-box-shadow 140ms ease;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, -webkit-box-shadow 140ms ease;
}

.ctfn-episode__link::before {
  /* notebook margin line */
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: rgba(220, 38, 38, 0.28);
  pointer-events: none;
}

.ctfn-episode__link:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.6);
  outline-offset: 3px;
}

.ctfn-episode__link:hover {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(18, 19, 22, 0.22);
  -webkit-box-shadow:
    0 2px 0 rgba(18, 19, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px 0 rgba(18, 19, 22, 0.07);
          box-shadow:
    0 2px 0 rgba(18, 19, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px 0 rgba(18, 19, 22, 0.07);
}

.ctfn-episode__annotation {
  position: absolute;
  left: 22px;
  top: 10px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: rgba(18, 19, 22, 0.58);
  white-space: nowrap;
  font-family: 'Segoe Print', 'Bradley Hand', "Marker Felt", Chilanka, casual, cursive;
  -webkit-transform: rotate(-0.6deg);
          transform: rotate(-0.6deg);

  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.ctfn-episode__affordance {
  right: 14px;
  color: rgba(18, 19, 22, 0.42);
  -webkit-transition: color 140ms ease, -webkit-transform 140ms ease;
  transition: color 140ms ease, -webkit-transform 140ms ease;
  transition: transform 140ms ease, color 140ms ease;
  transition: transform 140ms ease, color 140ms ease, -webkit-transform 140ms ease;
  pointer-events: none;
}

.ctfn-episode__arrow {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.ctfn-episode__link:hover .ctfn-episode__affordance {
  -webkit-transform: translateY(-50%) translateX(2px);
          transform: translateY(-50%) translateX(2px);
  color: rgba(18, 19, 22, 0.6);
}

.ctfn-episode__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ctfn-episode__meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ctfn-ink-muted);
  font-variant-numeric: tabular-nums;
}

.ctfn-episode__summary {
  margin: 8px 0 0;
  color: var(--ctfn-ink-muted);
  line-height: 1.45;
}

/* Show notes container with plain background */
.ctfn-show-notes {
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(18, 19, 22, 0.14);
  border-radius: 10px;
  padding: 24px;
  margin-top: 24px;
  -webkit-box-shadow:
    0 1px 0 rgba(18, 19, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(18, 19, 22, 0.06);
          box-shadow:
    0 1px 0 rgba(18, 19, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(18, 19, 22, 0.06);
}

/* Audio player */
.ctfn-audio-player {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.ctfn-audio-player__container {
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(18, 19, 22, 0.14);
  border-radius: calc(var(--ctfn-radius) - 4px);
  padding: 16px 20px;
  -webkit-box-shadow:
    0 1px 0 rgba(18, 19, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(18, 19, 22, 0.06);
          box-shadow:
    0 1px 0 rgba(18, 19, 22, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(18, 19, 22, 0.06);
  -webkit-transition: border-color 140ms ease, -webkit-box-shadow 140ms ease;
  transition: border-color 140ms ease, -webkit-box-shadow 140ms ease;
  transition: box-shadow 140ms ease, border-color 140ms ease;
  transition: box-shadow 140ms ease, border-color 140ms ease, -webkit-box-shadow 140ms ease;
}

.ctfn-audio-player__container:hover {
  border-color: rgba(18, 19, 22, 0.22);
  -webkit-box-shadow:
    0 2px 0 rgba(18, 19, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px 0 rgba(18, 19, 22, 0.07);
          box-shadow:
    0 2px 0 rgba(18, 19, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px 0 rgba(18, 19, 22, 0.07);
}

.ctfn-audio-player__play-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 50%;
  -webkit-box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
          box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.ctfn-audio-player__play-btn:hover {
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
  -webkit-box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
          box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.ctfn-audio-player__play-btn:active {
  -webkit-transform: scale(0.98);
          transform: scale(0.98);
}

.ctfn-audio-player__play-icon,
.ctfn-audio-player__pause-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.ctfn-audio-player__controls {
  min-width: 0;
}

.ctfn-audio-player__progress-wrapper {
  height: 6px;
  cursor: pointer;
}

.ctfn-audio-player__progress-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgba(18, 19, 22, 0.12);
  border-radius: 1px;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}

.ctfn-audio-player__progress-bar {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background-color: var(--ctfn-accent);
  border-radius: 1px;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  -webkit-transition: width 100ms linear;
  transition: width 100ms linear;
  width: 0%;
}

.ctfn-audio-player__progress-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
}

.ctfn-audio-player__progress-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ctfn-accent);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.95);
  -webkit-box-shadow: 0 2px 4px rgba(18, 19, 22, 0.2);
          box-shadow: 0 2px 4px rgba(18, 19, 22, 0.2);
  -webkit-transition: -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease;
  transition: -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease, -webkit-transform 140ms ease, -webkit-box-shadow 140ms ease;
}

.ctfn-audio-player__progress-input::-webkit-slider-thumb:hover {
  -webkit-transform: scale(1.2);
          transform: scale(1.2);
  -webkit-box-shadow: 0 3px 6px rgba(18, 19, 22, 0.3);
          box-shadow: 0 3px 6px rgba(18, 19, 22, 0.3);
}

.ctfn-audio-player__progress-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ctfn-accent);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(18, 19, 22, 0.2);
  -moz-transition: transform 140ms ease, box-shadow 140ms ease;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.ctfn-audio-player__progress-input::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 6px rgba(18, 19, 22, 0.3);
}

.ctfn-audio-player__time {
  flex-shrink: 0;
  min-width: 4.5rem;
  font-size: 0.875rem;
  color: var(--ctfn-ink-muted);
  font-variant-numeric: tabular-nums;
}

.ctfn-audio-player__placeholder {
  color: var(--ctfn-ink-muted);
  font-size: 0.9rem;
}