:root {
  color-scheme: light dark;
  --bg: #f1f2ed;
  --bg-deep: #e7e9e2;
  --panel: #fbfcf7;
  --panel-2: #e4e6df;
  --ink: #121514;
  --muted: #5c625f;
  --line: #c9cec5;
  --accent: #e85535;
  --accent-ink: #fff8f2;
  --mint: #0b8d78;
  --mint-soft: #c9f4e5;
  --yellow: #e4b620;
  --shadow: 0 24px 60px rgba(20, 26, 23, .13);
  --radius-lg: 28px;
  --radius-md: 16px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d0f;
    --bg-deep: #080a0c;
    --panel: #15191a;
    --panel-2: #202627;
    --ink: #f3f5ed;
    --muted: #aeb7b2;
    --line: #323a3a;
    --accent: #ff6b49;
    --accent-ink: #150b08;
    --mint: #4de0bd;
    --mint-soft: #123d35;
    --yellow: #f6cc4b;
    --shadow: 0 28px 72px rgba(0, 0, 0, .42);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}

button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: underline; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 16px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: color-mix(in srgb, var(--bg), transparent 12%);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover { color: var(--accent); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  background: var(--panel);
  color: var(--ink);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.button:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  background: color-mix(in srgb, var(--accent), white 10%);
}

.button.dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.arrow {
  font-size: 18px;
  line-height: 1;
}

/* Main content */
main { overflow: clip; }

/* Hero section */
.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 680px;
  padding: 82px 0 68px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  align-items: center;
  gap: 68px;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 60px 0 48px;
  }
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font: 800 13px/1.2 var(--mono);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font: 700 clamp(54px, 7.2vw, 104px)/.91 var(--serif);
  letter-spacing: -.058em;
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-notes {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 13px;
}

.hero-notes span::before {
  content: "—";
  color: var(--accent);
  margin-right: 8px;
}

/* Hero art */
.hero-art {
  position: relative;
  min-height: 440px;
}

.poster {
  position: absolute;
  inset: 24px 0 24px 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px 42px 10px 42px;
  background: #101416;
  box-shadow: var(--shadow);
  color: #f6f4e9;
}

.poster-grid {
  position: absolute;
  inset: 0;
  opacity: .17;
  background-image:
    linear-gradient(#98a29e 1px, transparent 1px),
    linear-gradient(90deg, #98a29e 1px, transparent 1px);
  background-size: 42px 42px;
}

.poster-orbit {
  position: absolute;
  width: 290px;
  aspect-ratio: 1;
  border: 2px solid #4de0bd;
  border-radius: 50%;
  top: -70px;
  right: -90px;
  animation: orbit 7s linear infinite;
}

.poster-orbit::before,
.poster-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #ff6b49;
}

.poster-orbit::before {
  width: 18px;
  height: 18px;
  top: 20%;
  left: 2%;
}

.poster-orbit::after {
  width: 11px;
  height: 11px;
  right: 15%;
  bottom: 7%;
  background: #f6cc4b;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.poster-seq {
  position: absolute;
  left: 32px;
  top: 28px;
  font: 700 11px/1 var(--mono);
  color: #91a099;
}

.poster-type {
  position: absolute;
  left: 32px;
  right: 24px;
  bottom: 62px;
  font: 700 clamp(52px, 7vw, 88px)/.78 var(--serif);
  letter-spacing: -.06em;
}

.poster-type i {
  color: #ff6b49;
  font-style: normal;
  display: block;
  transform: translateX(22px);
}

.poster-timeline {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 24px;
  height: 3px;
  background: #313a3a;
}

.poster-timeline::before {
  content: "";
  display: block;
  height: 100%;
  width: 68%;
  background: #4de0bd;
  animation: timeline 4s ease-in-out infinite alternate;
}

@keyframes timeline {
  to { width: 22%; }
}

.float-tag {
  position: absolute;
  right: -12px;
  top: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  font: 800 12px/1 var(--mono);
  box-shadow: var(--shadow);
}

.float-tag.second {
  left: 0;
  right: auto;
  top: auto;
  bottom: 0;
  border-radius: 8px;
  transform: rotate(-3deg);
}

/* Sections */
.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }
}

.section-heading {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 50px;
  align-items: start;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.kicker {
  color: var(--accent);
  font: 800 13px/1.4 var(--mono);
}

h2 {
  margin-bottom: 18px;
  font: 700 clamp(38px, 5.1vw, 66px)/1 var(--serif);
  letter-spacing: -.045em;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
  max-width: 720px;
}

/* Studio section */
.studio-section {
  width: 100%;
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
}

.studio-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 84px 0 96px;
}

@media (max-width: 768px) {
  .studio-wrap {
    padding: 64px 0;
  }
}

.studio {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-radius: var(--radius-lg);
}

@media (max-width: 960px) {
  .studio {
    grid-template-columns: 1fr;
  }
}

.controls {
  padding: 28px;
  border-right: 1px solid var(--line);
}

@media (max-width: 960px) {
  .controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.source-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.source-tab {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.source-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--bg);
}

.control-label {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--mint);
  outline: 3px solid color-mix(in srgb, var(--mint), transparent 75%);
}

.helper {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.prompt-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 13px 0 24px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 10px;
  font-size: 12px;
  text-align: left;
}

.chip:hover {
  border-color: var(--mint);
  color: var(--ink);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 21px;
}

legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.control-pair {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 12px;
  align-items: end;
}

.preview-length {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  background: var(--bg);
  border-radius: 12px;
  gap: 4px;
}

.segmented input {
  display: none;
}

.segmented label {
  padding: 9px 5px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.segmented input:checked + label {
  background: var(--ink);
  color: var(--bg);
}

.segmented input:focus-visible + label {
  outline: 3px solid var(--yellow);
}

.generate {
  width: 100%;
  border-radius: 12px;
}

.free-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Preview panel */
.preview-panel {
  min-width: 0;
  padding: 24px;
  background: #090c0d;
  color: #f7f6ef;
  display: flex;
  flex-direction: column;
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.preview-title {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.preview-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: #aeb8b4;
}

.local-badge {
  padding: 7px 10px;
  border: 1px solid #34413d;
  border-radius: 999px;
  color: #4de0bd;
  font: 700 10px/1 var(--mono);
  white-space: nowrap;
}

.canvas-stage {
  position: relative;
  width: 100%;
  max-height: 560px;
  margin: auto;
  background: #0e1213;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #2d3836;
  transition: aspect-ratio .25s ease;
}

.canvas-stage[data-ratio="16:9"] {
  aspect-ratio: 16/9;
}

.canvas-stage[data-ratio="9:16"] {
  aspect-ratio: 9/16;
  max-width: 315px;
}

.canvas-stage[data-ratio="1:1"] {
  aspect-ratio: 1;
  max-width: 540px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.preview-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 15px;
}

.preview-buttons {
  display: flex;
  gap: 8px;
}

.preview-button {
  background: #171e1f;
  color: #f7f6ef;
  border-color: #34413d;
}

.watermark-note {
  color: #9da9a5;
  font-size: 11px;
}

.status {
  min-height: 20px;
  margin: 10px 0 -4px;
  color: #4de0bd;
  font-size: 12px;
}

/* Text feature */
.text-feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 960px) {
  .text-feature {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.sharp-demo {
  padding: 40px;
  background: #101416;
  color: #f6f4e9;
  border-radius: 8px 38px 8px 38px;
  box-shadow: var(--shadow);
}

.sharp-demo .large {
  font: 700 clamp(48px, 7vw, 94px)/.82 var(--serif);
  letter-spacing: -.06em;
}

.sharp-demo .large span {
  display: block;
  color: #4de0bd;
  margin-left: 18%;
}

.sharp-demo .line {
  height: 1px;
  background: #3d4845;
  margin: 28px 0 18px;
}

.sharp-demo .detail {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #aeb8b4;
  font: 700 11px/1.4 var(--mono);
}

.feature-copy p {
  color: var(--muted);
  font-size: 18px;
}

.feature-copy ul {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.feature-copy li {
  position: relative;
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
}

.feature-copy li::before {
  content: "↳";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  counter-increment: step;
  padding: 26px 24px 30px;
  border-right: 1px solid var(--line);
}

.step:last-child {
  border-right: 0;
}

@media (max-width: 960px) {
  .step:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .step {
    border-right: 0;
  }
}

.step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 40px;
  color: var(--accent);
  font: 800 12px/1 var(--mono);
}

.step h3 {
  margin-bottom: 8px;
  font: 700 25px/1 var(--serif);
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Feature list */
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 768px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

.feature-item {
  min-height: 230px;
  padding: 30px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-index {
  font: 700 11px/1 var(--mono);
  color: var(--accent);
}

.feature-item h3 {
  margin: 44px 0 10px;
  font: 700 30px/1.05 var(--serif);
}

.feature-item p {
  margin: 0;
  max-width: 450px;
  color: var(--muted);
}

/* Pricing */
.pricing-section {
  width: 100%;
  background: #111516;
  color: #f3f5ed;
}

.pricing-section .section {
  padding-block: 100px;
}

@media (max-width: 768px) {
  .pricing-section .section {
    padding-block: 64px;
  }
}

.pricing-section .kicker {
  color: #ff6b49;
}

.pricing-section .section-heading p {
  color: #aeb7b2;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.plan {
  padding: 28px;
  border: 1px solid #333d3b;
  background: #171c1d;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border-color: #4de0bd;
  background: #1b2423;
}

@media (min-width: 961px) {
  .plan.featured {
    transform: translateY(-10px);
  }
}

.plan-name {
  font: 800 13px/1 var(--mono);
  color: #aeb7b2;
}

.price {
  margin: 28px 0 6px;
  font: 700 52px/1 var(--serif);
  letter-spacing: -.04em;
}

.price small {
  font: 600 14px/1 var(--sans);
  color: #aeb7b2;
}

.plan-desc {
  min-height: 52px;
  color: #aeb7b2;
  font-size: 14px;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 28px;
  flex: 1;
}

.plan li {
  padding: 9px 0;
  border-bottom: 1px solid #2f3836;
  font-size: 14px;
}

.plan li::before {
  content: "+";
  margin-right: 10px;
  color: #4de0bd;
  font-family: var(--mono);
}

.plan .button {
  background: #f3f5ed;
  color: #111516;
  border-color: #f3f5ed;
}

.plan.featured .button {
  background: #4de0bd;
  border-color: #4de0bd;
}

.bridge {
  margin: 42px 0 28px;
  padding: 24px 26px;
  background: #1a2021;
  border-radius: 16px;
  color: #aeb7b2;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.bridge a {
  color: #4de0bd;
  text-decoration: underline;
  font-weight: 700;
}

/* Disclaimer */
.disclaimer {
  padding: 40px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  max-width: 860px;
  margin: 0 auto;
}

.disclaimer h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--accent);
}

.disclaimer p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

.disclaimer a {
  color: var(--mint);
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 68px 0 32px;
}

.footer-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 960px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-col h3 {
  font: 700 20px/1.2 var(--serif);
  margin-bottom: 12px;
}

.footer-col h4 {
  font: 800 12px/1 var(--mono);
  margin-bottom: 16px;
  color: var(--accent);
}

.footer-col p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .2s ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------------------------
   App: header account, studio player, dialogs, toasts, account page
   --------------------------------------------------------------------------- */
.brand { font: 700 19px/1 var(--serif); letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.nav-account { display: flex; align-items: center; gap: 12px; }
.nav-signin { border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 700; padding: 8px 4px; }
.nav-signin:hover { color: var(--accent); }
.credit-pill {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); font: 800 12px/1 var(--mono); text-decoration: none;
}
.credit-pill:hover { border-color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } }

.segmented.four { grid-template-columns: repeat(4, 1fr); }
.controls fieldset + .generate { margin-top: 4px; }

.canvas-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #0b0d0f; }
.stage-overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px; background: rgba(9, 12, 13, .92); color: #d9e0dc; text-align: center; white-space: pre-line; font-size: 14px;
}
.stage-overlay[hidden] { display: none; }
.stage-overlay p { margin: 0; max-width: 420px; }
.spinner { display: none; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #2d3836; border-top-color: #4de0bd; animation: spin 1s linear infinite; }
.stage-overlay.busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.player-controls { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.progress-bar { flex: 1; height: 6px; border-radius: 3px; background: #2d3836; cursor: pointer; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: #4de0bd; }
.time-label { min-width: 84px; text-align: right; color: #9da9a5; font: 700 11px/1 var(--mono); }
.change-form { display: flex; gap: 8px; margin-top: 12px; }
.change-form .text-input { flex: 1; }

.text-input {
  display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); margin-bottom: 14px;
}
.text-input:focus { border-color: var(--mint); outline: 3px solid color-mix(in srgb, var(--mint), transparent 75%); }
.text-input.dark { margin: 0; background: #12181a; color: #f7f6ef; border-color: #34413d; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: 8px; max-width: min(420px, calc(100% - 32px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow); }
.toast.error { background: #8f2614; color: #fff; }
.toast a { color: inherit; font-weight: 800; }

dialog { width: min(480px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font: 700 26px/1 var(--serif); }
.dialog-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 18px; }
.dialog-body { padding: 22px 24px 24px; }
.auth-lead { color: var(--muted); font-size: 14px; }
.auth-lead:empty, .auth-message:empty { display: none; }
.auth-message { color: var(--accent); font-size: 14px; }
.auth-submit { width: 100%; border-radius: 12px; margin-top: 4px; }
.auth-switch { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.link-button { border: 0; padding: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.link-button:hover { color: var(--ink); }

.faq { max-width: 880px; margin-left: auto; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative; font: 700 20px/1.3 var(--serif); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 20px; color: var(--accent); font: 700 24px/1 var(--mono); }
details[open] summary::after { content: "−"; }
details p { max-width: 760px; margin: -4px 0 22px; color: var(--muted); }

.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .examples { grid-template-columns: 1fr; } }
.example { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.example-head { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.example-head h2 { margin: 6px 0 0; font: 700 25px/1.1 var(--serif); letter-spacing: -.02em; }
.example-number { color: var(--accent); font: 800 11px/1 var(--mono); }
.example-body { padding: 18px 22px 22px; color: var(--muted); }
.example-body .button { margin-top: 6px; }
.examples-note { margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.feature-item .button { align-self: flex-start; margin-top: 16px; }

.page-narrow { max-width: 860px; margin: 0 auto; }
.prose { line-height: 1.75; color: var(--muted); }
.prose h2 { color: var(--ink); font-size: 28px; margin: 44px 0 12px; }
.prose h3 { color: var(--ink); margin: 28px 0 8px; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }

.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 40px; }
@media (max-width: 760px) { .account-grid { grid-template-columns: 1fr; } }
.card { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.card .label { color: var(--muted); font: 800 11px/1 var(--mono); }
.card .value { margin: 12px 0 4px; font: 700 34px/1 var(--serif); }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.card .button { margin-top: 14px; }
.history { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.history .meta { color: var(--muted); font-size: 13px; }
.history a { font-weight: 700; }
.badge { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); font: 700 10px/1 var(--mono); text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.badge.completed { color: var(--mint); border-color: var(--mint); }
.badge.failed { color: var(--accent); border-color: var(--accent); }
