/* SlateFlow Capital — site styles */
:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line-2: #cbd5e1; --bg: #f6f8fa; --surface: #ffffff; --surface-2: #f1f5f9;
  --brand: #0f766e; --brand-2: #115e59; --brand-soft: #d7f3ee; --brand-ink: #134e4a;
  --amber: #b45309; --amber-soft: #fef3c7; --danger: #b91c1c; --danger-soft: #fee2e2; --ok: #15803d; --ok-soft: #dcfce7;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px -12px rgba(15,23,42,.15);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --display: 'Fraunces', Georgia, serif;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.mono { font-variant-numeric: tabular-nums; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; }
.brand em { font-style: normal; color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--brand-ink); background: var(--brand-soft); }
.nav-cta { display: flex; gap: 8px; align-items: center; margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-cta { margin: 8px 0 0; flex-direction: column; align-items: stretch; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 500px at 80% -10%, #d7f3ee 0%, rgba(215,243,238,0) 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 54ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 48px 0 40px; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h3 { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.icon-badge { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 14px; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: 8px 0 8px 28px; position: relative; }
.feature-list li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; }
.badge-pro { background: var(--amber-soft); color: var(--amber); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }

/* Stat mock in hero */
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(15,23,42,.35); }
.stat-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row .k { color: var(--muted); font-size: .9rem; }
.stat-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Pricing */
.price-card { position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; }
.price span { font-size: 1rem; font-weight: 500; color: var(--muted); }

/* Forms */
.form { display: grid; gap: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: .95rem; background: #fff; color: var(--ink); }
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { min-height: 120px; resize: vertical; }
.help { color: var(--muted); font-size: .8rem; margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.alert { padding: 12px 14px; border-radius: 8px; font-size: .9rem; border: 1px solid; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); border-color: #99f6e4; }
.alert-warn { background: var(--amber-soft); color: var(--amber); border-color: #fde68a; }
.auth-wrap { max-width: 440px; margin: 56px auto; }
.auth-wrap .card { padding: 32px; }
.auth-wrap h1 { font-size: 1.9rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); font-weight: 700; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #fafcfd; }
.pos { color: var(--ok); } .neg { color: var(--danger); }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 32px; margin-top: 64px; font-size: .9rem; }
.site-footer a { color: #e2e8f0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-legal { border-top: 1px solid #1e293b; margin-top: 32px; padding-top: 20px; font-size: .78rem; color: #94a3b8; }

/* App layout */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.app-side { border-right: 1px solid var(--line); background: var(--surface); padding: 20px 12px; }
.app-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.app-side a:hover { background: var(--surface-2); text-decoration: none; }
.app-side a.active { background: var(--brand-soft); color: var(--brand-ink); }
.app-side .lock { margin-left: auto; }
.app-main { padding: 28px 32px; min-width: 0; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.app-head h1 { font-size: 1.8rem; margin: 0; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; gap: 4px; padding: 8px 12px; }
  .app-side a { white-space: nowrap; }
  .app-main { padding: 20px 16px; }
}
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.tile .label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.tile .value { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.tile.hero-tile { background: var(--ink); color: #fff; border-color: var(--ink); }
.tile.hero-tile .label, .tile.hero-tile .sub { color: #cbd5e1; }
.tile.hero-tile .value { font-size: 2.2rem; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.toolbar .spacer { flex: 1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.pill-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--surface); }
.pill-toggle button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; }
.pill-toggle button.active { background: var(--ink); color: #fff; }

/* Modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: 0 40px 80px -20px rgba(15,23,42,.5); }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }

/* Blog */
.post-list { display: grid; gap: 16px; }
.post-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.post-item h3 { margin-bottom: 6px; font-size: 1.25rem; }
.post-item .meta { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.prose { font-size: 1.05rem; line-height: 1.75; max-width: 72ch; }
.prose h1, .prose h2, .prose h3 { font-family: var(--display); margin-top: 1.4em; }
.prose img { border-radius: 8px; }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.prose code { background: var(--surface-2); padding: 2px 5px; border-radius: 4px; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 1em 0; padding: 4px 0 4px 16px; color: var(--ink-2); }
.prose table { font-size: .95rem; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }
.editor-grid textarea { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.preview { border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; min-height: 420px; background: var(--surface); overflow: auto; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; background: var(--surface); margin-bottom: 10px; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 10px 0 0; color: var(--ink-2); }

/* Charts */
.chart { width: 100%; height: auto; display: block; font-family: var(--font); }
.chart text { font-size: 12px; fill: var(--ink-2); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-tip { position: fixed; background: var(--ink); color: #fff; font-size: .8rem; padding: 6px 10px; border-radius: 6px; pointer-events: none; z-index: 300; display: none; }

/* Dropzone */
.drop { border: 2px dashed var(--line-2); border-radius: 10px; padding: 24px; text-align: center; color: var(--muted); background: var(--surface); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.checkbox input { width: 16px; height: 16px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.kbd { font-family: ui-monospace, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .85em; border: 1px solid var(--line); }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.locked { position: relative; }
.locked::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(246,248,250,0), var(--bg) 80%); pointer-events: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
