/* Atlas Reality reports. Colours carried over from the old theme: palette, positive #16a34a, negative #ef4444. */
:root {
  --bg: #fafafa; --card: #ffffff; --border: #e4e4e7; --text: #18181b; --muted: #71717a;
  --link: #1d4ed8; --positive: #16a34a; --negative: #ef4444; --accent: #154886;
  --info-bg: #eff6ff; --info-border: #bfdbfe; --warn-bg: #fffbeb; --warn-border: #fde68a;
  --radius: 8px; --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: #f4f4f5; padding: 0 4px; border-radius: 4px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--accent); }
.runmeta { font-size: 0.85rem; color: var(--muted); }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 48px); }
.layout.no-nav { grid-template-columns: minmax(0, 1fr); }
.sidenav { border-right: 1px solid var(--border); padding: 16px 12px; background: #fff; position: sticky; top: 48px; height: calc(100vh - 48px); overflow-y: auto; font-size: 0.9rem; }
.navgroup { margin: 14px 8px 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.navlink { display: block; padding: 5px 8px; border-radius: 6px; color: var(--text); }
.navlink:hover { background: #f4f4f5; text-decoration: none; }
.navlink.active { background: #e8eef7; color: var(--accent); font-weight: 600; }
.content { padding: 24px 28px 48px; max-width: 1400px; width: 100%; }
.foot { padding: 16px 28px; font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--border); background: #fff; }
h1 { font-size: 1.7rem; margin: 0 0 6px; }
h1 .title-suffix { font-weight: 400; color: var(--muted); }
h2 { font-size: 1.2rem; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
h3 { font-size: 1rem; margin: 18px 0 8px; }
.subtitle, .prose { color: #3f3f46; max-width: 1000px; }
.prose p, .subtitle p { margin: 8px 0; }
.muted { color: var(--muted); }
.bad { color: var(--negative); }
.section { margin-bottom: 8px; }
.row { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
.col { min-width: 0; grid-column: span var(--span, 1); }
.col.card, .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.chart { margin: 8px 0 12px; min-width: 0; }
.block-head { margin-bottom: 4px; }
.block-title { font-weight: 600; }
.block-subtitle { font-size: 0.82rem; color: var(--muted); }
.bigvalue { margin: 2px 0 6px; }
.bv-title { font-size: 0.82rem; color: var(--muted); }
.bv-value { font-size: 1.7rem; font-weight: 600; line-height: 1.2; }
.bv-xl .bv-value { font-size: 2.2rem; }
.bv-delta { font-size: 0.85rem; margin-top: 2px; }
.bv-delta.good { color: var(--positive); }
.bv-delta.bad { color: var(--negative); }
.bv-delta.flat { color: var(--muted); }
.bv-text { color: var(--muted); }
.value-line { font-weight: 600; margin: 4px 0; }
.callout { border: 1px solid var(--info-border); background: var(--info-bg); border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; font-size: 0.92rem; }
.callout-warning { border-color: var(--warn-border); background: var(--warn-bg); }
.callout-positive { border-color: #bbf7d0; background: #f0fdf4; }
.callout-negative { border-color: #fecaca; background: #fef2f2; }
.callout-title { font-weight: 600; margin-bottom: 4px; }
.callout-body p { margin: 4px 0; }
.table-block { margin: 12px 0 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f4f4f5; font-weight: 600; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tr.total td { font-weight: 600; background: #f4f4f5; border-top: 1px solid var(--border); }
.al-left { text-align: left; } .al-right { text-align: right; } .al-center { text-align: center; }
table.pivot th:first-child, table.pivot td:first-child { position: sticky; left: 0; background: inherit; }
.table-note { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.reportlist { list-style: none; padding: 0; margin: 0 0 16px; }
.reportlist li { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: baseline; }
.pill { font-size: 0.75rem; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 16px; }
}
@page { size: Letter landscape; margin: 10mm 8mm; }
@media print {
  html { font-size: 11px; }
  body { background: #fff; }
  .topbar, .sidenav, .foot a, .runmeta a { display: none; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  .foot { border: 0; padding: 8px 0; }
  .col.card, .card, .chart, .table-block, .callout, .bigvalue { break-inside: avoid; page-break-inside: avoid; }
  h2 { break-after: avoid; page-break-after: avoid; }
  .row { gap: 10px; }
  .table-wrap { overflow: visible; }
  th { position: static; }
  table.pivot th:first-child, table.pivot td:first-child { position: static; }
  a { color: inherit; }
}
