/* Clickwalker app. One stylesheet, no build step. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); }

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #ffffff;
  --canvas: #f8f9fb;
  --subtle: #f5f6f8;
  --muted-bg: #eef0f3;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --ink: #0f1419;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --brand: #ea5a2f;
  --brand-ink: #c2410c;
  --brand-bg: #fff4ef;
  --good: #067647; --good-bg: #ecfdf3; --good-line: #abefc6; --good-dot: #17b26a;
  --ok: #b54708; --ok-bg: #fffaeb; --ok-line: #fedf89; --ok-dot: #f79009;
  --bad: #b42318; --bad-bg: #fef3f2; --bad-line: #fecdca; --bad-dot: #f04438;
  --info: #175cd3; --info-bg: #eff8ff; --info-line: #b2ddff; --info-dot: #2e90fa;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 32px -12px rgba(16, 24, 40, .16), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --focus: 0 0 0 3px rgba(234, 90, 47, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--canvas); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
::selection { background: #fde2d6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nowrap { white-space: nowrap; }
.mt-6 { margin-top: 6px; }
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-20 { margin-bottom: 20px; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 14px; height: 14px; }
.ic.lg { width: 20px; height: 20px; }

/* --- App shell ------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line); padding: 14px 12px; overflow-y: auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 16px; letter-spacing: -0.02em; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; }
.side-toggle { display: none; }
.side-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.side-nav { display: grid; gap: 1px; }
.nav-label { margin: 18px 8px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 13.5px; min-width: 0; }
.nav-item:hover { background: var(--subtle); color: var(--ink); }
.nav-item.on { background: var(--muted-bg); color: var(--ink); }
.nav-item .ic { color: var(--muted); }
.nav-item.on .ic { color: var(--ink); }
.nav-item .tag { margin-left: auto; }
.nav-item.add { color: var(--muted); }
.side-bottom { margin-top: auto; display: grid; gap: 1px; padding-top: 14px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: #fff; font-weight: 600; font-size: 12.5px; }
.me-text { display: grid; min-width: 0; line-height: 1.3; flex: 1; }
.me-text b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--subtle); color: var(--ink); }

.main { min-width: 0; padding: 28px 36px 64px; }
.page { max-width: 1120px; margin: 0 auto; }
.page.narrow { max-width: 760px; }

/* Page header */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .ic { width: 14px; height: 14px; color: var(--faint); }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.head h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head .sub { color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head .sub a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.head .sub a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sep::before { content: "·"; color: var(--faint); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -6px 0 24px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; margin-bottom: -1px; text-decoration: none; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .count { font-size: 12px; color: var(--muted); background: var(--muted-bg); border-radius: 999px; padding: 0 7px; line-height: 18px; }

/* --- Buttons and forms ------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 550; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: #262b33; border-color: #262b33; }
.btn:focus-visible, .input:focus, select.input:focus, textarea.input:focus, .icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.secondary { background: var(--bg); color: var(--ink-2); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--subtle); color: var(--ink); }
.btn.ghost { background: none; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: var(--muted-bg); }
.btn.danger { background: var(--bg); color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.brand { background: var(--brand); border-color: var(--brand); }
.btn.brand:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; gap: 6px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.inline { display: inline; margin: 0; }

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > span, .label { font-weight: 550; font-size: 13.5px; color: var(--ink-2); }
.field .opt { color: var(--faint); font-weight: 450; }
.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--brand); }
textarea.input { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 13px; line-height: 1.75; min-height: 300px; tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
select.input { appearance: none; padding-right: 34px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; }
.form-error { border: 1px solid var(--bad-line); background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 10px 12px; margin-bottom: 18px; font-size: 13.5px; }
.form-error ul { margin: 0; padding-left: 18px; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Cards, tables, pills ------------------------------------------------------------------------ */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-xs); }
.card + .card, .card + .grid, .grid + .card, .grid + .grid, .section + .section { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head .meta { font-size: 13px; color: var(--muted); }
.card-body { padding: 18px; }
.card-foot .ic { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--subtle); border-radius: 0 0 12px 12px; font-size: 13px; color: var(--muted); }
.section-title { font-size: 15px; font-weight: 600; margin: 28px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side-right { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 550; font-size: 12.5px; color: var(--muted); padding: 10px 18px; background: var(--subtle); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfbfc; }
.table .link { text-decoration: none; font-weight: 550; color: var(--ink); }
.table .link:hover { text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px; border-radius: 999px; font-size: 12px; font-weight: 550; border: 1px solid var(--line); background: var(--subtle); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pill.passed { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.pill.passed::before { background: var(--good-dot); }
.pill.failed, .pill.error { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.pill.failed::before, .pill.error::before { background: var(--bad-dot); }
.pill.blocked { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.pill.blocked::before { background: var(--ok-dot); }
.pill.running, .pill.queued { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.pill.running::before, .pill.queued::before { background: var(--info-dot); }
.pill.running::before { animation: pulse 1.2s ease-in-out infinite; }
.pill.lg { height: 26px; font-size: 13px; padding: 0 10px 0 9px; }
@keyframes pulse { 50% { opacity: .3; } }
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--muted-bg); color: var(--muted); letter-spacing: .01em; }
.tag.brand { background: var(--brand-bg); color: var(--brand-ink); }
.tag.info { background: var(--info-bg); color: var(--info); }
.kbd { font-family: var(--mono); font-size: 12px; background: var(--subtle); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.dot.passed { background: var(--good-dot); }
.dot.failed, .dot.error { background: var(--bad-dot); }
.dot.blocked { background: var(--ok-dot); }
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots .d { width: 6px; height: 18px; border-radius: 2px; background: var(--line); display: block; }
.dots .d.passed { background: var(--good-dot); }
.dots .d.failed, .dots .d.error { background: var(--bad-dot); }
.dots .d.blocked { background: var(--ok-dot); }
.dots .d:hover { opacity: .7; }

/* Flash messages */
.flash { display: flex; align-items: center; gap: 10px; max-width: 1120px; margin: 0 auto 20px; padding: 11px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 500; }
.flash.success { border-color: var(--good-line); background: var(--good-bg); color: var(--good); }
.flash.error { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }
.flash.info { border-color: var(--info-line); background: var(--info-bg); color: var(--info); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--subtle); font-size: 13.5px; color: var(--ink-2); }
.notice .ic { margin-top: 2px; }
.notice.info { border-color: var(--info-line); background: var(--info-bg); }
.notice.info .ic { color: var(--info); }
.notice.warn { border-color: var(--ok-line); background: var(--ok-bg); }
.notice.warn .ic { color: var(--ok); }
.notice b { color: var(--ink); }

/* Empty states */
.empty { text-align: center; padding: 40px 24px; }
.empty .ic.lg { margin: 0 auto 10px; color: var(--faint); width: 28px; height: 28px; }
.empty h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 16px; }

/* --- Scores ----------------------------------------------------------------------------------- */
.ring .ring-track { stroke: var(--muted-bg); }
.ring .ring-fill { stroke: var(--faint); }
.ring.good .ring-fill { stroke: var(--good-dot); }
.ring.ok .ring-fill { stroke: var(--ok-dot); }
.ring.bad .ring-fill { stroke: var(--bad-dot); }
.ring-text { font-family: var(--font); font-weight: 650; fill: var(--ink); letter-spacing: -0.03em; }
.bar { width: 100%; height: 6px; border-radius: 3px; overflow: hidden; }
.bar .bar-track { fill: var(--muted-bg); }
.bar .bar-fill { fill: var(--faint); }
.bar.good .bar-fill { fill: var(--good-dot); }
.bar.ok .bar-fill { fill: var(--ok-dot); }
.bar.bad .bar-fill { fill: var(--bad-dot); }
.score-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.score-num.good { color: var(--good); }
.score-num.ok { color: var(--ok); }
.score-num.bad { color: var(--bad); }
.cats { display: grid; gap: 12px; }
.cat { display: grid; grid-template-columns: 112px minmax(0, 1fr) 34px; gap: 12px; align-items: center; font-size: 13.5px; }
.cat .name { color: var(--ink-2); font-weight: 500; }
.cat .score-num { text-align: right; }
.health { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.health-score { display: grid; justify-items: center; gap: 6px; text-align: center; }
.health-score .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* --- Dashboard ---------------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-xs); }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.stat .v { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.site-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-xs); text-decoration: none; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.site-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.site-card .top { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.site-card .fav { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--muted-bg); color: var(--ink-2); font-weight: 650; flex: none; text-transform: uppercase; }
.site-card .fav.demo { background: var(--brand-bg); color: var(--brand-ink); }
.site-card .title { min-width: 0; flex: 1; }
.site-card h3 { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.site-card .url { color: var(--muted); font-size: 13px; }
.site-card .body { padding: 0 18px 16px; display: grid; gap: 10px; }
.site-card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.site-card .row b { color: var(--ink); font-weight: 550; }
.site-card .foot { margin-top: auto; padding: 11px 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.onboard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; }
.onboard .left { padding: 28px; }
.onboard .left h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 6px; }
.onboard .left > p { color: var(--muted); margin-bottom: 18px; max-width: 460px; }
.onboard .right { background: var(--subtle); border-left: 1px solid var(--line); padding: 28px; display: grid; gap: 14px; align-content: start; }
.onboard ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: step; }
.onboard li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; font-size: 13.5px; color: var(--ink-2); counter-increment: step; }
.onboard li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-2); font-weight: 600; font-size: 12.5px; color: var(--ink); }
.onboard li b { display: block; color: var(--ink); font-weight: 600; }

/* --- Site page ---------------------------------------------------------------------------------- */
.grid > *, .editor > * { margin-top: 0 !important; }
a.shot-frame { display: block; text-decoration: none; }
.shot-frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--subtle); }
.shot-frame .chrome { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.shot-frame .chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.shot-frame .chrome span { margin-left: 8px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-frame img { width: 100%; height: auto; }
.issue-list { display: grid; }
.issue { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.issue:last-child { border-bottom: 0; }
.issue .t { font-weight: 550; display: block; color: var(--ink); }
.issue .d { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.issue:hover { background: #fbfbfc; }
.sev { display: inline-flex; width: 18px; height: 18px; margin-top: 1px; }
.sev .ic { width: 18px; height: 18px; }
.sev.critical { color: var(--bad-dot); }
.sev.warning { color: var(--ok-dot); }
.sev.low { color: var(--info-dot); }
.sev.pass { color: var(--good-dot); }
.flow-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.flow-row:last-child { border-bottom: 0; }
.flow-row .name { font-weight: 600; text-decoration: none; color: var(--ink); }
.flow-row .name:hover { text-decoration: underline; }
.flow-row .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; align-items: center; }
.flow-row .status-ic { width: 18px; height: 18px; }
.spark { width: 100%; height: 64px; }
.spark path.line { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.spark path.area { fill: rgba(16, 24, 40, .05); }
.spark circle { fill: var(--ink); }

/* --- Flow editor -------------------------------------------------------------------------------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.mode-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--muted-bg); margin-bottom: 18px; }
.mode-switch label { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 7px; font-weight: 550; font-size: 13px; color: var(--muted); cursor: pointer; }
.mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mode-switch label:has(input:checked) { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs); }
.mode-switch label.disabled { cursor: not-allowed; opacity: .6; }
.templates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.templates button { height: 26px; padding: 0 9px; border-radius: 6px; border: 1px dashed var(--line-2); background: var(--bg); color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.templates button:hover { border-style: solid; background: var(--subtle); }
.preview { position: sticky; top: 20px; }
.preview ol { list-style: none; margin: 0; padding: 6px 0; max-height: 440px; overflow: auto; counter-reset: none; }
.preview li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 7px 16px; font-size: 13px; align-items: start; }
.preview li .n { font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding-top: 2px; text-align: right; }
.preview li.err { background: var(--bad-bg); color: var(--bad); }
.preview li.err .n { color: var(--bad); }
.preview li.start { color: var(--muted); }
.preview .state { font-size: 12.5px; }
.ref { font-size: 13px; }
.ref summary { cursor: pointer; padding: 12px 16px; font-weight: 550; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.ref summary::-webkit-details-marker { display: none; }
.ref dl { margin: 0; padding: 0 16px 14px; display: grid; gap: 10px; }
.ref dt { font-family: var(--mono); font-size: 12px; color: var(--ink); background: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.ref dd { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

/* --- Run reports -------------------------------------------------------------------------------- */
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-xs); }
.banner .ic { width: 22px; height: 22px; margin-top: 1px; }
.banner h2 { font-size: 15.5px; font-weight: 600; margin-bottom: 3px; }
.banner p { color: var(--ink-2); }
.banner.passed { border-color: var(--good-line); background: var(--good-bg); }
.banner.passed .ic { color: var(--good-dot); }
.banner.failed, .banner.error { border-color: var(--bad-line); background: var(--bad-bg); }
.banner.failed .ic, .banner.error .ic { color: var(--bad-dot); }
.banner.blocked, .banner.cancelled { border-color: var(--ok-line); background: var(--ok-bg); }
.banner.blocked .ic, .banner.cancelled .ic { color: var(--ok-dot); }
.evidence { margin-top: 10px; font-family: var(--mono); font-size: 12.5px; background: rgba(255, 255, 255, .7); border: 1px solid var(--bad-line); border-radius: 8px; padding: 8px 10px; color: var(--bad); overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-xs); overflow: hidden; }
.metric { padding: 14px 16px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric .k { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.metric .v { font-size: 20px; font-weight: 650; letter-spacing: -0.025em; margin-top: 2px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.metric .v .dot { width: 7px; height: 7px; }
.metric .v .dot.good { background: var(--good-dot); }
.metric .v .dot.ok { background: var(--ok-dot); }
.metric .v .dot.bad { background: var(--bad-dot); }
.devices { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; align-items: start; }
.phone { border: 1px solid var(--line); border-radius: 22px; padding: 8px; background: var(--bg); box-shadow: var(--shadow-sm); }
.phone img { width: 100%; height: auto; border-radius: 15px; border: 1px solid var(--line); }
.device-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }

.findings { display: grid; }
.finding { border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding > summary { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 16px; gap: 12px; align-items: center; padding: 13px 18px; cursor: pointer; list-style: none; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary:hover { background: #fbfbfc; }
.finding > summary .t { font-weight: 550; }
.finding > summary .chev { color: var(--faint); transition: transform .15s; }
.finding[open] > summary .chev { transform: rotate(90deg); }
.finding .fbody { padding: 0 18px 16px 48px; display: grid; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.finding .fix { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--line); }
.finding .fix b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.items { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.items li { font-family: var(--mono); font-size: 12px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--bg); overflow-wrap: anywhere; color: var(--ink-2); }
.items li:last-child { border-bottom: 0; }
.cat-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--subtle); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cat-head .score-num { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13px; }
.passed-list { columns: 2; column-gap: 28px; padding: 14px 18px; margin: 0; list-style: none; }
.passed-list li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13px; color: var(--ink-2); break-inside: avoid; }
.passed-list .ic { color: var(--good-dot); margin-top: 2px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0; font-size: 13px; }
.kv dt, .kv dd { margin: 0; padding: 9px 18px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { overflow-wrap: anywhere; }
.kv dt:nth-last-of-type(1), .kv dd:last-of-type { border-bottom: 0; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr) 132px; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: start; }
.step:last-child { border-bottom: 0; }
.step .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--subtle); border: 1px solid var(--line); color: var(--muted); }
.step.passed .num { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.step.failed .num { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.step.skipped { color: var(--faint); }
.step .label { font-weight: 550; }
.step.skipped .label { font-weight: 450; }
.step .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.step .err { margin-top: 8px; color: var(--bad); font-size: 13px; }
.step .note { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.thumb { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--subtle); cursor: zoom-in; padding: 0; width: 100%; }
.thumb img { width: 100%; height: auto; aspect-ratio: 1366 / 800; object-fit: cover; object-position: top; }
.thumb:hover { border-color: var(--line-2); }
.problems li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }
.problems li .s { color: var(--faint); font-family: var(--font); }

.live { display: grid; gap: 0; }
.live-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: start; }
.live-item:last-child { border-bottom: 0; }
.live-item .ic { margin-top: 2px; color: var(--muted); }
.live-item.ok .ic { color: var(--good-dot); }
.live-item.bad .ic { color: var(--bad-dot); }
.live-item .x { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.live-item .thumb { margin-top: 8px; max-width: 320px; }
details > summary.card-head { cursor: pointer; list-style: none; }
details > summary.card-head::-webkit-details-marker { display: none; }
details:not([open]) > summary.card-head { border-bottom: 0; }
.notice .input { height: 32px; margin-top: 6px; font-family: var(--mono); font-size: 12.5px; }
.notice > .btn { margin-left: auto; align-self: center; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--info-line); border-top-color: var(--info); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.queue-note { display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: var(--ink-2); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(10, 13, 18, .72); }
.lightbox img { max-width: min(1200px, 94vw); max-height: 86vh; width: auto; height: auto; border-radius: 10px; }
.lightbox p { color: #fff; font-size: 13px; margin-top: 8px; text-align: center; }

/* --- Account and admin -------------------------------------------------------------------------- */
.settings-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.settings-row:first-of-type { padding-top: 6px; }
.settings-row:last-child { border-bottom: 0; }
.settings-row h2 { font-size: 14.5px; font-weight: 600; }
.settings-row .desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.settings-row .field:last-child { margin-bottom: 0; }
.danger-zone { border-color: var(--bad-line); }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--good); font-size: 12.5px; font-weight: 550; }

/* --- Auth and public pages ----------------------------------------------------------------------- */
.public { background: var(--bg); }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 5; }
.public-top nav { display: flex; align-items: center; gap: 6px; }
.public-top nav a.plain { padding: 6px 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-radius: 7px; }
.public-top nav a.plain:hover { background: var(--subtle); }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 48px 20px; background-color: var(--canvas); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 32px; }
.auth-card h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.025em; }
.auth-card .lede { color: var(--muted); margin: 6px 0 24px; }
.auth-card .row-between { display: flex; justify-content: space-between; align-items: center; margin: -8px 0 18px; font-size: 13px; }
.auth-card .row-between a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.auth-card .row-between a:hover { text-decoration: underline; }
.auth-alt { text-align: center; margin-top: 20px; color: var(--muted); font-size: 13.5px; }
.auth-alt a { color: var(--ink); font-weight: 550; }
.auth-points { list-style: none; margin: 0 0 22px; padding: 14px 16px; display: grid; gap: 8px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line); }
.auth-points li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.auth-points .ic { color: var(--good-dot); margin-top: 2px; }
.public-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; background: var(--bg); }
.public-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.public-foot a { text-decoration: none; }
.public-foot a:hover { color: var(--ink); }
.public-main { padding: 32px 32px 64px; background: var(--canvas); min-height: calc(100vh - 140px); }
.sample-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto 22px; padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #e5e7eb; }
.sample-bar b { color: #fff; }
.sample-bar .btn { background: #fff; color: var(--ink); border-color: #fff; }

/* --- Responsive -------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(3n) { border-right: 0; }
  .metric:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .grid.side-right { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 10; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .side-top { padding: 0; }
  .side-toggle { display: inline-grid; }
  .side-body { display: none; padding-top: 10px; }
  .side.open .side-body { display: flex; }
  .main { padding: 22px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .grid.three, .onboard { grid-template-columns: minmax(0, 1fr); }
  .onboard .right { border-left: 0; border-top: 1px solid var(--line); }
  .devices { grid-template-columns: minmax(0, 1fr); }
  .phone { max-width: 240px; }
  .settings-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .health { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .health .cats { width: 100%; }
  .public-top, .public-foot { padding-left: 16px; padding-right: 16px; }
  .public-main { padding: 22px 16px 48px; }
}
@media (max-width: 640px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0 !important; }
  .step { grid-template-columns: 28px minmax(0, 1fr); }
  .step .thumb { grid-column: 2; max-width: 280px; }
  .passed-list { columns: 1; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { padding-bottom: 0; border-bottom: 0; }
  .flow-row { grid-template-columns: 20px minmax(0, 1fr); }
  .flow-row > .actions, .flow-row > .when { grid-column: 2; }
  .cat { grid-template-columns: 96px minmax(0, 1fr) 30px; }
  .head h1 { font-size: 21px; }
  .table th, .table td { padding-left: 12px; padding-right: 12px; }
  .hide-sm { display: none; }
  .auth-card { padding: 24px 20px; }
}
