/* SEO Audit Tool styles. T19: the Dwelleo Design System (docs/design/design-system/), internal ops-dashboard shell.
   Dark first: dark on :root; light via the system setting or the header switch (data-theme on <html>).
   Every colour below comes from a token; tints are the DS status hues mixed over the card colour. */
:root {
  color-scheme: dark;
  --bg: #1b1b1b; --side: #111111; --card: #252525; --soft: #353535; --text: #ffffff; --muted: #a1a1a1;
  --line: #3a3a3a; --field: #4a4a4a; --accent: #b8d935; --accent-hover: #c9e84a; --on-accent: #0f0a28; --bad: #ff6b78;
  --bad-bg: #482a2d; --warn: #ffa733; --warn-bg: #48371f; --info: #7cb6fb; --info-bg: #2e3947; --good: #6cc070;
  --good-bg: #2b3b2c; --fact: #c3cddb; --fact-bg: #37393d; --interp: #b69cfa; --interp-bg: #352e46; --accent-soft: #3d4228;
  --accent-soft-text: #b8d935; --p0: #482a2d; --p0-text: #ff6b78; --p1: #48371f; --p1-text: #ffa733; --p2: #473e25;
  --p2-text: #fbbf24; --p3: #393939; --p3-text: #d3d3d3; --danger: #ff4757; --on-danger: #0f0a28; --count: #ff4757;
  --zero: #5c5c5c;
  --brand: var(--accent); --brand-dark: var(--accent-hover); --on-brand: var(--on-accent); --on-bad: var(--on-danger);
  --hl: var(--accent); --hl-soft: var(--accent-soft); --prod: var(--warn-bg); --prod-text: var(--warn);
  --stg: var(--info-bg); --stg-text: var(--info); --shadow: rgba(0,0,0,.35); --scrim: rgba(0,0,0,.6);
  --r-sm: 8px; --r-md: 12px; --r-input: 16px; --r-xl: 20px; --r-card: 24px; --r-pill: 999px;
  --font-ui: "Roc Grotesk", "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: "Inter", "Roc Grotesk", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --panel: #111111; --panel-text: #ffffff; --panel-muted: #dcd8d5; --panel-faint: #a1a1a1; --panel-accent: #b8d935;
}
:root[data-theme="light"] {
  color-scheme: light; --shadow: rgba(15,10,40,.06); --scrim: rgba(15,10,40,.4);
  --bg: #f4f5f9; --side: #ffffff; --card: #ffffff; --soft: #eef0f5; --text: #0f0a28; --muted: #5b6478;
  --line: #e5e7ee; --field: #d5d9e2; --accent: #602fa2; --accent-hover: #4f2686; --on-accent: #ffffff; --bad: #b3192a;
  --bad-bg: #ffe5e7; --warn: #9a4a00; --warn-bg: #fff1db; --info: #1b5aa6; --info-bg: #e9f2fe; --good: #1d6f31;
  --good-bg: #e6f4e6; --fact: #2f3b55; --fact-bg: #f0f2f5; --interp: #5b2d91; --interp-bg: #efe8fe; --accent-soft: #e9e2f2;
  --accent-soft-text: #602fa2; --p0: #ffe5e7; --p0-text: #b3192a; --p1: #fff1db; --p1-text: #9a4a00; --p2: #fef6e0;
  --p2-text: #765400; --p3: #f0f2f5; --p3-text: #3e4657; --danger: #b3192a; --on-danger: #ffffff; --count: #ff4757;
  --zero: #a3a9b6;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light; --shadow: rgba(15,10,40,.06); --scrim: rgba(15,10,40,.4);
    --bg: #f4f5f9; --side: #ffffff; --card: #ffffff; --soft: #eef0f5; --text: #0f0a28; --muted: #5b6478;
    --line: #e5e7ee; --field: #d5d9e2; --accent: #602fa2; --accent-hover: #4f2686; --on-accent: #ffffff; --bad: #b3192a;
    --bad-bg: #ffe5e7; --warn: #9a4a00; --warn-bg: #fff1db; --info: #1b5aa6; --info-bg: #e9f2fe; --good: #1d6f31;
    --good-bg: #e6f4e6; --fact: #2f3b55; --fact-bg: #f0f2f5; --interp: #5b2d91; --interp-bg: #efe8fe; --accent-soft: #e9e2f2;
    --accent-soft-text: #602fa2; --p0: #ffe5e7; --p0-text: #b3192a; --p1: #fff1db; --p1-text: #9a4a00; --p2: #fef6e0;
    --p2-text: #765400; --p3: #f0f2f5; --p3-text: #3e4657; --danger: #b3192a; --on-danger: #ffffff; --count: #ff4757;
    --zero: #a3a9b6;
  }
}
/* the logo that matches the mode; never recoloured or stretched (height set, width auto) */
.logo { display: block; height: 26px; width: auto; }
.logo-light { display: none; }
:root[data-theme="light"] .logo-light { display: block; } :root[data-theme="light"] .logo-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-light { display: block; } :root:not([data-theme="dark"]) .logo-dark { display: none; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font-ui); }
a { color: var(--brand); }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.mono { white-space: nowrap; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.top nav { display: flex; align-items: center; gap: 16px; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 24px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card.empty { text-align: center; padding: 40px; color: var(--muted); }
details.card summary { cursor: pointer; font-weight: 600; }
.btn { display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); border-radius: 8px;
  padding: 8px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.env-production { background: var(--prod); color: var(--prod-text); } .env-staging { background: var(--stg); color: var(--stg-text); }
.tone-good { background: var(--good-bg); color: var(--good); } .tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad { background: var(--bad-bg); color: var(--bad); } .tone-info { background: var(--info-bg); color: var(--info); }

.sev { display: inline-block; min-width: 34px; text-align: center; padding: 1px 6px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-left: 4px; }
.sev-P0 { background: var(--p0); color: var(--p0-text); } .sev-P1 { background: var(--p1); color: var(--p1-text); }
.sev-P2 { background: var(--p2); color: var(--p2-text); } .sev-P3 { background: var(--p3); color: var(--p3-text); }
.sev-line strong { margin-right: 2px; }
.table-wrap { overflow-x: auto; position: relative; }  /* position: so a .sr-only (absolute) header cell can not stick out of the scroll box */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 13px; color: var(--muted); font-weight: 600; }
table.list tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; white-space: nowrap; }
.actions { white-space: nowrap; }
table.kv { width: 100%; border-collapse: collapse; }
table.kv th { width: 230px; text-align: left; vertical-align: top; color: var(--muted); font-weight: 600; padding: 7px 10px 7px 0; }
table.kv td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pre { white-space: pre-line; }
.form label { display: block; margin-bottom: 16px; font-weight: 600; }
.form input[type=number], .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 10px;
  border: 1px solid var(--field); border-radius: 8px; font: inherit; font-weight: 400; background: var(--card); color: var(--text); }
.form input[type=number] { max-width: 180px; } .form select { max-width: 280px; }
.form textarea { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: 4px; }
.warn-box { background: var(--warn-bg); border-radius: 8px; padding: 10px 12px; }
.alert { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); } .alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: var(--info-bg); color: var(--info); }
.warn-text { color: var(--warn); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0 12px; }
.steps li { padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 13px; }
.steps li.done { background: var(--good-bg); color: var(--good); }
.steps li.done::before { content: "\2713  "; }
.steps li.now { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.bar { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; margin: 8px 0 14px; }
.bar span { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0; }
.counts div { background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.counts dt { font-size: 12px; color: var(--muted); }
.counts dd { margin: 0; font-size: 22px; font-weight: 700; }
.counts small { font-size: 13px; color: var(--muted); font-weight: 400; }
.note { margin: 8px 0; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin-bottom: 6px; }
@media (max-width: 720px) {
  .two { grid-template-columns: 1fr; } .counts { grid-template-columns: repeat(2, 1fr); }
  table.kv th { width: 120px; } .top { padding: 10px 16px; }
}

/* ---- T13 report ---- */
h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 6px; }
h2.section { font-size: 20px; margin: 28px 0 12px; }
.card-head h2 { margin: 0; }
.good-text { color: var(--good); }
.tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tabs a { padding: 8px 14px; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a.on { border-bottom-color: var(--brand); color: var(--text); }
.tabs-end { margin-left: auto; font-size: 13px; color: var(--muted); }
.tabs-end a { padding: 0; border: 0; font-weight: 400; }
.sev { margin-left: 0; white-space: nowrap; }
.badge.plain { background: var(--soft); color: var(--text); font-weight: 600; }
.badge.fact { background: var(--fact-bg); color: var(--fact); } .badge.interp { background: var(--interp-bg); color: var(--interp); }
table.matrix td.zero { color: var(--zero); }
table.matrix tfoot th { border-top: 2px solid var(--line); padding: 9px 10px; text-align: left; }
table.list.findings a.strong { font-weight: 600; text-decoration: none; color: var(--text); }
table.list.findings a.strong:hover { color: var(--brand); text-decoration: underline; }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.filters label { font-size: 13px; font-weight: 600; color: var(--muted); }
.filters select { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; border: 1px solid var(--field);
  border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); background: var(--card); color: var(--text); }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.list-head p { margin: 0 0 12px; }
.chip { display: inline-block; background: var(--info-bg); color: var(--info); border-radius: 999px; padding: 2px 10px;
  margin: 0 4px 4px 0; text-decoration: none; font-size: 13px; font-weight: 600; }
.finding-title { font-size: 22px; line-height: 1.35; display: block; }
.finding-title .mono { font-size: 14px; font-weight: 400; }
.finding-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; }
.finding-tags .sev { font-size: 14px; padding: 3px 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big { font-size: 16px; }
ul.values li { margin-bottom: 2px; }
a.url, bdi.url { overflow-wrap: anywhere; }
.wrap { white-space: normal; word-break: break-all; }
table.kv.tight th { width: 150px; padding: 3px 8px 3px 0; font-size: 12px; }
table.kv.tight td { padding: 3px 0; font-size: 12px; }
.evidence { margin-bottom: 6px; }
.evidence details summary { font-size: 12px; color: var(--brand); }
.limit { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.limit p { margin: 4px 0; }
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.legend ul.plain { list-style: none; padding: 0; }
@media (max-width: 860px) {
  .filters { grid-template-columns: repeat(2, 1fr); } .two-col, .legend-grid { grid-template-columns: 1fr; }
  .tabs-end { margin-left: 0; width: 100%; padding: 4px 0 8px; }
}
/* T14 login + users */
.who { font-size: 14px; color: var(--muted); white-space: nowrap; }
form.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
button.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
.role-admin { background: var(--bad-bg); color: var(--bad); } .role-reviewer { background: var(--info-bg); color: var(--info); }
.role-viewer { background: var(--soft); color: var(--text); }
.login-wrap { max-width: 420px; margin: 40px auto; }
.form input[type=email], .form input[type=password], .form input[type=text] { display: block; width: 100%; margin-top: 6px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; box-sizing: border-box; }
form.inline input[type=password], form.inline select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 14px; }
form.inline input[type=password] { width: 150px; }
table.users tr.inactive td { color: var(--muted); }
table.users form.inline { margin-top: 4px; }
/* T15 review box */
.nowrap { white-space: nowrap; }
.review .review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.review details.review-action { flex: 0 0 auto; }
.review details.review-action[open] { flex: 1 1 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.review details.review-action > summary { list-style: none; }
.review details.review-action > summary::-webkit-details-marker { display: none; }
.review .review-form { margin-top: 10px; max-width: 640px; }
.review .review-form label { margin-bottom: 10px; }
.badge.wf { background: var(--soft); color: var(--text); }
.badge.wf-accepted, .badge.wf-assigned, .badge.wf-in_progress { background: var(--info-bg); color: var(--info); }
.badge.wf-fixed, .badge.wf-verified { background: var(--good-bg); color: var(--good); }
.badge.wf-rejected { background: var(--bad-bg); color: var(--bad); }
.badge.wf-deferred, .badge.wf-review_required { background: var(--warn-bg); color: var(--warn); }
.btn.ghost.danger { background: transparent; color: var(--bad); }
.btn.ghost.danger:hover { background: var(--bad-bg); }
.review details.review-action[open] { order: 99; }  /* the open form goes below the row of buttons */
/* T16 re-audit comparison */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stat .num { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat span:last-child { color: var(--muted); font-size: 13px; }
.stat.good .num { color: var(--good); } .stat.bad .num { color: var(--bad); } .stat.info .num { color: var(--info); }
.badge.cmp { background: var(--soft); color: var(--text); }
.badge.cmp-resolved { background: var(--good-bg); color: var(--good); }
.badge.cmp-new, .badge.cmp-recurring { background: var(--bad-bg); color: var(--bad); }
.badge.cmp-partially_resolved, .badge.cmp-cannot_be_verified { background: var(--warn-bg); color: var(--warn); }
.badge.cmp-unresolved { background: var(--info-bg); color: var(--info); }
.url-state { font-weight: 600; white-space: nowrap; }
.url-state.fixed { color: var(--good); } .url-state.new { color: var(--bad); } .url-state.unchecked { color: var(--warn); }
tr.carried td { background: var(--soft); }
.recheck { border-left: 4px solid var(--info); }
#comparison h3 { margin: 18px 0 6px; font-size: 15px; }
/* T18 settings page (existing look; T19 restyles) */
.settings-tools { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 12px; align-items: end; margin: 0 0 12px; }
.settings-tools label { font-size: 13px; font-weight: 600; color: var(--muted); }
.settings-tools input[type=search], .settings-tools select { display: block; width: 100%; margin-top: 4px; padding: 6px 8px;
  border: 1px solid var(--field); border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); background: var(--card); color: var(--text); }
.settings-tools .check { padding-bottom: 6px; }
table.settings-checks select { padding: 4px 6px; border: 1px solid var(--field); border-radius: 6px; font: inherit; font-size: 14px; }
table.settings-checks tr.group-row th { background: var(--soft); color: var(--text); font-size: 14px; }
table.settings-checks td.center { text-align: center; }
tr.changed td, tr.changed th { background: var(--hl-soft); }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 8px;
  box-shadow: 0 -2px 10px var(--shadow); }
form.dirty .savebar { border-color: var(--brand); }
.savebar-count { font-weight: 600; min-width: 150px; }
.savebar-why { display: flex !important; align-items: center; gap: 8px; flex: 1 1 320px; margin: 0 !important; font-weight: 600; }
.savebar-why input { flex: 1; padding: 7px 10px; border: 1px solid var(--field); border-radius: 8px; font: inherit; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.type-grid .check { margin: 0 !important; }
table.settings-general td { padding: 10px 0; }
table.settings-general input[type=number] { width: 120px; padding: 6px 8px; border: 1px solid var(--field); border-radius: 8px; font: inherit; }
table.settings-general select { width: auto; min-width: 120px; max-width: 360px; padding: 6px 8px; border: 1px solid var(--field); border-radius: 8px; font: inherit; } /* T25 time zone / clock: same size as the number boxes */
table.settings-general textarea { width: 100%; max-width: 480px; padding: 8px 10px; border: 1px solid var(--field); border-radius: 8px; font: inherit; }
.inline-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-row select { padding: 7px 10px; border: 1px solid var(--field); border-radius: 8px; font: inherit; }
@media (max-width: 720px) { .settings-tools { grid-template-columns: 1fr; } }
.rerate-result ul.plain { margin-top: 12px; }
/* ---- T19 Dwelleo Design System: base ---- */
body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
:lang(ar), bdi:dir(rtl) { font-family: "Almarai", var(--font-ui); }
a { color: var(--accent); text-underline-offset: 2px; } a:hover { color: var(--accent-hover); }
h1 { font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -0.4px; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.15px; } h3 { font-size: 16px; font-weight: 700; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.num, .stat .num, .counts dd, .mono-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 24px; box-shadow: none; }
.card.empty { padding: 48px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-pill);
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); padding: 10px 20px; font-weight: 700;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: scale(.98); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--field); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-soft-text); border-color: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn.ghost.danger { background: transparent; color: var(--bad); border-color: var(--field); }
.btn.ghost.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn:focus-visible, a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { color: var(--text); background: var(--card); }
.form input[type=email], .form input[type=password], .form input[type=text], .form input[type=number], .form select,
.form textarea { border: 1px solid var(--field); border-radius: var(--r-input); padding: 10px 14px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.badge { border-radius: var(--r-pill); padding: 3px 10px; font-size: 12px; font-weight: 700; }
.sev { border-radius: var(--r-pill); padding: 2px 10px; font-size: 12px; }
.badge.plain, .badge.wf, .badge.cmp { background: var(--soft); color: var(--text); }
.badge.wf-in_progress { background: var(--accent-soft); color: var(--accent-soft-text); }
.alert { border-radius: var(--r-input); }
.tabs a { color: var(--muted); } .tabs a:hover { color: var(--accent); } .tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs-end a { color: var(--accent); }
.settings-tools input, .settings-tools select, .filters select { font-weight: 400; border-radius: var(--r-input); }
.more summary { cursor: pointer; color: var(--text); font-weight: 700; }
.more summary::marker { color: var(--accent); }
.more[open] summary { margin-bottom: 12px; }
.more summary h2 { display: inline; font-size: 17px; margin: 0; }
.date-note { color: var(--muted); font-size: 13px; }
/* tables: hairlines, tiny grey uppercase headers, roomy top-aligned cells */
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
table.list th, table.list td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.list th:first-child, table.list td:first-child { padding-left: 0; }
table.list th:last-child, table.list td:last-child { padding-right: 0; }
.counts div, .steps li, .bar { background: var(--soft); }
/* ---- T19 shell: left sidebar (264px) + content ---- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  background: var(--side); border-right: 1px solid var(--line); padding: 24px 16px; }
.side .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-decoration: none; padding: 0 8px 20px; }
.brand-name { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.brand-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); color: var(--text);
  text-decoration: none; font-weight: 500; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.nav-item:hover { background: var(--soft); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-soft-text); font-weight: 700; }
.nav-item .icon { opacity: .9; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; }
.side-user .who { display: flex; flex-direction: column; gap: 4px; white-space: normal; color: var(--text); font-weight: 500; }
.side-user .badge { align-self: flex-start; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--field); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.content { min-width: 0; }
.content main { max-width: 1180px; margin: 0; padding: 40px 40px 64px; }
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; gap: 2px; align-self: flex-start; }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; padding: 4px 10px; border-radius: var(--r-pill); cursor: pointer; }
.theme-switch button .icon { width: 14px; height: 14px; }
.theme-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { flex-direction: row; align-items: center; padding-bottom: 8px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; } .nav-label { display: none; }
  .side-foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .content main { padding: 24px 16px 48px; } h1 { font-size: 28px; }
}
/* ---- KPI tiles (StatTile) ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 0 0 24px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px 20px; }
.tile-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.tile-value { display: block; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 700;
  line-height: 1.15; margin-top: 8px; letter-spacing: -0.5px; }
.tile-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.tile.urgent .tile-label .icon { color: var(--bad); } .tile.ok .tile-label .icon { color: var(--good); }
.tile .tile-label .icon { color: var(--accent); }
/* ---- T19 login: two-panel branded sign-in ---- */
.auth { display: grid; grid-template-columns: minmax(360px, 44%) 1fr; min-height: 100vh; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  gap: 32px; padding: 40px 48px; background: var(--panel); color: var(--panel-text); }
.auth-brand .logo { height: 32px; }
.auth-brand .logo-dark { display: block !important; } .auth-brand .logo-light { display: none !important; }
.auth-copy { position: relative; z-index: 1; max-width: 420px; }
.auth-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--panel-accent); margin: 0 0 14px; }
.auth-copy h1 { font-size: 50px; line-height: 1.05; color: var(--panel-text); margin: 0 0 16px; }
.auth-copy p { font-size: 18px; line-height: 1.5; color: var(--panel-muted); margin: 0; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--panel-muted); font-size: 15px; }
.auth-points li { display: flex; gap: 10px; align-items: center; } .auth-points .icon { color: var(--panel-accent); }
.auth-small { position: relative; z-index: 1; color: var(--panel-faint); font-size: 13px; margin: 0; }
/* subtle accent shapes, CSS only */
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand::before { content: ""; position: absolute; width: 640px; height: 640px; right: -260px; bottom: -280px;
  background: radial-gradient(closest-side, rgba(184,217,53,.26), rgba(184,217,53,0)); }
.auth-brand::after { content: ""; position: absolute; width: 560px; height: 560px; right: -200px; top: -260px;
  background: radial-gradient(closest-side, rgba(96,47,162,.55), rgba(96,47,162,0)); }
.auth-main { display: flex; flex-direction: column; background: var(--bg); padding: 24px 40px 40px; }
.auth-main .theme-switch { align-self: flex-end; }
.auth-card { width: 100%; max-width: 440px; margin: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 40px; }
.auth-card h2 { font-size: 28px; margin: 0 0 6px; }
.auth-card .lead { font-size: 15px; margin-bottom: 24px; }
.auth-card label { margin-bottom: 18px; }
.auth-card .btn { width: 100%; padding: 12px 20px; font-size: 16px; margin-top: 6px; }
.field-icon { position: relative; display: block; } .field-icon .icon { position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.form .field-icon input { padding-left: 42px; margin-top: 0; }
.auth-card .field-icon { margin-top: 6px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 16px 20px; flex-direction: row; align-items: center; }
  .auth-brand::before, .auth-brand::after, .auth-copy, .auth-small { display: none; }
  .auth-main { padding: 16px; } .auth-card { padding: 28px 20px; margin-top: 24px; }
}
.form input, .form select, .form textarea { font-weight: 400; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline-offset: 0; }
.side .brand span { margin-left: 0; } .brand-sub { color: var(--muted); }
/* the sidebar colour runs the full page height, also in long pages */
.shell { background: linear-gradient(90deg, var(--side) 0 263px, var(--line) 263px 264px, var(--bg) 264px); }
@media (max-width: 900px) { .shell { background: var(--bg); } }
/* ---- T25 round 1: Mahmoud's first-run review ---- */
/* (1) the page uses the whole width next to the menu: no empty band on the right */
.content main { max-width: none; }
/* (7) table headers: padding from the card edge, sentence case, a readable size */
table.list th, table.list td { padding: 14px 16px; }
table.list th:first-child, table.list td:first-child { padding-left: 16px; }
table.list th:last-child, table.list td:last-child { padding-right: 16px; }
table.list thead th { font-family: var(--font-num); font-size: 13px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--muted); white-space: nowrap; }
table.settings-checks thead th { white-space: normal; min-width: 96px; }
table.settings-checks thead th:first-child, table.settings-checks td.stack-main { min-width: 240px; }
.savebar-why { flex: 1 1 200px; } .savebar-why input { min-width: 120px; }
table.settings-checks tr.group-row th { padding: 12px 16px; font-family: var(--font-num); font-size: 14px; font-weight: 700;
  text-transform: none; letter-spacing: 0; color: var(--text); border-radius: 0; }
/* (6) one colour per severity, the same on badges and on the drop-downs: P0 solid red, P1 red, P2 orange, P3 grey */
:root { --sev0-bg: #ff4757; --sev0-text: #0f0a28; --sev1-bg: #482a2d; --sev1-text: #ff6b78; --sev2-bg: #48371f; --sev2-text: #ffa733;
  --sev3-bg: #393939; --sev3-text: #d3d3d3; }
:root[data-theme="light"] { --sev0-bg: #b3192a; --sev0-text: #ffffff; --sev1-bg: #ffe5e7; --sev1-text: #b3192a;
  --sev2-bg: #fff1db; --sev2-text: #9a4a00; --sev3-bg: #f0f2f5; --sev3-text: #3e4657; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --sev0-bg: #b3192a; --sev0-text: #ffffff;
  --sev1-bg: #ffe5e7; --sev1-text: #b3192a; --sev2-bg: #fff1db; --sev2-text: #9a4a00; --sev3-bg: #f0f2f5; --sev3-text: #3e4657; } }
.sev-P0 { background: var(--sev0-bg); color: var(--sev0-text); } .sev-P1 { background: var(--sev1-bg); color: var(--sev1-text); }
.sev-P2 { background: var(--sev2-bg); color: var(--sev2-text); } .sev-P3 { background: var(--sev3-bg); color: var(--sev3-text); }
.sev.sev-zero { background: transparent; color: var(--zero); box-shadow: inset 0 0 0 1px var(--line); }
.sev-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
select.sev-select { font-weight: 700; border-color: transparent !important; }
select.sev-select[data-sev="P0"] { background-color: var(--sev0-bg); color: var(--sev0-text); }
select.sev-select[data-sev="P1"] { background-color: var(--sev1-bg); color: var(--sev1-text); }
select.sev-select[data-sev="P2"] { background-color: var(--sev2-bg); color: var(--sev2-text); }
select.sev-select[data-sev="P3"] { background-color: var(--sev3-bg); color: var(--sev3-text); }
select.sev-select option { background: var(--card); color: var(--text); font-weight: 400; }
/* (2) side menu: latest audit pinned, opened audits below it */
.nav-date { font-weight: 400; color: var(--muted); letter-spacing: 0; text-transform: none; font-size: 12px; }
.nav-group-head { display: flex; align-items: center; gap: 2px; }
.nav-group-head .nav-item { flex: 1 1 auto; min-width: 0; }
.nav-remove { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; opacity: .6; }
.nav-remove .icon { width: 14px; height: 14px; }
.nav-remove:hover, .nav-remove:focus-visible { opacity: 1; color: var(--bad); background: var(--soft); }
.nav-sub { padding-left: 14px; margin-left: 12px; border-left: 1px solid var(--line); }
/* (5) include / exclude paths: lists you add to, remove from and drag between */
.paths-help { background: var(--soft); border-radius: var(--r-md); padding: 12px 16px; margin: 0 0 16px; font-size: 14px; }
.paths-help p { margin: 0 0 6px; } .paths-help p:last-child { margin: 0; }
.paths-box { display: block; margin-bottom: 16px; }
.paths-box > .paths-title { display: block; font-weight: 700; margin-bottom: 6px; }
.js .paths-box textarea[data-paths] { display: none; }
.path-list { list-style: none; margin: 0; padding: 8px; min-height: 120px; border: 1px dashed var(--field); border-radius: var(--r-input);
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.path-list.drop { border-color: var(--accent); background: var(--accent-soft); }
.path-list .empty { color: var(--muted); font-size: 13px; padding: 6px 4px; }
.path-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: var(--r-pill);
  background: var(--soft); border: 1px solid var(--line); font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px;
  cursor: grab; user-select: none; max-width: 100%; }
.path-chip.dragging { opacity: .4; }
.path-chip span { overflow-wrap: anywhere; }
.path-chip button { display: inline-flex; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 50%; }
.path-chip button:hover { color: var(--bad); background: var(--card); }
.path-chip button .icon { width: 14px; height: 14px; }
.paths-include .path-chip { background: var(--good-bg); color: var(--good); border-color: transparent; }
.paths-exclude .path-chip { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.path-add { display: flex; gap: 8px; margin-top: 8px; }
.form .path-add input[type=text] { margin-top: 0; flex: 1 1 auto; min-width: 0; font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.path-add .btn { flex: 0 0 auto; }
.path-err { color: var(--bad); font-size: 13px; margin-top: 4px; }
/* (T25) Pages affected folds away when long */
details.fold > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 10px; }
.fold-hint { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 14px; }
.fold-hint::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -4px; transition: transform 160ms var(--ease); }
details.fold[open] .fold-hint::after { transform: rotate(-135deg); margin-top: 4px; }
details.fold .when-open, details.fold[open] .when-closed { display: none; } details.fold[open] .when-open { display: inline; }
/* (T25) one-click Fixed / Not fixed on a finding */
.quick-review { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.quick-review .btn { padding: 10px 22px; }
.btn.quick-fixed { background: var(--good); border-color: var(--good); color: var(--card); }
.btn.quick-fixed:hover { background: var(--good); border-color: var(--good); filter: brightness(1.1); color: var(--card); }
.btn.quick-not { background: var(--bad); border-color: var(--bad); color: var(--card); }
.btn.quick-not:hover { background: var(--bad); border-color: var(--bad); filter: brightness(1.1); color: var(--card); }
.quick-review input[type=text] { flex: 1 1 220px; min-width: 0; padding: 9px 14px; border: 1px solid var(--field); border-radius: var(--r-input); font: inherit; }
.review-more > summary { font-size: 14px; }
.badge.wf-not_fixed { background: var(--bad-bg); color: var(--bad); }
/* (T25) status colours: fixed / verified green, not fixed red, needs review grey */
.badge.wf-fixed, .badge.wf-verified { background: var(--good-bg); color: var(--good); }
.badge.wf-not_fixed { background: var(--bad-bg); color: var(--bad); }
.badge.wf-review_required { background: var(--soft); color: var(--muted); }
/* (T25) findings grouped */
.group-by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 14px; }
.chip-toggle { display: inline-block; padding: 5px 14px; border-radius: var(--r-pill); border: 1px solid var(--field);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.chip-toggle:hover { border-color: var(--accent); color: var(--accent); }
.chip-toggle.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.finding-group > summary h2 { margin: 0; }
.finding-group > summary { flex-wrap: wrap; }
/* same column widths in every group, so the groups line up */
table.findings.fixed-cols { table-layout: fixed; min-width: 980px; }
table.findings col.c-sev { width: 130px; } table.findings col.c-area { width: 140px; } table.findings col.c-types { width: 120px; }
table.findings col.c-pages { width: 76px; } table.findings col.c-type { width: 130px; } table.findings col.c-owner { width: 120px; }
table.findings col.c-status { width: 120px; } table.findings col.c-cmp { width: 150px; }
table.findings.fixed-cols td { overflow-wrap: anywhere; }
@media (max-width: 820px) { table.findings.fixed-cols { min-width: 0; table-layout: auto; } table.findings colgroup { display: none; } }
/* (T25) Pages affected + findings groups with > 10 findings: 10 rows, then scroll */
.rows-10 { max-height: 640px; overflow-y: auto; }
.rows-10.short { max-height: none; }
.rows-10 thead th { position: sticky; top: 0; z-index: 1; background: var(--card); }
@media print { .rows-10 { max-height: none !important; overflow: visible; } }
.nav-two { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav-two .nav-date { margin-top: 1px; }
.recheck-note { max-width: 220px; line-height: 1.4; margin-top: 2px; }
/* T25: red "tell the tech team" warning (big production audits) */
.tech-warn { display: block; margin-top: 6px; color: var(--bad); font-size: 13px; font-weight: 600; }
.tech-warn[hidden] { display: none; }

/* T25: progress card time estimate (timer panel) */
.timer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .8fr); margin: 4px 0 18px;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.timer-cell { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; min-width: 0; }
.timer-cell + .timer-cell { border-left: 1px solid var(--line); }
.timer-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.clock { display: inline-flex; align-items: baseline; white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock .num { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--text); }
.clock .unit { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 8px 0 2px; }
.clock .unit:last-child { margin-right: 0; }
.timer-cell:nth-child(2) .clock::before, .timer-left .clock:not(.almost)::before {
  content: "~"; font-size: 20px; font-weight: 600; color: var(--muted); margin-right: 3px; }
.timer-left { background: var(--accent-soft); }
.timer-left .timer-label, .timer-left .clock .num, .timer-left .clock::before { color: var(--accent-soft-text); }
.timer-left .clock .unit { color: var(--accent-soft-text); opacity: .7; }
.clock.almost { font-size: 22px; font-weight: 700; color: var(--accent-soft-text); line-height: 1.3; }
.timer-ends .clock .num { font-size: 22px; line-height: 1.3; }
.timer-ends .icon { color: var(--accent); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: live-ping 1.6s ease-out infinite; }
@keyframes live-ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
.timer-track { grid-column: 1 / -1; height: 6px; background: var(--soft); border-top: 1px solid var(--line); }
.timer-track span { display: block; height: 100%; border-radius: 0 999px 999px 0; transition: width .6s ease;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover), var(--accent)); background-size: 200% 100%;
  animation: track-flow 2.4s linear infinite; }
@keyframes track-flow { from { background-position: 200% 0; } to { background-position: 0 0; } }
.timer-note { grid-column: 1 / -1; margin: 0; padding: 9px 20px 11px; font-size: 12px; color: var(--muted); background: var(--soft); }
.took { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px;
  background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600; }
.took .clock .num { font-size: 14px; font-weight: 700; letter-spacing: 0; }
.took .clock .unit { font-size: 12px; margin: 0 5px 0 1px; }
@media (max-width: 900px) {
  .timer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timer-cell:nth-child(3) { border-left: 0; }
  .timer-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .timer-cell { padding: 12px 14px; }
  .timer-label { font-size: 11px; letter-spacing: .04em; }
  .clock .num, .timer-ends .clock .num { font-size: 20px; }
  .clock .unit { margin: 0 4px 0 1px; }
  .timer-cell:nth-child(2) .clock::before, .timer-left .clock:not(.almost)::before { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .live-dot::after, .timer-track span { animation: none; } }

/* ---- T25 audits list design pass: run id, two-line start time, tabular numbers, real action buttons ---- */
.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; }
.audits-card { padding: 4px 0; }
table.audits tbody td { vertical-align: middle; transition: background-color 140ms var(--ease); }
table.audits tbody tr:hover td { background: color-mix(in srgb, var(--soft) 55%, transparent); }
table.audits th.c-id, table.audits td.c-id { width: 1%; white-space: nowrap; }
table.audits td.c-findings { white-space: nowrap; }
table.audits .c-by { width: 124px; min-width: 124px; }
table.audits .c-notes { min-width: 140px; }
table.audits th, table.audits td { padding-left: 8px; padding-right: 8px; }
table.audits th:first-child, table.audits td:first-child { padding-left: 16px; }
table.audits th:last-child, table.audits td:last-child { padding-right: 16px; }
.run-id { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; color: var(--text); }
.recheck-note { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 230px; line-height: 1.4;
  font-size: 13px; font-weight: 400; }
.recheck-tag { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); background: var(--info-bg); color: var(--info);
  font-size: 11px; font-weight: 700; white-space: nowrap; }
.recheck-note a { font-weight: 600; text-decoration: none; } .recheck-note a:hover { text-decoration: underline; }
.when { display: flex; flex-direction: column; line-height: 1.3; }
.when-date { white-space: nowrap; }
.when-date { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.when-time { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); margin-top: 2px; }
.th-sub { display: block; font-size: 11px; font-weight: 500; color: var(--muted); opacity: .85; margin-top: 1px; }
.status-cell { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.num-inline { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.pages-count strong { font-weight: 700; color: var(--text); }
.pages-count { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.pages-count .muted { font-size: 13px; }
table.audits .sev-line { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; }
table.audits .sev-line > strong { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 15px; }
table.audits .sev-pills { display: flex; flex-wrap: nowrap; gap: 4px; flex-basis: 100%; }
.run-by { font-weight: 500; }
table.audits th.c-actions, table.audits td.c-actions { width: 1%; }
.row-actions { display: grid; grid-template-columns: 94px 94px; gap: 6px; justify-content: end; }
.row-actions .btn { width: 100%; gap: 6px; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.row-actions .btn .icon { width: 15px; height: 15px; vertical-align: 0; }
.row-actions .btn.ghost .icon { opacity: .7; transition: transform 160ms var(--ease), opacity 160ms var(--ease); }
.row-actions .btn.ghost:hover .icon { opacity: 1; transform: translateX(2px); }
.btn-slot { display: block; }
@media (max-width: 820px) {
  .audits-card { padding: 4px 16px; }
  table.audits tbody tr:hover td { background: transparent; }
  table.audits .c-notes, table.audits .c-by { min-width: 0; width: 100%; }
  table.audits td.c-findings { white-space: normal; }
  table.audits .sev-pills { flex-wrap: wrap; }
  table.audits td.c-notes.is-empty { display: none; }
  .pages-count { flex-direction: row; gap: 4px; align-items: baseline; }
  .recheck-note { max-width: none; }
  table.audits th.c-actions, table.audits td.c-actions, table.audits td.c-id { width: 100%; }
  .when { flex-direction: row; flex-wrap: wrap; column-gap: 8px; white-space: normal; }
  .when-time { margin-top: 0; }
  .row-actions { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .row-actions .btn { min-height: 44px; font-size: 14px; }
  .row-actions:has(.btn-slot) { grid-template-columns: 1fr; }
  .btn-slot { display: none; }
}

/* ---- T24 Arabic: language switch + right-to-left layout --------------------------------------------------
   <html dir="rtl" lang="ar"> mirrors the page: the sidebar goes to the right, tables read right to left, the
   drawer slides in from the right, arrows point the other way. URLs, finding codes and numbers in evidence keep
   left-to-right inside Arabic text (bdi dir="ltr" in the templates). Arabic letters must never be spaced apart or
   upper-cased (the script is joined), so letter-spacing / text-transform are switched off in Arabic. ---- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; gap: 2px; align-self: flex-start; margin: 0; }
.lang-switch button, .lang-switch a { display: inline-flex; align-items: center; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); cursor: pointer; text-decoration: none; min-height: 30px; }
.lang-switch [aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.lang-switch [lang="ar"] { font-family: "Almarai", var(--font-ui); }
.side-foot .lang-switch { margin-bottom: 8px; }
.auth-switches { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.row-end .lang-switch { margin-inline-end: 8px; }
:lang(ar) { font-family: "Roc Grotesk", "Almarai", var(--font-ui); }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] .tile-value, [lang="ar"] .clock .num { letter-spacing: 0; }
[lang="ar"] table.list th, [lang="ar"] .nav-label, [lang="ar"] .auth-eyebrow, [lang="ar"] .timer-label,
[lang="ar"] table.stack td[data-label]::before { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .brand span { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .side .brand span { margin-right: 0; }
[dir="rtl"] .sev { margin-left: 0; }
[dir="rtl"] .sev-line strong { margin-right: 0; margin-left: 2px; }
[dir="rtl"] table.list th, [dir="rtl"] table.list td, [dir="rtl"] table.kv th, [dir="rtl"] table.matrix tfoot th { text-align: right; }
[dir="rtl"] .num { text-align: left !important; }
[dir="rtl"] table.kv th { padding: 7px 0 7px 10px; }
[dir="rtl"] .alert ul, [dir="rtl"] ul.plain { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .tabs-end { margin-left: 0; margin-right: auto; }
[dir="rtl"] .recheck { border-left: 0; border-right: 4px solid var(--info); }
[dir="rtl"] table.list th:first-child, [dir="rtl"] table.list td:first-child { padding-left: 16px; padding-right: 16px; }
[dir="rtl"] table.list th:last-child, [dir="rtl"] table.list td:last-child { padding-right: 16px; padding-left: 16px; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .shell { background: linear-gradient(270deg, var(--side) 0 263px, var(--line) 263px 264px, var(--bg) 264px); }
[dir="rtl"] .auth-brand::before, [dir="rtl"] .auth-brand::after { right: auto; left: -260px; }
[dir="rtl"] .field-icon .icon { left: auto; right: 14px; }
[dir="rtl"] .form .field-icon input { padding-left: 14px; padding-right: 42px; }
[dir="rtl"] .field-icon input[dir="ltr"] { text-align: right; }
[dir="rtl"] .nav-sub { padding-left: 0; margin-left: 0; border-left: 0; padding-right: 14px; margin-right: 12px; border-right: 1px solid var(--line); }
[dir="rtl"] .fold-hint { margin-left: 0; margin-right: auto; }
[dir="rtl"] .timer-cell + .timer-cell { border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] .clock { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] table.audits th:first-child, [dir="rtl"] table.audits td:first-child { padding-left: 8px; padding-right: 16px; }
[dir="rtl"] table.audits th:last-child, [dir="rtl"] table.audits td:last-child { padding-right: 8px; padding-left: 16px; }
[dir="rtl"] .icon-arrow, [dir="rtl"] .row-actions .btn.ghost .icon { transform: scaleX(-1); }
[dir="rtl"] .row-actions .btn.ghost:hover .icon { transform: scaleX(-1) translateX(2px); }
[dir="rtl"] .mono, [dir="rtl"] .run-id, [dir="rtl"] .when-date, [dir="rtl"] .when-time, [dir="rtl"] .finding-title .mono { unicode-bidi: isolate; }
[dir="rtl"] .muted.mono, [dir="rtl"] td.mono, [dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .form textarea[dir="ltr"], [dir="rtl"] .path-chip, [dir="rtl"] .path-add input { direction: ltr; text-align: left; }
@media (max-width: 900px) {
  [dir="rtl"] .mobile-brand .brand-name { padding-left: 0; border-left: 0; padding-right: 10px; border-right: 1px solid var(--line); }
  [dir="rtl"].js .side, .js[dir="rtl"] .side { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--line); transform: translateX(100%); }
  .js[dir="rtl"] .shell.nav-open .side { transform: none; }
  .js[dir="rtl"] .menu-close { right: auto; left: 16px; }
  [dir="rtl"] .tabs-end { margin-left: 0; margin-right: 12px; }
}
@media (max-width: 820px) {
  [dir="rtl"] table.stack td { text-align: right !important; }
  [dir="rtl"] table.stack td[data-label] { padding-left: 0 !important; padding-right: calc(min(36%, 170px) + 12px) !important; }
  [dir="rtl"] table.stack td[data-label]::before { left: auto; right: 0; }
  [dir="rtl"] table.settings-checks.stack td.center { text-align: right !important; }
}

/* Sign-in: show / hide password + remember me (2026-11-11) */
.pw-field input { padding-right: 46px; }
/* Edge / old IE draw their own reveal + clear buttons inside password fields: hide them, ours is the one */
.pw-field input::-ms-reveal, .pw-field input::-ms-clear { display: none; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex;
  align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle .icon { position: static; transform: none; pointer-events: none; }
.pw-toggle .pw-eye-off, .pw-toggle[aria-pressed="true"] .pw-eye { display: none; }
.pw-toggle[aria-pressed="true"] .pw-eye-off { display: inline-flex; }
.auth-card label.remember { display: flex; align-items: center; gap: 8px; margin: -4px 0 20px; font-weight: 400;
  cursor: pointer; }
.auth-card label.remember input { width: 16px; height: 16px; margin: 0; }
[dir="rtl"] .pw-field input { padding-right: 42px; padding-left: 46px; }
[dir="rtl"] .pw-toggle { right: auto; left: 6px; }

/* ---- T20 phone + tablet (<= 900px). Desktop above 900px is untouched. Same tokens, pills and radii. ---- */
.menu-close, .filters-toggle { display: none; }
@media (max-width: 900px) {
  .shell { align-content: start; }   /* short pages: the top bar keeps its height, the rest stays below */
  /* compact top bar; the sidebar becomes a drawer behind the menu button (only with JS; without it the old top block stays) */
  .js .mobile-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 16px; background: var(--side); border-bottom: 1px solid var(--line); }
  .mobile-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
  .mobile-brand .logo { height: 22px; }
  .mobile-brand .brand-name { font-size: 15px; padding-left: 10px; border-left: 1px solid var(--line); white-space: nowrap; }
  .menu-btn { width: 44px; height: 44px; color: var(--text); }
  .js .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; width: min(300px, 86vw); height: 100%;
    padding: 20px 16px; border-right: 1px solid var(--line); border-bottom: 0; overflow-y: auto;
    transform: translateX(-100%); visibility: hidden; transition: transform 200ms var(--ease), visibility 0s linear 200ms; }
  .js .shell.nav-open .side { transform: none; visibility: visible; transition: transform 200ms var(--ease); }
  .js .side .brand { flex-direction: column; align-items: flex-start; padding: 0 8px 12px; }
  .js .side nav { display: flex; flex-direction: column; gap: 2px; } .js .nav-label { display: block; }
  .js .nav-item { min-height: 44px; }
  .js .side-foot { flex-direction: column; align-items: stretch; }
  .js .menu-close { display: inline-flex; position: absolute; top: 16px; right: 16px; color: var(--text); }
  .scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim); backdrop-filter: blur(2px); }
  .scrim[hidden] { display: none; }
  html.no-scroll, html.no-scroll body { overflow: hidden; }
  /* one "Filters" button folds the filter block */
  .js .filters-toggle { display: inline-flex; margin: 0 0 12px; }
  .js .foldable:not(.open) { display: none; }
  /* report tabs: one line that scrolls inside itself, never the page */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .tabs-end { flex: 0 0 auto; width: auto; margin-left: 12px; white-space: nowrap; }
}
@media (max-width: 820px) {
  /* tables marked .stack become one card-like block per row: label on the left, value on the right */
  table.stack, table.stack tbody, table.stack tfoot, table.stack tr, table.stack td, table.stack tr > th { display: block; width: 100%; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack [hidden] { display: none !important; }
  table.stack tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.stack tbody:last-child tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 3px 0 !important; text-align: left !important; white-space: normal; }
  table.stack td[data-label] { position: relative; padding-left: calc(min(36%, 170px) + 12px) !important; min-height: 26px; }
  table.stack td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 6px; width: min(36%, 170px);
    font-family: var(--font-ui); font-size: 11px; font-weight: 700; line-height: 1.3; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted); }
  table.stack td.stack-main { font-size: 16px; font-weight: 600; padding-bottom: 6px !important; }
  table.stack td.stack-tag { padding-bottom: 6px !important; }
  table.stack td.stack-sub { padding-bottom: 6px !important; }
  table.stack td.stack-actions { padding-top: 8px !important; }
  table.stack td.stack-actions:empty { display: none; }
  table.stack td.stack-hide { display: none; }   /* secondary columns: on the finding page, not in the phone list */
  table.stack tr.group-row { padding: 12px 0 0; border-bottom: 0; }
  table.stack tbody:first-of-type tr.group-row { padding-top: 0; }
  table.stack tr.group-row th { padding: 8px 12px; border-radius: var(--r-md); }
  table.settings-checks.stack td[data-label] { min-height: 40px; }
  table.settings-checks.stack td.center { text-align: left !important; }
  table.matrix th:last-child, table.matrix td:last-child { display: none; }   /* the long hint column; the rest scrolls inside the card */
  table.stack td form.inline { flex-wrap: wrap; }
  table.stack td .mono { white-space: normal; overflow-wrap: anywhere; }
  table.list.urls td { overflow-wrap: anywhere; }
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .content main { padding: 20px 16px 40px; }
  h1 { font-size: 26px; letter-spacing: -0.2px; } h2 { font-size: 18px; }
  .lead { font-size: 15px; margin-bottom: 16px; }
  .page-head { align-items: flex-start; }
  .page-head .btn { width: 100%; }
  .card { padding: 16px; border-radius: var(--r-xl); }
  .card.empty { padding: 32px 16px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; } .tile-value { font-size: 28px; }
  .tile-sub { overflow-wrap: anywhere; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr; }
  table.kv th, table.kv td { display: block; width: auto; padding: 0; border: 0; }
  table.kv th { padding-top: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
  table.kv td { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  table.kv.tight th { width: auto; }
  .finding-title { font-size: 20px; }
  .finding-tags .badge { white-space: normal; }
  /* review + save: big pills a thumb can reach */
  .review .review-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .review details.review-action[open] { grid-column: 1 / -1; }
  .review details.review-action > summary.btn { width: 100%; min-height: 44px; }
  .review .review-form .btn { width: 100%; min-height: 44px; }
  .savebar { position: sticky; bottom: 8px; padding: 12px; border-radius: var(--r-xl); gap: 10px; }
  form:not(.dirty) > .savebar { position: static; }   /* it follows the thumb only once there is something to save */
  .savebar-count { min-width: 0; flex: 1 1 100%; }
  .savebar-why { flex: 1 1 100%; flex-wrap: wrap; } .savebar-why input { min-width: 0; width: 100%; }
  .savebar .btn { flex: 1 1 0; min-height: 44px; }
  .row-end .btn { min-height: 44px; }
  .form input[type=number], .form select { max-width: none; }
  form.inline input[type=password] { width: 100%; }
  /* sign-in: a slim logo header, the card fills the width right under it */
  .auth { grid-template-rows: auto 1fr; min-height: 100dvh; }
  .auth-brand { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .auth-brand .logo { height: 24px; }
  .auth-main { padding: 16px; gap: 16px; }
  .auth-main .theme-switch { order: 2; align-self: center; }
  .auth-card { margin: 0; padding: 24px 18px; border-radius: var(--r-xl); max-width: none; }
  .auth-card h2 { font-size: 24px; }
  .auth-card .btn { min-height: 48px; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .auth { grid-template-rows: auto 1fr; }   /* the logo header stays slim; the card sits centred below it */
}
