/* Maineblock design tokens and base components.
   A SUGGESTED starting point, not a requirement. Adapt case by case.
   Every value is a variable so the site's existing styles can override it. */

/* NOTE (staging, 2026-11-18): the Google Fonts @import that shipped in
   this file was removed. The contract requires house fonts only,
   self-hosted from assets/fonts/, and no Google Fonts anywhere.
   The font faces live in assets/staging.css. */

:root {
  /* Ink and paper: cool neutrals, so the brand orange carries all the warmth. */
  --mb-ink: #15171c;          /* primary text */
  --mb-ink-2: #3d424c;        /* secondary text */
  --mb-ink-3: #5f6573;        /* muted text (meets 4.5:1 on white) */
  --mb-paper: #ffffff;
  --mb-paper-2: #f5f6f8;      /* quiet surface for bands and table heads */
  --mb-rule: #e2e4e8;         /* hairlines and borders */
  --mb-rule-strong: #c9cdd4;
  --mb-header: #232427;       /* the existing site header */

  /* Brand: one meaning only. Orange = "the place you are looking at". */
  --mb-brand: #f29b26;        /* fills, marks, the focus entity in charts */
  --mb-brand-ink: #9c5200;    /* orange for text and links on white */
  --mb-brand-wash: #fff3e2;   /* a light tint for the focus entity's background */

  /* Comparison marks in charts: neutral, so they never compete with the focus. */
  --mb-compare: #8b919c;      /* rest of state / peers */
  --mb-nation: #3d424c;       /* United States */

  /* Map palettes (colorblind-safe). Sequential teal for magnitude. */
  --mb-seq-1: #eaf4f4; --mb-seq-2: #c7e3e3; --mb-seq-3: #97cbcc; --mb-seq-4: #5fadb0;
  --mb-seq-5: #2e8a90; --mb-seq-6: #136970; --mb-seq-7: #0b4a50;
  /* Diverging (below / above a reference): brown to teal through grey. */
  --mb-div-neg-2: #8c510a; --mb-div-neg-1: #d8b365; --mb-div-mid: #ecedef;
  --mb-div-pos-1: #5ab4ac; --mb-div-pos-2: #01665e;

  /* Status: used sparingly, always with text, never color alone. */
  --mb-caution: #8a5a00;  --mb-caution-wash: #fff6e0;
  --mb-withheld: #5f6573; --mb-withheld-wash: #f1f2f4;
  --mb-error: #a1251b;    --mb-error-wash: #fdecea;

  /* Type */
  --mb-font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mb-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mb-fs-xs: 12px; --mb-fs-sm: 14px; --mb-fs-md: 16px; --mb-fs-lg: 18px;
  --mb-fs-xl: 22px; --mb-fs-2xl: 28px; --mb-fs-3xl: 36px; --mb-fs-4xl: 48px; --mb-fs-5xl: 60px;
  --mb-measure: 68ch;   /* body text line length */

  /* Space (4-point scale) */
  --mb-s1: 4px; --mb-s2: 8px; --mb-s3: 12px; --mb-s4: 16px; --mb-s5: 24px;
  --mb-s6: 32px; --mb-s7: 48px; --mb-s8: 64px; --mb-s9: 96px;

  /* Radius by role, not one radius everywhere */
  --mb-r-control: 8px;   /* inputs, buttons, badges */
  --mb-r-panel: 14px;    /* panels and tables */
  --mb-r-band: 22px;     /* full-width feature bands */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mb-paper); color: var(--mb-ink); font-family: var(--mb-font-body); font-size: var(--mb-fs-md); line-height: 1.55; }
a { color: var(--mb-brand-ink); text-underline-offset: 3px; }
a:hover { color: #6e3a00; }
:focus-visible { outline: 3px solid var(--mb-brand); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.mb-container { max-width: 1200px; margin: 0 auto; padding: 0 var(--mb-s6); }
@media (max-width: 640px) { .mb-container { padding: 0 var(--mb-s4); } }
.mb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mb-num { font-variant-numeric: tabular-nums lining-nums; }

/* Headings: the display face carries the personality; body stays Inter. */
.mb-h1 { font-family: var(--mb-font-display); font-size: var(--mb-fs-5xl); line-height: 1.02; letter-spacing: -0.025em; font-weight: 700; margin: 0; }
.mb-h2 { font-family: var(--mb-font-display); font-size: var(--mb-fs-2xl); line-height: 1.15; letter-spacing: -0.01em; font-weight: 600; margin: 0 0 var(--mb-s4); }
.mb-h3 { font-size: var(--mb-fs-lg); line-height: 1.3; font-weight: 600; margin: 0 0 var(--mb-s2); }
.mb-lede { font-size: var(--mb-fs-lg); color: var(--mb-ink-2); max-width: var(--mb-measure); margin: var(--mb-s4) 0 0; }
.mb-meta { font-size: var(--mb-fs-sm); color: var(--mb-ink-3); }
@media (max-width: 640px) { .mb-h1 { font-size: 40px; } }

/* Site header (matches the existing dark bar) */
.mb-site-header { background: var(--mb-header); color: #f2f1ee; }
.mb-site-header .mb-container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: var(--mb-s5); }
.mb-site-header nav a { color: #e6e4df; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: var(--mb-fs-sm); }
.mb-site-header nav a[aria-current="page"] { background: #3a3b3f; color: #fff; }
@media (max-width: 720px) { .mb-site-header nav { display: none; } }

/* Buttons */
.mb-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--mb-s2); min-height: 44px; padding: 0 var(--mb-s4); border-radius: var(--mb-r-control); font: inherit; font-weight: 600; font-size: var(--mb-fs-md); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.mb-btn--primary { background: var(--mb-brand); color: var(--mb-ink); }
.mb-btn--primary:hover { background: #e58b12; color: var(--mb-ink); }
.mb-btn--secondary { background: var(--mb-paper); color: var(--mb-ink); border-color: var(--mb-rule-strong); }
.mb-btn--quiet { background: transparent; color: var(--mb-brand-ink); padding: 0 var(--mb-s2); }

/* Inputs */
.mb-field { display: flex; flex-direction: column; gap: var(--mb-s2); }
.mb-field label { font-weight: 600; font-size: var(--mb-fs-sm); }
.mb-input, .mb-select { font: inherit; min-height: 44px; padding: 0 var(--mb-s3); border: 1.5px solid var(--mb-rule-strong); border-radius: var(--mb-r-control); background: var(--mb-paper); color: var(--mb-ink); }
.mb-search { display: flex; align-items: center; gap: var(--mb-s2); border: 1.5px solid var(--mb-rule-strong); border-radius: var(--mb-r-control); padding: 0 var(--mb-s3); background: var(--mb-paper); min-height: 52px; }
.mb-search input { border: 0; outline: none; font: inherit; font-size: var(--mb-fs-md); width: 100%; background: transparent; }
.mb-search:focus-within { border-color: var(--mb-brand-ink); box-shadow: 0 0 0 3px rgba(242,155,38,0.25); }

/* Direction badge: neutral ink + arrow + words. Color does not judge "good" or "bad". */
.mb-dir { display: inline-flex; align-items: center; gap: 6px; font-size: var(--mb-fs-sm); font-weight: 600; color: var(--mb-ink-2); }
.mb-dir svg { flex: none; }
.mb-dir--similar { color: var(--mb-ink-3); font-weight: 500; }

/* Reliability tags */
.mb-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--mb-fs-xs); font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--mb-rule); color: var(--mb-ink-3); background: var(--mb-paper); white-space: nowrap; }
.mb-tag--caution { color: var(--mb-caution); background: var(--mb-caution-wash); border-color: #f0dca8; }
.mb-tag--model { color: var(--mb-ink-2); }

/* Tables */
.mb-table-wrap { overflow-x: auto; border: 1px solid var(--mb-rule); border-radius: var(--mb-r-panel); }
.mb-table { width: 100%; border-collapse: collapse; font-size: var(--mb-fs-sm); }
.mb-table th, .mb-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--mb-rule); vertical-align: top; }
.mb-table thead th { background: var(--mb-paper-2); font-weight: 600; color: var(--mb-ink-2); position: sticky; top: 0; }
.mb-table td.mb-r, .mb-table th.mb-r { text-align: right; }
.mb-table tbody tr:last-child th, .mb-table tbody tr:last-child td { border-bottom: 0; }
.mb-table tr.mb-focus-row { background: var(--mb-brand-wash); }

/* Footer */
.mb-footer { border-top: 1px solid var(--mb-rule); margin-top: var(--mb-s8); padding: var(--mb-s6) 0 var(--mb-s7); color: var(--mb-ink-3); font-size: var(--mb-fs-sm); }

/* The "these are examples" ribbon used in this guide's files */
.mb-example-ribbon { background: #1f3a5f; color: #fff; font-size: var(--mb-fs-sm); padding: 8px var(--mb-s6); text-align: center; }
