/* LiftLog design system — Inter UI + Space Grotesk display, signal-orange accent. */
:root {
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: #fff3ec;
  --ink: #17191d;
  --ink-2: #4b5563;
  --ink-3: #9ca3af;
  --line: #e5e7eb;
  --bg: #f7f8f9;
  --card: #ffffff;
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --crit: #b91c1c;
  --crit-bg: #fef2f2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --radius: 10px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 14.5px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); margin: 0 0 12px; letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }

/* layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: #14161a; color: #d1d5db; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 18px 18px 14px; display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 17px; border-bottom: 1px solid #26292f;
  font-family: var(--display); }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px;
  color: #d1d5db; font-size: 13.5px; margin-bottom: 2px; font-weight: 500;
}
.nav a:hover { background: #23262c; text-decoration: none; color: #fff; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav .section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: #6b7280; padding: 12px 10px 4px; }
.userbox { padding: 14px 18px; border-top: 1px solid #26292f; font-size: 12.5px; }
.userbox .role { display: inline-block; margin-top: 4px; font-size: 11px; padding: 2px 8px;
  border-radius: 99px; background: #26292f; color: #fbbf24; text-transform: capitalize; }
.main { flex: 1; min-width: 0; padding: 28px 32px 64px; max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }

/* cards + stats */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; border-top: 3px solid var(--line); box-shadow: var(--shadow); }
.stat .num { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat .lbl { font-size: 11.5px; color: var(--ink-2); text-transform: uppercase;
  letter-spacing: .07em; margin-top: 4px; font-weight: 600; }
.stat .sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stat.ok { border-top-color: var(--ok); }
.stat.warn { border-top-color: var(--warn); }
.stat.crit { border-top-color: var(--crit); }
.stat.accent { border-top-color: var(--accent); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.overdue { background: var(--crit-bg); color: var(--crit); }
.badge.due_soon { background: var(--warn-bg); color: var(--warn); }
.badge.compliant { background: var(--ok-bg); color: var(--ok); }
.badge.no_data { background: #f3f4f6; color: var(--ink-2); }
.badge.pass { background: var(--ok-bg); color: var(--ok); }
.badge.fail { background: var(--crit-bg); color: var(--crit); }
.badge.conditional { background: var(--warn-bg); color: var(--warn); }
.badge.role { background: #f3f4f6; color: var(--ink-2); text-transform: capitalize; }

/* tables */
table.tbl { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-2); background: #fafbfc; padding: 11px 14px; border-bottom: 1px solid var(--line);
  font-weight: 700; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafbfc; }
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font);
  font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .12s ease, transform .06s ease; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: #f9fafb; text-decoration: none; border-color: #d1d5db; }
.btn-danger { background: var(--crit-bg); color: var(--crit); border-color: #fecaca; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link-danger { color: var(--crit); font-size: 12.5px; background: none; border: none;
  cursor: pointer; font-family: var(--font); padding: 0; }
.link-danger:hover { text-decoration: underline; }

/* forms */
.form-card { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; max-width: 660px; box-shadow: var(--shadow); }
.field { margin-bottom: 17px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.field .hint { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
.field .err { font-size: 13px; color: var(--crit); margin-top: 5px; font-weight: 600; }
.field input.invalid, .field select.invalid { border-color: var(--crit); background: #fff7f7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkline { display: flex; gap: 9px; align-items: flex-start; font-weight: 600;
  font-size: 13.5px; cursor: pointer; }
.checkline input { width: auto; margin-top: 3px; accent-color: var(--accent); }

/* alerts feed */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card);
  margin-bottom: 12px; font-size: 13.5px; box-shadow: var(--shadow); }
.alert svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; }
.alert.critical { border-left: 4px solid var(--crit); }
.alert.warning { border-left: 4px solid var(--warn); }
.alert.info { border-left: 4px solid var(--info); }
.alert.critical svg { color: var(--crit); }
.alert.warning svg { color: var(--warn); }
.alert.info svg { color: var(--info); }

/* toasts */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 60;
  display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 48px)); }
.toast { background: #14161a; color: #fff; padding: 13px 17px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; box-shadow: 0 8px 28px rgba(0,0,0,.25);
  animation: toast-in .22s ease; border-left: 4px solid var(--ok); cursor: pointer; }
.toast-wrap.out .toast { opacity: 0; transform: translateY(8px); transition: all .4s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

/* onboarding checklist */
.check { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); margin-bottom: 10px; align-items: flex-start;
  box-shadow: var(--shadow); }
.check .box { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.check.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.check .box svg { width: 14px; height: 14px; }
.check.done .title { color: var(--ink-3); text-decoration: line-through; }
.progress { height: 8px; background: #eef0f2; border-radius: 99px; overflow: hidden; margin: 8px 0 8px; }
.progress > div { height: 100%; background: var(--accent); transition: width .3s ease; }
.step-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-dark); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 99px; margin-bottom: 6px; }

/* calendar */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); }
.cal-head { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2);
  padding: 8px; text-align: center; background: #fafbfc; border-bottom: 1px solid var(--line); font-weight: 700; }
.cal-day { min-height: 92px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 6px; font-size: 12px; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day .dnum { font-weight: 600; margin-bottom: 4px; }
.cal-day.today { background: var(--accent-soft); }
.cal-day.other { background: #fafbfc; color: var(--ink-3); }
.cal-ev { font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-ev.overdue { background: var(--crit-bg); color: var(--crit); font-weight: 600; }
.cal-ev.due_soon { background: var(--warn-bg); color: var(--warn); }
.cal-ev.compliant { background: #f3f4f6; color: var(--ink-2); }
.cal-ev.cert { background: var(--info-bg); color: var(--info); }

/* charts (hand-rolled SVG, zero JS) */
.chart-card h3 { margin-bottom: 2px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-legend { font-size: 13px; }
.donut-legend .row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar { width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: var(--accent); }
.bar.crit { background: var(--crit); }
.bar.warn { background: var(--warn); }
.bar-lbl { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.bar-val { font-size: 12px; font-weight: 700; }

/* reminder message block */
.msg { background: #14161a; color: #e5e7eb; border-radius: 8px; padding: 14px 16px;
  font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; font-family: var(--font); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px;
  box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--accent); position: relative; }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em; }
.plan .price { font-family: var(--display); font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 2px; }
.plan ul { list-style: none; padding: 0; margin: 16px 0; font-size: 13.5px; }
.plan li { padding: 6px 0 6px 28px; position: relative; }
.plan li svg { position: absolute; left: 0; top: 8px; width: 17px; height: 17px; color: var(--ok); }
.test-banner { background: #1f2937; color: #fbbf24; padding: 11px 16px; font-size: 13px;
  font-weight: 600; text-align: center; }

/* landing */
.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; border-bottom: 1px solid var(--line); background: #fff;
  position: sticky; top: 0; z-index: 20; }
.topbar .brand { color: var(--ink); border: none; padding: 0; }
.lp-hero { max-width: 900px; margin: 84px auto 40px; padding: 0 24px; text-align: center; }
.lp-hero .kicker { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-dark); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 99px; margin-bottom: 20px; }
.lp-hero h1 { font-size: 46px; letter-spacing: -0.035em; margin-bottom: 18px; }
.lp-hero h1 .hl { color: var(--accent); }
.lp-hero p.lede { font-size: 18.5px; color: var(--ink-2); max-width: 680px; margin: 0 auto 30px; line-height: 1.6; }
.lp-proof { background: #14161a; color: #e5e7eb; padding: 44px 24px; margin: 56px 0; }
.lp-proof .inner { max-width: 1020px; margin: 0 auto; }
.lp-proof h2 { color: #fff; text-align: center; margin-bottom: 8px; }
.lp-proof .sub { text-align: center; color: #9ca3af; margin-bottom: 30px; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proof-card { background: #1f2329; border: 1px solid #2b3038; border-radius: 12px; padding: 22px; }
.proof-card .num { font-family: var(--display); font-size: 30px; font-weight: 700; color: #fb923c; }
.proof-card p { color: #d1d5db; font-size: 13.5px; margin: 8px 0 0; }
.lp-section { max-width: 1020px; margin: 64px auto; padding: 0 24px; }
.lp-section h2 { font-size: 30px; text-align: center; margin-bottom: 10px; }
.lp-section .sub { text-align: center; color: var(--ink-2); margin-bottom: 34px; font-size: 16px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px;
  box-shadow: var(--shadow); }
.feat .fic { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feat .fic svg { width: 22px; height: 22px; color: var(--accent-dark); }
.feat h3 { margin-bottom: 6px; }
.feat p { color: var(--ink-2); font-size: 14px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px;
  position: relative; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); font-family: var(--display);
  font-size: 13px; font-weight: 700; color: #fff; background: var(--accent);
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; margin-bottom: 12px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: 14px; margin: 0; }
.faq { max-width: 720px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 600; cursor: pointer; font-size: 15px; }
.faq summary::marker { color: var(--accent); }
.faq p { color: var(--ink-2); margin: 10px 0 0; font-size: 14px; }
.lp-cta { text-align: center; max-width: 720px; margin: 80px auto; padding: 0 24px; }
.lp-cta h2 { font-size: 32px; margin-bottom: 12px; }
.lp-cta p { color: var(--ink-2); font-size: 16px; margin-bottom: 26px; }
.lp-footer { border-top: 1px solid var(--line); padding: 28px; color: var(--ink-3);
  font-size: 12.5px; text-align: center; background: #fff; }

/* misc */
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-2); font-weight: 600; }
.kv dd { margin: 0; }
.divider { border: none; border-top: 1px solid var(--line); margin: 22px 0; }
.section { margin-bottom: 28px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 15px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.tabs a:hover { text-decoration: none; }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { text-align: center; padding: 52px 24px; color: var(--ink-2); }
.empty svg { width: 44px; height: 44px; color: var(--ink-3); margin-bottom: 12px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 460px; margin: 0 auto 18px; }
.countdown { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.footer-note { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 12px; }

/* skeleton loading */
.skel { border-radius: 8px; background: linear-gradient(90deg, #eef0f2 25%, #f7f8f9 50%, #eef0f2 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* responsive */
.mobile-nav { display: none; }
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .plans, .feat-grid, .steps, .proof-grid { grid-template-columns: 1fr 1fr; }
  .lp-hero h1 { font-size: 36px; }
}
@media (max-width: 640px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; gap: 4px; background: #14161a; padding: 8px 10px;
    overflow-x: auto; position: sticky; top: 0; z-index: 10; }
  .mobile-nav a { color: #d1d5db; font-size: 12.5px; padding: 9px 13px; border-radius: 8px;
    white-space: nowrap; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
  .mobile-nav a.active { background: var(--accent); color: #fff; }
  .main { padding: 18px 14px 56px; }
  .grid-4, .grid-3, .grid-2, .plans, .form-row, .feat-grid, .steps, .proof-grid { grid-template-columns: 1fr; }
  .lp-hero { margin: 48px auto 32px; }
  .lp-hero h1 { font-size: 30px; }
  .lp-hero p.lede { font-size: 16px; }
  .cal-day { min-height: 64px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .btn { min-height: 44px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 8px; }
  .toast-wrap { bottom: 14px; right: 14px; left: 14px; max-width: none; }
  .donut-wrap { flex-direction: column; }
}
