/* The Waypoint look for every server-rendered page under /procurement/ except
   the Waypoint shell (which has its own sidebar). Loaded after the older page
   stylesheets: it retokens them to the Waypoint palette and type and styles
   the Waypoint bar (src/procurement/waypoint-bar.mjs). The ok, warn and bad
   state colours keep their values and meanings. */

:root {
  --ink: #14213D;
  --muted: #4B5565;
  --rule: #DCE2EE;
  --paper: #F4F6FA;
  --card: #ffffff;
  --accent: #1F3A6E;
  --accent-ink: #14213D;
  --wp-navy: #14213D;
  --wp-link: #1F3A6E;
  --wp-hover: #C2410C;
  --wp-column: 1000px;
  --wp-gutter: max(16px, calc(50% - var(--wp-column) / 2));
}

html { background: var(--paper); }

/* Pages built on procurement.css: the bar runs edge to edge, the content keeps a
   centred column as wide as the Waypoint shell's main area. The readiness page
   (body.rd) already uses the Waypoint stylesheet and keeps its own layout. */
body:not(.rd) {
  max-width: none;
  margin: 0;
  padding: 0 0 3rem;
  font-family: 'Public Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}
body:not(.rd) > :not(.wpb-chrome) { margin-inline: var(--wp-gutter); }
body:not(.rd) h1, body:not(.rd) h2 { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; }
body:not(.rd) .site-head h1 { font-size: 1.65rem; }

a { color: var(--wp-link); }
a:hover { color: var(--wp-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--wp-hover);
  outline-offset: 3px;
}

/* Cards: white, the Waypoint border, 12px corners. */
.opp, .criteria, .subject-membership, .doc-stage, .route-stage, .prep-unavailable,
.doc-unmatched, .doc-ambiguous, .doc-unpublished {
  background: var(--card);
  border-color: var(--rule);
  border-radius: 12px;
}
.action { border-radius: 8px; }

/* The Waypoint bar. */
.wpb-chrome { margin: 0 0 1rem; }
.wpb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  padding: 12px var(--wp-gutter) 10px;
  background: var(--wp-navy);
  color: #fff;
}
.wpb-brand {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  color: #fff;
  text-decoration: none;
}
.wpb-brand:hover { color: #fff; text-decoration: underline; }
.wpb-sub { margin: 0; font-size: 12px; line-height: 1.4; color: #B8C4DB; }
.wpb-steps { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 0 100%; margin-top: 6px; }
.wpb-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: #DCE3F0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.wpb-step:hover { background: #1E2F52; color: #fff; }
.wpb-step.on { background: #2A3E66; color: #fff; }
.wpb-n { font-size: 12px; font-weight: 700; color: #A9B8D4; }
.wpb-step.on .wpb-n { color: #FFB38A; }
.wpb a:focus-visible { outline-color: #FFB38A; }

.wpb-crumbs {
  padding: 8px var(--wp-gutter);
  background: #fff;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.wpb-crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; list-style: none; }
.wpb-crumbs li { min-width: 0; overflow-wrap: anywhere; }
.wpb-crumbs li + li::before { content: "›"; margin: 0 8px; color: #98A2B3; }
.wpb-crumbs span { color: var(--ink); }

/* The readiness page keeps its 1180px column; the bar lines up with it. */
body.rd { --wp-column: 1148px; --wp-gutter: max(16px, calc(50% - var(--wp-column) / 2)); }

@media (max-width: 650px) {
  .wpb { padding-block: 10px 8px; }
  .wpb-brand { font-size: 20px; }
  .wpb-steps { flex-wrap: nowrap; overflow-x: auto; gap: 5px; }
  .wpb-step { min-height: 38px; padding: 0 10px; font-size: 12px; }
  .wpb-n { display: none; }
}
