/* BringOn SEO — interface styles. Brand follows BringOn SMM OS: deep indigo rail, BringOn blue accent, Plus Jakarta Sans.
   Status colours keep Search Console's language: green = indexed, amber = not indexed, red = problem.
   Type: Plus Jakarta Sans (headings, text, figures), IBM Plex Mono (URLs only). */

@font-face { font-family: "Jakarta"; src: url("/fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #f5f6fb;        /* page */
  --surface: #ffffff;      /* panels */
  --sunken: #f0f1f9;       /* wells, code, inputs hover */
  --ink: #12142f;          /* text */
  --muted: #4a4f6e;
  --faint: #5f6483;
  --line: #e4e6f1;
  --line-strong: #c9cce3;
  --forest: #10123a;       /* sidebar rail (BringOn) */
  --forest-2: #1d2063;
  --forest-ink: #d9dbf5;
  --forest-muted: #9ea2d6;
  --accent: #1d1ab3;       /* BringOn blue: primary buttons, selected tabs */
  --accent-hover: #16148f;
  --accent-soft: #ecedfd;
  --marigold: #f7ad0f;
  --ok: #1d7139;   --ok-soft: #e1f2e6;
  --warn: #8f5d00; --warn-soft: #fcefd2;
  --bad: #b42318;  --bad-soft: #fde3e0;
  --queue: #2560bd; --queue-soft: #e0eafa;
  --idle: #9ea2bd; --idle-soft: #e6e8f4;
  --focus: #1d1ab3;
  --radius-s: 6px; --radius: 10px; --radius-l: 14px;
  --shadow: 0 1px 2px rgb(18 20 47 / 6%), 0 4px 16px -8px rgb(18 20 47 / 14%);
  --display: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0c1f; --surface: #131530; --sunken: #1a1d3d; --ink: #e8e9f8; --muted: #a9acd0; --faint: #8a8db5;
    --line: #262a52; --line-strong: #353a6b; --forest: #080922; --forest-2: #1a1d4f; --forest-ink: #d9dbf5; --forest-muted: #9ea2d6;
    --accent: #8b8eff; --accent-hover: #a3a6ff; --accent-soft: #23265a; --marigold: #f7ad0f;
    --ok: #5cc98a; --ok-soft: #14321f; --warn: #f0b54a; --warn-soft: #3a2c10; --bad: #f58a7e; --bad-soft: #3f1915;
    --queue: #86a6ff; --queue-soft: #1b2649; --idle: #6a6e95; --idle-soft: #1e2142; --focus: #8b8eff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px -10px rgb(0 0 0 / 50%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- icons ---- */
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.s { width: 16px; height: 16px; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--forest); color: var(--forest-ink); padding: 18px 14px; gap: 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; color: #fff; font: 650 19px var(--display); letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 50%; background: #fff; padding: 1px; }
.navgroup { display: grid; gap: 2px; }
.navgroup .glabel { font-size: 12px; color: var(--forest-muted); padding: 10px 10px 4px; }
.navlink { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--forest-ink); text-decoration: none; font-weight: 500; font-size: 14.5px; position: relative; }
.navlink:hover { background: var(--forest-2); color: #fff; }
.navlink.on { background: var(--forest-2); color: #fff; }
.navlink.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--marigold); }
.navlink .count { margin-left: auto; font-size: 12px; background: #c97a1d; color: #fff; border-radius: 99px; padding: 0 7px; line-height: 19px; }
.side .spacer { flex: 1; }
.purse { border-radius: var(--radius); background: var(--forest-2); padding: 12px 14px; }
.purse .k { font-size: 12.5px; color: var(--forest-muted); }
.purse .v { font: 650 22px var(--display); color: #fff; letter-spacing: -0.02em; margin-top: 2px; }
.purse .sub { font-size: 12.5px; color: var(--forest-muted); }
.whoami { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2a5a48; color: #fff; display: grid; place-items: center; font: 600 13px var(--text); flex: none; }
.whoami .who { min-width: 0; flex: 1; }
.whoami .who b { display: block; font-size: 13.5px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whoami .who span { font-size: 12px; color: var(--forest-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.iconbtn { border: 0; background: transparent; color: inherit; padding: 7px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.side .iconbtn:hover { background: var(--forest-2); }

.mainwrap { min-width: 0; }
.scrim { display: none; }
.mobilebar { display: none; }
.banner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 9px 20px; background: var(--queue-soft); border-bottom: 1px solid var(--line); font-size: 14px; }
main { max-width: 1240px; margin: 0 auto; padding: 32px 40px 80px; outline: none; }

/* ---- page header ---- */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.phead .t { min-width: 0; flex: 1 1 340px; }
.phead p { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.phead .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
h1.prop { font-family: var(--mono); font-weight: 400; font-size: 22px; letter-spacing: 0; word-break: break-all; }

/* ---- buttons and fields ---- */
button, .btn {
  font: 500 14px var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  border-radius: 8px; padding: 8px 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s;
}
button:hover, .btn:hover { border-color: var(--faint); background: var(--sunken); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.danger { color: var(--bad); }
.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.ghost:hover { background: var(--sunken); border-color: transparent; color: var(--ink); }
.btn.sm, button.sm { padding: 5px 10px; font-size: 13px; }
label { display: block; font-size: 13.5px; font-weight: 500; }
label > input, label > textarea, label > select { margin-top: 6px; }
input[type=text], input[type=url], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search], textarea, select {
  width: 100%; font: 14px var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 9px 11px; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
textarea { font-family: var(--mono); font-size: 13px; min-height: 140px; resize: vertical; line-height: 1.5; }
textarea.short { min-height: 76px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ok); margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; }
.search { position: relative; flex: 0 1 320px; }
.search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 34px; }

/* ---- layout helpers ---- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- panels ---- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.ptitle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ptitle h2 { display: flex; align-items: center; gap: 9px; }
.ptitle .ico { color: var(--muted); }
.panel.flush .ptitle { padding: 18px 22px 0; }

/* ---- notices ---- */
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 13px 15px; font-size: 14px; border: 1px solid; margin-bottom: 20px; }
.notice .ico { margin-top: 1px; }
.notice.info { background: var(--queue-soft); border-color: color-mix(in srgb, var(--queue) 30%, transparent); }
.notice.info .ico { color: var(--queue); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.warn .ico { color: var(--warn); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.notice.bad .ico { color: var(--bad); }
.notice.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.notice.ok .ico { color: var(--ok); }
.notice a { font-weight: 500; }

/* ---- status: dot + word (Search Console style) ---- */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.st.indexed { --c: var(--ok); }
.st.not_indexed { --c: var(--warn); }
.st.unchecked { --c: var(--idle); color: var(--muted); }
.st.error { --c: var(--bad); }
.st.queued { --c: var(--queue); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: var(--c-bg); color: var(--c); white-space: nowrap; }
.tag.ok { --c: var(--ok); --c-bg: var(--ok-soft); }
.tag.warn { --c: var(--warn); --c-bg: var(--warn-soft); }
.tag.bad { --c: var(--bad); --c-bg: var(--bad-soft); }
.tag.queue { --c: var(--queue); --c-bg: var(--queue-soft); }
.tag.idle { --c: var(--muted); --c-bg: var(--idle-soft); }

/* ---- the coverage band (signature element) ---- */
.band { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--idle-soft); gap: 2px; }
.band i { display: block; height: 100%; min-width: 0; }
.band .ok { background: var(--ok); }
.band .warn { background: var(--warn); }
.band .bad { background: var(--bad); }
.band.lg { height: 22px; border-radius: 6px; }
.scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; }
.hero .pct { font: 680 72px/0.9 var(--display); letter-spacing: -0.045em; }
.hero .pct small { font-size: 32px; letter-spacing: -0.02em; margin-left: 2px; color: var(--muted); font-weight: 600; }
.hero .cap { color: var(--muted); margin-top: 10px; font-size: 14px; }

/* ---- why not indexed (reason bars) ---- */
.reasons { display: grid; gap: 4px; }
.reason { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 9px 10px; border-radius: 8px; text-align: left; border: 0; background: transparent; width: 100%; font: inherit; color: inherit; cursor: default; }
button.reason { cursor: pointer; }
button.reason:hover, button.reason.on { background: var(--sunken); }
button.reason.on { box-shadow: inset 0 0 0 1.5px var(--warn); }
.reason .name { font-size: 14px; }
.reason .n { font: 600 15px var(--display); font-variant-numeric: tabular-nums; }
.reason .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--idle-soft); overflow: hidden; }
.reason .track i { display: block; height: 100%; background: var(--warn); border-radius: 3px; }
.reason .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-align: left; box-shadow: var(--shadow); font: inherit; color: inherit; display: block; width: 100%; }
button.tile { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
button.tile:hover { border-color: var(--line-strong); background: var(--surface); }
button.tile.on { border-color: var(--c, var(--ink)); box-shadow: inset 0 0 0 1.5px var(--c, var(--ink)), var(--shadow); }
.tile .k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tile .k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); }
.tile.plain .k::before { display: none; }
.tile .v { font: 650 26px/1.2 var(--display); letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---- site cards ---- */
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.sitecard { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.sitecard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.sitecard .top { display: flex; align-items: center; gap: 10px; }
.sitecard .favicon { width: 34px; height: 34px; border-radius: 8px; background: var(--sunken); display: grid; place-items: center; font: 650 15px var(--display); color: var(--muted); flex: none; text-transform: uppercase; }
.sitecard .name { font-family: var(--mono); font-size: 14px; word-break: break-all; min-width: 0; flex: 1; }
.sitecard .figure { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 12px; }
.sitecard .figure b { font: 680 38px/1 var(--display); letter-spacing: -0.035em; }
.sitecard .figure span { color: var(--muted); font-size: 14px; }
.sitecard .foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---- tables ---- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.toolbar .count { color: var(--muted); font-size: 13.5px; }
.segmented { display: inline-flex; background: var(--sunken); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 13.5px; color: var(--muted); }
.segmented button:hover { background: transparent; color: var(--ink); }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(16 33 27 / 12%); }
.segmented button .n { font-variant-numeric: tabular-nums; color: var(--faint); margin-left: 4px; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 18px; background: var(--forest); color: #fff; font-size: 14px; }
.bulk button { background: transparent; color: #fff; border-color: rgb(255 255 255 / 28%); }
.bulk button:hover { background: rgb(255 255 255 / 10%); border-color: rgb(255 255 255 / 45%); }
.bulk button.primary { background: #fff; color: var(--forest); border-color: #fff; }
.bulk button.danger { color: #ffb3aa; }
.bulk .link { border: 0; color: #cfe7db; text-decoration: underline; padding: 4px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
tr.clickable { cursor: pointer; }
td.sel, th.sel { width: 40px; padding-right: 0; }
td.url { font-family: var(--mono); font-size: 13px; word-break: break-all; min-width: 280px; }
td.url a { text-decoration: none; }
td.url a:hover { text-decoration: underline; }
td.when, th.when { white-space: nowrap; color: var(--muted); font-size: 13px; }
td.amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
td.amount.pos { color: var(--ok); }
.detail { font-family: var(--text); font-size: 13px; color: var(--muted); margin-top: 4px; word-break: normal; overflow-wrap: anywhere; }
.detail.bad { color: var(--bad); }
.detail a { color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

/* ---- empty states ---- */
.empty { text-align: center; padding: 48px 24px; }
.empty .art { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--sunken); display: grid; place-items: center; color: var(--muted); }
.empty .art .ico { width: 26px; height: 26px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--muted); margin: 6px auto 16px; max-width: 46ch; }

/* ---- lists ---- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .mono { word-break: break-all; }

/* ---- steps (a real sequence) ---- */
.steps { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); border: 1px solid var(--line-strong); display: grid; place-items: center; font: 600 13px var(--display); }
.steps b { display: block; font-weight: 600; }
.steps span { color: var(--muted); font-size: 14px; }

/* ---- how it works (backlinks) ---- */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.flow > div { padding: 18px 20px; border-left: 1px solid var(--line); position: relative; }
.flow > div:first-child { border-left: 0; }
.flow .ico { color: var(--ok); margin-bottom: 8px; }
.flow b { display: block; font-weight: 600; margin-bottom: 3px; }
.flow span { color: var(--muted); font-size: 13.5px; }

/* ---- code boxes ---- */
.codebox { display: flex; align-items: center; gap: 10px; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 9px 9px 9px 13px; }
.codebox code { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; }
pre.code { margin: 0; background: var(--forest); color: #d9dbf5; border-radius: var(--radius); padding: 16px 18px; font: 12.5px/1.65 var(--mono); overflow-x: auto; white-space: pre; }
@media (prefers-color-scheme: dark) { pre.code { background: #05061a; } }

/* ---- sub navigation (admin) ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -8px 0 24px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---- integrations ---- */
.integ { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.integ .logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--sunken); color: var(--ink); }
.integ .logo .ico { width: 22px; height: 22px; }
.integ.on .logo { background: var(--ok-soft); color: var(--ok); }

/* ---- dialogs ---- */
dialog { border: 0; padding: 0; border-radius: var(--radius-l); background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 32px)); box-shadow: 0 24px 64px -16px rgb(0 0 0 / 35%); }
dialog::backdrop { background: rgb(8 20 15 / 45%); backdrop-filter: blur(2px); }
dialog .in { padding: 24px; }
dialog .in > h2 { margin-bottom: 6px; }
dialog .foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.estimate { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--sunken); font-size: 14px; }
.estimate .num { font-size: 20px; font-weight: 650; }

/* ---- toast ---- */
#toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 48px)); padding: 12px 16px; border-radius: var(--radius); background: var(--forest); color: #fff; font-size: 14px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / 40%); opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s; pointer-events: none; }
#toast.show { opacity: 1; transform: none; }
#toast.bad { background: #8f241c; }

/* ---- login ---- */
body.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login .story { background: linear-gradient(135deg, #1d1ab3 0%, #3437d9 55%, #5560f5 100%); color: var(--forest-ink); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login .story h1 { color: #fff; font-size: 40px; max-width: 14ch; letter-spacing: -0.03em; margin-top: 60px; }
.login .story p { color: rgb(255 255 255 / 85%); max-width: 44ch; margin-top: 14px; font-size: 16px; }
.login .demo { max-width: 420px; }
.login .demo .band { background: rgb(255 255 255 / 22%); }
.login .story .logo { height: 56px; width: auto; background: #fff; border-radius: 12px; padding: 6px 10px; box-shadow: 0 6px 20px -8px rgb(0 0 0 / 30%); }
.login .story .brandline { display: flex; align-items: center; gap: 12px; color: #fff; font: 600 15px var(--display); text-decoration: none; }
.login .demo .legend { color: rgb(255 255 255 / 85%); }
.login .demo .legend b { color: #fff; }
.login .formside { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(380px, 100%); }
.login-card h2 { font-size: 24px; }
.login-card p.muted { margin: 6px 0 26px; }
.login-card label + label { margin-top: 14px; }
.login-card button { width: 100%; margin-top: 18px; padding: 11px; font-size: 15px; }
.error { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 12px; }

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .cols, .cols.even { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow > div:nth-child(3) { border-left: 0; }
  .flow > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgb(0 0 0 / 30%); }
  .shell.menu-open .side { transform: none; }
  .shell.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgb(8 20 15 / 45%); z-index: 30; }
  .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 14px; background: var(--forest); color: #fff; }
  .mobilebar .brand { font-size: 17px; padding: 0; }
  .mobilebar .bal { margin-left: auto; font: 600 15px var(--display); }
  main { padding: 22px 16px 60px; }
  h1 { font-size: 24px; }
  h1.prop { font-size: 17px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hero .pct { font-size: 56px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .sitegrid { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  td.url { min-width: 0; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow > div { border-left: 0; border-top: 1px solid var(--line); }
  .flow > div:first-child { border-top: 0; }
  body.login { grid-template-columns: minmax(0, 1fr); }
  .login .story { padding: 28px 24px; }
  .login .story h1 { margin-top: 24px; font-size: 30px; }
  #toast { right: 16px; left: 16px; bottom: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* login demo band (static widths, no inline styles under the CSP) */
.login .demo .i78 { width: 78%; } .login .demo .i15 { width: 15%; } .login .demo .i2 { width: 2.5%; }
.legend .c-ok { --c: var(--ok); } .legend .c-warn { --c: var(--warn); } .legend .c-bad { --c: var(--bad); } .legend .c-idle { --c: var(--idle); } .legend .c-queue { --c: var(--queue); }

/* buttons that hold sentences must wrap; the page body never shows a focus ring */
button.reason, button.tile { white-space: normal; justify-content: initial; }
main:focus, main:focus-visible { outline: none; }
.cols > .panel + .panel, .cols > * + .panel { margin-top: 0; }
button.tile { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }

/* ======================================================================================
   Phones (up to 640px): tables become cards, tiles go two-up, bars scroll sideways
   ====================================================================================== */
@media (max-width: 640px) {
  main { padding: 18px 14px 96px; }
  .phead { margin-bottom: 18px; gap: 14px; }
  .phead .acts { width: 100%; }
  .phead .acts > * { flex: 1 1 auto; }
  .panel { padding: 16px; border-radius: 12px; }
  .panel.flush .ptitle { padding: 14px 16px 0; }
  .panel + .panel { margin-top: 14px; }
  .cols, .cols.even { gap: 14px; margin-top: 14px; }
  .notice { padding: 11px 12px; font-size: 13.5px; }

  /* tiles: two per row, compact */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
  .tile { padding: 11px 12px; }
  .tile .v { font-size: 21px; margin-top: 3px; }
  .tile .k { font-size: 12.5px; }
  .tile .sub { font-size: 12px; }

  /* hero */
  .hero { padding: 18px; }
  .hero .pct { font-size: 52px; }
  .hero .pct small { font-size: 24px; }
  .legend { gap: 4px 14px; font-size: 13px; }

  /* tables as cards: the lead cell spans the row, the rest sit two-up with labels */
  .tablewrap { overflow: visible; }
  .tablewrap table, .tablewrap tbody { display: block; }
  .tablewrap thead { display: none; }
  .tablewrap tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .tablewrap tr:has(> td.sel) { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); }
  .tablewrap tbody tr:last-child { border-bottom: 0; }
  .tablewrap tbody tr:hover td { background: transparent; }
  .tablewrap td { display: block; padding: 0; border: 0; min-width: 0; }
  .tablewrap td.sel { grid-row: 1 / span 6; padding-top: 2px; width: auto; }
  .tablewrap td.lead { grid-column: -3 / -1; }
  .tablewrap td.url { min-width: 0; font-size: 12.5px; }
  .tablewrap td.when { white-space: normal; }
  .tablewrap td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--faint); margin-bottom: 2px; font-weight: 400; }
  .tablewrap td.amount { white-space: normal; }

  /* bulk actions stay reachable at the bottom of the screen */
  .bulk { position: sticky; bottom: 0; z-index: 6; flex-wrap: nowrap; overflow-x: auto; padding: 10px 12px; gap: 8px; scrollbar-width: none; box-shadow: 0 -8px 24px -12px rgb(0 0 0 / 40%); }
  .bulk::-webkit-scrollbar { display: none; }
  .bulk > * { flex: none; }
  .bulk .grow { display: none; }

  /* bars that would wrap scroll sideways instead */
  .tabs, .segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .tabs::-webkit-scrollbar, .segmented::-webkit-scrollbar { display: none; }
  .tabs a, .segmented button { flex: none; }
  .tabs { margin: -4px -14px 18px; padding: 0 14px; }
  .toolbar { padding: 12px 14px; gap: 8px; }
  .toolbar .search { flex: 1 1 100%; }

  /* backlinks explainer: icon beside text, tight rows */
  .flow > div { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; padding: 12px 16px; }
  .flow .ico { grid-row: 1 / span 2; margin: 2px 0 0; }
  .flow b { margin-bottom: 1px; }
  .flow span { font-size: 13px; }

  /* integrations: icon above, content full width */
  .integ { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .integ .logo { width: 36px; height: 36px; border-radius: 10px; }
  .integ .logo .ico { width: 19px; height: 19px; }
  .codebox { align-items: flex-start; }

  /* reasons: tighter */
  .reason { padding: 8px 6px; }

  /* site cards */
  .sitecard { padding: 16px; }
  .sitecard .figure { margin: 14px 0 10px; }
  .sitecard .figure b { font-size: 32px; }

  /* dialogs open as bottom sheets */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 92vh; display: flex; flex-direction: column; }
  dialog:not([open]) { display: none; }
  dialog .in { padding: 20px 16px; overflow-y: auto; }
  dialog .foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  dialog .foot > * { flex: 1; }
  .grid2 { gap: 12px; }

  /* lists */
  .list li { flex-wrap: wrap; }
  pre.code { font-size: 11.5px; padding: 12px; }
  .mobilebar { padding-top: calc(10px + env(safe-area-inset-top)); }
}
@media (max-width: 350px) {
  .tablewrap tr { grid-template-columns: minmax(0, 1fr); }
  .tablewrap tr:has(> td.sel) { grid-template-columns: 26px minmax(0, 1fr); }
  .tablewrap td.lead { grid-column: -2 / -1; }
  .hero .pct { font-size: 46px; }
}
/* Tablets: sidebar is hidden below 860px, so give content room */
@media (min-width: 641px) and (max-width: 860px) {
  .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow > div { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .flow > div:nth-child(odd) { border-left: 0; }
  .flow > div:nth-child(-n+2) { border-top: 0; }
}

/* overview sections: a small heading above each group of numbers */
.ov-section { margin-top: 26px; }
.ov-title { display: flex; align-items: center; gap: 9px; font-size: 16px; margin-bottom: 12px; color: var(--ink); }
.ov-title .ico { color: var(--muted); }
.ov-section .tiles { margin-bottom: 14px; }
.ov-section > .panel + .panel { margin-top: 14px; }
@media (max-width: 640px) { .ov-section { margin-top: 20px; } }

/* feature switches */
.features { display: grid; gap: 0; }
.feature { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.feature:first-child { border-top: 0; padding-top: 4px; }
.feature select { width: auto; min-width: 210px; flex: none; }
.feature .hint { max-width: 62ch; }
@media (max-width: 640px) { .feature { flex-direction: column; gap: 10px; } .feature select { width: 100%; } }

/* remarks: why a backlink or page is not listed */
td.remark { min-width: 260px; max-width: 420px; font-size: 13.5px; line-height: 1.5; }
td.remark .rm + .rm { margin-top: 4px; color: var(--muted); }
td.remark .rm.ok { color: var(--ok); font-weight: 500; }
td.remark .rm.warn { color: var(--warn); font-weight: 500; }
td.remark .rm.bad { color: var(--bad); }
.why-reason { font-weight: 500; color: var(--ink); }
.why-help { margin-top: 2px; }
@media (max-width: 640px) { td.remark { min-width: 0; max-width: none; grid-column: -3 / -1; } .tablewrap tr:has(> td.sel) td.remark { grid-column: -3 / -1; } }
.pos-num { color: var(--ok); }
.neg-num { color: var(--bad); }

/* ---- SEO suite (4.0) ---- */
:root { --series: #2f5fcf; }
@media (prefers-color-scheme: dark) { :root { --series: #86a6ff; } }
.pad { padding: 0 22px 18px; }
.chg { font: 600 12.5px var(--text); letter-spacing: 0; white-space: nowrap; }
.chg.up { color: var(--ok); } .chg.down { color: var(--bad); } .chg.flat { color: var(--faint); }
.tile .v .chg { font-size: 13px; vertical-align: middle; }
.sitecard .minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 16px 0 4px; }
.sitecard .minis div { display: grid; gap: 2px; min-width: 0; }
.sitecard .minis span { font-size: 12px; color: var(--muted); }
.sitecard .minis b { font: 650 18px/1.2 var(--display); letter-spacing: -0.02em; }

/* charts: one series, recessive grid, crosshair tooltip */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 10px var(--text); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .mark { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .tip { position: absolute; top: 0; width: 140px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; box-shadow: var(--shadow); font-size: 12.5px; pointer-events: none; display: grid; gap: 2px; }
.chart .tip span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* scores and uptime */
.scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.score { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; display: grid; gap: 4px; }
.score b { font: 680 28px/1 var(--display); color: var(--c); }
.score span { font-size: 12px; color: var(--muted); }
.score.ok { --c: var(--ok); } .score.warn { --c: var(--warn); } .score.bad { --c: var(--bad); } .score.idle { --c: var(--faint); }
.strip { display: flex; gap: 2px; height: 26px; align-items: stretch; }
.strip i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--ok); }
.strip i.warn { background: var(--warn); } .strip i.bad { background: var(--bad); }

/* recommendations */
.recs { display: grid; gap: 14px; }
.rec { border-left: 4px solid var(--idle); padding: 18px 20px; }
.rec.high { border-left-color: var(--bad); } .rec.medium { border-left-color: var(--warn); }
.rec-head { display: flex; align-items: flex-start; gap: 14px; }
.rec-head h3 { font-size: 16.5px; margin-bottom: 4px; }
.rec-n { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 14px; flex: none; }
.how { margin: 12px 0 0; padding-left: 62px; display: grid; gap: 6px; font-size: 14px; }
.how.actions { padding-left: 20px; }
.how.actions li { line-height: 1.5; }
details summary { cursor: pointer; color: var(--muted); font-size: 13.5px; margin-top: 12px; padding-left: 42px; }
details[open] summary { margin-bottom: 4px; }
.rec details .list { padding-left: 42px; }

/* audit issues, local searches */
.issues { border-top: 1px solid var(--line); }
.issue { border-bottom: 1px solid var(--line); padding: 0 22px; }
.issue summary { display: flex; align-items: center; gap: 10px; padding: 14px 0; margin: 0; color: var(--ink); font-size: 14.5px; list-style: none; }
.issue summary::-webkit-details-marker { display: none; }
.issue summary::after { content: "›"; color: var(--faint); font-size: 18px; transition: transform .15s; }
.issue[open] summary::after { transform: rotate(90deg); }
.issue .hint { margin: 0 0 8px; }
.issue .list { margin-bottom: 12px; }
.checks .ck { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c-bg); color: var(--c); }
.checks .ck.ok { --c: var(--ok); --c-bg: var(--ok-soft); } .checks .ck.bad { --c: var(--bad); --c-bg: var(--bad-soft); } .checks .ck.idle { --c: var(--muted); --c-bg: var(--idle-soft); }
.checks li { align-items: flex-start; }
.serp { list-style: none; margin: 0; padding: 0; }
.serp li { display: flex; align-items: center; gap: 12px; padding: 10px 22px; border-top: 1px solid var(--line); }
.serp li.mine { background: var(--ok-soft); }
.serp .rk { width: 26px; color: var(--muted); font-size: 15px; flex: none; }
.serp .detail { display: block; word-break: break-all; }
.ideas { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.plan .fee { font: 680 30px/1 var(--display); letter-spacing: -0.03em; }
.plan .fee small { font: 400 14px var(--text); color: var(--muted); }
.plan .list li { padding: 8px 0; }
dialog h3 { margin-top: 6px; }

.print-only { display: none; }
@media print {
  .side, .mobilebar, .banner, .tabs, .crumb, .phead .acts, .noprint, #toast { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .print-only { display: block; margin-bottom: 18px; }
  .panel, .tile { box-shadow: none; break-inside: avoid; }
  details > *:not(summary) { display: block; }
}
@media (max-width: 860px) {
  .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how { padding-left: 20px; }
  details summary, .rec details .list { padding-left: 0; }
  .rec-head { flex-wrap: wrap; }
  .issue, .serp li { padding-left: 14px; padding-right: 14px; }
}

.tiles.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tiles.compact .tile { box-shadow: none; padding: 10px 12px; }
.tiles.compact .tile .v { font-size: 20px; }
@media (max-width: 640px) { .tiles.compact { grid-template-columns: 1fr 1fr; } }

.ptitle { flex-wrap: wrap; row-gap: 10px; }

/* ---- branded reports (A4; printed to PDF by the browser) ---- */
.rtools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rtools .notice { flex-basis: 100%; }
.brand-prev { width: 180px; height: 70px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.report { --brand: #1b1bb3; --brand-2: #0a22e8; --rink: #111827; --rmuted: #5b6474; --rline: #e3e6ef; --rsoft: #f3f5fb;
  color: var(--rink); font: 10.5pt/1.5 var(--text); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; }
.sheet { width: 210mm; max-width: 100%; min-height: 297mm; background: #fff; box-shadow: 0 2px 18px rgb(15 23 42 / 18%); padding: 16mm 14mm; position: relative; color: var(--rink); }
.sheet-head { height: 6px; margin: -16mm -14mm 12mm; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.rh { display: flex; align-items: baseline; gap: 12px; font: 650 21pt/1.15 var(--display); color: var(--rink); letter-spacing: -0.02em; margin: 0 0 4px; }
.rn { color: var(--brand-2); }
.rsub { color: var(--rmuted); font-size: 9.5pt; padding-bottom: 10px; border-bottom: 1px solid var(--rline); margin-bottom: 14px; }
.rh3 { font: 650 12.5pt var(--display); color: var(--brand); margin: 18px 0 8px; }
.rtext { margin: 12px 0; }
.rnote { color: var(--rmuted); font-size: 9pt; margin-top: 6px; }
.rfine { color: var(--rmuted); font-size: 8pt; margin-top: 22px; border-top: 1px solid var(--rline); padding-top: 8px; }
.rkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 4px; }
.rkpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rkpi { background: var(--brand); color: #fff; border-radius: 6px; padding: 10px 12px; break-inside: avoid; }
.rkpi .k { font-size: 7.5pt; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.rkpi b { display: block; font: 680 20pt/1.15 var(--display); letter-spacing: -0.02em; margin: 2px 0; }
.rkpi .s { font-size: 8pt; opacity: 0.95; }
.rkpi .rchg.up { color: #8ff0bf; } .rkpi .rchg.down { color: #ffb4ad; } .rkpi .rchg.flat { color: #dbe2ff; }
.rchg { font-weight: 600; white-space: nowrap; }
.rchg.up { color: #12804f; } .rchg.down { color: #c0392f; } .rchg.flat { color: var(--rmuted); }
.rtable { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 4px 0; }
.rtable thead th { background: var(--brand); color: #fff; text-align: left; font-weight: 600; padding: 7px 8px; font-size: 8.5pt; }
.rtable td { padding: 6px 8px; border-bottom: 1px solid var(--rline); vertical-align: top; }
.rtable tbody tr:nth-child(even) td { background: var(--rsoft); }
.rtable tr { break-inside: avoid; }
.rtable.num td:not(:first-child), .rtable.snap td:not(:first-child) { white-space: nowrap; }
.rtable.kw td:first-child { color: var(--rmuted); width: 24px; }
.rtable .pg1 { color: #12804f; }
.rtable .mine { font-weight: 700; color: var(--brand); }
.rtable .mono, .rpages .mono { font-family: var(--mono); font-size: 8pt; word-break: break-all; }
.rtable.issues td:nth-child(3) { text-align: right; }
.rbar { height: 9px; background: var(--rsoft); border-radius: 5px; min-width: 120px; }
.rbar i { display: block; height: 100%; border-radius: 5px; background: #9aa6c8; }
.rbar i.mine { background: var(--brand-2); }
.rst { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 8.5pt; white-space: nowrap; text-transform: capitalize; }
.rst::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rst.ok { color: #12804f; } .rst.warn { color: #b7721a; } .rst.bad { color: #c0392f; } .rst.idle { color: #6b7280; }
.rlist { margin: 4px 0; padding-left: 18px; display: grid; gap: 3px; }
.rcallout { background: #eef1ff; border-left: 4px solid var(--brand-2); padding: 10px 12px; margin: 14px 0; font-size: 9.5pt; break-inside: avoid; }
.rcallout b { color: var(--brand); }
.rbox { border: 1px solid var(--rline); border-radius: 6px; padding: 10px 14px; margin-top: 12px; break-inside: avoid; }
.rcols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rscore-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: stretch; margin: 6px 0 10px; }
.rscore { border-radius: 8px; color: #fff; display: grid; place-content: center; text-align: center; padding: 12px; }
.rscore b { font: 700 40pt/1 var(--display); } .rscore span { font-size: 10pt; opacity: .85; } .rscore div { font-weight: 600; margin-top: 6px; }
.rscore.ok { background: #12804f; } .rscore.warn { background: #b7721a; } .rscore.bad { background: #c0392f; }
.rissue { break-inside: avoid; }
.rpages { list-style: none; margin: 0; padding: 0; font-size: 8.5pt; }
.rpages li { padding: 3px 0; border-bottom: 1px dotted var(--rline); }
.raction { border: 1px solid var(--rline); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; break-inside: avoid; }
.rah { display: flex; align-items: center; gap: 10px; }
.rah b { flex: 1; }
.rn2 { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 9pt; font-weight: 700; flex: none; }
.report .chart .axis { font-size: 9px; }
.report .chart .line { stroke: var(--brand-2); } .report .chart .dot { fill: var(--brand-2); }
/* cover */
.sheet.cover { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.cover-top { flex: 1; padding: 22mm 18mm 10mm; background: radial-gradient(circle at 105% -5%, #e8ecff 0 32%, transparent 32.2%), radial-gradient(circle at 92% 62%, #f1f3ff 0 18%, transparent 18.2%), #fff; }
.cover-logo { width: 92mm; height: auto; display: block; margin-bottom: 34mm; }
.cover-kicker { font-size: 10pt; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rmuted); font-weight: 600; }
.cover-bar { width: 22mm; height: 3px; background: var(--brand-2); margin: 10px 0 18px; }
.cover-title { font: 700 40pt/1.08 var(--display); color: var(--brand); letter-spacing: -0.03em; margin: 0 0 14px; }
.cover-tags { color: var(--rmuted); font-size: 11pt; }
.cover-band { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; padding: 12mm 18mm 9mm; }
.cover-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16mm; }
.cover-cols span { display: block; font-size: 8pt; letter-spacing: 0.12em; text-transform: uppercase; opacity: .8; }
.cover-cols b { display: block; font: 650 15pt var(--display); margin: 4px 0 2px; }
.cover-cols div div { font-size: 9.5pt; opacity: .9; }
.cover-foot { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgb(255 255 255 / 30%); margin-top: 10mm; padding-top: 4mm; font-size: 8pt; opacity: .85; }
@media screen and (max-width: 860px) {
  .sheet { padding: 18px 14px; min-height: 0; }
  .sheet-head { margin: -18px -14px 16px; }
  .rkpis, .rkpis.three { grid-template-columns: 1fr 1fr; }
  .rscore-row, .rcols, .cover-cols { grid-template-columns: 1fr; }
  .cover-logo { margin-bottom: 40px; width: 70%; }
  .cover-title { font-size: 30pt; }
  .report .tablewrap, .rtable { display: block; overflow-x: auto; }
}
@media print {
  body.report-mode { background: #fff; }
  body.report-mode .mainwrap, body.report-mode main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .report { display: block; gap: 0; }
  .sheet { width: 100% !important; max-width: none; min-height: 0; box-shadow: none; padding: 0; break-before: page; }
  .sheet:first-child { break-before: auto; }
  .screen-only, .sheet-head { display: none; }
  .sheet.cover { width: 210mm; height: 296mm; }
  .report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rh3 { break-after: avoid; }
}
.rtable.worst td:first-child { width: 34%; }
.rtable.worst td:last-child { font-size: 8.5pt; }
label > input[type=color] { display: block; width: 100%; height: 42px; margin-top: 6px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
label > input[type=file] { display: block; margin-top: 8px; font-size: 13px; }

/* research */
.sbar { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.sbar .trk { width: 64px; height: 7px; border-radius: 4px; background: var(--sunken); overflow: hidden; flex: none; }
.sbar .trk i { display: block; height: 100%; background: var(--ok); }
.sbar b { font-size: 13px; }
.stale { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }
.chip.miss { background: var(--bad-soft); color: var(--bad); }
.chip small { opacity: .7; }
.outline { padding: 8px 0; border-top: 1px solid var(--line); }
.outline ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* action plan */
.plan-panel { margin-bottom: 20px; }
.phase { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.phase-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.phase-head h3 { font-size: 16px; }
.phase-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 650 14px var(--display); flex: none; }
.pstep { border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0 8px 42px; background: var(--surface); }
.pstep.done { opacity: .62; }
.pstep.done b { text-decoration: line-through; }
.pstep summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0; color: var(--ink); list-style: none; font-size: 14.5px; }
.pstep summary::-webkit-details-marker { display: none; }
.pn { width: 24px; color: var(--muted); font-size: 14px; flex: none; }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); align-items: center; }
.pmeta span { display: inline-flex; align-items: center; gap: 5px; }
.pbody { padding: 0 14px 14px 50px; }
.pbody .how { padding-left: 18px; }
.stsel { width: auto !important; min-width: 130px; flex: none; font-size: 13px; padding: 6px 8px; }
.stsel.done { border-color: var(--ok); color: var(--ok); } .stsel.doing { border-color: var(--queue); color: var(--queue); }
.nbadge { margin-left: auto; background: #e5484d; color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.advice { border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; font-size: 14px; background: var(--sunken); border-left: 4px solid var(--idle); }
.advice.bad { border-left-color: var(--bad); background: var(--bad-soft); } .advice.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.advice .how { padding-left: 20px; margin-top: 8px; }
.rec .tablewrap { margin-top: 12px; }
@media (max-width: 640px) {
  .pstep { margin-left: 0; }
  .pstep summary { flex-wrap: wrap; }
  .pbody { padding-left: 14px; }
  .stsel { width: 100% !important; }
}

/* AI writer */
.article { font-size: 15.5px; line-height: 1.7; max-width: 72ch; }
.article h2 { font-size: 21px; margin: 22px 0 8px; } .article h3 { font-size: 17px; margin: 16px 0 6px; }
.article p { margin: 0 0 12px; } .article ul, .article ol { margin: 0 0 12px; padding-left: 22px; }
.article a { color: var(--queue); }
.article table { border-collapse: collapse; margin: 10px 0; } .article th, .article td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.article blockquote { border-left: 3px solid var(--line-strong); margin: 10px 0; padding-left: 12px; color: var(--muted); }
mark.gap { background: #ffe58f; color: #5c3c00; padding: 1px 4px; border-radius: 4px; font-weight: 600; }
.html-edit { min-height: 520px; font: 13px/1.5 var(--mono); width: 100%; }
.faqrow { display: grid; grid-template-columns: 1fr auto; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.faqrow textarea { grid-column: 1 / 2; }
.faqrow .iconbtn { grid-row: 1 / 3; grid-column: 2; align-self: start; }
.serp-prev { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); font-family: Arial, sans-serif; }
.serp-prev .u { font-size: 12.5px; color: var(--muted); }
.serp-prev .t { font-size: 18px; color: #1a0dab; margin: 2px 0; line-height: 1.3; }
.serp-prev .d { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
@media (prefers-color-scheme: dark) { .serp-prev .t { color: #8ab4f8; } mark.gap { background: #5c4a12; color: #ffe58f; } }
.hint.bad { color: var(--bad); }
.codewrap pre.code { max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ==== 4.5: workflow layout, accessibility and phone fixes ==== */
:root { --faint: #6b7a73; }
@media (prefers-color-scheme: dark) { :root { --faint: #84998f; } }

/* site header: name, settings, tabs, then the explanation under the tabs (tabs never jump) */
.site-head { align-items: flex-start; margin-bottom: 14px; min-height: 58px; }
.site-head .acts-row { display: flex; gap: 10px; align-items: center; }
h1.sitename { font-size: 24px; word-break: break-word; }
.prop-sub { font-size: 13px; color: var(--muted); margin-top: 2px !important; }
.btn.iconbtn { padding: 0; width: 38px; height: 38px; }
.btn.iconbtn.on { border-color: var(--ok); color: var(--ok); }
.tabsub { color: var(--muted); font-size: 14px; margin: -12px 0 20px; max-width: 80ch; }
.tabs-wrap { position: relative; }
.tabs { margin-bottom: 18px; }
.subtabs { display: flex; gap: 6px; margin: -6px 0 18px; flex-wrap: wrap; }
.subtabs a { padding: 6px 12px; border-radius: 99px; color: var(--muted); text-decoration: none; font-size: 13.5px; border: 1px solid var(--line); background: var(--surface); }
.subtabs a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.subtabs a:hover:not(.on) { color: var(--ink); border-color: var(--line-strong); }
.viewing { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--queue); background: var(--queue-soft); border-radius: var(--radius-s); padding: 6px 10px; margin-bottom: 10px; }
.viewing a { margin-left: auto; color: inherit; font-weight: 500; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }

/* "More" menu for extra page actions */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.more-menu .menu > * { justify-content: flex-start; width: 100%; border-color: transparent; }
.more-menu .menu select { width: 100%; }

/* filter chips */
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { font-size: 13px; padding: 5px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); min-height: 32px; }
.fchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fchip .n { margin-left: 6px; opacity: .75; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-direction: column; gap: 8px; }
.toolbar.wrap { flex-wrap: wrap; }
.pad-x { padding: 0 18px; }

/* action plan */
.gain { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 500; }
.gain.big { font-size: 14px; }
.phase.backlog .phase-n { background: var(--idle); }
.setup .list li { align-items: center; }
.thisweek .list li { align-items: center; gap: 12px; }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.pmeta > span { display: inline-flex; align-items: center; gap: 4px; }
.plan-mini { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.row.wrap { flex-wrap: wrap; }
.btn .n { margin-left: 6px; background: var(--sunken); border-radius: 99px; padding: 0 7px; font-size: 12px; }

/* audit while re-running: old results stay, dimmed */
.dim { opacity: .55; }
.progress-banner { border-left: 4px solid var(--queue); }

/* article progress rail */
.rail { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 20px; flex-wrap: wrap; }
.rail li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding-right: 18px; position: relative; }
.rail li:not(:last-child)::after { content: ""; width: 18px; height: 2px; background: var(--line-strong); margin-left: 4px; }
.rail .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); font: 600 12px var(--display); background: var(--surface); }
.rail li.done { color: var(--ok); } .rail li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.rail li.now { color: var(--ink); font-weight: 600; } .rail li.now .dot { border-color: var(--queue); color: var(--queue); }
.rail li .link { margin-left: 4px; }
.report-steps { margin: 12px 0; }
.serpfeat { display: flex; flex-wrap: wrap; gap: 6px; margin: -12px 0 18px; }
.inline-details { display: inline; }
.inline-details summary { display: inline; cursor: pointer; color: var(--muted); font-size: 12.5px; }
.why-help summary { cursor: pointer; font-size: 12.5px; color: var(--queue); }

/* addresses in plain text (monospace only for real code) */
.url-text { word-break: break-all; color: var(--ink); }
a.url-text { color: var(--queue); }
td.url { font-family: var(--text); font-size: 13.5px; }
.sitecard .name { font-family: var(--text); font-weight: 600; font-size: 15px; word-break: break-word; }
textarea { font-family: var(--text); font-size: 14px; }
textarea.html-edit, .codewrap textarea { font-family: var(--mono); }
.three.cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
table.clients td { vertical-align: top; }
table.clients .tag { margin: 0 4px 4px 0; }

/* phones */
@media (max-width: 860px) {
  .side { box-shadow: none; visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .shell.menu-open .side { box-shadow: 0 0 40px rgb(0 0 0 / 30%); visibility: visible; transition: transform .2s; }
}
@media (max-width: 640px) {
  .tabs-wrap::after { content: ""; position: absolute; right: -14px; top: 0; bottom: 18px; width: 36px; background: linear-gradient(to right, transparent, var(--paper)); pointer-events: none; }
  .site-head .acts-row { width: 100%; }
  .site-head .acts-row .acts { flex: 1; }
  .phead .acts { flex-wrap: nowrap; }
  .phead .acts > .more-menu { flex: none; }
  .more-menu .lbl { display: none; }
  .tablewrap td.sel input[type=checkbox], .list input[type=checkbox] { width: 22px; height: 22px; }
  .tablewrap td.sel { padding: 10px; }
  .crumb, .breadcrumb a { display: inline-flex; min-height: 36px; align-items: center; }
  .tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rail li { padding-right: 10px; }
  .rail li:not(:last-child)::after { width: 10px; }
  .tabsub { margin-top: -8px; }
  .subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .subtabs a { flex: none; }
}
@media print { .subtabs, .tabsub, .viewing, .site-head .acts-row, .rail { display: none !important; } }
.grid2 > *, .grid3 > *, label { min-width: 0; }
input, select, textarea { max-width: 100%; }
.steps code, .codebox code, .notice code { word-break: break-all; }
@media (max-width: 640px) {
  .fchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .fchips::-webkit-scrollbar { display: none; }
  .fchip { flex: none; }
}
@media (max-width: 640px) { .more-menu .menu { left: 0; right: auto; } }

/* ---- one-stop analysis: all keywords, overview, analytics, backlinks ---- */
.howto { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.howto code { word-break: break-all; }
.howto .btn { margin-left: 6px; vertical-align: middle; }
.toolbar input[type=search] { flex: 1 1 220px; max-width: 320px; }
.toolbar select { width: auto; }
th button.sort { all: unset; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; }
th button.sort.on { color: var(--ink); }
th button.sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.bars { display: grid; gap: 8px; margin: 6px 0 12px; }
.bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13.5px; }
.bars.wide .bar-row { grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) 72px; }
.bar-row .bl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bt { height: 10px; background: var(--sunken); border-radius: 5px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; background: var(--series); border-radius: 5px; }
.bar-row b { text-align: right; }
td.nowrap { white-space: nowrap; }
.grid2 > .panel { margin-top: 0; align-self: start; }

/* page loading: a thin bar at the top and the old page dimmed, so every click shows it was received */
body.navigating #view { opacity: .55; transition: opacity .15s .1s; }
body.navigating::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 40%; z-index: 1000; background: var(--ok); border-radius: 0 2px 2px 0; animation: navbar 1.1s ease-in-out infinite; }
@keyframes navbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { body.navigating::before { animation: none; width: 100%; opacity: .6; } }
.toolbar .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }

/* team member: assign websites */
.assign-group { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.assign-group:first-child { border-top: 0; }
.assign-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.assign-list .check span { overflow-wrap: anywhere; }

/* errors shown inside a dialog (the page behind it is covered) */
.dlg-error { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--bad-soft); color: var(--bad); font-size: 14px; }
.dlg-error[hidden] { display: none; }

/* team limits on paid buttons */
.tl { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--queue-soft); color: var(--queue); font: 600 11.5px var(--text); white-space: nowrap; }
.tl.out { background: var(--bad-soft); color: var(--bad); }
button.primary .tl { background: rgb(255 255 255 / 18%); color: inherit; }
.teamnote { margin-bottom: 16px; }

/* Google profile picker */
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pick.exact { border-color: var(--ok); background: var(--ok-soft); }
.pick .detail { overflow-wrap: anywhere; }
@media (max-width: 560px) { .pick { flex-direction: column; } }

/* Dark mode: the light BringOn accent needs dark text on it */
@media (prefers-color-scheme: dark) { .primary, .subtabs a.on, .fchip.on, .phase-n { color: #0b0c1f; } .bulk button.primary { color: var(--forest); } }
