/* Narrative Studio - download site. Palette, wordmark and surfaces lifted from the app
   (studio/studio.css) so the site and program read as one product. */

@font-face {
  font-family: 'Josefin Sans';
  font-weight: 400; font-display: swap;
  src: url('assets/fonts/JosefinSans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-weight: 600; font-display: swap;
  src: url('assets/fonts/JosefinSans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-weight: 700; font-display: swap;
  src: url('assets/fonts/JosefinSans-700.woff2') format('woff2');
}

:root {
  --bg: #131316;
  --panel: #1b1b1f;
  --panel-2: #232328;
  --line: #34343c;
  --text: #ececef;
  --muted: #9596a0;
  --accent: #d62839;       /* stark red */
  --accent-2: #5fa777;     /* muted green */
  --danger: #ff5470;
  --dialogue: #d49aa2;
  --pearl: linear-gradient(135deg, #fafbff 0%, #ece6f2 30%, #f4eef1 55%, #e7edf5 80%, #f6f4f8 100%);
  --ink: #1a1a1f;
  --radius: 8px;

  --scrollbar-size: 10px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: #3a3a44;
  --scrollbar-thumb-hover: #4c4c58;
}

* { box-sizing: border-box; }

/* -- standard app scrollbar -- */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }

html {
  scroll-behavior: smooth;
  /* in-page anchors (#download etc.) land clear of the sticky bar */
  scroll-padding-top: 4.5rem;
  /* stop iOS Safari inflating text in landscape */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* -- top bar (mirrors the app's studio-bar) -- */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 1.75rem;
  background: rgba(15, 15, 18, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: 'Josefin Sans', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700; letter-spacing: 0.18em; font-size: 21px; text-decoration: none;
}
.logo .brand-mark { height: 1.7em; width: auto; display: block; }
.bar .logo > span { position: relative; top: 0.08em; }
.logo .lg-audio { color: var(--text); }
.logo .lg-hook { color: var(--accent); }
.bar-nav { display: flex; align-items: center; gap: 1.4rem; }
.bar-nav a { color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: 0.02em; }
.bar-nav a:hover { color: var(--text); }
.bar-nav a[aria-current="page"] { color: var(--text); }
.bar-nav a.bar-download {
  color: #fff; background: var(--accent); border: 1px solid var(--accent);
  padding: 0.4rem 0.95rem; border-radius: 6px; font-weight: 600;
}
.bar-nav a.bar-download:hover { background: #b91f2e; border-color: #b91f2e; color: #fff; }

/* hamburger: hidden on desktop, replaces the inline nav on phones */
.nav-toggle {
  display: none; flex: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 16px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform .18s ease, opacity .18s ease;
}
.bar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.bar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 640px) {
  .bar { padding: 0.65rem 1.1rem; }
  .bar .logo { font-size: 16px; letter-spacing: 0.12em; }
  .nav-toggle { display: flex; }
  /* the nav becomes a dropdown sheet hanging off the sticky bar */
  .bar-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.4rem 0 1rem;
    /* solid, not frosted: translucent sheets over the masked hero photo hit a
       Chromium compositing quirk that lets the headline ghost through */
    background: #0f0f12;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  }
  .bar.nav-open .bar-nav { display: flex; }
  .bar-nav a { padding: 0.8rem 1.4rem; font-size: 15px; }
  .bar-nav a[aria-current="page"] { color: var(--accent); }
  .bar-nav a.bar-download {
    display: flex; justify-content: center;
    margin: 0.5rem 1.4rem 0; padding: 0.7rem 1rem;
  }
}

/* -- hero -- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
/* Plain dark-grey gradient: a soft glow up where the headline sits, settling
   into the page background at the bottom so the section blends into the rest. */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(110% 120% at 28% 0%, #1a1a1e 0%, #161619 45%, rgba(19,19,22,0) 100%),
    linear-gradient(to bottom, #171719 0%, #141416 55%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 5.5rem; padding-bottom: 5.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.hero-kicker {
  display: inline-block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 999px; padding: 0.3rem 0.85rem; margin-bottom: 1.4rem;
}
.hero h1 {
  margin: 0 0 1rem; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.16;
  letter-spacing: -0.015em; font-weight: 700; padding-bottom: 0.08em;
  background: var(--pearl); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: 1.2rem; color: var(--text); margin: 0 0 1.1rem; max-width: 40ch; }
.hero-sub { color: var(--muted); margin: 0 0 2rem; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; }

/* Hero photo: bleeds the full height of the hero on the right, fading out
   along its left edge so it melts into the splash texture instead of sitting
   on it as a hard-edged card. Layered above the ::before texture (later in
   paint order) but under the content (.wrap is z-index 1). The hero-grid's
   empty right column is what keeps the copy clear of it. */
.hero .hero-photo {
  position: absolute; top: 0; right: 0; z-index: 0;
  height: 100%; width: min(46%, 760px);
  object-fit: cover; object-position: right center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 55%);
  mask-image: linear-gradient(to right, transparent 0, #000 55%);
}
/* Single-column layout: the copy spans the full width, so a backdrop photo
   would sit right behind the text - drop it. */
@media (max-width: 860px) { .hero .hero-photo { display: none; } }

/* Home hero: the extended studio shot as a full-bleed background instead of a
   right-hand card, so more of the image is on show. A wide, gradual fade darkens
   the left behind the copy and eases all the way across to reveal the narrator
   on the right - the dark part stays tight to the left edge, the fade is long. */
.hero.home-hero .hero-photo {
  top: 0; right: 0; width: 100%; height: 100%;
  object-position: right center;
  -webkit-mask-image: none; mask-image: none;   /* full image, no edge mask */
}
.hero.home-hero::before {
  z-index: 1;   /* the fade sits ON TOP of the photo, under the copy (wrap z-1) */
  background: linear-gradient(to right,
    rgba(8,8,10,0.97) 0%,
    rgba(9,9,12,0.95) 12%,
    rgba(11,11,14,0.82) 34%,
    rgba(14,14,17,0.5) 55%,
    rgba(17,17,20,0.2) 74%,
    rgba(19,19,22,0) 90%);
}
.hero.home-hero .wrap { padding-top: 8rem; padding-bottom: 8rem; }
/* Narrow screens: text spans full width, so darken the whole frame evenly
   (a left-only fade would leave right-side text over the bright image). */
@media (max-width: 860px) {
  .hero.home-hero .hero-photo { display: block; }
  .hero.home-hero::before { background: linear-gradient(rgba(0,0,0,0.72), rgba(0,0,0,0.72)); }
}

/* -- buttons (mirrors app .bar-btn) -- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 10px; padding: 0.8rem 1.5rem; font-size: 0.98rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07); color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.btn:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #b91f2e; border-color: #b91f2e; }
.btn.ghost { background: rgba(255,255,255,0.04); }
/* "Coming soon" state: reads as the primary button, does nothing. */
.btn.soon { opacity: 0.65; pointer-events: none; cursor: default; }
.btn .sz { font-size: 0.78rem; font-weight: 400; color: rgba(255,255,255,0.72); }
.btn.ghost .sz, .btn:not(.primary) .sz { color: var(--muted); }

/* Workflow hero: the studio-desk photo under the same black tint as the
   features section, replacing the base hero's plain gradient. */
.hero.wf-hero::before {
  background:
    linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
    url('assets/images/ah_image2.jpg') center 30% / cover no-repeat;
}
/* Taller than the base hero so more of the studio photo shows. */
.hero.wf-hero .wrap { padding-top: 9rem; padding-bottom: 9rem; }

/* Speech-to-speech hero: the podcast-table community photo under the same
   black tint, matching the workflow hero's treatment and taller frame. */
.hero.sts-photo-hero::before {
  background:
    linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
    url('assets/images/ah_image4.jpg') center 42% / cover no-repeat;
}
.hero.sts-photo-hero .wrap { padding-top: 9rem; padding-bottom: 9rem; }

/* -- speech-to-speech hero (centred, no art column) -- */
.sts-hero { max-width: none; margin: 0 auto; text-align: center; }
.sts-hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.sts-hero .hero-lede { max-width: 60ch; margin-left: auto; margin-right: auto; font-size: 1.35rem; }
.sts-hero .hero-sub { max-width: 60ch; margin-left: auto; margin-right: auto; }
.sts-hero .hero-sub {
  font-weight: 600; color: var(--text); font-size: 1.15rem;
}

/* -- TTS vs STS compare -- */
#why-sts .wrap { max-width: 1260px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.compare-col { padding: 1.6rem 1.6rem; }
.compare-col.dim { opacity: 0.72; }
.compare-col p { margin: 0; color: var(--muted); font-size: 1rem; }
.compare-tag {
  font-family: 'Josefin Sans', system-ui, sans-serif; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem;
  color: var(--muted); margin-bottom: 0.7rem;
}
.compare-tag.accent { color: var(--accent); }

/* -- generic section -- */
.section { padding: 4.5rem 0; }
.section:nth-of-type(even) { background: #0f0f12; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* Section intros span the full content width (no 60ch cap). */
.section-head { max-width: none; margin-bottom: 2.6rem; }
.section-head h2 { margin: 0 0 0.6rem; font-size: 2rem; letter-spacing: -0.01em; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* Features: acoustic-foam artwork under a very dark tint, so the cards float
   on a hint of red-and-black texture rather than a flat panel. The z-index
   dance keeps the image above the section's own background, below content. */
#features {
  position: relative; overflow: hidden; z-index: 0;
}
#features::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
    url('assets/images/narrativestudio_bg1.jpg') center / cover no-repeat;
}
/* -- liquid glass: the shared frosted surface for every card across the site.
   Kept GPU-cheap: ONE static backdrop-filter per pane (never transitioned),
   gradients for the sheen, and transform-only hovers. -- */
.card, .listen-card, .compare-col, .os-reason {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.06) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
/* specular highlight raking across the top-left, like light on curved glass */
.card::before, .listen-card::before, .compare-col::before, .os-reason::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130% 65% at 14% 0%, rgba(255,255,255,0.11), transparent 60%);
}
.card:hover, .listen-card:hover, .os-reason:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 14px 36px rgba(0,0,0,0.42), 0 0 26px rgba(214,40,57,0.14), inset 0 1px 0 rgba(255,255,255,0.18);
}
/* no backdrop-filter support -> fall back to solid tinted panes */
@supports not (backdrop-filter: blur(1px)) {
  .card, .listen-card, .compare-col, .os-reason { background: rgba(32,32,38,0.88); }
  .btn:not(.primary) { background: var(--panel-2); }
}
/* frosted icon tile, shared by feature badges and STS reason icons */
/* -- feature cards -- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.card {
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.5rem 1.5rem;
}
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* -- workflow steps -- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; counter-reset: step; }
.step {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.4rem 1.4rem 1.4rem; counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-weight: 700;
  font-size: 1.4rem; color: var(--accent); letter-spacing: 0.05em;
  display: block; margin-bottom: 0.5rem;
}
.step h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* -- open source -- */
/* Homepage: just the story, full width. The STS page reuses .os-grid WITH an
   .os-why column of reason cards, so the two-column layout stays defined and
   a lone story simply spans both columns. */
.os-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }
.os-grid > .os-story:only-child { grid-column: 1 / -1; }
@media (max-width: 860px) { .os-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
/* The library photo sits behind the whole story section, under the same black
   tint as the features/workflow backdrops, so every photo reads the same way. */
#open-source {
  position: relative; overflow: hidden; z-index: 0;
}
#open-source::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.9)),
    url('assets/images/ah_image3.jpg') center / cover no-repeat;
}
.os-story h2 { margin: 0 0 1rem; font-size: 2rem; letter-spacing: -0.01em; }
.os-story p { margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; }
.os-signoff {
  font-weight: 600; color: var(--text) !important; font-size: 0.95rem !important;
}
/* reason cards (STS page) - glass surface comes from the shared rule above */
.os-why { display: flex; flex-direction: column; gap: 1rem; }
.os-reason { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.3rem; }
.os-reason h3 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.os-reason p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* -- download -- */
.download-panel {
  position: relative; overflow: hidden; z-index: 0;
  background: linear-gradient(160deg, var(--panel) 0%, #16161a 100%);
  border: 1px solid rgba(255,255,255,0.13); border-radius: 18px; padding: 2.6rem 2.4rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
}
/* same specular sheen as the glass cards (::before is taken by the texture) */
.download-panel::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130% 65% at 14% 0%, rgba(255,255,255,0.08), transparent 60%);
}
/* The app-splash stripe texture (previously the hero backdrop) lives on quietly
   here: heavily tinted so it reads as surface grain, not a pattern. z-index -1
   keeps it above the panel's own background but under all content. */
.download-panel::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(160deg, rgba(27,27,31,0.86) 0%, rgba(22,22,26,0.94) 100%),
    url('assets/splash/AHsplashimage.png') center / cover no-repeat;
}
.download-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.download-top h2 { margin: 0 0 0.4rem; font-size: 1.9rem; }
.download-top p { margin: 0; color: var(--muted); max-width: 44ch; }
.dl-actions { display: flex; flex-direction: column; gap: 0.7rem; min-width: 250px; }
/* Full wordmark filling the gap between the copy and the download buttons.
   Purely decorative; dropped once the row wraps and the gap disappears. */
.dl-logo { align-self: center; width: clamp(150px, 17vw, 215px); height: auto; opacity: 0.92; }
@media (max-width: 920px) { .dl-logo { display: none; } }
.dl-meta { font-size: 12px; color: var(--muted); text-align: center; }
.dl-meta a { color: var(--accent); text-decoration: none; }
.dl-meta a:hover { text-decoration: underline; }

.req {
  margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem;
}
.req div h4 { margin: 0 0 0.3rem; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.req div p { margin: 0; font-size: 0.95rem; color: var(--text); }

/* -- build-from-source note -- */
.source-note {
  margin-top: 1.5rem; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.2rem 1.4rem;
}
.source-note h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.source-note p { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.9rem; }
code, .code {
  font-family: 'Cascadia Code', 'Consolas', ui-monospace, monospace;
  background: #0f0f12; border: 1px solid var(--line); border-radius: 6px;
  padding: 0.15rem 0.45rem; font-size: 0.85rem; color: var(--text);
}
pre.code { display: block; padding: 0.85rem 1rem; overflow-x: auto; white-space: pre; }

/* -- privacy strip -- */
.privacy { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.privacy .pill {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1rem;
}
.privacy .pill .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--accent-2); }

/* -- listen & verify: audio comparison players -- */
.listen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.listen-card {
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: 1.4rem 1.5rem;
}
.listen-app { font-size: 1.05rem; font-weight: 700; }
.lp { display: flex; align-items: center; gap: 0.7rem; }
.lp-play {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  color: var(--text); cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.lp-play:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.lp-play:disabled { opacity: 0.4; cursor: default; }
.lp-track {
  flex: 1; height: 7px; border-radius: 999px; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer; overflow: hidden;
}
.lp-fill { width: 0%; height: 100%; background: var(--accent); border-radius: 999px; transition: width .15s linear; }
.lp-time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 5.5rem; text-align: right; }
/* the metadata fingerprint readout - styled like a terminal line */
.listen-meta {
  font-family: 'Cascadia Code', 'Consolas', ui-monospace, monospace; font-size: 12px;
  color: var(--text); background: #0f0f12; border: 1px solid var(--line);
  border-radius: 6px; padding: 0.5rem 0.7rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.listen-meta .lm-key {
  color: var(--accent-2); font-weight: 600; margin-right: 0.5rem;
}
.listen-dl { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.listen-dl:hover { color: var(--accent); }
/* file not dropped in yet */
.listen-card.lp-missing .listen-dl { opacity: 0.4; pointer-events: none; }
.listen-card.lp-missing .lp-time { color: #d99b3f; min-width: 0; }

/* -- round-trip: external-editor support under the comparison table -- */
.roundtrip { margin-top: 2.6rem; }
.roundtrip .section-head { margin-bottom: 1.2rem; }
.editor-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.editor-chip {
  font-size: 0.9rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.4rem 0.9rem;
}

/* -- workflow comparison table (below the players) -- */
.vs-panel {
  margin-top: 2rem; overflow-x: auto;
  background: linear-gradient(160deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.06) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
  padding: 0.6rem 1.4rem 1rem;
}
@supports not (backdrop-filter: blur(1px)) { .vs-panel { background: rgba(32,32,38,0.88); } }
.vs-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
.vs-table th, .vs-table td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
.vs-table tbody tr:last-child th, .vs-table tbody tr:last-child td { border-bottom: none; }
.vs-table thead th { font-size: 0.95rem; padding-top: 0.9rem; }
.vs-table thead th:first-child { font-size: 1.05rem; }
.vs-table tbody td:first-child { color: var(--muted); }
.vs-table td:not(:first-child), .vs-table th:not(:first-child) { text-align: center; }
/* our column: subtle tint + accent header, checks in green */
.vs-table .vs-us { background: rgba(214, 40, 57, 0.07); }
.vs-table thead .vs-us { color: var(--accent); }
.vs-table tbody .vs-us { color: var(--text); }
/* -- mobile comparison switcher: hidden on desktop where the full grid fits.
   Industry pattern for compare grids on phones: keep the anchor columns
   (feature + our product) always on screen and switch the rival column via
   a segmented control, instead of hiding the grid behind a sideways scroller. */
.vs-switch { display: none; }
.vs-switch input { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .vs-panel { padding: 1rem 0.9rem 0.9rem; }
  .vs-switch { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
  .vs-switch label {
    flex: 1 1 0; text-align: center; padding: 0.5rem 0.6rem;
    font-size: 0.85rem; font-weight: 600; color: var(--muted); cursor: pointer;
    border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }
  .vs-switch input:checked + label { background: var(--accent); border-color: var(--accent); color: #fff; }
  .vs-switch input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

  .vs-table { min-width: 0; font-size: 0.88rem; }
  .vs-table th, .vs-table td { padding: 0.55rem 0.5rem; }
  .vs-table thead th:first-child { font-size: 0.9rem; }
  /* hide every rival column, then re-show the picked one */
  .vs-table th:nth-child(2), .vs-table td:nth-child(2),
  .vs-table th:nth-child(3), .vs-table td:nth-child(3),
  .vs-table th:nth-child(4), .vs-table td:nth-child(4) { display: none; }
  .vs-panel:has(#vs-audacity:checked) .vs-table th:nth-child(2),
  .vs-panel:has(#vs-audacity:checked) .vs-table td:nth-child(2) { display: table-cell; }
  .vs-panel:has(#vs-audition:checked) .vs-table th:nth-child(3),
  .vs-panel:has(#vs-audition:checked) .vs-table td:nth-child(3) { display: table-cell; }
  .vs-panel:has(#vs-reaper:checked) .vs-table th:nth-child(4),
  .vs-panel:has(#vs-reaper:checked) .vs-table td:nth-child(4) { display: table-cell; }
}
/* the narrowest phones need one more type step to fit three columns */
@media (max-width: 400px) {
  .vs-table { font-size: 0.8rem; }
  .vs-table th, .vs-table td { padding: 0.5rem 0.35rem; }
}

/* "new" tag for freshly shipped rows */
.vs-new {
  display: inline-block; margin-left: 0.35rem; padding: 0 0.45rem;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--accent); border-radius: 999px; vertical-align: middle;
}

/* -- STS morph cards (speech-to-speech page) -- */
.sts-cards { display: flex; flex-direction: column; gap: 1rem; }
.sts-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.06) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
}
@supports not (backdrop-filter: blur(1px)) { .sts-card { background: rgba(32,32,38,0.88); } }
/* character avatar: rounded square filling the card's height (the card's own
   padding provides the breathing room around it) */
.sts-avatar {
  flex: none; align-self: stretch; width: 128px; min-height: 128px;
  border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.sts-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sts-body { flex: 1; min-width: 0; }
.sts-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.55rem; }
.sts-from { font-weight: 400; font-size: 0.85rem; font-style: italic; color: var(--muted); margin-left: 0.45rem; }
.sts-from::before { content: '- '; font-style: normal; }
/* the STS voice-model name, pinned to the card's top-right corner - long
   names truncate, the full name lives in the tooltip */
.sts-voice {
  position: absolute; top: 1.1rem; right: 1.4rem; max-width: 42%;
  font-size: 0.78rem; color: var(--muted); text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* the comparison proper: two equal halves, human performance vs flat TTS */
.sts-duel { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
@media (max-width: 860px) { .sts-duel { grid-template-columns: 1fr; } }
.sts-half {
  min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 0.65rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.sts-half-label {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
/* Rows wrap at ANY width: the tool (compare bar / tts track) sits last and
   greedily fills the remaining line; below ~200px of leftover space it wraps
   onto its own full-width row instead of being squeezed or clipped. */
.sts-morph, .sts-ttsrow { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.6rem; }
.cmpr, .tp-track { flex: 1 1 200px; order: 5; }
.sp-time, .tp-time { margin-left: auto; }
.tp-track {
  flex: 1; min-width: 60px; height: 7px; border-radius: 999px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.tp-fill { width: 0%; height: 100%; background: var(--muted); border-radius: 999px; }
.tp-time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 5.6rem; text-align: right; }
.sp-play, .sp-stop, .tp-play, .tp-stop {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  color: var(--text); cursor: pointer;
  transition: border-color .12s ease, color .12s ease, opacity .12s ease;
}
.sp-play:hover:not(:disabled), .tp-play:hover:not(:disabled) { border-color: var(--accent-2); color: var(--accent-2); }
.sp-stop:hover:not(:disabled), .tp-stop:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.sp-play:disabled, .sp-stop:disabled, .tp-play:disabled, .tp-stop:disabled { opacity: 0.35; cursor: default; }
/* The original/character blend styled as an image-compare tool: two labelled
   panes split by a vertical divider with a circular grip. The invisible range
   input on top does the actual dragging (and keyboard a11y); --x mirrors its
   value and drives the clip-paths + divider position. */
.cmpr {
  position: relative; flex: 1; min-width: 120px; height: 38px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
}
.cmpr-pane {
  position: absolute; inset: 0; display: flex; align-items: center;
  pointer-events: none; font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.cmpr-orig {
  justify-content: flex-start; padding-left: 0.75rem; color: var(--text);
  background: rgba(255,255,255,0.09);
  clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0);
}
.cmpr-char {
  justify-content: flex-end; padding-right: 0.75rem; color: #fff;
  background: linear-gradient(90deg, rgba(214,40,57,0.30), rgba(214,40,57,0.48));
  clip-path: inset(0 0 0 var(--x, 50%));
}
.cmpr-line {
  position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px;
  margin-left: -1px; background: #fff; pointer-events: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.6);
}
.cmpr-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--ink); font-size: 9px; font-weight: 700;
  white-space: nowrap; box-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
.cmpr .sp-mix {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize;
}
.sp-time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 5.6rem; text-align: right; }
/* -- STS cards on small screens: controls wrap instead of clipping -- */
@media (max-width: 700px) {
  .sts-card { gap: 0.9rem; }
  .sts-avatar { width: 96px; }
  .sts-voice {
    position: static; max-width: none; text-align: left;
    margin: -0.35rem 0 0.55rem; white-space: normal;
  }
  .sp-play, .sp-stop, .tp-play, .tp-stop { width: 34px; height: 34px; font-size: 10px; }
  .sp-time, .tp-time { min-width: 0; font-size: 10.5px; }
  .sts-half { padding: 0.55rem 0.65rem; }
}
.sts-disclaimer {
  margin: 1.4rem 0 0.8rem; font-size: 0.85rem; color: var(--text);
}

/* -- footer -- */
.footer {
  border-top: 1px solid var(--line); background: #0f0f12;
  padding: 2.4rem 0; color: var(--muted); font-size: 0.88rem;
}
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ===== phones: spacing, type and layout tuned for small screens ===== */
@media (max-width: 640px) {
  .wrap { padding: 0 1.1rem; }
  .section { padding: 3rem 0; }
  .section-head { margin-bottom: 1.8rem; }
  .section-head h2, .os-story h2 { font-size: 1.5rem; }
  .section-head p, .os-story p { font-size: 0.98rem; }

  /* heroes: desktop-scale padding halves so the fold isn't all empty frame */
  .hero .wrap, .hero.home-hero .wrap { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .hero.wf-hero .wrap, .hero.sts-photo-hero .wrap { padding-top: 5.5rem; padding-bottom: 5.5rem; }
  .hero-lede { font-size: 1.08rem; }
  .sts-hero .hero-lede { font-size: 1.12rem; }
  .sts-hero .hero-sub { font-size: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }

  .download-panel { padding: 1.7rem 1.2rem; }
  .download-top h2 { font-size: 1.5rem; }
  .dl-actions { min-width: 0; width: 100%; }
  .dl-actions .btn { justify-content: center; }

  .lp-time { min-width: 0; }

  .footer-row { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
}

/* STS compare cards: below ~560px the avatar-beside-players row is too tight,
   so the portrait becomes a banner above the players instead */
@media (max-width: 560px) {
  .sts-card { flex-direction: column; align-items: stretch; padding: 1rem; }
  .sts-avatar { width: 100%; align-self: auto; min-height: 0; height: 150px; }
  /* faces sit in the upper third of the portraits: bias the banner crop up
     so nobody loses their head */
  .sts-avatar img { object-position: center 20%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover, .btn:hover { transform: none; }
}
