/* maw-ui.css - one skin for every myagentworkers.com dashboard.
 *
 * WHY: 21 pages were built separately over months. Measured 2026-12-01: 8 different dark
 * backgrounds (#0d1117, #0d1410, #0c1116, #0f1512 ...), 9 light ones, four font stacks, and
 * three different card radii. Nothing was wrong with any single page; the stack just had no
 * shared surface.
 *
 * HOW IT WINS WITHOUT A REWRITE: every dashboard already paints itself from CSS variables.
 * The variable names differ page to page but come from a small known set, so overriding the
 * union of those names at :root repaints the whole page - charts, tables, cards, nav - with no
 * markup change and no touched build logic. Everything below the token block is a light,
 * element-level normalisation for the things tokens cannot reach.
 *
 * RULES
 *  - loaded LAST, immediately before </head>, so it wins equal-specificity fights by order.
 *  - colours only from the two brand colours: green #1b5e3f, navy #1e3a5f. No teal, no lime.
 *  - one light theme. The market pages went dark for mood, not for legibility.
 *  - !important is allowed here and nowhere else: a skin has to be able to beat a page.
 *  - this file is the single source of truth for the look. Edit it, redeploy db.myagentworkers.com,
 *    every page changes on next load. No per-page CSS edits.
 */

:root {
  /* brand */
  --green: #1b5e3f;
  --green2: #2f8f63;
  --green-soft: #e7f2ec;
  --green-wash: #f1f7f3;
  --navy: #1e3a5f;
  --navy-soft: #eef2f7;

  /* surfaces - overrides every dark background in the fleet */
  --bg: #fbfcfb;
  --page: #fbfcfb;
  --card: #ffffff;
  --card2: #ffffff;
  --panel: #ffffff;
  --tile: #ffffff;

  /* text */
  --ink: #16211b;
  --fg: #16211b;
  --text: #16211b;
  --bright: #16211b;
  --muted: #5c6b62;
  --mut: #5c6b62;
  --dim: #6f7c73;

  /* lines */
  --line: #e1e7e2;
  --border: #e1e7e2;
  --rule: #e1e7e2;
  --navborder: #e1e7e2;

  /* state */
  --amber: #8a5a12;
  --red: #9c3232;
  --cyan: #1e3a5f;

  /* geometry + type, shared by all pages that read these */
  --radius: 12px;
  --radius-sm: 8px;
  --maw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maw-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- the page ---------- */
html { color-scheme: light; }
body {
  background: var(--bg) !important;
  color: var(--ink) !important;
  font-family: var(--maw-font) !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- headings: one scale for the whole stack ---------- */
h1, .h1, .title {
  font-family: var(--maw-font) !important;
  color: var(--navy) !important;
  font-size: clamp(23px, 2.6vw, 31px) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.015em !important;
  font-weight: 700 !important;
  margin: 0 0 10px !important;
}
h2, .h2 {
  font-family: var(--maw-font) !important;
  color: var(--green) !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  letter-spacing: 0.11em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  margin: 30px 0 10px !important;
  border-bottom: 1px solid var(--line) !important;
  padding-bottom: 6px !important;
}
h3, .h3 {
  font-family: var(--maw-font) !important;
  color: var(--ink) !important;
  font-size: 17px !important;
  letter-spacing: -0.005em !important;
  font-weight: 650 !important;
  margin: 18px 0 6px !important;
}
p, li, dd, dt, td, th, label, .prose { font-family: var(--maw-font) !important; }
p { color: var(--ink); }

/* a lead paragraph: the one sentence that says what the page answers */
.lead, .opener, .sub, .kicker + p, header > p:not(.asof):not(.kicker) {
  font-size: 17px !important;
  color: var(--ink) !important;
  max-width: 68ch;
}

/* the small label above the title */
.kicker, .eyebrow, .label, .asof, .stamp, .meta, .tiny {
  font-family: var(--maw-font) !important;
}
.kicker, .eyebrow {
  color: var(--green) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.13em !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.asof, .stamp, .meta {
  color: var(--muted) !important;
  font-size: 13px !important;
}

/* ---------- containers ---------- */
.card, .box, .panel, .tile, .block, .section-card, .note {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
}
.card, .box, .panel, .tile { padding: 16px 18px !important; }

/* ---------- tabs ---------- */
nav, .tabs, .tabbar, .maw-nav {
  font-family: var(--maw-font) !important;
}
nav a, .tab, .tabs a {
  font-weight: 650 !important;
  letter-spacing: 0.01em !important;
  color: var(--muted) !important;
  text-decoration: none !important;
}
nav a:hover, .tab:hover { color: var(--green) !important; }
nav a.here, nav a[aria-current], .tab.here, .tab.active, .tabs a.here {
  color: var(--green) !important;
  border-color: var(--green) !important;
}

/* ---------- links ---------- */
a { color: var(--navy); }
a:hover { color: var(--green); }

/* ---------- numbers read as numbers ---------- */
b, strong { font-weight: 700; }
.big, .num, .value, .metric, .stat b, .kpi {
  font-family: var(--maw-mono) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------- tables ---------- */
table { border-collapse: collapse; }
th, td { border-color: var(--line) !important; }
th {
  font-family: var(--maw-font) !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--muted) !important;
  font-weight: 700 !important;
  border-bottom: 1px solid var(--line) !important;
}

/* ---------- forms ---------- */
input, select, textarea, button {
  font-family: var(--maw-font) !important;
  font-size: 15px !important;
  border-radius: var(--radius-sm) !important;
}
input, select, textarea {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  padding: 9px 11px !important;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--green-soft) !important;
  border-color: var(--green2) !important;
}
button, .btn, input[type=submit] {
  background: var(--green) !important;
  color: #fff !important;
  border: 1px solid var(--green) !important;
  padding: 9px 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
button:hover, .btn:hover { background: #164d34 !important; }

/* ---------- status pills, shared vocabulary ---------- */
.maw-pill {
  display: inline-block;
  font: 700 11.5px/1 var(--maw-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}
.maw-pill.live { background: var(--green-soft); border-color: #cfe3d7; color: var(--green); }
.maw-pill.warn { background: #fbf3e6; border-color: #eddfc4; color: var(--amber); }
.maw-pill.bad  { background: #fbebeb; border-color: #eed3d3; color: var(--red); }

/* ---------- the standard header, for pages that adopt it ---------- */
.maw-head { margin: 0 0 20px; }
.maw-head .maw-kicker {
  margin: 0 0 6px;
  font: 700 12px/1.4 var(--maw-font);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--green);
}
.maw-head h1 { margin: 0 0 8px !important; }
.maw-head .maw-answer {
  margin: 0 0 8px;
  font: 400 17.5px/1.5 var(--maw-font);
  color: var(--ink);
  max-width: 66ch;
}
.maw-head .maw-meta {
  margin: 0;
  font: 400 13px/1.5 var(--maw-font);
  color: var(--muted);
}

@media (max-width: 560px) {
  body { font-size: 15.5px !important; }
  h2, .h2 { margin-top: 24px !important; }
}
