/* =====================================================================
   Vigil design system: steel blue + white, light only.
   ===================================================================== */
:root {
  /* brand */
  --steel-950: #0f2236; --steel-900: #142a40; --steel-800: #1d3a57; --steel-700: #24507a;
  --steel-600: #2f6491; --steel-500: #4a7fae; --steel-300: #a9c3dc; --steel-200: #cddcea;
  --steel-100: #e6eef6; --steel-50: #f3f7fb;

  /* surfaces + text */
  --bg: #f3f6f9; --surface: #ffffff; --subtle: var(--steel-50); --hover: #f5f8fb;
  --border: #e1e8ef; --border-strong: #c9d6e2; --divider: #edf1f5;
  --text: #13263a; --text-2: #2c3e52; --muted: #5d6f82; --faint: #8e9cab;
  --accent: var(--steel-600); --accent-hover: var(--steel-700); --accent-soft: var(--steel-100);
  --accent-text: var(--steel-700); --on-accent: #ffffff;

  /* status */
  --up: #2e8a5f; --up-soft: #eaf5ef; --up-text: #1f6b47; --up-line: #c3e3d2;
  --late: #c27c17; --late-soft: #fcf4e5; --late-text: #8d5b0e; --late-line: #f0d9ae;
  --down: #c8382e; --down-soft: #fcefee; --down-text: #a12b22; --down-line: #f1c7c3;
  --idle: #9aa8b6; --idle-soft: #eef2f6; --idle-text: #4f6276;
  --empty-bar: #e6ecf2;

  /* depth */
  --shadow-xs: 0 1px 1px rgba(16, 36, 56, .04);
  --shadow-sm: 0 1px 2px rgba(16, 36, 56, .05), 0 1px 1px rgba(16, 36, 56, .03);
  --shadow-md: 0 2px 4px rgba(16, 36, 56, .04), 0 6px 16px rgba(16, 36, 56, .06);
  --shadow-lg: 0 8px 16px rgba(16, 36, 56, .08), 0 24px 56px rgba(16, 36, 56, .18);
  --ring: 0 0 0 3px rgba(47, 100, 145, .22);

  --radius: 6px; --radius-lg: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent-text); font-weight: 500; }
a.link:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; color: var(--text); }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.022em; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
svg.icon { flex: none; display: block; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--steel-200); }

/* ===== Layout ===== */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }
main.container { flex: 1; padding-top: 28px; padding-bottom: 64px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 12px; }
.section-head .sub { font-size: 12.5px; color: var(--faint); }

/* ===== Top bar ===== */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--steel-800); color: #fff;
  box-shadow: 0 1px 0 var(--steel-950), 0 4px 12px rgba(16, 36, 56, .12); }
.topbar .container { display: flex; align-items: center; height: 56px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: #fff; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: #fff; color: var(--steel-800); display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.nav { display: flex; gap: 4px; align-self: stretch; }
.nav a { position: relative; display: flex; align-items: center; gap: 7px; padding: 0 12px; color: rgba(255, 255, 255, .66);
  font-weight: 500; font-size: 13.5px; transition: color .15s; }
.nav a svg { opacity: .8; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; }
.nav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #fff; }
.topbar .spacer { flex: 1; }
.topbar .btn.primary { background: #fff; border-color: #fff; color: var(--steel-800); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.topbar .btn.primary:hover { background: var(--steel-100); border-color: var(--steel-100); }
.topbar .btn kbd { border-color: var(--steel-200); color: var(--steel-600); }
.topbar :focus-visible { box-shadow: 0 0 0 3px rgba(169, 195, 220, .6); }

/* ===== Page title band ===== */
.pagebar { background: var(--surface); border-bottom: 1px solid var(--border); }
.pagebar-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 0 22px; flex-wrap: wrap; }
.pagebar p { margin-top: 5px; color: var(--muted); font-size: 13.5px; }
.pagebar-actions { display: flex; align-items: center; gap: 8px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); margin-bottom: 8px; font-weight: 500; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { color: var(--faint); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.title-row h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Footer ===== */
.footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 28px;
  border-top: 1px solid var(--border); font-size: 12.5px; color: var(--faint); }
.footer strong { color: var(--muted); font-weight: 600; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px;
  border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .06s; }
.btn:hover { background: var(--hover); border-color: var(--steel-300); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--steel-700); color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(16, 36, 56, .2), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--steel-800); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--steel-50); color: var(--text); }
.btn.danger { color: var(--down-text); }
.btn.danger:hover { background: var(--down-soft); border-color: var(--down-line); }
.btn.danger-solid { background: var(--down); border-color: #a52d24; color: #fff; }
.btn.danger-solid:hover { background: #b33026; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.sm.icon-only { width: 28px; }
kbd { font: 500 10.5px/1 var(--font); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--faint); }
.btn kbd { margin-left: 2px; }

/* ===== Forms ===== */
label.field { display: block; font-weight: 500; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.input, .select { height: 36px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: 14px var(--font); box-shadow: var(--shadow-xs);
  transition: border-color .12s, box-shadow .12s; }
.input:hover, .select:hover { border-color: var(--steel-300); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input::placeholder { color: var(--faint); }
.input.full { width: 100%; }
.input.num { width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.select { padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6f82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.form-group + .form-group { margin-top: 22px; }
.form-section { padding: 24px; }
.form-section + .form-section { border-top: 1px solid var(--divider); }
.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px;
  background: var(--subtle); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.search { position: relative; display: block; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 32px; padding-right: 30px; width: 230px; height: 34px; }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); font: 500 13px var(--font); cursor: pointer; transition: all .12s; }
.chip:hover { color: var(--text); border-color: var(--steel-300); }
.chip.active { background: var(--steel-800); border-color: var(--steel-800); color: #fff; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: #e9eef3; border-radius: 8px; }
.segmented button { height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: 500 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: color .12s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(16, 36, 56, .06); font-variant-numeric: tabular-nums; }
.segmented button.active .count { background: var(--steel-100); color: var(--steel-700); }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card.pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 14px; }

/* ===== KPI tiles ===== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 16px 18px 16px; min-width: 0; }
.kpi-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kpi-label svg { color: var(--faint); }
.kpi-value { margin-top: 8px; font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi-value .of { font-size: 15px; font-weight: 500; color: var(--faint); letter-spacing: 0; margin-left: 2px; }
.kpi-value.up { color: var(--up-text); } .kpi-value.late { color: var(--late-text); } .kpi-value.down { color: var(--down-text); }
.kpi-value .small { font-weight: 500; letter-spacing: 0; color: var(--muted); }
.kpi-foot { margin-top: 8px; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-foot.warn { color: var(--down-text); }
.meter { height: 5px; margin-top: 12px; border-radius: 3px; background: var(--empty-bar); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--up); transition: width .4s ease; }
.meter.late span { background: var(--late); } .meter.down span { background: var(--down); }

/* ===== Status ===== */
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--idle); flex: none; }
.dot.up { background: var(--up); }
.dot.late { background: var(--late); }
.dot.down { background: var(--down); }
.dot.new { background: transparent; box-shadow: inset 0 0 0 1.5px var(--idle); }
.dot.late::after, .dot.down::after { content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid currentColor; animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.dot.late::after { color: var(--late); }
.dot.down::after { color: var(--down); }
@keyframes ping { 0% { transform: scale(.5); opacity: .9; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em; background: var(--idle-soft); color: var(--idle-text);
  box-shadow: inset 0 0 0 1px rgba(16, 36, 56, .06); white-space: nowrap; }
.badge.up, .badge.success { background: var(--up-soft); color: var(--up-text); box-shadow: inset 0 0 0 1px var(--up-line); }
.badge.late { background: var(--late-soft); color: var(--late-text); box-shadow: inset 0 0 0 1px var(--late-line); }
.badge.down, .badge.fail { background: var(--down-soft); color: var(--down-text); box-shadow: inset 0 0 0 1px var(--down-line); }
.badge .dot { width: 6px; height: 6px; }
.badge .dot::after { inset: -2px; border-width: 1.5px; }
.status-cell .sub { margin-top: 4px; font-size: 12px; color: var(--faint); white-space: nowrap; }
.status-down .status-cell .sub { color: var(--down-text); }
.status-late .status-cell .sub { color: var(--late-text); }

/* ===== Banners ===== */
.banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 16px; font-size: 13.5px; }
.banner .banner-icon { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.banner strong { font-weight: 600; }
.banner.down { border-color: var(--down-line); background: linear-gradient(90deg, var(--down-soft), var(--surface) 70%); }
.banner.down .banner-icon { background: var(--down); color: #fff; }
.banner.late { border-color: var(--late-line); background: linear-gradient(90deg, var(--late-soft), var(--surface) 70%); }
.banner.late .banner-icon { background: var(--late); color: #fff; }
.banner.info .banner-icon { background: var(--steel-100); color: var(--steel-700); }
.banner .names a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--down-line); }
.banner .names a:hover { text-decoration-color: currentColor; }

/* ===== Check list ===== */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.list-toolbar h2 { display: flex; align-items: center; gap: 8px; }
.checks { overflow: hidden; }
.check-cols { display: grid; grid-template-columns: minmax(0, 1fr) 200px 120px 150px 16px; gap: 24px; align-items: center; }
.checks .list-head { padding: 9px 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--faint); background: var(--subtle); border-bottom: 1px solid var(--border); }
.check-row { position: relative; padding: 15px 20px; border-bottom: 1px solid var(--divider); transition: background .12s; }
.check-row:last-child { border-bottom: 0; }
.check-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.check-row.status-down::before { background: var(--down); }
.check-row.status-late::before { background: var(--late); }
.check-row:hover { background: var(--hover); }
.check-row:hover .chev { color: var(--accent); transform: translateX(2px); }
.check-row .name { font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row .meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; }
.check-row .meta svg { color: var(--faint); }
.check-row .chev { color: var(--border-strong); transition: transform .15s, color .15s; }
.check-row .last { font-size: 13px; color: var(--muted); }
.no-match { padding: 40px 20px; text-align: center; color: var(--muted); display: none; }

.bars { display: flex; align-items: center; gap: 2px; height: 24px; }
.bars span { flex: 1; min-width: 2px; height: 100%; border-radius: 2px; background: var(--empty-bar); transition: transform .1s; }
.bars span.slot { height: 4px; background: var(--empty-bar); border-radius: 2px; }
.bars span.success { background: var(--up); }
.bars span.fail { background: var(--down); }
.bars span.success:hover, .bars span.fail:hover { transform: scaleY(1.15); }
.bars.lg { height: 40px; gap: 4px; }
.bars.lg span { border-radius: 3px; }
.bars.lg span.slot { height: 6px; }

/* ===== Activity feed ===== */
.feed-item { display: flex; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--divider); align-items: center; }
.feed-item:last-child { border-bottom: 0; }
.feed-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.feed-icon.down, .feed-icon.fail { background: var(--down-soft); color: var(--down-text); }
.feed-icon.up { background: var(--up-soft); color: var(--up-text); }
.feed-icon.late { background: var(--late-soft); color: var(--late-text); }
.feed-item .text { font-size: 13.5px; }
.feed-item .text a { font-weight: 600; color: var(--text); }
.feed-item .text a:hover { color: var(--accent-text); }
.feed-item .meta { font-size: 12px; color: var(--faint); margin-top: 1px; }
.feed-item .when { font-size: 12.5px; color: var(--faint); white-space: nowrap; }

/* ===== Tables ===== */
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint);
  padding: 9px 20px; background: var(--subtle); border-bottom: 1px solid var(--border); }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
pre.output { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--subtle); border: 1px solid var(--border);
  font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: auto; color: var(--text-2); }

/* ===== Setup disclosure ===== */
details.disclosure > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; user-select: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .chev-down { margin-left: auto; color: var(--faint); transition: transform .2s; }
details.disclosure[open] > summary .chev-down { transform: rotate(180deg); }
details.disclosure[open] > summary { border-bottom: 1px solid var(--border); }
details.disclosure > summary:hover h2 { color: var(--accent-text); }
.summary-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--steel-100); color: var(--steel-700); flex: none; }

/* ===== Code / setup ===== */
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { position: relative; height: 42px; padding: 0 12px; border: 0; background: none; color: var(--muted);
  font: 500 13px var(--font); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent-text); }
.tabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.code { position: relative; margin: 16px 20px; border-radius: 8px; background: var(--steel-950); border: 1px solid var(--steel-900); }
.code pre { margin: 0; padding: 16px 56px 16px 18px; font: 12.5px/1.7 var(--mono); overflow-x: auto; white-space: pre; color: #dbe7f3; }
.code .c { color: #7f97ae; }
.code .btn { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14);
  color: #dbe7f3; box-shadow: none; }
.code .btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.endpoints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); background: var(--subtle); }
.endpoints > div { padding: 14px 20px; border-right: 1px solid var(--border); min-width: 0; }
.endpoints > div:last-child { border-right: 0; }
.endpoints .mono { display: block; margin-top: 4px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Waiting state ===== */
.waiting { display: flex; align-items: center; gap: 20px; padding: 24px; border-color: var(--steel-200);
  background: linear-gradient(90deg, var(--steel-50), var(--surface) 70%); }
.radar { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0; animation: radar 2.4s ease-out infinite; }
.radar::after { animation-delay: 1.2s; }
.radar .core { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--steel-100); }
@keyframes radar { 0% { transform: scale(.35); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 56px 24px 48px; }
.empty .empty-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 18px; display: grid; place-items: center;
  background: var(--steel-800); color: #fff; box-shadow: 0 6px 16px rgba(29, 58, 87, .25); }
.empty h2 { font-size: 19px; letter-spacing: -0.02em; }
.empty p { max-width: 440px; margin: 8px auto 0; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px auto 28px; max-width: 660px; text-align: left; }
.steps > div { padding: 16px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--border); }
.steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  background: var(--steel-800); color: #fff; margin-bottom: 10px; }
.steps p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); max-width: none; }

/* ===== New check ===== */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.summary { margin-top: 22px; padding: 14px 16px; border-radius: 8px; background: var(--steel-50); border: 1px solid var(--steel-200);
  color: var(--text-2); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.summary svg { color: var(--accent); margin-top: 2px; }
.summary strong { font-weight: 600; color: var(--steel-800); }
.timeline ol { margin: 0; padding: 0; }
.timeline li { list-style: none; position: relative; padding: 0 0 20px 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--divider); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.timeline strong { font-size: 13.5px; }
.timeline p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.aside-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--divider); font-size: 12.5px; color: var(--muted); }

/* ===== Channels ===== */
.channel { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--divider); }
.channel:last-child { border-bottom: 0; }
.channel-logo { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--border); background: var(--subtle); color: var(--steel-700); }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border-strong);
  border-radius: 8px; cursor: pointer; background: var(--surface); transition: border-color .12s, box-shadow .12s, background .12s; }
.choice:hover { border-color: var(--steel-300); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--steel-50); box-shadow: 0 0 0 1px var(--accent); }
.choice:has(input:checked) .channel-logo { background: var(--steel-800); border-color: var(--steel-800); color: #fff; }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.choice .t { font-weight: 600; font-size: 13.5px; }
.choice .d { font-size: 12px; color: var(--muted); }
.help { display: none; margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--border); font-size: 13px; }
.help.show { display: block; }
.help ol { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.help li + li { margin-top: 4px; }
.connected { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--up-text); }

/* ===== Dialog ===== */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(16, 36, 56, .08); }
dialog::backdrop { background: rgba(15, 34, 54, .5); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .18s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-body { padding: 24px 24px 8px; }
.dialog-body p { margin-top: 8px; color: var(--muted); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; margin-top: 16px; background: var(--subtle);
  border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.dialog-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--down-soft); color: var(--down); margin-bottom: 14px; }

/* ===== Toasts ===== */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 12px 16px;
  border-radius: 8px; background: var(--steel-900); color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500;
  animation: toast-in .24s cubic-bezier(.2, .9, .3, 1.2); }
.toast.error { background: var(--down); }
.toast .ticon { flex: none; }
.toast.success .ticon { color: #8fd6b0; }
.toast.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ===== Misc ===== */
.fade-in { animation: fade .3s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(2px); } }

/* ===== User menu ===== */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px;
  border-radius: 999px; cursor: pointer; color: rgba(255, 255, 255, .8); transition: background .15s; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: rgba(255, 255, 255, .1); color: #fff; }
.user-name { font-weight: 500; font-size: 13.5px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--steel-300); color: var(--steel-900); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.avatar.lg { width: 38px; height: 38px; font-size: 13.5px; background: var(--steel-800); color: #fff; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
  animation: pop .14s ease-out; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; }
.menu-name { font-weight: 600; font-size: 14px; }
.menu-email { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-section { padding: 4px 10px 10px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; }
.menu-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.menu-ws { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.menu-ws svg { color: var(--faint); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px;
  background: none; font: 500 13.5px var(--font); color: var(--text-2); cursor: pointer; text-align: left; }
.menu-item svg { color: var(--faint); }
.menu-item:hover { background: var(--hover); color: var(--text); }
.menu form { margin: 0; }

.menu-ws.current svg { color: var(--accent); }
.menu-ws + .menu-ws, .menu-section form + form, .menu-ws + form, form + .menu-ws { margin-top: 4px; }
button.menu-ws.switch { width: 100%; border: 0; background: none; padding: 6px 0; font: 500 13.5px var(--font); color: var(--muted);
  cursor: pointer; border-radius: 6px; text-align: left; }
button.menu-ws.switch:hover { color: var(--text); }
.ws-spacer { width: 14px; flex: none; }

/* ===== Reliability ===== */
.reliability { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin-top: 16px; }
.reliability .card { display: flex; flex-direction: column; }
.rel-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 20px 4px; }
.rel-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rel-stats .label { font-size: 12px; color: var(--muted); }
.rel-stats .value { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.rel-stats .value.up { color: var(--up-text); } .rel-stats .value.late { color: var(--late-text); } .rel-stats .value.down { color: var(--down-text); }
.days { display: flex; gap: 3px; height: 34px; padding: 14px 20px 0; box-sizing: content-box; }
.day { flex: 1; border-radius: 3px; background: var(--empty-bar); transition: transform .1s; }
.day.ok { background: var(--up); }
.day.warn { background: var(--late); }
.day.bad { background: var(--down); }
.day:hover { transform: scaleY(1.12); }
.days-legend { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px 16px; font-size: 12px; color: var(--faint); }
.days-legend .keys { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.days-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-left: 8px; }
.days-legend i.ok { background: var(--up); } .days-legend i.warn { background: var(--late); }
.days-legend i.bad { background: var(--down); } .days-legend i.none { background: var(--empty-bar); }
.spark { width: 100%; height: 72px; display: block; margin-top: auto; padding: 8px 20px 18px; box-sizing: border-box; overflow: visible; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--steel-100); opacity: .7; }
.rel-empty { padding: 16px 20px 20px; margin-top: auto; }
@media (max-width: 960px) { .reliability { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .rel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .days { gap: 2px; padding: 12px 16px 0; }
  .days-legend .keys { display: none; }
}

/* ===== Cron schedule fields ===== */
.segmented.sm { padding: 2px; }
.segmented.sm button { height: 26px; padding: 0 12px; font-size: 12.5px; }
.cron-grid { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; align-items: start; }
.cron-preview { margin-top: 10px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; min-height: 20px; }
.cron-preview strong { font-weight: 600; color: var(--steel-800); }
.cron-next { color: var(--muted); font-variant-numeric: tabular-nums; }
.cron-error { color: var(--down-text); }
@media (max-width: 640px) { .cron-grid { grid-template-columns: 1fr; } }

/* ===== Settings ===== */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.settings-nav a:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.settings-nav a svg { color: var(--faint); }
.settings-nav .count { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.settings-body { display: grid; gap: 20px; }
.settings-body > section { scroll-margin-top: 80px; }
.settings-head { padding: 20px 24px 0; }
.settings-head p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.settings-nav a.danger:hover { color: var(--down-text); }
.danger-zone { border-color: var(--down-line); }
.danger-zone .settings-head h2 { color: var(--down-text); }
.delete-effects { margin: 0 0 18px; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.7; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-foot.between { justify-content: space-between; }
.invite-box { margin: 18px 24px 4px; padding: 16px 18px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--border); }
.member-list { padding: 8px 0; }
.member { display: flex; align-items: center; gap: 14px; padding: 12px 24px; }
.member + .member { border-top: 1px solid var(--divider); }
.member .avatar.lg { background: var(--steel-100); color: var(--steel-700); }
.invite-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--steel-800); color: #fff; box-shadow: 0 6px 16px rgba(29, 58, 87, .25); }
.invite-icon.muted { background: var(--idle-soft); color: var(--idle-text); box-shadow: none; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .settings-nav .count { margin-left: 6px; }
  .grid-2 { grid-template-columns: 1fr; }
  .member { padding: 12px 18px; }
  .invite-box { margin: 16px 18px 4px; }
}

/* ===== Auth pages ===== */
.auth-body { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(380px, 5fr) 7fr; min-height: 100vh; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 36px 44px; color: #fff; background: var(--steel-900);
  background-image: radial-gradient(ellipse at 10% 0%, rgba(74, 127, 174, .45), transparent 55%),
                    radial-gradient(ellipse at 100% 100%, rgba(47, 100, 145, .35), transparent 50%); }
.auth-brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-pitch h2 { color: #fff; font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
.auth-pitch p { margin-top: 16px; max-width: 400px; color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.6; }
.auth-pitch ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-pitch li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.auth-pitch li svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(169, 195, 220, .18); color: var(--steel-200); }
.auth-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 26px; }
.auth-sub { margin: 6px 0 28px; color: var(--muted); }
.auth-card .form-group + .form-group { margin-top: 18px; }
.auth-card .input { height: 40px; }
.auth-submit { width: 100%; height: 40px; margin-top: 26px; font-size: 14px; }
.auth-switch { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 22px 20px; }
  .auth-pitch, .auth-status { display: none; }
  .auth-main { place-items: start center; padding: 36px 20px; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .check-cols { grid-template-columns: minmax(0, 1fr) 140px 16px; }
  .check-cols .col-last, .check-cols .col-bars { display: none; }
  .split { grid-template-columns: 1fr; }
  .endpoints { grid-template-columns: 1fr; }
  .endpoints > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .endpoints > div:last-child { border-bottom: 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  main.container { padding-top: 20px; }
  .topbar .container { gap: 14px; }
  .nav a { padding: 0 8px; }
  .nav a svg { display: none; }
  .hide-sm { display: none !important; }
  .pagebar-inner { padding: 18px 0; align-items: flex-start; flex-direction: column; gap: 14px; }
  h1 { font-size: 21px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 22px; }
  .steps, .choice-grid { grid-template-columns: 1fr; }
  .list-toolbar { flex-direction: column; align-items: stretch; }
  .list-toolbar .row { flex-direction: column; align-items: stretch; }
  .search .input { width: 100%; }
  .search kbd { display: none; }
  .segmented { display: flex; }
  .segmented button { flex: 1; justify-content: center; padding: 0 6px; }
  .banner { flex-wrap: wrap; align-items: flex-start; }
  .banner .grow { flex-basis: calc(100% - 44px); }
  .banner > .btn { margin-left: 44px; }
  .checks .list-head { display: none; }
  .check-cols { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px; }
  .status-cell { text-align: right; }
  .footer { flex-direction: column; gap: 4px; }
  .toasts { left: 16px; right: 16px; }
  .toast { min-width: 0; max-width: none; }
  .form-section { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Public pages (landing, pricing)
   ===================================================================== */
.mkt { background: var(--surface); }
.mkt-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.mkt-header .container { display: flex; align-items: center; gap: 28px; height: 64px; }
.mkt-header .logo, .mkt-footer .logo { color: var(--text); }
.logo-mark.dark { background: var(--steel-800); color: #fff; }
.mkt-nav { display: flex; gap: 4px; }
.mkt-nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.mkt-nav a:hover { color: var(--text); background: var(--hover); }
.mkt-header .spacer { flex: 1; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 8px; }
.btn.glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
.btn.glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn.light { background: #fff; border-color: #fff; color: var(--steel-800); }
.btn.light:hover { background: var(--steel-100); color: var(--steel-900); }
.full-w { width: 100%; }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--steel-900);
  background-image: radial-gradient(ellipse at 15% 0%, rgba(74, 127, 174, .5), transparent 55%),
                    radial-gradient(ellipse at 95% 90%, rgba(47, 100, 145, .45), transparent 50%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, #000 20%, transparent 95%); -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; padding: 88px 32px 96px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); }
.hero h1 { margin-top: 22px; color: #fff; font-size: 52px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; }
.hero h1 span { color: var(--steel-300); }
.hero-sub { margin-top: 20px; max-width: 520px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .74); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero .btn.primary { background: #fff; border-color: #fff; color: var(--steel-800); }
.hero .btn.primary:hover { background: var(--steel-100); }
.hero-note { display: flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 13px; color: rgba(255, 255, 255, .6); flex-wrap: wrap; }
.hero-note svg { color: #8fd6b0; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin-right: 14px; }

.hero-preview { position: relative; }
.preview-window { background: var(--surface); color: var(--text); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); transform: perspective(1600px) rotateY(-4deg) rotateX(2deg); }
.preview-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--steel-800); }
.preview-bar > span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.preview-url { margin-left: 10px; font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.preview-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 14px 6px; background: var(--bg); }
.preview-kpis > div { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.preview-kpis small { display: block; font-size: 10.5px; color: var(--muted); }
.preview-kpis strong { font-size: 18px; letter-spacing: -0.02em; }
.down-text { color: var(--down-text); }
.preview-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--divider); font-size: 12.5px; }
.preview-row.status-down::before, .preview-row.status-late::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.preview-row.status-down::before { background: var(--down); }
.preview-row.status-late::before { background: var(--late); }
.pr-name { font-weight: 600; }
.pr-sched { font-size: 11px; color: var(--muted); }
.pr-bars { width: 120px; height: 18px; flex: none; }
.pr-status { width: 92px; flex: none; text-align: left; }
.pr-status small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--faint); }
.preview-toast { position: absolute; left: -28px; bottom: -26px; display: flex; gap: 10px; align-items: center; padding: 11px 14px;
  background: var(--surface); color: var(--text); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 12.5px; max-width: 300px;
  animation: float 6s ease-in-out infinite; }
.preview-toast strong { display: block; font-weight: 600; }
.preview-toast small { color: var(--muted); }
.pt-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #5b5fc7; color: #fff; flex: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* sections */
.section { padding: 96px 0; }
.section.alt { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.container.narrow { max-width: 760px; }
.section-intro { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-intro h2, .section-intro h1, .integrations h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
.section-intro p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 16.5px; line-height: 1.6; }

.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.how-step { padding: 26px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.how-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--steel-800); color: #fff; font-weight: 600; font-size: 13px; }
.how-step h3 { margin-top: 16px; font-size: 16px; }
.how-step p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.how-code { max-width: 760px; margin: 28px auto 0; }
.how-code .code { margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 26px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--steel-100); color: var(--steel-700); }
.feature h3 { margin-top: 16px; font-size: 15.5px; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.integrations { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.integrations .lead { margin-top: 16px; font-size: 16.5px; line-height: 1.6; color: var(--text-2); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.ticks svg { margin-top: 3px; color: var(--up); flex: none; }
.waitlist { padding: 28px; box-shadow: var(--shadow-md); }
.waitlist h3 { font-size: 18px; }
.wl-interests { border: 0; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px 22px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.plan-flag { position: absolute; top: -12px; left: 22px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--steel-800); color: #fff; }
.plan h3 { font-size: 16px; }
.plan-blurb { margin-top: 6px; min-height: 42px; font-size: 13.5px; color: var(--muted); }
.plan-price { margin-top: 18px; font-size: 38px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.plan-price .currency { font-size: 20px; vertical-align: top; margin-right: 1px; }
.plan-price .per { font-size: 13.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; font-size: 13.5px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); }
.plan li svg { margin-top: 3px; color: var(--accent); flex: none; }
.plan-cta { margin-top: auto; width: 100%; }
.plans-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 26px; font-size: 13.5px; color: var(--muted); text-align: center; }
.pricing-page { padding-top: 72px; }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-xs); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px;
  font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { color: var(--faint); transition: transform .2s; }
.faq details[open] .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq details p { padding: 0 20px 18px; color: var(--muted); line-height: 1.65; }

/* closing band + footer */
.cta-band { padding: 80px 0; text-align: center; color: #fff; background: var(--steel-800);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(74, 127, 174, .45), transparent 60%); }
.cta-band h2 { color: #fff; font-size: 34px; letter-spacing: -0.03em; }
.cta-band p { margin: 12px 0 28px; color: rgba(255, 255, 255, .72); font-size: 16.5px; }
.mkt-footer { border-top: 1px solid var(--border); background: var(--surface); }
.mkt-footer .container { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 36px; padding-bottom: 40px; flex-wrap: wrap; }
.mkt-footer p { margin-top: 10px; color: var(--muted); font-size: 13.5px; }
.mkt-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.mkt-footer nav a { color: var(--muted); font-size: 13.5px; }
.mkt-footer nav a:hover { color: var(--text); }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 56px; padding: 64px 32px 80px; }
  .preview-window { transform: none; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 860px) {
  .how, .features { grid-template-columns: 1fr; }
  .integrations { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .mkt-header .container { gap: 8px; }
  .mkt-header .btn.ghost { padding: 0 8px; }
  .hero-inner { padding: 48px 16px 64px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 15.5px; }
  .section { padding: 64px 0; }
  .section-intro { margin-bottom: 36px; }
  .section-intro h2, .section-intro h1, .integrations h2 { font-size: 28px; }
  .plans { grid-template-columns: 1fr; }
  .pr-bars { display: none; }
  .preview-toast { left: 8px; right: 8px; bottom: -30px; max-width: none; }
  .preview-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-band h2 { font-size: 26px; }
}

/* Phones: keep the app header within the screen (Settings stays reachable from the account menu). */
@media (max-width: 480px) {
  .topbar .logo-text, .nav a.nav-settings { display: none; }
  .topbar .container { gap: 10px; }
  .nav a { padding: 0 6px; }
}

/* ===== Legal pages (privacy, terms) ===== */
.legal-hero { padding: 64px 0 40px; background: var(--bg); border-bottom: 1px solid var(--border); }
.legal-hero h1 { font-size: 38px; letter-spacing: -0.03em; }
.legal-hero p:not(.eyebrow) { margin-top: 10px; color: var(--muted); font-size: 16px; }
.legal-wrap { padding: 48px 0 88px; }
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 56px; align-items: start; }
.legal-toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.legal-toc-title { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.legal-toc a { padding: 5px 10px; border-radius: 6px; color: var(--muted); border-left: 2px solid transparent; }
.legal-toc a:hover { color: var(--text); background: var(--hover); }
.legal { font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.legal h2 { font-size: 21px; letter-spacing: -0.02em; margin: 44px 0 12px; scroll-margin-top: 88px; color: var(--text); }
.legal h2:first-of-type { margin-top: 0; }
.legal-draft + h2 { margin-top: 0; }
.legal h3 { font-size: 15.5px; margin: 22px 0 6px; color: var(--text); }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0; padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal-table { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.legal-table th { text-align: left; padding: 10px 16px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); background: var(--subtle); border-bottom: 1px solid var(--border); }
.legal-table td { padding: 12px 16px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table td:first-child { width: 58%; }
mark.placeholder { background: var(--late-soft); color: var(--late-text); padding: 1px 5px; border-radius: 4px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--late-line); }
.legal-draft { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 36px; border-radius: 10px;
  background: var(--late-soft); border: 1px solid var(--late-line); color: var(--late-text); font-size: 14px; line-height: 1.55; }
.legal-draft svg { margin-top: 2px; }
.legal-draft strong { color: var(--late-text); }
.auth-legal { margin-top: 14px; font-size: 12.5px; color: var(--faint); text-align: center; line-height: 1.5; }
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .legal-toc-title { width: 100%; }
  .legal-toc a { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; }
}
@media (max-width: 640px) {
  .legal-hero { padding: 40px 0 28px; }
  .legal-hero h1 { font-size: 30px; }
  .legal { font-size: 15px; }
  .legal-table td:first-child { width: auto; }
}
.footer a { color: var(--faint); }
.footer a:hover { color: var(--text); }
.auth-status a { color: rgba(255, 255, 255, .7); text-decoration: underline; text-underline-offset: 2px; }
.auth-status a:hover { color: #fff; }

/* ===== Setup guides + onboarding ===== */
.guide { padding: 18px 20px 0; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.guide-lead { color: var(--text-2); }
.guide ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.guide ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.guide .mono { background: var(--subtle); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 12.5px; word-break: break-all; }
.guide .hint { margin-top: 14px; }
.setup-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px;
  border-top: 1px solid var(--border); flex-wrap: wrap; }
.setup-foot .hint { flex: 1; min-width: 240px; }
.waiting form { flex: none; }

.checklist { margin-bottom: 20px; padding: 0; overflow: hidden; border-color: var(--steel-200); }
.checklist-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: linear-gradient(90deg, var(--steel-50), var(--surface) 75%); }
.checklist-head h2 { font-size: 15px; }
.checklist-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.checklist-progress { width: 140px; flex: none; }
.checklist-progress .meter { margin-top: 6px; }
.checklist-progress .meter span { background: var(--accent); }
.checklist-progress small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.checklist-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cl-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-right: 1px solid var(--divider); color: var(--text-2); }
.cl-step:last-child { border-right: 0; }
a.cl-step:hover { background: var(--hover); }
.cl-step .cl-tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--border-strong); color: transparent; margin-top: 1px; }
.cl-step.done .cl-tick { background: var(--up); border-color: var(--up); color: #fff; }
.cl-step strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.cl-step.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.cl-step small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.checklist[hidden] { display: none; }
@media (max-width: 960px) {
  .checklist-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-step:nth-child(2) { border-right: 0; }
  .cl-step:nth-child(-n+2) { border-bottom: 1px solid var(--divider); }
}
@media (max-width: 640px) {
  .checklist-head { flex-wrap: wrap; }
  .checklist-progress { width: 100%; }
  .checklist-steps { grid-template-columns: 1fr; }
  .cl-step { border-right: 0; border-bottom: 1px solid var(--divider); }
  .waiting { flex-wrap: wrap; }
}
/* Public header: links never wrap; below 960px the middle links hide (Log in / Start free stay). */
.mkt-nav a { white-space: nowrap; }
@media (max-width: 960px) { .mkt-nav { display: none; } }
