:root {
  --bg-base: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --bg-border: #2a2a2a;
  --accent: #caff33;
  --accent-dim: #9ecc1a;
  --accent-glow: rgba(202, 255, 51, 0.15);
  --text-primary: #f0f0f0;
  --text-secondary: #a3a3a3;
  --text-muted: #666666;
  --text-on-accent: #0a0a0a;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --twitter-blue: #1d9bf0;
  --linkedin-blue: #0a66c2;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-output: "DM Mono", monospace;
  --app-scale: 0.8;
  --app-vh: calc(100vh / var(--app-scale));
  color-scheme: dark;
}

@media (max-width: 860px) {
  :root {
    --app-scale: 1;
    --app-vh: 100vh;
  }
}

* {
  box-sizing: border-box;
}

html {
  zoom: var(--app-scale);
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(202, 255, 51, 0.055), transparent 31rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 24rem),
    var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
}

@supports not (zoom: 1) {
  html {
    overflow-x: hidden;
  }

  body {
    width: calc(100% / var(--app-scale));
    min-height: var(--app-vh);
    transform: scale(var(--app-scale));
    transform-origin: top left;
  }
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 25% 25%, #ffffff 0 1px, transparent 1px),
    radial-gradient(circle at 75% 65%, #ffffff 0 1px, transparent 1px);
  background-size: 8px 8px, 11px 11px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--bg-border);
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(24rem, 0.72fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  width: min(1520px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(1.8rem, 5vw, 3.4rem) 0 2.4rem;
}

.hero-copy {
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: calc(var(--app-vh) - 7rem);
  max-width: 930px;
  animation: fadeUp 520ms ease both;
}

.hero-visual {
  order: 1;
  min-width: 0;
  animation: fadeUp 560ms ease 120ms both;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--text-primary);
}

h1 {
  max-width: 900px;
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span {
  color: var(--accent);
}

h2 {
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.hero-subtitle {
  max-width: 820px;
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.hero-actions,
.hero-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-proof {
  gap: 0.55rem;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--bg-border);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(17, 17, 17, 0.76);
  font-size: 0.9rem;
  font-weight: 700;
}

.feature-board {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: min(34rem, calc(var(--app-vh) - 10rem));
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.feature-board::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 45%;
  opacity: 0.72;
  background: linear-gradient(90deg, transparent, rgba(202, 255, 51, 0.13), transparent);
  pointer-events: none;
}

.feature-board-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.feature-board-header span {
  flex: 0 0 auto;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(202, 255, 51, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(202, 255, 51, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-marquee {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(202, 255, 51, 0.16);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.36);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.feature-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  padding: 1.15rem 0;
  animation: marqueeSlide 34s linear infinite;
}

.feature-track span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 4.1rem;
  padding: 0.95rem 1.25rem;
  border: 1px solid rgba(202, 255, 51, 0.28);
  border-radius: 8px;
  background: rgba(202, 255, 51, 0.1);
  color: var(--accent);
  font-size: clamp(0.98rem, 1.25vw, 1.16rem);
  font-weight: 800;
  white-space: nowrap;
}

.feature-preview-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.feature-preview-grid div {
  min-height: 6.4rem;
  padding: 0.95rem;
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.82);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.feature-preview-grid div:hover {
  transform: translateX(4px);
  border-color: rgba(202, 255, 51, 0.44);
  background: rgba(202, 255, 51, 0.06);
}

.feature-preview-grid span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: var(--font-output);
  font-size: 0.8rem;
  font-weight: 800;
}

.feature-preview-grid strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 1.04rem;
}

.feature-preview-grid p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.section-band {
  border-top: 1px solid var(--bg-border);
}

.section-inner {
  width: min(1180px, calc(100% - 2rem));
  min-width: 0;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading h1 {
  font-size: clamp(2.5rem, 8vw, 4.8rem);
}

.steps-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 0.7fr);
  gap: 2rem;
  align-items: end;
}

.split-heading > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.steps-grid article,
.price-card {
  min-height: 16rem;
  padding: 1.25rem;
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: var(--bg-surface);
}

.steps-grid article {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  animation: fadeUp 520ms ease both;
}

.steps-grid article:nth-child(2) {
  animation-delay: 80ms;
}

.steps-grid article:nth-child(3) {
  animation-delay: 160ms;
}

.steps-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(202, 255, 51, 0.45);
  background: var(--bg-elevated);
}

.steps-grid span {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
}

.steps-grid p,
.price-card p,
.price-card span,
.fine-print {
  color: var(--text-secondary);
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  animation: fadeUp 520ms ease both;
}

.price-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(202, 255, 51, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(202, 255, 51, 0.06), transparent 55%);
  transition: opacity 180ms ease;
}

.price-card.featured {
  border-color: var(--bg-border);
  background: var(--bg-surface);
  box-shadow: none;
}

.price-card.featured .ghost-button {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--bg-border);
  box-shadow: none;
}

.price-card:nth-child(2) {
  animation-delay: 90ms;
}

.price-card:nth-child(3) {
  animation-delay: 180ms;
}

.price-card:hover,
.price-card:focus-within {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 34px rgba(202, 255, 51, 0.22);
}

.price-card:hover::before,
.price-card:focus-within::before {
  opacity: 1;
}

.price-card:hover .ghost-button,
.price-card:focus-within .ghost-button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 0 22px var(--accent-glow);
}

.price-card strong {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
}

.price-card button {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.center {
  text-align: center;
}

.format-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.format-showcase article {
  min-height: 14rem;
  padding: 1.15rem;
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.9);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  animation: fadeUp 520ms ease both;
}

.format-showcase article:nth-child(2) {
  animation-delay: 60ms;
}

.format-showcase article:nth-child(3) {
  animation-delay: 120ms;
}

.format-showcase article:nth-child(4) {
  animation-delay: 180ms;
}

.format-showcase article:nth-child(5) {
  animation-delay: 240ms;
}

.format-showcase article:nth-child(6) {
  animation-delay: 300ms;
}

.format-showcase article:hover {
  transform: translateY(-4px);
  border-color: rgba(202, 255, 51, 0.48);
  background: var(--bg-elevated);
}

.format-showcase span {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 2rem;
  border-radius: 6px;
  background: rgba(202, 255, 51, 0.12);
  color: var(--accent);
  font-family: var(--font-output);
  font-size: 0.82rem;
  font-weight: 700;
}

.format-showcase p {
  color: var(--text-secondary);
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  border-top: 1px solid var(--bg-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.history-main {
  min-height: calc(var(--app-vh) - 4.5rem);
}

.app-dashboard {
  grid-column: 1 / -1;
  order: 1;
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: calc(var(--app-vh) - 7rem);
  align-content: center;
  animation: fadeUp 520ms ease both;
}

.app-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.88);
}

.app-welcome h1 {
  max-width: 880px;
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.app-welcome p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.app-quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.workspace-feature-card {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  min-height: 13rem;
  padding: 1rem;
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.88);
  color: var(--text-primary);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.workspace-feature-card:hover,
.workspace-feature-card:focus-visible,
.workspace-feature-card.active {
  transform: translateY(-4px);
  border-color: rgba(202, 255, 51, 0.55);
  background: rgba(202, 255, 51, 0.08);
  box-shadow: 0 0 28px rgba(202, 255, 51, 0.16);
}

.workspace-feature-card span {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 1.2rem;
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--accent);
  font-family: var(--font-output);
  font-weight: 800;
}

.workspace-feature-card strong {
  font-size: 1.1rem;
}

.workspace-feature-card p {
  margin: 0;
  color: var(--text-secondary);
}

body[data-auth="signed-in"] .hero-shell {
  display: block;
  width: min(1520px, calc(100% - 3rem));
}

body[data-auth="signed-in"] .hero-copy,
body[data-auth="signed-in"] .hero-visual,
body[data-auth="signed-in"] .guest-workspace-gate,
body[data-auth="signed-in"] .steps-band,
body[data-auth="signed-in"] .formats-band,
body[data-auth="signed-in"] .pricing-band,
body[data-auth="signed-in"] .footer {
  display: none;
}

body[data-auth="signed-in"] .chat-band {
  border-top: 0;
}

body[data-auth="signed-in"] .chat-band .section-inner {
  width: min(1520px, calc(100% - 3rem));
  padding-top: 1rem;
}

body[data-auth="signed-in"] .app-dashboard {
  display: grid !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marqueeSlide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .hero-shell {
    grid-template-columns: 1fr;
    width: min(100% - 1.25rem, 1180px);
  }

  .hero-copy {
    min-height: auto;
    padding-block: 2rem 0;
  }

  .feature-board {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  body {
    min-width: 0;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    min-height: auto;
    padding: 0.75rem 1rem;
  }

  .brand span:last-child {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.9rem;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.45rem;
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 0.15rem;
  }

  .nav-actions > * {
    flex: 0 1 auto;
  }

  .steps-grid,
  .pricing-grid,
  .format-showcase,
  .split-heading,
  .workspace-feature-grid,
  .app-welcome {
    grid-template-columns: 1fr;
  }

  .app-quick-actions {
    justify-content: flex-start;
  }

  .hero-shell {
    width: min(100% - 1.25rem, 1180px);
    gap: 1.5rem;
    padding-top: 1.5rem;
  }

  .hero-copy {
    min-height: auto;
    padding-block: 1rem 0;
  }

  h1 {
    font-size: clamp(2.3rem, 9.6vw, 3.4rem);
    line-height: 1.04;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: clamp(1.45rem, 5.4vw, 2rem);
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.55rem;
  }

  .hero-actions > * {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-proof {
    gap: 0.4rem;
  }

  .hero-proof span {
    font-size: 0.78rem;
    padding: 0.32rem 0.55rem;
  }

  .feature-board {
    padding: 0.85rem;
  }

  .feature-track span {
    min-height: 2.85rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.88rem;
  }

  .section-inner {
    width: min(100% - 1.25rem, 1180px);
    padding-block: 2rem;
  }
}

@media (max-width: 540px) {
  .topbar {
    padding-inline: 0.75rem;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-actions .ghost-link,
  .nav-actions .ghost-button,
  .nav-actions .accent-button,
  .nav-actions .credit-pill {
    min-height: 2.1rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
  }

  .hero-shell,
  .section-inner {
    width: min(100% - 1rem, 1180px);
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 3rem);
  }

  .footer {
    padding: 1.2rem 0.75rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
