/* ============================================================
   Uncost — Civic Components
   Cross-cutting, reusable furniture used across every template.
   Import AFTER colors_and_type.css:
     <link rel="stylesheet" href="/colors_and_type.css">
     <link rel="stylesheet" href="/ui_kits/components.css">
   ============================================================ */

/* ============================================================
   1. RECEIPTS-FIRST FURNITURE
   Any number, claim, or chart must carry its apparatus:
   a source, a last-updated date, a confidence tag, and — for
   any hypothetical figure — an "illustrative only" marker.
   These are first-class recurring components, never afterthoughts.
   ============================================================ */

/* The wrapper that binds a figure to its receipts. */
.rcpt {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The receipts row — sits under a figure/claim/chart. */
.rcpt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
}
.rcpt-row--hair { border-top: 1px solid var(--rule-soft); }
.theme-dark .rcpt-row,
.u-block--ink .rcpt-row { border-top-color: var(--cream); }

/* Source label: "SOURCE — …" */
.rcpt-src {
  letter-spacing: .04em;
  color: var(--fg-3);
}
.rcpt-src b {
  font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-right: 4px;
}
.u-block--ink .rcpt-src, .u-block--ink .rcpt-src b { color: var(--fg-2-on-ink); }

/* Last-updated date. */
.rcpt-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .04em;
  color: var(--fg-3);
}
.rcpt-updated::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--sage);
  display: inline-block;
}
.rcpt-updated--stale::before { background: var(--coral); }

/* Confidence tag — a bordered chip. confirmed / estimate / scenario / needs-refresh */
.rcpt-conf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1.5px solid var(--ink);
}
.rcpt-conf::before { content: ""; width: 8px; height: 8px; display: inline-block; }
.rcpt-conf--confirmed   { background: var(--sage);    color: var(--ink); }
.rcpt-conf--confirmed::before   { background: var(--ink); }
.rcpt-conf--estimate    { background: var(--wheat);   color: var(--ink); }
.rcpt-conf--estimate::before    { background: var(--ink); }
.rcpt-conf--scenario    { background: var(--ink-blue); color: var(--cream); border-color: var(--ink); }
.rcpt-conf--scenario::before    { background: var(--cream); }
.rcpt-conf--needs-refresh { background: var(--coral); color: var(--ink-on-coral); }
.rcpt-conf--needs-refresh::before { background: var(--ink); }

/* Illustrative-only marker — hatched, unmissable. For any hypothetical figure. */
.rcpt-illus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 3px 9px;
  border: 2px dashed var(--coral);
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 5px,
    rgba(214,74,30,.12) 5px, rgba(214,74,30,.12) 10px
  );
}
.u-block--ink .rcpt-illus { color: var(--cream); }

/* A figure that is entirely illustrative gets a coral left-rule + tint. */
.rcpt-figure--illus {
  border-left: 4px solid var(--coral);
  padding-left: 16px;
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 7px,
    rgba(214,74,30,.05) 7px, rgba(214,74,30,.05) 14px
  );
}

/* ============================================================
   2. STATUS LABELS
   Uncost distinguishes what is live, in development, and planned.
   Consistent treatment for cards, pages, and list items.
   ============================================================ */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  white-space: nowrap;
  line-height: 1;
}
.status::before {
  content: "";
  width: 8px; height: 8px;
  display: inline-block;
}
/* Live — sage, solid dot */
.status--live      { background: var(--sage); color: var(--ink); }
.status--live::before      { background: var(--ink); border-radius: 50%; }
/* In development — wheat, half dot feel via ring */
.status--dev       { background: var(--wheat); color: var(--ink); }
.status--dev::before       { background: var(--ink); }
/* Planned — cream, hollow dot */
.status--planned   { background: var(--cream); color: var(--fg-3); border-color: var(--rule-soft); }
.status--planned::before   { background: transparent; border: 2px solid var(--fg-3); width: 6px; height: 6px; }
/* On ink surfaces */
.u-block--ink .status--planned { background: transparent; color: var(--fg-3-on-ink); border-color: var(--rule-on-ink); }

/* Sector focus states (used on the sector hub) */
.status--focus  { background: var(--coral); color: var(--ink-on-coral); }
.status--focus::before  { background: var(--ink); }
.status--next   { background: var(--wheat); color: var(--ink); }
.status--next::before   { background: var(--ink); }
.status--future { background: var(--cream); color: var(--fg-3); border-color: var(--rule-soft); }
.status--future::before { background: transparent; border: 2px solid var(--fg-3); width:6px; height:6px; }
.status--dossier{ background: var(--ink); color: var(--cream); }
.status--dossier::before{ background: var(--coral); }

/* ============================================================
   3. SHARED PAGE FURNITURE (small helpers reused by templates)
   ============================================================ */
/* Reference number chip — PRJ-001, POL-001, etc. */
.refno {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

/* Small uppercase metadata label. */
.metalabel {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* KPI numeric card (dashboard family). */
.kpi {
  padding: 28px 24px;
  border-top: 4px solid var(--ink);
  border-right: 2px solid var(--ink);
  background: var(--cream);
}
.kpi .kpi-label { font-family: var(--font-body); font-size: 12px; letter-spacing:.1em; text-transform:uppercase; color: var(--fg-3); margin-bottom: 10px; }
.kpi .kpi-num   { font-family: var(--font-display); font-weight: 900; font-size: clamp(48px,6vw,84px); line-height:.85; letter-spacing:-.04em; font-variant-numeric: tabular-nums; }
.kpi .kpi-num--coral { color: var(--coral); }

/* ============================================================
   4. SHARED SITE HEADER + FOOTER
   The exact chrome used on the landing page and sector pages,
   so every template is consistent. Asset/link paths assume a
   page two levels deep (ui_kits/templates/…); override per-page
   if needed.
   ============================================================ */
.site-hdr {
  position: sticky; top: 0; z-index: 20;
  background: var(--cream); border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
}
.site-hdr .brand { display: flex; align-items: center; text-decoration: none; }
.site-hdr .brand img { height: 54px; width: auto; display: block; }
.site-hdr nav { display: flex; gap: 28px; align-items: center; }
.site-hdr nav a { font-family: var(--font-body); font-weight: 500; font-size: 15px; letter-spacing: -.005em; color: var(--ink); text-decoration: none; }
.site-hdr nav a:hover { color: var(--coral-deep); }
.site-hdr nav a.here { color: var(--coral-deep); }
.site-hdr .cta-btn { background: var(--coral); color: var(--ink-on-coral); padding: 10px 18px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .01em; text-decoration: none; border: 2px solid var(--ink); transition: background-color 80ms linear, color 80ms linear; }
.site-hdr .cta-btn:hover { background: var(--coral-deep); color: var(--cream); }
@media (max-width: 820px) { .site-hdr nav { display: none; } }

.site-foot { background: var(--ink); color: var(--cream); padding: 72px 28px 32px; border-top: 4px solid var(--coral); }
.site-foot .foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; margin-bottom: 56px; }
.site-foot .foot-grid img { height: 135px; width: auto; display: block; }
.site-foot .foot-tag { font-size: 14px; color: var(--fg-2-on-ink); margin-top: 18px; max-width: 260px; line-height: 1.55; }
.site-foot .foot-col h4 { font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3-on-ink); margin: 0 0 14px; }
.site-foot .foot-col a { display: block; padding: 6px 0; font-size: 15px; color: var(--cream); text-decoration: none; }
.site-foot .foot-col a:hover { color: var(--coral-on-ink); }
.site-foot .foot-bar { border-top: 2px solid rgba(237,234,227,.2); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--fg-3-on-ink); }
@media (max-width: 820px) { .site-foot .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-foot .foot-grid { grid-template-columns: 1fr; } }
