/*
 * The console's one stylesheet.
 *
 * Two rules decide everything here. A figure and the sentence shown in place of a figure are the SAME visual
 * weight, because a greyed-out "no data" box trains a reader to skip it and then to assume zero. And no
 * bucket is red or amber except the one that means a phone tried and could not: colouring "partly applied"
 * amber - which every dashboard does - would tell a ministry the product is failing on the phones where it
 * is working.
 */

:root {
  --ink: #1b1b1f;
  --ink-soft: #55555f;
  --maroon: #7c0329;
  --maroon-soft: #f7e9ee;
  --cream: #fbf8f4;
  --line: #e6e0d8;
  --attention: #8a4b00;
  --attention-soft: #fdf1e3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px 16px 56px;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
}

#app { max-width: 760px; margin: 0 auto; }

.bar {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; font-size: 14px; color: var(--ink-soft);
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 22px 24px; margin-bottom: 16px;
}
.card.centred { text-align: center; }

h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; }
h2 { margin: 0 0 10px; font-size: 16px; }
p { margin: 0 0 10px; }

.muted { color: var(--ink-soft); font-size: 14px; }
.notice {
  background: var(--attention-soft); border-radius: 10px;
  padding: 10px 12px; color: var(--attention); font-size: 14px;
}

button.primary {
  margin-top: 12px; padding: 12px 26px; border: 0; border-radius: 999px;
  background: var(--maroon); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}

.link { color: var(--maroon); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.scopes { list-style: none; margin: 8px 0 0; padding: 0; }
.scopes li + li { margin-top: 8px; }
a.scope {
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit;
}
a.scope:hover { border-color: var(--maroon); }
a.scope strong { font-size: 16px; }

.period { font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.denominator { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/*
 * The absence of a figure, at the weight of a figure. Deliberately NOT a pale "no data" tile: a reader who
 * skims past this box is a reader who concludes zero, and zero is a claim about children that nobody made.
 */
.absence {
  margin: 16px 0; padding: 18px 20px;
  border: 2px solid var(--maroon); border-radius: 14px; background: var(--maroon-soft);
}
.absence-text { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }

.buckets { list-style: none; margin: 0; padding: 0; }
.buckets li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.buckets li + li { margin-top: 10px; }
.bucket { display: grid; grid-template-columns: 72px 1fr; grid-template-areas: "count label" "count meaning"; column-gap: 14px; }
.count { grid-area: count; font-size: 30px; font-weight: 700; line-height: 1.1; }
.label { grid-area: label; font-size: 15px; font-weight: 600; }
.meaning { grid-area: meaning; font-size: 13.5px; color: var(--ink-soft); }

/* 'expected' and 'quiet' are intentionally indistinguishable from normal: neither is a finding. */
.tone-normal .count, .tone-expected .count, .tone-quiet .count { color: var(--ink); }
.tone-attention { border-color: #e9c9a3; background: var(--attention-soft); }
.tone-attention .count { color: var(--attention); }

.caveat {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-soft);
}

.limits { background: #fff; }
.limits ul { margin: 0; padding-left: 20px; }
.limits li { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 8px; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f0ec; --ink-soft: #b4b0a8; --cream: #17161a; --line: #35323a;
    --maroon: #ff9bb4; --maroon-soft: #2c1620; --attention: #ffc98a; --attention-soft: #2e2213;
  }
  .card, .limits { background: #1f1e23; }
  .tone-attention { border-color: #5a4423; }
  button.primary { color: #17161a; }
}
