/* Mike Bravo Consulting components, brand system 5.0.1 "Evergreen", exported for software (MBC Hub).
   Load after tokens.css. Every class starts with mbc-. Never edit this file in place: change the brand system and
   export again.
   Part 1: brand 5.0.1's components/bundle.css as published (it imports no fonts; IBM Plex Serif italic and
           IBM Plex Mono are self-hosted in fonts/ and loaded by tokens.css).
   Part 2: the dark theme without a script. The bundle switches on <html data-theme="dark">, which its JavaScript
           sets; MBC Hub ships no theme script, so the same rules also apply when the device prefers dark.
   Part 3: the MBC Hub kit, patterns the Hub needs that 5.0's components don't cover (the app shell, the page
           head, alerts, status pills, the empty state, AI output, the pillar label, article text). Built only from
           5.0 tokens and the bundle's own variables. */

/* ===== Part 1: brand 5.0 components (bundle.css) ===== */

:root {
  /* Gradients, kit values only */
  --gradient-evergreen: radial-gradient(120% 130% at 100% 100%, var(--brand-olive) 0%, var(--deep) 28%, var(--night-2) 64%, var(--night) 100%);
  --gradient-deep: linear-gradient(160deg, var(--brand-olive) 0%, var(--deep) 100%);
  --gradient-night: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);

  /* Type scale, fluid from phone (about 400px) to desktop (1440px) */
  --text-hero: clamp(3rem, 1.85rem + 4.6vw, 6.5rem);
  --leading-hero: 0.98;
  --tracking-hero: -0.04em;
  --text-display: clamp(2.5rem, 1.95rem + 2.2vw, 4rem);
  --leading-display: 1.04;
  --tracking-display: -0.035em;
  --text-h1: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --leading-h1: 1.1;
  --tracking-h1: -0.03em;
  --text-h2: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --leading-h2: 1.2;
  --tracking-h2: -0.02em;
  --text-h3: clamp(1.1875rem, 1.12rem + 0.3vw, 1.375rem);
  --leading-h3: 1.3;
  --tracking-h3: -0.01em;
  --text-lead: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --leading-lead: 1.5;
  --text-body: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --leading-body: 1.6;
  --text-small: 0.875rem;
  --leading-small: 1.55;
  --text-label: 0.875rem;
  --text-eyebrow: 0.875rem;
  --text-pill: 0.8125rem;
  --text-caption: 0.8125rem;
  --text-quote: clamp(1.375rem, 1.17rem + 0.85vw, 1.75rem);
  --leading-quote: 1.35;
  --text-stat: clamp(2.75rem, 2.3rem + 1.8vw, 3.5rem);
  --tracking-stat: -0.035em;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Layout ranges */
  --section-y: clamp(64px, 9vw, 128px);
  --margin: clamp(20px, 4.4vw, 64px);
  --gutter: clamp(16px, 1.7vw, 24px);
  --panel-inset: clamp(8px, 1.1vw, 16px);

  /* Motion */
  --duration-micro: 120ms;
  --duration-base: 200ms;
  --duration-enter: 320ms;
  --duration-exit: 160ms;
  --duration-rise: 640ms;
  --stagger-rise: 110ms;
  --ease-settle: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --enter-distance: 12px;
}

/* Dark theme: the marker stroke switches off and highlighted words turn gold */
:root[data-theme="dark"], [data-theme="dark"] { --signal-mark: transparent; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--text); font: var(--weight-regular) var(--text-body)/var(--leading-body) var(--font-sans); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mbc-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.mbc-stack { display: grid; align-content: start; gap: var(--space-4); }

/* Type */
.mbc-hero { margin: 0; font: var(--weight-semibold) var(--text-hero)/var(--leading-hero) var(--font-sans); letter-spacing: var(--tracking-hero); text-wrap: balance; }
.mbc-display { margin: 0; font: var(--weight-semibold) var(--text-display)/var(--leading-display) var(--font-sans); letter-spacing: var(--tracking-display); text-wrap: balance; }
.mbc-h1 { margin: 0; font: var(--weight-semibold) var(--text-h1)/var(--leading-h1) var(--font-sans); letter-spacing: var(--tracking-h1); text-wrap: balance; }
.mbc-h2 { margin: 0; font: var(--weight-medium) var(--text-h2)/var(--leading-h2) var(--font-sans); letter-spacing: var(--tracking-h2); text-wrap: balance; }
.mbc-h3 { margin: 0; font: var(--weight-medium) var(--text-h3)/var(--leading-h3) var(--font-sans); letter-spacing: var(--tracking-h3); }
.mbc-lead { margin: 0; font: var(--weight-regular) var(--text-lead)/var(--leading-lead) var(--font-sans); color: var(--text-muted); max-width: var(--measure); }
.mbc-body { margin: 0; font: var(--weight-regular) var(--text-body)/var(--leading-body) var(--font-sans); }
.mbc-small { margin: 0; font-size: var(--text-small); line-height: var(--leading-small); }
.mbc-label { margin: 0; font: var(--weight-medium) var(--text-label)/1.43 var(--font-sans); }
.mbc-eyebrow { margin: 0; font: var(--weight-medium) var(--text-eyebrow)/1.43 var(--font-sans); color: var(--action); }
.mbc-caption { margin: 0; font: var(--weight-regular) var(--text-caption)/1.5 var(--font-sans); color: var(--text-muted); }
.mbc-quote-text { margin: 0; font: italic var(--weight-regular) var(--text-quote)/var(--leading-quote) var(--font-serif); letter-spacing: -0.01em; }
.mbc-stat-text { margin: 0; font: var(--weight-semibold) var(--text-stat)/1 var(--font-sans); letter-spacing: var(--tracking-stat); font-variant-numeric: tabular-nums; }
.mbc-muted { color: var(--text-muted); }
.mbc-code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-sunken); padding: 1px 6px; border-radius: 6px; }

/* The full stop, the asterisk and the fine print */
.mbc-stop { color: var(--stop); }
.mbc-asterisk { color: var(--stop); font-weight: var(--weight-medium); font-size: 0.7em; vertical-align: 0.32em; line-height: 0; margin-left: 0.02em; }
.mbc-fineprint { margin: 0; font: var(--weight-regular) var(--text-small)/var(--leading-small) var(--font-sans); color: var(--text-muted); }
.mbc-fineprint .mbc-asterisk { font-size: 1em; vertical-align: 0; margin: 0 0.12em 0 0; }
.mbc-tagline { margin: 0; font: var(--weight-semibold) clamp(1.75rem, 1.3rem + 1.8vw, 3rem)/1.08 var(--font-sans); letter-spacing: -0.03em; text-wrap: balance; color: var(--text); }
.mbc-tagline-block { display: grid; gap: var(--space-3); justify-items: start; }

/* The highlighter */
.mbc-highlight { color: var(--signal-text); background: linear-gradient(transparent 58%, var(--signal-mark) 58%); padding-inline: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mbc-night .mbc-highlight, .mbc-evergreen .mbc-highlight { color: var(--signal); background: none; }
.mbc-deep .mbc-highlight { color: var(--on-signal); background: var(--signal); border-radius: 4px; }

/* Night, evergreen and deep grounds: the same in both themes */
.mbc-night, .mbc-evergreen, .mbc-deep {
  --text: var(--on-night); --text-muted: var(--on-night-muted); --stop: var(--accent); --focus: var(--accent);
  --action: var(--accent); --action-hover: var(--accent-strong); --on-action: var(--night);
  --action-soft: var(--night-soft); --on-action-soft: var(--accent-strong);
  --border: var(--night-line); --border-strong: #6b7a57;
  --signal-text: var(--signal); --signal-mark: transparent;
  --surface-raised: var(--night-raised); --surface-soft: var(--night-raised); --surface-sunken: var(--night);
  --leaf-strong: var(--leaf);
  --danger: #f0a184; --danger-soft: #3b2016; --warning: #e2c36e; --warning-soft: #352b12; --info: #9cc3dd; --info-soft: #172a37;
  color: var(--text);
}
.mbc-night { background: var(--gradient-night); }
.mbc-evergreen { background: var(--gradient-evergreen); --text-muted: var(--on-evergreen-muted); }
.mbc-deep {
  background: var(--gradient-deep);
  --text: var(--on-deep); --text-muted: var(--on-deep-muted); --surface-raised: var(--night-soft); --border: var(--brand-olive);
  --action-soft: var(--brand-olive); --on-action-soft: var(--on-deep); --action: var(--accent-strong); --action-hover: var(--accent);
  --stop: var(--accent-strong); --focus: var(--accent-strong); --leaf-strong: var(--accent-strong);
}
.mbc-panel { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 64px); }
.mbc-panel-md { border-radius: var(--radius-lg); padding: clamp(20px, 2.4vw, 32px); }
.mbc-inset { margin-inline: var(--panel-inset); }
[data-theme="dark"] .mbc-panel.mbc-night, [data-theme="dark"] .mbc-panel.mbc-evergreen { box-shadow: inset 0 0 0 1px var(--night-line); }

/* Light-only islands: documents, email and print stay light in every theme */
.mbc-force-light {
  --surface: #ffffff; --surface-soft: #f9f6eb; --surface-sunken: #efecdf; --surface-raised: #ffffff;
  --text: #1e2417; --text-muted: #555c4a; --action: #465933; --action-hover: #34431f; --on-action: #f9f6eb;
  --action-soft: #e4e8d6; --on-action-soft: #34431f; --stop: #465933; --border: #d7d9c9; --border-strong: #7f8a6c;
  --signal-text: #1e2417; --signal-mark: #e2c36e; --leaf-strong: #465933; --focus: #465933;
  color: var(--text);
}

/* Logo lockup: hides the transparent side padding of the horizontal PNG, never the artwork */
.mbc-lockup { --w: 176px; display: block; width: var(--w); aspect-ratio: 1148 / 370; overflow: hidden; flex: none; }
.mbc-lockup img { display: block; width: calc(var(--w) / 0.7175); max-width: none; height: auto; margin-left: calc(var(--w) * -0.2369); margin-top: calc(var(--w) * -0.01307); }
.mbc-on-dark, .mbc-lockup.mbc-on-dark { display: none; }
[data-theme="dark"] .mbc-on-light, [data-theme="dark"] .mbc-lockup.mbc-on-light { display: none; }
[data-theme="dark"] .mbc-on-dark, [data-theme="dark"] .mbc-lockup.mbc-on-dark { display: block; }

/* Buttons */
.mbc-btn { --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 22px; border-radius: var(--radius-pill); font: var(--weight-medium) 15px/1 var(--font-sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color var(--duration-micro) var(--ease-settle), color var(--duration-micro) var(--ease-settle), border-color var(--duration-micro) var(--ease-settle), translate var(--duration-micro) var(--ease-settle); }
.mbc-btn-s { --h: 40px; padding: 0 18px; font-size: 14px; }
.mbc-btn-l { --h: 56px; padding: 0 28px; font-size: 16px; }
.mbc-btn-primary { background: var(--action); color: var(--on-action); }
.mbc-btn-primary:hover, .mbc-btn-primary.is-hover { background: var(--action-hover); }
.mbc-btn-primary:active, .mbc-btn-primary.is-active { background: var(--action-hover); translate: 0 1px; }
.mbc-btn:focus-visible, .mbc-btn.is-focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.mbc-btn:disabled, .mbc-btn.is-disabled { background: var(--surface-sunken); color: var(--text-muted); border-color: transparent; cursor: not-allowed; }
.mbc-btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.mbc-btn-secondary:hover, .mbc-btn-secondary.is-hover { background: var(--action-soft); color: var(--on-action-soft); border-color: var(--action-soft); }
.mbc-btn-tertiary { background: none; color: var(--action); height: auto; padding: 6px 2px; border-radius: 6px; }
.mbc-btn-tertiary::after { content: "\2192"; transition: translate var(--duration-micro) var(--ease-settle); }
.mbc-btn-tertiary:hover::after, .mbc-btn-tertiary.is-hover::after { translate: 3px 0; }
.mbc-btn.is-loading { pointer-events: none; }
.mbc-btn-dots { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.mbc-btn-dots i { width: 4px; background: currentColor; border-radius: 1px; animation: mbc-pulse 900ms var(--ease-settle) infinite alternate; }
.mbc-btn-dots i:nth-child(1) { height: 10px; }
.mbc-btn-dots i:nth-child(2) { height: 16px; animation-delay: 120ms; }
.mbc-btn-dots i:nth-child(3) { height: 10px; animation-delay: 240ms; }
@keyframes mbc-pulse { from { scale: 1 0.4; } to { scale: 1 1; } }

/* Evidence and status pills */
.mbc-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: var(--radius-pill); font: var(--weight-medium) var(--text-pill)/1 var(--font-sans); white-space: nowrap; vertical-align: middle; border: 1px solid transparent; }
.mbc-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.mbc-pill-observed { background: var(--deep); color: var(--on-deep); }
.mbc-pill-reported { border-color: var(--action); color: var(--action); }
.mbc-pill-interpreted { border: 1px dashed var(--action); color: var(--action); }
.mbc-pill-interpreted::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.mbc-pill-recommended { background: var(--action-soft); color: var(--on-action-soft); }
.mbc-pill-recommended::before { content: "\2192"; width: auto; height: auto; background: none; border-radius: 0; font-size: 12px; }
.mbc-pill-next { background: var(--signal); color: var(--on-signal); }
.mbc-pill-plain { border-color: var(--border); color: var(--text-muted); }
.mbc-pill-plain::before { display: none; }
.mbc-pill-done { background: transparent; color: var(--text-muted); border-color: var(--border); }
.mbc-pill-done::before { background: var(--leaf-strong); }
.mbc-night .mbc-pill-observed, .mbc-evergreen .mbc-pill-observed, .mbc-deep .mbc-pill-observed, [data-theme="dark"] .mbc-pill-observed { background: var(--accent); color: var(--night); }
.mbc-force-light .mbc-pill-observed { background: var(--deep); color: var(--on-deep); }

/* Cards */
.mbc-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(20px, 2.4vw, 32px); color: var(--text); }
.mbc-card-soft { background: var(--surface-soft); border-color: transparent; }
.mbc-card-lift { box-shadow: var(--shadow-raised); }
.mbc-card-tight { padding: 20px; }
a.mbc-card { display: block; text-decoration: none; transition: box-shadow var(--duration-micro) var(--ease-settle), border-color var(--duration-micro) var(--ease-settle); }
a.mbc-card:hover, .mbc-card.is-hover { box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.mbc-card-title { margin: 0 0 var(--space-2); font: var(--weight-medium) var(--text-h3)/var(--leading-h3) var(--font-sans); letter-spacing: var(--tracking-h3); }

/* Callouts */
.mbc-callout { border-radius: var(--radius-lg); padding: clamp(20px, 2.6vw, 32px); display: grid; gap: var(--space-3); justify-items: start; }
.mbc-callout-recommendation { background: var(--action-soft); color: var(--text); }
.mbc-callout-note { background: var(--surface-soft); color: var(--text); }
.mbc-callout-caution { background: var(--warning-soft); color: var(--warning); }
.mbc-callout-big { margin: 0; font: var(--weight-medium) var(--text-h3)/1.3 var(--font-sans); letter-spacing: -0.01em; color: var(--text); }
.mbc-callout-caution .mbc-callout-big { color: var(--warning); }
.mbc-callout-recommendation .mbc-pill-recommended { background: var(--surface-raised); }

/* Stats */
.mbc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--gutter); }
.mbc-stat { border-radius: var(--radius-md); padding: 22px 24px; background: var(--surface-raised); border: 1px solid var(--border); display: grid; gap: var(--space-3); align-content: space-between; min-height: 168px; color: var(--text); }
.mbc-stat.mbc-evergreen { background: var(--gradient-evergreen); border: 0; }
.mbc-stat-value { font: var(--weight-semibold) var(--text-stat)/1 var(--font-sans); letter-spacing: var(--tracking-stat); font-variant-numeric: tabular-nums; }
.mbc-stat-value small { font-size: 0.45em; font-weight: var(--weight-regular); color: var(--text-muted); letter-spacing: 0; margin-left: 4px; }
.mbc-stat-label { font-size: var(--text-small); line-height: var(--leading-small); color: var(--text-muted); }
.mbc-stat-progress { height: 8px; border-radius: 4px; background: var(--night-soft); overflow: hidden; margin-top: 12px; }
.mbc-stat-progress i { display: block; height: 100%; border-radius: 4px; background: var(--leaf); }
@media (max-width: 639px) { .mbc-stat { min-height: 128px; } }

/* The client's words */
.mbc-quote { display: grid; gap: var(--space-4); justify-items: start; margin: 0; }
.mbc-quote blockquote { margin: 0; font: italic var(--weight-regular) var(--text-quote)/var(--leading-quote) var(--font-serif); letter-spacing: -0.01em; max-width: 30ch; text-wrap: balance; }
.mbc-quote-by { font-size: var(--text-small); line-height: var(--leading-small); color: var(--text-muted); }
.mbc-testimonial { background: var(--surface-soft); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 40px); display: grid; gap: var(--space-5); color: var(--text); }
.mbc-testimonial-mark { width: 28px; height: 22px; fill: var(--action); }

/* Header */
.mbc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 60px; border-radius: var(--radius-pill); padding: 10px 10px 10px 22px; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); }
.mbc-header-bare { background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 76px; }
.mbc-header-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mbc-header-link { display: inline-flex; align-items: center; padding: 10px 12px; border-radius: var(--radius-pill); font: var(--weight-medium) 14px/1 var(--font-sans); color: var(--text-muted); text-decoration: none; }
.mbc-header-link:hover { color: var(--text); background: var(--action-soft); }
.mbc-header-link[aria-current="page"] { background: var(--action-soft); color: var(--on-action-soft); }
.mbc-menu { display: none; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: var(--weight-medium) 14px/1 var(--font-sans); cursor: pointer; }
.mbc-header.is-compact .mbc-header-links { display: none; }
.mbc-header.is-compact .mbc-menu { display: inline-flex; }
.mbc-header.is-compact .mbc-btn { display: none; }
@media (max-width: 760px) {
  .mbc-header .mbc-header-links { display: none; }
  .mbc-header .mbc-menu { display: inline-flex; }
  .mbc-header .mbc-btn { display: none; }
}

/* Form fields */
.mbc-form { display: grid; gap: var(--space-5); max-width: 460px; }
.mbc-field { display: grid; gap: 6px; font: var(--weight-medium) var(--text-label)/1.43 var(--font-sans); color: var(--text); }
.mbc-input { font: var(--weight-regular) 16px/1.5 var(--font-sans); color: var(--text); background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 11px 14px; min-height: 48px; width: 100%; }
textarea.mbc-input { min-height: 112px; resize: vertical; }
.mbc-input:focus-visible, .mbc-input.is-focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.mbc-input.is-error, .mbc-input[aria-invalid="true"] { border-color: var(--danger); }
.mbc-field-help { font-weight: var(--weight-regular); font-size: var(--text-small); line-height: var(--leading-small); color: var(--text-muted); }
.mbc-field-error { font-weight: var(--weight-regular); font-size: var(--text-small); line-height: var(--leading-small); color: var(--danger); display: flex; gap: 6px; align-items: center; }
.mbc-field-error::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* Tables */
.mbc-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); }
.mbc-table-wrap.is-scroll { overflow-x: auto; }
.mbc-table { width: 100%; border-collapse: collapse; font-size: var(--text-small); line-height: var(--leading-small); color: var(--text); }
.mbc-table th { text-align: left; font: var(--weight-medium) 13px/1.4 var(--font-sans); color: var(--text-muted); background: var(--surface-soft); padding: 12px 18px; vertical-align: bottom; }
.mbc-table td { padding: 14px 18px; border-top: 1px solid var(--border); vertical-align: top; }
.mbc-table td:first-child { font-weight: var(--weight-medium); }
.mbc-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mbc-table tr.is-total td { font-weight: var(--weight-semibold); background: var(--surface-soft); }
@media (max-width: 639px) {
  .mbc-table.is-stack thead { display: none; }
  .mbc-table.is-stack, .mbc-table.is-stack tbody, .mbc-table.is-stack tr, .mbc-table.is-stack td { display: block; width: auto; }
  .mbc-table.is-stack tr { padding: 14px 18px; border-top: 1px solid var(--border); }
  .mbc-table.is-stack tr:first-child { border-top: 0; }
  .mbc-table.is-stack td { padding: 3px 0; border: 0; text-align: left; white-space: normal; }
  .mbc-table.is-stack td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-top: 6px; font: var(--weight-medium) 12px/1.45 var(--font-sans); color: var(--text-muted); }
}

/* Action items */
.mbc-actions { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); color: var(--text); }
.mbc-action { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; }
.mbc-action + .mbc-action { border-top: 1px solid var(--border); }
.mbc-action-box { width: 20px; height: 20px; border-radius: var(--radius-xs); border: 1.5px solid var(--border-strong); margin-top: 2px; display: grid; place-items: center; }
.mbc-action-what { margin: 0; }
.mbc-action-meta { margin: 2px 0 0; font-size: var(--text-small); line-height: var(--leading-small); color: var(--text-muted); }
.mbc-action.is-next { background: var(--surface-soft); }
.mbc-action.is-done .mbc-action-box { background: var(--leaf-strong); border-color: var(--leaf-strong); }
.mbc-action.is-done .mbc-action-box::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--surface-raised); border-bottom: 2px solid var(--surface-raised); translate: 0 -1.4px; rotate: -45deg; }
.mbc-action.is-done .mbc-action-what { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
@media (max-width: 639px) {
  .mbc-action { grid-template-columns: 24px minmax(0, 1fr); }
  .mbc-action > .mbc-pill { grid-column: 2; justify-self: start; }
}

/* The rise: the icon's three bars, drawn big near the bottom of a dark panel, always whole.
   Clear space below and beside it of at least an eighth of its width (percent margins follow the panel's width). */
.mbc-rise { display: block; width: 100%; height: auto; overflow: visible; }
.mbc-rise .mbc-rise-bar.b1 { fill: var(--rise-1, var(--accent)); }
.mbc-rise .mbc-rise-bar.b2 { fill: var(--rise-2, var(--accent-strong)); }
.mbc-rise .mbc-rise-bar.b3 { fill: var(--rise-3, var(--accent)); }
.mbc-rise-bright { --rise-1: var(--accent); --rise-2: var(--accent-strong); --rise-3: var(--accent); }
.mbc-rise-tonal { --rise-1: var(--night-soft); --rise-2: var(--deep); --rise-3: var(--night-soft); }
.mbc-rise-quiet { --rise-1: var(--night-raised); --rise-2: var(--night-soft); --rise-3: var(--night-raised); }
.mbc-rise-anchor, .mbc-rise-bleed { position: absolute; right: var(--rise-right, 7%); bottom: var(--rise-bottom, 0px); margin-bottom: calc(var(--rise-width, 34%) / 8); width: var(--rise-width, 34%); z-index: 0; pointer-events: none; }
.mbc-rise.is-playing .mbc-rise-bar { animation: mbc-rise var(--duration-rise) var(--ease-settle) both; }
.mbc-rise.is-playing .mbc-rise-bar.b2 { animation-delay: var(--stagger-rise); }
.mbc-rise.is-playing .mbc-rise-bar.b3 { animation-delay: calc(var(--stagger-rise) * 2); }
@keyframes mbc-rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Pillar glyphs in round wells */
/* The pillar in focus is gold. On light grounds the gold bar carries a thin ink line; on dark grounds the other two bars
   turn olive (sage on evergreen and deep panels, where olive would vanish). The line is 12 of the glyph's 312 units. */
.mbc-pg { display: block; width: 26px; height: 31px; flex: none; overflow: visible; }
.mbc-pg polygon { fill: var(--action-soft); }
.mbc-pg polygon.is-on { fill: var(--signal); stroke: var(--mbc-ink); stroke-width: 12; stroke-linejoin: round; }
[data-theme="dark"] .mbc-pg polygon, .mbc-night .mbc-pg polygon { fill: var(--brand-olive); }
.mbc-evergreen .mbc-pg polygon, .mbc-deep .mbc-pg polygon { fill: var(--sage); }
[data-theme="dark"] .mbc-pg polygon.is-on, .mbc-night .mbc-pg polygon.is-on, .mbc-evergreen .mbc-pg polygon.is-on, .mbc-deep .mbc-pg polygon.is-on { fill: var(--signal); stroke: none; }
.mbc-well { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-soft); flex: none; }
[data-theme="dark"] .mbc-well { background: var(--surface-sunken); }

/* Reduced motion: everything appears in place */
@media (prefers-reduced-motion: reduce) {
  .mbc-rise.is-playing .mbc-rise-bar, .mbc-rise.is-playing .mbc-rise-bar.b2, .mbc-rise.is-playing .mbc-rise-bar.b3 { animation: none; }
  .mbc-btn-dots i { animation: none; }
  .mbc-btn, .mbc-btn-tertiary::after, a.mbc-card { transition: none; }
}

/* ===== Part 2: the dark theme without a script =====
   Each rule matches the bundle's [data-theme="dark"] rule of the same name. ":not([data-theme="light"] *)" keeps
   an element inside a forced-light island light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --signal-mark: transparent; }
  :root:not([data-theme="light"]) .mbc-panel.mbc-night:not([data-theme="light"] *),
  :root:not([data-theme="light"]) .mbc-panel.mbc-evergreen:not([data-theme="light"] *) { box-shadow: inset 0 0 0 1px var(--night-line); }
  :root:not([data-theme="light"]) .mbc-on-light:not([data-theme="light"] *) { display: none; }
  :root:not([data-theme="light"]) .mbc-on-dark:not([data-theme="light"] *) { display: block; }
  :root:not([data-theme="light"]) .mbc-pill-observed:not([data-theme="light"] *):not(.mbc-force-light *) { background: var(--accent); color: var(--night); }
  :root:not([data-theme="light"]) .mbc-pg polygon:not([data-theme="light"] *) { fill: var(--brand-olive); }
  :root:not([data-theme="light"]) .mbc-pg polygon.is-on:not([data-theme="light"] *) { fill: var(--signal); stroke: none; }
  :root:not([data-theme="light"]) .mbc-well:not([data-theme="light"] *) { background: var(--surface-sunken); }
}

/* ===== Part 3: the MBC Hub kit ===== */

/* App shell: a cream sidebar beside a white working area. Below 768px the sidebar stacks on top. */
.mbc-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--surface); color: var(--text); }
.mbc-sidebar { background: var(--surface-soft); border-right: 1px solid var(--border); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-6); }
.mbc-sidebar-home { display: inline-block; align-self: flex-start; border-radius: var(--radius-xs); }
.mbc-nav { display: flex; flex-direction: column; gap: var(--space-1); }
.mbc-nav a { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); padding: 0 var(--space-4); border-radius: var(--radius-pill); color: var(--text); text-decoration: none; font: var(--weight-medium) var(--text-small)/1.2 var(--font-sans); }
.mbc-nav a:hover { background: var(--action-soft); }
.mbc-nav a[aria-current="page"] { background: var(--action-soft); color: var(--on-action-soft); }
.mbc-sidebar-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.mbc-main { padding: var(--space-10) var(--margin) var(--space-16); max-width: var(--content-max); width: 100%; min-width: 0; }
@media (max-width: 767px) {
  .mbc-app { grid-template-columns: minmax(0, 1fr); }
  .mbc-sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: var(--space-4) 20px; gap: var(--space-4); }
  .mbc-nav { flex-direction: row; flex-wrap: wrap; }
  .mbc-sidebar-foot { margin-top: 0; }
  .mbc-main { padding: var(--space-6) 20px var(--space-12); }
}

/* Page head: eyebrow, a heading that states the point, one lead sentence; the one primary action at the right. */
.mbc-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-10); }
.mbc-page-head .mbc-eyebrow { margin-bottom: var(--space-2); }
.mbc-page-head .mbc-lead { margin-top: var(--space-3); }
.mbc-section { margin-top: var(--space-12); }
.mbc-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.mbc-grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* Links in running text */
.mbc-link, .mbc-prose a { color: var(--action); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.mbc-link:hover, .mbc-prose a:hover { color: var(--action-hover); }

/* Buttons the Hub adds: destructive (outlined in danger) and full width */
.mbc-btn-destructive { background: transparent; color: var(--danger); border-color: var(--danger); }
.mbc-btn-destructive:hover, .mbc-btn-destructive.is-hover { background: var(--danger-soft); }
.mbc-btn-block { width: 100%; }

/* Form controls the Hub adds */
.mbc-input:disabled { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border); }
.mbc-input[readonly] { background: var(--surface-sunken); }
.mbc-check { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); font: var(--weight-regular) var(--text-body)/1.5 var(--font-sans); color: var(--text); }
.mbc-checkbox { width: 20px; height: 20px; margin: 0; accent-color: var(--action); }

/* Status pills: quiet unless something needs attention; the word carries the meaning. */
.mbc-pill-active { background: var(--action-soft); color: var(--on-action-soft); }
.mbc-pill-warning { background: var(--warning-soft); color: var(--warning); }
.mbc-pill-danger { background: var(--danger-soft); color: var(--danger); }
.mbc-pill-info { background: var(--info-soft); color: var(--info); }

/* Alerts: the message after a save or an error. What happened, then what to do. */
.mbc-alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-md); font: var(--weight-regular) var(--text-small)/var(--leading-small) var(--font-sans); }
.mbc-alert::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: currentColor; flex: none; }
.mbc-alert strong { font-weight: var(--weight-semibold); }
.mbc-alert-success { background: var(--action-soft); color: var(--on-action-soft); }
.mbc-alert-info { background: var(--info-soft); color: var(--info); }
.mbc-alert-warning { background: var(--warning-soft); color: var(--warning); }
.mbc-alert-danger { background: var(--danger-soft); color: var(--danger); }

/* Empty state: one sentence and one action, on cream. No illustration. */
.mbc-empty { background: var(--surface-soft); border-radius: var(--radius-lg); padding: var(--space-8) var(--space-6); display: grid; gap: var(--space-4); justify-items: start; color: var(--text); }
.mbc-empty p { margin: 0; }

/* AI output: marked "AI-generated", evidence pill on every finding, Accept, Edit and Reject. */
.mbc-ai { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(20px, 2.4vw, 32px); display: grid; gap: var(--space-4); color: var(--text); }
.mbc-ai-tag { display: inline-flex; align-items: center; gap: var(--space-2); font: var(--weight-medium) var(--text-caption)/1.4 var(--font-sans); color: var(--text-muted); }
.mbc-finding { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-2) var(--space-6); margin: 0; font-size: var(--text-small); line-height: var(--leading-small); }
.mbc-finding dt { font-weight: var(--weight-medium); color: var(--text-muted); }
.mbc-finding dd { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
@media (max-width: 599px) { .mbc-finding { grid-template-columns: minmax(0, 1fr); } }

/* Pillar label with its PNG marker (graphics/; the -dark files on dark grounds). */
.mbc-pillar { display: inline-flex; align-items: center; gap: var(--space-2); font: var(--weight-medium) var(--text-small)/1.2 var(--font-sans); color: var(--text); }
.mbc-pillar img { display: block; width: 20px; height: auto; }

/* The bundle leaves the browser's figure margin on the testimonial card. */
figure.mbc-testimonial { margin: 0; }

/* Article text (the knowledge base) */
.mbc-prose { max-width: var(--measure); }
.mbc-prose > * { margin-top: 0; margin-bottom: 0; }
.mbc-prose > * + * { margin-top: var(--space-4); }
.mbc-prose h2 { font: var(--weight-medium) var(--text-h2)/var(--leading-h2) var(--font-sans); letter-spacing: var(--tracking-h2); margin-top: var(--space-10); }
.mbc-prose h3 { font: var(--weight-medium) var(--text-h3)/var(--leading-h3) var(--font-sans); letter-spacing: var(--tracking-h3); margin-top: var(--space-8); }
.mbc-prose ul, .mbc-prose ol { padding-left: 1.4em; }
.mbc-prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-sunken); padding: 1px 6px; border-radius: var(--radius-xs); }
.mbc-prose pre { background: var(--surface-sunken); border-radius: var(--radius-sm); padding: var(--space-4); overflow-x: auto; font: var(--weight-regular) 14px/1.6 var(--font-mono); }
.mbc-prose pre code { background: none; padding: 0; }
.mbc-prose blockquote { margin-left: 0; margin-right: 0; padding: var(--space-4) var(--space-5); background: var(--surface-soft); border-radius: var(--radius-md); }
.mbc-prose table { border-collapse: collapse; width: 100%; font-size: var(--text-small); }
.mbc-prose th, .mbc-prose td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--border); }
.mbc-prose th { background: var(--surface-soft); color: var(--text-muted); font-weight: var(--weight-medium); }
