/* SEO Reports — compact SaaS design system (Inter, neutral greys, teal accent)
   1 tokens · 2 base · 3 layout · 4 components · 5 pages · 6 report · 7 analyst · 8 utilities · 9 print */

/* ------------------------------------------------------------------ 1. tokens */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/inter-latin.woff2") format("woff2"); }

:root {
  --bg: #F7F8FA; --paper: #FFFFFF; --sunk: #F3F4F6; --sunk-2: #E9EBEF;
  --ink: #0B1220; --ink-2: #344054; --muted: #667085; --faint: #98A2B3;
  --line: #E4E7EC; --line-2: #EEF0F3; --line-strong: #D0D5DD; --row: #FAFBFC; --head: #F9FAFB;
  --accent: #0F766E; --accent-ink: #0B5952; --accent-soft: #E7F4F1;
  --gold: #B7862C; --gold-ink: #7A5714; --gold-soft: #FBF3E3;
  --red: #B4412F; --red-ink: #8A2E20; --red-soft: #FBECE8;
  --ig: #8A3FA3; --ig-soft: #F6EEF9;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px -4px rgba(16, 24, 40, .08);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .04), 0 16px 40px -12px rgba(16, 24, 40, .18);
  --ring: 0 0 0 3px rgba(15, 118, 110, .16);
}

/* ------------------------------------------------------------------ 2. base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.55 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--ink); font-weight: 600; }
h1, h2 { letter-spacing: -0.02em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; letter-spacing: -0.01em; }
h4 { font-size: 13.5px; }
p { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
code { background: var(--sunk); padding: 2px 6px; border-radius: 5px; font: 12.5px var(--mono); word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ------------------------------------------------------------------ 3. layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 72px; }
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; height: 56px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.mark { position: relative; width: 24px; height: 24px; border-radius: 7px; flex: none; background: var(--ink); }
.mark::after { content: ""; position: absolute; inset: 7px; border-radius: 3px; background: var(--accent); }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13.5px; padding: 6px 10px; border-radius: var(--r-sm);
  transition: background .15s, color .15s; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.active { background: var(--sunk); color: var(--ink); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: 999px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--sunk); }
.menu-body { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 4px; z-index: 50; }
.menu-body a, .menu-body button { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--r-sm); border: 0;
  background: none; color: var(--ink); font: 500 13.5px var(--sans); text-decoration: none; cursor: pointer; }
.menu-body a:hover, .menu-body button:hover { background: var(--sunk); }
.menu-body .menu-head { padding: 8px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menu-body .menu-head strong { display: block; font-size: 13.5px; }
.menu-body .menu-head span { font-size: 12px; color: var(--muted); }
.avatar-i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink);
  font: 600 11.5px var(--sans); letter-spacing: .02em; }
.menu-name { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.mobile-nav { display: none; }

/* ------------------------------------------------------------------ 4. components */
/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 13.5px/1 var(--sans); padding: 9px 14px; min-height: 34px;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); background: var(--head); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #1D2939; border-color: #1D2939; color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ig { background: var(--ig); border-color: var(--ig); color: #fff; }
.btn-ig:hover { background: #73318A; border-color: #73318A; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--sunk); border-color: transparent; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #F3D1C9; color: var(--red-ink); }
.btn-sm { padding: 6px 10px; min-height: 28px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { padding: 11px 18px; min-height: 40px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); }
.inline { display: inline; margin: 0; }

/* forms */
label { display: grid; gap: 6px; font-weight: 500; font-size: 13px; color: var(--ink-2); }
label small, .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
input, select, textarea { font: 400 14px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 8px 11px; width: 100%; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="file"] { padding: 6px; background: var(--sunk); font-size: 13px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; box-shadow: none; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.short { min-height: 80px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio-row label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pw-field { position: relative; }
.pw-field input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted);
  font: 500 12px var(--sans); padding: 5px 8px; border-radius: var(--r-sm); cursor: pointer; }
.pw-toggle:hover { background: var(--sunk); color: var(--ink); }
.field-note { font-size: 12.5px; color: var(--muted); }
.alert { padding: 10px 12px; border-radius: var(--r-md); border: 1px solid transparent; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--red-soft); border-color: #F3D1C9; color: var(--red-ink); }
.alert-ok { background: var(--accent-soft); border-color: #CBE6DF; color: var(--accent-ink); }
.alert-warn { background: var(--gold-soft); border-color: #F0DFB9; color: var(--gold-ink); }

/* surfaces */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.panel > h2 { font-size: 16px; margin-bottom: 4px; }
.panel > .hint:first-of-type { margin-bottom: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; min-width: 0; box-shadow: var(--shadow-sm); }
.card > h3 + .hint { margin: 2px 0 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }

/* badges, chips, dots */
.badge { display: inline-flex; align-items: center; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.7; }
.badge.up { background: var(--accent-soft); color: var(--accent-ink); }
.badge.down { background: var(--red-soft); color: var(--red-ink); }
.badge.warn { background: var(--gold-soft); color: var(--gold-ink); }
.badge.flat { background: var(--sunk); color: var(--muted); }
.badge.ig { background: var(--ig-soft); color: var(--ig); }
.badge.ink { background: var(--ink); color: #fff; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot.warn { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.dot.off { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.eyebrow { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(22px, 2.4vw, 26px); margin-top: 8px; }
.page-head .lede { margin-top: 6px; color: var(--muted); font-size: 14px; max-width: 72ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 500 11.5px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--head); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td { background: var(--row); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .page { max-width: 360px; }
.table .page small, .table small.sub { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.table-wrap { overflow-x: auto; }
.wrap > .table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.table-wrap.card { padding: 0; }
.wrap > .table-wrap .table th:first-child, .wrap > .table-wrap .table td:first-child,
.table-wrap.card .table th:first-child, .table-wrap.card .table td:first-child { padding-left: 16px; }
.wrap > .table-wrap .table th:last-child, .wrap > .table-wrap .table td:last-child,
.table-wrap.card .table th:last-child, .table-wrap.card .table td:last-child { padding-right: 16px; }
.scroll { max-height: 420px; overflow: auto; }
.scroll.sm { max-height: 320px; }
.scroll .table th { position: sticky; top: 0; z-index: 1; }
.filter { max-width: 300px; margin: 4px 0 12px; padding: 7px 10px; font-size: 13px; }

/* toasts */
.toasts { position: fixed; top: 68px; right: 20px; z-index: 60; display: grid; gap: 8px; width: min(400px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); padding: 11px 12px 11px 14px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toast-in .2s ease-out; }
.toast-error { border-left-color: var(--red); }
.toast p { flex: 1; }
.toast-close { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* popovers and dialogs */
.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop[open] > summary { border-color: var(--line-strong); background: var(--head); }
.pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(360px, 92vw); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 10px; }
.pop-body .check { margin: 0; }
dialog.dialog { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; width: min(420px, 92vw); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.dialog::backdrop { background: rgba(16, 24, 40, .4); backdrop-filter: blur(2px); }
dialog.dialog h2 { font-size: 17px; margin-bottom: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-value { font: 600 24px/1.15 var(--sans); letter-spacing: -0.02em; margin-top: 6px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* overlay while a report is built */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(247, 248, 250, .86); backdrop-filter: blur(6px); display: grid; place-items: center; }
.overlay-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 26px 28px;
  width: min(420px, 92vw); text-align: center; }
.overlay-card h2 { font-size: 17px; margin: 14px 0 4px; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; text-align: left; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--faint); }
.steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.steps li.on { color: var(--ink); }
.steps li.on::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ------------------------------------------------------------------ 5. pages */
/* sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-side { position: relative; overflow: hidden; background: var(--sunk); padding: 40px 48px;
  display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.auth-side .brand { font-size: 16px; }
.auth-side .pitch { margin: auto 0; max-width: 30rem; position: relative; z-index: 1; }
.auth-side h1 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -0.03em; }
.auth-side h1 em { font-style: normal; color: var(--accent); }
.auth-side .pitch > p { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 28rem; }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.features b { display: block; color: var(--ink); font-weight: 600; }
.feat-icon { width: 30px; height: 30px; flex: none; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--accent); box-shadow: var(--shadow-sm); }
.auth-foot { position: relative; z-index: 1; font-size: 12px; color: var(--muted); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(380px, 100%); }
.auth-card h2 { font-size: 24px; }
.auth-card .lede { color: var(--muted); margin: 6px 0 24px; }
.auth-card form { display: grid; gap: 16px; }
.auth-trust { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 20px; font-size: 12px; color: var(--muted); }

/* dashboard */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.dash-head h1 { font-size: clamp(22px, 2.4vw, 26px); margin-top: 8px; }
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 16px 0 32px; }
.setup-item { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 16px; box-shadow: var(--shadow-sm); }
.setup-item > div { flex: 1; min-width: 0; }
.setup-item strong { display: block; font-size: 14px; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.list-head h2 { font-size: 17px; }
.search { position: relative; width: min(320px, 100%); }
.search input { padding-left: 34px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.client-card { display: flex; flex-direction: column; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.client-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.client-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.client-card h3 { font: 600 16px/1.25 var(--sans); letter-spacing: -0.01em; }
.client-card .site { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.sources { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sources li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--sunk);
  border-radius: 6px; padding: 3px 8px; }
.sources li.on { color: var(--ink-2); background: var(--accent-soft); }
.sources li .dot { width: 6px; height: 6px; box-shadow: none; }
.client-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0 0; border-top: 1px solid var(--line-2); font-size: 12.5px; }
.client-meta dt { color: var(--muted); }
.client-meta dd { margin: 2px 0 0; font-weight: 500; color: var(--ink-2); }
.client-card footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.client-card footer .pop { margin-left: auto; }
.warn-line { font-size: 12.5px; color: var(--gold-ink); background: var(--gold-soft); border-radius: var(--r-sm); padding: 7px 10px; }
.add-card { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 200px; border: 1px dashed var(--line-strong); background: transparent;
  box-shadow: none; color: var(--muted); text-decoration: none; font-weight: 500; }
.add-card:hover { color: var(--accent); border-color: var(--accent); background: var(--paper); }
.add-card span { font: 300 28px/1 var(--sans); }
.empty { text-align: center; padding: 56px 24px; }
.empty h2 { font-size: 20px; margin: 14px 0 6px; }
.empty .hint { max-width: 46ch; margin: 0 auto 20px; font-size: 14px; }

/* client form */
.form-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 28px; align-items: start; }
.form-nav { position: sticky; top: 80px; display: grid; gap: 2px; }
.form-nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 6px 10px; border-radius: var(--r-sm); border-left: 2px solid transparent; }
.form-nav a:hover { color: var(--ink); background: var(--sunk); }
.form-sections { display: grid; gap: 16px; }
.form-sections .panel { scroll-margin-top: 80px; }
.status-row { display: flex; gap: 12px; align-items: center; background: var(--sunk); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 16px; }
.status-row > div { flex: 1; min-width: 0; }
.savebar { position: sticky; bottom: 12px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px;
  padding: 12px 14px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }

/* users / account / activity */
.user-cell { display: flex; gap: 10px; align-items: center; }
.user-cell strong { display: block; font-weight: 600; }
.activity { list-style: none; padding: 0; margin: 0; display: grid; }
.activity li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); font-size: 12.5px; }
.activity .who { color: var(--muted); }
.force-banner { margin-bottom: 18px; }

/* backlinks */
.score-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 6px 0 14px; }
.score-key div { background: var(--sunk); border-radius: var(--r-md); padding: 12px 14px; }
.score-key b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.score-key span { font-size: 12.5px; color: var(--muted); }
.link-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.link-row:last-of-type { border-bottom: 0; }
.link-row strong { display: block; font-size: 13.5px; }
.link-row small { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.link-row .why { color: var(--ink-2); }
.link-row .score { font: 600 15px var(--sans); }
.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font: 600 12.5px var(--sans); }
.grade.gA { background: var(--accent-soft); color: var(--accent-ink); }
.grade.gB { background: #E8F1EF; color: #2F6E68; }
.grade.gC { background: var(--gold-soft); color: var(--gold-ink); }
.grade.gD { background: var(--red-soft); color: var(--red-ink); }

/* ------------------------------------------------------------------ 6. report */
.report { display: grid; gap: 32px; }
.report-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.report-bar .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 30px 26px;
  box-shadow: var(--shadow-sm); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.hero-ig::before { background: var(--ig); }
.hero .who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.hero .who strong { font: 600 14px var(--sans); }
.hero .who span { color: var(--muted); font-size: 13px; }
.hero .headline { font: 600 clamp(20px, 2.3vw, 26px)/1.25 var(--sans); letter-spacing: -0.02em; margin: 14px 0 18px; max-width: 44ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); background: var(--sunk); border-radius: 6px; padding: 4px 10px; }
.hero .objective { margin-top: 18px; padding: 12px 14px; background: var(--sunk); border-radius: var(--r-md); font-size: 13.5px; max-width: 80ch; }
.hero .objective strong { display: block; font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.errors { background: var(--red-soft); color: var(--red-ink); border: 1px solid #F3D1C9; border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 4px; font-size: 13.5px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: clamp(17px, 1.7vw, 19px); }
.section-head p { color: var(--muted); font-size: 13px; }
.rsec > .card + .card, .rsec > .grid-2 + .card, .rsec > .card + .grid-2, .rsec > .kpis + .card, .rsec > .kpis + .grid-2,
.rsec > .strip + .grid-2, .rsec > .kpis + .strip, .rsec > .grid-2 + .grid-2 { margin-top: 14px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .value { font: 600 24px/1.15 var(--sans); letter-spacing: -0.02em; margin: 8px 0; }
.kpi .foot { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12px; color: var(--muted); }
.kpi.lead { background: var(--accent-soft); border-color: #CBE6DF; }
.kpi.lead.ig-lead { background: var(--ig-soft); border-color: #EAD6F0; }
.kpi.off .value { font: 600 14px var(--sans); color: var(--muted); margin: 10px 0 8px; }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.strip > div { padding: 14px 16px; border-right: 1px solid var(--line-2); }
.strip > div:last-child { border-right: 0; }
.strip b { display: block; font: 600 20px/1.15 var(--sans); letter-spacing: -0.02em; }
.strip span { font-size: 12px; color: var(--muted); }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.summary .box { background: var(--paper); border: 1px solid var(--line); border-top: 2px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.summary .box h3 { font: 600 14.5px var(--sans); margin-bottom: 8px; }
.summary ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.summary .improved { border-top-color: var(--accent); }
.summary .wrong { border-top-color: var(--red); }
.summary .results { border-top-color: var(--gold); }
.summary .none { list-style: none; color: var(--muted); }
.ai-note { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

.analysis { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-sm);
  font: 400 14.5px/1.7 var(--sans); color: var(--ink-2); columns: 2 360px; column-gap: 36px; }
.analysis p { margin: 0 0 12px; break-inside: avoid; }

.objectives { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.obj { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.obj h3 { margin: 8px 0 4px; font-size: 14.5px; }
.obj p { font-size: 13.5px; color: var(--ink-2); }

.work .ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.work .ticks li { display: flex; gap: 10px; font-size: 13.5px; }
.work .ticks li::before { content: "✓"; color: var(--accent); font-weight: 700; }

.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: plan; }
.plan-item { counter-increment: plan; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 18px 14px 54px; break-inside: avoid; box-shadow: var(--shadow-sm); }
.plan-item::before { content: counter(plan); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 6px;
  background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 12px var(--sans); }
.plan-issue { font-size: 12.5px; font-weight: 600; color: var(--gold-ink); margin-bottom: 4px; }
.plan-action { font-weight: 600; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }

.post-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0; }
.post-mini { flex: none; width: 104px; text-decoration: none; color: var(--muted); font-size: 12px; }
.post-mini img, .post-mini .ph { display: grid; place-items: center; width: 104px; height: 104px; border-radius: var(--r-md); object-fit: cover; background: var(--sunk);
  color: var(--muted); font-style: normal; font-weight: 600; }
.best { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.best.no-thumb { grid-template-columns: 1fr; }
.best img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--r-md); }
.best p { margin: 8px 0; font-size: 13.5px; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.mini-stats b { color: var(--ink); }
.chart { width: 100%; min-height: 200px; }
.foot-note { color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------------------------ 7. SEO opportunities and analyst */
.opp-top { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.health { display: grid; justify-items: center; text-align: center; gap: 6px; }
.health svg { width: 140px; height: 140px; }
.health .ring-bg { stroke: var(--sunk-2); }
.health .ring { stroke: var(--accent); transition: stroke-dashoffset .6s; }
.health .score { font: 700 36px var(--sans); letter-spacing: -0.02em; fill: var(--ink); }
.health .grade-label { font-weight: 600; }
.components { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; width: 100%; text-align: left; }
.components li { display: grid; grid-template-columns: 1fr 34px; gap: 4px 10px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.components li b { text-align: right; }
.components meter { grid-column: 1 / -1; width: 100%; height: 6px; }
meter::-webkit-meter-bar { background: var(--sunk-2); border: 0; border-radius: 99px; height: 6px; }
meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 99px; }
meter::-webkit-meter-suboptimum-value { background: var(--gold); border-radius: 99px; }
meter::-webkit-meter-even-less-good-value { background: var(--red); border-radius: 99px; }
.analyst-note { display: flex; flex-direction: column; gap: 12px; }
.analyst-note .forecast-row { margin-top: auto; }
.glance { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.glance li { display: flex; gap: 10px; align-items: center; background: var(--sunk); border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.glance b { font: 600 20px/1 var(--sans); color: var(--ink); min-width: 28px; }
.analyst-note blockquote { margin: 0; padding-left: 12px; border-left: 2px solid var(--accent); font: 500 15px/1.55 var(--sans); color: var(--ink); }
.forecast-row { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.forecast-row b { display: block; font: 600 18px var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.opp { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-sm); break-inside: avoid; }
.opp-head { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.opp h3 { font: 600 15px/1.35 var(--sans); }
.opp .evidence { font-size: 13.5px; color: var(--ink-2); }
.opp .action { font-size: 13.5px; }
.opp .action b, .opp .impact b { color: var(--ink); }
.opp .impact { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.cat { font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 7px; border-radius: 5px; }
.model-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 12px; }
.model-tabs button { border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font: 500 12.5px var(--sans); padding: 6px 12px; border-radius: var(--r-md); cursor: pointer; }
.model-tabs button:hover { background: var(--sunk); color: var(--ink); }
.model-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; box-shadow: var(--shadow-lg); border-radius: 999px; padding: 10px 16px; }
.chat { position: fixed; right: 16px; top: 16px; bottom: 16px; z-index: 70; width: min(420px, calc(100vw - 32px)); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1; }
.chat-head h2 { font-size: 16px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--head); }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; }
.msg p + p, .msg p + ul, .msg ul + p { margin-top: 8px; }
.msg ul { margin: 0; padding-left: 18px; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.err { align-self: flex-start; background: var(--red-soft); color: var(--red-ink); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font: 500 12.5px var(--sans); padding: 6px 10px; border-radius: var(--r-md); cursor: pointer; text-align: left; }
.suggest button:hover { border-color: var(--accent); color: var(--accent-ink); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--paper); }
.chat-form textarea { min-height: 40px; max-height: 140px; resize: none; }

/* ------------------------------------------------------------------ 7b. site audit and social */
.progress { height: 6px; background: var(--sunk-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; width: 2%; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.progress.indeterminate > span { width: 35% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.run-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0; }
.run-stats b { display: block; font: 600 22px/1.15 var(--sans); letter-spacing: -0.02em; }
.run-stats span { font-size: 12.5px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.filters label { font-size: 12px; }
.filters input, .filters select { padding: 6px 9px; font-size: 13px; min-width: 140px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; }
.sev { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; text-transform: capitalize; }
.sev::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sev.error::before { background: var(--red); } .sev.warning::before { background: var(--gold); } .sev.notice::before { background: var(--faint); }
.sev-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sev-tile { border-radius: var(--r-lg); padding: 14px 16px; background: var(--sunk); text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.sev-tile b { display: block; font: 600 24px/1.1 var(--sans); letter-spacing: -0.02em; }
.sev-tile.error { background: var(--red-soft); } .sev-tile.warning { background: var(--gold-soft); }
.sev-tile span { font-size: 12.5px; color: var(--ink-2); }
pre.code { background: var(--ink); color: #E4E7EC; border-radius: var(--r-md); padding: 12px 14px; font: 12.5px/1.5 var(--mono); overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
textarea.code { font: 12.5px/1.5 var(--mono); min-height: 420px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.outline { list-style: none; padding: 0; margin: 0; font-size: 13.5px; display: grid; gap: 4px; }
.outline li { color: var(--ink-2); }
.outline .lvl { display: inline-block; min-width: 30px; font-weight: 600; color: var(--accent); font-size: 12px; }
.score-hero { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: center; }
.tabs-row { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs-row a { text-decoration: none; padding: 6px 12px; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; background: var(--paper); }
.tabs-row a:hover { background: var(--sunk); color: var(--ink); }
.tabs-row a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 760px) { .score-hero { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; } .sev-tiles { grid-template-columns: 1fr; } }

/* social planner */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.asset { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.asset .media { position: relative; aspect-ratio: 1 / 1; background: var(--sunk); display: grid; place-items: center; overflow: hidden; }
.asset .media img, .asset .media video { width: 100%; height: 100%; object-fit: cover; }
.asset .media .badge { position: absolute; top: 8px; left: 8px; }
.asset .body { padding: 10px 12px 12px; display: grid; gap: 8px; font-size: 13px; }
.asset .body p { color: var(--ink-2); }
.asset details summary { cursor: pointer; font-weight: 500; font-size: 12.5px; color: var(--accent); }
.asset form { display: grid; gap: 8px; margin-top: 8px; }
.asset textarea { min-height: 76px; font-size: 13px; }
.dropzone { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 18px; background: var(--paper); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-head { padding: 8px 10px; font: 500 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--head); }
.cal-day { min-height: 108px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-size: 12px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--row); color: var(--faint); }
.cal-day .num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; font-weight: 500; }
.cal-day.today .num { background: var(--ink); color: #fff; }
.cal.week .cal-day { min-height: 340px; }
.cal-post { display: flex; gap: 6px; align-items: center; margin-top: 4px; padding: 4px 6px; border-radius: 6px; background: var(--sunk); color: var(--ink);
  text-decoration: none; border-left: 2px solid var(--faint); overflow: hidden; }
.cal-post img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; flex: none; }
.cal-post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-post.scheduled { border-left-color: var(--accent); } .cal-post.published { border-left-color: #2BA597; background: var(--accent-soft); }
.cal-post.failed { border-left-color: var(--red); background: var(--red-soft); } .cal-post.draft { border-left-color: var(--gold); }
.post-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); scroll-margin-top: 80px; }
.post-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; align-content: start; }
.post-media img, .post-media video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--sunk); }
.post-media .empty-media { grid-column: 1 / -1; aspect-ratio: 1; border: 1px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12.5px; padding: 10px; }
.asset-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: 250px; overflow: auto; padding: 4px; }
.asset-pick label { position: relative; display: block; font-weight: 400; }
.asset-pick input { position: absolute; top: 6px; left: 6px; z-index: 1; }
.asset-pick img, .asset-pick .vid { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); border: 2px solid transparent; background: var(--sunk); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.asset-pick input:checked + img, .asset-pick input:checked + .vid { border-color: var(--accent); }
.channel-status { display: grid; gap: 8px; }
.channel-status .ch { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-md); background: var(--sunk); font-size: 13.5px; }
.channel-status .ch.published { background: var(--accent-soft); }
.channel-status .ch.failed { background: var(--red-soft); }
.channel-status .ch small { flex-basis: 100%; color: var(--ink-2); }
.stat-link { text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.stat-link:hover { border-color: var(--line-strong); color: var(--ink); }
.stat-link.active { border-color: var(--ink); box-shadow: var(--shadow-md); }
.day-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.day-row:last-child { border-bottom: 0; }
.day-row img, .day-thumb { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--sunk); flex: none; }
.day-time { font: 600 16px var(--sans); min-width: 56px; }
.cal-day a.num { text-decoration: none; color: inherit; }
.cal-day a.num:hover { background: var(--sunk); }
.nav .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600; }
.channel-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.channel-row:last-child { border-bottom: 0; }
.channel-row > div { flex: 1; }
@media (max-width: 760px) { .post-card { grid-template-columns: 1fr; } .cal-day { min-height: 80px; padding: 4px; } .cal-post span { display: none; } }

/* ------------------------------------------------------------------ 8. utilities */
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; } .mt-5 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.end { justify-content: flex-end; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
  .wrap { padding: 24px 20px 64px; }
  .topbar-in { padding: 0 20px; gap: 16px; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 24px 32px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-side .pitch { margin: 28px 0 4px; }
  .auth-foot { display: none; }
  .form-layout { grid-template-columns: 1fr; }
  .form-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .opp-top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav, .menu-name { display: none; }
  .mobile-nav { display: block; margin-left: auto; }
  .topbar-in { gap: 12px; }
}
@media (max-width: 640px) {
  .wrap { padding: 20px 14px 72px; }
  .topbar-in { height: 52px; padding: 0 14px; }
  .panel { padding: 16px 14px; }
  .card { padding: 14px; }
  .hero { padding: 22px 18px 20px; }
  .client-card { padding: 16px; }
  .client-meta { grid-template-columns: 1fr; }
  .strip > div { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .strip > div:last-child { border-bottom: 0; }
  .best { grid-template-columns: 1fr; }
  .activity li { grid-template-columns: 1fr; gap: 2px; }
  .savebar { flex-direction: column-reverse; align-items: stretch; }
  .filters > label { flex: 1 1 140px; }
  .filters input, .filters select { min-width: 0; }
  .page-head { margin-bottom: 18px; }
  .chat-fab { right: 16px; bottom: 16px; }
  .toasts { top: 60px; right: 16px; }
}

/* ------------------------------------------------------------------ 9. print */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12.5px; }
  .topbar, .toasts, .report-bar, .filter, .pop, .chat, .chat-fab, .overlay, .no-print, .model-tabs { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .report { gap: 24px; }
  .hero, .card, .kpi, .panel, .summary .box, .obj, .opp, .plan-item, .strip, .analysis { box-shadow: none; }
  .card, .kpi, .obj, .opp, .plan-item, .summary .box, .link-row, .strip { break-inside: avoid; }
  .section-head { break-after: avoid; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .scroll { max-height: none; overflow: visible; }
  .analysis { columns: 1; }
  .rsec[hidden] { display: none !important; }
  [data-model-panel] { display: block !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
