.hub-page { background:var(--paper); color:var(--ink); }
.hub-page .topbar { position:relative; justify-content:flex-end; }
.hub-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:8px; color:var(--ink); text-decoration:none; }
.hub-icon svg { width:21px; height:21px; }
.hub-icon[aria-current="page"] { color:var(--accent-dark); }
.hub-page .help { right:4vw; }
.hub-page .help a { font-weight:600; }
.hub-main { width:min(1040px,calc(100% - 48px)); margin:48px auto 96px; }
.hub-title { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:30px; }
.hub-title h1 { margin:0; font:400 clamp(38px,4.2vw,54px)/1.14 var(--headerFont); letter-spacing:-.025em; }
.hub-text-button { width:fit-content; padding:7px 2px; color:var(--accent-dark); font-weight:600; text-decoration:underline; text-underline-offset:4px; }
.hub-text-button:is(:hover,:focus-visible) { transform:translateY(-2px); text-shadow:0 5px 17px #246b9438; }
#hub-filters { display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; padding-bottom:20px; border-bottom:1px solid var(--line); }
#hub-filters label { min-width:0; }
#hub-filters .hub-search { flex:1 1 250px; }
#hub-filters input,#hub-filters select { width:100%; min-height:44px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); }
#hub-filters select { width:auto; max-width:100%; }
#hub-filters input::placeholder { color:var(--muted); }
#hub-summary { margin:0; }
.hub-results { display:grid; }
.hub-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 28px; padding:24px 0; border-bottom:1px solid var(--line); }
.hub-item h2 { margin:0 0 5px; font:400 25px/1.25 var(--headerFont); }
.hub-item h2 a { color:var(--ink); text-decoration:none; }
.hub-item h2 a:is(:hover,:focus-visible) { color:var(--accent-dark); text-decoration:underline; text-underline-offset:4px; }
.hub-item p { margin:0 0 7px; }
.hub-meta { display:flex; flex-wrap:wrap; gap:4px 12px; color:var(--muted); font-size:13px; }
.hub-kind { color:var(--accent-dark); font-weight:600; }
.hub-item .hub-end { align-self:start; text-align:right; font-size:13px; color:var(--muted); }
.hub-item .hub-end strong { display:block; color:var(--ink); font-size:14px; }
.hub-eligibility { margin-top:8px !important; font-size:14px; }
.hub-job { grid-template-columns:minmax(0,1fr) minmax(192px,240px); gap:20px 32px; padding:32px 0; }
.hub-job-body,.hub-job-dates { min-width:0; overflow-wrap:anywhere; }
.hub-job h2 { margin-bottom:8px; }
.hub-job-identity { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.hub-job-identity-text { min-width:0; flex:1; }
.hub-job-identity h2 { margin:0; }
.hub-job .hub-job-organisation { margin:0 0 6px; font-size:14px; font-weight:600; }
.hub-job-logo { display:grid; place-items:center; position:relative; flex:0 0 104px; width:104px; height:64px; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--raised); color:var(--ink); }
.hub-job-logo.has-logo { background:#fff; }
.hub-job-logo.hub-job-logo-ink { background:#183745; }
.hub-job-logo img { display:none; position:absolute; inset:8px; width:calc(100% - 16px); height:calc(100% - 16px); object-fit:contain; }
.hub-job-logo.has-logo img { display:block; }
.hub-job-logo.has-logo .hub-job-initials { display:none; }
.hub-job-initials { font-size:17px; font-weight:600; letter-spacing:.02em; }
.hub-job .hub-job-summary { margin-bottom:16px; }
.hub-job-meta { align-items:center; gap:6px 12px; font-size:14px; }
.hub-job { --job-type-ink:#245f80; --job-type-paper:#edf4f8; --job-current:#286747; --job-recheck:#875710; }
.hub-job[data-kind="tender"] { --job-type-ink:#695096; --job-type-paper:#f3eff9; }
.hub-job-type { padding:2px 8px; border-radius:4px; color:var(--job-type-ink); background:var(--job-type-paper); font-size:13px; font-weight:600; line-height:1.5; }
html[data-theme="dark"] .hub-job { --job-type-ink:#a6d5ed; --job-type-paper:#203846; --job-current:#96d4ac; --job-recheck:#ecc080; }
html[data-theme="dark"] .hub-job[data-kind="tender"] { --job-type-ink:#d0b7f0; --job-type-paper:#352c47; }
.hub-job-meta + .hub-meta { margin-top:4px; }
.hub-job-value { display:flex; flex-wrap:wrap; gap:4px 12px; margin:16px 0 0; font-size:14px; }
.hub-job-value dt { color:var(--muted); }
.hub-job-value dd { margin:0; font-weight:600; }
.hub-job-value a { color:var(--accent-dark); font-weight:600; text-underline-offset:4px; }
.hub-job-dates { align-self:start; display:grid; gap:16px; font-size:14px; }
.hub-job-state { align-self:start; font-weight:600; color:var(--muted); }
.hub-job[data-state="open"] .hub-job-state { color:var(--job-current); }
.hub-job[data-state="recheck"] .hub-job-state { color:var(--job-recheck); }
.hub-job-deadline { display:grid; gap:4px; margin:0; }
.hub-job-deadline dt { color:var(--muted); font-size:13px; }
.hub-job-deadline dd { margin:0; font-weight:600; font-variant-numeric:tabular-nums; }
.hub-job .hub-job-checked { margin:0; color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
.hub-empty { padding:35px 0; color:var(--muted); }
.hub-subscription { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-top:56px; padding-top:26px; border-top:1px solid var(--line); }
.hub-subscription h2 { margin:0 0 4px; font:400 26px/1.2 var(--headerFont); }
.hub-subscription p { margin:0; color:var(--muted); font-size:14px; }
.hub-dialog,.content-dialog { width:min(640px,calc(100vw - 30px)); max-height:calc(100dvh - 30px); margin:auto; padding:24px; overflow:auto; border:1px solid var(--line); border-radius:14px; background:var(--paper); color:var(--ink); box-shadow:0 18px 54px #20324130; }
.hub-dialog::backdrop,.content-dialog::backdrop { background:#10202b66; backdrop-filter:blur(5px); }
.hub-dialog-top { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.hub-dialog-top h2 { margin:0; font:400 27px/1.2 var(--headerFont); }
.hub-dialog-close { display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:7px; }
.content-dialog .hub-dialog-close { margin-left:auto; }
.hub-dialog-close svg { width:20px; height:20px; }
.hub-dialog form > label { display:block; margin:18px 0 6px; font-weight:600; }
.hub-dialog input:is([type="email"],[type="text"]) { display:block; width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); }
.hub-dialog fieldset { display:flex; flex-wrap:wrap; gap:10px 20px; margin:18px 0 0; padding:0; border:0; }
.hub-dialog legend { margin-bottom:6px; font-weight:600; }
.hub-dialog .hub-checkbox { margin:15px 0; }
.hub-dialog-actions { display:flex; flex-wrap:wrap; align-items:center; gap:16px; margin-top:18px; }
.hub-primary { padding:9px 14px; border-radius:8px; background:var(--accent); color:var(--paper); font-weight:600; }
.hub-primary:is(:hover,:focus-visible) { background:var(--accent-dark); color:var(--paper); }
#subscription-status { min-height:22px; margin:14px 0; }
.hub-outbox { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.hub-outbox h3 { margin:0; font:600 16px/1.4 var(--bodyFont); }
.hub-outbox ol { padding-left:22px; }
.hub-outbox li { margin:8px 0; }
.hub-outbox li button { margin-left:8px; color:var(--accent-dark); font-weight:600; text-decoration:underline; }
.hub-outbox > button { color:var(--accent-dark); text-decoration:underline; text-underline-offset:4px; }
.content-dialog { width:min(940px,calc(100vw - 30px)); padding:0; }
.content-dialog .hub-dialog-top { position:sticky; z-index:2; top:0; padding:12px 18px 0; background:var(--paper); }
.content-dialog .about-main { width:auto; margin:0; padding:8px 30px 34px; }
.content-dialog .about-main h1 { margin-top:4px; }
.content-dialog .about-ai-setup { margin-top:0; border:0; padding-top:0; }
html[data-theme="dark"] :is(.hub-dialog,.content-dialog) { background:var(--raised); box-shadow:0 18px 54px #0008; }
html[data-theme="dark"] .content-dialog .hub-dialog-top { background:var(--raised); }
@media(max-width:680px){
  .hub-page .wordmark { display:none; }
  .hub-page .topbar { justify-content:flex-end; padding:10px 16px; }
  .hub-page .header-actions { gap:0; }
  .hub-page .hub-icon,.hub-page .icon-button { width:42px; height:42px; }
  .hub-main { width:calc(100% - 36px); margin:34px auto 68px; }
  #hub-filters select { width:100%; }
  #hub-filters label { flex:1 1 145px; }
  .hub-item { grid-template-columns:1fr; gap:6px; }
  .hub-item .hub-end { text-align:left; }
  .hub-item .hub-end strong { display:inline; margin-right:10px; }
  .hub-job { gap:20px; padding:28px 0; }
  .hub-job-identity { gap:14px; }
  .hub-job-logo { flex-basis:88px; width:88px; height:56px; padding:6px; }
  .hub-job-logo img { inset:6px; width:calc(100% - 12px); height:calc(100% - 12px); }
  .hub-job-dates { grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; }
  .hub-job-state { grid-column:2; grid-row:1; }
  .hub-job-deadline { grid-column:1; grid-row:1; }
  .hub-job-checked { grid-column:1 / -1; }
  .hub-subscription { align-items:flex-start; flex-direction:column; gap:12px; }
  .content-dialog .about-main { padding:8px 18px 24px; }
}
@media(prefers-reduced-motion:reduce){.hub-text-button { transition:none; }.hub-text-button:is(:hover,:focus-visible){transform:none;}}

/* Toolbox follows the shared listing hierarchy. */
.hub-functions { flex:1 0 100%; display:flex; flex-wrap:wrap; gap:4px 6px; }
#hub-reset { flex:none; width:44px; height:44px; padding:0; }
#hub-reset svg { width:21px; height:21px; }
.hub-function { min-height:44px; padding:8px 12px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); font-size:14px; }
.hub-function:is(:hover,:focus-visible) { color:var(--ink); background:var(--raised); }
.hub-function[aria-pressed="true"] { color:var(--accent-dark); background:var(--raised); border-color:var(--line); font-weight:600; }
.hub-function:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.hub-count { padding-top:16px; color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
.hub-tool-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.hub-tag { padding:2px 8px; border-radius:4px; font-size:12px; color:#245f80; background:#edf4f8; }
.hub-tag[data-function="Groundwater"],.hub-tag[data-function="Sensors"] { color:#286747; background:#edf5ef; }
.hub-tag[data-function="Survey"],.hub-tag[data-function="Analysis"] { color:#695096; background:#f3eff9; }
html[data-theme="dark"] .hub-tag { color:#a6d5ed; background:#203846; }
html[data-theme="dark"] .hub-tag:is([data-function="Groundwater"],[data-function="Sensors"]) { color:#96d4ac; background:#20392c; }
html[data-theme="dark"] .hub-tag:is([data-function="Survey"],[data-function="Analysis"]) { color:#d0b7f0; background:#352c47; }
.hub-tool { grid-template-columns:minmax(0,1fr) minmax(160px,192px); gap:20px 32px; padding:32px 0; }
.hub-tool-body,.hub-tool-check { min-width:0; overflow-wrap:anywhere; }
.hub-tool h2 { margin-bottom:8px; }
.hub-tool .hub-tool-summary { margin-bottom:16px; }
.hub-tool-meta { gap:4px 16px; font-size:14px; }
.hub-tool-meta span:first-child { color:var(--ink); font-weight:600; }
.hub-tool .hub-tool-notes { margin:16px 0 0; font-size:14px; }
.hub-tool-check { align-self:start; display:grid; gap:8px; }
.hub-tool-state { color:var(--accent-dark); font-size:14px; }
.hub-tool .hub-tool-checked { margin:0; color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
@media(max-width:680px){
  .hub-tool { grid-template-columns:1fr; gap:16px; padding:28px 0; }
  .hub-tool-check { display:flex; flex-wrap:wrap; gap:4px 16px; align-items:baseline; }
}
