/* Klik Autopilot — design system: marketing site, sign-in screens and the app. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --surface-3: #eceff5;
  --border: #e5e8ef;
  --border-strong: #d4d9e3;
  --text: #0b0d12;
  --text-2: #353b48;
  --muted: #6b7280;
  --faint: #9aa1ae;

  --brand: #2456ff;
  --brand-600: #1a45e0;
  --brand-50: #eef2ff;
  --brand-100: #dfe6ff;
  --ink: #0b0d12;

  --good: #0f7b55;
  --good-50: #e6f6ee;
  --warn: #9a5b00;
  --warn-50: #fff4df;
  --bad: #c0331e;
  --bad-50: #fdecea;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.22), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --gradient: radial-gradient(120% 140% at 85% 0%, #9cbcff 0%, rgba(156, 188, 255, 0) 45%),
              radial-gradient(90% 120% at 0% 100%, #04103a 0%, rgba(4, 16, 58, 0) 55%),
              linear-gradient(135deg, #071a5c 0%, #1440e6 45%, #2f6bff 70%, #7aa5ff 100%);

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 14.5px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: 0.95rem; font-weight: 620; }
p { margin: 0 0 0.75rem; }
small, .muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 0.05rem 0.35rem; }
.i { flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ======================================================================
   Buttons, inputs, chips — shared everywhere
   ====================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font: inherit; font-weight: 600; font-size: 0.9rem; line-height: 1;
  height: 38px; padding: 0 0.95rem;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 1px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(36, 86, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #262a33; border-color: #262a33; }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { background: #eef2ff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline-light { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); color: #fff; box-shadow: none; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); }
.btn-danger { color: var(--bad); border-color: #f3c7c1; }
.btn-danger:hover { background: var(--bad-50); }
.btn-small { height: 30px; padding: 0 0.7rem; font-size: 0.82rem; border-radius: 8px; }
.btn-large { height: 48px; padding: 0 1.4rem; font-size: 1rem; }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--brand); padding: 0; font: inherit; font-weight: 550; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
form.inline { display: inline; margin: 0; }

label { display: block; font-weight: 600; font-size: 0.86rem; margin-bottom: 0.35rem; color: var(--text-2); }
.field { margin-bottom: 1rem; }
.field .hint, .hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; margin-top: 0.3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 0.55rem 0.75rem; min-height: 40px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
textarea.editor { font-family: var(--mono); font-size: 0.83rem; line-height: 1.55; min-height: 36rem; background: #fbfcfe; }
input.code-input { font-family: var(--mono); font-size: 1.35rem; letter-spacing: 0.35em; text-align: center; }
input.small { width: 6rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; color: var(--text-2); }
.check input { margin-top: 0.25rem; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.76rem; font-weight: 600; line-height: 1;
  padding: 0.32rem 0.6rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-good { background: var(--good-50); color: var(--good); border-color: #c4ead8; }
.chip-warn { background: var(--warn-50); color: var(--warn); border-color: #f5ddb0; }
.chip-bad { background: var(--bad-50); color: var(--bad); border-color: #f5cbc5; }
.chip-brand { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.chip-plain::before { display: none; }

.flash, .banner {
  display: flex; align-items: flex-start; gap: 0.6rem;
  border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 1rem;
  border: 1px solid transparent; font-size: 0.9rem;
}
.flash { display: block; }
.banner { align-items: center; flex-wrap: wrap; }
.flash-info, .banner-info { background: var(--brand-50); border-color: var(--brand-100); color: #1f3a99; }
.flash-good, .banner-good { background: var(--good-50); border-color: #c4ead8; color: var(--good); }
.flash-warn, .banner-warn { background: var(--warn-50); border-color: #f5ddb0; color: var(--warn); }
.flash-bad, .banner-bad { background: var(--bad-50); border-color: #f5cbc5; color: var(--bad); }
.banner strong { font-weight: 650; }

/* ======================================================================
   Layout helpers
   ====================================================================== */

.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row > input[type="text"], .row > input[type="email"], .row > input[type="password"], .row > select { width: auto; flex: 1 1 180px; }
.stack > * + * { margin-top: 0.75rem; }
.spacer { flex: 1; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-xs);
}
.card + .card { margin-top: 1.25rem; }
.card.tight { padding: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.card-head h2, .card-head h3 { margin: 0; }
.card-sub { color: var(--muted); font-size: 0.86rem; margin-top: -0.5rem; margin-bottom: 1rem; }
.card.danger { border-color: #f5d3ce; }
.section-title { font-size: 0.78rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1.75rem 0 0.75rem; }

/* ======================================================================
   App shell: sidebar + main
   ====================================================================== */

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 1rem 0.85rem; overflow-x: hidden;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--text); font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -0.01em; padding: 0.25rem 0.45rem 1rem; }
.brand:hover { text-decoration: none; }
.klik-wordmark { display: block; flex: none; }
.brand-product { font-weight: 600; color: var(--text-2); padding-left: 0.6rem; margin-left: 0.1rem; border-left: 1.5px solid var(--border-strong); line-height: 1.1; letter-spacing: -0.01em; }

.nav-section { font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); padding: 0.9rem 0.6rem 0.4rem; display: flex; align-items: center; justify-content: space-between; }
.nav-section form { margin: 0; }
.nav-add { background: none; border: none; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-flex; }
.nav-add:hover { color: var(--brand); background: var(--brand-50); }
.nav-link {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.6rem; border-radius: 9px;
  color: var(--text-2); font-weight: 550; font-size: 0.9rem;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav-link.active { background: var(--brand-50); color: var(--brand); }
.nav-link .i { color: var(--faint); }
.nav-link.active .i, .nav-link:hover .i { color: currentColor; }
.nav-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot-good { background: #1fb57a; box-shadow: 0 0 0 3px #d5f3e5; }
.dot-warn { background: #e9a020; }
.dot-bad { background: #e2483a; }

.sidebar-foot { margin-top: auto; padding-top: 1rem; display: grid; gap: 0.75rem; }
.sidebar-foot > * { min-width: 0; }
.trial-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem; background: linear-gradient(180deg, #f7f9ff, #fff); }
.trial-card .t-title { display: flex; align-items: center; gap: 0.45rem; font-weight: 650; font-size: 0.86rem; }
.trial-card .t-sub { color: var(--muted); font-size: 0.78rem; margin: 0.2rem 0 0.55rem; }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #6b9bff); border-radius: 999px; }
.progress.warn > span { background: linear-gradient(90deg, #e9a020, #f3c15a); }
.progress.bad > span { background: #e2483a; }
.w-0 { width: 0; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; }
.w-50 { width: 50%; } .w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }

.user-card { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem; border-radius: var(--radius); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 0.8rem; color: #fff; background: linear-gradient(135deg, #2456ff, #7aa5ff); }
.user-card .who { flex: 1; min-width: 0; }
.user-card .who b { display: block; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .who span { display: block; font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: none; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.main { min-width: 0; }
.main-inner { max-width: 1180px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0.3rem 0 0; color: var(--muted); }
.page-head h1 + .row { margin-top: 0.55rem; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.35rem; display: flex; gap: 0.35rem; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

/* Mobile: the sidebar becomes a slide-down menu (CSS-only toggle). */
.mobile-bar { display: none; }
#nav-toggle { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .sidebar { display: none; position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  #nav-toggle:checked ~ .app .sidebar { display: flex; }
  .main-inner { padding: 1.25rem 1rem 3rem; }
}

/* ======================================================================
   App components
   ====================================================================== */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.1rem; box-shadow: var(--shadow-xs); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.82rem; font-weight: 550; }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi-icon.good { background: var(--good-50); color: var(--good); }
.kpi-icon.warn { background: var(--warn-50); color: var(--warn); }
.kpi-icon.ink { background: var(--surface-2); color: var(--text-2); }
.kpi b { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.45rem; font-variant-numeric: tabular-nums; }
.kpi span.sub { font-size: 0.78rem; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0.9rem 0; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 0.6rem 0.75rem; }
.stat b { display: block; font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.75rem; color: var(--muted); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mb-card { display: flex; flex-direction: column; }
.mb-card .mb-top { display: flex; align-items: flex-start; gap: 0.8rem; }
.mb-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.mb-card h2 { margin: 0; font-size: 1rem; }
.mb-card h2 a { color: var(--text); }
.address { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.mb-actions { margin-top: auto; padding-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.new-card { border: 1.5px dashed var(--border-strong); background: transparent; box-shadow: none; display: grid; place-items: center; text-align: center; min-height: 200px; color: var(--muted); }

.steps-mini { display: flex; gap: 0.35rem; margin: 0.9rem 0 0.35rem; }
.steps-mini span { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); }
.steps-mini span.on { background: var(--brand); }

.checklist { list-style: none; padding: 0; margin: 0.25rem 0 0; }
.checklist li { display: flex; gap: 0.6rem; align-items: center; padding: 0.35rem 0; font-size: 0.9rem; color: var(--text-2); }
.checklist .tick { width: 20px; height: 20px; border-radius: 50%; flex: none; border: 2px solid var(--border-strong); display: grid; place-items: center; }
.checklist li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.checklist li.done .tick { background: var(--good); border-color: var(--good); }
.checklist li.done .tick::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

.table-wrap { overflow-x: auto; margin: 0 -1.35rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 0.75rem 1.35rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { white-space: nowrap; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfd; }
td .sub { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.1rem; }
table.gaps td:first-child { width: 45%; }

.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; overflow-y: hidden; }
.tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.7rem 0.85rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { background: var(--warn-50); color: var(--warn); border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.72rem; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.mode { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 0.9rem; cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); transition: border-color 0.15s, background 0.15s; }
.mode:hover { border-color: var(--border-strong); }
.mode input { margin-right: 0.4rem; accent-color: var(--brand); }
.mode strong { font-weight: 650; color: var(--text); }
.mode p { margin: 0.4rem 0 0; font-size: 0.83rem; color: var(--muted); }
.mode:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }

.try-result { margin-top: 1.1rem; }
.try-result[hidden] { display: none; }
.verdict { border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 0.85rem; border: 1px solid transparent; }
.verdict-reply, .verdict-draft { background: var(--good-50); border-color: #c4ead8; color: var(--good); }
.verdict-escalate { background: var(--warn-50); border-color: #f5ddb0; color: var(--warn); }
.verdict-label_only { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.verdict h3 { margin: 0 0 0.2rem; color: inherit; }
.verdict p { margin: 0; font-size: 0.85rem; }
.reply-box { white-space: pre-wrap; font-size: 0.88rem; background: #fbfcfe; border-radius: var(--radius); padding: 0.95rem 1rem; border: 1px solid var(--border); line-height: 1.6; }
.missing { margin: 0.25rem 0 0.5rem; padding-left: 1.2rem; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-100); border-top-color: var(--brand); animation: spin 0.8s linear infinite; display: inline-block; }
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.dirty { color: var(--warn); font-size: 0.82rem; font-weight: 600; }
.dirty[hidden] { display: none; }

.link-box { display: flex; gap: 0.5rem; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem 0.4rem 0.4rem 0.75rem; margin: 0.6rem 0; }
.link-box code { flex: 1; overflow-x: auto; white-space: nowrap; background: none; border: none; padding: 0; }
details.actions summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 0.84rem; list-style: none; display: inline-flex; align-items: center; gap: 0.3rem; }
details.actions summary::-webkit-details-marker { display: none; }
details.actions[open] summary { margin-bottom: 0.6rem; }
.action-grid { display: grid; gap: 0.5rem; min-width: 270px; }
.action-grid form { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.action-grid input { min-height: 30px; padding: 0.3rem 0.5rem; font-size: 0.82rem; }

.qr { background: #fff; padding: 0.75rem; border-radius: var(--radius); display: inline-block; border: 1px solid var(--border); }
.qr svg { display: block; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.45rem 1rem; font-family: var(--mono); font-size: 0.98rem; background: var(--surface-2); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); }
.prose { max-width: 740px; }
.prose h2 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.empty { text-align: center; color: var(--muted); padding: 2.25rem 1rem; }
.empty .i { color: var(--faint); margin-bottom: 0.5rem; }

/* ======================================================================
   Sign-in screens: form on the left, brand panel on the right
   ====================================================================== */

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.auth-form { display: flex; flex-direction: column; padding: 1.75rem 2.5rem; }
.auth-form .auth-body { width: 100%; max-width: 400px; margin: auto; padding: 2rem 0; }
.auth-form h1 { font-size: 1.75rem; letter-spacing: -0.025em; }
.auth-form .lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth-body form + p { margin-top: 1.1rem; }
.auth-foot { font-size: 0.8rem; color: var(--faint); display: flex; gap: 1rem; }
.auth-foot a { color: var(--faint); }
.auth-panel { margin: 0.75rem; border-radius: var(--radius-xl); background: var(--gradient); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-panel h2 { color: #fff; font-size: 2rem; letter-spacing: -0.03em; line-height: 1.15; max-width: 440px; }
.auth-panel p { color: rgba(255, 255, 255, 0.82); max-width: 420px; font-size: 1rem; }
.auth-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.8rem; }
.auth-points li { display: flex; gap: 0.7rem; align-items: flex-start; color: rgba(255, 255, 255, 0.92); }
.auth-points .i { margin-top: 2px; background: rgba(255, 255, 255, 0.16); border-radius: 7px; padding: 4px; box-sizing: content-box; }
.auth-panel .mock { margin-top: 2.5rem; max-width: 460px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-panel { display: none; } .auth-form { padding: 1.25rem; } }

/* ======================================================================
   Marketing site
   ====================================================================== */

body.site { background: #fbfbfd; }
.m-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.m-nav { position: sticky; top: 0; z-index: 30; background: rgba(251, 251, 253, 0.85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; }
.m-nav .m-wrap { display: flex; align-items: center; gap: 2rem; height: 68px; }
.m-links { display: flex; gap: 1.75rem; }
.m-links a { color: var(--text-2); font-weight: 550; font-size: 0.93rem; }
.m-links a:hover { color: var(--text); text-decoration: none; }
.m-cta { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.m-cta .btn { height: 40px; }
@media (max-width: 860px) { .m-links { display: none; } }

.hero {
  margin: 0.5rem 1rem 0; border-radius: var(--radius-xl); background: var(--gradient);
  color: #fff; position: relative; overflow: hidden; padding: 5.5rem 1.5rem 0; text-align: center;
}
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, 0.18), transparent 70%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.25rem); letter-spacing: -0.04em; line-height: 1.04; font-weight: 750; margin: 1.25rem auto 1rem; max-width: 900px; }
.hero .sub { font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, 0.85); max-width: 640px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; position: relative; z-index: 2; }
.hero-note { margin-top: 1rem; color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; position: relative; z-index: 2; }
.hero-shot { position: relative; z-index: 2; max-width: 980px; margin: 3.5rem auto 0; }

/* The product mock-up (pure HTML/CSS). */
.mock { background: #fff; color: var(--text); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg); text-align: left; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.6); }
.auth-panel .mock { border-radius: 16px; }
.mock-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); background: #fafbfd; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e3e6ec; display: inline-block; }
.mock-bar .mock-url { margin-left: 0.75rem; font-size: 0.75rem; color: var(--faint); font-family: var(--mono); }
.mock-body { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr); min-height: 330px; }
.mock-side { border-right: 1px solid var(--border); padding: 0.85rem 0.6rem; background: #fcfcfe; }
.mock-side .ms { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 550; color: var(--text-2); padding: 0.4rem 0.5rem; border-radius: 7px; }
.mock-side .ms.on { background: var(--brand-50); color: var(--brand); }
.mock-side .ms em { margin-left: auto; font-style: normal; font-size: 0.7rem; color: var(--faint); }
.mock-list { border-right: 1px solid var(--border); }
.mock-row { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); font-size: 0.78rem; }
.mock-row.on { background: #f7f9ff; box-shadow: inset 3px 0 0 var(--brand); }
.mock-row b { display: block; font-size: 0.8rem; }
.mock-row span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row span.chip { display: inline-flex; margin-top: 0.4rem; font-size: 0.66rem; padding: 0.22rem 0.45rem; }
.mock-reply { padding: 0.9rem 1rem; font-size: 0.78rem; }
.mock-reply .label { display: flex; align-items: center; gap: 0.4rem; color: var(--good); font-weight: 650; font-size: 0.75rem; margin-bottom: 0.6rem; }
.mock-reply p { color: var(--text-2); margin-bottom: 0.55rem; line-height: 1.55; }
.mock-reply .mock-btns { display: flex; gap: 0.4rem; margin-top: 0.75rem; }
.mock-reply .mock-btns span { font-size: 0.72rem; font-weight: 600; padding: 0.35rem 0.6rem; border-radius: 7px; border: 1px solid var(--border-strong); }
.mock-reply .mock-btns span.p { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 760px) { .mock-body { grid-template-columns: 1fr; } .mock-side, .mock-reply { display: none; } }

.proof { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; justify-content: center; padding: 2.25rem 1rem 0.5rem; color: var(--muted); font-weight: 550; font-size: 0.92rem; }
.proof span { display: inline-flex; align-items: center; gap: 0.5rem; }
.proof .i { color: var(--brand); }

.m-section { padding: 6rem 0 0; }
section[id] { scroll-margin-top: 84px; }
.m-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.m-kicker { display: inline-block; font-size: 0.8rem; font-weight: 650; color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.m-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.035em; line-height: 1.1; font-weight: 750; margin-bottom: 0.9rem; }
.m-head p { color: var(--muted); font-size: 1.08rem; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.feature { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow-xs); transition: box-shadow 0.2s, transform 0.2s; }
.feature:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.f-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 1rem; }
.feature h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 1.75rem 1.6rem; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 1rem; }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); margin: 0; }

.dark-panel { border-radius: var(--radius-xl); background: #0a0f1f; color: #fff; padding: 4rem 3rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.dark-panel h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.5rem); letter-spacing: -0.035em; line-height: 1.12; }
.dark-panel p { color: rgba(255, 255, 255, 0.7); font-size: 1.02rem; }
.dark-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.dark-list li { display: flex; gap: 0.85rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.dark-list .i { color: #8fb0ff; margin-top: 2px; }
.dark-list b { display: block; margin-bottom: 0.15rem; }
.dark-list span { color: rgba(255, 255, 255, 0.65); font-size: 0.92rem; }
@media (max-width: 900px) { .dark-panel { grid-template-columns: 1fr; padding: 2.5rem 1.5rem; } }

.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 1.15rem 0.25rem; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0.75rem 0 0; }

.cta-panel { border-radius: var(--radius-xl); background: var(--gradient); color: #fff; padding: 4rem 3rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; }
.cta-panel h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -0.035em; line-height: 1.1; }
.cta-panel p { color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; }
.cta-form { background: #fff; color: var(--text); border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow-lg); }
.cta-form .grid { gap: 0 0.85rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .cta-panel { grid-template-columns: 1fr; padding: 2.5rem 1.5rem; } .cta-form .grid { grid-template-columns: 1fr; } }

.m-footer { margin-top: 6rem; border-top: 1px solid var(--border); background: #fff; }
.m-footer .m-wrap { display: flex; align-items: center; gap: 1.5rem; padding-top: 2rem; padding-bottom: 2rem; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.m-footer a { color: var(--muted); }
.m-footer .spacer { flex: 1; }
.m-page { padding: 3rem 0 0; }
