/* OffBIM theme (14 Nov 2026): one palette, one type style, nothing smaller than 12px.
   Loaded last in <head> on every page, so it wins over older page styles of the same weight.
   Change colours here only. */
:root {
  /* brand */
  --ob-blue: #344CB7;        /* buttons, links, summary cards, highlights */
  /* 17 Nov 2026: ONE OffBIM blue scale (same hue as #344CB7). Use these instead of other blues. */
  --ob-blue-50: #EEF1FC;     /* soft backgrounds */
  --ob-blue-200: #B9C4F5;    /* text/pills on dark backgrounds */
  --ob-blue-300: #8E9EEE;    /* titles on dark backgrounds */
  --ob-blue-500: #344CB7;    /* = --ob-blue, the brand blue */
  --ob-blue-700: #2A3E98;    /* hover / pressed */
  --ob-blue-900: #1B2A4A;    /* = --ob-navy */
  --ob-blue-soft: #eef1fc;   /* hover, selected rows, table headers */
  --ob-navy: #1B2A4A;        /* headings, dark bars */
  --ob-ink: #2d3748;         /* body text */
  --ob-muted: #4a5568;       /* secondary text (dark enough to read) */
  --ob-line: #e2e8f0;        /* borders */
  --ob-bg: #f4f5f9;          /* page background */
  --ob-card: #ffffff;
  /* status: one rule everywhere */
  --ok: #2f855a;   --ok-soft: #e6f6ec;     /* green: clean, simple, standard, on site (tracking) */
  --mod: #b7791f;  --mod-soft: #fef6d8;    /* yellow: moderate, choose */
  --warn: #dd6b20; --warn-soft: #fdf0e3;   /* orange: warning, complex, low-loader */
  --bad: #c53030;  --bad-soft: #fde8e8;    /* red: error, critical, very complex, abnormal */
  --na: #718096;   --na-soft: #edf2f7;     /* grey: not applicable, made on site */
  /* type */
  --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-min: 12px;
}

/* One type style */
body, button, input, select, textarea, table, .tab, label {
  font-family: var(--font-body);
}
body { line-height: 1.55; }
h1, h2, h3, .ob-head { font-family: var(--font-head); font-weight: 600; letter-spacing: .005em; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; }
code, pre, kbd, samp, .mono { font-family: var(--font-code); }

/* Never smaller than 12px (low specificity: page styles above 12px still win) */
:where(small, sub, sup, .small, label, th, td, input, select, textarea, button, .tooltip-text, .pill, .tr-badge,
.complexity-badge, .stat-label, .label, .hint, .help-text, .muted, .caption, figcaption) {
  font-size: max(var(--fs-min), 1em);
}
:where(small, .small) { font-size: max(var(--fs-min), 0.875em); }

/* Light pages (the working area): body class "ob-light". Dark pages keep their own colours. */
body.ob-light { color: var(--ob-ink); }
:where(body.ob-light) :where(h1, h2, h3) { color: var(--ob-navy); }
:where(body.ob-light) :where(a) { color: var(--ob-blue); }
:where(body.ob-light) :where(.export-button, .export-csv-button, .btn-primary) {
  background-color: var(--ob-blue); border-color: var(--ob-blue); color: #fff;
}
/* Table headers: one style on light pages (soft blue, navy text) */
:where(body.ob-light) th {
  background-color: var(--ob-blue-soft);
  color: var(--ob-navy);
  font-weight: 700;
}

/* Status helpers any page can use */
.st-ok   { color: var(--ok);   background: var(--ok-soft); }
.st-mod  { color: var(--mod);  background: var(--mod-soft); }
.st-warn { color: var(--warn); background: var(--warn-soft); }
.st-bad  { color: var(--bad);  background: var(--bad-soft); }
.st-na   { color: var(--na);   background: var(--na-soft); }

/* Headings: Cormorant has a small x-height; keep headings as easy to read as before */
h1, h2, h3, .ob-head { font-size-adjust: 0.5; }

/* Buttons: one primary action per area (filled blue), the rest outlined */
.ob-btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px; border-radius: 8px; font: 600 15px var(--font-body);
  cursor: pointer; border: 1.5px solid var(--ob-blue); transition: background .15s, color .15s, box-shadow .15s; }
.ob-btn-primary { background: var(--ob-blue); color: #fff; }
.ob-btn-primary:hover { background: #2a3f9e; box-shadow: 0 4px 12px rgba(52,76,183,.25); }
.ob-btn-outline { background: #fff; color: var(--ob-blue); }
.ob-btn-outline:hover { background: var(--ob-blue-soft); }
.ob-btn:disabled { opacity: .55; cursor: wait; }

/* Notices: white card with a coloured left edge */
.ob-notice { background: #fff; border: 1px solid var(--ob-line); border-left: 4px solid var(--ob-blue); border-radius: 10px;
  padding: 12px 16px; margin: 0 0 12px; color: var(--ob-ink); font-size: 14px; box-shadow: 0 2px 10px rgba(52,76,183,0.05); }
.ob-notice b, .ob-notice strong { color: var(--ob-navy); }
.ob-notice.n-warn { border-left-color: var(--warn); }
.ob-notice.n-mod { border-left-color: var(--mod); }
.ob-notice.n-bad { border-left-color: var(--bad); }
.ob-notice.n-ok { border-left-color: var(--ok); }

/* Wordmark "OffBIM": front-page style. Off in the text colour (white on dark, navy on light), BIM in blue. */
/* 17 Nov 2026 (Rita, option A): ONE wordmark everywhere – Outfit ExtraBold, "Off" in the text colour
   (white on dark, ink #011627 on light), "BIM" in OffBIM blue: #0C45B6 on light, #2F6BE0 on dark. */
:root { --ob-bim: #0C45B6; --ob-bim-dark: #2F6BE0; }
.brand, .nav-logo, .logo, .topbar-name, .ob-wordmark {
  font-family: 'Outfit', system-ui, sans-serif !important; font-weight: 800 !important; letter-spacing: -0.02em !important;
}
.brand span, .nav-logo span, .logo span, .topbar-name span, .ob-wordmark span { color: var(--ob-bim) !important; }
/* dark bars (app top bar and the dark page headers) */
.topbar-name span, header .brand span, .ob-wordmark.on-dark span { color: var(--ob-bim-dark) !important; }
.topbar-name, header .brand, .ob-wordmark.on-dark { color: #ffffff !important; }
.ob-wordmark:not(.on-dark), .request-access .brand { color: #011627; }

/* Logo = bolt mark + wordmark (Rita, 14 Nov 2026: option A, hex bolt head in the blue circle) */
.brand, .nav-logo, .ob-wordmark, a.logo { display: inline-flex; align-items: center; }
.brand::before, .nav-logo::before, .ob-wordmark::before, a.logo::before {
  content: ''; flex: none; width: 1.15em; height: 1.15em; margin-right: .38em;
  background: url('/static/offbim_mark.svg') center / contain no-repeat;
}
