/* Site-specific styles. Candidates to move into wfrc-brand if other sites need them. */

/* Subtle hairline that follows light and dark mode (Bootstrap's border color is too bright in dark). */
body { --wfrc-line: color-mix(in srgb, var(--bs-body-color) 16%, var(--bs-body-bg)); }

/* Home "At a glance": the brand color blocks, with a large number. */
.glance .wfrc-block {
  padding: 1.2rem 1.5rem;
  justify-content: center;
}
.glance .glance-num {
  display: block;
  font-family: var(--bs-headings-font-family);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.05;
  color: #fff;
}
.glance .wfrc-block p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

/* Home "Featured tools": cards with a banner, like the Explore listing, so they read differently from the stat tiles. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--bs-tertiary-bg, var(--bs-body-bg));
  border: 1px solid var(--wfrc-line);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 57, 91, .18);
}
.feature-banner {
  height: 76px;
  background-size: cover;
  background-position: center;
}
.feature-card.banner-navy .feature-banner { background-image: url("../../_extensions/wfrc-brand/assets/cards/navy.svg"); }
.feature-card.banner-mid .feature-banner { background-image: url("../../_extensions/wfrc-brand/assets/cards/mid.svg"); }
.feature-card.banner-teal .feature-banner { background-image: url("../../_extensions/wfrc-brand/assets/cards/teal.svg"); }
.feature-card.banner-bright .feature-banner { background-image: url("../../_extensions/wfrc-brand/assets/cards/bright.svg"); }
.feature-card.banner-brick .feature-banner { background-image: url("../../_extensions/wfrc-brand/assets/cards/brick.svg"); }
.feature-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.25rem 1.25rem;
}
.feature-body p { margin: 0 0 1rem; font-size: 0.9rem; }
.feature-body p:has(> .wfrc-chip) { margin: 0; }
.feature-body h3 { margin: 0.5rem 0 0.4rem; font-size: 1.15rem; line-height: 1.25; }
/* Pandoc wraps everything after the ### heading in section.level3, so it must stretch too. */
.feature-body > section { display: flex; flex-direction: column; flex: 1; }
.feature-actions { margin-top: auto; }
.feature-actions p { margin: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  .feature-card { transition: none; }
  .feature-card:hover { transform: none; }
}

/* Outline buttons on the tinted card surface need the stronger link color to pass AA contrast. */
.feature-actions .btn-outline-primary {
  --bs-btn-color: var(--bs-link-color);
  --bs-btn-border-color: var(--bs-link-color);
  --bs-btn-hover-bg: var(--bs-link-color);
  --bs-btn-hover-border-color: var(--bs-link-color);
  --bs-btn-hover-color: var(--bs-body-bg);
}

/* Table listings (Code page, model component tables): a rounded card with a tinted header. */
.quarto-listing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--wfrc-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.92rem;
}
.quarto-listing-table thead th {
  background: var(--bs-tertiary-bg, var(--bs-body-bg));
  border-bottom: 2px solid #0093c5;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.quarto-listing-table tbody td {
  padding: 0.8rem 1rem;
  vertical-align: top;
  border-top: 1px solid var(--wfrc-line);
}
.quarto-listing-table tbody tr:first-child td { border-top: 0; }
.quarto-listing-table tbody tr:hover td { background: var(--bs-tertiary-bg, transparent); }
.quarto-listing-table td:first-child { min-width: 11rem; }
.quarto-listing-table .listing-title { font-weight: 600; }
.quarto-listing-table td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.quarto-listing-table .listing-categories { display: flex; flex-wrap: wrap; gap: 0.3rem; }

/* Status pills */
.wfrc-chip.chip-live {
  background: color-mix(in srgb, #00799f 16%, var(--bs-body-bg));
  border-color: #00799f;
}
.wfrc-chip.chip-internal {
  background: color-mix(in srgb, #febc46 30%, var(--bs-body-bg));
  border-color: #c28a00;
}
.wfrc-chip.chip-archived {
  font-style: italic;
  background: transparent;
  border-style: dashed;
}

/* 404 page: suggestion list, search and redirect strip */
.suggest { list-style: none; padding: 0; margin: 0 0 1rem; }
.suggest li {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .7rem .9rem; margin-bottom: .5rem;
  background: var(--bs-tertiary-bg, var(--bs-body-bg));
  border: 1px solid var(--wfrc-line);
  border-radius: 10px;
}
.suggest li.top { border-left: 4px solid #c85327; }
.suggest a { font-weight: 600; margin-right: auto; }
.suggest-p { font-size: .8rem; font-variant-numeric: tabular-nums; }
.suggest-note { font-size: .85rem; }
.notfound-search { max-width: 36rem; margin-bottom: 1rem; }
/* On phones the map labels would shrink below readable size; the list underneath carries the same information. */
@media (max-width: 575px) {
  .dest-title, .dest-p, .origin-label { display: none; }
}

/* 404: automatic redirect strip and simulation chart */
.redirect-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  padding: .8rem 1rem; margin-bottom: 1.5rem;
  background: color-mix(in srgb, #febc46 28%, var(--bs-body-bg));
  border: 1px solid #c28a00;
  border-left-width: 4px;
  border-radius: 10px;
}
.redirect-text { margin-right: auto; }
.redirect-count { font-variant-numeric: tabular-nums; font-weight: 700; }

/* 404 alternative "Off the map": generative topo map with the site's sections as transit stations. */
.lost { position: relative; background: var(--bs-body-bg); }
.lost-stage { position: relative; height: clamp(440px, 78vh, 780px); overflow: hidden; }
.lost-canvas { position: absolute; inset: 0; display: block; }
.lost-layer { position: absolute; inset: 0; pointer-events: none; }
.lost-layer > * { pointer-events: auto; }
.station {
  position: absolute; transform: translate(16px, -50%);
  font: 600 .85rem var(--bs-headings-font-family);
  color: var(--bs-body-color); text-decoration: none; white-space: nowrap;
  background: color-mix(in srgb, var(--bs-body-bg) 82%, transparent);
  border: 1px solid var(--wfrc-line); border-radius: 999px; padding: .15rem .65rem;
  backdrop-filter: blur(3px);
}
.station:hover, .station:focus-visible { background: var(--bs-body-bg); border-color: #0093c5; }
.station.dest { background: #febc46; border-color: #c28a00; color: #00253c; font-weight: 700; }
.pin-label {
  position: absolute; transform: translate(calc(-100% - 16px), -50%); pointer-events: none !important;
  font: 700 .8rem var(--bs-headings-font-family); color: #fff;
  background: #b4461f; border-radius: 999px; padding: .15rem .6rem; white-space: nowrap;
}
.lost-card {
  position: relative; z-index: 2;
  padding: 1.5rem 20px 1rem;
}
.lost-card h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: .25rem 0 .6rem; border: 0; }
.lost-card .accent { color: #b4461f; }
body.quarto-dark .lost-card .accent { color: #febc46; }
.lost-eyebrow { font: 700 .8rem var(--bs-headings-font-family); letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.lost-path { word-break: break-all; }
.lost-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .6rem; }
.lost-note { font-size: .85rem; margin: 0; }
@media (min-width: 992px) {
  .lost-card {
    position: absolute; z-index: 3;
    left: max(20px, calc((100vw - 1100px) / 2)); top: 50%; transform: translateY(-50%);
    width: min(28rem, 42vw);
    background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
    border: 1px solid var(--wfrc-line); border-radius: 14px;
    padding: 1.6rem 1.8rem; backdrop-filter: blur(8px);
    box-shadow: 0 10px 40px rgba(0, 57, 91, .18);
  }
  .lost-stage { height: clamp(560px, 82vh, 800px); }
}
