@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&family=Instrument+Serif:ital@0;1&display=swap");

/* ==========================================================================
   AI Journalist design system
   Light is the default; add data-theme="dark" on <html> for the dark palette.
   ========================================================================== */

:root {
  color-scheme: light;

  /* surfaces */
  --bg: #f4f5fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --surface-3: #eceef6;
  --surface-glass: rgba(255, 255, 255, .76);

  /* text */
  --ink: #0d1017;
  --ink-soft: #39415a;
  --muted: #6b7488;
  --faint: #939bad;

  /* lines */
  --line: #e5e7f0;
  --line-strong: #d5d9e6;

  /* brand */
  --brand: #4f46e5;
  --brand-2: #8b5cf6;
  --brand-ink: #ffffff;
  --brand-soft: rgba(79, 70, 229, .09);
  --brand-softer: rgba(79, 70, 229, .05);
  --brand-line: rgba(79, 70, 229, .22);
  --ring: rgba(79, 70, 229, .22);

  /* status */
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --danger-line: #fbd5d0;
  --success: #067647;
  --success-soft: #ecfdf3;
  --success-line: #c7ecd9;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --warn-line: #fbe3ac;
  --info: #3538cd;
  --info-soft: #eef4ff;

  /* legacy aliases kept so older markup keeps working */
  --paper: var(--bg);
  --card: var(--surface);
  --accent: var(--brand);
  --accent-dark: #3730a3;
  --accent-soft: var(--brand-soft);
  --gold: var(--warn);
  --green: var(--success);
  --green-soft: var(--success-soft);
  --blue: var(--info);
  --blue-soft: var(--info-soft);
  --amber-soft: var(--warn-soft);
  --shadow: var(--shadow-md);

  /* elevation */
  --shadow-xs: 0 1px 2px rgba(16, 20, 38, .05);
  --shadow-sm: 0 1px 2px rgba(16, 20, 38, .05), 0 2px 6px rgba(16, 20, 38, .04);
  --shadow-md: 0 2px 4px rgba(16, 20, 38, .04), 0 10px 24px -6px rgba(16, 20, 38, .10);
  --shadow-lg: 0 24px 60px -20px rgba(24, 28, 52, .30);
  --glow: 0 12px 32px -14px rgba(79, 70, 229, .55);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --serif: "Instrument Serif", "Georgia", "Noto Serif", "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #080a0f;
  --bg-elevated: #0e1118;
  --surface: #11141c;
  --surface-2: #161a24;
  --surface-3: #1d2230;
  --surface-glass: rgba(12, 15, 22, .72);

  --ink: #eef1f8;
  --ink-soft: #c4cbdb;
  --muted: #8b94a8;
  --faint: #6b7488;

  --line: #222838;
  --line-strong: #2f374b;

  --brand: #7c83ff;
  --brand-2: #a78bfa;
  --brand-ink: #0b0d14;
  --brand-soft: rgba(124, 131, 255, .14);
  --brand-softer: rgba(124, 131, 255, .07);
  --brand-line: rgba(124, 131, 255, .32);
  --ring: rgba(124, 131, 255, .35);

  --danger: #ff6b5c;
  --danger-soft: rgba(255, 107, 92, .12);
  --danger-line: rgba(255, 107, 92, .3);
  --success: #4ade9b;
  --success-soft: rgba(74, 222, 155, .12);
  --success-line: rgba(74, 222, 155, .28);
  --warn: #fbbf5c;
  --warn-soft: rgba(251, 191, 92, .12);
  --warn-line: rgba(251, 191, 92, .28);
  --info: #93b4ff;
  --info-soft: rgba(147, 180, 255, .12);

  --accent-dark: #a5b0ff;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .45), 0 16px 40px -12px rgba(0, 0, 0, .65);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --glow: 0 14px 40px -18px rgba(124, 131, 255, .7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 100% -10%, rgba(139, 92, 246, .10), transparent 60%),
    radial-gradient(760px 460px at -10% 0%, rgba(79, 70, 229, .10), transparent 58%);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(900px 520px at 100% -10%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(760px 460px at -10% 0%, rgba(79, 70, 229, .18), transparent 58%);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--brand-soft); color: var(--ink); }

.wrap { width: min(1200px, 92vw); margin: 0 auto; }
.narrow { width: min(780px, 92vw); margin: 0 auto; }
.row { display: flex; gap: 14px; align-items: center; }
.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .82rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 650; font-size: 1rem; letter-spacing: -.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  box-shadow: var(--glow);
}
:root[data-theme="dark"] .brand-mark { color: #0b0d14; }
.brand .tag {
  font-size: .63rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--brand-line); padding: 2px 7px; border-radius: 999px;
  background: var(--brand-soft);
}
.nav-links { display: flex; gap: 22px; align-items: center; font-size: .89rem; font-weight: 500; }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { .nav-links { gap: 14px; } }

/* theme switch */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  cursor: pointer; transition: .16s ease; flex: none;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px; cursor: pointer;
  padding: 10px 16px; font: inherit; font-weight: 550; font-size: .9rem; letter-spacing: -.01em;
  background: var(--ink); color: var(--bg); transition: transform .12s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-accent {
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: var(--glow);
}
:root[data-theme="dark"] .btn-accent { color: #0a0c12; }
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.btn-soft { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.btn-soft:hover { background: var(--brand-softer); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-plain { background: transparent; border-color: transparent; color: var(--muted); }
.btn-plain:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 7px 11px; font-size: .8rem; border-radius: 9px; }
.btn-lg { padding: 13px 22px; font-size: .96rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------- forms */

label.field { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); margin-bottom: 6px; }
.input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder, textarea::placeholder { color: var(--faint); }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b94a8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* switch (checkbox pill) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .84rem; color: var(--ink-soft); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 34px; height: 20px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--line); position: relative; transition: .16s ease; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-xs); transition: .16s ease;
}
.switch input:checked + .track { background: linear-gradient(140deg, var(--brand), var(--brand-2)); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--ring); }

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px;
}
.card-flat { box-shadow: none; }
.card h2, .card h3 { margin-top: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .71rem; font-weight: 600;
  letter-spacing: .01em; padding: 3px 8px; border-radius: 999px;
  background: var(--info-soft); color: var(--info); border: 1px solid transparent;
}
.badge.green { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }
.badge.amber { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.red { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge.grey { background: var(--surface-3); color: var(--muted); }

.error-box { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line); padding: 10px 12px; border-radius: 10px; font-size: .86rem; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); padding: 10px 12px; border-radius: 10px; font-size: .84rem; }

/* ---------------------------------------------------------------- landing */

.hero { padding: clamp(52px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 650;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; display: inline-block; border-radius: 2px; }
.hero h1 { max-width: 20ch; letter-spacing: -.03em; }
.hero .lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 54ch; margin-bottom: 28px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.hero-note { display: flex; gap: 18px; flex-wrap: wrap; font-size: .79rem; color: var(--muted); margin-top: 20px; }
.hero-note span { display: inline-flex; gap: 7px; align-items: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; box-shadow: 0 0 0 3px var(--success-soft); }

.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: block; }
.mock-body { padding: 22px; }
.mock-line { height: 8px; border-radius: 4px; background: var(--surface-3); margin-bottom: 9px; }
.mock-line.w60 { width: 60%; } .mock-line.w80 { width: 80%; } .mock-line.w40 { width: 40%; }
.mock-title { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.15; margin-bottom: 14px; color: var(--ink); }
.mock-tag { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .1em; color: var(--brand); background: var(--brand-soft); border-radius: 5px; padding: 3px 7px; margin-bottom: 10px; }

.section { padding: clamp(44px, 6vw, 76px) 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 34px; }
.section-head p { color: var(--muted); }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-xs); transition: .18s ease;
}
.feature:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-strong); }
.feature h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .9rem; }
.feature .ico {
  width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 650; margin-bottom: 14px; font-size: .85rem;
  border: 1px solid var(--brand-line); font-family: var(--sans);
}

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow-xs);
}
.price-card.featured { border-color: var(--brand-line); box-shadow: var(--glow); }
.price-card .amount { font-family: var(--serif); font-size: 2.4rem; font-weight: 400; line-height: 1; margin: 12px 0 4px; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 24px; font-size: .89rem; color: var(--ink-soft); }
.price-card li { padding: 6px 0 6px 22px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 30px 0; font-size: .84rem; color: var(--muted); }
.site-footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; align-items: center; }

/* -------------------------------------------------- landing: hero extras */

.hero-cta { gap: 12px; }
.hero-cta .btn { white-space: nowrap; }

.audience {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: clamp(34px, 5vw, 56px); padding-top: 22px; border-top: 1px solid var(--line);
}
.audience-label { font-size: .67rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.audience-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.audience-list li {
  font-size: .78rem; font-weight: 550; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* animated waveform in the hero mock */
.mock-wave { position: relative; margin: 8px 0 4px; overflow: hidden; border-radius: 6px; }
.mock-wave svg { width: 100%; height: 40px; display: block; }
.mock-wave rect {
  fill: var(--brand); opacity: .55;
  transform-box: fill-box; transform-origin: 50% 50%;
  animation: waveBar 1.15s ease-in-out infinite alternate;
}
.mock-wave rect:nth-child(3n) { animation-delay: -.35s; animation-duration: .9s; }
.mock-wave rect:nth-child(3n+1) { animation-delay: -.7s; animation-duration: 1.35s; }
@keyframes waveBar { from { transform: scaleY(.4); } to { transform: scaleY(1); } }

/* -------------------------------------------------- landing: showcase */

.showcase {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.sc-chrome {
  display: flex; align-items: center; gap: 7px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.sc-chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: block; }
.sc-url {
  margin-left: 10px; font-size: .72rem; color: var(--faint); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
}

/* ---------------------------------------------------------- scene 1 · press */
.sc-intro {
  position: absolute; inset: 0; z-index: 8; overflow: hidden; background: #0a0f1e;
  display: grid; place-items: center;
  transition: opacity .75s ease, transform .75s cubic-bezier(.4, 0, .2, 1);
}
.sc-intro.gone { opacity: 0; transform: scale(1.03); pointer-events: none; }
.sc-press { position: absolute; inset: 0; width: 100%; height: 100%; }

.sc-vf { position: absolute; inset: 0; pointer-events: none; }
.sc-vf .c {
  position: absolute; width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, .55);
}
.sc-vf .tl { top: 22px; left: 22px; border-right: 0; border-bottom: 0; }
.sc-vf .tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; }
.sc-vf .bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; }
.sc-vf .br { bottom: 22px; right: 22px; border-left: 0; border-top: 0; }
.sc-vf-rec {
  position: absolute; top: 30px; left: 66px; display: inline-flex; align-items: center; gap: 7px;
  font-size: .66rem; font-weight: 800; letter-spacing: .16em; color: #fff;
  background: rgba(220, 38, 38, .92); border-radius: 5px; padding: 4px 9px;
}
.sc-vf-rec i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: scBlink 1.1s steps(1) infinite; }
.sc-vf-tc {
  position: absolute; top: 30px; right: 66px; font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; color: #fff; background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 5px; padding: 4px 9px;
  font-variant-numeric: tabular-nums;
}
.sc-vf-label {
  position: absolute; top: 74px; left: 66px; font-size: .62rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .7);
}
.sc-flash {
  position: absolute; width: 130px; height: 130px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 62%);
  opacity: 0; animation: scFlash 3.2s ease-out infinite;
}
.sc-flash.f1 { left: 6%; bottom: 8%; animation-delay: .2s; }
.sc-flash.f2 { right: 8%; bottom: 14%; animation-delay: 1.1s; }
.sc-flash.f3 { left: 26%; bottom: 4%; animation-delay: 2s; }
.sc-flash.f4 { right: 30%; bottom: 2%; animation-delay: 2.6s; }

.sc-lower3 {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 24px 18px;
  background: linear-gradient(to top, rgba(6, 10, 22, .95), rgba(6, 10, 22, 0));
  color: #fff; animation: scIn .6s ease .3s both;
}
.sc-lower3 b {
  display: block; font-family: var(--serif); font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  line-height: 1.2; letter-spacing: -.01em;
}
.sc-lower3 span { display: block; margin-top: 5px; font-size: .74rem; color: rgba(255, 255, 255, .68); }

@keyframes scBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .15; } }
@keyframes scFlash {
  0%, 88% { opacity: 0; transform: scale(.6); }
  90% { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* ------------------------------------------------------------ scene 2 · studio */
.sc-body { display: grid; grid-template-columns: 318px minmax(0, 1fr); }
@media (max-width: 900px) { .sc-body { grid-template-columns: 1fr; } }

.sc-side {
  padding: 20px; border-right: 1px solid var(--line); background: var(--surface-2);
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-width: 900px) { .sc-side { border-right: 0; border-bottom: 1px solid var(--line); } }
.sc-kicker { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }

.sc-file {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 10px;
}
.sc-thumb {
  position: relative; border-radius: 9px; overflow: hidden; background: #0d1326;
  border: 1px solid var(--line);
}
.sc-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-dur {
  position: absolute; left: 5px; bottom: 5px; font-size: .72rem; font-weight: 800;
  letter-spacing: .02em; background: rgba(0, 0, 0, .78); color: #fff;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 6px; padding: 3px 7px;
  font-variant-numeric: tabular-nums;
}
.sc-rec-dot {
  position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .28);
  animation: scBlink 1.4s steps(1) infinite;
}
.sc-file b { display: block; font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-file .sc-fmeta { font-size: .7rem; color: var(--muted); display: block; margin-top: 3px; }
.sc-file .sc-fdur {
  display: inline-block; margin-top: 7px; font-size: .72rem; font-weight: 700;
  color: var(--brand); background: var(--brand-softer); border: 1px solid var(--brand-line);
  border-radius: 7px; padding: 3px 8px;
}

.sc-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--line); }
.sc-bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .22s linear;
}
.sc-stage { display: flex; justify-content: space-between; gap: 10px; font-size: .74rem; color: var(--muted); }
.sc-stage b { color: var(--ink); font-weight: 600; }

.sc-steps { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 9px; }
.sc-steps li { display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 9px; align-items: start; color: var(--faint); }
.sc-steps li i {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; font-size: .6rem; font-style: normal; line-height: 1; color: transparent;
}
.sc-steps li b { display: block; font-size: .8rem; font-weight: 600; }
.sc-steps li span { display: block; font-size: .69rem; color: var(--muted); }
.sc-steps li.on { color: var(--ink); }
.sc-steps li.on i { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.sc-steps li.done { color: var(--ink-soft); }
.sc-steps li.done i { border-color: var(--success); background: var(--success-soft); color: var(--success); }

/* ---------------------------------------------------------------- right panel */
.sc-main { padding: 20px; display: flex; flex-direction: column; gap: 13px; min-width: 0; }

.sc-topline { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sc-stepbtn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: .82rem; font-weight: 650; color: var(--muted); font-family: inherit;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px;
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.sc-stepbtn i {
  width: 19px; height: 19px; border-radius: 6px; font-style: normal; font-size: .7rem;
  font-weight: 800; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); transition: inherit;
}
.sc-stepbtn.on { color: var(--ink); border-color: var(--brand-line); background: var(--brand-softer); box-shadow: 0 0 0 3px var(--ring); }
.sc-stepbtn.on i { background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; }
.sc-stepbtn.done { color: var(--brand); border-color: var(--brand-line); }
.sc-stepbtn.done i { background: var(--brand); color: #fff; }
.sc-stepbtn.click { animation: scClick .55s ease; }
@keyframes scClick {
  0%, 100% { transform: none; }
  35% { transform: scale(.94); }
  70% { transform: scale(1.03); }
}

.sc-stage-inline {
  margin-left: auto; font-size: .76rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}

.sc-langs { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.sc-lang {
  font-size: .76rem; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  cursor: pointer; font-family: inherit; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.sc-lang:hover { border-color: var(--brand-line); color: var(--ink); }
.sc-lang.on { color: #fff; background: linear-gradient(140deg, var(--brand), var(--brand-2)); border-color: transparent; box-shadow: var(--glow); }
.sc-lang.more { border-style: dashed; color: var(--faint); cursor: default; }
.sc-lang.more:hover { color: var(--faint); }

.sc-pane {
  position: relative; min-height: 372px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px; overflow: hidden;
}
.sc-view { display: none; }
.sc-view.on { display: block; }
.sc-pane[data-dir="rtl"] .sc-view.on { direction: rtl; text-align: right; }

/* --- processing, shown big --- */
.sc-process { padding: 6px 2px; }
.sc-big-pct {
  display: flex; align-items: baseline; gap: 4px; font-family: var(--serif);
  line-height: .9; color: var(--ink); letter-spacing: -.03em;
}
.sc-big-pct b { font-size: clamp(3.4rem, 9vw, 5.4rem); font-weight: 400; font-variant-numeric: tabular-nums; }
.sc-big-pct span { font-size: clamp(1.1rem, 2.6vw, 1.6rem); color: var(--brand); }
.sc-big-stage { font-size: .82rem; font-weight: 650; color: var(--brand); margin-top: 6px; letter-spacing: .02em; }
.sc-big-bar {
  height: 10px; border-radius: 99px; background: var(--surface-3);
  border: 1px solid var(--line); overflow: hidden; margin: 14px 0 18px;
}
.sc-big-bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s ease;
}
.sc-secs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sc-secs li {
  display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--faint);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.sc-secs li span { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.sc-secs li em { font-style: normal; font-size: .7rem; color: var(--faint); }
.sc-secs li i {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; font-size: .58rem; font-style: normal; color: transparent;
}
.sc-secs li.on { color: var(--ink); border-color: var(--brand-line); background: var(--brand-softer); }
.sc-secs li.on i { border-color: var(--brand); animation: scSpin 1s linear infinite; border-top-color: transparent; }
.sc-secs li.done { color: var(--ink-soft); }
.sc-secs li.done i { border-color: var(--success); background: var(--success-soft); color: var(--success); animation: none; }
@keyframes scSpin { to { transform: rotate(360deg); } }

/* --- text --- */
.sc-tools {
  display: flex; gap: 14px; font-size: .73rem; color: var(--muted); flex-wrap: wrap;
  padding-bottom: 11px; margin-bottom: 15px; border-bottom: 1px solid var(--line);
}
.sc-tools b { color: var(--ink); font-weight: 650; }
.sc-para {
  margin: 0 0 14px; font-size: .93rem; line-height: 1.78; color: var(--ink-soft);
  opacity: 0; transform: translateY(8px); animation: scIn .45s ease forwards;
}
.sc-para:nth-of-type(2) { animation-delay: .1s; }
.sc-para:nth-of-type(3) { animation-delay: .2s; }
.sc-para:nth-of-type(4) { animation-delay: .3s; }

/* --- the article, in full --- */
.sc-art-kicker {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); opacity: 0; animation: scIn .4s ease forwards;
}
.sc-art-h {
  font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.95rem); line-height: 1.14;
  letter-spacing: -.02em; color: var(--ink); margin: 9px 0 0;
  opacity: 0; transform: translateY(8px); animation: scIn .45s ease .05s forwards;
}
.sc-art-dek {
  font-size: .95rem; line-height: 1.6; color: var(--ink-soft); margin: 10px 0 0;
  font-weight: 450; opacity: 0; animation: scIn .45s ease .14s forwards;
}
.sc-art-byline {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  font-size: .72rem; color: var(--muted); margin-top: 14px; padding-top: 12px;
  border-top: 2px solid var(--ink); opacity: 0; animation: scIn .45s ease .2s forwards;
}
.sc-art-byline b { color: var(--ink); font-weight: 650; }
.sc-art-p {
  margin: 15px 0 0; font-size: .95rem; line-height: 1.78; color: var(--ink-soft);
  opacity: 0; transform: translateY(8px); animation: scIn .45s ease forwards;
}
.sc-art-p.p2 { animation-delay: .1s; }
.sc-art-p.p3 { animation-delay: .2s; }
.sc-art-q {
  font-family: var(--serif); font-style: italic; font-size: 1.08rem; line-height: 1.55; color: var(--ink);
  border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; margin: 20px 0 4px;
  opacity: 0; transform: translateY(8px); animation: scIn .45s ease .28s forwards;
}
.sc-pane[data-dir="rtl"] .sc-art-q { border-left: 0; border-right: 3px solid var(--brand); padding: 4px 16px 4px 0; }
.sc-art-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; opacity: 0; animation: scIn .45s ease .36s forwards; }

.sc-skel { display: grid; gap: 14px; padding-top: 4px; }
.sc-skel i {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--line) 37%, var(--surface-3) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
}
.sc-skel i.t { height: 26px; width: 74%; }
.sc-skel i:nth-child(3) { width: 90%; }
.sc-skel i:nth-child(4) { width: 84%; }
.sc-skel i:nth-child(5) { width: 93%; }
.sc-skel i:nth-child(6) { width: 66%; }
.sc-skel-label { font-size: .76rem; color: var(--brand); font-weight: 700; letter-spacing: .04em; }

@keyframes scIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sc-caps { position: relative; min-height: 66px; border-top: 1px solid var(--line); padding-top: 14px; }
.sc-cap {
  position: absolute; left: 0; right: 0; top: 14px; font-size: .85rem; color: var(--muted);
  opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease;
}
.sc-cap.on { opacity: 1; transform: none; }
.sc-cap b {
  display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 3px;
}

@media (max-width: 640px) {
  .sc-side, .sc-main { padding: 15px; }
  .sc-file { grid-template-columns: 78px minmax(0, 1fr); }
  .sc-pane { padding: 14px; min-height: 340px; }
  .sc-stepbtn { padding: 7px 11px; font-size: .78rem; }
  .sc-stage-inline { display: none; }
  .sc-vf .c { width: 22px; height: 22px; }
  .sc-vf-rec, .sc-vf-tc { top: 16px; font-size: .58rem; }
  .sc-vf-rec { left: 34px; }
  .sc-vf-tc { right: 34px; }
  .sc-vf-label { display: none; }
  .sc-lower3 { padding: 14px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-para, .sc-art-h, .sc-art-dek, .sc-art-byline, .sc-art-p, .sc-art-q, .sc-art-tags {
    animation: none !important; opacity: 1; transform: none;
  }
  .sc-intro { transition: none; }
  .sc-flash, .sc-vf-rec i, .sc-rec-dot { animation: none !important; }
  .sc-bar i, .sc-big-bar i { transition: none; }
  .mock-wave rect { animation: none !important; }
}

/* -------------------------------------------------- landing: faq + cta *//* -------------------------------------------------- landing: faq + cta */
.faq-list { display: grid; gap: 10px; }
.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 18px; box-shadow: var(--shadow-xs); transition: border-color .16s ease;
}
.faq[open] { border-color: var(--brand-line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 0; font-size: .97rem; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.25rem; font-weight: 400; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--brand); }
.faq p { color: var(--muted); font-size: .9rem; line-height: 1.6; margin: 0; padding: 0 0 16px; }
.faq p strong { color: var(--ink-soft); }

.cta-band .center-row { justify-content: center; gap: 12px; margin-top: 22px; }
.center-note { justify-content: center; margin-top: 18px; }

/* -------------------------------------------------- landing: footer */

.site-footer .wrap.footer-grid { display: grid; grid-template-columns: 1.1fr 1.6fr; gap: 34px; align-items: start; }
@media (max-width: 860px) { .site-footer .wrap.footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); font-size: .95rem; }
.site-footer nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 560px) { .site-footer nav { grid-template-columns: 1fr 1fr; } }
.footer-col { display: grid; gap: 7px; align-content: start; }
.footer-col h3 {
  font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 3px;
}
.footer-col a { color: var(--ink-soft); font-size: .86rem; }
.footer-col a:hover { color: var(--brand); text-decoration: none; }

/* ------------------------------------------------------------------- auth */

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 44px 20px;
  background-image:
    radial-gradient(700px 420px at 15% 0%, rgba(79, 70, 229, .14), transparent 60%),
    radial-gradient(600px 380px at 90% 100%, rgba(139, 92, 246, .12), transparent 60%);
}
.auth-card { width: min(440px, 100%); }
.auth-card .card { box-shadow: var(--shadow-lg); }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 22px; border: 1px solid var(--line); }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px;
  font: inherit; font-weight: 550; font-size: .88rem; color: var(--muted); cursor: pointer; transition: .16s ease;
}
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.form-stack > * + * { margin-top: 14px; }

/* ----------------------------------------------------------------- studio */

body.studio { background-attachment: fixed; }
.studio-page { padding: 22px 0 60px; }
.studio-layout { display: grid; grid-template-columns: 352px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1120px) { .studio-layout { grid-template-columns: 1fr; } }

/* app nav inside header */
.app-nav { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.app-nav button {
  border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 550;
  color: var(--muted); padding: 6px 13px; border-radius: 8px; cursor: pointer; transition: .16s ease;
}
.app-nav button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.app-nav button:hover:not(.active) { color: var(--ink-soft); }

/* composer (left column) */
.composer { border-radius: var(--radius-lg); display: grid; gap: 0; padding: 0; overflow: hidden; }
.composer-head { padding: 18px 20px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.composer-head .kicker { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.composer-head h2 { font-family: var(--sans); font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; margin: 4px 0 0; }
.composer-body { padding: 0 20px 18px; display: grid; gap: 16px; }
.composer-foot { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 12px; }

.dropzone {
  position: relative; display: grid; place-items: center; text-align: center; gap: 8px;
  padding: 26px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px dashed var(--line-strong); background: var(--surface-2);
  transition: .18s ease; overflow: hidden;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-softer); }
.dropzone.over { box-shadow: inset 0 0 0 1px var(--brand-line); }
.dropzone-badge {
  position: absolute; top: 10px; right: 10px; font-size: .6rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); background: var(--surface);
  border: 1px solid var(--brand-line); border-radius: 999px; padding: 3px 8px;
}
.dropzone .cloud {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); color: var(--brand);
}
.dropzone .cloud svg { width: 21px; height: 21px; }
.dropzone .big { font-size: .95rem; font-weight: 600; color: var(--ink); }
.dropzone .hint { font-size: .76rem; color: var(--muted); max-width: 30ch; line-height: 1.45; }
.dropzone input { display: none; }

.file-pill {
  display: flex; align-items: center; gap: 10px; background: var(--brand-soft);
  border: 1px solid var(--brand-line); border-radius: 11px; padding: 9px 11px; font-size: .82rem; color: var(--ink);
}
.file-pill .ficon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: .72rem; flex: none; }
.file-pill .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.file-pill button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; font-size: .95rem; line-height: 1; }
.file-pill button:hover { color: var(--danger); background: var(--danger-soft); }

.divider-text { display: flex; align-items: center; gap: 10px; font-size: .68rem; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin: 2px 0; }
.divider-text::before, .divider-text::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.divider-text.highlight {
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; color: var(--brand); gap: 12px; margin: 4px 0;
}
.divider-text.highlight::before { background: linear-gradient(90deg, transparent, var(--brand-line)); }
.divider-text.highlight::after { background: linear-gradient(90deg, var(--brand-line), transparent); }
.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.link-card {
  display: grid; gap: 10px; padding: 13px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.link-card:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--ring); }
.platforms { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pf {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: 30px; height: 30px; padding: 0;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.pf:hover { transform: translateY(-1px); background: var(--surface); border-color: var(--pf, var(--brand-line)); }
.pf svg { width: 16px; height: 16px; display: block; color: var(--pf, currentColor); }
.pf-more {
  width: auto; padding: 0 10px; gap: 6px; font-size: .68rem; font-weight: 600;
  color: var(--brand); border-color: var(--brand-line); background: var(--brand-softer);
}
.pf-more svg { width: 13px; height: 13px; }

.link-result {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--success-line); background: var(--success-soft); font-size: .8rem; color: var(--ink-soft);
}
.link-result.err { border-color: var(--danger-line); background: var(--danger-soft); }
.link-result .t { min-width: 0; flex: 1; display: grid; gap: 1px; }
.link-result .t b { font-size: .82rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-result .t span { font-size: .72rem; color: var(--muted); }
.link-result .tick { color: var(--success); font-weight: 700; flex: none; font-size: 1rem; }
.link-result .warn { color: var(--danger); font-weight: 700; flex: none; font-size: 1rem; }
.link-result .thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid var(--brand-line); border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .field-grid { grid-template-columns: 1fr; } }

.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; transition: width .45s ease; }
.stage-line { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--muted); margin-top: 7px; }

/* usage card */
.usage-card { padding: 16px 18px; display: grid; gap: 10px; }
.usage-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.usage-card .plan { font-size: .78rem; font-weight: 650; letter-spacing: .01em; }
.usage-card .nums { display: flex; align-items: baseline; gap: 6px; }
.usage-card .nums b { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1; }
.usage-card .nums span { font-size: .74rem; color: var(--muted); }
.usage-card .foot { display: flex; gap: 8px; }

/* composer: model tier + the two convert buttons */
.model-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.model-row label.field { margin: 0; flex: none; }
.model-row select { flex: 1; min-width: 170px; }
.model-row .small { flex-basis: 100%; margin: 0; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.action-row .btn { flex: 1; min-width: 150px; }

/* usage ring (percent of minutes used) */
.usage-ring-row { display: flex; align-items: center; gap: 14px; }
.usage-ring { position: relative; width: 96px; height: 96px; flex: none; }
.usage-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.usage-ring .ring-track { fill: none; stroke: var(--line); stroke-width: 10; }
.usage-ring .ring-fill {
  fill: none; stroke: var(--brand); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset .5s ease;
}
.ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.ring-text b { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; line-height: 1; }
.ring-text span { font-size: .58rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.usage-side { display: grid; gap: 4px; min-width: 0; }

/* workbench (main column) */
.workbench { min-height: 620px; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: var(--radius-lg); }
.wb-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.wb-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wb-title { min-width: 0; }
.wb-title h2 {
  font-family: var(--sans); font-size: 1.06rem; font-weight: 650; letter-spacing: -.015em;
  margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52ch;
}
.wb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .77rem; color: var(--muted); }
.wb-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); flex: none; }
.wb-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button {
  border: 0; background: transparent; font: inherit; font-size: .83rem; font-weight: 550;
  color: var(--muted); padding: 6px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: .16s ease;
}
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.seg button:disabled { opacity: .4; cursor: default; }
.seg .pip { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }

.wb-body { flex: 1; overflow: auto; padding: 22px; min-height: 320px; max-height: calc(100vh - 300px); }
.wb-body::-webkit-scrollbar { width: 10px; }
.wb-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--surface); }

.doc-text {
  font-size: .95rem; line-height: 1.78; color: var(--ink-soft); white-space: pre-wrap; word-wrap: break-word;
}
.doc-article {
  font-family: var(--sans); font-size: 1rem; line-height: 1.8; color: var(--ink);
  white-space: pre-wrap; word-wrap: break-word; max-width: 74ch;
}
.article-title {
  font-family: var(--serif); font-size: clamp(1.55rem, 2.3vw, 2.05rem); font-weight: 400;
  line-height: 1.14; letter-spacing: -.02em; color: var(--ink); margin: 0 0 16px;
}

.stream-note { display: flex; align-items: center; gap: 9px; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand-line); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, .35); }
  70% { box-shadow: 0 0 0 9px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.empty { display: grid; place-items: center; text-align: center; min-height: 360px; color: var(--muted); padding: 34px; }
.empty .glyph {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 16px;
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand);
}
.empty .glyph svg { width: 24px; height: 24px; }
.empty .btn { margin-top: 4px; }
.empty .big { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; color: var(--ink); margin-bottom: 8px; line-height: 1.15; }
.empty p { max-width: 46ch; margin: 0 auto 16px; font-size: .9rem; }

.action-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.action-bar .spacer { flex: 1; }
.action-bar .btn { padding: 8px 13px; font-size: .83rem; border-radius: 9px; }

/* timestamp toggle row above transcript */
.text-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.text-tools .left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.text-tools .count { font-size: .76rem; color: var(--muted); }

.ts-segment { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ts-segment:last-child { border-bottom: 0; }
.ts-segment time {
  font-family: var(--mono); font-size: .74rem; color: var(--brand); background: var(--brand-soft);
  border-radius: 6px; padding: 2px 6px; height: fit-content; text-align: center; letter-spacing: .01em;
}
.ts-segment p { margin: 0; font-size: .94rem; line-height: 1.65; color: var(--ink-soft); }

/* article setup card */
.setup { display: grid; gap: 16px; max-width: 640px; }
.setup-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* Stays pinned under the draft so Rewrite is reachable at any scroll depth. */
.article-foot {
  position: sticky; bottom: -23px; z-index: 3;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 26px -22px -23px; padding: 13px 22px;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 18px -14px rgba(15, 23, 42, .35);
}
.article-foot .btn { padding: 9px 16px; font-size: .85rem; }
.article-foot .small { max-width: 52ch; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .setup-grid { grid-template-columns: 1fr; } }
.setup-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
  padding: 18px; display: grid; gap: 14px;
}
.setup-card .headline { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-right: 34px; }
.setup-card .headline > div { min-width: 0; }
.setup-close {
  position: absolute; top: -4px; right: -4px; width: 30px; height: 30px;
  display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--muted);
  font-size: 19px; line-height: 1; cursor: pointer; transition: .15s ease;
}
.setup-close:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.setup-card .headline .glyph {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--brand);
}
.setup-card .headline .glyph svg { width: 19px; height: 19px; }
.setup-card .headline strong { display: block; font-size: .95rem; font-weight: 650; }
.setup-card .headline span { font-size: .82rem; color: var(--muted); }

/* version history of one recording's drafts */
.art-versions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.art-ver-label {
  font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-right: 2px;
}
.art-ver {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: .78rem; cursor: pointer; transition: .15s ease;
}
.art-ver:hover { border-color: var(--line-strong); color: var(--ink); }
.art-ver.on { background: linear-gradient(140deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: var(--glow); }

/* ----------------------------------------------------------------- records */

.records-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.records-head h2 { margin: 0 0 4px; }
.records-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.rec-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-filters .input { max-width: 260px; }

.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rec-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-xs); transition: .18s ease; position: relative;
}
.rec-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-strong); }
.rec-top { display: flex; align-items: flex-start; gap: 12px; }
.rec-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand);
}
.rec-icon svg { width: 18px; height: 18px; }
.rec-title { min-width: 0; flex: 1; }
.rec-title h4 {
  font-family: var(--sans); font-size: .93rem; font-weight: 600; letter-spacing: -.01em;
  margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-title .when { font-size: .74rem; color: var(--muted); }
.rec-snippet {
  font-size: .83rem; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.rec-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rec-versions { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 9px; }
.rec-versions-head {
  font-size: .68rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.rec-ver {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px;
  padding: 7px 10px; cursor: pointer; transition: .15s ease;
}
.rec-ver:hover { border-color: var(--brand-line); background: var(--brand-softer); }
.rec-ver-lang { font-size: .8rem; font-weight: 620; color: var(--ink); }
.rec-ver-meta { font-size: .72rem; color: var(--muted); }
.rec-ver-go { margin-left: auto; font-size: .72rem; font-weight: 650; color: var(--brand); }
.rec-ver-row td { background: var(--surface-2); }
.rec-ver-row .rec-versions { border-top: 0; padding-top: 0; }
.rec-foot { display: flex; align-items: center; gap: 8px; padding-top: 4px; margin-top: auto; }
.rec-foot .btn { padding: 7px 11px; font-size: .78rem; }
.rec-state { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.rec-del svg { display: block; }
.rec-del:hover { color: var(--danger); background: var(--danger-soft); }

/* records, table layout (same data as the cards) */
.rec-table-wrap { margin-top: 4px; }
.rec-table-scroll {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); overflow-x: auto;
}
.rec-table { min-width: 860px; }
.rec-table td { vertical-align: top; }
.rec-table td.right, .rec-table th.right { text-align: right; }
.rec-cell { min-width: 240px; max-width: 380px; }
.rec-link {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 600; font-size: .88rem;
  color: var(--ink); cursor: pointer; text-align: left; letter-spacing: -.01em;
}
.rec-link:hover { color: var(--brand); text-decoration: underline; }
.rec-sub { font-size: .75rem; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.rec-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.rec-actions .btn { padding: 6px 9px; font-size: .75rem; }

.records-empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.records-empty .big { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); margin-bottom: 6px; }

/* ------------------------------------------------------------------ modal */

.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 10, 18, .55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; padding: 20px; }
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  max-width: 540px; width: 100%; padding: 26px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.modal h2 { margin-bottom: 4px; font-size: 1.55rem; }

/* ----------------------------------------------------------------- toasts */

.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 120; }
.toast {
  background: var(--ink); color: var(--bg); padding: 11px 15px; border-radius: 11px;
  font-size: .85rem; box-shadow: var(--shadow-md); max-width: 360px;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--success); color: #06281a; }

/* ------------------------------------------------------------------ admin */

table.data { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.data th {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 650;
  background: var(--surface-2); position: sticky; top: 0;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: var(--surface-2); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow-xs); }
.stat .k { font-size: .71rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--serif); font-size: 1.85rem; font-weight: 400; line-height: 1.15; margin-top: 4px; }

.kv { font-size: .86rem; }
.kv div { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.copyable { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font-size: .85rem; white-space: pre-wrap; }

.claims-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.claims-table th, .claims-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.claims-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.risk-high { color: var(--danger); font-weight: 650; }
.risk-medium { color: var(--warn); font-weight: 650; }
.risk-low { color: var(--success); font-weight: 650; }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .pack-grid { grid-template-columns: 1fr; } }
.pack-block { border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: var(--surface-2); }
.pack-block h4 { margin: 0 0 8px; font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }

/* skeleton shimmer */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 10px; }
  .site-header .nav-links { gap: 10px; font-size: .82rem; }
  .site-header .nav-links a[href^="#"] { display: none; }
  .app-nav { order: 3; width: 100%; }
  .app-nav button { flex: 1; }
  .studio-page { padding: 14px 0 44px; }
  .wb-body { max-height: none; padding: 16px; }
  .wb-head { padding: 14px 16px 12px; }
  .action-bar { padding: 12px; }
  .ts-segment { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; }
}

@media print {
  .site-header, .composer, .action-bar, .wb-head, .toasts, .usage-card { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .studio-layout { display: block; }
  .workbench { border: 0; box-shadow: none; }
  .wb-body { max-height: none; overflow: visible; }
  .doc-text, .doc-article { color: #000; }
}
