/* Tenders of Europe — generated project, hub and directory pages.
   Builds on styles.css tokens (--_page-*), .page-section, .page-shell, .button. */

.toe-hero {
  padding-top: clamp(118px, 10vw, 168px);
  padding-bottom: clamp(48px, 6vw, 88px);
}

.toe-hero .toe-hero__shell {
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  align-items: start;
}

/* Grid items must be allowed to shrink below their longest word. */
.toe-hero__shell > *,
.toe-body__shell > *,
.toe-grid > * {
  min-width: 0;
}

/* Inner sections are content blocks, not page bands (global `section` rule). */
.toe-main .toe-section {
  padding: 0;
  color: inherit;
  background: none;
  border-bottom: 0;
  overflow-x: visible;
}

.toe-hero .toe-hero__shell--text {
  grid-template-columns: minmax(0, 1fr);
}

.toe-hero__copy {
  max-width: 980px;
}

.toe-title {
  /* The global h1 rule uses width:max-content up to the viewport width. */
  width: auto;
  max-width: 100%;
  margin: 0;
  color: var(--_page-text);
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.toe-title .toe-icon {
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.22em;
  vertical-align: -0.04em;
}

.toe-lede {
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.3;
  text-wrap: pretty;
}

.toe-lede a,
.toe-main a,
.toe-source a {
  color: var(--_page-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.toe-hero__media {
  position: relative;
  margin: 0;
  border: 1px solid var(--_page-line);
  background: color-mix(in srgb, var(--_page-bg) 88%, var(--_page-text));
}

.toe-hero__media img {
  display: block;
  width: 100%;
  height: auto;
}

.toe-hero__media--photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.toe-hero__media figcaption {
  padding: 10px 14px;
  color: var(--_page-copy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--_page-line);
}

/* Key facts row */
.toe-keyfacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 6px 0 0;
  border: 1px solid var(--_page-line);
}

.toe-keyfacts__item {
  flex: 1 1 180px;
  padding: 14px 18px;
  border-right: 1px solid var(--_page-line);
}

.toe-keyfacts__item:last-child {
  border-right: 0;
}

.toe-keyfacts dt,
.toe-facts dt {
  color: var(--_page-copy);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.toe-keyfacts dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  color: var(--_page-text);
  font-size: 17px;
  font-weight: 750;
}

.toe-count {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  font-weight: 900;
}

.toe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Status pill: computed live by PHP */
.toe-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--_page-text);
  border: 1px solid currentColor;
  border-radius: 999px;
}

.toe-status::before {
  content: "";
  width: 3px;
  height: 11px;
  background: currentColor;
}

/* Status follows the active Pelenoir theme: open is plain text, closing
   soon takes the theme's signal colour, closed recedes to copy. */
.toe-status--open { color: var(--_page-text); }
.toe-status--closing { color: var(--_page-accent, var(--signal)); }
.toe-status--closed,
.toe-status--unknown { color: var(--_page-copy); }

/* Flags and discipline icons */
.toe-flag {
  flex: none;
  width: 21px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 1px solid color-mix(in srgb, var(--_page-text) 18%, transparent);
}

.toe-icon {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  background: var(--toe-color, currentColor);
  -webkit-mask: var(--toe-icon) center / contain no-repeat;
  mask: var(--toe-icon) center / contain no-repeat;
}

.toe-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  color: var(--_page-text);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid var(--_page-line);
  border-left: 3px solid var(--toe-color, var(--_page-accent));
  background: color-mix(in srgb, var(--_page-bg) 92%, var(--_page-text));
}

a.toe-chip:hover {
  border-color: var(--toe-color, var(--_page-accent));
}

.toe-chip small {
  color: var(--_page-copy);
  font-weight: 700;
}

.toe-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Project body */
.toe-body__shell {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
}

.toe-main {
  max-width: 76ch;
}

.toe-main.prose h2 {
  font-size: clamp(24px, 2.6vw, 36px);
}

.toe-main.prose h3 {
  font-size: clamp(15px, 1.4vw, 18px);
  letter-spacing: 0.08em;
}

.toe-section + .toe-section {
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--_page-line);
}

.toe-section > * + * {
  margin-top: 0.9em;
}

.toe-disciplines {
  display: grid;
  gap: 14px;
  padding: 0 !important;
  list-style: none;
}

.toe-discipline {
  padding: 14px 16px;
  border: 1px solid var(--_page-line);
}

.toe-discipline__head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--_page-text);
  font-weight: 800;
}

.toe-discipline__head a {
  color: var(--_page-text) !important;
}

.toe-discipline__weight {
  margin-left: auto;
  color: var(--_page-copy);
  font-size: 13px;
}

.toe-discipline__bar {
  display: block;
  height: 3px;
  margin: 10px 0;
  background: linear-gradient(90deg, var(--toe-color) var(--toe-weight), color-mix(in srgb, var(--_page-text) 12%, transparent) var(--toe-weight));
}

.toe-discipline p {
  margin: 0;
  font-size: 0.92em;
  line-height: 1.55;
}

.toe-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.toe-gallery figure {
  margin: 0;
  border: 1px solid var(--_page-line);
}

.toe-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.toe-disclaimer {
  color: var(--_page-copy);
  font-size: 0.86em;
}

/* Facts aside */
.toe-aside {
  position: sticky;
  /* Below the fixed 80px site header with breathing room. */
  top: 112px;
  display: grid;
  gap: 18px;
}

.toe-facts {
  margin: 0;
  border: 1px solid var(--_page-line);
}

.toe-facts > div {
  padding: 12px 16px;
  border-bottom: 1px solid var(--_page-line);
}

.toe-facts > div:last-child {
  border-bottom: 0;
}

.toe-facts dd {
  margin: 5px 0 0;
  color: var(--_page-text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.toe-facts dd small {
  display: block;
  margin-top: 3px;
  color: var(--_page-copy);
  font-size: 12px;
  font-weight: 600;
}

.toe-cpv {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.toe-cpv code {
  font-weight: 800;
}

.toe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.toe-explore {
  display: grid;
  border: 1px solid var(--_page-line);
}

.toe-explore__title {
  margin: 0;
  padding: 12px 16px;
  color: var(--_page-text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--_page-line);
}

.toe-explore a {
  display: grid;
  gap: 2px;
  padding: 11px 16px;
  color: var(--_page-text);
  font-weight: 750;
  text-decoration: none;
  border-bottom: 1px solid var(--_page-line);
}

.toe-explore a:last-child {
  border-bottom: 0;
}

.toe-explore a:hover {
  color: var(--_page-accent);
}

.toe-explore a span {
  color: var(--_page-copy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Listings and cards */
.toe-section-title {
  margin: 0;
  color: var(--_page-text);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.toe-listing__head {
  gap: 8px;
}

.toe-listing__note {
  margin: 0;
  color: var(--_page-copy);
  font-size: 14px;
}

.toe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.toe-card {
  display: grid;
  grid-template-rows: auto 1fr;
  color: var(--_page-text);
  border: 1px solid var(--_page-line);
  background: var(--_page-bg);
  transition: border-color 160ms ease, transform 160ms ease;
}

.toe-card:hover {
  border-color: var(--_page-accent);
  transform: translateY(-2px);
}

.toe-card--closed {
  opacity: 0.72;
}

.toe-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--_page-line);
  background: color-mix(in srgb, var(--_page-bg) 86%, var(--_page-text));
}

.toe-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.toe-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
}

.toe-card__placeholder .toe-flag {
  width: 54px;
  height: 36px;
  margin: 0;
  opacity: 0.7;
}

.toe-card__body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 18px 18px;
}

.toe-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  color: var(--_page-copy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toe-card__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 850;
}

.toe-card__title a {
  color: inherit;
  text-decoration: none;
}

.toe-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.toe-card {
  position: relative;
}

.toe-card__lede {
  margin: 0;
  color: var(--_page-copy);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toe-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.toe-card__foot .toe-chip {
  padding: 3px 8px;
  font-size: 11px;
}

.toe-card__foot .toe-icon {
  width: 13px;
  height: 13px;
}

.toe-compact {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--_page-line);
}

.toe-compact li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--_page-line);
}

.toe-compact a {
  color: var(--_page-text);
  font-weight: 750;
  text-decoration: none;
}

.toe-compact a:hover {
  color: var(--_page-accent);
}

.toe-compact span {
  color: var(--_page-copy);
  font-size: 13px;
}

.toe-empty {
  color: var(--_page-copy);
}

.toe-siblings .page-shell {
  gap: 18px;
}

@media (max-width: 900px) {
  .toe-hero .toe-hero__shell,
  .toe-body .toe-body__shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .toe-actions .button {
    flex: 1 1 100%;
    text-align: center;
  }

  .toe-hero__media {
    max-width: 520px;
  }

  .toe-aside {
    position: static;
  }

  .toe-keyfacts__item {
    border-right: 0;
    border-bottom: 1px solid var(--_page-line);
  }

  .toe-keyfacts__item:last-child {
    border-bottom: 0;
  }
}

.toe-listing__more {
  margin: clamp(28px, 3vw, 40px) 0 12px;
  color: var(--_page-text);
  font-size: 18px;
  font-weight: 900;
}

/* Hero mosaic: photographs from the documents mixed with the editorial poster */
.toe-mosaic {
  display: grid;
  gap: 8px;
  padding: 8px;
  grid-template-columns: 1fr 1fr;
}

.toe-mosaic__item {
  position: relative;
  display: block;
  overflow: hidden;
  background: color-mix(in srgb, var(--_page-bg) 80%, var(--_page-text));
}

.toe-mosaic__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.toe-mosaic__item:hover img {
  transform: scale(1.03);
}

/* The poster is designed artwork with text: never crop it. */
.toe-mosaic__item--poster {
  aspect-ratio: 4 / 5;
}

.toe-mosaic__item--poster img {
  object-fit: contain;
}

.toe-mosaic--1 {
  grid-template-columns: 1fr;
}

.toe-mosaic--1 .toe-mosaic__item--photo {
  aspect-ratio: 4 / 3;
}

.toe-mosaic--2 {
  grid-template-columns: 1.25fr 1fr;
}

.toe-mosaic--3 .toe-mosaic__item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.toe-mosaic--3 .toe-mosaic__item:not(:first-child) {
  aspect-ratio: 4 / 5;
}

.toe-mosaic figcaption {
  grid-column: 1 / -1;
  padding: 4px 6px 0;
  border-top: 0;
}

.toe-mosaic figcaption:empty {
  display: none;
}

/* Gallery of every document image (thumbnails open the large version) */
.toe-gallery {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.toe-gallery a {
  display: block;
  height: 100%;
}

.toe-gallery__poster img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: color-mix(in srgb, var(--_page-bg) 80%, var(--_page-text));
}

/* Directory: image wall of projects with document photographs */
.toe-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  grid-auto-flow: dense;
  gap: 8px;
}

.toe-wall__item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  color: #fff;
  text-decoration: none;
  background: color-mix(in srgb, var(--_page-bg) 80%, var(--_page-text));
}

.toe-wall__item:nth-child(5n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}

.toe-wall__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.toe-wall__item:hover img {
  transform: scale(1.04);
}

.toe-wall__item span {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 12px 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

@media (max-width: 600px) {
  .toe-wall__item:nth-child(5n + 1) {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Typographic panel: replaces a missing image with the project's editorial line */
.toe-type {
  --toe-color: var(--_page-accent);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  height: 100%;
  min-height: 100%;
  padding: 18px 20px 16px;
  color: var(--_page-text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--toe-color) 22%, transparent), transparent 62%),
    color-mix(in srgb, var(--_page-bg) 90%, var(--_page-text));
  border-top: 4px solid var(--toe-color);
}

.toe-type__head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--toe-color);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.toe-type__head .toe-icon {
  width: 16px;
  height: 16px;
}

.toe-type__text {
  font-weight: 850;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.toe-type--xl .toe-type__text { font-size: 23px; line-height: 1.12; }
.toe-type--l .toe-type__text { font-size: 19px; line-height: 1.16; }
.toe-type--m .toe-type__text { font-size: 16px; line-height: 1.22; }

.toe-type__foot {
  color: var(--_page-copy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.toe-card--type .toe-card__media {
  aspect-ratio: auto;
  min-height: 190px;
}

/* Hero version: larger type, sized like an image */
.toe-hero__type {
  border: 0;
  background: none;
}

.toe-hero__type .toe-type {
  aspect-ratio: 4 / 5;
  padding: clamp(22px, 2.4vw, 34px);
}

.toe-hero__type .toe-type__text {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.12;
}

.toe-hero__type .toe-type__head {
  font-size: 12px;
}

.toe-hero__type .toe-type {
  aspect-ratio: auto;
  min-height: clamp(320px, 34vw, 520px);
}

.toe-hero__type .toe-type--m .toe-type__text {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.2;
}

/* Same top offset as every other hero on the site (.page-hero: clamp(72px, 9vw, 132px)).
   Needs this specificity to beat the generic non-home .site > .page-section rule. */
html[data-template]:not([data-template="home"]) .site .page-section.toe-hero {
  padding-top: clamp(72px, 9vw, 132px);
}

/* The whole card is one link: the stretched title link is a ::after overlay,
   which the global "*::after { cursor: default !important }" would override. */
.toe-card,
.toe-card__title a::after,
.toe-wall__item,
.toe-mosaic__item {
  cursor: pointer !important;
}

/* Posters are designed artwork: show the whole poster centred on black,
   never cropped, so no coloured edges or cut borders appear in the card. */
.toe-card__media--poster {
  background: #050505;
}

.toe-card__media--poster img {
  padding: 10px 0;
  object-fit: contain;
  object-position: center;
  background: #050505;
}

.toe-card__media.toe-card__media--poster {
  aspect-ratio: 4 / 3;
}

/* Lightbox (assets/toe.js) */
html.toe-lightbox-open {
  overflow: hidden;
}

.toe-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  padding: 56px 12px 24px;
  background: rgba(5, 5, 5, 0.94);
}

.toe-lightbox[hidden] {
  display: none;
}

.toe-lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  max-height: 100%;
}

.toe-lightbox__figure img {
  max-width: 100%;
  max-height: calc(100svh - 140px);
  object-fit: contain;
}

.toe-lightbox__figure figcaption {
  max-width: 900px;
  color: #d9d6cf;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.toe-lightbox__close,
.toe-lightbox__nav {
  color: #f3f0e9;
  font: inherit;
  font-weight: 900;
  background: none;
  border: 1px solid rgba(243, 240, 233, 0.35);
}

.toe-lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.toe-lightbox__nav {
  justify-self: center;
  width: 48px;
  height: 48px;
  font-size: 22px;
}

.toe-lightbox__close:hover,
.toe-lightbox__nav:hover {
  border-color: #f3f0e9;
}

.toe-lightbox__nav[hidden] {
  visibility: hidden;
  display: block;
}

@media (max-width: 600px) {
  .toe-lightbox {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding-inline: 4px;
  }

  .toe-lightbox__nav {
    width: 36px;
    height: 36px;
  }
}

/* Square controls: no decorative circles. */
.toe-lightbox__nav,
.toe-lightbox__close {
  border-radius: 0;
}

/* ---------------------------------------------------------------- Browse */
.toe-browse .page-shell {
  gap: clamp(22px, 2.6vw, 34px);
}

.toe-browse__head {
  gap: 10px;
}

.toe-browse__title {
  margin: 0;
  color: var(--_page-text);
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Segmented control */
.toe-browse__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--_page-line);
  background: color-mix(in srgb, var(--_page-bg) 88%, var(--_page-text));
}

.toe-browse__tabs[hidden] {
  display: none;
}

.toe-browse__tabs button {
  padding: 10px 18px;
  color: var(--_page-copy);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.01em;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: background 180ms ease, color 180ms ease;
}

.toe-browse__tabs button:hover {
  color: var(--_page-text);
}

.toe-browse__tabs button[aria-selected="true"] {
  color: var(--_page-bg);
  background: var(--_page-text);
}

.toe-browse__panel + .toe-browse__panel {
  margin-top: clamp(28px, 3vw, 40px);
}

.toe-browse__panel-title {
  margin: 0 0 14px;
  color: var(--_page-text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* With JS the tabs replace the panel titles and show one panel at a time. */
.toe-browse.is-tabbed .toe-browse__panel-title {
  display: none;
}

.toe-browse.is-tabbed .toe-browse__panel {
  margin-top: 0;
}

.toe-browse.is-tabbed .toe-browse__panel:not(.is-active) {
  display: none;
}

.toe-browse.is-tabbed .toe-browse__panel.is-active {
  animation: toe-fade-in 260ms ease;
}

@keyframes toe-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Tiles */
.toe-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
  gap: 14px;
}

.toe-tile {
  --toe-color: var(--_page-accent);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 6px;
  min-height: 178px;
  padding: 20px 20px 18px;
  color: var(--_page-text);
  text-decoration: none;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--toe-color) 16%, transparent), transparent 58%),
    color-mix(in srgb, var(--_page-bg) 94%, var(--_page-text));
  border: 1px solid var(--_page-line);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.toe-tile:hover,
.toe-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--toe-color);
  box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--toe-color) 70%, transparent);
}

.toe-tile__mark {
  display: flex;
  align-items: center;
  height: 34px;
}

.toe-tile__mark .toe-icon {
  width: 34px;
  height: 34px;
}

.toe-tile__mark .toe-flag {
  width: 42px;
  height: 28px;
  margin: 0;
}

.toe-tile__name {
  align-self: end;
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.toe-tile__count {
  color: var(--_page-copy);
  font-size: 14px;
  font-weight: 700;
}

.toe-tile__count strong {
  color: var(--_page-text);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-right: 4px;
}

.toe-tile__meta {
  color: var(--_page-copy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.toe-tile__go {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--_page-copy);
  font-size: 18px;
  font-weight: 900;
  transition: transform 220ms ease, color 220ms ease;
}

.toe-tile:hover .toe-tile__go {
  color: var(--toe-color);
  transform: translateX(4px);
}

/* Portals and tender types have no icon: give the name the room. */
.toe-tiles--types .toe-tile__mark,
.toe-tiles--sources .toe-tile__mark {
  display: none;
}

.toe-tiles--types .toe-tile__name,
.toe-tiles--sources .toe-tile__name {
  margin-top: 0;
  padding-right: 24px;
}

.toe-tile {
  cursor: pointer !important;
}

@media (max-width: 600px) {
  .toe-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .toe-tile {
    min-height: 150px;
    padding: 16px 14px 14px;
  }

  .toe-tile__name {
    font-size: 16px;
  }

  .toe-tile__count strong {
    font-size: 24px;
  }

  .toe-browse__tabs {
    display: flex;
    width: 100%;
  }

  .toe-browse__tabs button {
    flex: 1 1 auto;
    padding: 10px 8px;
    font-size: 13px;
  }
}

/* Directory: freshness line, newsletter, quiet tiles, method block */
.toe-updated {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 14px 0 0;
  color: var(--_page-copy);
  font-size: 13px;
  font-weight: 650;
}

.toe-updated__mark {
  width: 3px;
  height: 11px;
  background: var(--_page-accent, var(--signal));
}

.toe-updated a {
  color: var(--_page-text);
  text-underline-offset: 3px;
}

.toe-hero__newsletter {
  margin-top: clamp(28px, 4vw, 48px);
}

.toe-tile--quiet {
  background: transparent;
}

.toe-tile--quiet .toe-tile__name,
.toe-tile--quiet .toe-tile__mark {
  opacity: 0.55;
}

.toe-tile--quiet .toe-tile__count {
  font-size: 13px;
}

.toe-method .toe-method__shell {
  display: grid;
  gap: clamp(22px, 3vw, 36px);
}

.toe-method__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--_page-line);
  counter-reset: toe-step;
}

.toe-method__steps li {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: clamp(18px, 2.4vw, 28px);
  border-right: 1px solid var(--_page-line);
  counter-increment: toe-step;
}

.toe-method__steps li:last-child {
  border-right: 0;
}

.toe-method__steps li::before {
  content: "0" counter(toe-step);
  color: var(--_page-accent, var(--signal));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.toe-method__steps strong {
  color: var(--_page-text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.toe-method__steps span {
  color: var(--_page-copy);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .toe-method__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .toe-method__steps li {
    border-right: 0;
    border-bottom: 1px solid var(--_page-line);
  }

  .toe-method__steps li:last-child {
    border-bottom: 0;
  }
}

/* Typology tiles carry a photograph from one of their open tenders */
.toe-tile--photo {
  overflow: hidden;
  isolation: isolate;
}

.toe-tile__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.7);
  transition: opacity 260ms ease, transform 600ms var(--component-ease, ease);
}

.toe-tile--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--_page-bg) 35%, transparent), color-mix(in srgb, var(--_page-bg) 92%, transparent) 72%);
}

.toe-tile--photo:hover .toe-tile__photo,
.toe-tile--photo:focus-visible .toe-tile__photo {
  opacity: 0.72;
  transform: scale(1.04);
}

.toe-tile--photo .toe-tile__mark {
  height: 0;
}

/* Hub listing grouped by typology (or by country on a typology hub) */
.toe-groupnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--_page-line);
  border-left: 1px solid var(--_page-line);
}

.toe-groupnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--_page-text);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  border-right: 1px solid var(--_page-line);
  border-bottom: 1px solid var(--_page-line);
  transition: color 160ms ease, background 160ms ease;
}

.toe-groupnav a:hover,
.toe-groupnav a:focus-visible {
  color: var(--_page-accent);
  background: color-mix(in srgb, var(--_page-accent) 8%, transparent);
}

.toe-groupnav small {
  color: var(--_page-copy);
  font-size: 12px;
  font-weight: 800;
}

.toe-groupnav .toe-flag,
.toe-group__title .toe-flag {
  margin-right: 0;
}

.toe-group {
  display: grid;
  gap: 16px;
  padding-top: clamp(28px, 3.4vw, 44px);
  scroll-margin-top: calc(var(--section-anchor-offset, 22px) + 60px);
}

.toe-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding-top: 14px;
  border-top: 2px solid var(--_page-text);
}

.toe-group__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--_page-text);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.toe-group__count {
  color: var(--_page-copy);
  font-size: 13px;
  font-weight: 750;
}

.toe-group__all {
  margin-left: auto;
  color: var(--_page-accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.toe-group__all:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toe-compact--group {
  margin-top: 4px;
}

@media (max-width: 600px) {
  .toe-group__all {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* Questions and answers (pages/toe-index.php): the home page's uqa component,
   with every answer rendered on the server; links lead on into the site. */
.toe-faq .uqa-answer p.uqa-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 20px;
}

.toe-faq .uqa-links a {
  color: var(--accent-on-panel);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.9px;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-on-panel) 40%, transparent);
  padding-bottom: 2px;
}

.toe-faq .uqa-links a:hover,
.toe-faq .uqa-links a:focus-visible {
  border-bottom-color: var(--accent-on-panel);
}
