/* Aigeus brand: navy / blue / gold, severity colours as in the scanner PDF. */
:root {
  --navy: rgb(15, 34, 54);
  --blue: rgb(30, 136, 214);
  --gold: rgb(232, 176, 32);
  --text: rgb(33, 41, 52);
  --muted: rgb(100, 112, 128);
  --line: rgb(222, 227, 233);
  --zebra: rgb(246, 248, 251);
  --panel: rgb(241, 245, 249);
  --on-navy: rgb(148, 178, 209);
  --critical: rgb(153, 27, 27);
  --high: rgb(220, 38, 38);
  --medium: rgb(217, 119, 6);
  --low: rgb(37, 99, 235);
  --page: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: 30px; margin: 0; }
h2 { font-size: 20px; margin: 40px 0 14px; padding-bottom: 6px; border-bottom: 2px solid var(--gold); }
h3 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

.bar { background: var(--navy); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand img { height: 30px; display: block; }
.tagline { color: var(--on-navy); font-size: 13px; }

.head { padding: 28px 0 4px; }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.period { margin: 6px 0 0; color: var(--muted); }
.h1-sub { font-weight: 400; color: var(--blue); }

/* Login (live demo only) */
.signout { float: right; margin: 0; }
.tools-button { font: inherit; font-size: 13px; background: var(--panel); color: var(--navy); border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
.tools-button:hover { border-color: var(--blue); }
.login { max-width: 460px; margin: 48px auto; }
.login-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.login-form label { font-weight: 600; color: var(--navy); font-size: 14px; }
.login-form input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.login-form input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.login-form .button { border: 0; cursor: pointer; font: inherit; font-weight: 600; padding: 10px 14px; }
.note-warn { background: rgb(254, 246, 226); border-radius: 6px; padding: 8px 12px; }
@media print { .signout { display: none; } }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { border-radius: 8px; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; }
.tile .n { font-size: 32px; font-weight: 700; line-height: 1.1; }
.tile .l { font-size: 13px; opacity: .92; }
.tile.sev-critical { background: var(--critical); }
.tile.sev-high { background: var(--high); }
.tile.sev-medium { background: var(--medium); }
.tile.sev-low { background: var(--low); }

.figures { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 14px 0 8px; }
.figures div { background: var(--panel); border-radius: 8px; padding: 10px 14px; }
.figures dt { font-size: 12px; color: var(--muted); }
.figures dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: var(--navy); }

.report { border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; margin-bottom: 14px; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.badge { font-size: 12px; background: var(--panel); color: var(--navy); border-radius: 999px; padding: 3px 10px; }
.badge-ai { background: rgb(254, 246, 226); }
.report-title { font-weight: 600; margin: 4px 0 8px; }
.note { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.button { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 6px; font-weight: 600; }
.button:hover { background: var(--navy); }
.button.small { padding: 4px 11px; font-size: 13px; }
.report-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-row .report-head { margin-bottom: 0; }
.report-row h3::before { content: ""; display: inline-block; width: 1em; }

/* Collapsible reports */
details.report { padding: 0; }
details.report > summary { list-style: none; cursor: pointer; padding: 16px 20px; margin: 0; }
details.report > summary::-webkit-details-marker { display: none; }
details.report > summary h3::before, details.host > summary .host-ip::before, details.md-target > summary .mono::before {
  content: "▸"; display: inline-block; width: 1em; transition: transform .15s; }
details[open].report > summary h3::before, details[open].host > summary .host-ip::before, details[open].md-target > summary .mono::before {
  transform: rotate(90deg); }
details[open].report > summary { border-bottom: 1px solid var(--line); }
.report-body { padding: 4px 20px 16px; }
.tools { margin: 0 0 10px; }
.tools button { font: inherit; font-size: 13px; background: var(--panel); color: var(--navy); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.tools button:hover { border-color: var(--blue); }

/* Report text from the AI box, laid out like the scanner PDF */
.md-sec { margin-top: 22px; }
.md-h { font-size: 17px; color: var(--navy); margin: 0 0 10px; padding-bottom: 4px; border-bottom: 2px solid var(--gold); text-transform: uppercase; letter-spacing: .02em; }
.md-sub { font-size: 15px; color: var(--navy); margin: 16px 0 6px; }
details.md-target { margin: 14px 0 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
details.md-target > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; padding: 9px 14px; border-left: 6px solid var(--blue); }
details.md-target > summary::-webkit-details-marker { display: none; }
.md-count { color: var(--on-navy); font-size: 13px; }
.md-target-body { padding: 10px 14px 14px 26px; background: var(--zebra); }
.md-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.md-card.sev-critical { border-left-color: var(--critical); }
.md-card.sev-high { border-left-color: var(--high); }
.md-card.sev-medium { border-left-color: var(--medium); }
.md-card.sev-low { border-left-color: var(--low); }
.md-card-title { font-weight: 700; color: var(--navy); }
.md-card ul { margin: 8px 0; padding-left: 20px; }
.md-card p { margin: 8px 0; }
.md-card .pill { vertical-align: 1px; }
.md h1, .md h2, .md h3 { border: 0; margin: 18px 0 8px; font-size: 17px; }
.md table { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: 14px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--navy); color: #fff; font-size: 13px; border-color: var(--navy); }
.md td { overflow-wrap: anywhere; }
.md tr:last-child td strong { color: var(--navy); }
.md tr:nth-child(even) td { background: var(--zebra); }

.table-wrap { overflow-x: auto; }
table.findings { border-collapse: collapse; width: 100%; font-size: 14px; }
.findings th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); padding: 8px; }
.findings td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; }
.findings tr:nth-child(even) td { background: var(--zebra); }
.findings .title { display: block; }
.findings .kind { display: block; font-size: 12px; color: var(--muted); }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; color: #fff; }
.pill.sev-critical { background: var(--critical); }
.pill.sev-high { background: var(--high); }
.pill.sev-medium { background: var(--medium); }
.pill.sev-low { background: var(--low); }
.kev { font-size: 11px; font-weight: 700; color: var(--critical); text-transform: uppercase; }

/* Findings by device */
table.overview { border-collapse: collapse; width: 100%; font-size: 14px; margin-bottom: 8px; }
.overview th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); padding: 8px; }
.overview td { border-bottom: 1px solid var(--line); padding: 7px 8px; }
.overview thead th { background: var(--navy); color: #fff; border-bottom: 0; font-size: 13px; }
.overview tfoot th { background: var(--panel); color: var(--navy); font-size: 14px; border-top: 2px solid var(--line); padding: 8px; text-align: left; }
.overview tfoot th.num { text-align: center; }
.overview tr:nth-child(even) td { background: var(--zebra); }
.num { text-align: center; width: 84px; }
.cnt { display: inline-block; min-width: 26px; border-radius: 999px; padding: 1px 7px; color: #fff; font-weight: 700; font-size: 13px; }
.cnt.sev-critical { background: var(--critical); }
.cnt.sev-high { background: var(--high); }
.cnt.sev-medium { background: var(--medium); }
.cnt.sev-low { background: var(--low); }
.zero { color: var(--line); }
.kind-inline { font-size: 12px; color: var(--muted); }

details.host { margin-top: 10px; }
details.host > summary { list-style: none; cursor: pointer; }
details.host > summary::-webkit-details-marker { display: none; }
details.host:not([open]) > .host-bar { border-radius: 8px; }
.host-counts { display: flex; align-items: center; gap: 6px; }
.host-ip { color: #fff; font-weight: 700; font-size: 15px; }
.host-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy); color: #fff; border-radius: 8px 8px 0 0; padding: 9px 14px; border-left: 6px solid var(--muted); }
.host-bar h3 { color: #fff; font-size: 16px; }
.host-bar .site { color: var(--on-navy); font-size: 12px; font-weight: 400; }
.host-count { color: var(--on-navy); font-size: 13px; }
.host-bar.sev-critical { border-left-color: var(--critical); }
.host-bar.sev-high { border-left-color: var(--high); }
.host-bar.sev-medium { border-left-color: var(--medium); }
.host-bar.sev-low { border-left-color: var(--low); }
.host table.findings { border: 1px solid var(--line); border-top: 0; }
.findings .todo { display: block; margin-top: 4px; font-size: 13px; background: rgb(234, 244, 252); border-radius: 6px; padding: 5px 8px; }

.clients { padding: 0; list-style: none; }
.clients li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.foot { margin-top: 48px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .tagline { display: none; }
  h1 { font-size: 24px; }
  .num { width: auto; }
  /* Narrow screens: drop the less important columns of each device table. */
  .host .findings th:nth-child(5), .host .findings td:nth-child(5),
  .host .findings th:nth-child(6), .host .findings td:nth-child(6) { display: none; }
}

/* Printing or "save as PDF" from the browser. */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  .bar { background: none; border-bottom: 2px solid var(--gold); }
  .bar-inner { padding: 0 0 8px; }
  .brand img { height: 24px; filter: brightness(0); } /* the white wordmark would vanish on paper */
  .tagline { color: var(--muted); }
  .button, .tools { display: none; }
  details.md-target > summary::before, details summary h3::before, .host-ip::before, details.md-target summary .mono::before { content: none; }
  .md-card { break-inside: avoid; }
  .report, .tiles, .figures, .host-bar, tr { break-inside: avoid; }
  .host-bar { break-after: avoid; }
  h2 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  .table-wrap { overflow: visible; }
}
