:root {
  --accent: #3760E8;
  --accent-soft: #EAEFFD;
  --ink: #19172B;
  --ink-60: rgba(25, 23, 43, 0.62);
  --ink-40: rgba(25, 23, 43, 0.40);
  --line: rgba(25, 23, 43, 0.10);
  --bg: #FFFFFF;
  --bg-alt: #F7F8FC;
  --good: #0E8A5F;
  --warn: #B45309;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- shared chrome ---------- */
.proto-banner {
  background: var(--ink); color: #fff; font-size: 12px; text-align: center;
  padding: 6px 16px; letter-spacing: 0.02em;
}
.proto-banner strong { color: #9DB4F5; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- marketing nav ---------- */
.nav { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-60); background: none; border: none;
  cursor: pointer; font-family: inherit;
}
.nav-item:hover > a, .nav-item:hover > button { color: var(--ink); background: var(--bg-alt); }
.caret { font-size: 9px; opacity: 0.6; }
.dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(25,23,43,0.12); padding: 10px; min-width: 560px;
}
.nav-item:hover .dropdown { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.dropdown.single { min-width: 260px; }
.nav-item:hover .dropdown.single { grid-template-columns: 1fr; }
.dropdown a { display: block; padding: 10px 12px; border-radius: 8px; }
.dropdown a:hover { background: var(--accent-soft); }
.dropdown a b { display: block; font-size: 13.5px; font-weight: 600; }
.dropdown a small { display: block; font-size: 12px; color: var(--ink-60); margin-top: 1px; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 9px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2C4FC7; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink-40); }
.btn-lg { padding: 13px 26px; font-size: 15.5px; border-radius: 11px; }

/* ---------- marketing sections ---------- */
.hero { padding: 88px 0 72px; text-align: center; background:
  radial-gradient(1200px 480px at 50% -80px, var(--accent-soft), transparent); }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 22px;
}
h1 { font-size: 54px; line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; max-width: 820px; margin: 0 auto; }
.hero p.sub { font-size: 19px; color: var(--ink-60); max-width: 640px; margin: 22px auto 34px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--ink-40); }

.section { padding: 76px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 { font-size: 34px; letter-spacing: -0.02em; line-height: 1.15; font-weight: 750; }
.section-head p { color: var(--ink-60); font-size: 16.5px; margin-top: 12px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; } h1 { font-size: 38px; } }
@media (max-width: 620px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } .nav-links { display: none; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: block; transition: border-color .15s, box-shadow .15s;
}
a.card:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(55,96,232,0.10); }
.card .icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 14px;
}
.card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.card p { font-size: 13.5px; color: var(--ink-60); margin-top: 6px; }
.card .outcome { margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step .num {
  width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.step h3 { font-size: 16px; }
.step p { font-size: 13.5px; color: var(--ink-60); margin-top: 6px; }

.role-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; }
.role-card h3 { font-size: 18px; }
.role-card ul { margin: 14px 0 18px; padding-left: 0; list-style: none; }
.role-card li { font-size: 13.5px; color: var(--ink-60); padding: 4px 0 4px 22px; position: relative; }
.role-card li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.role-card a { font-size: 13.5px; font-weight: 600; color: var(--accent); }

.gate-band { background: var(--ink); color: #fff; border-radius: 16px; padding: 44px 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.gate-band h2 { color: #fff; }
.gate-band p { color: rgba(255,255,255,0.72); margin-top: 12px; font-size: 15.5px; }
.gate-list { list-style: none; }
.gate-list li { padding: 9px 0 9px 28px; position: relative; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.gate-list li:last-child { border-bottom: none; }
.gate-list li::before { content: "✓"; position: absolute; left: 0; color: #7FD8B4; font-weight: 700; }

.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 650; font-size: 15.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--ink-40); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-60); font-size: 14px; }

.footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--ink-40); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer a { color: var(--ink-60); margin-right: 18px; }

.breadcrumb { font-size: 13px; color: var(--ink-40); margin: 28px 0 0; }
.breadcrumb a { color: var(--accent); }

.lp-hero { padding: 56px 0 48px; }
.lp-hero h1 { font-size: 42px; margin: 14px 0 0; text-align: left; max-width: 760px; }
.lp-hero p.sub { font-size: 17.5px; color: var(--ink-60); max-width: 660px; margin: 18px 0 28px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.stat b { display: block; font-size: 26px; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: var(--ink-60); }

/* ---------- portal ---------- */
.app-frame { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 29px); }
.side { background: #FBFBFD; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.side .logo { padding: 4px 10px 14px; font-size: 16px; }
.side-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-40); padding: 14px 10px 5px; }
.side a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--ink-60); }
.side a:hover { background: rgba(25,23,43,0.05); color: var(--ink); }
.side a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side a .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-40); flex: none; }
.side a.active .dot { background: var(--accent); }
.side a .count { margin-left: auto; font-size: 11px; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.side .tenant { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-60); }
.side .tenant b { display: block; color: var(--ink); font-size: 13px; }

.main { padding: 26px 32px 60px; background: #fff; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 22px; text-align: left; margin: 0; max-width: none; letter-spacing: -0.015em; }
.page-head .desc { font-size: 13.5px; color: var(--ink-60); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi span { font-size: 12px; color: var(--ink-60); display: block; }
.kpi b { font-size: 22px; letter-spacing: -0.02em; }
.kpi .delta { font-size: 11.5px; font-weight: 600; margin-left: 6px; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: var(--warn); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FBFBFD; }
.panel-head h2 { font-size: 13.5px; font-weight: 700; letter-spacing: 0; }
.panel-head a { font-size: 12.5px; color: var(--accent); font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-40); padding: 9px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFE; }
td .sub { display: block; font-size: 11.5px; color: var(--ink-40); }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
th.num { text-align: right; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.chip.live { background: #E7F6EF; color: var(--good); }
.chip.draft { background: var(--bg-alt); color: var(--ink-60); }
.chip.review { background: #FEF3E2; color: var(--warn); }
.chip.paused { background: #F1F1F5; color: var(--ink-60); }
.chip.blue { background: var(--accent-soft); color: var(--accent); }

.row-actions a { font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 12px; }

.approve-row { display: flex; gap: 8px; }
.mini-btn { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-family: inherit; }
.mini-btn.ok { background: var(--accent); border-color: var(--accent); color: #fff; }

.uc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
@media (max-width: 1100px) { .uc-grid { grid-template-columns: repeat(2, 1fr); } .kpis { grid-template-columns: repeat(2, 1fr); } }
