/* Froyla CloneVoice: plain CSS, one stylesheet for every /audio page. Calm studio look: paper background, one ink colour,
   one accent. No gradients or decorative effects; the avatar photo and the waveform are the visuals. */
:root {
  --paper: #f6f4ef; --card: #ffffff; --ink: #1d1b18; --muted: #6b665e; --line: #dcd7cc;
  --accent: #0f5c4d; --accent-ink: #ffffff; --warn: #8a5a00; --warn-bg: #fbf1d9; --bad: #9b2c1f; --bad-bg: #fbe5e1;
  --ok: #1d6b3a; --ok-bg: #e2f2e7;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Segoe UI", system-ui, -apple-system, sans-serif; line-height: 1.5; }
a { color: var(--accent); }
header.top { background: var(--card); border-bottom: 1px solid var(--line); }
header.top .bar { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; }
header.top .brand { font-weight: 700; letter-spacing: .02em; color: var(--ink); text-decoration: none; margin-right: 8px; }
header.top { position: relative; }
header.top .bar { justify-content: space-between; flex-wrap: nowrap; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--bg, #f4f3ef); }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; content: ""; }
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -5px; }
.menu-icon::after { position: absolute; top: 5px; }
.menu-panel { position: absolute; right: max(16px, calc((100% - 1080px) / 2 + 16px)); top: 100%; z-index: 30; min-width: 230px; display: flex; flex-direction: column; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .14); }
.menu-panel a { color: var(--ink); text-decoration: none; padding: 11px 12px; border-radius: 6px; }
.menu-panel a:hover { background: var(--bg, #f4f3ef); }
.menu-panel a[aria-current="page"] { font-weight: 700; color: var(--accent); }
.menu-panel .menu-other { color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 6px 6px; }
@media (max-width: 640px) { .menu-panel { left: 16px; right: 16px; } }
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.7rem; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 28px 0 8px; }
p.lede { color: var(--muted); margin: 0 0 20px; max-width: 62ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.grid { display: grid; gap: 16px; }
.cols { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
label.inline { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 12px 0; }
input[type=text], select, textarea { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
textarea { min-height: 170px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #7fb8aa; outline-offset: 2px; }
button, .btn { font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .btn.secondary { background: transparent; color: var(--accent); }
button.danger { background: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: .92rem; }
.hint { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }
.note-box { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--warn-bg); color: var(--ink); font-size: .9rem; line-height: 1.45; border-radius: 0 6px 6px 0; }
.msg { padding: 10px 12px; border-radius: 6px; margin: 12px 0; font-size: .95rem; }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #ece8dd; color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
/* the whole photo is always shown, never trimmed: square tiles fit it inside (plain bands at the sides if needed) */
.avatar-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 6px; background: #e9e5da; display: block; }
/* the Studio preview takes the photo's own shape, so you see exactly the picture the video is made from */
#preview.avatar-thumb { aspect-ratio: auto; height: auto; max-height: 560px; }
.choice { display: block; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 6px 0; font-weight: 400; cursor: pointer; }
.choice input { margin-right: 8px; }
.choice[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.bar-track { height: 10px; background: #e9e5da; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); width: 0; transition: width .4s ease; }
@media (prefers-reduced-motion: reduce) { .bar-fill { transition: none; } }
.paragraph { font-size: 1.1rem; line-height: 1.7; background: #fbfaf6; border-left: 3px solid var(--accent); padding: 12px 16px; margin: 12px 0; }
video { width: 100%; max-height: 70vh; background: #000; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.badge-note { font-size: .85rem; color: var(--muted); }

.answer { white-space: pre-wrap; margin-top: 10px; }

/* ---- landing page (/audio): a dark "recording console" stage, then calm paper sections. No gradients, no glow. ---- */
body.landing { --night: #14171d; --night-2: #1d222b; --on-night: #f3f0e8; --on-night-muted: #a9a79f; --signal: #f2b134; }
body.landing main { max-width: 1120px; padding-top: 16px; }

.stage { background: var(--night); color: var(--on-night); border-radius: 14px; padding: 36px 40px 22px; overflow: hidden; }
.stage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.eyebrow { margin: 0; font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.stage-count { margin: 0; font-size: .85rem; color: var(--on-night-muted); font-variant-numeric: tabular-nums; }
.stage h1 { font-family: Cambria, Georgia, "Times New Roman", serif; font-weight: 700; font-size: clamp(2.1rem, 5.6vw, 4rem); line-height: 1.05; letter-spacing: -.015em;
  margin: 18px 0 16px; max-width: 16em; min-height: 2.2em; transition: opacity .18s ease; }
.stage h1.swap { opacity: 0; }
.stage p.lede { color: var(--on-night); opacity: .9; font-size: 1.15rem; max-width: 36em; margin: 0 0 24px; }
.btn.big { padding: 12px 22px; font-size: 1.05rem; }
.btn.signal { background: var(--signal); border-color: var(--signal); color: #14171d; }
.btn.ghost { background: transparent; border-color: var(--on-night-muted); color: var(--on-night); }
.stage a:focus-visible, .stage button:focus-visible, .finale a:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* the waveform speaks the headline: its shape comes from the words (landing.js), it morphs when the headline changes, and a playhead
   sweeps across it, lighting the bars it has passed */
.wave-wrap { position: relative; margin: 30px -4px 14px; }
.wave { display: flex; align-items: center; gap: 3px; height: 150px; }
.wave span { flex: 1 1 0; min-width: 2px; height: 30%; border-radius: 3px; background: var(--signal); opacity: .34; transform-origin: center;
  transition: height .75s cubic-bezier(.3, .7, .2, 1), opacity .25s ease; animation: breathe 1.5s ease-in-out infinite alternate; }
.wave span.on { opacity: 1; }
@keyframes breathe { from { transform: scaleY(.82); } to { transform: scaleY(1); } }
.wave-head { position: absolute; top: -4px; bottom: 24px; left: 0; width: 2px; background: var(--on-night); border-radius: 2px; pointer-events: none; }
.wave-time { display: flex; justify-content: space-between; margin-top: 8px; font-size: .75rem; color: var(--on-night-muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .wave span { animation: none; transition: none; } .stage h1 { transition: none; } }

.stage-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; font-size: .88rem; color: var(--on-night-muted); border-top: 1px solid #2b313c; padding-top: 14px; }
.link-btn { background: transparent; border: 0; padding: 4px 0; color: var(--on-night); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: .88rem; }
@media (max-width: 640px) { .stage { padding: 24px 18px 16px; border-radius: 10px; } .wave { height: 96px; } .wave-head { bottom: 24px; } .stage h1 { min-height: 3.4em; } }

.band { padding: 44px 0 8px; }
.kicker { margin: 0 0 6px; font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.band h2 { font-family: Cambria, Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; margin: 0 0 20px; letter-spacing: -.01em; }
.band h3 { margin: 0 0 8px; font-size: 1.05rem; }
.band p { margin: 0 0 10px; }
.band p.lede { max-width: none; }          /* the sections use the whole width of the container */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.steps li { border-top: 2px solid var(--ink); padding-top: 14px; }
.step-no { display: block; font-family: Cambria, Georgia, serif; font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.split-lang { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.trio { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; padding: 0; }
.chip { font-size: .95rem; padding: 4px 12px; border-radius: 99px; background: #ece8dd; color: var(--ink); }
.chip.strong { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.plain-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plain-list li { border-top: 2px solid var(--ink); padding-top: 12px; margin: 0; }
.plain-list li strong { display: block; margin-bottom: 4px; font-size: 1.05rem; }

.finale { margin: 48px 0 0; padding: 40px 36px; border-radius: 14px; background: var(--night); color: var(--on-night); }
.finale h2 { font-family: Cambria, Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.finale p { margin: 0 0 20px; opacity: .9; }
@media (max-width: 640px) { .finale { padding: 28px 18px; } }

/* ---- footer on every /audio page ---- */
.site-foot { max-width: 1120px; margin: 56px auto 0; padding: 32px 16px 40px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 28px 24px; grid-template-columns: minmax(200px, 1.3fr) repeat(3, minmax(130px, 1fr)); }
.foot-brand strong { font-size: 1.05rem; }
.foot-brand p { margin: 6px 0 0; max-width: 28ch; }
.site-foot h2 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0 0 6px; }
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }
.foot-note { margin: 28px 0 0; font-size: .88rem; color: var(--muted); }
.foot-note a { color: var(--muted); text-decoration: underline; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
[hidden] { display: none !important; }
/* the help page: contents list, question-and-answer list, a table that scrolls on its own on a phone */
.help-toc ol { columns: 2 220px; column-gap: 28px; margin: 8px 0 0; padding-left: 20px; }
.help-toc li { margin: 4px 0; break-inside: avoid; }
.help h2 { scroll-margin-top: 16px; }
.help .card ol, .help .card ul { margin: 0; padding-left: 20px; }
.help .card li { margin: 6px 0; line-height: 1.5; }
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.table-wrap { overflow-x: auto; }

/* video guides on the help page */
.guide-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.guide-videos figure { margin: 0; }
.guide-videos video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 8px; background: #125e4a; }
.guide-videos figcaption { margin-top: 6px; font-size: 0.95em; }

/* How it works: sample video on the left, the three steps on the right */
.how { display: grid; gap: 32px; }
.how.has-sample { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: start; }
.sample { margin: 0; }
.sample video { width: 100%; display: block; border-radius: 12px; background: #000; }
.sample figcaption { margin-top: 8px; font-size: .9rem; }
.how.has-sample .steps { grid-template-columns: 1fr; gap: 18px; }
.how.has-sample .steps li { display: grid; grid-template-columns: 64px 1fr; column-gap: 14px; }
.how.has-sample .step-no { grid-row: 1 / span 2; margin: 0; font-size: 2.2rem; }
.how.has-sample .steps h3 { margin: 0 0 4px; }
@media (max-width: 760px) { .how.has-sample { grid-template-columns: 1fr; } .sample { max-width: 400px; } }
