/* Sitelemetry print report surface. Loaded after every application theme layer. */
#printReport { display: none; }

@page {
  size: A4 portrait;
  margin: 15mm 13mm 18mm;
}

@media print {
  html.printing,
  html.printing body,
  html body.suite-app.printing,
  html body.suite-app[data-theme="dark"].printing,
  html body.suite-app[data-theme="light"].printing {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #17212b !important;
    color-scheme: light only !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
  }

  html body.printing > *:not(#printReport) { display: none !important; }

  html body.printing #printReport {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #17212b !important;
    color-scheme: light only !important;
    background: #ffffff !important;
  }

  html body.printing #printReport,
  html body.printing #printReport *,
  html body.printing #printReport *::before,
  html body.printing #printReport *::after {
    box-sizing: border-box;
    max-width: 100%;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-doc {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #17212b !important;
    background: #ffffff !important;
    font: 9.5pt/1.5 Arial, "Noto Sans", "Segoe UI", "Yu Gothic UI", Meiryo, "Microsoft YaHei UI", sans-serif;
    overflow-wrap: anywhere;
    word-break: break-word;
    orphans: 3;
    widows: 3;
  }

  #printReport:lang(ja) .print-doc {
    font-family: "Arial Unicode MS", "Microsoft YaHei", "Yu Gothic", sans-serif;
  }

  #printReport:lang(zh) .print-doc {
    font-family: "Microsoft YaHei", "Microsoft JhengHei", sans-serif;
  }

  .print-doc p,
  .print-doc h1,
  .print-doc h2,
  .print-doc h3,
  .print-doc h4,
  .print-doc dl,
  .print-doc dd,
  .print-doc ul { margin-top: 0; }

  .print-doc a {
    color: #075f52 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .print-cover {
    margin: 0 0 8mm;
    border-bottom: 1px solid #cbd8d4;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .print-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8mm;
    min-width: 0;
    padding-bottom: 5mm;
  }

  .print-brand-lockup {
    display: flex;
    align-items: center;
    gap: 3mm;
    min-width: 0;
  }

  .print-brand-mark {
    width: 9mm;
    height: 9mm;
    flex: 0 0 9mm;
    display: grid;
    place-items: center;
    border: 1.4px solid #075f52;
    border-radius: 2.2mm;
    color: #075f52;
    background: #ffffff;
    font-size: 11pt;
    font-weight: 800;
    line-height: 1;
  }

  .print-brand-name {
    min-width: 0;
    color: #17212b;
    font-size: 12pt;
    font-weight: 800;
    letter-spacing: -.01em;
  }

  .print-document-type {
    flex: 0 0 auto;
    padding: 1.5mm 3mm;
    border: 1px solid #a8bcb6;
    border-radius: 99px;
    color: #3d4b52;
    background: #ffffff;
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .print-title-block {
    min-width: 0;
    padding: 7mm 7mm 6mm;
    border-left: 2.4mm solid #087f68;
    background: #f2f7f5;
  }

  .print-title-block > p {
    margin-bottom: 2mm;
    color: #607078;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .print-title-block h1 {
    margin-bottom: 2.5mm;
    color: #142029;
    font-size: 23pt;
    line-height: 1.12;
    letter-spacing: -.025em;
  }

  .print-target {
    min-width: 0;
    color: #42515a;
    font-size: 9pt;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .print-cover-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 4.5mm 0 5mm;
  }

  .print-cover-meta > div {
    min-width: 0;
    padding: 2.2mm 4mm;
    border-left: 1px solid #d9e3df;
  }

  .print-cover-meta > div:nth-child(odd) { border-left: 0; padding-left: 0; }

  .print-cover-meta dt {
    margin: 0 0 .8mm;
    color: #64727a;
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .print-cover-meta dd {
    min-width: 0;
    margin-bottom: 0;
    color: #1f2b33;
    font-size: 8.7pt;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .print-section {
    min-width: 0;
    margin: 0 0 8mm;
  }

  .print-section-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 3mm;
    margin: 0 0 4mm;
    padding-bottom: 2.5mm;
    border-bottom: 1px solid #cbd8d4;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .print-section-heading > span {
    color: #087f68;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: .08em;
  }

  .print-section-heading h2 {
    min-width: 0;
    margin-bottom: 0;
    color: #17212b;
    font-size: 13.5pt;
    line-height: 1.2;
  }

  .print-section-heading > b {
    min-width: 8mm;
    padding: .7mm 2mm;
    border: 1px solid #b9c9c4;
    border-radius: 99px;
    color: #30413f;
    font-size: 8pt;
    text-align: center;
  }

  .print-summary {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr);
    gap: 4mm;
    min-width: 0;
  }

  .print-score-card,
  .print-severity-panel {
    min-width: 0;
    border: 1px solid #d8e2df;
    border-radius: 3mm;
    background: #ffffff;
  }

  .print-score-card {
    --print-tone: #087f68;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4mm;
    padding: 4mm;
  }

  .print-score-card.score-excellent { --print-tone: #087f5b; }
  .print-score-card.score-good { --print-tone: #18794e; }
  .print-score-card.score-watch { --print-tone: #8a6100; }
  .print-score-card.score-risk { --print-tone: #b54708; }
  .print-score-card.score-critical { --print-tone: #b42318; }

  .print-ring {
    position: relative;
    width: 27mm;
    height: 27mm;
    flex: 0 0 27mm;
    display: grid;
    place-content: center;
    border: 1px solid var(--print-tone);
    border-radius: 50%;
    background: conic-gradient(var(--print-tone) var(--score-angle), #e7edeb 0);
    text-align: center;
  }

  .print-ring::before {
    content: "";
    position: absolute;
    inset: 3.3mm;
    border-radius: 50%;
    background: #ffffff;
  }

  .print-ring strong,
  .print-ring span { position: relative; z-index: 1; }
  .print-ring strong { color: #17212b; font-size: 18pt; line-height: 1; }
  .print-ring span { margin-top: 1mm; color: #67757d; font-size: 7.5pt; }

  .print-score-copy { min-width: 0; }
  .print-score-copy > span,
  .print-panel-label {
    display: block;
    margin-bottom: 1.5mm;
    color: #64727a;
    font-size: 7.8pt;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .print-score-copy > strong { display: block; color: var(--print-tone); font-size: 14pt; line-height: 1.2; }
  .print-score-copy p { margin: 1.5mm 0 0; color: #4f5e66; font-size: 8.5pt; }

  .print-severity-panel { padding: 4mm; }
  .print-sev-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5mm; }

  .print-sev-item {
    min-width: 0;
    padding: 2mm 1.4mm;
    border: 1px solid #d8e2df;
    border-top: 2px solid #7a878e;
    border-radius: 1.5mm;
    text-align: center;
  }

  .print-sev-item.sev-critical { border-top-color: #b42318; }
  .print-sev-item.sev-high { border-top-color: #b54708; }
  .print-sev-item.sev-medium { border-top-color: #8a6100; }
  .print-sev-item.sev-low { border-top-color: #175cd3; }
  .print-sev-item.sev-info { border-top-color: #596771; }
  .print-sev-item span { display: block; color: #5f6d75; font-size: 6.7pt; font-weight: 700; overflow-wrap: anywhere; }
  .print-sev-item strong { display: block; margin-top: .6mm; color: #1b2730; font-size: 12pt; }

  .print-total-findings {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 2.5mm;
    padding-top: 2.5mm;
    border-top: 1px solid #e0e7e5;
    color: #4e5d65;
    font-size: 8pt;
    font-weight: 700;
  }

  .print-total-findings strong { color: #17212b; font-size: 12pt; }

  .print-hardening {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 3mm;
    margin-top: 3mm;
    padding: 3mm 4mm;
    border-left: 1.6mm solid #087f68;
    background: #f2f7f5;
    font-size: 8.5pt;
    break-inside: avoid-page;
  }

  .print-hardening > span { color: #4f5e66; font-weight: 700; }
  .print-hardening > strong { color: #075f52; font-size: 12pt; }
  .print-hardening > b { color: #26343c; }
  .print-hardening > p { grid-column: 1 / -1; margin: 0; color: #4f5e66; }

  .print-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5mm;
  }

  .print-kpi {
    min-width: 0;
    min-height: 21mm;
    padding: 3.5mm;
    border: 1px solid #d8e2df;
    border-radius: 2mm;
    background: #ffffff;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .print-kpi > span { display: block; color: #64727a; font-size: 7.7pt; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .print-kpi > strong { display: block; margin-top: 1mm; color: #17212b; font-size: 15pt; line-height: 1.15; overflow-wrap: anywhere; }
  .print-kpi > small { display: block; margin-top: 1.2mm; color: #5d6b73; font-size: 8pt; line-height: 1.4; overflow-wrap: anywhere; }

  .print-finding {
    min-width: 0;
    margin: 0 0 4mm;
    border: 1px solid #d8e2df;
    border-left: 1.6mm solid #7a878e;
    border-radius: 2mm;
    background: #ffffff;
  }

  .print-finding:not(.is-long) {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .print-finding.is-long { break-inside: auto; page-break-inside: auto; }
  .print-finding.sev-critical { border-left-color: #b42318; }
  .print-finding.sev-high { border-left-color: #b54708; }
  .print-finding.sev-medium { border-left-color: #8a6100; }
  .print-finding.sev-low { border-left-color: #175cd3; }
  .print-finding.sev-info { border-left-color: #596771; }

  .print-finding-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 3mm;
    min-width: 0;
    padding: 4mm 4mm 3mm;
    border-bottom: 1px solid #e0e7e5;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .print-finding-number {
    width: 7mm;
    height: 7mm;
    display: grid;
    place-items: center;
    border: 1px solid #b7c6c1;
    border-radius: 50%;
    color: #52616a;
    font-size: 7.2pt;
    font-weight: 800;
  }

  .print-finding-head > div { min-width: 0; }
  .print-finding-head h3 { margin: 0; color: #17212b; font-size: 11pt; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
  .print-finding-head p { margin: 1.2mm 0 0; color: #64727a; font-size: 7.8pt; overflow-wrap: anywhere; word-break: break-word; }

  .print-sev {
    flex: 0 0 auto;
    padding: 1mm 2.2mm;
    border: 1px solid currentColor;
    border-radius: 99px;
    background: #ffffff;
    font-size: 7.4pt;
    font-weight: 800;
    white-space: nowrap;
  }

  .print-sev.sev-critical { color: #a21b13; }
  .print-sev.sev-high { color: #a33d06; }
  .print-sev.sev-medium { color: #775400; }
  .print-sev.sev-low { color: #1756ad; }
  .print-sev.sev-info { color: #52616a; }

  .print-finding-body { min-width: 0; padding: 1mm 4mm 3.5mm; }

  .print-detail {
    min-width: 0;
    padding: 2.5mm 0;
    border-top: 1px solid #edf1f0;
    break-inside: auto;
  }

  .print-detail:first-child { border-top: 0; }
  .print-detail h4 { margin: 0 0 1mm; color: #52616a; font-size: 7.6pt; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; break-after: avoid-page; }
  .print-detail p { margin: 0; color: #26343c; font-size: 9pt; line-height: 1.52; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
  .print-detail-remediation { padding-left: 3mm; border-left: 1mm solid #7fb5a7; }
  .print-detail-references ul { margin: 0; padding-left: 5mm; }
  .print-detail-references li { margin: 1mm 0; color: #26343c; font-size: 8.4pt; overflow-wrap: anywhere; word-break: break-word; }

  .print-empty-state {
    padding: 12mm 8mm;
    border: 1px solid #c9d7d2;
    border-radius: 3mm;
    color: #355149;
    background: #f2f7f5;
    font-size: 11pt;
    font-weight: 700;
    text-align: center;
    break-inside: avoid-page;
  }

  .print-foot {
    position: static;
    min-width: 0;
    min-height: 8mm;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 3mm;
    margin-top: 2mm;
    padding-top: 2.5mm;
    border-top: 1px solid #cbd8d4;
    color: #5b6870;
    background: #ffffff;
    font-size: 7.6pt;
    line-height: 1.25;
    break-before: avoid-page;
    break-inside: avoid-page;
    page-break-before: avoid;
    page-break-inside: avoid;
  }

  .print-foot span { min-width: 0; overflow-wrap: anywhere; }
  .print-foot span:first-child { color: #075f52; font-weight: 800; }
  .print-foot span:nth-child(2) { text-align: center; }
  .print-foot span:last-child { text-align: right; }
}
