/* SEO Command Center — an instrument panel for search visibility.
 * Two themes on one set of tokens: dark (ink navy) by default, light (cool paper). The theme follows the system unless
 * the person picks one (html[data-theme]). Fonts are self-hosted (the app's policy allows no third-party fonts): Inter
 * for reading, JetBrains Mono for figures, addresses and labels — the same faces as the branded reports. The one
 * signature is the survey grid: a faint dot field behind the workspace, the way a map-grid scan reads a town. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrainsmono.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  /* From the logo (2026-10-09): electric azure #0087fe, ultramarine #3614ff, lavender #8a7cfe, and the signal bars'
   * amber #ffae01 to orange #ff4e01. The ground is the deep indigo the logo glows on. */
  --bg: #080a1a; --panel: #0e1129; --panel2: #151a3b; --border: #232a57; --border-strong: #343c79;
  --text: #e9ecfb; --muted: #959cc6; --accent: #3d9bff; --accent2: #8a7cfe; --on-accent: #020816;
  --green: #34c77b; --red: #f2575c; --yellow: #ffb020; --on-yellow: #1a1204; --error: #b62324;
  --tint: rgba(61, 155, 255, .10); --hover: rgba(138, 124, 254, .06);
  --grid-dot: rgba(138, 124, 254, .12); --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(2, 3, 18, .38);
  --shadow-pop: 0 18px 48px rgba(2, 3, 18, .6);
  --brand-grad: linear-gradient(135deg, #1a6ff0 0%, #4a3cff 58%, #6f34e8 100%);
  --signal-grad: linear-gradient(180deg, #ffe702 0%, #ffae01 45%, #ff4e01 100%);
  --radius: 12px; --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5fc; --panel: #ffffff; --panel2: #eef0fa; --border: #dcdff2; --border-strong: #c3c8e6;
  --text: #11153a; --muted: #5b6190; --accent: #1462e0; --accent2: #4b33e6; --on-accent: #ffffff;
  --green: #16884a; --red: #cf3a3f; --yellow: #8a5200; --on-yellow: #ffffff; --error: #b42328;
  --tint: rgba(20, 98, 224, .08); --hover: rgba(17, 21, 58, .035);
  --brand-grad: linear-gradient(135deg, #1a6ff0 0%, #4a3cff 58%, #6d32e6 100%);
  --grid-dot: rgba(91, 97, 144, .15); --shadow: 0 1px 2px rgba(17, 21, 58, .05), 0 6px 18px rgba(17, 21, 58, .07);
  --shadow-pop: 0 18px 48px rgba(15, 24, 40, .18);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f5fc; --panel: #ffffff; --panel2: #eef0fa; --border: #dcdff2; --border-strong: #c3c8e6;
    --text: #11153a; --muted: #5b6190; --accent: #1462e0; --accent2: #4b33e6; --on-accent: #ffffff;
    --green: #16884a; --red: #cf3a3f; --yellow: #8a5200; --on-yellow: #ffffff; --error: #b42328;
    --tint: rgba(20, 98, 224, .08); --hover: rgba(17, 21, 58, .035);
    --brand-grad: linear-gradient(135deg, #1a6ff0 0%, #4a3cff 58%, #6d32e6 100%);
    --grid-dot: rgba(91, 97, 144, .15); --shadow: 0 1px 2px rgba(17, 21, 58, .05), 0 6px 18px rgba(17, 21, 58, .07);
    --shadow-pop: 0 18px 48px rgba(15, 24, 40, .18);
  }
}

* { box-sizing: border-box; margin: 0; }
html, body { background: var(--bg); }
body { color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.btn:hover, .nav a:hover, .tab:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.loading { padding: 4rem; text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; }
code, kbd, .mono { font-family: var(--font-mono); }

/* layout: a fixed instrument rail and a workspace over the survey grid */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--border); padding: 1.1rem .8rem; display: flex; flex-direction: column; gap: .2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { display: block; margin: 0 0 1.1rem; border-radius: 14px; }
.sidebar .logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The logo is drawn for a dark ground: it sits on its own deep-indigo plate in both themes, with the glow it was made with. */
.brand-plate { display: block; padding: .75rem .7rem .55rem; border-radius: 14px; border: 1px solid rgba(138, 124, 254, .22);
  background: radial-gradient(120% 95% at 50% 32%, #171b4e 0%, #0b0d27 55%, #05061a 100%);
  box-shadow: inset 0 0 26px rgba(74, 60, 255, .22), 0 6px 18px rgba(4, 6, 30, .28); }
.brand-plate img { display: block; width: 100%; height: auto; }
.brand-plate.plate-lg { max-width: 300px; margin: 0 auto; padding: 1.1rem 1.1rem .85rem; border-radius: 18px; }
.auth-card .auth-logo { margin: 0 0 1.1rem; font-size: inherit; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .8; margin: .9rem .7rem .35rem; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; position: relative; }
.nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: var(--tint); color: var(--text); }
/* The active page's marker is the logo's signal bar (amber to orange). */
.nav a.active::before { content: ""; position: absolute; left: -.8rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal-grad, var(--accent)); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.find-btn { display: flex; align-items: center; gap: .5rem; width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--muted); border-radius: var(--radius-sm); padding: .45rem .6rem; font: inherit; cursor: pointer; }
.find-btn:hover { border-color: var(--border-strong); color: var(--text); }
.find-btn svg { width: 15px; height: 15px; }
.find-btn kbd, .kbd { margin-left: auto; font-size: .66rem; padding: .08rem .35rem; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); background: var(--panel); }
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.theme-switch button { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: .74rem; padding: .32rem 0; border-radius: 6px; cursor: pointer; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--panel2); color: var(--text); box-shadow: var(--shadow); }
.main { flex: 1; min-width: 0; padding: 1.7rem 2.2rem 4rem; background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.3px); background-size: 22px 22px; background-attachment: fixed; }
.main > * { max-width: 1240px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
h1 { font-size: 1.6rem; font-weight: 750; letter-spacing: -.025em; line-height: 1.15; }
h2 { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; margin-bottom: .8rem; }
h3 { font-size: .95rem; font-weight: 650; }
.site-url { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: -.7rem 0 1.1rem; }

/* site tabs: one segmented rail */
.tabs { display: flex; gap: .15rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: .55rem .8rem; color: var(--muted); font-weight: 550; font-size: .86rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* cards / tables */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1rem; box-shadow: var(--shadow); overflow-x: auto; }
.card:has(details.menu) { overflow: visible; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-family: var(--font-mono); font-weight: 500; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: .55rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: var(--hover); }
.table-wrap { overflow-x: auto; }
.big { font-weight: 750; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* forms & buttons */
input, select, textarea { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: .55rem .7rem; font: inherit; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
label { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; margin: .8rem 0 .3rem; }
textarea { font-family: var(--font-mono); font-size: .8rem; min-height: 120px; }
.btn { display: inline-flex; align-items: center; gap: .35rem; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: .48rem .9rem; cursor: pointer; font: inherit; font-weight: 550; line-height: 1.25; transition: border-color .12s, background .12s, transform .06s; }
.btn:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--panel2) 80%, var(--text) 6%); }
.btn:active { transform: translateY(1px); }
/* Primary actions carry the logo's azure-to-violet sweep. */
.btn.primary { background: var(--brand-grad); border-color: transparent; color: #ffffff; font-weight: 650; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent2) 35%, transparent), 0 6px 20px color-mix(in srgb, var(--accent) 26%, transparent); }
.btn.primary:hover { background: var(--brand-grad); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent2) 55%, transparent), 0 8px 26px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.danger { color: var(--red); }
.btn.small { padding: .3rem .62rem; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: wait; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* inline controls keep their own width inside a row (forms stack full-width as before) */
.row > select { width: auto; min-width: 11rem; }

/* the client hub: one card per firm */
.site-card { transition: border-color .15s, transform .15s; }
.site-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.site-card > .row.spread { flex-wrap: nowrap; align-items: flex-start; }
.site-card h2 { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
.site-card h2 a { color: var(--text); }
.site-card h2 a:hover { color: var(--accent); text-decoration: none; }
.site-card > .row.spread > .row { flex-wrap: nowrap; flex-shrink: 0; }
.site-card-url { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); margin-bottom: .6rem; overflow-wrap: anywhere; }

/* the client overview: a dashboard (five measured figures, leads, what moved) */
.eyebrow { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dash-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; margin-bottom: .9rem; }
.dash-strip .card { margin-bottom: 0; }
.dtile { display: flex; flex-direction: column; gap: .35rem; min-height: 170px; position: relative; }
.dt-head { display: flex; justify-content: space-between; align-items: flex-start; min-height: 36px; }
.dt-val { display: flex; align-items: baseline; gap: .15rem; flex-wrap: wrap; }
.dt-val .big { font-size: 2.1rem; }
.dt-unit { color: var(--muted); font-size: .82rem; font-weight: 500; }
.dt-sub { color: var(--muted); font-size: .8rem; margin-top: auto; }
.dt-at { font-family: var(--font-mono); font-size: .66rem; color: var(--muted); opacity: .85; letter-spacing: .02em; }
.nm { color: var(--muted); font-size: .95rem; font-weight: 500; }
.ring { width: 36px; height: 36px; transform: rotate(-90deg); flex-shrink: 0; }
.ring circle { fill: none; stroke-width: 3.2; }
.ring-bg { stroke: var(--border); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--accent) 45%, transparent)); }
.mini-bars { display: grid; gap: .22rem; margin: .1rem 0 .2rem; }
.mb-row { display: grid; grid-template-columns: 3.6rem 1fr 1.8rem; align-items: center; gap: .4rem; font-size: .7rem; color: var(--muted); }
.mb-row b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.mb-track { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.mb-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: .9rem; margin-bottom: .9rem; }
.dash-cols .card { margin-bottom: 0; }
.dash-big { font-size: 2.4rem; }
.dash-big.accent { color: var(--accent); }
.spark { width: 100%; height: 44px; display: block; }
.spark rect { fill: color-mix(in srgb, var(--accent) 35%, var(--panel2)); }
.spark rect.now { fill: var(--accent); }
.moved-line { font-size: 1rem; font-weight: 600; line-height: 1.4; margin: .55rem 0 .3rem; }
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }

/* the Client Hub as a dashboard: the fleet strip, what needs attention, each card's figures */
.hub-strip { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.hub-tile { min-height: 118px; }
.hub-tile .dt-val .big { font-size: 1.9rem; }
.hub-tile.warn { border-color: color-mix(in srgb, var(--yellow) 55%, var(--border)); }
.hub-tile.warn .big { color: var(--yellow); }
.hub-tile.ok .big { color: var(--green); }
.attn { padding-top: .9rem; }
.attn-row { display: flex; gap: .8rem; align-items: baseline; padding: .5rem .2rem; border-top: 1px solid var(--border); color: var(--text); }
.attn-row:hover { background: var(--hover); text-decoration: none; }
.attn-row b { flex: 0 0 auto; min-width: 12rem; }
.attn-row span { color: var(--yellow); font-size: .82rem; }
.hub-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .8rem; }
.hm { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .35rem .45rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.hm-l { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hm b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.hm b.nm { color: var(--muted); font-weight: 500; }
.hm-flag { font-style: normal; font-family: var(--font-mono); font-size: .58rem; color: var(--yellow); margin-left: .3rem; letter-spacing: .06em; text-transform: uppercase; }
.site-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; font-family: var(--font-mono); font-size: .66rem; color: var(--muted); }
.attn-dot { color: var(--yellow); background: color-mix(in srgb, var(--yellow) 14%, transparent); border-radius: 20px; padding: .05rem .45rem; font-family: var(--font-mono); font-size: .66rem; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 600px) { .attn-row { flex-direction: column; gap: .15rem; } .attn-row b { min-width: 0; } }

/* menus: a labelled group of actions behind one button */
.actionbar { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: 1rem; }
.actionbar .sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 .2rem; }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .25rem; opacity: .7; }
details.menu[open] > summary { border-color: var(--accent); background: var(--tint); }
details.menu:has(.menu-list button:disabled) > summary::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.menu-list { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; min-width: 250px; padding: .35rem; background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 1px; animation: pop .12s ease-out; }
.menu-list.right { left: auto; right: 0; }
.menu-list .btn, .menu-list a.btn { width: 100%; justify-content: flex-start; background: transparent; border-color: transparent; font-weight: 500; padding: .45rem .6rem; text-align: left; white-space: nowrap; }
.menu-list .btn:hover { background: var(--hover); border-color: transparent; }
.menu-list .menu-note { font-size: .74rem; color: var(--muted); padding: .35rem .6rem .2rem; font-family: var(--font-mono); letter-spacing: .04em; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* command palette */
dialog.palette { width: min(620px, 94vw); padding: 0; top: 12vh; margin: 0 auto auto; overflow: hidden; box-shadow: var(--shadow-pop); }
.palette-input { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.palette-input svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.palette-input input { border: 0; background: transparent; padding: 0; font-size: 1rem; box-shadow: none !important; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: .35rem; }
.palette-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.palette-item .where { margin-left: auto; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.palette-item[aria-selected="true"] { background: var(--tint); box-shadow: inset 2px 0 0 var(--accent); }
.palette-empty { padding: 1.2rem; color: var(--muted); text-align: center; }
.palette-foot { display: flex; gap: 1rem; padding: .5rem 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .72rem; }

/* badges */
.badge { display: inline-flex; align-items: center; padding: .12rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 600; letter-spacing: .01em; background: var(--panel2); color: var(--muted); }
.badge.eligible { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.badge.skipped_short, .badge.pending { background: color-mix(in srgb, var(--yellow) 15%, transparent); color: var(--yellow); }
.badge.analyzed { background: color-mix(in srgb, var(--accent2) 16%, transparent); color: var(--accent2); }
.badge.applied { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.badge.reviewed { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.badge.error, .badge.failed { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.badge.type { background: var(--panel2); color: var(--muted); }
.badge.measured { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.badge.assessed { background: transparent; border: 1px solid var(--yellow); color: var(--yellow); }

/* login */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.3px); background-size: 22px 22px; }
.auth-card { width: min(390px, 100%); }
.auth-card h1 { margin-bottom: .3rem; }
.auth-card p { color: var(--muted); margin-bottom: 1rem; }

/* suggestion review */
.sugg { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .9rem; overflow: hidden; background: var(--panel); }
.sugg-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; background: var(--panel2); cursor: pointer; gap: .8rem; }
.sugg-body { padding: 1rem; display: none; }
.sugg.open .sugg-body { display: block; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .8rem; }
.diff .col { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .8rem; }
.diff .col h4 { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.diff .col.new { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); }
.kv { margin-bottom: .45rem; }
.kv b { color: var(--muted); font-size: .74rem; display: block; }
pre { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; overflow-x: auto; font-family: var(--font-mono); font-size: .76rem; max-height: 320px; }
.muted { color: var(--muted); } .small { font-size: .8rem; }
.msg { padding: .6rem .9rem; border-radius: var(--radius-sm); margin-bottom: .9rem; font-size: .85rem; border: 1px solid transparent; }
.msg.ok { background: color-mix(in srgb, var(--green) 12%, transparent); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green); }
.msg.err { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); }
.progress { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin: .6rem 0; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .3s; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 1.4rem; width: min(560px, 92vw); margin: auto; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-pop); } /* margin: the reset above took away the browser's centring of a modal */
dialog::backdrop { background: rgba(5, 9, 18, .6); backdrop-filter: blur(3px); }
.checkbox-row { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.checkbox-row input { width: auto; accent-color: var(--accent); }
.scroll { max-height: 320px; overflow: auto; }

/* Page scores and the improvement dialog */
.score-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.score-chip { display: inline-flex; gap: .3rem; align-items: baseline; padding: .1rem .45rem; border: 1px solid var(--border); border-radius: 20px; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.score-chip b { font-size: .8rem; font-variant-numeric: tabular-nums; }
.score-chip.none b { color: var(--muted); }
dialog.improve { width: min(860px, 94vw); max-height: 92vh; overflow-y: auto; }
.score-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.score-tile { background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .7rem; }
.score-big { font-size: 1.9rem; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.imp { border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .8rem; margin: .5rem 0; }
.imp.skipped { opacity: .65; }
.imp-head { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; }
.imp-head input { margin-top: .25rem; }
.imp-body { display: grid; gap: .45rem; margin-top: .5rem; font-size: .9rem; }
.imp-pass { padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.imp-actions { position: sticky; bottom: -1.4rem; background: var(--panel); padding: .6rem 0; gap: .4rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: .6rem; }
.draft { background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; }
.draft.warn { border-color: var(--yellow); }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .3rem 0; }
.ba-text { white-space: pre-wrap; word-break: break-word; }
.ba-text.new { color: var(--green); }
.draft-img { display: block; max-width: 320px; width: 100%; border-radius: 6px; margin: .4rem 0; }
.draft-detail { max-height: 320px; overflow: auto; font-size: .75rem; white-space: pre-wrap; word-break: break-word; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: .5rem; }
.imp-head input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: .25rem 0 0; }
.imp-head > span { flex: 1 1 auto; }
.imp-head > .who { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; border: 1px solid; }
.who.ai { color: var(--accent); border-color: var(--accent); }
.who.person { color: var(--on-yellow); background: var(--yellow); border-color: var(--yellow); }
.who.assigned { color: var(--text); border-color: var(--border); background: var(--panel2); }
.imp.by-person { border-left: 4px solid var(--yellow); }
.imp > .row > .imp-head { flex: 1 1 0; min-width: 0; }

/* Movement in the "What moved" cards: a gain, a loss. */
.good { color: var(--green); }
.bad { color: var(--red); }

/* Get help from AI: the floating button and the panel */
#help-fab { position: fixed; right: 18px; bottom: 18px; z-index: 900; box-shadow: var(--shadow-pop); }
#help-panel { position: fixed; right: 18px; bottom: 66px; width: min(420px, 94vw); max-height: 72vh; display: flex; flex-direction: column; z-index: 901; background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: .7rem; }
#help-panel[hidden] { display: none; }
#help-panel .hp-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
#help-panel .hp-head span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#help-thread { overflow: auto; flex: 1; display: flex; flex-direction: column; gap: .4rem; margin: .3rem 0; }
.hp-msg { padding: .5rem .6rem; border-radius: var(--radius-sm); font-size: .92rem; line-height: 1.4; }
.hp-user { background: var(--panel2); align-self: flex-end; max-width: 92%; }
.hp-ai { background: var(--tint); border: 1px solid var(--border); }
.hp-caution { margin-top: .4rem; color: var(--yellow); font-size: .85rem; }
.hp-actions { margin-top: .5rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.hp-actions ol { margin: .2rem 0 .4rem 1.2rem; padding: 0; }
#help-form textarea { width: 100%; box-sizing: border-box; }
.hp-flash { outline: 3px solid var(--yellow) !important; outline-offset: 2px; transition: outline .2s; }

/* responsive */
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .logo { width: 170px; margin: 0 0 .6rem; } .sidebar .brand-plate { padding: .45rem .45rem .35rem; border-radius: 11px; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav-label { display: none; } .nav a.active::before { display: none; }
  .rail-foot { flex-direction: row; flex-wrap: wrap; align-items: center; border-top: 0; padding-top: .3rem; } .theme-switch { flex: 1 1 170px; max-width: 220px; }
  .find-btn { width: auto; flex: 0 0 auto; } .find-btn kbd { display: none; }
  .main { padding: 1.2rem 1rem 3rem; }
  .diff { grid-template-columns: 1fr; }
}
/* Phone: tap targets at least ~40px, the tab row scrolls instead of wrapping into a wall, tables scroll. */
@media (max-width: 600px) {
  .btn.small { padding: .55rem .8rem; font-size: .85rem; } .btn { min-height: 40px; } td .row, td .btn { gap: .5rem; }
  .table-wrap { overflow-x: auto; } dialog { width: 96vw !important; max-width: 96vw; padding: .8rem; }
  .score-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ba { grid-template-columns: 1fr; }
  .menu-list { position: fixed; left: 8px !important; right: 8px !important; top: auto; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Icon-only buttons (a run's view / recheck) and the change since the previous check. */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: .36rem .5rem; line-height: 0; }
.icon-btn svg { width: 16px; height: 16px; }
.run-actions { white-space: nowrap; text-align: right; }
.run-actions .icon-btn + .icon-btn { margin-left: .35rem; }
.trend { display: inline-flex; align-items: baseline; gap: .3rem; margin-top: .3rem; padding: .1rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.trend span { font-weight: 500; opacity: .85; }
.trend.up { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.trend.down { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.trend.flat { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }

/* Keyword tracking: pick rows, edit and remove them; the actions stay in view when the table scrolls sideways. */
.kw-pick { width: 30px; padding-right: 0 !important; }
.kw-cell { min-width: 200px; }
.kw-pick input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.kw-actions { position: sticky; right: 0; z-index: 1; white-space: nowrap; text-align: right; background: var(--panel); box-shadow: -10px 0 10px -10px rgba(0, 0, 0, .45); }
.kw-actions .icon-btn + .icon-btn { margin-left: .3rem; }
.kw-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .7rem; padding: .5rem .7rem; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--tint); }
.kw-bulk[hidden] { display: none; }
.kw-bulk .btn svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: .2rem; }
.kw-inline { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; min-width: 320px; }
.kw-inline-text { flex: 1 1 180px; min-width: 160px; }
.kw-dialog { width: min(760px, calc(100vw - 32px)); }
.kw-dialog label { display: flex; flex-direction: column; gap: .2rem; }
.kw-dialog-list { max-height: 50vh; overflow-y: auto; display: grid; gap: .4rem; margin-top: .6rem; }
.kw-dialog-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: .5rem; align-items: center; }
.kw-was { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .kw-dialog-row { grid-template-columns: 1fr; } }

.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; }

/* A card that folds to its header (Find keywords). */
.card-collapse > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.card-collapse > summary::-webkit-details-marker { display: none; }
.card-collapse-title { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.card-collapse-title::before { content: ""; width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; align-self: center; }
.card-collapse[open] > summary .card-collapse-title::before { transform: rotate(45deg); }
.card-collapse > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-sm); }
.card-collapse:not([open]) > summary .card-collapse-title .muted { display: inline; }
.card-collapse[open] > summary .card-collapse-title .muted { display: none; }
.card-collapse[open] > summary { margin-bottom: .4rem; }
@media (prefers-reduced-motion: reduce) { .card-collapse-title::before { transition: none; } }
/* Topic chips: one line each; the checkbox keeps its own size (the page's inputs are full width). */
.kr-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; margin: 0; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; white-space: nowrap; color: var(--text); font-size: .85rem; }
.kr-chip input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.kr-chip:has(input:checked) { border-color: var(--accent); background: var(--tint); }

.kw-export { gap: .4rem; margin-bottom: .6rem; justify-content: flex-end; }

/* A page under SEO & AI (Keyword tracking, This week): its own title under the site's tabs and menus. */
.page-head { margin: .2rem 0 .9rem; }
.page-head h2 { margin: 0 0 .2rem; }

/* Reports, grouped the same way in the Plan & reports menu and on the Overview. */
.report-group + .report-group { margin-top: .55rem; }
.report-group-label { font: 600 .66rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .3rem .1rem; }
.report-group-items { display: flex; flex-wrap: wrap; gap: .35rem; }
.reports-menu .report-group-items { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.reports-menu .menu-list { min-width: 17rem; }
.reports-menu .report-pair { display: flex; gap: .3rem; }
.reports-menu .report-pair > a:first-child { flex: 1; }
.report-pair { display: inline-flex; gap: .3rem; }
.report-none { opacity: .6; cursor: default; }
.reports-list { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--border); }

/* Search & traffic (Search Console + GA4) on the Overview; Google accounts in Settings. */
.search-head { margin: .2rem 0 .55rem; }
.search-head h3 { margin: 0; }
.search-connect { margin-bottom: .9rem; }
.mini-table { width: 100%; font-size: .82rem; margin-top: .4rem; }
.mini-table td, .mini-table th { padding: .3rem .4rem; }
.mini-table td.num, .mini-table th.num { text-align: right; white-space: nowrap; }
.g-steps { margin: .5rem 0 .6rem 1.1rem; padding: 0; line-height: 1.5; }
.g-steps li + li { margin-top: .35rem; }
a.btn.disabled { opacity: .5; pointer-events: none; }

/* Not available on this site's platform (Darin, 2026-10-08: "grayed out or marked with a red X"): shown, never offered. */
/* Grayed by colour, never by opacity or a filter: those would gray the red X inside it too. */
.na, .na:hover { color: var(--muted) !important; cursor: not-allowed; }
/* A button keeps its own 1px border, dashed; a row or a checkbox gets no border it never had. */
.btn.na, .btn.na:hover { background: transparent !important; border-style: dashed !important; box-shadow: none !important; }
.na-x { color: var(--red) !important; font-weight: 800; margin-right: .3em; }
.imp-head > .who.na-who { color: var(--red); background: transparent; border-color: var(--red); }
.na-note { color: var(--red); }

/* ✨ An example of a person's change (Improve): a model, set apart from what was measured. */
.imp-example { margin: .5rem 0; padding: .6rem .75rem; border-left: 3px solid var(--accent, #22d3ee); background: color-mix(in srgb, var(--accent, #22d3ee) 8%, transparent); border-radius: 6px; }
.imp-example-text { white-space: pre-wrap; margin: .35rem 0; line-height: 1.5; }

/* ✎ The page editor */
dialog.editor-dialog { width: min(980px, 96vw); }
.ed-toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: .3rem; padding: .45rem; margin: .4rem 0; background: var(--panel, var(--bg)); border: 1px solid var(--border, #2a3446); border-radius: 8px; }
.ed-blocks { display: grid; gap: .5rem; max-height: 58vh; overflow: auto; padding-right: .3rem; }
.ed-block { display: grid; grid-template-columns: 7.5rem 1fr; gap: .6rem; padding: .45rem .5rem; border: 1px solid var(--border, #2a3446); border-radius: 8px; }
.ed-side { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.ed-body { min-height: 1.6rem; padding: .3rem .45rem; border-radius: 6px; outline: none; line-height: 1.55; }
.ed-body:focus { box-shadow: 0 0 0 2px var(--accent); }
.ed-body h2, .ed-body h3, .ed-body h4 { margin: .2rem 0; }
.ed-body p { margin: .2rem 0; }
.ed-dirty { border-color: var(--accent); }
.ed-new { border-style: dashed; border-color: var(--accent); }
.ed-removed { opacity: .45; text-decoration: line-through; }
.ed-locked, .ed-img { grid-template-columns: 1fr; color: var(--muted); }
.ed-img img { max-width: 220px; max-height: 140px; border-radius: 6px; display: block; margin: .3rem 0; }
.ed-review { margin-top: .8rem; padding: .7rem; border: 1px solid var(--accent); border-radius: 8px; }
.ed-change { padding: .35rem 0; border-bottom: 1px solid var(--border, #2a3446); }
.ed-before { color: var(--muted); }
.ed-actions { margin-top: .8rem; align-items: center; gap: .5rem; }
@media (max-width: 640px) { .ed-block { grid-template-columns: 1fr; } .ed-side { flex-direction: row; } }
.ed-warn { color: var(--yellow, #e0b341); margin-top: .25rem; grid-column: 1 / -1; }
