:root {
  --purple-950: #170733;
  --purple-900: #21094a;
  --purple-800: #2e1065;
  --purple-600: #4c1d95;
  --purple-400: #8b5cf6;
  --lilac-200: #ddd2f5;
  --lilac-100: #efe9fb;
  --lilac-50: #f8f5fd;
  --white: #ffffff;
  --ink: #1c1230;
  --muted: #5d5373;
  --line: #e3daf3;
  --error: #9f1239;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(33, 9, 74, 0.1);
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--purple-600);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--purple-900);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
}

.logo svg {
  width: 26px;
  height: 26px;
  flex: none;
  margin-right: 9px;
}

.logo span {
  color: var(--lilac-200);
}

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

.nav a:not(.btn) {
  color: var(--lilac-200);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:not(.btn):hover {
  color: var(--white);
}

@media (max-width: 720px) {
  .nav .nav-link {
    display: none;
  }
  .nav {
    gap: 14px;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  border: 2px solid var(--purple-800);
  background: var(--purple-800);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--purple-600);
  border-color: var(--purple-600);
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--purple-400);
  outline-offset: 2px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.light {
  background: var(--white);
  border-color: var(--white);
  color: var(--purple-900);
}

.btn.light:hover {
  background: var(--lilac-100);
  border-color: var(--lilac-100);
}

.btn.ghost {
  background: transparent;
  color: var(--purple-800);
}

.btn.ghost:hover {
  background: var(--lilac-100);
  color: var(--purple-800);
  border-color: var(--purple-800);
}

.btn.small {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn.block {
  width: 100%;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--purple-600);
  text-decoration: underline;
  cursor: pointer;
}

.link-btn.danger {
  color: var(--error);
}

/* ---------- hero ---------- */

.hero {
  background: radial-gradient(1200px 500px at 80% -10%, var(--purple-600), transparent 60%), var(--purple-900);
  color: var(--white);
  padding: 84px 0 96px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 800;
  margin-bottom: 0.2em;
}

.hero .motto {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 600;
  color: var(--lilac-200);
  max-width: 30ch;
  margin-bottom: 1.4em;
}

.hero .sub {
  color: var(--lilac-200);
  max-width: 52ch;
  margin-bottom: 2em;
}

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

.hero .btn.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: var(--white);
}

.hero-card {
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.hero-card h2 {
  font-size: 1rem;
  margin-bottom: 14px;
  letter-spacing: 0;
}

.hero-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-card li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .hero {
    padding: 56px 0 64px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* ---------- sections ---------- */

.facts {
  background: var(--purple-950);
  color: var(--white);
  padding: 22px 0;
}

.facts .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.facts strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.facts span {
  color: var(--lilac-200);
  font-size: 0.92rem;
}

.facts strong span {
  color: inherit;
  font-size: inherit;
}

@media (max-width: 640px) {
  .facts .wrap {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.section {
  padding: 76px 0;
  scroll-margin-top: 64px; /* keeps headings clear of the sticky header */
}

.section.tint {
  background: var(--lilac-50);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--purple-900);
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.step .num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--purple-800);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 1.15rem;
  color: var(--purple-900);
}

.step p {
  color: var(--muted);
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.chips li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--purple-800);
}

@media (max-width: 860px) {
  .section {
    padding: 56px 0;
  }
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- pricing ---------- */

.billing-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--lilac-100);
  margin-top: 22px;
}

.billing-toggle button {
  border: 0;
  background: transparent;
  padding: 9px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  color: var(--purple-800);
  cursor: pointer;
}

.billing-toggle button[aria-pressed='true'] {
  background: var(--purple-800);
  color: var(--white);
}

.billing-toggle .save {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.85;
  margin-left: 4px;
}

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

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
}

.plan.popular {
  border: 2px solid var(--purple-800);
  box-shadow: var(--shadow);
}

.plan .badge {
  position: absolute;
  top: -13px;
  left: 22px;
  background: var(--purple-800);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.plan h3 {
  font-size: 1.25rem;
  color: var(--purple-900);
  margin-bottom: 6px;
}

.plan .tagline {
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 3em;
}

.plan .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--purple-900);
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan .price small {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.plan .billed {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 8px 0 18px;
}

.plan .group {
  margin-top: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--purple-600);
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.plan li {
  position: relative;
  padding: 5px 0 5px 24px;
}

.plan li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 11px;
  width: 11px;
  height: 6px;
  border-left: 2.5px solid var(--purple-600);
  border-bottom: 2.5px solid var(--purple-600);
  transform: rotate(-45deg);
}

.fine {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 24px;
}

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

@media (max-width: 560px) {
  .plans {
    grid-template-columns: 1fr;
  }
  .plan .tagline {
    min-height: 0;
  }
}

/* ---------- faq ---------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--purple-900);
}

.faq details p {
  margin: 12px 0 0;
  color: var(--muted);
}

/* ---------- call to action + footer ---------- */

.cta {
  background: var(--purple-900);
  color: var(--white);
  text-align: center;
  padding: 72px 0;
}

.cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.cta p {
  color: var(--lilac-200);
  margin-bottom: 1.6em;
}

.site-footer {
  background: var(--purple-950);
  color: var(--lilac-200);
  padding: 28px 0;
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--lilac-200);
}

.footer-links a:hover {
  color: var(--white);
}

/* ---------- legal pages (privacy, terms, refunds) ---------- */

.legal {
  background: var(--lilac-50);
  padding: 48px 0 72px;
}

.legal .wrap {
  max-width: 780px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 36px;
}

.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--purple-900);
}

.legal h2 {
  font-size: 1.25rem;
  color: var(--purple-800);
  margin-top: 2em;
}

.legal h3 {
  font-size: 1.02rem;
  margin-top: 1.4em;
}

.legal ul {
  padding-left: 1.25em;
  margin: 0 0 1em;
}

.legal li {
  margin-bottom: 0.5em;
}

.legal-date {
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-summary {
  background: var(--lilac-100);
  border-left: 4px solid var(--purple-600);
  border-radius: 8px;
  padding: 16px 18px;
}

@media (max-width: 600px) {
  .legal {
    padding: 20px 0 40px;
  }

  .legal .wrap {
    padding: 26px 20px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* ---------- forms ---------- */

.auth-page {
  min-height: calc(100vh - 64px);
  background: var(--lilac-50);
  padding: 48px 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}

.auth-card {
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.7rem;
  color: var(--purple-900);
}

.auth-card .lead {
  color: var(--muted);
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 16px 0 6px;
}

label .hint {
  font-weight: 500;
  color: var(--muted);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='url'],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--lilac-200);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

textarea {
  resize: vertical;
  min-height: 74px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple-600);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.msg {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.msg.error {
  background: #fdf0f3;
  color: var(--error);
}

.msg.ok {
  background: var(--lilac-100);
  color: var(--purple-800);
}

.notice {
  background: var(--lilac-100);
  border: 1px solid var(--lilac-200);
  color: var(--purple-900);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.93rem;
}

.auth-card .notice {
  margin-top: 18px;
}

#summary {
  margin-top: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row.total {
  border-bottom: 0;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--purple-900);
}

.radio-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.radio-row label {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--lilac-200);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.radio-row label:has(input:checked) {
  border-color: var(--purple-800);
  background: var(--lilac-50);
}

/* ---------- dashboard ---------- */

.app {
  background: var(--lilac-50);
  min-height: calc(100vh - 64px);
  padding: 32px 0 64px;
}

.app h1 {
  font-size: 1.8rem;
  color: var(--purple-900);
  margin-bottom: 4px;
}

.app .lead {
  color: var(--muted);
  margin-bottom: 22px;
}

.app .card {
  margin-top: 20px;
}

.app .card h2 {
  font-size: 1.2rem;
  color: var(--purple-900);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.card-head h2 {
  margin: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  border: 1.5px solid var(--lilac-200);
  background: var(--white);
  color: var(--purple-800);
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.tab[aria-selected='true'] {
  background: var(--purple-800);
  border-color: var(--purple-800);
  color: var(--white);
}

.tab.add {
  border-style: dashed;
}

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

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.stat .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--purple-900);
  line-height: 1.1;
}

.stat .label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat.feature {
  background: var(--purple-900);
  border-color: var(--purple-900);
}

.stat.feature .value {
  color: var(--white);
}

.stat.feature .label {
  color: var(--lilac-200);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.pill.not_started {
  background: #f1f0f4;
  color: var(--muted);
}

.pill.queued {
  background: var(--lilac-100);
  color: var(--purple-800);
}

.pill.submitted {
  background: var(--white);
  color: var(--purple-800);
  border-color: var(--purple-800);
}

.pill.removed {
  background: var(--purple-800);
  color: var(--white);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.88rem;
}

.queue-item {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.queue-item h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.queue-item textarea {
  min-height: 150px;
  font-size: 0.85rem;
  margin-top: 10px;
}

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