/* Market Eyes Live: shared stylesheet for the public content pages.
   Serves the generated pages (/stock/*, /stocks, /stocks/*, /rates*, /embed/mbs) and the static
   explainers (what-is, mcp-server, comparisons, methodology, roundups, legal). Same palette, type
   and components as the landing (css/fintech-reframe.css), so a visitor who arrives from search
   sees the brand they will see on the homepage and in the app. Markup and helpers live in
   netlify/functions/_seo-design.js; bump MEL_PAGES_CSS_V there when this file changes. */

:root {
  --bg: #f3f6f2;
  --surface: #ffffff;
  --panel: #f8f9f5;
  --tint: #eaf0eb;
  --line: rgba(14, 33, 26, 0.09);
  --line2: rgba(14, 33, 26, 0.14);
  --line3: rgba(14, 33, 26, 0.22);
  --ink: #0e211a;
  --text: #14251f;
  --dim: #4d5d56;
  --muted: #5f6e67;
  --green: #15966b;
  --green-deep: #0b5f45;
  --green-soft: #e2efe7;
  --amber: #875800;
  --amber-bar: #d49a2a;
  --red: #b0413b;
  --red-bar: #d8645c;
  --sky: #1f6a86;
  --violet: #5b45a6;
  --night: #10241d;
  --night-2: #0b1713;
  --night-line: rgba(255, 255, 255, 0.09);
  --night-text: #f2f6f4;
  --night-dim: #b2c1ba;
  --night-muted: #93a59d;
  --mint: #74dfb5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 33, 26, 0.05), 0 12px 32px rgba(21, 42, 34, 0.06);
  --shadow-lg: 0 28px 80px rgba(21, 42, 34, 0.18);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* Base typography applies only to pages that opt in with <body class="mp">, so a page with its own
   design (the validation study) can carry the shared navigation and footer without being restyled. */
.mp, .mp *, .mp-nav, .mp-nav *, .mp-foot, .mp-foot *, .embed-body, .embed-body * { box-sizing: border-box; }
html:has(body.mp) { background: var(--bg); -webkit-text-size-adjust: 100%; }
body.mp {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
:where(.mp) img, :where(.mp) svg { max-width: 100%; }
:where(.mp) a { color: var(--green-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:where(.mp) a:hover { color: var(--ink); }
:where(.mp) ::selection { background: rgba(21, 150, 107, 0.2); color: var(--ink); }
.mp :focus-visible, .mp-nav :focus-visible, .mp-foot :focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
:where(.mp) p { margin: 0 0 14px; }
:where(.mp) b, :where(.mp) strong { color: var(--ink); font-weight: 700; }
:where(.mp) h1, :where(.mp) h2, :where(.mp) h3 { color: var(--ink); text-wrap: balance; }
:where(.mp) h1 { font: 600 clamp(32px, 4.3vw, 50px)/1.08 var(--font); letter-spacing: -0.035em; margin: 0 0 16px; }
:where(.mp) h2 { font: 600 clamp(22px, 2.3vw, 28px)/1.22 var(--font); letter-spacing: -0.025em; margin: 0 0 14px; }
:where(.mp) h3 { font: 700 16px/1.4 var(--font); margin: 18px 0 6px; }
:where(.mp) .num { font-variant-numeric: tabular-nums; }

/* Navigation: the landing's bar, same links and buttons */
.mp-nav {
  position: sticky; top: 0; z-index: 50;
  font-family: var(--font); line-height: 1.4;
  background: rgba(243, 246, 242, 0.9);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(14, 33, 26, 0.08);
}
.mp-nav-in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; }
.mp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.mp-brand img { width: 32px; height: 32px; display: block; }
.mp-word { display: inline-flex; align-items: baseline; gap: 7px; font-size: 13.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.mp-word b { color: var(--green-deep); font-size: 10.5px; letter-spacing: 0.14em; }
.mp-links { display: flex; gap: 22px; margin-left: auto; }
.mp-links a { color: #44544d; font-size: 14px; font-weight: 500; text-decoration: none; }
.mp-links a:hover, .mp-links a[aria-current="page"] { color: var(--ink); }
.mp-navcta { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 14px/1.1 var(--font); text-decoration: none; white-space: nowrap;
  border-radius: 999px; padding: 12px 20px; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #183a2e; color: #fff; box-shadow: 0 14px 30px rgba(14, 33, 26, 0.16); }
.btn-ghost { background: rgba(255, 255, 255, 0.55); color: var(--ink); border-color: rgba(14, 33, 26, 0.2); }
.btn-ghost:hover { background: #fff; border-color: rgba(14, 33, 26, 0.42); color: var(--ink); }
.btn-lg { padding: 16px 22px; border-radius: 6px; font-size: 15px; }
.btn-mint { background: var(--mint); color: #062018; }
.btn-mint:hover { background: #8ee8c4; color: #062018; }
.btn-outline-light { background: rgba(255, 255, 255, 0.04); color: #f5f7f5; border-color: rgba(255, 255, 255, 0.28); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.btn .arrow { font-size: 17px; line-height: 1; }

/* Page frame */
.mp-main { max-width: 1180px; margin: 0 auto; padding: 26px 20px 24px; }
.mp-crumb { font-size: 12.5px; color: var(--muted); margin: 0 0 22px; }
.mp-crumb a { color: var(--muted); text-decoration: none; }
.mp-crumb a:hover { color: var(--ink); }
.eyebrow {
  display: flex; align-items: center; gap: 9px; margin: 0 0 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--green-deep);
}
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(21, 150, 107, 0.14); flex: none; }
.lede { font-size: 17px; line-height: 1.7; color: var(--dim); max-width: 62ch; margin: 0 0 24px; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mp-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }

.mp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: start; margin: 0 0 52px; }
.mp-hero.solo { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.mp-hero-copy { min-width: 0; }

.mp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.mp-cols > aside { position: sticky; top: 84px; }
.mp-read { max-width: 760px; min-width: 0; }
.mp-section, .mp-read > section { margin: 0 0 44px; }
.mp-read section > h2:first-child { margin-top: 0; }
.mp-read section section { margin: 0 0 20px; }
.mp-section > p, .mp-read > p, .prose p { color: var(--dim); max-width: 70ch; }
.prose ul, .prose ol, ul.pts { margin: 0 0 14px; padding-left: 20px; color: var(--dim); }
.prose li, ul.pts li { margin: 6px 0; }
ul.pts.neg li::marker { color: var(--red); }
ul.pts.pos li::marker { color: var(--green); }
.small, .asof { font-size: 13px; color: var(--muted); }
.asof { margin: 12px 0 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 36px 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.grid2 > .card + .card { margin-top: 0; }   /* side by side, the stacking gap pushed the second card 14 px low */
.card.tint { background: var(--tint); box-shadow: none; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* Dark product window, the landing's market-window */
.window { background: var(--night); color: var(--night-text); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: var(--shadow-lg); overflow: hidden; }
.window-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--night-line); font-size: 12px; color: var(--night-dim); }
.window-brand { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: #f4f7f5; }
.window-brand img { width: 18px; height: 18px; }
.window-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.window-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #64d4a8; }
.window-body { padding: 22px 22px 20px; }
.w-kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #9eb0a8; font-weight: 700; margin: 0 0 10px; }
.w-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.w-big { font-size: clamp(46px, 6vw, 66px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; color: #f4f7f5; font-variant-numeric: tabular-nums; }
.w-big small { font-size: 18px; color: var(--night-dim); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.w-big.hi { color: var(--mint); }
.w-big.mid { color: #f0c46a; }
.w-big.lo { color: #ff9d92; }
.w-side { text-align: right; }
.w-side .w-px { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: #f4f7f5; font-variant-numeric: tabular-nums; }
.w-side .w-lbl { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--night-muted); font-weight: 700; }
.w-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid; margin-top: 12px; }
.w-chip.up { color: var(--mint); border-color: rgba(116, 223, 181, 0.35); background: rgba(116, 223, 181, 0.08); }
.w-chip.down { color: #ff9d92; border-color: rgba(255, 157, 146, 0.35); background: rgba(255, 157, 146, 0.08); }
.w-chip.flat { color: #f0c46a; border-color: rgba(240, 196, 106, 0.35); background: rgba(240, 196, 106, 0.08); }
.w-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.w-tile { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); min-width: 0; }
.w-tile span { display: block; color: var(--night-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.w-tile b { display: block; margin-top: 4px; color: #f2f6f4; font-size: 18px; font-variant-numeric: tabular-nums; }
.w-text { color: var(--night-dim); font-size: 14px; line-height: 1.6; margin: 16px 0 0; }
.w-read { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.w-read b { color: #fff; }
.w-read p { color: var(--night-dim); font-size: 14px; margin: 6px 0 0; }
.w-spark { margin-top: 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); padding: 12px 12px 8px; }
.w-spark svg { display: block; width: 100%; height: 90px; }
.w-spark .cap { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--night-muted); letter-spacing: 0.06em; margin-top: 6px; }
.w-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--night-line); font-size: 11.5px; color: var(--night-muted); }
.w-foot b { color: #c7d4cf; font-weight: 600; }
.w-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.stat b { display: block; font-size: 17px; color: var(--ink); margin-top: 3px; line-height: 1.3; }

/* Score and tier colour, light surfaces */
.s-hi { color: var(--green-deep); }
.s-mid { color: var(--amber); }
.s-lo { color: var(--red); }
.s-na { color: var(--muted); }

/* Ranked list (hub pages) */
.ranklist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ranklist .row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 58px; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); transition: background 0.12s; }
.ranklist .row:last-child { border-bottom: 0; }
.ranklist .row:hover { background: #f6f9f7; }
.ranklist .rank { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ranklist .nm { display: flex; flex-direction: column; min-width: 0; }
.ranklist .nm b { font-size: 15px; font-weight: 800; letter-spacing: 0.01em; color: var(--ink); }
.ranklist .nm i { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranklist .tier { font-size: 12px; font-weight: 700; color: var(--dim); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.ranklist .sc { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; }
.empty { background: var(--surface); border: 1px dashed var(--line3); border-radius: 12px; padding: 16px; color: var(--muted); font-size: 14px; }

/* Month-over-month changes */
ul.chg { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 8px; }
ul.chg li { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14.5px; color: var(--dim); }
.dl { font-weight: 800; font-size: 13px; min-width: 36px; flex: none; font-variant-numeric: tabular-nums; }

/* Factor bars (rating pages) */
.fac { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fac:last-of-type { border-bottom: 0; }
.facrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.faclbl { font-weight: 700; font-size: 15px; color: var(--ink); }
.facsc { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.facmax { font-size: 12px; color: var(--muted); font-weight: 600; }
.bar { height: 6px; background: #dfe7e2; border-radius: 6px; margin: 10px 0 0; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--green); }
.bar i.b-mid { background: var(--amber-bar); }
.bar i.b-lo { background: var(--red-bar); }
.facdesc { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.sigs { margin: 8px 0 0; padding-left: 18px; }
.sigs li { color: var(--dim); font-size: 14px; margin: 3px 0; }
.siglock { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.unlock { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 14px 16px; background: var(--green-soft); border: 1px solid #c6dccf; border-radius: 12px; color: var(--green-deep); font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.5; }
.unlock:hover { background: #d7e9dd; color: var(--ink); }
.unlock .lk, .siglock .lk { flex: none; }

/* Locked features list */
.lock { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 12px 0 0; box-shadow: var(--shadow); }
a.lock:hover { border-color: var(--green-deep); }
.lockrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--text); }
.lockrow:last-child { border-bottom: 0; }
.pil, .lock .pill { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; }
.lockopen { background: var(--green-soft); color: var(--green-deep); font-weight: 700; }
.pilgo { color: #fff; background: var(--green-deep); border-color: var(--green-deep); }

/* Rate read pieces */
.kv { display: flex; gap: 22px; flex-wrap: wrap; }
.kv div { font-size: 12.5px; color: var(--muted); }
.kv b { display: block; color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border: 1px solid; border-radius: 999px; padding: 3px 11px; margin: 10px 0 0; }
.read { color: var(--dim); font-size: 15px; margin: 12px 0 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; margin: 0 0 6px; }
.big { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.rowtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.evts { display: flex; flex-direction: column; }
.evt { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.evt:last-child { border-bottom: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ed { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; width: 96px; font-size: 13.5px; }
.en { flex: 1; color: var(--text); }
.ei { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }

/* FAQ */
.faq { padding: 18px 0; border-top: 1px solid var(--line); }
.faq h3 { margin: 0 0 6px; font-size: 16px; }
.faq p { color: var(--dim); margin: 0; }

/* Related reading and chips */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.related a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.related a span { display: block; font-weight: 500; color: var(--muted); font-size: 13.5px; margin-top: 4px; line-height: 1.5; }
.related a:hover { border-color: var(--green-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.6); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.chips a:hover { background: #fff; border-color: var(--green-deep); color: var(--green-deep); }

/* Aside offer card */
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.offer h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.offer p { color: var(--dim); font-size: 14px; }
.offer ul { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.offer li { display: flex; gap: 10px; font-size: 14px; color: var(--text); line-height: 1.45; }
.offer li::before { content: ''; width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%230b5f45' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.offer .btn { width: 100%; }
.offer .btn + .btn { margin-top: 10px; }

/* Dark band, the landing's band--lift */
.band { background: var(--night); color: var(--night-text); border-radius: 24px; padding: clamp(28px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1.25fr) auto; gap: 28px; align-items: center; margin: 12px 0 52px; box-shadow: var(--shadow-lg); }
.band h2 { color: #fff; margin: 0 0 10px; }
.band p { color: var(--night-dim); margin: 0; max-width: 58ch; }
.band .eyebrow { color: #7bddb8; }
.band .eyebrow .pulse { background: #7bddb8; box-shadow: 0 0 0 4px rgba(123, 221, 184, 0.14); }
.band-actions { display: flex; flex-direction: column; gap: 10px; min-width: 240px; }
.band-actions .btn { width: 100%; }
.band .band-note { font-size: 12px; color: var(--night-muted); margin-top: 4px; text-align: center; }

/* Tables (comparisons, roundups) */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 0 0 18px; }
.tbl table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14.5px; }
.tbl th, .tbl td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl thead th { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--panel); font-weight: 700; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody th { color: var(--ink); font-weight: 700; width: 22%; }
.tbl td { color: var(--dim); }
.tbl .us { background: #f4f9f6; }

/* Code (MCP and widget pages) */
:where(.mp) pre, :where(.mp) code { font-family: var(--mono); }
:where(.mp) pre { background: var(--night); color: #d8f3e8; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
:where(.mp) code { background: #e5ede8; color: var(--green-deep); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }
:where(.mp) pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.copyrow { display: flex; justify-content: flex-end; margin: -8px 0 16px; }

/* Footer, the landing's dark footer */
.mp-foot { background: var(--night-2); color: #dce5e1; margin-top: 56px; padding: 56px 20px 0; overflow: hidden; font-family: var(--font); line-height: 1.5; }
.mp-foot-in { max-width: 1180px; margin: 0 auto; }
.mp-foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mp-foot-top img { height: 30px; width: auto; display: block; }
.mp-foot a { text-decoration: none; }
.mp-store { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; text-decoration: none; background: var(--green); color: #04140e; padding: 11px 20px; border-radius: 999px; }
.mp-store:hover { background: #1aa878; color: #04140e; }
.mp-foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 36px 0 22px; }
.mp-foot-col h4 { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #819188; margin: 0 0 12px; font-weight: 700; }
.mp-foot-col a { display: block; color: #adbbb4; text-decoration: none; font-size: 14px; padding: 4px 0; }
.mp-foot-col a:hover { color: #82dab9; }
.mp-legal { font-size: 12px; line-height: 1.7; color: #8a9a92; max-width: 980px; padding: 8px 0 20px; margin: 0; }
.mp-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: #819188; padding-bottom: 22px; }
.mp-wordmark { font-size: clamp(64px, 15vw, 196px); font-weight: 800; letter-spacing: -0.06em; line-height: 0.8; text-align: center; white-space: nowrap; background: linear-gradient(180deg, rgba(125, 218, 182, 0.12), rgba(125, 218, 182, 0.015) 84%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; margin: 8px 0 -0.14em; }

/* Embed widget (/embed/mbs, framed on loan officer sites). Compact: the frame's height is fixed by
   the snippet on /mbs-widget, so the card must fit it at every width from 300 to 520 pixels. */
.embed-body { margin: 0; background: transparent; font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
/* The card fills its frame, so a 330 pixel iframe never shows an empty band under a shorter card. */
.window.embed-card { box-shadow: none; border-radius: 16px; flex: 1; display: flex; flex-direction: column; }
.embed-card .window-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* min-height 0 all the way down: an SVG flex item's automatic minimum follows its viewBox aspect
   ratio, which made the line 125 pixels tall at 440 wide and pushed the card past its frame. */
.embed-card .w-spark { flex: 1 1 0; display: flex; flex-direction: column; min-height: 0; }
.embed-card .w-spark svg { flex: 1 1 0; height: auto; min-height: 0; }
.embed-card a { text-decoration: none; }
.embed-card .window-top { padding: 11px 16px; }
.embed-card .window-body { padding: 16px 16px 14px; }
.embed-card .w-big { font-size: 44px; }
.embed-card .w-chip { margin-top: 6px; }
.embed-card .w-spark { margin-top: 12px; padding: 8px 10px 6px; }
.embed-card .w-spark svg { height: 64px; }
.embed-card .w-text { margin: 12px 0 0; font-size: 13.5px; }
.embed-card .w-text b { color: #f2f6f4; }
.embed-card .w-foot { padding: 10px 16px; align-items: center; }
.embed-card .w-foot a { color: var(--mint); font-weight: 700; }
.embed-card .w-foot a:hover { color: #9cebcb; }
.embed-card .window-brand { white-space: nowrap; }
@media (max-width: 400px) {
  .embed-card .window-top { padding: 10px 14px; font-size: 11.5px; }
  .embed-card .window-body { padding: 14px 14px 12px; }
  .embed-card .w-row { gap: 8px; }
  .embed-card .w-big { font-size: 38px; }
  .embed-card .w-chip { font-size: 11px; padding: 3px 9px; margin-top: 4px; }
  .embed-card .w-spark { margin-top: 10px; padding: 6px 8px 4px; }
  .embed-card .w-spark svg { height: 50px; }
  .embed-card .w-spark .cap { display: none; }
  .embed-card .w-text { font-size: 12.5px; margin-top: 10px; }
  .embed-card .w-foot { font-size: 11px; padding: 9px 14px; gap: 4px 10px; }
}
/* The snippet box on /mbs-widget */
.snippet { margin: 0 0 22px; }
.snippet pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.snippet .copyrow { margin: 10px 0 0; justify-content: flex-start; }
.preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 520px; margin: 8px 0 20px; }
.preview iframe { width: 100%; border: 0; border-radius: 16px; display: block; }
.preview .credit { font-size: 13px; color: var(--muted); margin: 0; }


/* Rate pages: environment card, lean pill, event impact tones, dark-window events */
.card.hero { border-color: #c6dccf; background: linear-gradient(180deg, #ffffff, #f5faf7); }
.pill.lean { color: var(--sky); border-color: rgba(31, 106, 134, 0.35); background: #eef6f9; }
.dot.imp-high { background: var(--red); }
.dot.imp-medium { background: var(--amber-bar); }
.dot.imp-low { background: var(--sky); }
.ei.imp-high { color: var(--red); }
.ei.imp-medium { color: var(--amber); }
.ei.imp-low { color: var(--sky); }
.w-env { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; margin: 0 0 4px; }
.w-env.s-hi { color: var(--mint); }
.w-env.s-mid { color: #f0c46a; }
.w-env.s-lo { color: #ff9d92; }
.w-evts { display: flex; flex-direction: column; }
.w-evt { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--night-line); font-size: 14px; }
.w-evt:last-child { border-bottom: 0; }
.w-evt-d { color: var(--night-muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.w-evt-n { color: #f2f6f4; }
.w-evt-i { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.w-evt-i.imp-high { color: #ff9d92; }
.w-evt-i.imp-medium { color: #f0c46a; }
.w-evt-i.imp-low { color: #9cc9dc; }


/* Rating pages: the verdict chip inside the dark score window */
.window .tier { display: inline-flex; align-items: center; margin-top: 12px; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); color: var(--night-text); }
.window .tier[data-tone="hi"] { color: var(--mint); border-color: rgba(116, 223, 181, 0.35); background: rgba(116, 223, 181, 0.08); }
.window .tier[data-tone="mid"] { color: #f0c46a; border-color: rgba(240, 196, 106, 0.35); background: rgba(240, 196, 106, 0.08); }
.window .tier[data-tone="lo"] { color: #ff9d92; border-color: rgba(255, 157, 146, 0.35); background: rgba(255, 157, 146, 0.08); }
.window .tier[data-tone="na"] { color: var(--night-dim); }


/* Hub pages: the top three inside the dark window, and the hero call to action wrapper */
.w-tile b small { font-size: 12px; color: var(--night-muted); font-weight: 600; margin-left: 2px; }
.w-top3 { display: flex; flex-direction: column; margin-top: 16px; border-top: 1px solid var(--night-line); }
.w-rank { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--night-line); text-decoration: none; color: var(--night-text); }
.w-rank:last-child { border-bottom: 0; }
.w-rank:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }
.w-rank-n { color: var(--night-muted); font-size: 13px; font-weight: 700; }
.w-rank-nm { display: flex; flex-direction: column; min-width: 0; }
.w-rank-nm b { color: #f4f7f5; font-size: 14px; letter-spacing: 0.02em; }
.w-rank-nm i { font-style: normal; color: var(--night-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-rank-sc { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.w-rank-sc.hi { color: var(--mint); }
.w-rank-sc.mid { color: #f0c46a; }
.w-rank-sc.lo { color: #ff9d92; }
.ctawrap .lede:empty { display: none; }


/* Stocks A to Z: search inside the dark window, letter jump, ticker grid, niche chips */
.window .search { width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; color: #f4f7f5; font: 500 15px/1.4 var(--font); padding: 13px 15px; margin: 0 0 8px; }
.window .search::placeholder { color: var(--night-muted); }
.window .search:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.window .count { color: var(--night-muted); font-size: 12.5px; margin: 0 0 4px; }
.jump { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.jump a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; padding: 5px 9px; border-radius: 8px; }
.jump a:hover { color: var(--ink); background: var(--surface); }
.grp { margin: 0 0 18px; }
.grp h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-deep); margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.grp .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tk { display: flex; align-items: baseline; gap: 8px; padding: 10px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); overflow: hidden; transition: border-color 0.15s; }
.tk:hover { border-color: var(--green-deep); color: var(--ink); }
.tk b { font-size: 14px; font-weight: 800; color: var(--ink); flex: none; }
.tk span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.niches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.niches a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.6); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.niches a:hover { background: #fff; border-color: var(--green-deep); color: var(--green-deep); }
#noresults { display: none; }


/* Static explainers and legal pages (docs/*.html): the article column and the handful of legacy
   component classes those pages already use, restyled into the shared look. */
.mp-article { max-width: 800px; padding: 18px 0 8px; }
.mp-article > h1 { margin-top: 6px; }
.mp-article h2 { margin-top: 38px; }
.mp-article h3 { margin-top: 24px; }
.mp-article p, .mp-article li { color: var(--dim); }
.mp-article ul, .mp-article ol { padding-left: 20px; margin: 0 0 16px; }
.mp-article li { margin: 6px 0; }
.mp-article .tldr { background: var(--tint); border: 1px solid #d3e1d8; border-radius: var(--radius); padding: 20px 22px; margin: 6px 0 24px; }
.mp-article .tldr p { color: var(--text); font-size: 16.5px; margin: 0; }
.mp-article .tldr p + p { margin-top: 10px; }
.mp-article .facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; margin: 0 0 24px; box-shadow: var(--shadow); }
.mp-article .facts ul { margin: 0; }
.mp-article .tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 8px 0 20px; }
.mp-article table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.mp-article .tblwrap table { min-width: 600px; }
.mp-article th, .mp-article td { padding: 12px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--dim); }
.mp-article thead th { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--panel); font-weight: 700; }
.mp-article tbody tr:last-child th, .mp-article tbody tr:last-child td { border-bottom: 0; }
.mp-article tbody th, .mp-article td:first-child { color: var(--ink); font-weight: 600; }
.mp-article .note, .mp-article .small, .mp-article .meta { font-size: 13.5px; color: var(--muted); }
.mp-article a.cta { display: inline-flex; align-items: center; gap: 10px; margin: 6px 10px 6px 0; padding: 14px 20px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; }
.mp-article a.cta:hover { background: #183a2e; color: #fff; }
.mp-article a.cta.alt { background: rgba(255, 255, 255, 0.6); color: var(--ink); border: 1px solid rgba(14, 33, 26, 0.2); }
.mp-article a.cta.alt:hover { background: #fff; border-color: rgba(14, 33, 26, 0.42); }
.mp-article .foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.mp-article .foot p { font-size: 13px; color: var(--muted); }
.mp-article .rec { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.mp-article .rec > div { background: var(--night); border-radius: 14px; padding: 14px 16px; }
.mp-article .rec .num { color: var(--mint); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mp-article .rec .lbl { color: var(--night-muted); margin: 2px 0 0; }
.mp-article .highlight, .mp-article .box { background: var(--tint); border: 1px solid #d3e1d8; border-radius: 14px; padding: 16px 20px; margin: 0 0 22px; }
.mp-article .highlight p, .mp-article .box p { color: var(--text); margin: 0; }
.mp-article.legal h1 { font-size: clamp(30px, 3.6vw, 42px); }
.mp-article.legal h2 { font-size: 20px; margin-top: 30px; }
.mp-article .email { font-weight: 700; }
.mp-article td.nw { white-space: nowrap; }

@media (max-width: 960px) {
  .mp-hero { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .mp-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mp-cols > aside { display: none; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .band-actions { min-width: 0; }
}
@media (max-width: 860px) {
  .mp-links { display: none; }
  .mp-navcta { margin-left: auto; }
}
@media (max-width: 760px) {
  .mp-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body.mp { font-size: 15.5px; }
  /* Long button labels ("Get free alerts when NVDA's rating changes") were nowrap and pushed a
     390 pixel page to 405: on a phone the action buttons take the full width and may wrap. */
  .mp-actions .btn, .band-actions .btn, .offer .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.3; }
  .mp-main { padding-top: 18px; }
  .mp-signin { display: none; }
  .ranklist .row { grid-template-columns: 28px minmax(0, 1fr) 50px; gap: 10px; padding: 13px 14px; }
  .ranklist .row .tier { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 6px; }
  .ranklist .row .sc { grid-column: 3; grid-row: 1 / span 2; }
  .w-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .window-body { padding: 18px 16px 16px; }
  .card { padding: 18px 18px; }
}
@media (max-width: 380px) {
  /* 320 pixel phones: the brand and "Start free" overran the bar by 2 pixels. */
  .mp-nav-in { padding: 10px 14px; gap: 12px; }
  .mp-navcta .btn { padding: 10px 14px; }
  .mp-word { font-size: 12.5px; gap: 6px; }
  .mp-main { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .mp-nav, .mp-foot, .band, .offer, .mp-actions { display: none !important; }
  body.mp { background: #fff; }
}
