/* Mandavo Synthetic Datasets — design system (no build step) */
:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e8ecf1;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-ink: #3730a3;
  --on-accent: #ffffff;

  --ok: #15803d;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --info-soft: #eff6ff;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 4%);
  --shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 10px 28px -12px rgb(15 23 42 / 12%);
  --shadow-lg: 0 4px 6px -2px rgb(15 23 42 / 6%), 0 20px 40px -16px rgb(15 23 42 / 16%);
  --ring: 0 0 0 3px rgb(79 70 229 / 22%);

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --page-gutter: 20px;
  --nav-h: 64px;
  --container: 1120px;
  --section-y: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html.nav-open { overflow: hidden; }
body.nav-open { overflow: hidden; }
body.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgb(15 23 42 / 42%);
  backdrop-filter: blur(2px);
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.85rem, 3.2vw, 2.65rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
code:not(pre code) {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--accent-soft); }

/* Utilities */
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8rem; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 64px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex { display: flex; align-items: center; gap: 12px; }
.flex.between { justify-content: space-between; }
.flex.center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.grow { flex: 1; }

.container {
  width: min(var(--container), calc(100% - var(--page-gutter) * 2));
  margin-inline: auto;
}

.container.narrow { width: min(560px, calc(100% - var(--page-gutter) * 2)); }

.section { padding: var(--section-y) 0; }
.section-tight { padding: 32px 0; }
.section-band { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-surface { background: var(--surface); border-block: 1px solid var(--line); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 42rem;
  margin-inline: auto;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  display: inline-block;
  vertical-align: -0.2em;
  flex: none;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.nav .container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--nav-h);
}

.logo-plate {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-plate:hover { text-decoration: none; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.wordmark-brand { color: var(--ink); }
.wordmark-product { color: var(--accent); font-weight: 600; }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink-2);
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--ink);
  background: var(--accent-soft);
}

.nav-links a.btn-primary {
  color: var(--on-accent);
  background: var(--accent);
}

.nav-links a.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .icon { width: 18px; height: 18px; }

@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 8px var(--page-gutter) 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .nav-links .btn { margin: 4px 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  text-decoration: none;
  background: var(--surface-2);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line-2);
  box-shadow: none;
}

.btn-ghost:hover { background: var(--accent-soft); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover { background: #991b1b; border-color: #991b1b; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.84rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }

/* Cards & grids */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-icon .icon { width: 22px; height: 22px; }

.feature-card h3 { margin-bottom: 0.25em; }
.feature-card p { margin: 0; font-size: 0.94rem; }

/* Hero */
.hero {
  padding: calc(var(--section-y) + 12px) 0 var(--section-y);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgb(79 70 229 / 10%), transparent 60%),
    var(--bg);
}

.hero-inner { max-width: 760px; margin-inline: auto; text-align: center; }
.hero-actions { justify-content: center; margin-top: 28px; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 32px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.trust-item .icon { width: 18px; height: 18px; color: var(--accent); }

.cta-band {
  text-align: center;
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.cta-band h2 { color: #fff; margin-bottom: 0.5em; }
.cta-band p { color: rgb(255 255 255 / 88%); max-width: 520px; margin-inline: auto 1.5em; }
.cta-band .btn { background: #fff; color: var(--accent-ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--accent-soft); }

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  padding: 24px 20px;
}

.plan h3 { margin-bottom: 4px; }

.plan ul {
  list-style: none;
  margin: 16px 0 20px;
  padding: 0;
  flex: 1;
}

.plan ul li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.plan ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.plan .price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 12px;
}

.price-note {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.plan .cta { margin-top: auto; width: 100%; text-align: center; }
.plan form { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.plan.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow), 0 0 0 1px rgb(79 70 229 / 12%);
}

.ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--ink-2);
}

.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.checkbox {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}

.checkbox input { margin-top: 3px; flex-shrink: 0; }

/* Forms */
.auth {
  display: flex;
  justify-content: center;
  padding: 48px var(--page-gutter) 64px;
}

.auth .card {
  width: min(440px, 100%);
  padding: 32px 28px;
}

.auth h1 { font-size: 1.65rem; margin-bottom: 0.35em; }
.auth .lead { text-align: left; margin: 0 0 20px; font-size: 0.98rem; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field .help { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--muted); }

.input {
  width: 100%;
  max-width: none;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.input:disabled { background: var(--surface-2); color: var(--muted); }
.input-narrow { max-width: 280px; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.check input { margin-top: 3px; flex-shrink: 0; }

/* Account */
.account-page {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  padding: 40px 0 64px;
}

.account-aside {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.account-aside-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 4px;
}

.account-aside-email {
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-all;
  margin: 0 0 8px;
}

.account-aside-meta {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.account-menu { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }

.account-menu-link {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.9rem;
}

.account-menu-link:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.account-menu-link.active { background: var(--accent-soft); color: var(--accent-ink); }

.account-content { min-width: 0; }
.account-sheet { padding: 0; overflow: hidden; }
.account-block { padding: 24px 28px; }
.account-block-title { font-size: 1.15rem; margin-bottom: 4px; }
.account-block-lead { margin-bottom: 16px; }
.account-split { border: 0; border-top: 1px solid var(--line); margin: 0; }
.account-block-danger { border-color: #fecaca; background: #fffbfb; margin-top: 20px; }

@media (max-width: 860px) {
  .account-page { grid-template-columns: 1fr; }
  .account-aside { position: static; }
}

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

.table th, .data-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.table.compare th,
.table.compare td { text-align: center; }
.table.compare th:first-child,
.table.compare td:first-child { text-align: left; }

/* Alerts */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.alert-ok { background: var(--ok-soft); color: #065f46; border-color: #a7f3d0; }
.alert-danger { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-warn { background: var(--warn-soft); color: #92400e; border-color: #fde68a; }
.alert-info { background: var(--info-soft); color: #1e40af; border-color: #bfdbfe; }

/* Admin */
.page-head h1 { margin-bottom: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 20px; }
.tabs a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
}
.tabs a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.tabs a.active { background: var(--accent-soft); color: var(--accent-ink); }

.stat .n {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat .l { font-size: 0.84rem; color: var(--muted); margin-top: 4px; }

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-green { background: var(--ok-soft); color: var(--ok); }
.status-yellow { background: var(--warn-soft); color: var(--warn); }
.status-red { background: var(--danger-soft); color: var(--danger); }
.status-excluded { background: var(--surface-2); color: var(--muted); }
.muted-row { opacity: 0.75; }

/* Legal prose */
.prose {
  max-width: 720px;
  margin-inline: auto;
  padding: 48px var(--page-gutter) 72px;
}

.prose h1 { font-size: 2rem; margin-bottom: 12px; }
.prose h2 { font-size: 1.3rem; margin-top: 36px; }
.prose h3 { font-size: 1.05rem; margin-top: 24px; }
.prose ul, .prose ol { padding-left: 1.25rem; margin-bottom: 1em; }
.prose p { margin-bottom: 1em; }
.prose .meta { color: var(--muted); font-size: 0.92rem; }

.prose .box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 16px 0 20px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0 32px;
}

.site-footer-tagline {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 28ch;
}

.site-footer-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}

.site-footer-list { list-style: none; margin: 0; padding: 0; }
.site-footer-list li { margin-bottom: 8px; }
.site-footer-list a { color: var(--ink-2); font-size: 0.9rem; }
.site-footer-list a:hover { color: var(--accent); }

.site-footer-bar {
  border-top: 1px solid var(--line);
  padding: 16px 0 24px;
}

.site-footer-copy { margin: 4px 0; font-size: 0.84rem; }

@media (max-width: 760px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
  .site-footer-brand { grid-column: 1 / -1; }
}

/* Toasts */
.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease;
}

.toast.ok { background: var(--ok); }
.toast.danger { background: var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Prose (guides, docs) */
.prose h2 { margin-top: 1.75rem; margin-bottom: 0.75rem; font-size: 1.25rem; }
.prose h3 { margin-top: 1.25rem; margin-bottom: 0.5rem; font-size: 1.05rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.prose pre.code-block {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.45;
}
.prose pre.code-block code { background: none; padding: 0; }
.prose a { color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

.guide-card { text-decoration: none; color: inherit; transition: box-shadow 0.15s, border-color 0.15s; }
.guide-card:hover { box-shadow: var(--shadow); border-color: var(--accent-soft); }
.guide-card h2 { font-size: 1.05rem; margin: 0 0 8px; }

/* Landing sample gallery */
.sample-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.sample-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sample-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1654 / 2339;
  object-fit: cover;
  object-position: top;
}
.sample-card figcaption { padding: 10px 12px; text-align: center; }

@media (max-width: 900px) {
  .sample-gallery { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
}
