:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #0f1b2d;
  --ink-2: #44526a;
  --ink-3: #7a869a;
  --line: #e2e6ec;
  --brand: #0f3d5c;
  --brand-2: #1a6b8f;
  --accent: #14a38b;
  --accent-soft: #e3f6f2;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --bad: #c0392b;
  --bad-soft: #fbe9e7;
  --info: #2b6cb0;
  --info-soft: #e6f0fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); line-height: 1.5; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink-3); }

.demo-banner {
  background: var(--ink); color: #fff; font-size: 13px; text-align: center;
  padding: 8px 16px;
}
.demo-banner strong { color: #7ee2cf; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 15px;
}
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--accent-soft); color: var(--brand); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 16px 64px; }
.narrow { max-width: 760px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3 { grid-template-columns: 1fr; } .stat { padding: 14px; } .stat .num { font-size: 22px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 9px; padding: 10px 16px; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0b2f47; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0f8a75; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #efc6c0; }
.btn-danger:hover { background: var(--bad-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-grey { background: var(--surface-2); color: var(--ink-2); }
.p-blue { background: var(--info-soft); color: var(--info); }
.p-green { background: var(--accent-soft); color: #0b7a67; }
.p-amber { background: var(--warn-soft); color: var(--warn); }
.p-red { background: var(--bad-soft); color: var(--bad); }
.p-navy { background: #e4ebf2; color: var(--brand); }

.stat { padding: 18px; }
.stat .num { font-size: 28px; font-weight: 700; }
.stat .lbl { color: var(--ink-2); font-size: 13px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 12px; }
.tab {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px;
  cursor: pointer; color: var(--ink-2);
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--surface-2); }

label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=email], input[type=date], input[type=tel], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd6df; border-radius: 9px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin-bottom: 12px; }
.check input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.err { color: var(--bad); font-size: 13px; margin-top: 6px; }
.hint { color: var(--ink-3); font-size: 12px; margin-top: 4px; }

.upload {
  border: 2px dashed #cfd6df; border-radius: var(--radius); padding: 18px; background: var(--surface-2);
}
.upload.done { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.upload input[type=file] { width: 100%; font-size: 13px; }

/* Stepper */
.stepper { display: flex; gap: 6px; margin: 4px 0 22px; }
.stepper .s { flex: 1; }
.stepper .bar { height: 5px; border-radius: 5px; background: var(--line); }
.stepper .s.done .bar, .stepper .s.cur .bar { background: var(--accent); }
.stepper .t { font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.stepper .s.cur .t { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .stepper .t { display: none; } }

/* Liveness mock */
.cam {
  position: relative; aspect-ratio: 4 / 3; max-width: 420px; margin: 0 auto 16px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2c3e55, #0d1622);
}
.cam .oval {
  position: absolute; left: 50%; top: 48%; width: 46%; height: 70%; transform: translate(-50%, -50%);
  border: 3px dashed rgba(255, 255, 255, .55); border-radius: 50%;
}
.cam.ok .oval { border: 3px solid #7ee2cf; box-shadow: 0 0 0 9999px rgba(20, 163, 139, .12); }
.cam .head {
  position: absolute; left: 50%; top: 46%; width: 30%; transform: translate(-50%, -50%); opacity: .85; transition: transform .6s;
}
.cam .msg {
  position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 600; font-size: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; max-width: 420px; margin: 0 auto; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .4s; }

/* Detail page */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15, 27, 45, .45); display: grid; place-items: center; padding: 16px; z-index: 50;
}
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; padding: 24px; }
.email-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 14px 0; font-size: 14px; }
.email-preview .eh { background: var(--surface-2); padding: 10px 14px; font-size: 12px; color: var(--ink-2); }
.email-preview .eb { padding: 16px; }
.linkbox { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; word-break: break-all; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: var(--shadow);
}

/* Home + proposal */
.hero { padding: 36px 0 12px; }
.hero p { font-size: 17px; max-width: 680px; }
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: f; }
.flow > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: relative; }
.flow > div::before {
  counter-increment: f; content: counter(f); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 10px;
}
.flow h3 { font-size: 14px; margin-bottom: 4px; }
.flow p { font-size: 13px; color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }

.price { text-align: left; }
.price .amt { font-size: 32px; font-weight: 800; color: var(--brand); }
.price .per { color: var(--ink-3); font-size: 14px; font-weight: 500; }
.price ul { padding-left: 18px; margin: 12px 0 0; color: var(--ink-2); font-size: 14px; }
.price.featured { border: 2px solid var(--accent); }

.calc-out .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.calc-out .row.total { font-weight: 700; font-size: 16px; border-bottom: 0; }
.big-save { font-size: 30px; font-weight: 800; color: var(--accent); }
.section { margin-top: 40px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 8px; font-size: 14px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.client-brand { text-align: center; margin-bottom: 18px; }
.client-brand .firm { font-weight: 700; font-size: 18px; color: var(--brand); }
footer.foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 24px 16px 40px; }

@media print {
  .demo-banner, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Jedi Concepts branding */
.by { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-3); font-size: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
.by img { height: 22px; width: auto; display: block; }
.prepared { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; }
.prepared img { height: 30px; width: auto; display: block; }
footer.foot img { height: 24px; width: auto; display: block; margin: 0 auto 8px; opacity: .85; }
@media (max-width: 600px) { .by img { height: 18px; } }
