/* Roof Hub–inspired tokens (Brand Guidelines + site look). Live CSS fetch blocked; hex from Roof Maxx Brand Guidelines. */

:root {
  --midnight: #003057;
  --cerulean: #0088bb;
  --burnt: #cc6c27;
  --gray: #9ea6b4;
  --ink: #0b1c2c;
  --muted: #5a6775;
  --paper: #ffffff;
  --fog: #f4f7fa;
  --line: #d9e2ea;
  --ok: #1f7a4c;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max: 1100px;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--fog);
  line-height: 1.45;
}

a {
  color: var(--cerulean);
}

.topbar {
  background: var(--midnight);
  color: #fff;
  padding: 0.85rem 1.25rem;
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-lockup img {
  height: 36px;
  width: auto;
  display: block;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  line-height: 1.25;
}

.brand span {
  display: block;
  color: #9ed0e8;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.asof {
  font-size: 0.85rem;
  opacity: 0.85;
}

.powered {
  max-width: var(--max);
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

.powered-by {
  font-weight: 600;
  color: var(--midnight);
  letter-spacing: 0.01em;
}

.hero {
  background: linear-gradient(160deg, var(--midnight) 0%, #014a7a 55%, var(--cerulean) 140%);
  color: #fff;
  padding: 2.25rem 1.25rem 2.5rem;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.hero p {
  margin: 0;
  max-width: 42rem;
  font-size: 1.05rem;
  opacity: 0.95;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.chip {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chip:hover,
.chip:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
  outline: none;
}

.chip.is-active {
  background: #fff;
  color: var(--midnight);
  border-color: #fff;
  font-weight: 700;
}

.period-anchor {
  scroll-margin-top: 1.25rem;
  border-radius: var(--radius);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.period-anchor.is-flash {
  background: rgba(0, 136, 187, 0.1);
  box-shadow: 0 0 0 2px var(--cerulean);
}

#july-spotlight {
  scroll-margin-top: 1.25rem;
}

#july-spotlight.is-flash {
  box-shadow: 0 0 0 2px var(--cerulean);
}

main {
  max-width: var(--max);
  margin: -1.5rem auto 3rem;
  padding: 0 1.25rem;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 48, 87, 0.04);
}

.kpi .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.kpi .value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--midnight);
  font-variant-numeric: tabular-nums;
}

.kpi .note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.kpi.accent .value {
  color: var(--burnt);
}

.kpi.good .value {
  color: var(--ok);
}

.section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.5rem;
  margin-bottom: 1rem;
}

.section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--midnight);
}

.section .lede {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 320px;
  overflow: hidden;
}

.chart-wrap.tall {
  height: 380px;
}

.chart-wrap canvas {
  max-width: 100% !important;
}

@media (max-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  main {
    padding: 0 0.75rem;
    margin-top: -1rem;
  }

  .section {
    padding: 1rem 0.9rem 1.15rem;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .kpi .value {
    font-size: 1.15rem;
    word-break: break-word;
  }

  .brand-lockup img {
    height: 28px;
  }

  .hero {
    padding: 1.5rem 1rem 2rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .chip {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
  }

  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 0.4rem 0.3rem;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

td.num,
th.num {
  text-align: right;
}

tr.highlight {
  background: rgba(0, 136, 187, 0.08);
}

tr.highlight td {
  font-weight: 700;
  color: var(--midnight);
}

.callout {
  border-left: 4px solid var(--burnt);
  background: #fff8f2;
  padding: 0.85rem 1rem;
  margin: 1rem 0 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout strong {
  color: var(--midnight);
}

.caveats {
  font-size: 0.85rem;
  color: var(--muted);
}

.caveats ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

footer {
  max-width: var(--max);
  margin: 0 auto 0.75rem;
  padding: 0 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

@media print {
  body {
    background: #fff;
  }
  .topbar,
  .hero {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  main {
    margin-top: 1rem;
  }
  .section {
    break-inside: avoid;
  }
}
