:root {
  color-scheme: dark;
  --bg: #100c1c;
  --panel: #1d152b;
  --ink: #f5f0ff;
  --muted: #beb1d0;
  --accent: #c3a8ff;
  --border: #3d2e54;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 75% 0, #45236850, transparent 48%); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, .button {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #201032;
  font-weight: 750;
  padding: 11px 16px;
  cursor: pointer;
  text-align: center;
}
button:hover, .button:hover { filter: brightness(1.1); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.secondary { background: transparent; color: var(--accent); border-color: var(--border); }
input {
  background: #120e1d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
input:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
label { display: grid; gap: 6px; font-size: .9rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { line-height: 1.12; letter-spacing: -.035em; }
h2 { line-height: 1.25; font-size: 1.65rem; }
p, small, li { color: var(--muted); }
small { font-size: .8rem; }
ul { padding-left: 20px; }
li { padding: 4px 0; }
[hidden] { display: none !important; }

.shell { max-width: 1120px; margin: auto; padding: 0 24px; }
main.shell { padding-bottom: 48px; }
.header { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 16px; font-size: .88rem; }
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav [aria-current] { color: var(--ink); font-weight: 750; }
.brand { font-weight: 850; font-size: 1.3rem; color: var(--ink); }
.brand span { color: var(--accent); }
.hero { padding: 65px 0 36px; max-width: 760px; }
.eyebrow { color: var(--accent); font-size: .7rem; letter-spacing: .17em; font-weight: 800; }
.hero h1 { font-size: clamp(2.4rem, 5.8vw, 4.1rem); margin: 18px 0 24px; }
.hero p { font-size: 1.12rem; max-width: 590px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0 22px; }
.card { background: linear-gradient(140deg, #261b36, var(--panel)); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: #9d76d9; }
.plan h2 { margin: 12px 0; }
.plan > p { max-width: 360px; }
.plan .price { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; color: var(--ink); line-height: 1.1; margin: 24px 0 8px; }
.price span { font-size: 1rem; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.availability { font-size: .85rem; margin-top: auto; padding-top: 20px; }
.plan button { width: 100%; }
.fineprint { font-size: .82rem; max-width: 960px; }
.how { padding: 48px 0 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 24px; }
.steps b { font-size: 1.9rem; color: var(--accent); }
.steps h3 { margin: 12px 0 6px; }
footer.shell { font-size: .8rem; border-top: 1px solid var(--border); padding-top: 25px; padding-bottom: 35px; }

.auth-shell { max-width: 520px; padding-top: clamp(18px, 5vw, 72px); }
.auth-card { padding: clamp(22px, 5vw, 40px); }
.auth-card h1 { font-size: clamp(1.9rem, 5vw, 2.55rem); margin: 12px 0; }
.auth-card form, .creative-form { display: grid; gap: 14px; align-content: start; min-width: 0; }
.auth-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: .9rem; }
.plan-context { padding: 9px 12px; border-radius: 8px; background: #b99aff16; color: var(--accent); font-size: .86rem; }

.notice { border: 1px solid #77613c; background: #362b19; padding: 13px 16px; border-radius: 10px; white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 22px; }
.notice.error { border-color: #c06b87; background: #3b1e2a; }
.environment { color: #f5d5a2; font-size: .72rem; letter-spacing: .12em; font-weight: 750; margin: 14px 0 0; }
.section-heading, .checkout-plan, .order-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dashboard-heading { align-items: center; margin: 18px 0 32px; }
.dashboard-heading h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin: 6px 0 4px; }
.dashboard-heading p { margin: 0; overflow-wrap: anywhere; }
.checkout-plan { align-items: center; margin-bottom: 30px; }
.checkout-plan h2 { margin: 6px 0 0; }
.orders { display: grid; gap: 16px; }
.order h3 { margin: 4px 0; overflow-wrap: anywhere; }
.order .meta { font-size: .85rem; margin: 5px 0 0; }
.badge { display: inline-block; border-radius: 30px; padding: 3px 11px; background: #b99aff20; color: var(--accent); font-size: .78rem; }
.badge.paid { color: #b4f1cf; background: #23483d; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button { font-size: .85rem; }
.history { margin-top: 24px; }
.history summary { width: fit-content; color: var(--accent); cursor: pointer; margin-bottom: 12px; }
.history .card { padding-block: 16px; }
.review-section { margin-top: 36px; }
.creative-status { margin: 14px 0 0; overflow-wrap: anywhere; }
.published-link { display: inline-block; margin-inline-start: 12px; font-size: .85rem; }
.creative-status.rejected { color: #ffb7c9; }
.editor {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 22px;
}
.editor.preview-only { grid-template-columns: minmax(0, 1fr); }
.check { display: flex; align-items: flex-start; color: var(--muted); gap: 10px; }
.check input { width: auto; margin-top: 5px; }
.review-actions { display: grid; align-content: start; gap: 12px; overflow-wrap: anywhere; }

.creative-preview { min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: #171122; padding: 16px; align-self: start; }
.preview-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.preview-heading h3 { margin: 0; }
.preview-heading p { font-size: .8rem; margin: 0; }
.preview-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; }
.preview-switch button { font-size: .78rem; padding: 4px 9px; border-radius: 5px; background: transparent; color: var(--muted); }
.preview-switch button[aria-pressed="true"] { background: #3a2851; color: var(--ink); }
.preview-stage { display: grid; grid-template-columns: minmax(0, 1fr); place-items: start center; background: #0e0a16; border-radius: 10px; padding: 9px; }
.site-preview {
  --preview-banner-width: 1200px;
  --preview-banner-height: 150px;
  --preview-banner-ratio: 1200 / 150;
  width: 100%;
  background: #101014;
  border: 1px solid #32303c;
  border-radius: 8px;
  padding: 12px;
  color: #f0eafa;
}
.site-preview[data-placement="results"] {
  --preview-banner-width: 960px;
  --preview-banner-height: 120px;
  --preview-banner-ratio: 960 / 120;
}
.site-preview[data-device="mobile"] {
  --preview-banner-width: 320px;
  --preview-banner-height: 50px;
  --preview-banner-ratio: 320 / 50;
  max-width: 346px;
}
.mock-header { color: #eee5f9; font-size: .8rem; font-weight: 800; padding-bottom: 8px; }
.mock-header b { color: #b589ef; }
.mock-search { display: flex; justify-content: space-between; align-items: center; gap: 6px; border: 1px solid #383341; border-radius: 8px; padding: 7px 8px; color: #c3bbc9; font-size: .72rem; }
.mock-search span:last-child { padding: 2px 8px; background: #8c5bbf; color: #fff; border-radius: 4px; }
.mock-results { display: grid; gap: 5px; margin-top: 10px; }
.mock-results strong { font-size: .74rem; }
.mock-track { display: flex; align-items: center; gap: 7px; padding: 5px; border-radius: 5px; background: #1b1921; }
.mock-track span { width: 13px; height: 13px; background: #42334e; border-radius: 3px; }
.mock-track span + span { width: 28%; height: 4px; background: #51445d; }
.mock-ad { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 5px; margin: 11px auto 0; }
.mock-ad > span { color: #bbb6c3; font-size: .625rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mock-banner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; width: 100%; }
.mock-banner img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, var(--preview-banner-width));
  max-height: var(--preview-banner-height);
  border-radius: 8px;
}
.mock-banner [data-preview-placeholder] {
  display: grid;
  place-items: center;
  width: min(100%, var(--preview-banner-width));
  aspect-ratio: var(--preview-banner-ratio);
  border: 1px dashed #695780;
  border-radius: 8px;
  color: #c7aee7;
  font-size: .7rem;
  text-align: center;
}
.creative-preview > small { display: block; margin-top: 8px; }

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

@media (max-width: 580px) {
  .shell { padding-inline: 16px; }
  .header { min-height: 70px; font-size: .78rem; }
  .header-nav { gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
  .header-nav .button, .header-nav button { padding: 6px 8px; }
  .brand { font-size: 1rem; }
  .hero { padding-top: 30px; }
  .plans, .steps { grid-template-columns: 1fr; }
  .steps { gap: 12px; }
  .card { padding: 17px; }
  .section-heading, .checkout-plan, .order-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .creative-preview { padding: 10px; }
}
