:root {
  color-scheme: dark;
  --bg: #090a12;
  --panel: #121424;
  --panel-strong: #191b2f;
  --text: #f8fafc;
  --muted: #a7adbe;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #7c3aed;
  --primary-strong: #6d28d9;
  --accent: #22d3ee;
  --danger: #ef4444;
  --ok: #22c55e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.22), transparent 36rem),
    linear-gradient(315deg, rgba(34, 211, 238, 0.12), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
button,
input,
select {
  font: inherit;
}

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

button,
.button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.site-header,
.footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.nav,
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.94rem;
}

.nav a:hover,
.footer a:hover,
.text-link {
  color: white;
}

.hero,
.chat-shell,
.premium-page .hero {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 46px 0 34px;
}

.hero.compact {
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.45rem, 7vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

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

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.actions,
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
}

.ghost,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.wide {
  width: 100%;
}

.hero-panel,
.setup-panel,
.conversation,
.pay-card,
.admin-login,
.admin-dashboard,
.feature-card,
.post-card,
.admin-item,
.author-box,
.toc,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 20, 36, 0.76);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.hero-panel,
.setup-panel,
.pay-card,
.admin-login,
.admin-dashboard {
  padding: 22px;
}

.chat-preview {
  display: grid;
  gap: 12px;
}

.status-pill {
  width: fit-content;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.bubble,
.message {
  max-width: min(82%, 620px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 13px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.bubble.you,
.message.me {
  justify-self: end;
  align-self: flex-end;
  background: var(--primary);
}

.bubble.them,
.message.partner {
  justify-self: start;
  align-self: flex-start;
  background: var(--panel-strong);
}

.band,
.monetization,
.page-hero {
  padding: 52px 0;
}

.section-head {
  margin-bottom: 20px;
}

.feature-grid,
.post-grid,
.stats-grid,
.monetization-grid {
  display: grid;
  gap: 14px;
}

.feature-card,
.post-card,
.admin-item,
.monetization-grid > div,
.stats-grid > div {
  padding: 18px;
}

.feature-card p,
.post-card p,
.post-card span,
.hint,
.fineprint,
.article-page p,
.admin-item span,
.admin-item small,
.monetization-grid > div,
.footer p {
  color: var(--muted);
  line-height: 1.65;
}

.monetization {
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.monetization-grid > div,
.stats-grid > div {
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d0f1d;
  color: var(--text);
  outline: none;
  padding: 13px 14px;
}

input:focus,
select:focus {
  border-color: rgba(196, 181, 253, 0.9);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
}

.toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.toggle input {
  width: 20px;
  height: 20px;
}

.conversation {
  min-height: min(72vh, 760px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.conversation[hidden],
[hidden] {
  display: none;
}

.conversation-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.conversation-top h1,
.conversation-top p,
.conversation-top strong {
  margin: 0;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: #64748b;
}

.dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.icon-button {
  min-height: 40px;
  border-radius: 10px;
  padding: 9px 11px;
  font-weight: 850;
}

.messages {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px;
}

.message.system {
  align-self: center;
  max-width: 100%;
  border-style: dashed;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.message-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.price {
  margin-top: 18px;
  font-size: 3rem;
  font-weight: 950;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
}

.qr {
  width: min(260px, 100%);
  border-radius: 16px;
  background: white;
  padding: 10px;
}

.stack {
  display: grid;
  gap: 10px;
}

.admin-shell,
.content-page,
.article-page {
  padding: 34px 0 56px;
}

.stats-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 26px;
}

.stats-grid strong {
  display: block;
  font-size: 1.9rem;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 800;
}

.admin-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.admin-item {
  display: grid;
  gap: 8px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 14px;
}

.toc strong {
  margin-right: 8px;
}

.toc a,
.text-link {
  color: #c4b5fd;
  font-weight: 850;
}

.article-page article,
.article-page.tight {
  width: min(820px, 100%);
  margin: 0 auto;
}

.article-page h2 {
  margin-top: 34px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 16px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.author-box,
.related {
  margin-top: 34px;
  padding: 18px;
}

.footer {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
}

@media (min-width: 760px) {
  .hero,
  .chat-shell,
  .premium-page .hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  }

  .feature-grid,
  .post-grid,
  .monetization-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .conversation-top,
  .message-form {
    grid-template-columns: 1fr;
  }

  .conversation-top {
    display: grid;
  }

  .tool-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  h1 {
    font-size: 2.5rem;
  }
}
