/* AD Report # 14 · Traffic Light (PingCastle health check - 1 x Global AD, live data only)
 * Hand-written for this report (not generated by Build-ReportStyles.ps1). Black and white with RAG status colours and
 * one neutral grey for information; Inter throughout. On screen the report is a stack of A4 sheets; printed (or saved
 * as PDF from the Print button) each sheet starts a new A4 page and the toolbar and filters drop out. */
:root {
  --bg: #E9E9E9; --paper: #FFFFFF; --tx: #111111; --tx2: #333333; --mut: #555555; --line: #DDDDDD; --track: #EEEEEE;
  --green: #1E8E3E; --amber: #F2A900; --red: #D93025; --grey: #8A8A8A; --red-tx: #B3261E; --amber-tx: #8A5A00; --lamp-off: #3A3A3A;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--tx); font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-size: 13px; line-height: 1.45; }
a { color: var(--tx); }
a:hover { color: var(--mut); }
.mono { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px; }
:focus-visible { outline: 2px solid var(--tx); outline-offset: 2px; }
.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; }

/* the toolbar above the sheets (screen only) */
.bar { position: sticky; top: 0; z-index: 5; background: var(--tx); color: #FFFFFF; }
.bar-in { max-width: 210mm; margin: 0 auto; padding: 10px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.bar a { color: #FFFFFF; text-decoration: none; }
.bar .crumb { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.bar .lamps { display: inline-flex; gap: 4px; }
.bar .lamps i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.bar nav a { color: #CCCCCC; }
.bar nav a:hover { color: #FFFFFF; }
.btn { font: 600 13px 'Inter', sans-serif; min-height: 38px; padding: 0 14px; border: 1px solid #FFFFFF; background: #FFFFFF; color: var(--tx); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: #DDDDDD; }
.bar a.btn, .bar a.btn:hover { color: var(--tx); text-decoration: none; }   /* the Print / PDF link: dark text on the white button */
@media (max-width: 860px) { .bar { position: static; } .bar-in { padding: 10px 16px; } }

/* A4 sheets */
.sheets { padding: 24px 0 48px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.sheet { width: 210mm; min-height: 297mm; background: var(--paper); padding: 16mm 17mm 12mm; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.sheet.flow { min-height: 0; }
.sheet { scroll-margin-top: 64px; }
@media (max-width: 860px) { .sheets { padding: 0; gap: 0; } .sheet { width: 100%; min-height: 0; padding: 24px 16px; box-shadow: none; border-bottom: 8px solid var(--bg); } }
.loading { padding: 40px; color: var(--mut); font-weight: 600; }
.err { padding: 14px; border: 2px solid var(--red); color: var(--red-tx); font-weight: 600; }

/* sheet header and footer */
.shead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid var(--tx); padding-bottom: 10px; }
.shead .l { display: flex; flex-direction: column; gap: 3px; }
.shead .k { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }
.shead .d { font-size: 18px; font-weight: 700; }
.shead .r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px; color: var(--tx2); text-align: right; }
.sfoot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.sfoot .live { font-size: 10.5px; color: var(--tx2); border-top: 1px solid var(--tx); padding-top: 8px; }
.sfoot .live b { color: var(--tx); }
.sfoot .pg { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--mut); }
h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.lab { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }
.sec-t { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); padding-bottom: 7px; border-bottom: 2px solid var(--tx); display: flex; justify-content: space-between; gap: 10px; }
.note { font-size: 11px; color: var(--mut); margin: 0; }

/* status dots and words */
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; background: var(--grey); }
.dot.g { background: var(--green); } .dot.a { background: var(--amber); } .dot.r { background: var(--red); } .dot.i { background: var(--grey); }
.dot.lg { width: 16px; height: 16px; }
.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }
.c-r { color: var(--red-tx); } .c-a { color: var(--amber-tx); } .c-m { color: var(--mut); }

/* management summary */
.overall { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 26px; align-items: center; border: 1px solid var(--tx); padding: 20px 24px; }
.light { display: flex; flex-direction: column; align-items: center; gap: 9px; background: var(--tx); border-radius: 38px; padding: 14px 0; width: 76px; justify-self: center; }
.light i { width: 38px; height: 38px; border-radius: 50%; background: var(--lamp-off); display: block; }
.light i.on.r { background: var(--red); box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.25); }
.light i.on.a { background: var(--amber); box-shadow: 0 0 0 4px rgba(242, 169, 0, 0.25); }
.light i.on.g { background: var(--green); box-shadow: 0 0 0 4px rgba(30, 142, 62, 0.25); }
.overall .t { display: flex; flex-direction: column; gap: 8px; }
.overall .big { font-size: 30px; font-weight: 800; line-height: 1.05; }
.overall p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tx2); }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.count { display: flex; flex-direction: column; gap: 3px; border-top: 4px solid var(--grey); padding-top: 8px; }
.count.r { border-top-color: var(--red); } .count.a { border-top-color: var(--amber); } .count.g { border-top-color: var(--green); }
.count .n { display: flex; align-items: center; gap: 9px; font-size: 32px; font-weight: 800; line-height: 1; }
.count b { font-size: 13px; }
.count span.s { font-size: 11px; color: var(--mut); }
@media (max-width: 640px) { .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overall { grid-template-columns: minmax(0, 1fr); } }
.areas { display: flex; flex-direction: column; }
.area { display: grid; grid-template-columns: 20px minmax(0, 1.2fr) 44px minmax(0, 1.6fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.area b.v { text-align: right; }
.area .trk { height: 8px; background: var(--track); position: relative; }
.area .trk i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--tx); }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; }
@media (max-width: 640px) { .two { grid-template-columns: minmax(0, 1fr); } }
.acts { display: flex; flex-direction: column; }
.act { display: grid; grid-template-columns: 16px minmax(0, 1fr) 36px; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: baseline; }
.act .dot { width: 9px; height: 9px; }
.act b.p { text-align: right; }
.act a { text-decoration: none; }
.act a:hover b { text-decoration: underline; }

/* the checklist */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: 600 13px 'Inter', sans-serif; min-height: 38px; padding: 0 14px; border: 1px solid var(--tx); background: var(--paper); color: var(--tx); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.filters button[aria-pressed="true"] { background: var(--tx); color: #FFFFFF; }
.tscroll { overflow-x: auto; }
table.ck { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
table.ck td { overflow-wrap: anywhere; }
table.ck th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx2); padding: 6px 8px; border-bottom: 2px solid var(--tx); }
table.ck th:first-child, table.ck td:first-child { padding-left: 0; }
table.ck th:last-child, table.ck td:last-child { padding-right: 0; text-align: right; }
table.ck td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ck td.ctl { font-weight: 600; }
table.ck td.ctl .exp { display: block; font-weight: 400; color: var(--mut); font-size: 11px; margin-top: 2px; }
table.ck td.src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.ck td.src .mono { font-size: 11px; }
table.ck tr.grp td { text-align: left !important; padding: 14px 0 5px; font-size: 15px; font-weight: 800; border-bottom: 1px solid var(--tx); }
table.ck tr.grp td span { font-size: 11px; font-weight: 600; color: var(--mut); margin-left: 8px; }
table.ck tr[hidden] { display: none; }
@media (max-width: 640px) { table.ck { min-width: 720px; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 11px; color: var(--tx2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 9px; height: 9px; }

/* rule details */
.rule { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); break-inside: avoid; scroll-margin-top: 70px; }
.rule .h { display: grid; grid-template-columns: 20px minmax(0, 1fr) 70px; gap: 10px; align-items: baseline; }
.rule .h b.id { font-size: 14px; }
.rule .h .p { text-align: right; font-weight: 700; }
.rule .body { padding-left: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 24px; font-size: 12px; }
.rule .body .w { grid-column: 1 / -1; }
.rule .body p { margin: 0; }
.rule .body .k { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); }
.rule .body ul { margin: 0; padding-left: 16px; }
@media (max-width: 640px) { .rule .body { grid-template-columns: minmax(0, 1fr); padding-left: 0; } }

/* print: one A4 page per sheet, no toolbar, no filters, every row shown */
@page {
  size: A4; margin: 12mm 0 14mm;
  /* page numbers at the foot of every printed page (Chrome and Edge 131+ draw @page margin boxes) */
  @bottom-center { content: "Page " counter(page) " of " counter(pages); font: 8pt 'Inter', Arial, sans-serif; color: #555555; vertical-align: top; padding-top: 3mm; }
}
@media print {
  body { background: #FFFFFF; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar, .filters, .noprint { display: none !important; }
  .sheets { padding: 0; gap: 0; display: block; }
  .sheet { width: 210mm; min-height: 270mm; padding: 0 17mm; box-shadow: none; break-after: page; page-break-after: always; }
  .sheet.flow { min-height: 0; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  table.ck tr[hidden] { display: table-row; }
  table.ck thead { display: table-header-group; }
  table.ck tr { break-inside: avoid; }
  table.ck tr.grp { break-after: avoid; page-break-after: avoid; }
  .sheet .counts, .sheet .overall { break-inside: avoid; }
  #summary { gap: 13px; }
  #summary h1 { font-size: 28px; }
  #summary .overall { padding: 14px 20px; }
  #summary .area { padding: 7px 0; }
  #summary .act { padding: 6px 0; }
  #scan { gap: 12px; }
  #scan .area { padding: 5px 0; }
  #scan .act { padding: 5px 0; }
  a { text-decoration: none; }
}
