/* Created by Omar Rahiman - Inbound Creative Solutions LLC */
:root {
  --paper: #f6efe5;
  --surface: #ffffff;
  --sunken: #efe6d8;
  --ink: #2a2829;
  --muted: #6b635c;
  --line: #e5dacb;
  --brand: #5c7f71;
  --brand-strong: #44655a;
  --brand-ink: #ffffff;
  --brand-soft: #e1f3ec;
  --pascal: #7ae1bf;
  --espio: #f67599;
  --issue: #b8324a;
  --issue-fill: #f67599;
  --warning: #a0660f;
  --warning-fill: #e0a23a;
  --opportunity: #1e8567;
  --opportunity-fill: #7ae1bf;
  --good: #2f7a5c;
  --focus: #44655a;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'DIN Condensed', 'Arial Narrow', 'Barlow', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #1b1a1b;
    --surface: #2a2829;
    --sunken: #353233;
    --ink: #f6efe5;
    --muted: #b8aea3;
    --line: #454041;
    --brand: #8fb5a5;
    --brand-strong: #7ae1bf;
    --brand-ink: #1b1a1b;
    --brand-soft: #2f403a;
    --pascal: #7ae1bf;
    --espio: #f67599;
    --issue: #fa94b0;
    --issue-fill: #f67599;
    --warning: #e8b765;
    --warning-fill: #e0a23a;
    --opportunity: #7ae1bf;
    --opportunity-fill: #7ae1bf;
    --good: #8fe3bd;
    --focus: #7ae1bf;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
    --paper: #1b1a1b;
    --surface: #2a2829;
    --sunken: #353233;
    --ink: #f6efe5;
    --muted: #b8aea3;
    --line: #454041;
    --brand: #8fb5a5;
    --brand-strong: #7ae1bf;
    --brand-ink: #1b1a1b;
    --brand-soft: #2f403a;
    --pascal: #7ae1bf;
    --espio: #f67599;
    --issue: #fa94b0;
    --issue-fill: #f67599;
    --warning: #e8b765;
    --warning-fill: #e0a23a;
    --opportunity: #7ae1bf;
    --opportunity-fill: #7ae1bf;
    --good: #8fe3bd;
    --focus: #7ae1bf;
    color-scheme: dark;
  }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p { margin: 0; }
h1 { font: 600 2.3rem/1.05 var(--display); letter-spacing: 0.01em; text-transform: uppercase; color: var(--brand-strong); }
h2 { font: 600 1.3rem/1.2 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
h3 { font-size: 0.95rem; font-weight: 600; }
a { color: var(--brand-strong); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1 { display: inline-block; padding-bottom: 9px; border-bottom: 4px dotted var(--pascal); }
details.reset { display: inline-block; text-align: left; vertical-align: top; }
details.reset summary { list-style: none; }
details.reset summary::-webkit-details-marker { display: none; }
.reset-form { display: flex; gap: 6px; margin-top: 8px; }
.reset-form input { min-height: 34px; width: 190px; font-size: 0.88rem; }
.field .label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.sched { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sched select { min-height: 36px; padding: 0 28px 0 10px; font-size: 0.9rem; }
.sched-at { display: inline-flex; align-items: center; gap: 6px; }
.sched [hidden] { display: none !important; }
.sched-table td { vertical-align: top; }
.credit { display: flex; align-items: center; gap: 9px; margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.credit img { width: 20px; height: 20px; display: block; }
.credit strong { color: var(--ink); font-weight: 600; }
.credit a { text-decoration: none; }
.credit a:hover strong { text-decoration: underline; text-underline-offset: 2px; }
.login-art .credit { margin-top: 0; border-top: 0; padding-top: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num { text-align: right; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.break { overflow-wrap: anywhere; }

.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.shell.solo { grid-template-columns: minmax(0, 1fr); }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 13px; padding: 4px 8px; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand-name { display: block; font: 600 1.45rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--espio); }
.brand-tail { color: var(--brand); margin-left: 0.12em; }
.brand-sub { display: block; margin-top: 3px; font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.brand-mark { flex: none; width: 40px; height: auto; display: block; }
.rail-label { padding: 0 8px; font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.3; }
.rail-link:hover { background: var(--sunken); }
.rail-link[aria-current='page'] { background: var(--brand-soft); }
.rail-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.chip { flex: none; min-width: 34px; text-align: center; font-size: 0.8rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.chip.good { color: var(--good); }
.chip.fair { color: var(--warning); }
.chip.poor { color: var(--issue); }
.chip.none { color: var(--muted); }

.topbar { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.shell.solo .topbar { display: flex; }
main { padding: 30px 34px 60px; max-width: 1240px; width: 100%; }
.shell.solo main { margin: 0 auto; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head .meta { margin-top: 6px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.92rem/1 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--issue); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--brand-strong); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

select, input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='search'] {
  min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 0.95rem var(--font); max-width: 100%;
}
select:hover, input:hover { border-color: var(--muted); }
label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field input:not([type='checkbox']), .field select { width: 100%; }
.hint { color: var(--muted); font-size: 0.83rem; margin-top: 4px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--surface); margin-bottom: 18px; }
.notice.bad { border-left-color: var(--issue); }
.notice.ok { border-left-color: var(--good); }
.notice strong { display: block; }
.pulse { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--brand); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--muted); vertical-align: middle; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ledger { margin-bottom: 16px; padding: 24px 26px 22px; }
.ledger-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 26px; margin-bottom: 18px; }
.score { font-size: 4.6rem; line-height: 0.9; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.score.good { color: var(--good); }
.score.fair { color: var(--warning); }
.score.poor { color: var(--issue); }
.score-side { padding-bottom: 4px; }
.score-side strong { font-size: 1.05rem; }
.delta { font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--issue); }
.ledger-bar { display: flex; height: 30px; border-radius: 7px; overflow: hidden; background: var(--sunken); }
.ledger-bar > * { display: block; height: 100%; min-width: 3px; border-right: 2px solid var(--surface); }
.ledger-bar > *:last-child { border-right: 0; }
.seg-kept { background: var(--brand); }
.seg-Issue { background: var(--issue-fill); }
.seg-Warning { background: var(--warning-fill); }
.seg-Opportunity { background: var(--opportunity-fill); }
.seg-other { background: var(--muted); }
a.seg:hover, a.seg:focus-visible { filter: brightness(1.2); outline-offset: -2px; }
.ledger-scale { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: 0.78rem; }
.ledger-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 6px 26px; }
.ledger-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.ledger-list a { color: var(--ink); text-decoration: none; }
.ledger-list a:hover { text-decoration: underline; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 8px; }
details.how { margin-top: 16px; }
details.how summary { cursor: pointer; color: var(--brand-strong); font-weight: 500; width: fit-content; }
details.how p { margin-top: 8px; max-width: 72ch; color: var(--muted); }

.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; padding: 0; overflow: hidden; }
.stat { padding: 16px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 600 2.1rem/1.05 var(--display); }
.stat .t-Issue { color: var(--issue); }
.stat .t-Warning { color: var(--warning); }
.stat .t-Opportunity { color: var(--opportunity); }
.stat span { color: var(--muted); font-size: 0.88rem; }

.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 0.9rem; }
.bar-track { height: 14px; background: var(--sunken); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--brand); }
.bar-fill.c-3xx, .bar-fill.c-mid { background: var(--warning-fill); }
.bar-fill.c-4xx, .bar-fill.c-5xx, .bar-fill.c-bad { background: var(--issue-fill); }
.bar-fill.c-none { background: var(--muted); }
.bar-fill.c-ok { background: var(--brand); }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; }
.col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.col i { display: block; width: 100%; max-width: 46px; border-radius: 4px 4px 0 0; background: var(--brand); min-height: 2px; }
.col i.deep { background: var(--warning); }
.col em { font-style: normal; font-size: 0.74rem; color: var(--muted); }
.col span { font-size: 0.78rem; color: var(--muted); }
.split { display: flex; height: 18px; border-radius: 5px; overflow: hidden; background: var(--sunken); margin: 6px 0 12px; }
.split i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.88rem; }
.trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend .axis { stroke: var(--line); stroke-width: 1; }
.trend .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trend .area { fill: var(--brand); opacity: 0.1; }
.trend circle { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.trend circle.last { fill: var(--brand); }
.trend text { fill: var(--muted); font: 500 11px var(--font); }
.trend text.val { fill: var(--ink); font-weight: 600; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.seg-control { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg-control button { appearance: none; border: 0; border-right: 1px solid var(--line); background: none; color: var(--ink); font: 500 0.88rem var(--font); padding: 0 13px; min-height: 38px; cursor: pointer; }
.seg-control button:last-child { border-right: 0; }
.seg-control button[aria-pressed='true'] { background: var(--brand-soft); font-weight: 600; }
.toolbar input[type='search'] { flex: 1 1 200px; min-width: 160px; }
.table-wrap { overflow-x: auto; margin: 0 -22px -20px; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th { text-align: left; font-weight: 600; font-size: 0.82rem; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
th button { appearance: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
th button[aria-sort]::after { content: ' ↓'; }
th button[aria-sort='ascending']::after { content: ' ↑'; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child, th:first-child { padding-left: 22px; }
td:last-child, th:last-child { padding-right: 22px; }
tbody tr:last-child td { border-bottom: 0; }
tr.issue-row { cursor: pointer; }
tr.issue-row:hover td { background: var(--paper); }
.issue-name { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: 500 0.95rem var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.issue-name::before { content: '+'; display: inline-block; width: 16px; color: var(--muted); font-weight: 600; }
.issue-name[aria-expanded='true']::before { content: '−'; }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.Issue, .pill.High { color: var(--issue); }
.pill.Warning, .pill.Medium { color: var(--warning); }
.pill.Opportunity { color: var(--opportunity); }
.pill.Low { color: var(--muted); }
tr.detail td { background: var(--paper); padding: 16px 22px 20px 38px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; max-width: 1000px; }
.detail-grid p { max-width: 68ch; }
.url-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.86rem; }
.url-list li { padding: 3px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.empty { padding: 44px 24px; text-align: center; }
.empty h2 { font-size: 1.25rem; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 52ch; margin: 0 auto 18px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; }
.checks .mark { font-weight: 700; }
.checks .pass .mark { color: var(--good); }
.checks .fail .mark { color: var(--issue); }

.client-table td { vertical-align: middle; }
.client-table td:first-child { min-width: 230px; }
.client-table td:nth-child(8) { white-space: nowrap; }
.client-table .mini { display: flex; height: 8px; width: 120px; border-radius: 3px; overflow: hidden; background: var(--sunken); }
.client-table .mini i { display: block; height: 100%; background: var(--brand); }
.client-link { font-weight: 600; color: var(--ink); text-decoration: none; }
.client-link:hover { text-decoration: underline; }
.form-panel { max-width: 560px; }
.stack { display: grid; gap: 16px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; background: var(--sunken); padding: 8px 10px; border-radius: var(--radius-sm); overflow-wrap: anywhere; display: block; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background: var(--paper); color: var(--ink); border-right: 1px solid var(--line); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .ledger-bar { margin-top: 26px; }
.login-art .ledger-bar > * { border-right-color: var(--paper); }
.login-art h1 { font-size: 3.2rem; max-width: 13ch; }
.login-art h1 em { font-style: normal; color: var(--espio); }
.login-art p { color: var(--muted); max-width: 44ch; margin-top: 16px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 1.4rem; margin-bottom: 18px; }
.login-form { background: var(--surface); }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .rail-link { white-space: nowrap; }
  .rail-foot { flex-direction: row; flex-wrap: wrap; gap: 14px; border-top: 0; padding-top: 0; margin-top: 0; }
  main { padding: 22px 18px 48px; }
  .grid.two, .grid.three, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-bottom: 1px solid var(--line); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 32px 24px; }
  .score { font-size: 3.6rem; }
  .hide-sm { display: none; }
}

@media (max-width: 760px) {
  .seg-control { display: flex; width: 100%; }
  .seg-control button { flex: 1 1 auto; padding: 0 7px; font-size: 0.8rem; white-space: nowrap; }
  tr.detail td { padding: 16px 22px 20px; }
  .detail-grid { position: sticky; left: 22px; width: calc(100vw - 84px); }
}

.report { background: #fff; color: #2a2829; max-width: 8.5in; margin: 0 auto; padding: 0.55in 0.6in; }
.report .grid.two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.report .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report .strip .stat { border-bottom: 0; padding: 12px 14px; }
.report .stat b { font-size: 1.35rem; }
.report .panel { padding: 16px 18px; }
.report .ledger { padding: 18px 20px; }
.report .score { font-size: 3.6rem; }
.report .bar-row { grid-template-columns: 104px minmax(0, 1fr) 46px; font-size: 0.8rem; }
.report .cols { height: 110px; }
.report { font-size: 13.5px; }
.report .grid.three .bar-row { grid-template-columns: 66px minmax(0, 1fr) 34px; }
.report .cover { border-bottom: 4px solid #7ae1bf; padding-bottom: 18px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.report .cover h1 { font-size: 1.9rem; }
.report h2 { margin: 24px 0 10px; font-size: 1.1rem; }
.report .panel { break-inside: avoid; }
.report table { font-size: 0.82rem; }
.report td:first-child, .report th:first-child { padding-left: 8px; }
.report td, .report th { padding: 7px 8px; }
.report tr { break-inside: avoid; }
.report .fix { color: #6b635c; font-size: 0.8rem; margin-top: 3px; max-width: 80ch; }
.report-foot { margin-top: 26px; padding-top: 12px; border-top: 1px solid #e5dacb; color: #6b635c; font-size: 0.78rem; }
.report-credit { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: #6b635c; font-size: 0.78rem; }
.report-credit img { height: 22px; width: auto; display: block; }
.report .cover-brand { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 8px; }
.report .cover-brand img { width: 44px; height: auto; }
.print-bar { max-width: 8.5in; margin: 16px auto; display: flex; justify-content: space-between; gap: 10px; padding: 0 8px; }
@page { size: Letter; margin: 0; }
@media print {
  body { background: #fff; }
  .print-bar { display: none; }
  .report { max-width: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
