@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700;800&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap');

/* Site Inspector by Rubik's Studio. Product dashboard: black sidebar with the logo, warm off-white canvas,
   white cards, black for actions. Scores and status keep their own green/amber/red. */
:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --line: #e7e7e3;
  --line-strong: #d5d5cf;
  --navy: #111111;
  --orange: #111111;
  --fg: #111111;
  --muted: #6b6b66;
  --accent: var(--orange);
  --on-accent: #ffffff;
  --logo: var(--navy);
  --track: #ececE8;
  --side: #0b0b0b;
  --side-fg: #f2f2ef;
  --side-text: #d6d6d1;
  --side-muted: #8a8a85;
  --side-line: #222220;
  --side-hover: #18181a;
  --side-active: #232322;
  --side-chip: #232322;
  --good: #13955a;
  --good-soft: #e3f4ec;
  --warn: #c27400;
  --warn-soft: #fcf1df;
  --bad: #e2373d;
  --bad-soft: #fde8e8;
  --crit: #a3150f;
  --low: #a9a9a3;
  --inc: #4466e6;
  --inc-soft: #e8edfd;
  --info: #5b5b57;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 1px 1px rgba(17, 17, 17, 0.03);
  --shadow-lg: 0 8px 24px rgba(17, 17, 17, 0.08);
  --f-head: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Geist', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e0e0e; --surface: #171716; --surface-2: #1d1d1c; --line: #2a2a28; --line-strong: #3a3a37;
    --fg: #f1f1ee; --muted: #9a9a94; --navy: #3a3a37; --orange: #f1f1ee; --accent: #f1f1ee; --on-accent: #111111; --logo: #f1f1ee; --track: #2a2a28;
    --side: #000000; --side-line: #1c1c1b; --side-hover: #141413; --side-active: #1f1f1e; --side-chip: #1f1f1e;
    --good: #2fbf7c; --good-soft: #12301f; --warn: #e3a032; --warn-soft: #33260f; --bad: #f2585d; --bad-soft: #3a1617;
    --crit: #ff7b72; --low: #6d6d68; --inc: #7d95ff; --inc-soft: #1a2142; --info: #a3a39d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0e0e0e; --surface: #171716; --surface-2: #1d1d1c; --line: #2a2a28; --line-strong: #3a3a37;
  --fg: #f1f1ee; --muted: #9a9a94; --navy: #3a3a37; --orange: #f1f1ee; --accent: #f1f1ee; --on-accent: #111111; --logo: #f1f1ee; --track: #2a2a28;
  --side: #000000; --side-line: #1c1c1b; --side-hover: #141413; --side-active: #1f1f1e; --side-chip: #1f1f1e;
  --good: #2fbf7c; --good-soft: #12301f; --warn: #e3a032; --warn-soft: #33260f; --bad: #f2585d; --bad-soft: #3a1617;
  --crit: #ff7b72; --low: #6d6d68; --inc: #7d95ff; --inc-soft: #1a2142; --info: #a3a39d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.mono, code { font-family: var(--f-mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }
.g-good { color: var(--good); } .g-warn { color: var(--warn); } .g-bad { color: var(--bad); } .g-na { color: var(--muted); }
.vstack { display: flex; flex-direction: column; gap: 16px; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 252px, var(--bg) 252px); }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); color: var(--side-fg);
  display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.side-brand { display: block; color: #fff; padding: 4px 8px 0; text-decoration: none; }
.side-brand .brand-logo { width: 150px; height: auto; display: block; }
.side-product { margin: 6px 8px 14px; font: 600 11px/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-muted);
  display: flex; align-items: center; gap: 8px; }
.side-product::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-tools { padding-bottom: 12px; border-bottom: 1px solid var(--side-line); margin-bottom: 8px; }
.side-label { margin: 14px 10px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-muted); }
.nav-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--side-text); font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.12s, color 0.12s; }
.nav-item .ic { width: 17px; height: 17px; color: var(--side-muted); }
.nav-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--side-hover); color: #fff; }
.nav-item[aria-current='true'], .nav-item[aria-current='page'] { background: var(--side-active); color: #fff; box-shadow: inset 2px 0 0 #fff; }
.nav-item[aria-current='true'] .ic, .nav-item[aria-current='page'] .ic { color: #fff; }
.nav-item:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.nav-item em { font-style: normal; font: 600 11.5px/1 var(--f-mono); padding: 4px 6px; border-radius: 6px; background: var(--side-chip); color: var(--side-text); min-width: 28px; text-align: center; }
.nav-score.g-good { background: rgba(126, 240, 180, 0.16); color: #7ef0b4; }
.nav-score.g-warn { background: rgba(255, 197, 107, 0.16); color: #ffc56b; }
.nav-score.g-bad { background: rgba(255, 163, 165, 0.16); color: #ffa3a5; }
.nav-score.g-na { color: var(--side-muted); }
.side-site { margin: 4px 0 6px; padding: 12px; border: 1px solid var(--side-line); border-radius: var(--radius-sm); background: var(--side-active); }
.side-site-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-muted); }
.side-site-d { font: 600 15px/1.3 var(--f-head); color: #fff; margin-top: 4px; overflow-wrap: anywhere; }
.side-site-t { font-size: 12px; color: var(--side-muted); margin-top: 2px; }
.side-recent { margin-top: auto; padding-top: 12px; }
.side-recent a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--side-text); font-size: 13px; }
.side-recent a:hover { background: var(--side-hover); color: #fff; }
.side-recent a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-chip { font: 600 11.5px/1 var(--f-mono); padding: 4px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.score-chip.g-good { background: var(--good-soft); color: var(--good); }
.score-chip.g-warn { background: var(--warn-soft); color: var(--warn); }
.score-chip.g-bad { background: var(--bad-soft); color: var(--bad); }
.side .score-chip { background: #1d1d1c; }
.side .score-chip.g-good { background: rgba(47, 191, 124, 0.16); color: #4fd896; }
.side .score-chip.g-warn { background: rgba(227, 160, 50, 0.16); color: #f0b44e; }
.side .score-chip.g-bad { background: rgba(242, 88, 93, 0.16); color: #ff7b7f; }
.main { min-width: 0; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 20px; max-width: 1360px; width: 100%; }
#auditView, #home, #report, .tabpanel { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- Page header ---------- */
.topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topline-l { min-width: 0; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs span { margin: 0 6px; color: var(--line-strong); }
.topline h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.topline-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.topline-meta > * + *::before { content: '·'; margin-right: 14px; color: var(--line-strong); }
.topline-meta a { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font: 600 13.5px/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: opacity 0.12s, background 0.12s; white-space: nowrap; }
.btn .ic { width: 16px; height: 16px; }
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: progress; }
.btn.ghost { background: var(--surface); color: var(--fg); border-color: var(--line-strong); box-shadow: var(--shadow); }
.btn.ghost:hover { background: var(--surface-2); opacity: 1; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn:focus-visible, .input:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.input, input[type='text'], input[type='url'], input[type='number'], select, textarea {
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  font: 14px var(--f-body); min-width: 0; }
textarea { height: auto; padding: 10px 12px; }
.input.input-lg, input.input-lg { height: 48px; font-size: 15px; }
.launch-form > .input-lg { flex: 1 1 260px; height: 52px; border-radius: 10px; }
.launch-form > .kw-domain { flex: 0 1 240px; }
.linkbtn { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linkbtn:hover { text-decoration-color: currentColor; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); border-radius: 999px; padding: 5px 11px; font: 13px var(--f-body); cursor: pointer; }
.chips button:hover { border-color: var(--line-strong); background: var(--surface); }

/* ---------- Cards ---------- */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-meta { font-size: 12.5px; color: var(--muted); }
.panel > h3 { margin-bottom: 14px; }
.tabpanel > .panel, .tabpanel > .row2 { margin: 0 !important; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.row2 > * { margin: 0 !important; }

/* ---------- Home ---------- */
.launch { padding: 24px; }
.launch-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.launch-url { flex: 1 1 360px; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); cursor: text; min-width: 0; }
.launch-url:focus-within, .launch-pages:focus-within { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
.launch-url input, .launch-pages input { border: 0; background: transparent; height: 100%; padding: 0; font-size: 16px; flex: 1; min-width: 0; outline: none !important; }
.launch-ic { color: var(--muted); display: flex; }
.launch-pages { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 13px; }
.launch-pages input { width: 52px; flex: none; font-size: 15px; color: var(--fg); text-align: right; }
.launch-form .btn-lg { height: 52px; }
.launch-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.launch-foot span { display: inline-flex; align-items: center; gap: 6px; }
.launch-foot .ic { width: 14px; height: 14px; }
.section-h { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; font-family: var(--f-body); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.feature { display: flex; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-ic { width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.feature b { display: block; font: 600 14px/1.3 var(--f-head); margin-bottom: 3px; }
.feature p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.progress-top { display: flex; align-items: center; gap: 14px; }
.progress-txt { flex: 1; min-width: 0; }
#stage { font: 600 15px/1.3 var(--f-head); }
#progressUrl { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#elapsed { font: 500 13px var(--f-mono); color: var(--muted); }
.spin { width: 30px; height: 30px; animation: spin 1.6s linear infinite; color: var(--fg); }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 16px 0 12px; }
.bar > * { height: 100%; background: var(--fg); border-radius: 99px; transition: width 0.4s; }
#log { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; font: 12.5px/1.7 var(--f-mono); color: var(--muted); }
#log li:last-child { color: var(--fg); }
.error-box { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); padding: 12px 16px; border-radius: var(--radius-sm); }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: var(--surface-2); }

/* ---------- Overview widgets ---------- */
.score-card { display: flex; flex-direction: column; }
.gauge-wrap { position: relative; width: 100%; max-width: 220px; margin: 0 auto; }
.gauge-svg { display: block; width: 100%; height: auto; }
.gauge-n { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; line-height: 1; }
.gauge-n b { font: 700 44px/1 var(--f-head); letter-spacing: -0.03em; }
.gauge-n span { font: 500 14px var(--f-body); color: var(--muted); margin-left: 2px; }
.gauge-wrap.sm { max-width: 140px; }
.gauge-wrap.sm .gauge-n b { font-size: 30px; }
.score-verdict { text-align: center; color: var(--muted); font-size: 13px; margin-top: 12px; }
.donut-row { display: flex; align-items: center; gap: 18px; }
.donut { width: 104px; height: 104px; flex: none; }
.donut-n { font: 700 26px var(--f-head); fill: var(--fg); }
.donut-s { font: 500 10.5px var(--f-body); fill: var(--muted); }
.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; font-size: 13px; }
.legend-list li { display: flex; align-items: center; gap: 8px; }
.legend-list i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend-list b { margin-left: auto; font: 600 13px var(--f-mono); font-variant-numeric: tabular-nums; }
.hbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--track); gap: 2px; margin: 6px 0 18px; }
.hbar span { display: block; height: 100%; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; }
.mini-stats b { display: block; font: 700 26px/1.1 var(--f-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 12.5px; color: var(--muted); }
.catrows { display: flex; flex-direction: column; }
.catrow { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 32px minmax(150px, 1.3fr) minmax(60px, 2fr) 36px 78px 16px; align-items: center; gap: 12px;
  padding: 9px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.catrow + .catrow { border-top: 1px solid var(--line); }
.catrow:hover { background: var(--surface-2); }
.catrow:focus-visible { outline: 2px solid var(--fg); }
.catrow-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.catrow-ic .ic { width: 16px; height: 16px; }
.catrow-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catrow-bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.catrow-bar span { display: block; height: 100%; border-radius: 99px; background: var(--low); }
.m-good { background: var(--good) !important; } .m-warn { background: var(--warn) !important; } .m-bad { background: var(--bad) !important; }
.catrow-score { font: 700 15px var(--f-head); text-align: right; font-variant-numeric: tabular-nums; }
.catrow-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.chev { width: 14px; height: 14px; color: var(--line-strong); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mcard { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.mcard-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.mcard-ic .ic { width: 17px; height: 17px; }
.mcard-v { font: 700 22px/1.1 var(--f-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mcard-k { font-size: 13px; font-weight: 500; margin-top: 3px; }
.mcard-s { font-size: 12px; color: var(--muted); }
.area-head { display: flex; align-items: center; gap: 18px; }
.area-ic { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.area-ic .ic { width: 24px; height: 24px; }
.area-txt { flex: 1; min-width: 0; }
.area-txt h2 { font-size: 20px; font-weight: 700; }
.area-txt p { color: var(--muted); margin-top: 3px; max-width: 64ch; }
.area-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.area-score { width: 140px; flex: none; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 600 11.5px/1 var(--f-body); white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.sev-critical { background: var(--crit); color: #fff; }
.sev-high { background: var(--bad-soft); color: var(--bad); }
.sev-medium { background: var(--warn-soft); color: var(--warn); }
.sev-low { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.sev-info { background: var(--surface-2); color: var(--info); }
.st-pass { background: var(--good-soft); color: var(--good); }
.st-fail { background: var(--bad-soft); color: var(--bad); }
.st-warn { background: var(--warn-soft); color: var(--warn); }
.st-inc { background: var(--inc-soft); color: var(--inc); }
.st-nt { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ok-pill { background: var(--good-soft); color: var(--good); }

/* ---------- Issues ---------- */
.issues { background: var(--surface); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.issue + .issue { border-top: 1px solid var(--line); }
.issue summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 14px; cursor: pointer; }
.issue summary::-webkit-details-marker { display: none; }
.issue summary:hover { background: var(--surface-2); }
.issue[open] summary { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.issue .t { flex: 1 1 260px; min-width: 0; font-weight: 500; }
.rank { width: 22px; height: 22px; border-radius: 6px; background: var(--fg); color: var(--bg); font: 600 11.5px/22px var(--f-mono); text-align: center; flex: none; }
.fid { font: 500 11.5px var(--f-mono); color: var(--muted); }
.tag { font-size: 12px; color: var(--muted); }
.where { font-size: 12px; color: var(--muted); }
.where::before, .tag::before { content: '·'; margin-right: 8px; color: var(--line-strong); }
.issue .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.fix { padding: 10px 12px; border-left: 3px solid var(--fg); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow-wrap: anywhere; }
.list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.list li { overflow-wrap: anywhere; }
.meta-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.meta-grid dt { color: var(--muted); }
.meta-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2);
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
td.url { max-width: 420px; overflow-wrap: anywhere; font-family: var(--f-mono); font-size: 12px; }

/* ---------- Shots ---------- */
.shots { display: flex; gap: 12px; align-items: flex-start; }
.shots figure { margin: 0; min-width: 0; }
.shots .desk { flex: 3; }
.shots .mob { flex: 1; max-width: 110px; }
.shots img { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 300px; object-fit: cover; object-position: top; }
.shots figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Stats & speed ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.stat .v { font: 700 24px/1.1 var(--f-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.metric { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.metric .v { font: 700 20px/1.2 var(--f-head); margin-top: 4px; font-variant-numeric: tabular-nums; }
.gauges { display: flex; flex-wrap: wrap; gap: 20px 28px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.ring text { font-family: var(--f-head); font-weight: 700; fill: var(--fg); }
.ring circle:first-child { stroke: var(--track); }
.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--track); }
.stack span { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.c1 { background: var(--navy); } .c2 { background: #4466e6; } .c3 { background: #13955a; } .c4 { background: #c27400; }
.c5 { background: #e2373d; } .c6 { background: #8a5cd6; } .c7 { background: #a9a9a3; }
:root[data-theme='dark'] .c1 { background: #e8e8e4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .c1 { background: #e8e8e4; } }

/* ---------- Checks ---------- */
.checks { display: flex; flex-direction: column; }
.check { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.check + .check { border-top: 1px solid var(--line); }
.check > div { min-width: 0; overflow-wrap: anywhere; }
.check .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.check .ic.y { background: var(--good-soft); color: var(--good); }
.check .ic.n { background: var(--bad-soft); color: var(--bad); }
.check .ic.w { background: var(--warn-soft); color: var(--warn); }

/* ---------- Search / tools ---------- */
.serp { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); max-width: 620px; font-family: Arial, sans-serif; }
.serp .u { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.serp .t { font-size: 19px; color: #1a0dab; margin: 3px 0; line-height: 1.3; }
:root[data-theme='dark'] .serp .t { color: #8ab4f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .serp .t { color: #8ab4f8; } }
.serp .d { font-size: 13.5px; color: var(--muted); }
.posbars { display: flex; flex-direction: column; gap: 8px; }
.pb { display: grid; grid-template-columns: 70px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.pbl { color: var(--muted); }
.pbt { height: 8px; background: var(--track); border-radius: 99px; overflow: hidden; }
.pbt span { display: block; height: 100%; background: var(--fg); border-radius: 99px; }
.pb .num { text-align: right; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi b { font: 700 24px/1.15 var(--f-head); letter-spacing: -0.02em; overflow-wrap: break-word; text-transform: capitalize; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.trend span { flex: 1; background: var(--fg); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.85; }
.trend span:hover { opacity: 1; }
.up { color: var(--good); } .down { color: var(--bad); }


/* ---------- Footer ---------- */
.footer { display: flex; align-items: center; gap: 16px; padding-top: 20px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer .brand-logo { width: 110px; height: auto; flex: none; color: var(--logo); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 10; height: auto; padding: 12px 16px; gap: 8px; overflow: visible; }
  .side-brand { padding: 0; }
  .side-brand .brand-logo { width: 120px; }
  .side-product { position: absolute; right: 16px; top: 18px; margin: 0; }
  .side-nav, .side-tools { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; padding-bottom: 2px; }
  .side-tools { border: 0; margin: 0; padding-bottom: 0; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; flex: none; padding: 7px 10px; }
  .nav-item[aria-current='true'], .nav-item[aria-current='page'] { box-shadow: inset 0 -2px 0 #fff; }
  .side-label, .side-recent, .side-site { display: none; }
  .main { padding: 20px 16px 32px; }
  .topline h1 { font-size: 24px; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .app { background: var(--bg); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .catrow { grid-template-columns: 28px minmax(0, 1fr) 34px 14px; }
  .catrow-bar, .catrow-n { display: none; }
  .area-head { flex-wrap: wrap; }
  .area-score { width: 110px; }
  .shots .mob { max-width: 80px; }
  .launch-form .btn-lg { flex: 1; }
  .launch-pages { flex: 1; }
  .footer { flex-direction: column; align-items: flex-start; }
  .card, .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.side-recent a { justify-content: flex-start; }
.side-recent a .score-chip { order: 2; margin-left: auto; }
@media (max-width: 520px) { .metric-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- To-do ---------- */
.todo-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.todo-progress { flex: 1; min-width: 220px; font-size: 14px; color: var(--muted); }
.todo-progress b { font: 700 22px/1 var(--f-head); color: var(--fg); margin-right: 2px; }
.todo-progress .bar { margin: 10px 0 0; max-width: 420px; }
.todo-progress .bar > * { background: var(--orange); width: 0; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.seg-b { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: 600 13px/1 var(--f-body); cursor: pointer; }
.seg-b .ic { width: 16px; height: 16px; }
.seg-b[aria-selected='true'] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow), inset 0 -2px 0 var(--orange); }
.seg-b:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.todo-note { margin: 0 2px 12px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-row { display: flex; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.todo-row:first-child { border-top: 0; }
.todo-check { position: relative; flex: none; width: 22px; height: 22px; margin-top: 1px; cursor: pointer; }
.todo-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.todo-box { display: block; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface); transition: background 0.12s, border-color 0.12s; }
.todo-check input:checked + .todo-box { background: var(--orange); border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314203a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8.5'/%3E%3C/svg%3E");
  background-size: 16px; background-position: center; background-repeat: no-repeat; }
.todo-check input:focus-visible + .todo-box { outline: 2px solid var(--fg); outline-offset: 2px; }
.todo-check:hover .todo-box { border-color: var(--orange); }
.todo-main { flex: 1; min-width: 0; }
.todo-t { font: 600 14.5px/1.35 var(--f-head); color: var(--fg); }
.todo-fix { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.todo-row.is-done .todo-t { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.todo-row.is-done .todo-fix, .todo-row.is-done .todo-meta { opacity: 0.55; }
.todo-ai-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.todo-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.todo-opt input { accent-color: var(--orange); width: 16px; height: 16px; }
.todo-ai-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.todo-brief { margin: 0; max-height: 640px; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
  font: 12.5px/1.6 var(--f-mono); color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.todo-brief:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
@media (max-width: 620px) { .todo-head { flex-direction: column; align-items: stretch; } .seg { align-self: flex-start; } }

/* ---------- Managed clients ---------- */
.stat .s { font-size: 12px; color: var(--muted); margin-top: 6px; }
.delta { font: 600 12px/1 var(--f-mono); }
.card h4, .panel h4 { margin: 18px 0 8px; font: 600 13px/1.3 var(--f-head); color: var(--fg); }
.mode-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface-2);
  font: 600 11.5px/1.4 var(--f-body); color: var(--muted); white-space: nowrap; }
.mode-badge.managed { border-color: var(--navy); background: var(--navy); color: #fff; }
:root[data-theme='dark'] .mode-badge.managed { border-color: #7d95ff; background: transparent; color: #c8d3ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .mode-badge.managed { border-color: #7d95ff; background: transparent; color: #c8d3ff; } }
.launch-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; font-size: 13px; }
.launch-mode:empty { display: none; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-k { font: 600 12.5px/1.2 var(--f-body); color: var(--fg); }
.field-h { font-size: 12px; line-height: 1.4; color: var(--muted); }
.field .input { width: 100%; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.client-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.client-h h3 { margin: 0 0 2px; }
.client-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.client-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.conn { margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid var(--line); background: var(--surface-2); overflow-wrap: anywhere; }
.conn b { margin-right: 6px; }
.conn.ok { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); background: var(--good-soft); }
.conn.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); }
@media (max-width: 620px) { .field-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Dashboard ---------- */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.dash-kpis .kpi b { text-transform: none; }
.kpi-s { font-size: 12px; color: var(--muted); }
.dash-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-search { max-width: 280px; flex: 1; min-width: 180px; }
.seg-n { font: 500 11px/1 var(--f-mono); color: var(--muted); margin-left: 2px; }
.dash-table td { vertical-align: middle; }
.dash-table .site { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-table .site a { color: var(--fg); text-decoration: none; }
.dash-table .site a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.site-d { font-size: 12px; color: var(--muted); }
.dash-table .tag { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); font-size: 11px; }
.dash-table .tag.type-managed { border-color: var(--navy); color: var(--navy); }
:root[data-theme='dark'] .dash-table .tag.type-managed { border-color: #7d95ff; color: #c8d3ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .dash-table .tag.type-managed { border-color: #7d95ff; color: #c8d3ff; } }
.dash-table .tag.type-unsaved { border-style: dashed; }
.spark-c { color: var(--navy); }
:root[data-theme='dark'] .spark-c { color: #9fb2e0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .spark-c { color: #9fb2e0; } }
.spark { display: block; }
.iss { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chips-inline { display: inline-flex; gap: 4px; }
.mini-chip { font: 600 10.5px/1 var(--f-mono); padding: 3px 5px; border-radius: 5px; border: 1px dashed var(--line-strong); color: var(--muted); }
.mini-chip.on { border: 1px solid var(--good); color: var(--good); background: var(--good-soft); }
.row-act { white-space: nowrap; text-align: right; }
.row-act .btn { margin-left: 4px; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; height: auto; }
.btn.icon-only { padding: 6px 9px; }
.dash-table tr.is-running td { background: color-mix(in srgb, var(--orange) 8%, transparent); }
.dash-table tr.is-queued td { background: var(--surface-2); }
.dash-run { display: flex; align-items: center; gap: 14px; }
.dash-run .spin { width: 26px; height: 26px; flex: none; }
.dash-run > div { flex: 1; min-width: 0; }
.bulk { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.bulk summary { cursor: pointer; font: 600 13px/1.4 var(--f-body); color: var(--fg); }
.bulk textarea { width: 100%; margin-top: 10px; font-family: var(--f-mono); }
.bulk select { width: auto; }
.conn-result { font-size: 13px; color: var(--bad); }
.empty { text-align: center; padding: 32px 16px; }
@media (max-width: 960px) {
  .dash-table th:nth-child(3), .dash-table td:nth-child(3), .dash-table th:nth-child(6), .dash-table td:nth-child(6) { display: none; }
}

/* ---------- Problem screenshots ---------- */
.issue-shot { margin: 0 0 14px; max-width: 760px; }
.shot-btn { display: block; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); cursor: zoom-in; overflow: hidden; max-width: 100%; }
.shot-btn img { display: block; max-width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.shot-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.issue-shot figcaption, .todo-shot figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.todo-shot { margin: 0; flex: none; width: 168px; }
.todo-shot .shot-btn img { max-height: 110px; width: 100%; object-fit: cover; object-position: center; }
.todo-shot figcaption { display: none; }
.shot-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 16, 30, 0.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; cursor: zoom-out; }
.shot-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); background: #fff; }
@media (max-width: 620px) { .todo-shot { width: 96px; } .todo-shot .shot-btn img { max-height: 72px; } }

/* ---------- View switch (All / Web design / SEO) ---------- */
.role-switch { padding: 0 2px 12px; border-bottom: 1px solid var(--side-line); margin-bottom: 8px; }
.role-switch .side-label { margin-top: 4px; }
.role-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 9px; background: var(--side-active); }
.role-seg button { border: 0; border-radius: 7px; padding: 7px 4px; background: transparent; color: var(--side-text); font: 600 12px/1 var(--f-body); cursor: pointer; }
.role-seg button:hover { color: #fff; }
.role-seg button[aria-checked='true'] { background: var(--orange); color: #14203a; }
.role-seg button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (max-width: 960px) { .role-switch { border: 0; padding: 0; margin: 0; } .role-switch .side-label { display: none; } }

/* ---------- Progress ---------- */
:root { --chart-line: #111111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --chart-line: #6f8cf0; } }
:root[data-theme='dark'] { --chart-line: #6f8cf0; }
.prog-pick { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.prog-pick label { display: flex; flex-direction: column; gap: 6px; font: 600 12.5px/1.2 var(--f-body); color: var(--muted); }
.prog-pick select { min-width: 240px; }
.prog-kpis .kpi b.g-good { color: var(--good); }
.chg { font: 600 12.5px/1 var(--f-mono); white-space: nowrap; }
.chg.good { color: var(--good); }
.chg.bad { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chart-wrap { position: relative; }
.score-chart { width: 100%; height: auto; display: block; overflow: visible; }
.score-chart .cg { stroke: var(--line); stroke-width: 1; }
.score-chart .ct { fill: var(--muted); font: 11px var(--f-body); }
.score-chart .cv { fill: var(--fg); font: 700 13px var(--f-mono); }
.score-chart .cl { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.score-chart .cm { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.score-chart .cpt { cursor: default; outline: none; }
.score-chart .cpt:focus .cm, .score-chart .cpt:hover .cm { r: 7; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); padding: 8px 10px; border-radius: 8px; background: var(--fg); color: var(--surface); font-size: 12.5px; line-height: 1.4; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-lg); }
.prog-list { list-style: none; margin: 0; padding: 0; }
.prog-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.prog-list li:first-child { border-top: 0; }
.prog-list li > span:nth-child(2) { flex: 1; min-width: 0; }
.prog-list.fixed li > span:nth-child(2) { text-decoration: line-through; text-decoration-color: var(--good); }
.prog-list.fixed li::before { content: '✓'; color: var(--good); font-weight: 700; }
.monthly { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.monthly legend { padding: 0 6px; font: 600 12.5px/1 var(--f-body); color: var(--fg); }
.monthly-opts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.monthly-opts label { display: flex; align-items: center; gap: 8px; }
.monthly-opts select, .monthly-opts input { width: auto; min-width: 70px; }
.pdf-link { display: inline-block; margin-top: 2px; font-size: 12px; }

/* ---------- Thumbnails and screenshot gallery ---------- */
.issue-thumb { flex: none; width: 76px; height: 46px; object-fit: cover; object-position: center; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); margin-left: 4px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.shot-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.shot-card .issue-shot { margin: 0; max-width: none; }
.shot-card .shot-btn img { max-height: 220px; width: 100%; object-fit: cover; object-position: center top; }
.shot-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.shot-t { font: 600 14px/1.35 var(--f-head); }
.shot-fix { font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Project page ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: transparent; padding: 10px 14px; font: 600 13.5px/1 var(--f-body); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--fg); }
.tab[aria-selected='true'] { color: var(--fg); border-bottom-color: var(--orange); }
.tab:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }
#pjBody { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.tab-actions { display: flex; justify-content: flex-end; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.area-cell { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--fg); text-decoration: none; font-size: 13.5px; }
.area-cell:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cp-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cp-add .input { flex: 1; min-width: 180px; }
.cmp-table td, .cmp-table th { white-space: nowrap; }
.cmp-table tr.is-you td { background: color-mix(in srgb, var(--orange) 7%, transparent); }
.cmp-table .best { font-weight: 700; color: var(--good); }
.cmp-table .best::after { content: ' ★'; font-size: 10px; }
.needs { list-style: none; margin: 0; padding: 0; }
.needs li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.needs li:first-child { border-top: 0; }
.needs-p { font-weight: 600; color: var(--fg); text-decoration: none; min-width: 140px; }
.needs-t { flex: 1; min-width: 200px; color: var(--fg); }

/* ---------- Project cards (Projects page) ---------- */
.pcards { display: flex; flex-direction: column; gap: 10px; }
.pcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.pcard.is-running { border-color: var(--orange); }
.pcard-main { display: grid; grid-template-columns: minmax(0, 1.6fr) 90px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; }
.pcard-name { font: 700 16.5px/1.25 var(--f-head); color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.pcard-name:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.pcard-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.pcard-sub .tag { padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 11px; }
.pcard-sub .tag.type-managed { border-color: var(--navy); color: var(--navy); }
.pcard-status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.st { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; font: 600 11.5px/1.2 var(--f-body); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.st-good { background: var(--good-soft); color: var(--good); }
.st-bad { background: var(--bad-soft); color: var(--bad); }
.st-na { background: var(--surface-2); color: var(--muted); }
.pcard-score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.big-score { font: 800 30px/1 var(--f-head); letter-spacing: -0.02em; }
.big-score.g-good { color: var(--good); } .big-score.g-warn { color: var(--warn); } .big-score.g-bad { color: var(--bad); } .big-score.g-na { color: var(--muted); }
.pcard-k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pcard-work { font-size: 14px; }
.pcard-work b { font: 700 18px/1 var(--f-head); }
.pcard-work .muted { font-size: 12.5px; margin-top: 4px; }
.pcard-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pcard-comps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px dashed var(--line); background: var(--surface-2); font-size: 13px; }
.comp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); }
.comp-chip b.g-good { color: var(--good); } .comp-chip b.g-warn { color: var(--warn); } .comp-chip b.g-bad { color: var(--bad); }
.oneoff { margin-top: 16px; }
.oneoff summary { cursor: pointer; font: 600 13.5px/1.4 var(--f-body); color: var(--fg); padding: 6px 0; }
.oneoff-list { list-style: none; margin: 0; padding: 0; }
.oneoff-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.oneoff-n { min-width: 0; overflow-wrap: anywhere; }
.oneoff-a { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.input.sm, select.input.sm { height: 32px; padding: 0 8px; font-size: 12.5px; width: auto; }
.nav-badge { margin-left: auto; font: 700 11px/1 var(--f-mono); padding: 4px 6px; border-radius: 6px; background: #fff; color: #111; font-style: normal; }

/* ---------- Alerts, health, summary, report types ---------- */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.alert-list li:first-child { border-top: 0; }
.alert-list li.unread b { color: var(--fg); }
.alert-list li.unread::before { content: ''; flex: none; width: 4px; border-radius: 4px; background: var(--orange); }
.al-ic { flex: none; }
.al-body { color: var(--muted); margin: 3px 0; line-height: 1.5; overflow-wrap: anywhere; }
.health-row { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13.5px; }
.site-sum { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; }
.report-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.rtype { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rtype p { margin: 0; font-size: 13px; flex: 1; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 960px) {
  .pcard-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'id score' 'work work' 'act act'; gap: 12px; }
  .pcard-id { grid-area: id; } .pcard-score { grid-area: score; } .pcard-work { grid-area: work; } .pcard-act { grid-area: act; justify-content: flex-start; }
  .topline { flex-direction: column; align-items: stretch; gap: 12px; }
  .topline .actions { flex-wrap: wrap; }
  .dash-tools { flex-direction: column; align-items: stretch; }
  .dash-search { max-width: none; }
  .dash-tools .seg { overflow-x: auto; }
  .row2, .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .main { padding: 16px 12px 28px; }
  .pcard-main { padding: 14px; }
  .pcard-comps { padding: 10px 14px; }
  .big-score { font-size: 26px; }
  .btn { height: 40px; }
  .btn.sm { height: 34px; padding: 0 12px; }
  .pcard-act .btn { flex: 1; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 20px; }
  .card, .panel { padding: 14px; }
  .tablewrap, .card > table, .panel > table { overflow-x: auto; display: block; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .prog-pick select { min-width: 0; width: 100%; }
  .prog-pick label { flex: 1; min-width: 140px; }
  .tabs { margin: 0 -12px; padding: 0 12px; }
  .launch-form { flex-direction: column; align-items: stretch; }
  .launch-form .btn { width: 100%; }
  .needs li { gap: 6px; }
  .needs-p { min-width: 0; }
  .meta-grid { grid-template-columns: minmax(0, 1fr); }
  .meta-grid dt { margin-top: 8px; }
  .shot-grid { grid-template-columns: minmax(0, 1fr); }
  .issue summary { flex-wrap: wrap; }
  .issue-thumb { width: 64px; height: 40px; }
}
/* Phones: the work comes first (needs list and project cards), the summary numbers after. */
@media (max-width: 620px) {
  #toolView > .dash-kpis:not(.prog-kpis) { order: 3; }
  #toolView > .card:has(#dashTable) { order: 2; }
  #toolView > #dashNeeds { order: 1; }
}

/* ---------- Sign in with Google ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: #0b0b0b; padding: 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.login-logo svg { width: 200px; height: auto; color: #111111; }
.login-card h1 { margin: 6px 0 0; font: 700 22px/1.2 var(--f-head); }
.login-card .error-box { text-align: left; }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.google-btn:hover { background: #f8f9fa; opacity: 1; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--side-line); color: var(--side-text); font-size: 12.5px; }
.side-user img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.side-user-t { display: flex; flex-direction: column; min-width: 0; }
.side-user-t b { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--side-muted); }
.side-user-out { margin-left: auto; color: var(--side-text); white-space: nowrap; }
@media (max-width: 960px) { .side-user { display: none; } }

/* Report builder */
.rb fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.rb legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.rb-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.rb-type { display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 12px 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); position: relative; cursor: pointer; }
.rb-type input { position: absolute; left: 12px; top: 14px; }
.rb-type span { font-size: 12.5px; }
.rb-type:has(input:checked) { border-color: var(--accent, #111111); box-shadow: inset 0 0 0 1px var(--accent, #111111); }
.rb-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rb label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.rb label .input, .rb label select, .rb label textarea { color: var(--fg); width: 100%; }
.rb textarea.input { height: auto; padding: 8px 10px; font: inherit; resize: vertical; }
.rb-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 14px; }
.rb label.rb-sec { flex-direction: row; align-items: flex-start; gap: 10px; padding: 8px 4px; color: var(--fg); cursor: pointer; }
.rb-sec input { margin-top: 3px; flex: none; }
.rb-sec > span { display: flex; flex-direction: column; } .rb-sec .muted { font-size: 12.5px; }
.rb-text { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.rb-text summary { font-weight: 700; cursor: pointer; }
.rb-text label { margin-top: 10px; }
.rb .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .rb .actions .btn { flex: 1; } .rb-dates { grid-template-columns: 1fr 1fr; } }

/* ---------- Navigation groups, phone menu ---------- */
.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; }
.side-label.nav-group { margin: 16px 10px 6px; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 6px; position: absolute; right: 12px; top: 10px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--side-line); background: var(--side-active); color: #fff; font: 600 13px var(--f-body); cursor: pointer; }
  .menu-btn .ic { width: 18px; height: 18px; }
  .side-product { display: none; }
  .side .side-tools, .side .role-switch, .side .side-user { display: none; }
  .side.menu-open .side-tools { display: flex; flex-direction: column; overflow: visible; gap: 2px; margin-top: 8px; }
  .side.menu-open .role-switch, .side.menu-open .side-user { display: block; }
  .side.menu-open .side-label.nav-group, .side.menu-open .role-switch .side-label { display: block; }
  .side.menu-open .nav-item { width: 100%; padding: 10px; }
  .side.menu-open .nav-item[aria-current='page'] { box-shadow: inset 2px 0 0 #fff; }
}

/* ---------- Settings, Reports, Help ---------- */
.set-list { list-style: none; margin: 0; padding: 0; }
.set-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; padding-top: 4px; }
.set-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-row .muted { font-size: 13.5px; }
.set-how { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.set-how code, .note code, .error-box code { font: 12px var(--f-mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.status-pill { flex: none; font: 600 12px/1 var(--f-body); padding: 6px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.status-pill.on { background: rgba(47, 191, 124, 0.12); color: var(--good); border-color: rgba(47, 191, 124, 0.3); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form select { flex: 1; min-width: 220px; max-width: 480px; }
.rp-table { width: 100%; }
.rp-table td:last-child { text-align: right; }
.hp-list { list-style: none; margin: 0; padding: 0; }
.hp-list li { display: grid; grid-template-columns: minmax(200px, 1fr) 1.4fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hp-list li:first-child { border-top: 0; }
@media (max-width: 700px) { .hp-list li { grid-template-columns: 1fr; gap: 4px; } .set-row { flex-direction: column; gap: 8px; } }

/* ---------- v3: running websites (assistant, content, maintenance, analytics, ads, fleet, crawl) ---------- */
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.vstack-s { display: flex; flex-direction: column; gap: 12px; }
.act-out { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.input.sm, select.input.sm { height: 30px; padding: 2px 8px; font-size: 12.5px; }
.inline-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.inline-f .input { flex: 1 1 160px; min-width: 0; width: auto; }
.inline-f .todo-opt { flex: 0 0 auto; }
.chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); border-radius: 999px; padding: 5px 11px; font: 13px var(--f-body); cursor: pointer; text-align: left; }
.chip:hover { border-color: var(--line-strong); background: var(--surface); }
.chip.static { cursor: default; font: 12px var(--f-mono); padding: 3px 9px; }
.delta { font: 600 12px var(--f-mono); }
.st-run { background: var(--inc-soft); color: var(--inc); }
.st-wait { background: var(--warn-soft); color: var(--warn); }
.st-reply { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.st-done { background: var(--good-soft); color: var(--good); }
.st-fail { background: var(--bad-soft); color: var(--bad); }
.dots::after { content: '…'; display: inline-block; animation: si-dots 1.2s steps(4, end) infinite; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes si-dots { 0% { width: 0; } 100% { width: 1.2em; } }

/* Fix buttons on findings and the to-do list */
.fix-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 4px; }
.fix-btn { gap: 6px; }
.fix-btn .ic { width: 14px; height: 14px; }

/* Assistant & change log */
.asst-conn { margin-bottom: 16px; padding: 16px 20px; }
.asst-conn-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.asst-conn-row > div:first-child { flex: 1 1 340px; }
.asst-conn-a { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.asst { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.asst-list { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.asst-new form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.asst-new textarea { width: 100%; resize: vertical; }
.asst-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow: auto; }
.asst-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--fg); font: inherit; cursor: pointer; }
.asst-item:hover { background: var(--surface-2); }
.asst-item.on { background: var(--surface-2); border-color: var(--line-strong); }
.asst-item-t { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.asst-item-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.asst-thread { display: flex; flex-direction: column; gap: 14px; min-height: 320px; }
.asst-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.asst-head h3 { margin: 0 0 6px; }
.asst-head-a { display: flex; gap: 6px; }
.asst-email summary { cursor: pointer; display: flex; gap: 6px; align-items: center; font-size: 13px; }
.asst-email pre, .asst-approve pre, .asst-act pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; font: 12px/1.5 var(--f-mono); max-height: 320px; overflow: auto; margin: 6px 0 0; }
.asst-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.msg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface); max-width: 92%; }
.msg-user { align-self: flex-end; background: var(--surface-2); }
.msg-assistant { align-self: flex-start; }
.msg-system { align-self: center; background: none; border-style: dashed; color: var(--muted); font-size: 13px; }
.msg-h { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg-h b { color: var(--fg); }
.msg-b { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.msg-b code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.asst-approve { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius-sm); padding: 14px; }
.asst-approve h4 { margin: 0 0 8px; }
.asst-approve ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.asst-actions summary { cursor: pointer; font-size: 13px; }
.asst-act { width: 100%; margin-top: 8px; font-size: 13px; }
.asst-act td { vertical-align: top; padding: 6px 8px; border-top: 1px solid var(--line); }
.asst-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.asst-reply textarea { width: 100%; resize: vertical; }
.asst-reply .act-out { grid-column: 1 / -1; }

/* SEO content */
.cal-days { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.slots, .art-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.slot, .art { border-top: 1px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.slot:first-child, .art:first-child { border-top: 0; }
.slot-h { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13.5px; }
.slot-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.slot-f .input { flex: 1 1 200px; min-width: 0; width: auto; }
.art-h { display: flex; gap: 12px; align-items: flex-start; }
.art details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.art-meta { display: grid; gap: 4px; margin: 10px 0; font-size: 13.5px; }
.checks-mini { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; font-size: 13px; }
.checks-mini .ok { color: var(--good); }
.checks-mini .no { color: var(--bad); }
.checks-mini .muted { color: var(--muted); }
.art-body { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; max-height: 480px; overflow: auto; background: var(--surface-2); font-size: 14.5px; line-height: 1.65; }
.art-body h2, .art-body h3 { margin: 1.2em 0 0.4em; }
.art-body img { max-width: 100%; }

/* Maintenance */
.hard-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.hard-list li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }

/* Analytics */
.an-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 16px; }
.an-chart { margin: 0; }
.an-chart svg { width: 100%; height: 120px; display: block; }
.an-chart figcaption { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.gbp-mini { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.gbp-mini:first-of-type { border-top: 0; }

/* Ads */
.ad-plan details { border-top: 1px solid var(--line); padding: 10px 0; }
.ad-plan summary { cursor: pointer; }
.ad-group { margin: 12px 0; }
.ad-group h4 { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.ad-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 10px; background: var(--surface-2); font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.ad-h { color: var(--inc); font-weight: 600; font-size: 15px; }
.ad-preview.meta .ad-h { color: var(--fg); }

/* Websites (fleet) */
.fleet td, .fleet th { white-space: nowrap; }
.fleet td:nth-child(2) { white-space: normal; min-width: 200px; }
.fleet tfoot td { border-top: 1px solid var(--line-strong); padding-top: 8px; }

/* Crawl explorer */
.crawl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.crawl-bar .input { flex: 1 1 200px; width: auto; min-width: 0; }
.crawl-bar select.input { flex: 0 1 260px; }
.crawl-actions { display: flex; gap: 6px; margin-left: auto; }
.crawl-table { max-height: 70vh; overflow: auto; }
.crawl-table table { font-size: 12.5px; }
.crawl-table td { white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.crawl-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sortable button { all: unset; cursor: pointer; font: inherit; }
.sortable[aria-sort='ascending'] button::after { content: ' ▲'; font-size: 9px; }
.sortable[aria-sort='descending'] button::after { content: ' ▼'; font-size: 9px; }

@media (max-width: 960px) {
  .asst { grid-template-columns: minmax(0, 1fr); }
  .asst-items { max-height: 320px; }
}
@media (max-width: 620px) {
  .asst-reply { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 100%; }
  .crawl-actions { margin-left: 0; }
  .art-h { flex-direction: column; }
}

/* In-page section links (Maintenance) */
.sec-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; margin: -6px 0 12px; background: var(--bg); }
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav a { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 13px; font-weight: 500; text-decoration: none; }
.sec-nav a:hover { border-color: var(--fg); }
[id^='mx-'] { scroll-margin-top: 64px; }
.asst-filter .input { width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab { scroll-snap-align: start; flex: 0 0 auto; }

@media (max-width: 960px) {
  .asst-thread.is-empty { display: none; }
}
@media (max-width: 620px) {
  /* Header: actions in one swipeable row, primary action first in reach */
  .topline { min-width: 0; }
  .topline .actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; width: calc(100% + 24px); max-width: calc(100% + 24px); box-sizing: border-box; align-self: auto; }
  .topline .actions::-webkit-scrollbar { display: none; }
  .topline .actions > * { flex: 0 0 auto; }
  .tabs { scroll-snap-type: x proximity; mask-image: linear-gradient(90deg, #000 85%, transparent); }
  /* Tables become stacked cards */
  .tablewrap:has(> table.m-cards) { border: 0; overflow: visible; }
  table.m-cards, table.m-cards tbody, table.m-cards tr, table.m-cards td { display: block; width: 100%; }
  table.m-cards thead { display: none; }
  table.m-cards tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
  table.m-cards td { border: 0 !important; padding: 3px 0 !important; text-align: left !important; white-space: normal !important; display: flex; gap: 10px; justify-content: space-between; align-items: center; min-height: 28px; }
  table.m-cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500; flex: 0 0 auto; }
  table.m-cards td:first-child { display: block; font-size: 14px; padding-bottom: 6px !important; }
  table.m-cards td:first-child::before { display: none; }
  table.m-cards td:empty, table.m-cards td[data-label='']::before { display: none; }
  table.m-cards tfoot { display: block; }
  .fleet td, .fleet th { white-space: normal; }
  .inline-f > .btn { flex: 1 1 auto; }
  .sec-nav { margin: -6px -12px 12px; padding: 10px 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
textarea.input, .input textarea { height: auto; min-height: 76px; padding-top: 10px; padding-bottom: 10px; line-height: 1.5; }
.asst-reply textarea.input { min-height: 52px; }
.fleet td:first-child { width: 36px; }
@media (max-width: 620px) {
  .fleet.m-cards td:first-child { position: absolute; right: 12px; top: 10px; width: auto; padding: 0 !important; }
  .fleet.m-cards tr { position: relative; }
  .fleet.m-cards td:nth-child(2) { display: block; padding-right: 32px !important; }
  .fleet.m-cards td:nth-child(2)::before { display: none; }
}
@media (max-width: 620px) {
  .card-h { flex-wrap: wrap; row-gap: 4px; }
  .card-h .card-meta { flex-basis: 100%; text-align: left; }
  .topline-meta > * + *::before { display: none; }
}

/* ===== Agency: new websites, build, communications, inbox ===== */
.pill-tag, .idea-list .tag, .sec-outline .tag, .ci-subj .tag, .comms-item .tag, .build-pages .tag { display: inline-block; font: 500 11px/1.6 var(--f-mono); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; text-transform: lowercase; }
.idea-list .tag::before, .sec-outline .tag::before, .ci-subj .tag::before, .comms-item .tag::before, .build-pages .tag::before { content: none; }
.lead { font-size: 15.5px; line-height: 1.55; margin-bottom: 14px; }
.inline-f { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.inline-f .input { flex: 1; min-width: 0; }

.build-list { list-style: none; margin: 0; padding: 0; }
.build-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 90px; gap: 16px; align-items: center; padding: 12px 8px; margin: 0 -8px; border-radius: var(--radius-sm); text-decoration: none; border-top: 1px solid var(--line); }
.build-list li:first-child .build-row { border-top: 0; }
.build-row:hover { background: var(--surface-2); }
.build-name { display: flex; flex-direction: column; min-width: 0; }
.build-name .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-row > .small { text-align: right; }
.stepper-mini { display: inline-flex; gap: 3px; }
.stepper-mini i { width: 16px; height: 5px; border-radius: 3px; background: var(--track); }
.stepper-mini i.on { background: var(--fg); }

.bd-stepper { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; padding: 6px; margin-bottom: 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; scrollbar-width: none; }
.bd-stepper::-webkit-scrollbar { display: none; }
.bd-stepper a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.bd-stepper a span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); font: 600 11.5px var(--f-mono); }
.bd-stepper a.done { color: var(--fg); }
.bd-stepper a.done span { background: var(--good-soft); border-color: transparent; color: var(--good); }
.bd-stepper a.now { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.bd-stepper a.now span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.bd-step { scroll-margin-top: 72px; }
.bd-step h3 { display: inline-flex; align-items: center; gap: 10px; }
.bd-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--fg); color: var(--bg); font: 600 12px var(--f-mono); }

.idea-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.idea-list > li:not(.muted) { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.idea-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.idea-h .btn { margin-left: auto; padding: 2px 8px; }
.idea-list .msg-b { overflow-wrap: anywhere; }
#bdIdeaF .form-actions select { width: auto; }

.concept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 16px; }
.concept-grid ul, .q-panel ul { margin: 6px 0 0; padding-left: 18px; }
.concept-grid li { margin: 3px 0; }
.eyebrow { display: block; font: 600 11px var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.design-sys { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; }
.swatch i { grid-row: span 3; width: 34px; height: 34px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.swatch b, .swatch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-panel { margin-top: 14px; background: var(--warn-soft); border-color: transparent; }

.host-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; overflow-wrap: anywhere; }
.bd-log { margin: 8px 0 0; padding-left: 20px; max-height: 260px; overflow: auto; font-size: 13px; }
.bd-log li { margin: 3px 0; }
.bd-step details > summary { cursor: pointer; margin-top: 10px; }

.draft-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.draft { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.draft-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.draft-h > div:first-child { min-width: 0; }
.draft-a { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.draft-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.draft-f .input { flex: 1 1 220px; min-width: 0; }
.draft .art-meta { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.sec-outline { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.refs { display: flex; flex-wrap: wrap; gap: 10px; }
.ref { margin: 0; display: flex; flex-direction: column; gap: 6px; width: 150px; }
.ref img { width: 150px; height: 100px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); display: block; }
.ref-add { width: 150px; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 13px; border: 1.5px dashed var(--line-strong); border-radius: 6px; cursor: pointer; padding: 8px; }
.ref-add:hover { border-color: var(--fg); }
.ref-add .ic { width: 18px; height: 18px; }
.bulk { margin-top: 14px; }
.bulk > summary { cursor: pointer; font-weight: 500; }
.bulk > .vstack-s, .bulk > textarea, .bulk > .note { margin-top: 10px; }

.build-pages { list-style: none; margin: 10px 0 14px; padding: 0; }
.build-pages li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.build-pages li:first-child { border-top: 0; }
.checklist { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.checklist li.ok { color: var(--good); font-weight: 500; }

.comms { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.comms-list { padding: 0; overflow: hidden; position: sticky; top: 12px; }
.comms-tools { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.comms-tools .seg { align-self: flex-start; }
.comms-items { list-style: none; margin: 0; padding: 6px; max-height: 68vh; overflow: auto; }
.comms-items > li.muted { padding: 14px; }
.comms-item { width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; background: transparent; border: 0; border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; }
.comms-item:hover { background: var(--surface-2); }
.comms-item.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--fg); }
.ci-top { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.ci-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-top .small { flex-shrink: 0; }
.ci-subj { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comms-view { min-height: 320px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.comms-view.is-empty { align-items: center; justify-content: center; text-align: center; background: var(--surface-2); border-style: dashed; box-shadow: none; }
.mail-h { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.mail-h h3 { font-size: 18px; margin-bottom: 6px; overflow-wrap: anywhere; }
.mail-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; overflow-wrap: anywhere; }
.mail-body { overflow-wrap: anywhere; line-height: 1.6; }
.mail-body p { margin: 0 0 10px; }
.mail-body blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.reply-box { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }

.inbox { list-style: none; margin: 0; padding: 0; }
.inbox-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.inbox-row:first-child { border-top: 0; }
.ib-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ib-file { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; max-width: 460px; }
.ib-file select { width: auto; max-width: 200px; }
.set-row .nowrap { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 960px) {
  .comms { grid-template-columns: minmax(0, 1fr); }
  .comms-list { position: static; }
  .comms-items { max-height: 50vh; }
  .comms-view { scroll-margin-top: 12px; }
  .concept-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .inbox-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ib-file { justify-content: flex-start; max-width: none; }
}
@media (max-width: 620px) {
  .build-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .build-row .stepper-mini { grid-column: 1; }
  .build-row > .small { grid-column: 2; grid-row: 1; }
  .build-row > .st { grid-column: 2; grid-row: 2; justify-self: end; }
  .bd-stepper { margin-left: -4px; margin-right: -4px; }
  .bd-stepper a { flex: 0 0 auto; padding: 7px 10px; }
  .draft-h { flex-direction: column; }
  .draft-a { flex-wrap: wrap; }
  .build-pages li { grid-template-columns: minmax(0, 1fr) auto; }
  .build-pages li > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .build-pages li > .btn { grid-column: 2; grid-row: 1 / span 2; }
  .inline-f { flex-direction: column; align-items: stretch; }
  .ib-file select { flex: 1 1 140px; max-width: none; }
  .set-row { flex-direction: column; }
  .set-row .nowrap { justify-content: flex-start; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref, .ref img, .ref-add { width: calc(50vw - 46px); }
}
#cmContacts, #cmNT, #bdIdeaT, #bdPages, #cmRT { width: 100%; }
.lvl { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--low); vertical-align: middle; }
.lvl-critical { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.lvl-warning { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.lvl-medium { background: var(--warn); }
.lvl-info { background: var(--inc); box-shadow: 0 0 0 3px var(--inc-soft); }
.lvl-ok { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.lvl-off { background: transparent; border: 1.5px solid var(--line-strong); }
.al-ic .lvl { margin-top: 6px; }
.file-ic { display: inline-flex; color: var(--muted); }
.file-ic .ic { width: 16px; height: 16px; }
