:root {
  --ink: #0c1222;
  --muted: #5a6578;
  --paper: #e9eef5;
  --surface: #f7f9fc;
  --accent: #3730a3;
  --accent-strong: #312e81;
  --line: rgba(12, 18, 34, 0.12);
  --code-fg: #c5d0de;
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 85% -5%, rgba(55, 48, 163, 0.07), transparent 55%),
    linear-gradient(180deg, #dfe6f0 0%, var(--paper) 38%, #eef2f8 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 1.35rem 1.5rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--accent);
}

.ghost {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(55, 48, 163, 0.35);
  border-radius: 0.45rem;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ghost:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: rgba(55, 48, 163, 0.06);
}

main {
  flex: 1;
}

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.5rem;
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 0.9fr 1.2fr;
    gap: 2.5rem;
    padding: 2rem 1.5rem 1.75rem;
    align-items: start;
  }
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  max-width: 18ch;
  color: var(--ink);
}

.lede {
  color: var(--muted);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  max-width: 40ch;
  margin: 0 0 1.5rem;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  padding: 0.95rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 0.45rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.cta-meta {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.theater {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(12, 18, 34, 0.08);
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theater-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.proof-dots {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0.7rem 0 0 #d1d5db,
    1.4rem 0 0 #d1d5db;
}

.proof-label {
  margin-left: 1.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.theater-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.theater-step {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 0.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theater-step.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.theater-stage {
  position: relative;
  min-height: 17.5rem;
  background: #f9fafb;
}

@media (min-width: 900px) {
  .theater-stage {
    min-height: 19rem;
  }
}

.theater-panel {
  position: absolute;
  inset: 0;
  padding: 1.15rem 1.2rem 1.3rem;
  background: #f9fafb;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  z-index: 0;
}

.theater-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
}

.app-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.app-section-lede {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #6b7280;
}

.config-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  height: 100%;
}

.config-block .app-section-title {
  margin-bottom: 0.45rem;
}

.adapter-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.adapter-box-compact {
  min-height: 12.5rem;
}

.adapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.adapter-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.78rem;
  color: #374151;
}

.adapter-list li:last-child {
  border-bottom: 0;
}

.adapter-list li.is-muted {
  color: #9ca3af;
}

.adapter-list li > span:last-child {
  color: #9ca3af;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}

.adapter-list .rm {
  font-weight: 600;
}

.adunit-list li {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.adunit-name {
  font-weight: 600;
  color: #111827 !important;
  font-size: 0.78rem !important;
}

.adunit-sizes {
  font-size: 0.7rem !important;
  color: #6b7280 !important;
  font-weight: 500;
}

.badge-req {
  font-size: 0.62rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5563 !important;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
}

@media (max-width: 520px) {
  .config-split {
    grid-template-columns: 1fr;
  }

  .adapter-box-compact {
    min-height: 0;
  }
}

.publish-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1rem 1.05rem;
  margin-bottom: 0.85rem;
}

.publish-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}

.publish-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.8rem;
  color: #6b7280;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.publish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-radius: 0.45rem;
  background: #6366f1;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  flex-shrink: 0;
}

.history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.15rem;
}

.history-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #374151;
  margin-right: 0.15rem;
}

.badge-ok {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.badge-success {
  margin-left: auto;
}

.script-field {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.95rem 1rem;
  margin-bottom: 0.75rem;
}

.script-field pre {
  margin: 0;
  overflow: visible;
}

.script-field code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-all;
}

.theater-note {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
}

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

@media (prefers-reduced-motion: reduce) {
  .theater,
  .theater-panel,
  .primary {
    animation: none !important;
    transition: none !important;
  }

  .theater-panel {
    transform: none;
  }
}

.objections {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.objections ul {
  list-style: none;
  margin: 0;
  padding: 1.35rem 0 0;
  display: grid;
  gap: 0.85rem;
  border-top: 1px solid var(--line);
  max-width: 42ch;
}

.objections li {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  padding-left: 1.25rem;
  position: relative;
}

.objections li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--accent);
}

footer {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* Legal stubs */
.legal-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  margin: 0 0 1rem;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.legal-page .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.legal-page .back:hover {
  text-decoration: underline;
}
