/* ============================================================
   tender-page.css — /tender.html?id=<id> · the tender detail page
   Prefix: .tdp-  (tender detail page). Reuses the .ctd- design
   tokens + several .ctd- components (contracts.css loads first).
   Fraunces display / DM Sans body / IBM Plex Mono data.
   Light mode only. Link colors scoped (sitewide a:hover trap).
   ============================================================ */

/* contracts.css sets `body.ctd-body { overflow-x: visible }` (it needs a sticky
   rail); this page has NO sticky, so restore an h-scroll guard on the root.
   overflow-x:clip prevents page-level sideways scroll without turning the body
   into a scroll container (and does not create a fixed-position containing block,
   so the fixed nav is unaffected). Loads after contracts.css → wins the tie. */
html, body.tdp-body { overflow-x: clip; overflow-y: visible; }
.tdp-body { background: var(--gcx-cream); color: var(--gcx-ink); font-family: var(--gcx-sans); }
/* per-section clips (belt-and-braces; there is no sticky descendant here) */
.tdp-main, .tdp-wrap, .gcx-footer { overflow-x: clip; }

.tdp-main { min-height: 60vh; }
.tdp-wrap { max-width: 820px; margin: 0 auto; padding: 26px 24px 44px; }

/* nav text-color restore (ids beat any content rule) */
#siteNav .nav__link, #siteNav .btn-ghost, #mobileMenu .mobile-menu-link { color: var(--ink); }
#siteNav .btn-primary, #mobileMenu .btn-primary { color: var(--white); }
#siteNav a:focus-visible, #siteNav button:focus-visible,
#mobileMenu a:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; border-radius: 6px; }

/* ================= Top strip ================= */
.tdp-crumbs { margin: 0 0 16px; }
.tdp-crumbs a { font-family: var(--gcx-sans); font-size: 13.5px; font-weight: 600; color: var(--gcx-sienna); text-decoration: none; display: inline-block; padding: 6px 2px; min-height: 34px; }
.tdp-crumbs a:hover, .tdp-crumbs a:focus, .tdp-crumbs a:visited, .tdp-crumbs a:active { color: var(--gcx-sienna); }
.tdp-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tdp-toptags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 15px; }
.tdp-typechip { font-family: var(--gcx-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gcx-forest); background: color-mix(in srgb, var(--gcx-forest) 13%, #fff); border: 1px solid color-mix(in srgb, var(--gcx-forest) 24%, #fff); padding: 5px 11px; border-radius: 7px; }
.tdp-typechip i { font-style: normal; font-weight: 500; opacity: .78; text-transform: none; letter-spacing: 0; }
.tdp-setaside { font-family: var(--gcx-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6b4a12; background: #f6ead2; border: 1px solid #e8d5a8; padding: 5px 11px; border-radius: 7px; }

/* ================= Masthead ================= */
.tdp-mast { margin: 0 0 26px; }
.tdp-mast h1 { font-family: var(--gcx-serif); font-size: clamp(26px, 4.4vw, 37px); line-height: 1.12; font-weight: 600; letter-spacing: -.016em; color: var(--gcx-ink); margin: 0 0 12px; overflow-wrap: anywhere; }
.tdp-sub { font-family: var(--gcx-sans); font-size: 15.5px; font-weight: 500; color: var(--gcx-ink-2); margin: 0 0 18px; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.tdp-sub-k { font-family: var(--gcx-mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gcx-forest-light); }
.tdp-sub-eu { color: var(--gcx-ink-2); opacity: .82; }

/* closing-status hero — the founder's #1 field, up front */
.tdp-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 13px; background: var(--gcx-parchment); border: 1px solid var(--gcx-line); border-left: 4px solid var(--gcx-forest-light); border-radius: 0 12px 12px 0; padding: 14px 20px; }
.tdp-status-key { font-family: var(--gcx-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gcx-forest-light); }
.tdp-status-val { font-family: var(--gcx-serif); font-size: clamp(18px, 2.5vw, 21px); font-weight: 600; color: var(--gcx-forest); line-height: 1.15; }
.tdp-status-badge { font-family: var(--gcx-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; padding: 4px 11px; border-radius: 999px; background: #eee7d6; color: var(--gcx-ink-2); white-space: nowrap; }
.tdp-status-badge--soon { background: #f6e3d7; color: var(--gcx-sienna-dk); }
.tdp-status-badge--urgent { background: var(--gcx-sienna); color: #fff; }
.tdp-status-badge--closed { background: var(--gcx-ink-2); color: #fff; }
.tdp-status--soon { border-left-color: var(--ctd-amber); }
.tdp-status--urgent { border-left-color: var(--gcx-sienna); }
.tdp-status--closed { border-left-color: var(--gcx-ink-2); }
.tdp-status--closed .tdp-status-val { color: var(--gcx-ink-2); }

/* tooltip trigger dot (in fact labels) */
.tdp-tipdot { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: color-mix(in srgb, var(--gcx-forest) 12%, #fff); border: 1px solid color-mix(in srgb, var(--gcx-forest) 28%, #fff); color: var(--gcx-forest-light); font-family: var(--gcx-sans); font-size: 10px; font-weight: 700; text-transform: none; letter-spacing: 0; cursor: help; }
.tdp-tipdot:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; }

/* closed banner + muted state */
.tdp-closedbanner { background: #f6ead2; border: 1px solid #e8d5a8; border-left: 4px solid var(--gcx-sienna); border-radius: 0 10px 10px 0; color: #6b5320; font-size: 14px; font-weight: 500; line-height: 1.5; padding: 12px 18px; margin: 0 0 22px; }
.tdp-closed .tdp-mast h1 { color: var(--gcx-ink-2); }
.tdp-closed .tdp-facts, .tdp-closed .tdp-descblock, .tdp-closed .tdp-win, .tdp-closed .tdp-buyer { opacity: .72; }

/* ================= Facts grid ================= */
.tdp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--gcx-line); border: 1px solid var(--gcx-line); border-radius: 14px; overflow: hidden; margin: 0 0 26px; }
.tdp-fact { background: var(--ctd-paper); padding: 15px 18px; min-width: 0; }
.tdp-fact dt { font-family: var(--gcx-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--gcx-forest-light); font-weight: 600; margin: 0 0 6px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tdp-fact dd { margin: 0; font-family: var(--gcx-sans); font-size: 15px; line-height: 1.42; color: var(--gcx-ink); overflow-wrap: anywhere; }
.tdp-mono { font-family: var(--gcx-mono); font-size: 13px; }
.tdp-ref { font-size: 12.5px; color: var(--gcx-ink-2); }
/* trade agreements span the full width — they render as a chip row */
.tdp-fact--agr { grid-column: 1 / -1; }
.tdp-agrs { display: flex; flex-wrap: wrap; gap: 7px; }
.tdp-agr { font-family: var(--gcx-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--gcx-forest); background: color-mix(in srgb, var(--gcx-forest) 8%, #fff); border: 1px solid color-mix(in srgb, var(--gcx-forest) 20%, #fff); border-radius: 999px; padding: 4px 11px; cursor: help; }
.tdp-agr:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; }
.tdp-amchip { font-family: var(--gcx-sans); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b4a12; background: #f6ead2; border: 1px solid #e8d5a8; padding: 2px 6px; border-radius: 5px; }
.tdp-amdate { color: var(--gcx-ink-2); font-size: 12px; }
/* solicitation number cell — the copy affordance is load-bearing on no-URL tenders */
.tdp-solline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tdp-solnum { font-size: 14px; font-weight: 600; color: var(--gcx-ink); }
.tdp-copy { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--gcx-line); border-radius: 999px; padding: 7px 13px; font-family: var(--gcx-sans); font-size: 12.5px; font-weight: 600; color: var(--gcx-forest); cursor: pointer; transition: border-color .15s, background .15s, color .15s; min-height: 44px; box-sizing: border-box; }
.tdp-copy svg { width: 14px; height: 14px; flex: 0 0 auto; }
.tdp-copy:hover { border-color: var(--gcx-forest); background: var(--gcx-cream); }
.tdp-copy:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; }
.tdp-copy.is-copied { background: var(--gcx-forest); border-color: var(--gcx-forest); color: #fff; }

@media (max-width: 560px) {
    .tdp-facts { grid-template-columns: 1fr; }
    .tdp-fact { padding: 14px 16px; }
    .tdp-fact--filler { display: none; }  /* parity filler only matters in 2-col */
}

/* ================= Blocks (description / win) ================= */
.tdp-block { margin: 0 0 26px; }
.tdp-block > h2 { font-family: var(--gcx-serif); color: var(--gcx-forest); font-size: clamp(18px, 2.6vw, 22px); font-weight: 600; margin: 0 0 12px; }
/* description reuses .ctd-detail-desc / .ctd-detail-list from contracts.css */
.tdp-descblock .ctd-detail-desc, .tdp-descblock .ctd-detail-list { max-width: none; }

/* win panel: .ctd-win look, but page-level h2 heading + roomier list rhythm */
.tdp-win.ctd-win { max-width: none; padding: 20px 24px 16px; }
.tdp-win.ctd-win > h2 { font-family: var(--gcx-serif); color: var(--gcx-forest); font-size: clamp(18px, 2.6vw, 22px); font-weight: 600; margin: 0 0 12px; }
.tdp-win .ctd-detail-means, .tdp-win ul { max-width: none; }
.tdp-win ul { padding-left: 20px; }
.tdp-win li { margin: 0 0 11px; padding-left: 3px; line-height: 1.62; }
.tdp-win li::marker { content: '\2192  '; color: var(--gcx-sienna); font-weight: 600; }

/* description clamp (mirrors the contracts.html dossier fade + toggle) */
.tdp-desc-wrap { position: relative; }
.tdp-desc-wrap.clamped .tdp-desc-inner { max-height: 340px; overflow: hidden; }
.tdp-desc-wrap.clamped::before { content: ''; position: absolute; left: 0; right: 0; top: 268px; height: 72px; background: linear-gradient(180deg, rgba(253,250,242,0), var(--gcx-cream)); pointer-events: none; }
.tdp-desc-more { display: inline-flex; align-items: center; margin: 10px 0 0; background: #fff; border: 1px solid var(--gcx-line); border-radius: 10px; padding: 10px 18px; font-family: var(--gcx-sans); font-size: 13.5px; font-weight: 700; color: var(--gcx-forest); cursor: pointer; min-height: 44px; box-sizing: border-box; transition: border-color .15s, background .15s; }
.tdp-desc-more:hover, .tdp-desc-more:focus-visible { border-color: var(--gcx-forest); background: var(--gcx-cream); }
.tdp-desc-more:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; }
.tdp-desc-more[hidden] { display: none; }

/* ================= Buyer award-context module ================= */
.tdp-buyer { border-top: 1px solid var(--gcx-line); padding-top: 24px; }
.tdp-buyer-sub { font-family: var(--gcx-sans); font-size: 14.5px; line-height: 1.55; color: var(--gcx-ink-2); margin: 0 0 16px; max-width: 62ch; }
.tdp-buyer-sub b { color: var(--gcx-forest); font-weight: 700; }
.tdp-buyer-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.tdp-btile { background: var(--gcx-parchment); border: 1px solid var(--gcx-line); border-radius: 12px; padding: 16px 16px 14px; text-align: left; min-width: 0; }
.tdp-btile-num { display: block; font-family: var(--gcx-serif); font-size: clamp(24px, 3.6vw, 30px); font-weight: 600; letter-spacing: -.01em; color: var(--gcx-forest); line-height: 1.05; margin: 0 0 5px; }
.tdp-btile-lbl { display: inline-block; font-family: var(--gcx-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gcx-forest-light); cursor: help; text-decoration: underline dotted; text-decoration-thickness: 1px; text-decoration-color: rgba(45,90,69,.4); text-underline-offset: 3px; }
.tdp-btile-lbl:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; }
.tdp-buyer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 26px; margin: 0 0 16px; }
.tdp-buyer-col { min-width: 0; }
.tdp-buyer-col h3 { font-family: var(--gcx-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gcx-forest-light); margin: 0 0 10px; }
.tdp-buyer-list { list-style: none; margin: 0; padding: 0; }
.tdp-buyer-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--gcx-line); }
.tdp-buyer-list li:last-child { border-bottom: 0; }
.tdp-buyer-name { font-family: var(--gcx-sans); font-size: 14px; font-weight: 500; color: var(--gcx-ink); overflow-wrap: anywhere; min-width: 0; }
.tdp-buyer-count { font-family: var(--gcx-mono); font-size: 11px; color: var(--gcx-ink-2); white-space: nowrap; }
.tdp-buyer-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.tdp-buyer-cat { font-family: var(--gcx-sans); font-size: 12.5px; font-weight: 500; color: var(--gcx-ink-2); background: #fff; border: 1px solid var(--gcx-line); border-radius: 999px; padding: 5px 12px; }
.tdp-buyer-attr { font-family: var(--gcx-sans); font-size: 11.5px; line-height: 1.5; color: #6b6a5f; margin: 4px 0 0; }

/* ================= Action row / findbox ================= */
.tdp-action { border-top: 1px solid var(--gcx-line); padding-top: 24px; }
.tdp-actionrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tdp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--gcx-sans); font-size: 15px; font-weight: 700; text-decoration: none; border-radius: 10px; padding: 13px 24px; min-height: 48px; box-sizing: border-box; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.tdp-btn--primary { background: var(--gcx-forest); color: #fff !important; border: 1px solid var(--gcx-forest); }
.tdp-btn--primary:hover, .tdp-btn--primary:focus { background: var(--gcx-forest-dk); color: #fff !important; }
.tdp-btn--ghost { background: #fff; color: var(--gcx-forest) !important; border: 1px solid var(--gcx-line); font-weight: 600; }
.tdp-btn--ghost:hover, .tdp-btn--ghost:focus { border-color: var(--gcx-forest); background: var(--gcx-cream); color: var(--gcx-forest) !important; }
.tdp-btn--primary:visited, .tdp-btn--primary:active { color: #fff !important; }
.tdp-btn--ghost:visited, .tdp-btn--ghost:active { color: var(--gcx-forest) !important; }
.tdp-btn:focus-visible { outline: 2px solid var(--gcx-forest-light); outline-offset: 2px; }
.tdp-actionsub { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.tdp-save { min-height: 48px; }

/* honest findbox (no direct link) */
.tdp-findbox { background: var(--gcx-parchment); border: 1px solid var(--gcx-line); border-left: 4px solid var(--gcx-sienna); border-radius: 0 14px 14px 0; padding: 22px 26px; }
.tdp-findbox h3 { font-family: var(--gcx-serif); color: var(--gcx-forest); font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.tdp-findbox-lead { font-family: var(--gcx-sans); font-size: 14.5px; font-weight: 600; color: var(--gcx-ink-2); margin: 0 0 14px; }
.tdp-findsteps { list-style: none; counter-reset: fs; margin: 0 0 14px; padding: 0; }
.tdp-findsteps > li { position: relative; padding: 0 0 16px 40px; font-size: 14.5px; line-height: 1.55; color: var(--gcx-ink-2); }
.tdp-findsteps > li:last-child { padding-bottom: 0; }
.tdp-findsteps > li::before { counter-increment: fs; content: counter(fs); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--gcx-forest); color: #fff; font-family: var(--gcx-mono); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.tdp-findsteps .tdp-copy { margin-top: 8px; }
.tdp-findsteps .tdp-btn { margin-top: 4px; }
.tdp-solnum-inline { font-size: 13.5px; font-weight: 600; color: var(--gcx-ink); background: #fff; border: 1px solid var(--gcx-line); border-radius: 5px; padding: 1px 7px; }
.tdp-findbox-note { font-size: 12.5px; line-height: 1.55; color: #6b6a5f; margin: 4px 0 0; max-width: 62ch; }

/* ================= More like this ================= */
.tdp-similar { border-top: 1px solid var(--gcx-line); padding-top: 22px; }
.tdp-simlist { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--gcx-line); border-radius: 12px; overflow: hidden; }
.tdp-simlist li + li .tdp-simrow { border-top: 1px solid var(--gcx-line); }
.tdp-simrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta when" "title title"; gap: 3px 12px; padding: 14px 18px; background: var(--ctd-paper); text-decoration: none; transition: background .15s; }
.tdp-simrow:hover { background: #fff; }
.tdp-simmeta { grid-area: meta; font-family: var(--gcx-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gcx-forest-light); }
.tdp-simwhen { grid-area: when; font-family: var(--gcx-mono); font-size: 11px; color: var(--gcx-ink-2); white-space: nowrap; text-align: right; }
.tdp-simtitle { grid-area: title; font-family: var(--gcx-serif); font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--gcx-ink); overflow-wrap: anywhere; }
.tdp-simrow:hover .tdp-simtitle { text-decoration: underline; text-decoration-color: var(--gcx-sienna); text-underline-offset: 3px; }
.tdp-simbrowse { display: inline-block; font-family: var(--gcx-sans); font-size: 14px; font-weight: 600; color: var(--gcx-sienna); text-decoration: none; padding: 6px 2px; }
.tdp-simbrowse:hover, .tdp-simbrowse:focus, .tdp-simbrowse:visited, .tdp-simbrowse:active { color: var(--gcx-sienna); }
.tdp-simbrowse:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ================= Grants bridge ================= */
.tdp-bridge { background: #f6eed9; border: 1px solid var(--gcx-line); border-radius: 14px; padding: 20px 24px; margin: 30px 0 0; }
.tdp-bridge p { font-family: var(--gcx-sans); font-size: 14.5px; line-height: 1.6; color: var(--gcx-ink-2); margin: 0; }
.tdp-bridge b { color: var(--gcx-forest); font-weight: 700; }
.tdp-bridge a { color: var(--gcx-sienna); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tdp-bridge a:hover, .tdp-bridge a:focus, .tdp-bridge a:visited, .tdp-bridge a:active { color: var(--gcx-sienna); }
.tdp-bridge a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ================= Non-happy states ================= */
.tdp-state { border: 1px solid var(--gcx-line); border-left: 4px solid var(--gcx-sienna); border-radius: 0 16px 16px 0; background: var(--ctd-paper); padding: 34px 34px; margin: 20px 0; }
.tdp-state h1 { font-family: var(--gcx-serif); color: var(--gcx-forest); font-size: clamp(22px, 3.4vw, 28px); font-weight: 600; margin: 0 0 10px; }
.tdp-state p { font-size: 15px; line-height: 1.6; color: var(--gcx-ink-2); margin: 0 0 20px; max-width: 56ch; }
.tdp-state-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ================= Skeleton (pre-JS) ================= */
.tdp-skel { padding: 8px 0; }
.tdp-skel-line, .tdp-skel-grid span { border-radius: 8px; background: linear-gradient(90deg, #f1ead9 25%, #f9f4e7 45%, #f1ead9 65%); background-size: 220% 100%; animation: tdpShimmer 1.3s linear infinite; }
.tdp-skel-line { height: 16px; margin-bottom: 12px; }
.tdp-skel-line.s1 { width: 40%; height: 12px; }
.tdp-skel-line.s2 { width: 82%; height: 30px; margin-top: 6px; }
.tdp-skel-line.s3 { width: 55%; }
.tdp-skel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tdp-skel-grid span { height: 58px; }
@keyframes tdpShimmer { to { background-position: -220% 0; } }
.tdp-noscript h1 { font-family: var(--gcx-serif); color: var(--gcx-forest); font-size: 26px; font-weight: 600; margin: 0 0 10px; }
.tdp-noscript p { font-size: 15px; line-height: 1.6; color: var(--gcx-ink-2); max-width: 56ch; }
.tdp-noscript a { color: var(--gcx-sienna); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    .tdp-skel-line, .tdp-skel-grid span { animation: none; }
    .tdp-copy, .tdp-btn, .tdp-simrow { transition: none; }
}

@media (max-width: 560px) {
    .tdp-wrap { padding: 20px 22px 38px; }
    .tdp-actionrow .tdp-btn { width: 100%; }
    .tdp-skel-grid { grid-template-columns: 1fr; }
    .tdp-status { padding: 13px 16px; }
    .tdp-buyer-cols { grid-template-columns: 1fr; gap: 16px; }
    .tdp-buyer-tiles { gap: 9px; }
    .tdp-btile { padding: 13px 13px 12px; }
}
/* very narrow: stat tiles stack so numbers never crowd */
@media (max-width: 380px) {
    .tdp-wrap { padding: 18px 22px 36px; }
    .tdp-buyer-tiles { grid-template-columns: 1fr; }
    .tdp-btile { display: flex; align-items: baseline; gap: 12px; }
    .tdp-btile-num { margin: 0; }
}
