/* Higi's own colours and type (app/src/css/app.css), light only like the app. */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #faf9f2;
  --surface: #ffffff;
  --heading: #004b50;
  --body: #244d4e;
  --secondary: #526968;
  --muted: #8fa19e;
  --rule: #e3e7e4;
  --grid: #eef0ec;
  --primary: #006b63;
  --primary-pressed: #00564f;
  --series: #006b63;
  --series-hover: #1f9a8f;
  --focus: #005fcc;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 15px/1.5 "Manrope", ui-sans-serif, system-ui, sans-serif;
}

h1, h2 { color: var(--heading); margin: 0; }

button {
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  padding: 6px 16px;
  cursor: pointer;
}
button:hover { background: var(--primary); color: #fff; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* -- header -------------------------------------------------------------- */

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 800;
  color: var(--heading);
}
.who { display: flex; align-items: center; gap: 12px; color: var(--secondary); min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who form { margin: 0; }

/* -- the figures --------------------------------------------------------- */

.stats { max-width: 1120px; margin: 0 auto; padding: 16px 16px 64px; }
.as-of { color: var(--secondary); margin: 8px 0 0; }

section { margin-top: 32px; }
h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.tile p { margin: 0; }
.tile .label { color: var(--secondary); font-weight: 600; font-size: 13px; }
.tile .value {
  color: var(--heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.tile .note { color: var(--secondary); font-size: 13px; margin-top: 4px; }

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 12px;
  margin-top: 12px;
}
.chart {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
.chart figcaption { font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 12px "Manrope", ui-sans-serif, system-ui, sans-serif; fill: var(--secondary); }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--muted); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .bar { fill: var(--series); }
.chart .col:hover .bar { fill: var(--series-hover); }
.chart .col:hover .hit { fill: var(--grid); fill-opacity: 0.6; }

details { margin-top: 8px; }
summary { color: var(--primary); font-weight: 600; cursor: pointer; font-size: 13px; }
details table { margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--grid); }
th { color: var(--secondary); font-weight: 600; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.empty { color: var(--secondary); margin: 0; }

/* -- sign-in ------------------------------------------------------------- */

.sign-in {
  max-width: 440px;
  margin: 0 auto;
  padding: 64px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.sign-in h1 { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; }
#status { margin: 0; min-height: 1.5em; color: var(--secondary); }
