:root{--bg:#f4f6f8;--panel:#fff;--text:#17212b;--muted:#66717d;--line:#dfe4e8;--accent:#1f5f8b;--high:#b42318;--med:#9a6700;--early:#856404;--shadow:0 2px 10px rgba(23,33,43,.07)}
*{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
.header{background:#17212b;color:#fff;padding:28px 32px 24px}.header h1{margin:0 0 6px;font-size:28px}.header p{margin:0;color:#cbd4dc;font-size:15px}.header-links{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.header-links button{border:1px solid #53616d;background:transparent;color:#fff;border-radius:6px;padding:7px 10px;font-size:12px;cursor:pointer}.header-links button:hover{background:#24313c}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.48);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}.modal{background:#fff;max-width:720px;width:100%;max-height:85vh;overflow:auto;border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.2);padding:22px}.modal h2{margin:0 0 8px}.modal h3{margin:18px 0 6px;font-size:14px}.modal p,.modal li{font-size:13px;line-height:1.55;color:#34404b}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.modal button{border:1px solid #cfd6dc;background:#fff;border-radius:6px;padding:7px 11px;cursor:pointer}.modal .primary{background:#17212b;color:#fff;border-color:#17212b}.modal select{width:100%;padding:9px;border:1px solid #cfd6dc;border-radius:7px;background:#fff;color:var(--text);margin:8px 0}.modal textarea{width:100%;min-height:150px;border:1px solid #cfd6dc;border-radius:7px;padding:10px;font:13px inherit;box-sizing:border-box}
.site-footer{max-width:1800px;margin:8px auto 24px;padding:0 22px;color:#66717d;font-size:11px;text-align:right}.wrap{max-width:1800px;margin:0 auto;padding:22px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:15px;box-shadow:var(--shadow)}.stat .n{font-size:25px;font-weight:700}.stat .l{font-size:12px;color:var(--muted);margin-top:3px}
.toolbar{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px;margin-bottom:18px;box-shadow:var(--shadow)}
.view-switch{display:inline-flex;gap:0;border:1px solid #cfd6dc;border-radius:8px;overflow:hidden;margin-bottom:0}.view-switch button,.view-switch a.cf-nav{border:0;background:#fff;padding:9px 18px;font:600 13px/normal Inter,Segoe UI,Arial,sans-serif;color:#52606d;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}.view-switch button.active,.view-switch a.cf-nav.active{background:#1f4f7a;color:#fff}.view-switch a.cf-nav{color:#8a5a00;background:#fff8e8}.view-switch a.cf-nav:hover{background:#ffefc2}.filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr 1fr;gap:10px}.filters input,.filters select{width:100%;padding:10px;border:1px solid #cfd6dc;border-radius:7px;background:#fff;color:var(--text)}
.stagebar{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}.stagebar button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 13px;cursor:pointer}.stagebar button.active{background:#17212b;color:#fff;border-color:#17212b}
.meta{display:flex;justify-content:space-between;align-items:center;margin:12px 0;color:var(--muted);font-size:13px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:18px;box-shadow:var(--shadow);display:flex;flex-direction:column;min-height:245px}.top{display:flex;justify-content:space-between;gap:15px}.buyer{font-size:13px;font-weight:650;color:var(--accent);margin-bottom:5px}.title{font-size:18px;line-height:1.28;font-weight:700}.status{font-size:11px;border-radius:999px;padding:4px 7px;font-weight:700;margin-left:5px;background:#e7f3ff;color:#1f5f8b}.changed{background:#fff0d9;color:#9a6700}.score{font-size:12px;border-radius:6px;padding:5px 8px;height:max-content;white-space:nowrap;font-weight:700}.high{background:#fde8e7;color:var(--high)}.medium{background:#fff3d6;color:var(--med)}.low{background:#edf0f2;color:#58636e}
.details{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.pill{font-size:12px;background:#f0f3f5;border-radius:999px;padding:5px 8px;color:#4c5863}.why{margin-top:2px;font-size:13px;line-height:1.45;color:#34404b}.why strong{color:#17212b}.found{margin-top:10px;font-size:11px;color:var(--muted)}.found span{display:inline-block;background:#f6f7f8;border:1px solid #e4e7ea;border-radius:4px;padding:3px 5px;margin:3px 3px 0 0}.footer{margin-top:auto;padding-top:13px;border-top:1px solid #edf0f2;display:flex;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted)}
.tabs{display:flex;gap:6px;margin-top:12px;border-bottom:1px solid #edf0f2;padding-bottom:8px}.tab{border:1px solid #cfd6dc;background:#fff;border-radius:6px;padding:6px 9px;cursor:pointer;color:#1f5f8b;font-size:12px}.tab.active{background:#17212b;color:#fff;border-color:#17212b}.tabpanel{margin-top:10px}.scope{font-size:13px;line-height:1.55;color:#34404b}.scope h4{margin:10px 0 4px;font-size:12px;color:#17212b}.scope p{margin:5px 0;white-space:pre-wrap}.scope-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cpv-list{display:grid;gap:4px;margin:5px 0}.cpv-row{background:#f7f8f9;border:1px solid #e5e8eb;border-radius:7px;padding:7px 9px}.scope-box{background:#f7f8f9;border:1px solid #e5e8eb;border-radius:7px;padding:8px}.scope a{color:#1f5f8b;text-decoration:none}.scope a:hover{text-decoration:underline}.doc{margin:5px 0}.history{margin-top:12px;border-top:1px solid #edf0f2;padding-top:10px}.history-head{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}.history-row{font-size:11px;color:#58636e;padding:7px 0;border-top:1px solid #f0f2f4;line-height:1.4}.expand{border:1px solid #cfd6dc;background:#fff;border-radius:6px;padding:5px 8px;cursor:pointer;color:#1f5f8b}.empty{background:#fff;border:1px dashed var(--line);padding:40px;text-align:center;border-radius:10px;color:var(--muted)}
@media(max-width:1050px){.filters{grid-template-columns:2fr 1fr 1fr 1fr}.cards{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.header{padding:22px}.header-links{justify-content:flex-start}.wrap{padding:12px}.filters{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.title{font-size:16px}}

/* v3.15 opportunity intelligence charts */
.analytics{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:14px;margin:0 0 18px}.chart-card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:15px;box-shadow:var(--shadow)}.chart-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:12px}.chart-title{font-size:15px;font-weight:700;color:#17212b}.chart-sub{font-size:11px;color:var(--muted);margin-top:3px;line-height:1.35}.chart-reset{border:1px solid #cfd6dc;background:#fff;border-radius:999px;padding:5px 9px;font-size:11px;cursor:pointer;display:none}.chart-reset.active{display:inline-block}.bar-row{display:grid;grid-template-columns:112px 1fr 34px;gap:8px;align-items:center;margin:10px 0;cursor:pointer}.bar-label{font-size:11px;color:#34404b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar-track{height:13px;background:#edf1f4;border-radius:999px;overflow:hidden}.bar-fill{height:100%;border-radius:999px;background:#2f6f9f;transition:background .18s ease,width .25s ease}.bar-row:hover .bar-fill{background:#1f4f7a}.bar-row.selected{background:#f1ebfb;outline:3px solid #5b3f8c;box-shadow:inset 5px 0 0 #5b3f8c;border-radius:5px}.bar-row.selected .bar-fill{background:#5b3f8c}.bar-row.selected .bar-label{font-weight:700}.bar-row.selected .bar-label::before{content:"✓";display:inline-block;margin-right:6px;font-weight:800;color:#5b3f8c;position:relative;left:5px}.bar-count{text-align:right;font-size:12px;font-weight:700;color:#17212b}.bar-empty{font-size:12px;color:var(--muted);padding:12px 0}.chart-note{font-size:10px;color:var(--muted);margin-top:10px;border-top:1px solid #edf0f2;padding-top:8px}@media(max-width:1050px){.analytics{grid-template-columns:1fr 1fr}.analytics .chart-card:first-child{grid-column:1/-1}}@media(max-width:650px){.analytics{grid-template-columns:1fr}.analytics .chart-card:first-child{grid-column:auto}.bar-row{grid-template-columns:100px 1fr 28px}}


/* Performance: reserve chart space before dynamic chart rows are rendered. */
#categoryChart,#deadlineChart,#valueChart{min-height:170px}

/* Smart analytics filtering */
.filter-status{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 14px;padding:10px 12px;border:1px solid #d9dee5;border-radius:8px;background:#f7f9fb;color:#39434d;font-size:13px}.filter-status strong{color:#18212a}.filter-status .filter-label{color:#66717d}.filter-status button{border:1px solid #b8c0c9;background:#fff;border-radius:6px;padding:6px 10px;font:inherit;font-weight:600;color:#27313a;cursor:pointer}.filter-status button:hover{background:#f0f3f6}

/* Mobile landscape polish: compact layout for narrow, short viewports only */
@media (orientation:landscape) and (max-width:850px) and (max-height:500px){
  .header{padding:14px 18px 12px}
  .header h1{font-size:22px;margin-bottom:4px}
  .header p{font-size:13px}
  .header-links{justify-content:flex-start;margin-top:8px}
  .wrap{padding:10px 12px}
  .stats{grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:12px}
  .stat{padding:10px 12px}
  .stat .n{font-size:21px}
  .toolbar{padding:10px;margin-bottom:12px}
  .filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .filters input,.filters select{padding:8px}
  .cards{gap:10px}
  .card{padding:14px;min-height:0}
  .analytics{gap:10px;margin-bottom:12px}
  .chart-card{padding:12px}
  .bar-row{grid-template-columns:90px 1fr 28px;gap:6px;margin:8px 0}
}


/* Accessibility: keyboard focus and visually hidden form labels */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #1f5f8b;outline-offset:2px}
.bar-row:focus-visible{outline:3px solid #1f5f8b;outline-offset:3px;border-radius:5px}

/* Isolated Contracts Finder navigation */
.view-switch a.cf-nav{display:inline-block;text-decoration:none;border:0;background:#fff8e8;color:#8a5a00;padding:9px 18px;font-weight:600}.view-switch a.cf-nav:hover{background:#ffefc2}


/* Soft-launch commercial and enquiry UI */
.commercial-panel{display:flex;justify-content:space-between;align-items:center;gap:22px;background:#fff;border:1px solid #cfd9e2;border-left:4px solid #1f5f8b;border-radius:10px;padding:16px 18px;margin:0 0 18px;box-shadow:var(--shadow)}
.commercial-panel h2{margin:0 0 5px;font-size:17px}.commercial-panel p{margin:3px 0;font-size:12px;line-height:1.45;color:#44515d}.commercial-button{border:1px solid #1f5f8b;background:#1f5f8b;color:#fff;border-radius:7px;padding:10px 14px;font-weight:650;white-space:nowrap;cursor:pointer}.commercial-button:hover{background:#194e73}
.site-footer button{border:0;background:none;color:#66717d;padding:0;font:inherit;cursor:pointer;text-decoration:underline}.site-footer button:hover{color:#1f5f8b}
.modal form{display:grid;gap:7px}.modal form label,.modal form legend{font-size:12px;font-weight:650;color:#27313a}.modal form input,.modal form textarea{width:100%;padding:9px;border:1px solid #cfd6dc;border-radius:7px;background:#fff;color:var(--text);font:13px inherit}.modal form textarea{min-height:90px}.modal form fieldset{border:1px solid #dfe4e8;border-radius:7px;padding:10px;display:grid;gap:7px}.modal form fieldset label{font-weight:400}.modal form fieldset input{width:auto;margin-right:5px}.modal .consent-line{display:flex;gap:8px;align-items:flex-start;font-weight:400;margin-top:5px}.modal .consent-line input{width:auto;margin-top:2px}.modal .form-note{font-size:11px;margin:2px 0;color:#66717d}
@media(max-width:650px){.commercial-panel{display:block}.commercial-button{margin-top:10px;width:100%}}

/* Public service statistics — hidden automatically until real figures are supplied */
.public-stats{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:0 0 18px;box-shadow:var(--shadow);display:flex;justify-content:space-between;align-items:center;gap:18px}.public-stats[hidden]{display:none}.public-stats h2{margin:0;font-size:14px}.public-stats-note{margin:3px 0 0;font-size:11px;color:var(--muted)}.public-stat-grid{display:flex;gap:12px}.public-stat{min-width:145px;text-align:center;border-left:1px solid #edf0f2;padding-left:14px}.public-stat .n{font-size:22px;font-weight:700}.public-stat .l{font-size:11px;color:var(--muted);margin-top:2px}@media(max-width:650px){.public-stats{display:block}.public-stat-grid{margin-top:10px;display:grid;grid-template-columns:1fr 1fr}.public-stat{border-left:0;border-top:1px solid #edf0f2;padding:9px 4px 0}}

/* Header purpose introduction */
.header-intro{max-width:760px;margin:9px 0 0!important;color:#e1e7ec!important;font-size:14px!important;line-height:1.5}
@media(max-width:650px){.header-intro{font-size:13px!important;line-height:1.45}.header{padding:20px 16px 18px}.header-links{margin-top:12px}}

/* Header layout: keep site purpose separate from the brand */
.header-inner{padding:0!important;display:grid;grid-template-columns:minmax(260px,1fr) minmax(360px,760px) auto;align-items:start;gap:28px}
.header-brand h1{margin:0 0 6px}
.header-purpose p{margin:0;color:#e1e7ec;font-size:14px;line-height:1.5}
.header-links{align-self:start}
@media(max-width:1050px){.header-inner{grid-template-columns:1fr auto}.header-purpose{grid-column:1/-1;grid-row:2}.header-links{grid-column:2;grid-row:1}}
@media(max-width:650px){.header{padding:20px 16px 18px}.header-inner{display:flex;flex-direction:column;gap:12px}.header-purpose{order:2}.header-links{order:3;margin-top:0;justify-content:flex-start}.header-purpose p{font-size:13px;line-height:1.45}}


/* Site purpose panels and the homepage's explanatory SEO section */
.site-purpose{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px 18px;margin:0 0 16px;box-shadow:var(--shadow)}
.site-purpose h2{margin:0 0 4px;font-size:14px;color:#17212b}
.site-purpose p{margin:0;max-width:none;font-size:13px;line-height:1.5;color:#44515d}
.site-purpose .seo-content h2{margin:0 0 12px;font-size:18px;line-height:1.35;color:#17212b}
.site-purpose .seo-content h3{margin:16px 0 5px;font-size:14px;line-height:1.4;font-weight:700;color:#17212b}
.site-purpose .seo-content p{margin:0 0 10px;font-size:13px;line-height:1.6;color:#44515d}
.site-purpose .seo-content p:last-child{margin-bottom:0}
.site-purpose .seo-content a{color:#155da8;text-decoration:underline;text-underline-offset:2px}
@media(max-width:650px){.site-purpose{padding:12px 14px}.site-purpose h2{font-size:13px}.site-purpose p{font-size:12px;line-height:1.45}.site-purpose .seo-content h2{font-size:16px}.site-purpose .seo-content h3{font-size:13px;margin-top:14px}.site-purpose .seo-content p{font-size:12px;line-height:1.55}}


