:root {
  --ink: #141210;
  --night: #151311;
  --paper: #f0eeea;
  --card: #fff;
  --line: #e4e1da;
  --muted: #77736b;
  --green: #1e9e58;
  --green-deep: #16733d;
  --red: #d8432f;
  --amber: #f2a93b;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 22px 56px rgba(20, 18, 16, .14), 0 3px 10px rgba(20, 18, 16, .06);
}

body[data-mood="dark"] { --bg: var(--night); --fg: #fff; --soft: rgba(255, 255, 255, .64); --rule: rgba(255, 255, 255, .14); --ghost: rgba(255, 255, 255, .07); --blob-opacity: .45; --panel: rgba(255, 255, 255, .07); }
body[data-mood="light"] { --bg: var(--paper); --fg: var(--ink); --soft: var(--muted); --rule: rgba(20, 18, 16, .12); --ghost: rgba(20, 18, 16, .07); --blob-opacity: 1; --panel: rgba(255, 255, 255, .72); }
body[data-mood="green"] { --bg: var(--green-deep); --fg: #fff; --soft: rgba(255, 255, 255, .75); --rule: rgba(255, 255, 255, .2); --ghost: rgba(255, 255, 255, .12); --blob-opacity: .25; --panel: rgba(255, 255, 255, .12); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 500 17px/1.5 var(--sans); overflow-x: hidden; transition: background .7s var(--ease), color .5s; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
body[data-mood="green"] .dot { background: #fff; }

/* Background */
.backdrop { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: var(--blob-opacity); transition: opacity .7s; animation: drift 22s ease-in-out infinite alternate; }
.blob-a { width: 56vw; height: 56vw; left: -12vw; top: -8vw; background: radial-gradient(closest-side, rgba(190, 160, 130, .36), transparent); }
.blob-b { width: 48vw; height: 48vw; right: -10vw; top: 26vh; background: radial-gradient(closest-side, rgba(150, 175, 195, .38), transparent); animation-delay: -7s; }
.blob-c { width: 60vw; height: 60vw; left: 18vw; bottom: -26vw; background: radial-gradient(closest-side, rgba(165, 195, 160, .34), transparent); animation-delay: -14s; }
@keyframes drift { to { transform: translate(6vw, -4vw) scale(1.08); } }
.grid { position: absolute; inset: 0; background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 56px 56px; opacity: .22; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%); }
.ghost { position: fixed; z-index: -1; top: 34vh; left: 0; font: 700 34vw/1 var(--sans); letter-spacing: .02em; white-space: nowrap; color: transparent; -webkit-text-stroke: 2px var(--ghost); pointer-events: none; will-change: transform; transition: -webkit-text-stroke-color .6s; }
.scroll-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; }
.scroll-bar span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--green); }
body[data-mood="green"] .scroll-bar span { background: #fff; }

/* Nav */
.nav { position: sticky; top: 14px; z-index: 20; margin: 14px auto 0; width: min(1180px, calc(100% - 32px)); height: 60px; padding: 0 10px 0 22px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--rule); border-radius: 30px; background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: background .6s, border-color .6s; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav nav > a, .nav .account-signin { text-decoration: none; color: var(--soft); transition: color .2s; }
.nav nav > a:hover, .nav .account-signin:hover { color: var(--fg); }
.nav .nav-cta { color: var(--bg); background: var(--fg); padding: 9px 18px; border-radius: 22px; font-weight: 600; transition: transform .3s var(--ease); }
.nav .nav-cta:hover { color: var(--bg); transform: scale(1.04); }

/* Shared */
section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 120px 0; }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head p:last-child:not(.eyebrow) { color: var(--soft); margin-top: 14px; font-size: 19px; }
h2 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; }
h2 em { font-size: 1.1em; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 26px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .3s var(--ease), box-shadow .3s, background .3s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-busy { opacity: .45; cursor: wait; transform: none; pointer-events: none; }
.btn-solid { background: var(--green); color: #fff; box-shadow: 0 10px 28px rgba(30, 158, 88, .3); }
.btn-ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--rule); }
.btn-lg { min-height: 60px; padding: 0 34px; font-size: 19px; border-radius: 30px; }
.reveal { opacity: 0; filter: blur(12px); transform: translateY(26px); transition: opacity .8s var(--ease), filter .8s var(--ease), transform .8s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.in { opacity: 1; filter: none; transform: none; }

/* Hero */
.hero { min-height: calc(100vh - 74px); padding: 56px 0 72px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: center; }
h1 { font-size: clamp(56px, 8.4vw, 116px); font-weight: 700; letter-spacing: -.045em; line-height: .98; }
h1 em { font-size: 1.1em; color: #58d594; }
.lede { max-width: 540px; margin-top: 26px; color: var(--soft); font-size: 21px; line-height: 1.42; }
.hero-form { display: flex; gap: 8px; max-width: 610px; margin-top: 34px; padding: 8px; background: rgba(255, 255, 255, .09); border: 1px solid var(--rule); border-radius: 34px; transition: border-color .3s, box-shadow .3s; }
.hero-form:focus-within { border-color: #58d594; box-shadow: 0 0 0 5px rgba(88, 213, 148, .14); }
.hero-form input { flex: 1; min-width: 0; padding: 0 18px; border: 0; background: none; outline: none; font-size: 18px; }
.hero-form input::placeholder { color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { border: 1.5px dashed var(--soft); background: transparent; color: var(--soft); padding: 8px 15px; border-radius: 20px; font-size: 14px; transition: color .2s, border-color .2s, background .2s, transform .3s var(--ease); }
.chip:hover { color: var(--fg); border-color: var(--fg); transform: translateY(-2px); }
.hero-stage { position: relative; display: flex; justify-content: center; perspective: 1200px; }
.phone { position: relative; width: min(330px, 74vw); aspect-ratio: 9 / 16; border-radius: 42px; padding: 9px; background: #0a0908; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16), 0 40px 90px rgba(0, 0, 0, .42); transition: transform .5s var(--ease); transform-style: preserve-3d; }
.phone video { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 34px; background: #111; }
.phone-sm { width: min(286px, 72vw); }
.sound-toggle { position: absolute; right: 22px; bottom: 22px; padding: 7px 13px; border: 0; border-radius: 16px; background: rgba(20, 18, 16, .78); color: #fff; font: 500 12px var(--mono); backdrop-filter: blur(6px); }
.sound-toggle[aria-pressed="true"] { background: var(--green); }
.float-card { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #fff; color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); font-size: 14px; will-change: transform; transition: transform .25s ease-out; }
.float-card .mono { color: var(--muted); font-size: 11px; }
/* These sit over the empty top and bottom of the phone, so they never cover the reel's headline or cards. */
.float-a { left: -4%; top: -3%; }
.float-b { right: -6%; bottom: 13%; }
.float-c { left: -6%; bottom: 3%; flex-direction: row; align-items: center; gap: 9px; }
.check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; }

/* Templates */
.template-explorer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: center; }
.template-tabs { display: flex; flex-direction: column; gap: 14px; }
.template-tab { display: block; width: 100%; text-align: left; padding: 28px 30px; border: 1.5px solid var(--rule); border-radius: 26px; background: transparent; transition: background .35s, box-shadow .35s, border-color .35s, transform .4s var(--ease); }
.template-tab:hover { transform: translateX(6px); }
.template-tab[aria-selected="true"] { background: var(--card); color: var(--ink); border-color: transparent; box-shadow: var(--shadow); }
.template-tab h3 { font-size: 30px; letter-spacing: -.025em; line-height: 1.1; }
.template-tab p { margin-top: 8px; color: var(--muted); }
.template-tab .swatches { display: flex; gap: 6px; margin-top: 16px; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .15); }

/* How */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.steps li { padding: 24px 22px 30px; min-height: 280px; border: 1px solid var(--rule); border-radius: 24px; background: var(--panel); transition: transform .45s var(--ease), background .3s, color .3s; }
.steps li:hover { background: #fff; color: var(--ink); transform: translateY(-8px); }
.steps li:hover p { color: var(--muted); }
.steps .mono { color: #58d594; font-size: 14px; }
.steps li:hover .mono { color: var(--green); }
.steps h3 { font-size: 26px; letter-spacing: -.02em; margin: 54px 0 10px; }
.steps p { color: var(--soft); font-size: 15px; line-height: 1.45; }

/* Studio */
.notice { margin-bottom: 26px; padding: 18px 22px; border-radius: 18px; background: #fbebcb; color: var(--ink); border: 1px solid #f2d79c; }
.notice code { font: 500 14px var(--mono); background: rgba(20, 18, 16, .08); padding: 2px 6px; border-radius: 6px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 48px; align-items: start; }
.studio-form { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 14px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
legend .mono { color: var(--green); margin-right: 8px; font-size: 13px; }
.idea-box { position: relative; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); transition: box-shadow .3s; }
.idea-box:focus-within { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
/* These fields sit inside a box that shows its own focus ring, so the general focus outline would draw a second one. */
.idea-box textarea:focus-visible, .hero-form input:focus-visible { outline: none; }
textarea { display: block; width: 100%; padding: 22px 24px 38px; border: 0; border-radius: 24px; outline: none; resize: vertical; background: transparent; color: var(--ink); font-size: 20px; line-height: 1.35; }
.counter { position: absolute; right: 18px; bottom: 12px; color: var(--muted); font-size: 11px; }
.template-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option-card { display: block; height: 100%; padding: 18px 20px; background: var(--card); color: var(--ink); border-radius: 20px; box-shadow: 0 0 0 1.5px var(--line); transition: box-shadow .25s, transform .35s var(--ease); }
.option:hover .option-card { transform: translateY(-3px); }
.option input:checked + .option-card { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
.option input:focus-visible + .option-card { outline: 3px solid var(--green); outline-offset: 3px; }
.option-card strong { display: block; font-size: 19px; letter-spacing: -.015em; }
.option-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.35; }
.segmented { display: inline-flex; padding: 5px; gap: 4px; background: rgba(20, 18, 16, .07); border-radius: 26px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 10px 26px; border-radius: 21px; font-weight: 600; transition: background .25s, color .25s, box-shadow .25s; }
.segmented input:checked + span { background: var(--ink); color: #fff; box-shadow: 0 5px 14px rgba(20, 18, 16, .22); }
.segmented input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.voice-options { display: grid; gap: 10px; }
.voice-row { position: relative; }
.voice-row .option-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-right: 76px; min-height: 76px; }
.voice-play { position: absolute; z-index: 2; right: 16px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; transition: scale .3s var(--ease), background .2s; }
.voice-play:hover { scale: 1.08; }
.voice-play.playing { background: var(--green); }
.model-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.model-options .price { display: block; margin-top: 8px; color: var(--green); font: 700 12px var(--mono); }
.avatar-options { display: flex; flex-wrap: wrap; gap: 14px; }
.avatar-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; color: var(--soft); }
.avatar-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.avatar-option img, .avatar-upload span.circle { width: 88px; height: 88px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--line); transition: box-shadow .25s, transform .35s var(--ease); object-fit: cover; }
.avatar-option:hover img, .avatar-upload:hover span.circle { transform: translateY(-3px); }
.avatar-option input:checked + img { box-shadow: 0 0 0 4px var(--green), var(--shadow); }
.avatar-option input:checked ~ span { color: var(--fg); }
.avatar-option input:focus-visible + img { outline: 3px solid var(--green); outline-offset: 4px; }
.avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--soft); }
.avatar-upload span.circle { display: grid; place-items: center; background: transparent; box-shadow: none; border: 2px dashed var(--rule); font-size: 34px; font-weight: 400; color: var(--soft); }
.avatar-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar-upload:focus-within span.circle { outline: 3px solid var(--green); outline-offset: 4px; }
.avatar-upload.busy span.circle { animation: spin 1.2s linear infinite; border-color: var(--green) transparent var(--green) var(--green); }
.avatar-hint { margin-top: 12px; color: var(--soft); font-size: 14px; }
/* Account */
.account { position: relative; display: flex; align-items: center; }
.nav nav .account-signin { color: var(--fg); font-weight: 600; }
.account-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--green); color: #fff; font-weight: 700; box-shadow: 0 0 0 2px var(--rule); transition: box-shadow .2s, transform .3s var(--ease); }
.account-button:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--green); }
.account-button img { width: 100%; height: 100%; object-fit: cover; }
.account-menu { position: absolute; right: 0; top: calc(100% + 12px); z-index: 40; min-width: 240px; padding: 16px; background: var(--card); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); animation: cardIn .35s var(--ease); }
.account-name { font-weight: 700; }
.account-email { color: var(--muted); font-size: 14px; margin-top: 2px; word-break: break-all; }
.account-signout { width: 100%; margin-top: 14px; padding: 10px 14px; border: 0; border-radius: 12px; background: #f0eeea; color: var(--ink); font-weight: 600; text-align: left; transition: background .2s; }
.account-signout:hover { background: #e4e1da; }

/* Sign-in page */
.signin-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; }
.signin-card { width: min(440px, 100%); padding: 40px 34px 32px; background: var(--card); color: var(--ink); border-radius: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); text-align: center; animation: cardIn .7s var(--ease); }
.signin-avatar { display: block; margin: 0 auto 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--green); }
.signin-card h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; }
.signin-card h1 em { color: var(--green); }
.signin-lede { margin-top: 12px; color: var(--muted); }
.signin-error { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: #fbebcb; font-size: 14px; line-height: 1.4; text-align: left; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; height: 56px; border-radius: 28px; background: #fff; color: #1f1f1f; text-decoration: none; font: 600 17px var(--sans); box-shadow: 0 0 0 1.5px #dadce0; transition: box-shadow .2s, transform .3s var(--ease); }
.google-button:hover { box-shadow: 0 0 0 1.5px #1f1f1f, 0 8px 22px rgba(20, 18, 16, .12); transform: translateY(-2px); }
.google-button svg { width: 22px; height: 22px; }
.signin-fine { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Studio page: compact, so the whole form fits in less scrolling */
.studio-page .studio { padding: 44px 0 72px; }
.studio-page .section-head { margin-bottom: 26px; }
.studio-page .studio-form { gap: 26px; }
.studio-page legend, .field-label { margin-bottom: 10px; font-size: 20px; }
.studio-page .chips { margin-top: 12px; }
.studio-page textarea { padding: 18px 22px 34px; font-size: 19px; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.field { min-width: 0; }
.field-label { display: block; font-weight: 700; letter-spacing: -.02em; }
.field-label .mono { color: var(--green); margin-right: 8px; font-size: 13px; }
.field-note { margin-top: 8px; color: var(--soft); font-size: 14px; line-height: 1.4; }
.avatar-hint { margin-top: -14px; }
.select-row { display: flex; gap: 10px; align-items: center; }
.select-row .select-wrap { flex: 1; min-width: 0; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap select { width: 100%; height: 56px; padding: 0 46px 0 18px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); font: 600 17px var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer; transition: box-shadow .2s; }
.select-wrap select:hover { box-shadow: 0 0 0 1.5px var(--muted); }
.select-wrap select:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--green); }
.select-row .voice-play { position: static; translate: none; flex: none; width: 56px; height: 56px; }
.voice-play:disabled { opacity: .35; cursor: not-allowed; }
.studio-page .template-options .option-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.studio-page .avatar-options { gap: 10px; }
.studio-page .avatar-option, .studio-page .avatar-upload { width: 76px; }
.studio-page .avatar-option img, .studio-page .avatar-upload span.circle { width: 64px; height: 64px; }
.studio-page .avatar-upload span.circle { font-size: 26px; }

.demo-cta { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 14px 7px 10px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font: 700 13px var(--sans); transition: transform .3s var(--ease), background .2s; }
.demo-cta svg { width: 14px; height: 14px; }
.demo-cta:hover { background: var(--green); transform: translateY(-2px); }

.demo-dialog { padding: 0; border: 0; background: transparent; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: visible; }
.demo-dialog::backdrop { background: rgba(12, 11, 10, .72); backdrop-filter: blur(6px); }
.demo-dialog[open] { animation: cardIn .5s var(--ease); }
.demo-panel { width: min(400px, calc(100vw - 32px)); padding: 18px; background: var(--card); color: var(--ink); border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.demo-head h3 { font-size: 22px; letter-spacing: -.02em; }
.demo-head .mono { margin-top: 2px; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 13px; }
.demo-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f0eeea; color: var(--ink); transition: background .2s, transform .3s var(--ease); }
.demo-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }
.demo-close svg { width: 20px; height: 20px; }
.demo-panel video { display: block; width: 100%; max-height: calc(100vh - 140px); aspect-ratio: 9 / 16; object-fit: contain; border-radius: 18px; background: #111; }

.fresh-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.fresh-toggle input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.fresh-toggle strong { display: block; }
.fresh-toggle small { display: block; color: var(--soft); font-size: 14px; line-height: 1.4; }
.result-cost { margin-top: 4px; color: var(--green); text-transform: none; letter-spacing: 0; }
.form-error { color: var(--red); font-weight: 600; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.cost { color: var(--soft); max-width: 330px; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.output { position: sticky; top: 96px; display: flex; justify-content: center; min-width: 0; }
.output-idle .tag { position: absolute; top: 24px; left: 50%; translate: -50% 0; padding: 5px 11px; border-radius: 13px; background: rgba(20, 18, 16, .75); color: #fff; font-size: 10px; white-space: nowrap; }

.progress-card, .result-card, .error-card { width: 100%; padding: 32px 28px; background: var(--card); color: var(--ink); border-radius: 30px; box-shadow: var(--shadow); text-align: center; animation: cardIn .7s var(--ease); }
@keyframes cardIn { from { opacity: 0; filter: blur(12px); transform: translateY(22px); } }
.ring-wrap { position: relative; width: 170px; height: 170px; margin: 0 auto 16px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track, .ring-fill { fill: none; stroke-width: 9; }
.ring-track { stroke: #ece9e2; }
.ring-fill { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s var(--ease); }
.ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 52px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ring-text small { font-size: 22px; margin: 12px 0 0 2px; color: var(--muted); }
.progress-card h3, .result-card h3, .error-card h3 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.eta { min-height: 18px; margin-top: 6px; color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
.step-list { list-style: none; margin: 22px 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.step-list li { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; color: #a8a49b; font-size: 15px; transition: color .3s, background .3s; }
.step-list i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #dedad2; font-style: normal; font-size: 11px; }
.step-list li.active { color: var(--ink); background: #f3f1ec; font-weight: 600; }
.step-list li.active i { border-color: var(--green) transparent var(--green) var(--green); animation: spin .9s linear infinite; }
.step-list li.done { color: var(--ink); }
.step-list li.done i { background: var(--green); border-color: var(--green); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-card .phone { margin: 0 auto 22px; width: min(250px, 70vw); }
.result-card video { object-fit: contain; }
#resultMeta { margin-top: 6px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.result-warning { margin-top: 14px; padding: 10px 12px; background: #fbebcb; border-radius: 12px; font-size: 14px; }
.result-check { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.error-card p { margin: 10px 0 20px; color: var(--muted); }

/* Library */
.videos-page .videos { padding: 48px 0 96px; }
.videos-page .section-head .lede { margin-top: 10px; color: var(--soft); max-width: 36rem; }
.videos-status { margin-top: 28px; color: var(--soft); }
.videos-empty { margin-top: 36px; max-width: 28rem; }
.videos-empty p { color: var(--soft); margin-bottom: 18px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.videos-page .library-grid { margin-top: 28px; }
.reel-card { display: block; text-decoration: none; color: var(--ink); background: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); transition: transform .45s var(--ease); }
.reel-card:hover { transform: translateY(-8px); }
.reel-card video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #111; }
.reel-card div { padding: 14px 16px 18px; }
.reel-card strong { display: block; line-height: 1.25; letter-spacing: -.01em; }
.reel-card span { display: block; margin-top: 5px; color: var(--muted); font: 500 12px var(--mono); }
.reel-card .reel-download { width: 100%; margin-top: 12px; }

.footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--rule); color: var(--soft); font-size: 15px; }
.footer .brand { color: var(--fg); text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; }
.footer-links a { color: var(--soft); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--fg); }
.footer-note { flex-basis: 100%; font-size: 13.5px; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 26px 22px 22px; background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%); color: var(--ink); border-radius: 28px; box-shadow: 0 0 0 1.5px var(--line), 0 14px 34px rgba(20, 18, 16, .06); transition: transform .4s var(--ease), box-shadow .3s; }
.plan-card:hover { transform: translateY(-5px); box-shadow: 0 0 0 1.5px rgba(229, 180, 74, .55), 0 26px 56px rgba(20, 18, 16, .12); }
.plan-flag { position: absolute; top: -13px; left: 24px; padding: 6px 13px; border-radius: 14px; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); color: var(--gold-ink); font-size: 11px; font-weight: 700; box-shadow: 0 6px 16px var(--gold-glow); }
.plan-card h3 { font-size: 24px; letter-spacing: -.02em; }
.plan-blurb { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.4; min-height: 2.8em; }
.plan-was { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1; }
.plan-was s { color: var(--muted); font-weight: 600; text-decoration-thickness: 2px; text-decoration-color: rgba(216, 67, 47, .75); }
.plan-save { padding: 3px 8px; border-radius: 999px; background: rgba(30, 158, 88, .12); color: var(--green-deep); font: 700 11.5px var(--sans); letter-spacing: .02em; }
.plan-card.popular .plan-was s { color: rgba(255, 255, 255, .55); }
.plan-card.popular .plan-save { background: rgba(30, 158, 88, .25); color: #8ee0b2; }
.plan-price { margin-top: 12px; display: flex; align-items: baseline; gap: 6px; }
.plan-was + .plan-price { margin-top: 6px; }
.plan-price strong { font-size: 42px; line-height: 1; letter-spacing: -.04em; }
.plan-price span { color: var(--muted); font-weight: 600; }

/* Credits and bonus */
.plan-credits { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px 10px 14px; border-radius: 16px; background: linear-gradient(135deg, #fffaf0, #fdf1d4); box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .45); }
.plan-credit-line { display: flex; align-items: baseline; gap: 8px; }
.plan-credit-line strong { font-size: 24px; line-height: 1; letter-spacing: -.03em; color: var(--gold-ink); }
.plan-credit-line { gap: 6px; white-space: nowrap; }
.plan-credit-line span { color: #7a5a1c; font-size: 12.5px; font-weight: 600; }
.plan-bonus { flex: none; }
.plan-bonus-tag { position: absolute; top: 18px; right: 18px; display: grid; justify-items: center; padding: 7px 10px 6px; border-radius: 14px; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); color: var(--gold-ink); font: 800 17px/1 var(--sans); letter-spacing: -.02em; box-shadow: 0 8px 20px var(--gold-glow); transform: rotate(4deg); }
.plan-bonus-tag small { font: 700 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.plan-card:has(.plan-bonus-tag) h3, .plan-card:has(.plan-bonus-tag) .plan-blurb { padding-right: 64px; }
.bonus-badge { position: relative; display: inline-flex; padding: 5px 12px; border-radius: 999px; overflow: hidden; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); color: var(--gold-ink); font: 700 13px var(--sans); letter-spacing: .01em; box-shadow: 0 4px 12px var(--gold-glow); }
.bonus-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%); transform: translateX(-120%); animation: gold-shine 3.6s var(--ease) infinite; }
.base-rate { color: #7a5a1c; font-size: 12.5px; font-weight: 600; }

/* "Up to N reels": the most the credits make, with the Opus figure beside it */
.plan-upto { margin-top: 14px; }
.plan-upto-big { font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.plan-upto-sub { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.plan-card.popular .plan-upto-sub { color: rgba(255, 255, 255, .62); }

.plan-card ul { list-style: none; margin: 16px 0 20px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: 14.5px; flex: 1; align-content: start; }
.plan-card li { display: flex; gap: 10px; align-items: flex-start; }
.plan-card li svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
.plan-cta { width: 100%; }
.plan-card .btn-ghost { color: var(--ink); border-color: var(--line); }
.plan-card .btn-ghost:hover { border-color: var(--gold); box-shadow: 0 8px 20px var(--gold-glow); }
.btn-gold { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); color: var(--gold-ink); box-shadow: 0 10px 26px var(--gold-glow); }
.btn-gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%); transform: translateX(-120%); animation: gold-shine 3.6s var(--ease) infinite; }
.plan-cta.is-current { background: #f0eeea; color: var(--muted); box-shadow: none; cursor: default; transform: none; }
.plan-cta.is-current::after { display: none; }
.plan-cta.is-busy,
.plan-cta[aria-disabled="true"] { opacity: .7; cursor: wait; pointer-events: none; transform: none; }
.plan-cta.is-busy::after { display: none; }

/* Most popular: dark card with gold */
.plan-card.popular { background: radial-gradient(120% 80% at 50% 0%, #2c241a 0%, #151311 70%); color: #fff; box-shadow: 0 0 0 1.5px rgba(229, 180, 74, .7), 0 28px 60px rgba(20, 18, 16, .35), 0 0 60px rgba(229, 180, 74, .12); }
.plan-card.popular:hover { box-shadow: 0 0 0 2px var(--gold), 0 34px 70px rgba(20, 18, 16, .4), 0 0 80px rgba(229, 180, 74, .2); }
.plan-card.popular h3 { background: linear-gradient(90deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-card.popular .plan-blurb, .plan-card.popular .plan-price span { color: rgba(255, 255, 255, .62); }
.plan-card.popular .plan-credits { background: rgba(229, 180, 74, .1); box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .4); }
.plan-card.popular .plan-credit-line strong { color: var(--gold-hi); }
.plan-card.popular .plan-credit-line span { color: rgba(255, 233, 168, .75); }
.plan-card.popular ul { border-color: rgba(255, 255, 255, .12); }
.plan-card.popular li svg { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .bonus-badge::after, .btn-gold::after { animation: none; display: none; } }
.plan-fine { margin-top: 22px; color: var(--soft); font-size: 14px; line-height: 1.5; max-width: 760px; }
.pricing { padding-bottom: 100px; }
.pricing-dialog .pricing-panel { width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px; }
.pricing-panel .demo-head { margin-bottom: 26px; }
.pricing-panel h3 { font-size: 28px; }
.pricing-panel h3 em { color: var(--green); }
.pricing-message { margin-top: 6px; color: var(--muted); font-size: 16px; }
.pricing-panel .plan-fine { color: var(--muted); margin-top: 18px; }
.plan-line { margin-top: 14px; color: var(--soft); font-size: 14px; line-height: 1.5; }
.link-button { padding: 0; border: 0; background: none; color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* Premium: gold locks and badges on what plans unlock. Meant to look like a reward, not a wall. */
:root { --gold-hi: #ffe9a8; --gold: #e5b44a; --gold-deep: #a8741a; --gold-ink: #4a3306; --gold-glow: rgba(229, 180, 74, .38); }
.gold-lock { width: 15px; height: 17px; flex: none; filter: drop-shadow(0 1px 1.5px rgba(122, 82, 10, .35)); }
.premium-badge { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; overflow: hidden; background: linear-gradient(135deg, #fff6d6 0%, #f6dc8f 45%, #e6b552 100%); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(168, 116, 26, .45), 0 4px 12px var(--gold-glow); font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.premium-badge .gold-lock { width: 12px; height: 14px; }
.premium-badge::after, .unlock-button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%); transform: translateX(-120%); animation: gold-shine 3.6s var(--ease) infinite; pointer-events: none; }
@keyframes gold-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* Locked durations: the gold lock sits beside the length, and a gold ring shows on hover. */
.segmented label.locked span { display: flex; align-items: center; justify-content: center; gap: 6px; padding-right: 20px; color: var(--gold-ink); background: linear-gradient(135deg, rgba(255, 248, 225, .9), rgba(251, 231, 176, .7)); box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .6); }
.segmented label.locked:hover span { background: linear-gradient(135deg, #fff8e1, #fbe7b0); color: var(--gold-ink); box-shadow: inset 0 0 0 1.5px var(--gold), 0 6px 16px var(--gold-glow); }
.avatar-upload.locked span.circle { opacity: .55; }

/* "Unlock Premium" in the plan line */
.unlock-button { position: relative; display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; padding: 6px 14px 6px 10px; border: 0; border-radius: 999px; overflow: hidden; vertical-align: middle; background: linear-gradient(135deg, #2a2116 0%, #141210 100%); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .55), 0 6px 18px rgba(20, 18, 16, .22); font: 700 13px var(--sans); letter-spacing: .01em; transition: transform .2s var(--ease), box-shadow .2s; }
.unlock-button:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--gold), 0 10px 24px var(--gold-glow); }
.unlock-button span { background: linear-gradient(90deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Script model picker */
.model-picker { position: relative; }
.model-button { display: flex; align-items: center; gap: 10px; width: 100%; height: 56px; padding: 0 20px 0 18px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); font: 600 17px var(--sans); text-align: left; transition: box-shadow .2s; }
.model-button:hover { box-shadow: 0 0 0 1.5px var(--muted); }
.model-button:focus-visible, .model-picker.is-open .model-button { outline: none; box-shadow: 0 0 0 3px var(--green); }
.model-tier { color: var(--muted); font-weight: 500; }
.model-chevron { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-25%) rotate(45deg); transition: transform .25s var(--ease); }
.model-picker.is-open .model-chevron { transform: translateY(20%) rotate(225deg); }
.model-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow); outline: none; animation: model-in .22s var(--ease); }
@keyframes model-in { from { opacity: 0; transform: translateY(-6px); } }
.model-option { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.model-option + .model-option { margin-top: 2px; }
.model-option.is-active { background: #f3f1ec; }
.model-option[aria-selected="true"] .model-option-name::after { content: "✓"; margin-left: 8px; color: var(--green); }
.model-option-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.model-option-name { font-weight: 700; font-size: 16px; }
.model-option-note { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.model-option-side { flex: none; }
.model-credits { color: var(--muted); font-size: 11px; }
.model-option.is-locked { position: relative; margin-top: 6px; background: linear-gradient(135deg, #fffaf0 0%, #fdf0cf 100%); box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .55); }
.model-option.is-locked.is-active { background: linear-gradient(135deg, #fff6e0 0%, #fbe6b2 100%); box-shadow: inset 0 0 0 1.5px var(--gold), 0 8px 22px var(--gold-glow); }
.model-option.is-locked .model-option-name { color: var(--gold-ink); }
.model-option.is-locked .model-option-note { color: #7a5a1c; }

/* Create custom template, for free visitors */
.create-template-option.is-premium { position: relative; border-color: rgba(229, 180, 74, .75); background: linear-gradient(135deg, rgba(255, 250, 238, .9), rgba(253, 240, 207, .75)); }
.create-template-option.is-premium:hover { border-color: var(--gold); box-shadow: 0 10px 26px var(--gold-glow); }
.create-template-option.is-premium > span:first-child { background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); color: var(--gold-ink); }
.create-template-option.is-premium .premium-badge { position: absolute; top: -12px; right: 16px; }
.premium-badge { flex: none; }
.btn.is-premium { gap: 10px; }
.btn.is-premium .premium-badge { padding: 4px 10px 4px 7px; font-size: 10px; box-shadow: inset 0 0 0 1px rgba(168, 116, 26, .45); }

@media (prefers-reduced-motion: reduce) {
  .premium-badge::after, .unlock-button::after { animation: none; display: none; }
  .model-list { animation: none; }
}
@media (max-width: 520px) {
  .model-option { flex-wrap: wrap; }
  .model-option-side { width: 100%; }
}
.account-plan { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #e9f6ee; color: var(--green-deep); text-decoration: none; transition: background .2s; }
.account-plan:hover { background: #d7efe0; }
.account-plan svg { flex: none; width: 18px; height: 18px; }
.account-plan span { flex: 1; display: grid; }
.account-plan strong { font-weight: 700; }
.account-plan small { color: var(--muted); font-size: 13px; font-weight: 500; }
.account-plan i { font-style: normal; font-weight: 700; }
.account-plan + .account-signout { margin-top: 8px; }
.checkout-page .checkout { padding: 44px 0 80px; }
.checkout-page .section-head { margin-bottom: 30px; }
.checkout-status { margin-bottom: 24px; padding: 16px 20px; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); font-weight: 600; }
.checkout-status[data-tone="success"] { background: #e9f6ee; color: var(--green-deep); box-shadow: 0 0 0 1.5px #bfe5cd; }
.checkout-status[data-tone="error"] { background: #fdecea; color: #a5301f; box-shadow: 0 0 0 1.5px #f5c6bf; }

.pay-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(12, 11, 10, .55);
  backdrop-filter: blur(8px);
}
.pay-overlay[hidden] { display: none; }
.pay-overlay-card {
  width: min(400px, 100%);
  padding: 28px 26px 24px;
  border-radius: 28px;
  background: var(--card);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .4);
  animation: payOverlayIn .35s var(--ease);
}
@keyframes payOverlayIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.pay-spinner {
  width: 44px; height: 44px; margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid #e5efe8;
  border-top-color: var(--green);
  animation: paySpin .8s linear infinite;
}
@keyframes paySpin { to { transform: rotate(360deg); } }
.pay-overlay-title { margin: 0; font-size: 22px; letter-spacing: -.02em; font-weight: 700; }
.pay-overlay-copy { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.pay-progress {
  position: relative; overflow: hidden;
  height: 6px; margin: 22px 0 0; border-radius: 999px; background: #eceae5;
}
.pay-progress span {
  position: absolute; inset: 0 auto 0 0; width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #3ecf7a);
  animation: payBar 1.15s var(--ease) infinite;
}
@keyframes payBar {
  0% { left: -42%; }
  100% { left: 100%; }
}
.pay-steps {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: grid; gap: 8px; text-align: left; font-size: 13px; color: var(--muted);
}
.pay-steps li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px; background: #f5f3ef;
}
.pay-steps li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #cfc9bf;
}
.pay-steps li.is-done { color: var(--green-deep); background: #e9f6ee; }
.pay-steps li.is-done::before { background: var(--green); }
.pay-steps li.is-active { color: var(--ink); font-weight: 600; background: #eef7f1; }
.pay-steps li.is-active::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(30, 158, 88, .18);
  animation: payPulse 1.2s ease-in-out infinite;
}
@keyframes payPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(30, 158, 88, .12); }
  50% { box-shadow: 0 0 0 6px rgba(30, 158, 88, .22); }
}
.download-progress span.is-determinate { animation: none; transition: width .2s linear; }
@media (prefers-reduced-motion: reduce) {
  .pay-overlay-card { animation: none; }
  .pay-spinner, .pay-progress span, .pay-steps li.is-active::before { animation: none; }
  .pay-progress span:not(.is-determinate) { left: 29%; width: 42%; }
  .download-progress span.is-determinate { transition: none; }
}

/* Backend busy / high traffic */
.busy-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  position: fixed;
  inset: 0;
  width: fit-content;
  height: fit-content;
  max-width: calc(100vw - 32px);
  margin: auto;
}
.busy-dialog::backdrop { background: rgba(12, 11, 10, .72); backdrop-filter: blur(6px); }
.busy-panel {
  width: min(440px, calc(100vw - 32px));
  padding: 32px 28px 26px;
  border-radius: 28px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  animation: payOverlayIn .4s var(--ease);
}
.busy-panel .eyebrow { margin-bottom: 12px; }
.busy-panel h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.busy-copy { margin-top: 12px; color: var(--muted); line-height: 1.5; }
.busy-support { margin-top: 16px; font-size: 15px; line-height: 1.45; }
.busy-support a { color: var(--green-deep); font-weight: 700; text-decoration: none; }
.busy-support a:hover { text-decoration: underline; }
.busy-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.busy-actions .btn { flex: 1 1 160px; justify-content: center; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .busy-panel { animation: none; }
}
.current-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; padding: 24px 26px; border-radius: 24px; background: var(--ink); color: #fff; }
.current-plan .mono { color: rgba(255, 255, 255, .6); }
.current-plan h3 { margin-top: 4px; font-size: 24px; letter-spacing: -.02em; }
.current-plan p:last-child { margin-top: 4px; color: rgba(255, 255, 255, .72); }
.current-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.current-plan .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }

@media (max-width: 980px) {
  .plan-grid { grid-template-columns: 1fr; max-width: 520px; }
  /* Only the header's own links hide on phones; Sign in and the account menu stay. */
  .nav nav > a:not(.nav-cta) { display: none; }
  section { padding: 80px 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 44px; }
  .hero-stage { margin-top: 12px; }
  .template-explorer, .studio-grid { grid-template-columns: 1fr; gap: 40px; }
  .field-pair { grid-template-columns: 1fr; }
  .avatar-hint { margin-top: -10px; }
  .template-explorer .phone { margin: 0 auto; }
  .output { position: static; }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
  .steps h3 { margin-top: 16px; }
}
@media (max-width: 560px) {
  .nav { padding-left: 16px; }
  .nav .nav-cta { white-space: nowrap; padding: 8px 14px; font-size: 14px; }
  .hero > * { min-width: 0; }
  .hero-form { max-width: 100%; }
  .eyebrow { flex-wrap: wrap; }
  .float-a { left: 0; }
  .float-b { right: 0; }
  .float-c { left: 2%; }
  .hero-form { flex-direction: column; border-radius: 28px; }
  .hero-form input { min-height: 48px; }
  .template-options, .model-options { grid-template-columns: 1fr; }
  .segmented { display: flex; }
  .segmented label { flex: 1; text-align: center; }
  .segmented span, .segmented label.locked span { padding: 10px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
}

/* Purchase celebration */
.celebrate-dialog { padding: 0; border: 0; background: transparent; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: visible; }
.celebrate-dialog::backdrop { background: rgba(12, 11, 10, .72); backdrop-filter: blur(6px); }
.celebrate-dialog[open] .celebrate-panel { animation: celebrateIn .7s var(--ease); }
@keyframes celebrateIn { from { opacity: 0; transform: translateY(26px) scale(.94); } }
.celebrate-panel { position: relative; overflow: hidden; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px 30px 26px; background: var(--card); color: var(--ink); border-radius: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); text-align: center; }
.celebrate-burst { position: absolute; inset: -40% -20% auto; height: 380px; background: radial-gradient(closest-side, rgba(56, 161, 105, .22), transparent); pointer-events: none; }
.celebrate-anim { position: relative; width: 150px; height: 150px; margin: 0 auto -6px; }
.celebrate-eyebrow { position: relative; color: var(--green-deep); }
.celebrate-panel h3 { position: relative; margin-top: 6px; font-size: 34px; line-height: 1.05; letter-spacing: -.03em; }
.celebrate-panel h3 em { color: var(--green); }
.celebrate-credits { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 18px; padding: 12px 22px; border-radius: 20px; background: #e9f6ee; color: var(--green-deep); }
.celebrate-credits strong { font-size: 44px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.celebrate-credits span { font-weight: 600; }
.celebrate-carry { margin-top: 8px; color: var(--muted); font-size: 14px; }
.celebrate-benefits { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; text-align: left; font-size: 15px; }
.celebrate-benefits li { display: flex; gap: 10px; align-items: flex-start; opacity: 0; transform: translateY(8px); animation: benefitIn .5s var(--ease) forwards; animation-delay: calc(.9s + var(--i) * .08s); }
.celebrate-benefits svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
@keyframes benefitIn { to { opacity: 1; transform: none; } }
.celebrate-renew { margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.celebrate-cta { width: 100%; margin-top: 18px; }
.celebrate-close { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  .celebrate-dialog[open] .celebrate-panel { animation: none; }
  .celebrate-benefits li { animation: none; opacity: 1; transform: none; }
}
@media (max-height: 800px) {
  .celebrate-anim { width: 112px; height: 112px; }
  .celebrate-panel h3 { font-size: 28px; }
  .celebrate-credits { margin-top: 12px; }
  .celebrate-benefits { margin-top: 14px; padding-top: 14px; gap: 7px; }
}

/* Custom templates: My templates on the landing page */
.my-templates { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--rule); }
.my-templates-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.my-templates-head h3 { font-size: 34px; letter-spacing: -.025em; line-height: 1.1; }
.my-templates-head p { margin-top: 8px; color: var(--soft); max-width: 520px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tpl-card { display: flex; flex-direction: column; min-height: 100%; background: var(--card); color: var(--ink); border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--line); transition: transform .35s var(--ease), box-shadow .3s; }
.tpl-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1.5px var(--line), var(--shadow); }
.tpl-cover { position: relative; aspect-ratio: 16 / 10; background: #ebe8e2; overflow: hidden; }
.tpl-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.tpl-cover .swatches { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 5px; padding: 5px; border-radius: 16px; background: rgba(255, 255, 255, .9); }
.tpl-cover .swatches i { width: 16px; height: 16px; }
.tpl-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 18px; }
.tpl-card-body h4 { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.tpl-card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.tpl-card.is-failed .tpl-card-status { color: var(--red); }
.tpl-card-meta { color: var(--muted); text-transform: none; letter-spacing: .02em; margin-top: auto; padding-top: 6px; }
.tpl-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tpl-card-actions .tpl-delete { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 14px; }
.tpl-card-actions .tpl-delete:hover { color: var(--red); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 20px; }
.tpl-card .btn-ghost { color: var(--ink); border-color: var(--line); }
.tpl-empty { grid-column: 1 / -1; padding: 22px 24px; border: 2px dashed var(--rule); border-radius: 20px; color: var(--soft); max-width: 640px; }

/* Custom templates: the create dialog */
.tpl-panel [hidden] { display: none !important; }
.tpl-dialog .tpl-panel { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px; }
.tpl-panel .demo-head { margin-bottom: 14px; }
.tpl-panel h3 { font-size: 28px; }
.tpl-panel h3 em { color: var(--green); }
.tpl-eyebrow { color: var(--muted); margin-bottom: 6px; }
.tpl-lead { color: var(--muted); font-size: 16px; line-height: 1.5; }
.tpl-drop { position: relative; display: grid; justify-items: center; gap: 6px; margin-top: 18px; padding: 28px 18px; border: 2px dashed var(--line); border-radius: 20px; background: #faf9f7; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.tpl-drop:hover, .tpl-drop.over { border-color: var(--green); background: #f1f8f3; }
.tpl-drop:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }
.tpl-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tpl-drop-icon svg { width: 34px; height: 34px; color: var(--green); }
.tpl-drop strong { font-size: 17px; }
.tpl-drop u { color: var(--green); text-underline-offset: 3px; }
.tpl-drop small { color: var(--muted); text-transform: none; letter-spacing: .02em; }
.tpl-files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.tpl-files li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 14px; background: #f5f3ef; }
.tpl-files li.has-problem { background: #fdecea; }
.tpl-file-info { flex: 1; min-width: 0; display: grid; }
.tpl-file-info strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-file-info small { color: var(--muted); text-transform: none; letter-spacing: .02em; }
.tpl-file-problem { color: #a5301f !important; font-weight: 600; font-size: 13px; }
.tpl-file-remove { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.tpl-file-remove:hover { background: rgba(20, 18, 16, .08); color: var(--ink); }
.tpl-file-remove svg { width: 16px; height: 16px; }
.tpl-meter { display: grid; gap: 6px; margin-top: 14px; }
.tpl-meter > span { display: block; height: 8px; border-radius: 4px; background: #ebe8e2; overflow: hidden; }
.tpl-meter i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--green); transition: width .4s var(--ease); }
.tpl-meter i.over { background: var(--red); }
.tpl-meter small { color: var(--muted); text-transform: none; letter-spacing: .02em; }
.tpl-name { display: grid; gap: 6px; margin-top: 18px; font-weight: 700; font-size: 15px; }
.tpl-name small { color: var(--muted); font-weight: 500; }
.tpl-name input { min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-weight: 500; }
.tpl-name input:focus { outline: none; border-color: var(--green); }
.tpl-panel .form-error { margin-top: 12px; font-size: 15px; }
.tpl-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.tpl-cost { flex: 1; min-width: 180px; color: var(--muted); font-size: 14px; }
.tpl-panel .btn-ghost { color: var(--ink); border-color: var(--line); }
.tpl-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.tpl-steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.tpl-step-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); color: transparent; transition: background .3s, border-color .3s; }
.tpl-step-dot svg { width: 14px; height: 14px; }
.tpl-steps li.active { color: var(--ink); }
.tpl-steps li.active .tpl-step-dot { border-color: var(--green); border-top-color: transparent; animation: spin .9s linear infinite; }
.tpl-steps li.done { color: var(--ink); }
.tpl-steps li.done .tpl-step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tpl-success { display: flex; align-items: center; gap: 10px; color: var(--green-deep); font-weight: 600; }
.tpl-success svg { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--green); color: #fff; }
.tpl-kb { margin-top: 16px; padding: 18px; border-radius: 18px; background: #f7f5f1; }
.tpl-kb-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tpl-kb-head h4 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.tpl-kb-head p { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.tpl-kb-head .swatches { display: flex; gap: 5px; flex: none; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tpl-tag { padding: 4px 10px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; }
.tpl-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0 0; font-size: 14px; line-height: 1.45; }
.tpl-facts dt { font-weight: 700; }
.tpl-facts dd { margin: 0; color: #4d4a44; }

.tpl-design { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tpl-design-title { color: var(--muted); }
.tpl-colors { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; }
.tpl-colors li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tpl-colors i { flex: none; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .15); }
.tpl-colors span { flex: 1; min-width: 0; color: #4d4a44; }
.tpl-colors code { font: 500 12px var(--mono); color: var(--muted); }
.tpl-design-facts { margin-top: 12px; }

/* Custom templates in the studio picker */
.custom-option .option-card { display: flex; flex-direction: column; }
.custom-tag { align-self: flex-start; margin-bottom: 6px; padding: 3px 8px; border-radius: 10px; background: #e9f6ee; color: var(--green-deep); text-transform: none; letter-spacing: .02em; }
.custom-option .swatches { display: flex; gap: 5px; margin-top: 10px; }
.custom-option .swatches i { width: 16px; height: 16px; }
.custom-option small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.create-template-option { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 2px dashed var(--rule); border-radius: 20px; background: transparent; color: var(--fg); text-align: left; transition: border-color .2s, transform .35s var(--ease); }
.create-template-option:hover { border-color: var(--green); transform: translateY(-3px); }
.create-template-option > span:first-child { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; font-size: 22px; font-weight: 600; }
.create-template-option strong { display: block; font-size: 17px; }
.create-template-option small { display: block; color: var(--soft); font-size: 14px; }

@media (max-width: 720px) {
  .my-templates-head { flex-direction: column; align-items: flex-start; }
  .tpl-dialog .tpl-panel { padding: 20px; }
  .tpl-facts { grid-template-columns: 1fr; gap: 2px; }
  .tpl-facts dd { margin-bottom: 8px; }
  .tpl-kb-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-steps li.active .tpl-step-dot { animation: none; border-top-color: var(--green); }
}

/* Credits in the top bar: a dark pill with a gold coin and gold figures */
.nav nav > a.credits-pill { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 6px; border-radius: 999px; overflow: hidden; background: linear-gradient(135deg, #2c2318 0%, #141210 100%); color: var(--gold-hi); text-decoration: none; box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .6), 0 6px 16px rgba(20, 18, 16, .2); font-weight: 700; font-size: 14.5px; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s; }
.nav nav > a.credits-pill:hover { color: var(--gold-hi); transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--gold), 0 8px 22px var(--gold-glow); }
.credits-pill .coin { width: 24px; height: 24px; flex: none; filter: drop-shadow(0 1px 2px rgba(122, 82, 16, .5)); }
.credits-count { font-variant-numeric: tabular-nums; letter-spacing: -.01em; background: linear-gradient(180deg, #fff3cc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.credits-word { color: rgba(255, 233, 168, .72); font-size: 12.5px; font-weight: 600; }
.credits-pill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 170, .35) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.credits-pill.is-changed::after { animation: credits-shine 1.1s var(--ease); }
.credits-pill.is-changed .coin { animation: coin-flip .9s var(--ease); }
@keyframes credits-shine { to { transform: translateX(120%); } }
@keyframes coin-flip { 0% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
.nav nav > a.credits-pill.is-empty { box-shadow: inset 0 0 0 1px rgba(229, 180, 74, .35), 0 6px 16px rgba(20, 18, 16, .2); }
.credits-pill.is-empty .credits-count { background: none; color: rgba(255, 233, 168, .55); }
@media (max-width: 720px) {
  .nav nav { gap: 12px; }
  .nav .account-signin { white-space: nowrap; font-size: 14px; }
  .nav nav > a.credits-pill { display: inline-flex; padding: 4px 10px 4px 5px; font-size: 13.5px; }
  .credits-pill .credits-word { display: none; }
  .credits-pill .coin { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) { .credits-pill.is-changed::after, .credits-pill.is-changed .coin { animation: none; } }

/* About, contact and policy pages */
.legal { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 80px; }
.legal h1 { margin-top: 14px; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -.04em; }
.legal-updated { margin-top: 16px; color: var(--soft); }
.legal-lede { margin-top: 28px; font-size: 20px; line-height: 1.55; color: var(--fg); }
.legal section { width: auto; margin: 0; padding: 0; }
.legal section + section { margin-top: 34px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 10px; }
.legal p, .legal li { color: var(--soft); font-size: 16.5px; line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.legal strong { color: var(--fg); font-weight: 600; }
.legal a:not(.btn) { color: var(--green-deep); text-underline-offset: 3px; }
.legal .btn { margin-top: 12px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 30px 0 38px; }
.contact-card { padding: 22px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line), 0 12px 30px rgba(20, 18, 16, .05); }
.contact-card .mono { color: var(--muted); }
.contact-card p + p { margin-top: 8px; }
.contact-card p:not(.mono):not(.contact-note) { color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.5; }
.contact-note { font-size: 14px !important; }

/* "Studio ↗" in the top bar */
.nav .nav-cta { display: inline-flex; align-items: center; gap: 4px; }
.nav-arrow { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.nav .nav-cta:hover .nav-arrow { transform: translate(2px, -2px); }

/* Voice picker: the model picker's look, with a play button on every voice */
.voice-list { max-height: 380px; overflow-y: auto; overscroll-behavior: contain; }
.voice-group { padding: 10px 14px 4px; color: var(--muted); font-size: 10.5px; list-style: none; }
.voice-group:first-child { padding-top: 6px; }
.voice-option { gap: 12px; padding: 9px 12px; }
.voice-sample { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 4px 10px rgba(20, 18, 16, .18); transition: transform .2s var(--ease), background .2s; }
.voice-sample svg { width: 14px; height: 14px; }
.voice-sample:hover { transform: scale(1.08); }
.voice-sample.playing { background: var(--green); box-shadow: 0 0 0 4px rgba(30, 158, 88, .18); }
.voice-sample.loading::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--green); animation: voice-spin .8s linear infinite; }
@keyframes voice-spin { to { transform: rotate(360deg); } }
.voice-option .model-option-name { font-size: 15.5px; }
@media (prefers-reduced-motion: reduce) { .voice-sample.loading::after { animation: none; } }

/* Logo next to the Flixort name */
.brand-logo { width: 30px; height: 30px; flex: none; border-radius: 8px; box-shadow: 0 2px 8px rgba(5, 11, 16, .25); }
.footer .brand-logo { width: 26px; height: 26px; border-radius: 7px; }

/* The studio's page heading is its h1, styled like the other section headings. */
.section-head h1.studio-title { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; }
.studio-title em { font-size: 1.1em; color: inherit; }

/* Narrow phones: keep space between the brand and the credits pill */
.nav { gap: 12px; }
@media (max-width: 720px) {
  .nav { padding-left: 12px; }
  .brand { font-size: 16.5px; gap: 7px; }
  .nav .brand-logo { width: 28px; height: 28px; }
  .nav nav { gap: 10px; }
  .nav .nav-cta { padding: 8px 12px; }
}
/* Very narrow phones: the logo alone stands for the brand in the top bar */
@media (max-width: 370px) {
  .nav .brand { font-size: 0; gap: 0; }
}

/* Search landing pages, /pricing, /faq and /voices (built by tools/build-pages.mjs) */
.seo { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 40px; }
.seo section, .seo .seo-section { width: auto; margin: 0; padding: 0; }
.seo-section { margin-top: 84px !important; }
.seo-section > h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.08; margin-bottom: 26px; }
.seo-section-lede { color: var(--soft); font-size: 17px; margin: -12px 0 22px; max-width: 640px; }
.seo h1 { margin-top: 14px; font-size: clamp(44px, 6.6vw, 84px); line-height: 1; letter-spacing: -.045em; }
.seo h1 em { color: var(--green); }
.seo-lede { margin-top: 22px; max-width: 600px; color: var(--soft); font-size: 20px; line-height: 1.55; }
.seo-lede a { color: var(--green-deep); }
.seo-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center; }
.seo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.seo-actions .btn-ghost { color: var(--ink); border-color: var(--line); }
.seo-note { margin-top: 16px; color: var(--muted); }
.seo-phone { width: 300px; aspect-ratio: 9 / 16; border-radius: 40px; padding: 10px; background: #111; box-shadow: 0 30px 70px rgba(20, 18, 16, .3); }
.seo-phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; display: block; background: #000; }
.seo-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.seo-steps li, .seo-feature { padding: 24px; border-radius: 24px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line), 0 12px 30px rgba(20, 18, 16, .05); }
.seo-steps .mono { color: var(--green); }
.seo-steps strong { display: block; margin-top: 10px; font-size: 19px; letter-spacing: -.01em; }
.seo-steps p, .seo-feature p { margin-top: 8px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.seo-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.seo-feature h3 { font-size: 19px; letter-spacing: -.01em; }
.seo-prose { max-width: 760px; }
.seo-prose p { color: var(--soft); font-size: 17.5px; line-height: 1.7; }
.seo-prose p + p { margin-top: 14px; }
.seo-faq { display: grid; gap: 10px; max-width: 820px; }
.seo-faq details { border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); }
.seo-faq summary { cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after { content: "+"; color: var(--green); font-size: 22px; line-height: 1; transition: transform .25s var(--ease); }
.seo-faq details[open] summary::after { transform: rotate(45deg); }
.seo-faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.seo-faq a, .seo-prose a { color: var(--green-deep); }
.seo-related { display: flex; flex-wrap: wrap; gap: 10px; }
.seo-related a { padding: 10px 16px; border-radius: 999px; border: 1.5px dashed var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; transition: border-color .2s, transform .3s var(--ease); }
.seo-related a:hover { border-color: var(--green); transform: translateY(-2px); }
.seo-cta { margin-top: 90px !important; padding: 56px 32px !important; border-radius: 34px; text-align: center; background: radial-gradient(120% 140% at 50% 0%, #1b3a2c 0%, #121110 70%); color: #fff; }
.seo-cta h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.035em; }
.seo-cta h2 em { color: #58d594; }
.seo-cta p { margin: 14px auto 26px; max-width: 520px; color: rgba(255, 255, 255, .7); font-size: 17px; }
.seo-pricing-head { margin-top: 0 !important; margin-bottom: 40px !important; }
.seo-table-wrap { overflow-x: auto; border-radius: 22px; box-shadow: 0 0 0 1.5px var(--line); background: var(--card); }
.seo-table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 560px; }
.seo-table th, .seo-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.seo-table tbody tr:last-child th, .seo-table tbody tr:last-child td { border-bottom: 0; }
.seo-table thead th { color: var(--muted); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.seo-table td { font-variant-numeric: tabular-nums; }
.seo-checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px; }
.seo-checks li { position: relative; padding-left: 28px; color: var(--soft); font-size: 16.5px; }
.seo-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.seo-voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 40px; }
.seo-voices + h2, .seo-section > h2 + .seo-voices { margin-top: 0; }
.seo-voice { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); }
.seo-voice .voice-sample { width: 44px; height: 44px; }
.seo-voice h3 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.seo-voice-style { color: var(--green-deep); font-weight: 600; font-size: 14.5px; margin-top: 2px; }
.seo-voice p:last-child { color: var(--muted); font-size: 14.5px; margin-top: 6px; line-height: 1.5; }
.seo-pill { padding: 2px 8px; border-radius: 999px; background: #e9f6ee; color: var(--green-deep); font: 700 11px var(--sans); }
.footer-product a { color: var(--fg); }
@media (max-width: 860px) {
  .seo-hero { grid-template-columns: 1fr; }
  .seo-phone { width: 240px; margin: 0 auto; }
  .seo-section { margin-top: 64px !important; }
}

/* ---------- Lemo-Opuscar film styles: "View all" card and popup ---------- */
.template-column { display: flex; flex-direction: column; gap: 14px; }
.template-options .styles-cta, .template-options .template-group { grid-column: 1 / -1; }
.styles-cta { position: relative; display: flex; align-items: center; gap: 22px; width: 100%; padding: 18px 22px 18px 14px; border: 2px solid var(--ink); border-radius: 24px; background: linear-gradient(120deg, #FFF6E3 0%, #FFE9DA 55%, #EFE6FF 100%); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 6px 6px 0 var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.styles-cta:hover, .styles-cta:focus-visible { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--ink); }
.styles-fan { position: relative; flex: none; width: 190px; height: 138px; }
.styles-fan img { position: absolute; left: 54px; top: 8px; width: 82px; height: 108px; object-fit: cover; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 10px 22px rgba(20, 18, 16, .28); transform-origin: 50% 110%; transition: transform .4s var(--ease); }
.styles-fan img:nth-child(1) { transform: translateX(-34px) rotate(-14deg); }
.styles-fan img:nth-child(2) { z-index: 1; transform: translateY(-4px); }
.styles-fan img:nth-child(3) { transform: translateX(34px) rotate(14deg); }
.styles-cta:hover .styles-fan img:nth-child(1) { transform: translateX(-40px) rotate(-17deg); }
.styles-cta:hover .styles-fan img:nth-child(2) { transform: translateY(-8px); }
.styles-cta:hover .styles-fan img:nth-child(3) { transform: translateX(40px) rotate(17deg); }
.styles-cta-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.styles-cta-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #C2410C; }
.styles-cta strong { font-size: 24px; line-height: 1.1; }
.styles-cta small { color: var(--soft); font-size: 14px; line-height: 1.4; }
.styles-cta-arrow { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 22px; transition: transform .3s var(--ease); }
.styles-cta:hover .styles-cta-arrow { transform: translateX(4px); }
@media (max-width: 560px) {
  .styles-cta { gap: 12px; padding: 14px 14px 14px 14px; }
  .styles-fan { width: 122px; height: 112px; }
  .styles-fan img { left: 30px; width: 62px; height: 84px; }
  .styles-fan img:nth-child(1) { transform: translateX(-24px) rotate(-14deg); }
  .styles-fan img:nth-child(3) { transform: translateX(24px) rotate(14deg); }
  .styles-cta strong { font-size: 19px; }
  .styles-cta-arrow { display: none; }
}
.styles-panel { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.styles-sub { margin: 2px 0 0; font-size: 12px; opacity: .65; }
.styles-list-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.styles-search { margin: 12px 0 8px; padding: 12px 16px; border: 1.5px solid var(--rule); border-radius: 14px; font: inherit; background: transparent; color: inherit; }
.styles-list { overflow-y: auto; max-height: min(66vh, 640px); padding-right: 4px; overscroll-behavior: contain; }
.styles-group { margin: 16px 0 6px; }
.styles-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 10px 6px; border-bottom: 1px solid var(--rule); }
.styles-row .swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0; }
.styles-row .swatches i { width: 13px; height: 13px; }
.styles-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.styles-text small { opacity: .7; line-height: 1.35; }
.styles-actions { display: flex; align-items: center; gap: 8px; }
.styles-actions .demo-cta { margin: 0; }
.styles-use { padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 16px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.styles-player-view { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.styles-player-view video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 16px; background: #111; }
.styles-back { align-self: flex-start; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.styles-player-actions:empty { display: none; }
@media (max-width: 560px) {
  .styles-row { grid-template-columns: auto 1fr; }
  .styles-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.styles-group.is-trending { margin-top: 4px; color: #C2410C; }
.styles-row.is-trending { background: linear-gradient(90deg, rgba(255, 186, 120, .16), transparent 70%); border-radius: 12px; }
.styles-player-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.styles-step { padding: 10px 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.styles-step:hover, .styles-step:focus-visible { background: var(--ink); color: #fff; }
.styles-count { font-size: 13px; opacity: .65; }

/* Activity: one person, one place. The numbers are people, and the first group adds up to the total. */
.activity { padding: 56px 0 96px; }
.activity h2 { font-size: clamp(56px, 8vw, 96px); }
.activity h3 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; }
.activity-when { color: var(--muted); margin-top: 8px; font-size: 18px; }
.activity-ranges { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.activity-ranges .btn { min-height: 40px; padding: 0 16px; }
.activity-ranges .btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.activity-status, .activity-denied { margin-top: 28px; color: var(--muted); font-size: 18px; }
.activity-people { display: flex; align-items: baseline; gap: 16px; margin: 18px 0 0; }
.activity-people strong { font-family: var(--serif); font-weight: 400; font-size: clamp(88px, 14vw, 156px); letter-spacing: -.045em; line-height: .85; }
.activity-people span { color: var(--muted); font-size: 22px; }
.flow-head { margin: 56px 0 8px; }
.flow-head p { color: var(--muted); margin-top: 6px; }
.flow { list-style: none; margin: 0; padding: 0; }
.flow-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 18px; align-items: center; padding: 18px 0 14px; border-top: 1px solid var(--line); }
.flow-count { font-family: var(--serif); font-size: 44px; font-weight: 400; line-height: 1; letter-spacing: -.03em; }
.flow-copy strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.flow-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.flow-bar { display: block; height: 5px; margin-top: 10px; border-radius: 5px; background: #e7e4de; overflow: hidden; }
.flow-bar span { display: block; height: 100%; border-radius: 5px; background: var(--green); }
.flow-nested { grid-column: 1 / -1; margin: 4px 0 0 88px; }
.flow-nested .flow-row { padding: 12px 0; }
.flow-nested .flow-count { font-size: 32px; color: var(--green-deep); }
.is-of .flow-copy strong::before { content: "Of those, "; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) {
  .flow-row { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; }
  .flow-count { font-size: 36px; }
  .flow-nested { margin-left: 12px; }
}
