/* Owlie Energy public site. Plain CSS, light and dark; the chart's colours come from here too. */
:root {
  --bg: #fbfcfc; --surface: #ffffff; --text: #14262b; --muted: #557178; --line: #dfe8ea;
  --brand: #1d6f78; --brand-strong: #13535a; --accent: #6fb5a0; --missing: #b9c7ca; --partial: #9cc9cf;
  --on-brand: #ffffff; --tint: #e8f3f3; --tint-2: #f3f8f6; --hl: #2f8a5f; --focus: #f0a33a;
  --radius: 12px; --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1a1d; --surface: #13242a; --text: #e5eff1; --muted: #9ab4ba; --line: #24393f;
          --brand: #5fb8c1; --brand-strong: #8ed2d9; --accent: #7cc7b0; --missing: #4b6268; --partial: #3e7d85;
          --on-brand: #0e1a1d; --tint: #132a2f; --tint-2: #10221f; --hl: #7cc7b0; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-weight: 500; }
nav a.active, nav a:hover { color: var(--brand); }
.hero { padding: 64px 0 40px; background: linear-gradient(180deg, var(--tint) 0%, var(--tint-2) 70%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: center; }
.hero h1 { max-width: 16em; }
.hl { color: var(--hl); }
.proof { margin: 0; display: grid; gap: 10px; }
.proof div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.proof dt { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.proof dd { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .hero-row { grid-template-columns: 1fr; gap: 24px; } .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); } .proof dd { font-size: 1.2rem; } }
.eyebrow { color: var(--brand); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.actions { margin-top: 28px; }
.button { display: inline-block; padding: 11px 20px; border-radius: 999px; background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 600; margin: 0 8px 8px 0; }
.button.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.tile .big { font-size: 2.1rem; font-weight: 700; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.tile .what { font-weight: 600; }
.tile .note { color: var(--muted); font-size: .9rem; }
.chart-box { margin: 24px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.chart-box figcaption { color: var(--muted); font-size: .88rem; margin-top: 8px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--muted); font-size: 11px; }
svg.chart .bar { fill: var(--brand); }
svg.chart .bar-partial { fill: var(--partial); }
svg.chart .bar-missing { fill: none; stroke: var(--missing); stroke-dasharray: 3 3; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.how ol { padding-left: 1.2em; } .how li { margin: .5em 0; }
.empty { background: var(--surface); border: 1px dashed var(--missing); border-radius: var(--radius); padding: 16px; color: var(--muted); }
.small { color: var(--muted); font-size: .88rem; }
.page-head { padding-top: 40px; }
.prose { max-width: 820px; }
dl dt { font-weight: 700; margin-top: 1em; } dl dd { margin: .2em 0 0; color: var(--text); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--surface); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .9rem; }
tr.missing td { color: var(--muted); font-style: italic; }
.tag { font-size: .75rem; background: var(--partial); color: var(--text); padding: 1px 7px; border-radius: 999px; }
.foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 20px 0; color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { margin: .3em 0; }
@media (max-width: 720px) {
  .top-row { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
  .top nav { display: flex; gap: 18px; overflow-x: auto; white-space: nowrap; padding: 8px 0 10px; scrollbar-width: none; }
  .top nav a { margin: 0; }
  .hero { padding-top: 36px; }
}

/* Accessibility: a visible focus ring and a skip link for keyboard users */
a:focus-visible, .button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Mission, principles, operators, audiences */
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 18px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
.card .more { color: var(--brand); font-weight: 600; }
.why .grid3, .audiences .grid3 { margin-top: 0; }
.build { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.build > div { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 2px 18px 12px; }
.build h3 { margin-top: .9em; }
.steps li, .checks li { margin: .6em 0; }
ol.principles { list-style: none; padding: 0; counter-reset: p; }
ol.principles li { counter-increment: p; position: relative; padding-left: 3.2em; margin: 1.6em 0; }
ol.principles li::before { content: counter(p); position: absolute; left: 0; top: .1em; width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--tint); color: var(--brand-strong); font-weight: 700; display: grid; place-items: center; }
ol.principles h2 { font-size: 1.2rem; margin: 0 0 .3em; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; max-width: 420px; }
.foot-links a { color: var(--muted); }

/* Leaderboard (home): networks over the last 7 days, today so far included */
.leaders .small-lede { font-size: 1rem; }
table.leaderboard td.num, table.leaderboard th:nth-child(n+3):nth-child(-n+6) { text-align: right; font-variant-numeric: tabular-nums; }
table.leaderboard td.rank { color: var(--muted); width: 2.5em; }
table.leaderboard td.network { font-weight: 600; }
table.leaderboard td.strong { font-weight: 700; }
table.leaderboard td.spark-cell { width: 120px; }
.tag.new { background: var(--brand); color: var(--bg); font-weight: 600; }
svg.spark { display: block; }
svg.spark .bar { fill: var(--brand); }
svg.spark .bar-partial { fill: var(--partial); }
svg.spark .bar-missing { fill: none; stroke: var(--missing); stroke-dasharray: 2 2; }

/* Networks page: every UK network and its open-data status */
.coverage-line { margin-top: 12px; }
table.networks td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.networks td.network { font-weight: 600; }
table.networks td.muted { color: var(--muted); }
.status { font-size: .85rem; white-space: nowrap; }
.status.live { color: var(--brand-strong); font-weight: 600; }
.status.needs-access, .status.published { color: var(--text); }
.status.not-found { color: var(--muted); }
