/* ============================================================
   podcast.css - "Listen on" surfaces (site v1.15)

   Build target: docs/design/2026-07-30-podcast-listen-on/direction-chosen.html
   Direction B - "Console Telemetry Row".

   Loaded by BOTH site/index.html and scripts/episode-template.html.
   Every color derives from tokens.css; the two literals below are the
   designer final-pass accessibility corrections and are scoped here
   rather than pushed into the shared token set.
   ============================================================ */

:root {
  /* AA-passing text tint on --surface / --bg. The shared --muted (#6E6A7A)
     stays reserved for icon fills, which only need the 3:1 non-text ratio. */
  --muted-text: #96919F;
  /* --violet lightened to clear AA as a text color; the ring keeps brand violet. */
  --violet-text: #A78BFA;
}

/* ---------- Homepage strip ---------- */

.listen-strip {
  padding: 3.6rem 2rem 3rem;
  border-top: 1px solid var(--border);
}
.listen-inner {
  max-width: 640px;
  margin: 0 auto;
}
.listen-kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin: 0 0 .85rem;
  text-align: center;
}
.listen-rule {
  height: 1px;
  background: var(--border);
  margin: 0 0 2rem;
}

/* telemetry card */
.telemetry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
}
.tel-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tel-row > details { width: 100%; }

.tel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1.4rem .5rem;
  text-decoration: none;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.tel-col::-webkit-details-marker { display: none; }
.tel-col--divider { border-left: 1px solid var(--border); }

.tel-glyph {
  width: 24px;
  height: 24px;
  color: var(--muted);
  transition: color .15s ease;
}
.tel-label {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-text);
  transition: color .15s ease;
}

/* Ember is a hover/active signal only - never a default-state accent. */
.tel-col:hover .tel-glyph,
.tel-col:focus-visible .tel-glyph { color: var(--white); }
.tel-col:hover .tel-label,
.tel-col:focus-visible .tel-label {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tel-col:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.tel-plus {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(139, 92, 246, .8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--violet-text);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.tel-col:hover .tel-plus,
.tel-col:focus-visible .tel-plus,
.tel-more[open] .tel-plus {
  border-color: var(--violet);
  background: rgba(139, 92, 246, .12);
}

/* ---------- Disclosure manifest (shared by both surfaces) ---------- */

.manifest-line {
  border-top: 1px solid var(--border);
  padding: 1rem 1.4rem 1.15rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .03em;
  color: var(--muted-text);
  line-height: 1.9;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  row-gap: .2rem;
}

.manifest-line a,
.ep-manifest a {
  color: var(--muted-text);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.manifest-line a:hover,
.manifest-line a:focus-visible,
.ep-manifest a:hover,
.ep-manifest a:focus-visible {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.manifest-line a:focus-visible,
.ep-manifest a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.manifest-dot {
  color: rgba(240, 235, 227, .28);
  padding: 0 .5rem;
}

/* ---------- Footer echo (icon-only, subordinate) ---------- */

.footer-listen {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding-left: 1.2rem;
  border-left: 1px solid var(--border);
}
.footer-listen a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
}
.footer-listen svg {
  width: 18px;
  height: 18px;
  transition: color .15s ease;
}
.footer-listen a:hover svg,
.footer-listen a:focus-visible svg { color: var(--white); }
.footer-listen a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Episode-page action row ---------- */

.ep-divider {
  width: 1px;
  align-self: stretch;
  min-height: 28px;
  background: var(--border);
}

.ep-glyph-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  padding: .6rem;
  min-width: 44px;
  min-height: 44px;
}
.ep-glyph-link::-webkit-details-marker { display: none; }
.ep-glyph-link svg {
  width: 24px;
  height: 24px;
  transition: color .15s ease;
}
.ep-glyph-link:hover svg,
.ep-glyph-link:focus-visible svg { color: var(--white); }
.ep-glyph-link:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.ep-plus {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(139, 92, 246, .8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--violet-text);
  transition: border-color .15s ease, background .15s ease;
}
.ep-glyph-link:hover .ep-plus,
.ep-glyph-link:focus-visible .ep-plus,
.ep-more[open] .ep-plus {
  border-color: var(--violet);
  background: rgba(139, 92, 246, .12);
}

.ep-manifest {
  width: 100%;
  margin-top: .6rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--muted-text);
  letter-spacing: .03em;
  line-height: 1.9;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

/* ---------- Disclosure reveal ----------

   Both manifests sit OUTSIDE their <details> so they can span the full width
   instead of being trapped in one grid column / inline flex item, so the
   reveal is a :has() sibling toggle rather than native <details> flow.

   Default state in the base rules above is VISIBLE, so a browser without
   :has() degrades to showing all eight platforms rather than hiding five
   behind a control it cannot open.

   This block MUST stay BELOW the .manifest-line and .ep-manifest base rules.
   It has the same specificity as they do, so it only wins on source order -
   placing it above .ep-manifest silently let that later base rule re-show the
   episode manifest with all five tail platforms already expanded. */
@supports selector(:has(*)) {
  .manifest-line { display: none; }
  .telemetry:has(.tel-more[open]) .manifest-line { display: flex; }
  .ep-manifest { display: none; }
  .ep-hero:has(.ep-more[open]) .ep-manifest { display: flex; }
}

/* ---------- Narrow viewports ---------- */

@media (max-width: 480px) {
  .tel-label { font-size: .58rem; letter-spacing: .06em; }
  .tel-col { padding: 1.1rem .25rem; }
  .tel-glyph { width: 20px; height: 20px; }
  .footer-listen {
    padding-left: 0;
    border-left: none;
    padding-top: .4rem;
    border-top: 1px solid var(--border);
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tel-glyph,
  .tel-label,
  .tel-plus,
  .ep-plus,
  .footer-listen svg,
  .ep-glyph-link svg { transition: none; }
}
