/* IR Packet sample reports — self-contained styling that mirrors the portal look.
   Samples only: the real feature will render through the shared report-module stack. */
:root {
  --bg: #f9fafb;
  --card: #ffffff;
  --border: #e5e7eb;
  --ink: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --accent: #4f46e5;
  --accent-bg: #eef2ff;
  --good: #059669;
  --good-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --unknown: #6b7280;
  --unknown-bg: #f3f4f6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.sample-banner {
  background: #fde68a;
  color: #78350f;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
}

.report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
}
h1 { font-size: 1.55rem; font-weight: 700; margin: 0; line-height: 1.25; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.2rem 0 0.4rem; }
p { margin: 0 0 0.9rem; }
.subtitle { color: var(--muted); margin-top: 0.25rem; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.75rem 0 1.5rem;
  font-variant-numeric: tabular-nums;
}
.meta-row strong { color: var(--ink); font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin: 1rem 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}
.chip.accent { color: var(--accent); background: var(--accent-bg); }
.chip.good { color: var(--good); background: var(--good-bg); }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
.chip.bad { color: var(--bad); background: var(--bad-bg); }
.chip.unknown { color: var(--unknown); background: var(--unknown-bg); }

table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
.table-wrap { overflow-x: auto; }
th, td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  background: var(--bg);
}
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.basis {
  font-size: 0.78rem;
  color: var(--faint);
}

ul { padding-left: 1.25rem; margin: 0 0 0.9rem; }
li { margin-bottom: 0.35rem; }

.disclaimer {
  border-left: 3px solid var(--warn);
  background: var(--warn-bg);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 1.1rem;
  font-size: 0.85rem;
  color: #78350f;
  margin: 1.5rem 0;
}

.footer-note {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--faint);
}

.backlink { font-size: 0.85rem; }
a { color: var(--accent); }

/* Kill-chain phase bar */
.kc-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 1rem 0 0.3rem;
}
.kc-phase {
  border-radius: 6px;
  padding: 0.5rem 0.4rem 0.45rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.kc-phase .pct { display: block; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.kc-good { background: var(--good-bg); color: var(--good); }
.kc-warn { background: var(--warn-bg); color: var(--warn); }
.kc-bad  { background: var(--bad-bg); color: var(--bad); }
.kc-na   { background: var(--unknown-bg); color: var(--faint); }
.kc-caption { font-size: 0.72rem; color: var(--faint); text-align: center; margin-bottom: 1rem; }

@media (max-width: 640px) {
  .kc-bar { grid-template-columns: repeat(4, 1fr); }
}
/* Print / PDF rendering. The shipped feature renders these through the report
   stack; this styling previews the PDF the packet ZIP would contain. */
.print-head { display: none; }
@media print {
  @page { size: letter; margin: 0.6in; }
  body {
    background: #fff;
    font-size: 12.5px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  main { max-width: none; padding: 0; }
  .sample-banner {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 0.6rem;
  }
  .print-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
    margin-bottom: 0.8rem;
  }
  .backlink { display: none; }
  /* Cards must flow across pages: an unbreakable tall card gets pushed whole
     to the next page, stranding half the previous page as whitespace. Rows
     and headings stay atomic; borders clone on the fragment edges. */
  .card {
    break-inside: auto;
    box-shadow: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }
  h2 { break-after: avoid-page; }
  h3 { break-after: avoid-page; }
  tr, li, .kc-bar { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
