/* TendersNearMe refreshed look (6 Nov 2026)
   Loaded LAST on every page, so it wins over styles.css and each page's own <style>.
   Remove the <link href="theme.css"> line from a page to see the old look again.
   - One typeface: Plus Jakarta Sans (self-hosted, SIL Open Font Licence, fonts/PlusJakartaSans-OFL.txt)
   - Same navy and gold, more white space, rounder corners
   - Colour only where it means something: green good fit, amber time, red a problem, blue data */

@font-face {
  font-family: "TN Jakarta";
  src: url(/fonts/plus-jakarta-sans-var.woff) format("woff");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --font: "TN Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "TN Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "TN Jakarta", ui-sans-serif, system-ui, sans-serif;
  --paper: #f6f7f9;
  --ink-2: #475467;
  --slate: #5d6779;
  --rule: #e6e8ec;
  --rule-2: #f0f2f5;
  --line-strong: #d0d5dd;
  --fit-bg: #e7f4ec;
  --fit-ink: #17603d;
  --caution-bg: #fdf1de;
  --danger-bg: #fdecea;
  --data: #3b5b8c;
  --data-bg: #e8eef7;
  --gold-tint: #f6eed6;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;
  --shadow: 0 1px 2px rgba(6, 20, 42, .05);
  --lift: 0 2px 4px rgba(6, 20, 42, .04), 0 14px 30px -14px rgba(6, 20, 42, .2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --line-strong: #2a4366; --fit-ink: #86efac; --danger-bg: #3b1212; --data: #93b4e6; --data-bg: #13294a; }
}
:root[data-theme="dark"] { --line-strong: #2a4366; --fit-ink: #86efac; --danger-bg: #3b1212; --data: #93b4e6; --data-bg: #13294a; }

/* Text */
body { font-family: var(--font); font-size: 16px; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
.display, h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
h3 { font-weight: 700; letter-spacing: -.01em; }
label { font-weight: 700; }
.num, .mono, .kpi dd, .mark { font-variant-numeric: tabular-nums; }

/* Buttons: navy main action, gold for sign-up/upgrade, outline for the rest; all at least 44px */
.btn { min-height: 44px; padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: 15px; letter-spacing: -.005em; }
.btn.small { min-height: 36px; padding: 6px 14px; border-radius: 10px; font-size: 14px; }
.btn.ghost { min-height: 36px; border-radius: 10px; }
.btn.secondary { border-color: var(--line-strong); box-shadow: none; }
.btn.secondary:hover { border-color: var(--ink-2); }
.btn.marker { font-weight: 800; }

/* Fields */
.input, select.input, textarea.input { min-height: 44px; border-radius: 12px; border-color: var(--line-strong); padding: 10px 14px; }
.input:focus { border-color: var(--ink-2); }

/* Labels: rounded, bold, colour means something */
.pill { border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 12.5px; }
.pill.fit { color: var(--fit-ink); }
.pill.urgent { background: var(--danger-bg); color: var(--danger); }
.mark { font-family: var(--font); font-weight: 700; border-radius: 999px; padding: .15em .65em; }
.chip { border-radius: 999px; }

/* Cards: one radius, more breathing room, a soft lift on hover */
.notice { border-radius: var(--radius-l); padding: 18px 20px; gap: 8px; transition: box-shadow .2s ease, border-color .2s ease; }
.notice:hover { box-shadow: var(--lift); }
.notice h3 { font-size: 17px; }
.panel, .dash-card, .kpi, .upsell, .lead-card, .verdict, .tile, .pcard, .qa, .empty, .modal, .ps-card, .locked-card, .dropzone, .contact { border-radius: var(--radius-l); }
.panel { padding: 24px; }
.dash-card { padding: 20px 22px; }
.kpi { padding: 18px; }
.kpi dd { font-weight: 800; font-variation-settings: normal; letter-spacing: -.025em; font-size: 34px; }
.verdict .big, .lead-card .sup { font-weight: 800; font-variation-settings: normal; letter-spacing: -.02em; }
.upsell { border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: var(--surface); }
.tile { min-height: 112px; padding: 14px; }
.tile-ico { border-radius: 10px; }
.modal { padding: 26px; box-shadow: var(--lift); }
.empty { border-style: solid; }

/* App shell */
.app-nav { padding: 18px 12px; }
.app-nav a { border-radius: 12px; padding: 11px 12px; }
.app-main { max-width: 1240px; padding: 32px clamp(16px, 3vw, 40px) 120px; }
.app-main h1, body .app-main h1 { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.03em; }
.tabs { gap: 4px; }
.tabs button { font-weight: 700; border-radius: 10px 10px 0 0; }
.tabs button[aria-selected="true"] { border-color: var(--gold); }
.settings-nav { gap: 8px; }

/* Public pages */
.site-head .nav a:not(.btn) { font-weight: 600; border-radius: 10px; }

@media (max-width: 900px) {
  .app-main { padding: 20px 16px 110px; }
  .bottom-nav a { font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  .notice { transition: none; }
}

/* ---------------------------------------------------------------- Dashboard (app home) */
@keyframes dbRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dbGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dbWide { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dbDraw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
@keyframes dbSpin { from { transform: rotate(-70deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dbPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.db { display: flex; flex-direction: column; gap: 18px; }
.db-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; animation: dbRise .6s cubic-bezier(.2, .7, .2, 1) both; }
.db-head h1 { margin: 2px 0 4px; }
.db-live { margin: 0; font-size: 14px; color: var(--slate); display: flex; align-items: center; gap: 8px; }
.db-live span { width: 8px; height: 8px; border-radius: 50%; background: var(--fit); animation: dbPulse 1.8s ease-in-out infinite; }
.db-sub { margin: 0; font-size: 17px; color: var(--ink-2); }
.db-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.db-next { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--caution-bg); border-radius: var(--radius-l); padding: 14px 18px; animation: dbRise .6s .1s both; }
.db-next p { margin: 0; flex: 1 1 280px; color: var(--ink); }
.db-next-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--caution); flex: none; }
.db-next-ic svg { width: 20px; height: 20px; }
.db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.db-kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); min-height: 132px; animation: dbRise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); transition: box-shadow .2s ease; }
.db-kpi:hover { box-shadow: var(--lift); }
.db-kpi-l { font-size: 14px; color: var(--ink-2); }
.db-kpi-n { font-size: 38px; font-weight: 800; letter-spacing: -.025em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.db-kpi-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.db-chip { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.db-chip.good { background: var(--fit-bg); color: var(--fit-ink); }
.db-chip.warn { background: var(--caution-bg); color: var(--caution); }
.db-draw { stroke-dasharray: 400; animation: dbDraw 1.4s ease-out both; }
circle.db-draw { stroke-dasharray: none; animation: none; }
.db-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.db-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.db-span2 { grid-column: span 2; }
.db-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; animation: dbRise .6s cubic-bezier(.2, .7, .2, 1) .15s both; }
.db-card h2 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
.db-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.db-link { font-size: 14px; font-weight: 700; color: var(--ink); }
.db-legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); }
.db-legend span { display: inline-flex; align-items: center; gap: 6px; }
.db-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.db-legend .all, .db-bar i { background: var(--line-strong); }
.db-legend .strong, .db-bar b { background: var(--gold); }
.db-bars { display: flex; align-items: flex-end; gap: 4px; height: 200px; border-bottom: 1px solid var(--rule); }
.db-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.db-bar i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; position: relative; transform-origin: bottom; animation: dbGrow .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
.db-bar b { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px 4px 0 0; }
.db-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--slate); }
.db-pipe { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.db-donut { position: relative; width: 150px; height: 150px; flex: none; }
.db-donut > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.db-donut strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.db-donut span { font-size: 12px; color: var(--ink-2); }
.db-spin { animation: dbSpin 1s cubic-bezier(.2, .7, .2, 1) both; }
.db-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1 1 130px; font-size: 14px; }
.db-key li { display: flex; align-items: center; gap: 8px; }
.db-key i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.db-key b { margin-left: auto; font-variant-numeric: tabular-nums; }
.db-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--rule-2); text-decoration: none; color: var(--ink); }
.db-row:first-of-type { border-top: 0; }
.db-row:hover .db-row-t strong { text-decoration: underline; text-underline-offset: 3px; }
.db-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-row-t strong { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.db-row-t small { font-size: 13px; color: var(--ink-2); }
.db-ring { position: relative; width: 52px; height: 52px; flex: none; }
.db-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.db-day { width: 56px; flex: none; text-align: center; border-radius: 12px; padding: 7px 0; background: var(--surface-2); line-height: 1.1; }
.db-day b { display: block; font-size: 21px; font-weight: 800; }
.db-day small { font-size: 11px; font-weight: 700; }
.db-day.warn { background: var(--caution-bg); color: var(--caution); }
.db-ready { width: 96px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.db-ready > span { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.db-ready i { display: block; height: 100%; background: var(--fit); border-radius: 6px; transform-origin: left; animation: dbWide 1s cubic-bezier(.2, .7, .2, 1) .3s both; }
.db-ready small { font-size: 11.5px; color: var(--ink-2); }
.db-dark { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.db-dark h2 { color: #ffffff; }
.db-early { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.db-early a { background: var(--brand-2, #0f2747); border-radius: 14px; padding: 14px; text-decoration: none; color: #ffffff; display: flex; flex-direction: column; gap: 4px; }
.db-early a:hover { background: #163259; }
.db-early b { font-size: 30px; font-weight: 800; color: var(--gold-2); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.db-early span { font-size: 13px; line-height: 1.35; color: var(--navy-text); }
.db-signal { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.db-signal small { font-size: 12px; font-weight: 700; color: var(--gold-2); }
.db-signal strong { font-size: 15px; line-height: 1.35; }
.db-signal span { font-size: 13px; color: var(--navy-text); }
.db-where { display: grid; gap: 10px; }
.db-where > div { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 34px; gap: 10px; align-items: center; font-size: 14px; }
.db-track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.db-track i { display: block; height: 100%; border-radius: 6px; background: var(--data); transform-origin: left; animation: dbWide 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
.db-track i.top { background: var(--gold); }
.db-where b { text-align: right; font-variant-numeric: tabular-nums; }
.db-kpi.skeleton { min-height: 132px; }
.db-kpi-f svg { flex: 0 1 84px; min-width: 36px; height: 28px; overflow: visible; }
@media (min-width: 1101px) { .db-bars { height: 290px; } }
:root[data-theme="dark"] .db-dark, :root[data-theme="dark"] .db-early a { border-color: var(--rule); }
@media (max-width: 1100px) { .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-span2 { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .db-grid, .db-grid.two { grid-template-columns: minmax(0, 1fr); }
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .db-kpi { min-height: 0; padding: 14px; }
  .db-kpi:first-child { grid-column: 1 / -1; }
  .db-kpi-n { font-size: 28px; }
  .db-kpi-f svg { display: none; }
  .db-bars { height: 120px; gap: 2px; }
  .db-ready { display: none; }
  .db-head .db-acts { width: 100%; }
  .db-head .db-acts .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .db-head, .db-next, .db-kpi, .db-card, .db-bar i, .db-draw, .db-spin, .db-ready i, .db-track i, .db-live span { animation: none !important; }
}

/* ---------- Your matches: fit rings, quick filters and a preview beside the list ---------- */
.mx-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.mx-f { min-height: 44px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.mx-f span { opacity: .65; font-variant-numeric: tabular-nums; margin-left: 2px; }
.mx-f:hover { border-color: var(--ink-2); }
.mx-f.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.mx-f.on span { opacity: .8; }
.mx-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 20px; align-items: start; }
.mx-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mx-list > .panel, .mx-list > details, .mx-list > .banner { margin: 0 0 4px; }
:is(.notice, article).mx-row { position: relative; display: flex; gap: 16px; align-items: center; padding: 16px 18px; margin: 0; background: var(--surface); border: 2px solid var(--rule); border-radius: var(--radius-l); cursor: pointer; text-align: left; box-shadow: none; animation: dbRise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); transition: border-color .15s ease, box-shadow .15s ease; }
:is(.notice, article).mx-row:hover { box-shadow: var(--lift); border-color: var(--line-strong); }
:is(.notice, article).mx-row.sel { border-color: var(--gold); box-shadow: var(--lift); }
:is(.notice, article).mx-row:focus-visible { outline: 3px solid var(--focus, var(--gold)); outline-offset: 2px; }
.mx-ring { position: relative; flex: none; width: var(--s); height: var(--s); display: inline-flex; align-items: center; justify-content: center; }
.mx-ring svg { position: absolute; inset: 0; }
.mx-ring .trk { fill: none; stroke: var(--surface-2); stroke-width: 5; }
.mx-ring .val { fill: none; stroke-width: 5; stroke-linecap: round; stroke: var(--slate); animation: mxRing 1s cubic-bezier(.2, .7, .2, 1) both; }
.mx-ring.strong .val { stroke: var(--fit); }
.mx-ring.maybe .val { stroke: var(--gold); }
.mx-ring b { position: relative; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
@keyframes mxRing { from { stroke-dasharray: 0 var(--c); } }
.mx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mx-main strong { font-size: 16px; line-height: 1.3; }
.mx-meta { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.mx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mx-chip { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.mx-chip.amber { background: var(--amber-bg); color: var(--amber); }
.mx-chip.red { background: var(--red-bg); color: var(--red); }
.mx-chip.good { background: var(--fit-bg); color: var(--fit); }
.mx-chip.new { background: var(--navy); color: #fff; }
.mx-hidden-save { display: none !important; }
.mx-pane { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; box-shadow: var(--lift); }
.mx-pane[hidden] { display: none; }
.mx-pv-in { padding: 24px; display: flex; flex-direction: column; gap: 18px; animation: mxFade .25s ease both; }
@keyframes mxFade { from { opacity: 0; transform: translateY(4px); } }
.mx-x { display: none; }
.mx-buyer { font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: -10px; }
.mx-pv-in h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; outline: none; }
.mx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mx-tiles > div { background: var(--paper); border-radius: 12px; padding: 11px 12px; min-width: 0; }
.mx-tiles small { display: block; font-size: 12px; color: var(--ink-2); }
.mx-tiles b { display: block; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.mx-tiles .amber { background: var(--amber-bg); } .mx-tiles .amber small, .mx-tiles .amber b { color: var(--amber); }
.mx-tiles .good { background: var(--fit-bg); } .mx-tiles .good small, .mx-tiles .good b { color: var(--fit); }
.mx-pv-in section { display: flex; flex-direction: column; gap: 8px; }
.mx-pv-in h3 { margin: 0; font-size: 15px; font-weight: 800; }
.mx-why, .mx-flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mx-why li, .mx-flags li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.mx-why svg, .mx-flags svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mx-why svg { color: var(--fit); }
.mx-flags li { color: var(--ink-2); } .mx-flags svg { color: var(--amber); }
.mx-flags li.serious { background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 9px 12px; } .mx-flags li.serious svg { color: var(--red); }
.mx-snip { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.mx-dates { margin: 0; }
.mx-dates div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding: 8px 0; border-top: 1px solid var(--rule); }
.mx-dates dt { color: var(--ink-2); } .mx-dates dd { margin: 0; font-weight: 700; text-align: right; }
.mx-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.mx-acts .btn { flex: 1 1 150px; justify-content: center; }
.mx-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; }
.mx-later { display: flex; flex-wrap: wrap; gap: 18px; margin-top: -6px; }
.mx-later .linkish { font-size: 14px; font-weight: 700; color: var(--ink-2); min-height: 32px; }
.mx-empty { padding: 28px; color: var(--ink-2); }
.mx-back { position: fixed; inset: 0; background: rgba(6, 20, 42, .45); z-index: 84; animation: mxFade .2s ease both; }
@media (max-width: 1023px) {
  .mx-wrap { grid-template-columns: minmax(0, 1fr); }
  .mx-pane { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 85; max-height: 88vh; border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); visibility: hidden; padding-bottom: env(safe-area-inset-bottom); }
  .mx-pane.open { transform: none; visibility: visible; }
  .mx-x { display: flex; align-self: flex-end; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -12px -10px -26px 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
  .mx-pv-in { padding: 20px 18px 28px; }
  body.mx-lock { overflow: hidden; }
}
@media (max-width: 560px) {
  :is(.notice, article).mx-row { padding: 14px; gap: 12px; }
  .mx-main strong { font-size: 15px; }
  .mx-meta { font-size: 13px; }
  .mx-filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .mx-filters::-webkit-scrollbar { display: none; }
  .mx-f { flex: none; }
  .mx-tiles b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.notice, article).mx-row, .mx-ring .val, .mx-pv-in, .mx-back { animation: none !important; }
  .mx-pane { transition: none; }
}
:root[data-theme="dark"] .mx-f.on { background: var(--gold); border-color: var(--gold); color: #06142a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mx-f.on { background: var(--gold); border-color: var(--gold); color: #06142a; } }
.modal-back { z-index: 88; }
.mx-pane .mx-pv-in { padding-bottom: 72px; }
@media (max-width: 1023px) { .mx-pane .mx-pv-in { padding-bottom: 28px; } }

/* ---------- Home page: light hero, live numbers on one line, short feature rows ---------- */
.hz-hero { background: var(--surface); border-bottom: 1px solid var(--rule); padding: 64px 0 112px; overflow: hidden; }
.hz-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hz-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hz-live { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2); }
.hz-live > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #22a06b; flex: none; animation: hzPulse 2.4s ease-out infinite; }
.hz-live b { color: var(--ink); font-variant-numeric: tabular-nums; }
@keyframes hzPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 160, 107, .45); } 80%, 100% { box-shadow: 0 0 0 8px rgba(34, 160, 107, 0); } }
.hz-hero h1 { margin: 0; color: var(--ink); font-size: clamp(38px, 5vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; max-width: 13ch; text-wrap: balance; }
.hz-lead { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.hz-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px -18px rgba(16, 24, 40, .35); max-width: 620px; margin-top: 6px; }
.hz-f { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 14px; min-width: 0; cursor: text; }
.hz-f + .hz-f { border-left: 1px solid var(--rule); }
.hz-f span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.hz-f input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 2px 0; min-width: 0; width: 100%; }
.hz-f input::placeholder { color: var(--slate); }
.hz-form:focus-within { border-color: var(--ink-2); }
.hz-go { border: 0; border-radius: 10px; background: var(--brand); color: var(--on-brand); font: inherit; font-size: 15.5px; font-weight: 700; padding: 0 22px; min-height: 50px; cursor: pointer; white-space: nowrap; transition: background .15s ease; }
.hz-go:hover { background: var(--brand-2); }
.hz-go:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hz-note { margin: -6px 0 0; font-size: 14px; color: var(--ink-2); }
.hz-media { min-width: 0; position: relative; padding: 28px; border-radius: 28px; background: var(--paper); }
.hz-card { background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 18px; padding: 20px; box-shadow: 0 24px 48px -28px rgba(16, 24, 40, .45); display: flex; flex-direction: column; gap: 10px; }
.hz-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 2px; }
.hz-card-h strong { font-size: 16px; }
.hz-tag { font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 3px 10px; }
.hz-row { display: flex; gap: 14px; align-items: center; border-top: 1px solid var(--rule); padding: 12px 2px 2px; }
.hz-row > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hz-row strong { font-size: 15px; line-height: 1.3; }
.hz-row small { font-size: 13px; color: var(--ink-2); }
.hz-row em { font-style: normal; color: var(--red); font-weight: 700; }
.hz-ring { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.hz-ring svg { position: absolute; inset: 0; }
.hz-ring .trk { fill: none; stroke: var(--surface-2); stroke-width: 4.5; }
.hz-ring .val { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: calc(119.38 * var(--k) / 100) 119.38; animation: hzRing 1.1s cubic-bezier(.2, .7, .2, 1) .4s both; }
.hz-ring.good .val { stroke: var(--fit); } .hz-ring.maybe .val { stroke: var(--gold); }
.hz-ring b { position: relative; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes hzRing { from { stroke-dasharray: 0 119.38; } }
.hz-card-f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hz-pill { font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 5px 11px; }
.hz-pill.g { background: var(--fit-bg); color: var(--fit); } .hz-pill.r { background: var(--red-bg); color: var(--red); }
.hz-stats-wrap { margin-top: -56px; position: relative; z-index: 2; }
.hz-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 18px 40px -24px rgba(16, 24, 40, .35); overflow: hidden; }
.hz-stats a { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; text-decoration: none; color: var(--ink); transition: background .15s ease; min-width: 0; }
.hz-stats a + a { border-left: 1px solid var(--rule); }
.hz-stats a:hover { background: var(--paper); }
.hz-stats b { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.1; min-height: 1.1em; white-space: nowrap; }
.hz-stats span { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hz-src { margin: 14px 4px 0; font-size: 13.5px; color: var(--ink-2); text-align: center; }
.hz-feats .txt h3 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.025em; margin: 0 0 10px; }
.hz-feats .txt p { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0 0 14px; max-width: 46ch; }
.hz-link { font-weight: 700; color: var(--ink); text-underline-offset: 4px; }
.hz-early-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 6px; }
.hz-early-g > span { background: var(--paper); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hz-early-g b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hz-early-g small { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 960px) {
  .hz-hero { padding: 40px 0 96px; }
  .hz-hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hz-media { max-width: 560px; padding: 18px; }
  .hz-stats a { padding: 16px 14px; }
  .hz-stats span { font-size: 13px; }
}
@media (max-width: 700px) {
  .hz-stats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .hz-stats::-webkit-scrollbar { display: none; }
  .hz-stats a { flex: 0 0 auto; min-width: 150px; scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .hz-hero { padding: 28px 0 84px; }
  .hz-lead { font-size: 17px; }
  .hz-form { grid-template-columns: minmax(0, 1fr); }
  .hz-f { padding: 10px 12px; }
  .hz-f + .hz-f { border-left: 0; border-top: 1px solid var(--rule); }
  .hz-go { margin-top: 6px; }
  .hz-media { padding: 12px; border-radius: 20px; }
  .hz-card { padding: 16px; }
  .hz-early-g { grid-template-columns: minmax(0, 1fr); }
  .hz-early-g > span { flex-direction: row; align-items: baseline; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hz-ring .val, .hz-live > span:first-child { animation: none !important; }
}
#match { scroll-margin-top: 84px; }

/* ---------- Tender lists: one filter bar, months-left badge, extra tags ---------- */
form.mx-bar { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 8px 8px 10px; gap: 8px 10px; align-items: flex-end; margin-bottom: 14px; }
form.mx-bar .field { gap: 2px; }
form.mx-bar .field label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 0 0 0 2px; }
form.mx-bar .input { background: var(--paper); border-color: transparent; border-radius: 10px; min-height: 44px; }
form.mx-bar .input:focus { border-color: var(--ink-2); background: var(--surface); }
form.mx-bar .btn { min-height: 44px; border-radius: 10px; }
.mx-sumbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.mx-sumbar strong { font-size: 15px; }
.mx-mo { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.mx-mo b { font-size: 19px; font-weight: 800; color: var(--ink); }
.mx-mo small { font-size: 10.5px; font-weight: 700; }
.mx-mo.soon { background: var(--amber-bg); color: var(--amber); } .mx-mo.soon b { color: var(--amber); }
.mx-chip.blue { background: var(--data-bg, #e8eef7); color: var(--data, #3b5b8c); }
.mx-tiles .blue { background: var(--data-bg, #e8eef7); } .mx-tiles .blue small, .mx-tiles .blue b { color: var(--data, #3b5b8c); }
.mx-note { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.mx-note.soon { background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.mx-buyer a { color: inherit; }
.mx-dates dd a { color: var(--ink); }
.mx-pv-in .howto { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; }
.mx-pv-in .howto summary { font-weight: 700; cursor: pointer; }
.mx-list > .empty, .mx-list > .skeleton { margin: 0; }
@media (max-width: 560px) { .mx-mo { width: 48px; height: 48px; } .mx-mo b { font-size: 17px; } form.mx-bar .field { flex: 1 1 100% !important; } }
form.mx-bar .field { margin: 0; }

/* ---------- Pipeline: number strip, tidy board, bid panel ---------- */
.pl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.pl-kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-kpi span { font-size: 13px; color: var(--ink-2); }
.pl-kpi b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pl-kpi.amber b { color: var(--amber); } .pl-kpi.good b { color: var(--fit); }
.pl-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.pl-col { background: var(--surface-2); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 240px; min-width: 0; }
.pl-col h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 4px 2px; font-size: 14px; font-weight: 800; }
.pl-col h3 > span { display: flex; align-items: center; gap: 8px; }
.pl-col h3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--slate); }
.pl-col h3 i.s2 { background: var(--gold); } .pl-col h3 i.s3 { background: var(--data, #3b5b8c); } .pl-col h3 i.s4 { background: var(--fit); }
.pl-col h3 small { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pl-none { margin: 6px 4px; font-size: 13px; color: var(--ink-2); }
.pl-card { text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: var(--surface); border: 2px solid transparent; border-radius: 14px; padding: 12px 13px; display: flex; flex-direction: column; gap: 7px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); transition: border-color .15s ease, box-shadow .15s ease; min-width: 0; }
.pl-card:hover { box-shadow: var(--lift); }
.pl-card.sel { border-color: var(--gold); }
.pl-card:focus-visible { outline: 3px solid var(--focus, var(--gold)); outline-offset: 2px; }
.pl-card strong { font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.pl-meta { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.pl-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-foot .mx-chip { font-size: 12px; }
.pl-who { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--data, #3b5b8c); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pl-prog { display: flex; align-items: center; gap: 8px; }
.pl-prog > span { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.pl-prog i { display: block; height: 100%; background: var(--fit); border-radius: 6px; }
.pl-prog small { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.pl-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.pl-stages button { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; min-height: 36px; }
.pl-stages button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .15); }
.pl-stages button:hover { color: var(--ink); }
.pl-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pl-tasks { display: flex; flex-direction: column; gap: 6px; }
.pl-task { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.pl-task input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--fit); flex: none; }
.pl-task.done span { color: var(--ink-2); text-decoration: line-through; }
.pl-task small { color: var(--amber); font-weight: 700; }
.pl-drawer h2 a { color: inherit; text-decoration: none; }
.pl-drawer h2 a:hover { text-decoration: underline; }
.pl-drawer textarea { min-height: 76px; }
.pl-remove { color: var(--red) !important; }
@media (min-width: 1024px) {
  .mx-pane.pl-drawer { position: fixed; top: 84px; right: 24px; width: 420px; max-height: calc(100vh - 108px); z-index: 85; transform: translateX(calc(100% + 40px)); visibility: hidden; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .28s; box-shadow: 0 30px 60px -24px rgba(16, 24, 40, .45); }
  .mx-pane.pl-drawer.open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
  .pl-drawer .mx-x { display: flex; align-self: flex-end; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -8px -6px -30px 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 22px; cursor: pointer; }
  #plBack { background: rgba(6, 20, 42, .18); }
}
@media (max-width: 900px) { .pl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pl-board { grid-template-columns: repeat(4, minmax(240px, 82vw)); scroll-snap-type: x mandatory; } .pl-col { scroll-snap-align: start; } }
@media (prefers-reduced-motion: reduce) { .mx-pane.pl-drawer { transition: none; } }

/* ---------- Your matches: "Worth a look abroad", below the list ---------- */
.ab-new { margin: 22px 0 0; }
.ab-new .abroad-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ab-new h2 { font-size: 20px; margin: 0; }
.ab-new > p { margin: 4px 0 12px; }
.ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ab-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); transition: box-shadow .15s ease, border-color .15s ease; min-width: 0; }
.ab-card:hover { box-shadow: var(--lift); border-color: var(--line-strong); }
.ab-card > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.ab-card strong { font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.ab-card small { font-size: 12.5px; color: var(--ink-2); }
.ab-card .mx-ring b { font-size: 12px; }
