:root {
  color-scheme: light;
  --canvas: #F7F6F0;
  --surface: #FFFFFF;
  --text-primary: #1D2923;
  --text-secondary: #56645C;
  --accent: #245B43;
  --highlight: #E8F0E9;
  --deadline-bg: #FFF4D6;
  --deadline-text: #8A5A00;
  --hairline: #DDE3DD;
  --control-border: #7E8C82;
  --focus-ring: #245B43;
  --error: #8C3128;
  --content-width: 1180px;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--text-primary);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--control-border);
  border-radius: 3px;
  background: var(--surface);
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--surface);
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  transform: translateY(-160%);
  background: var(--surface);
  color: var(--text-primary);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-main,
.site-footer {
  width: min(var(--content-width), calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.94rem;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5rem;
}

.site-main {
  min-height: 70vh;
}

.home-intro {
  max-width: 850px;
  padding: clamp(3rem, 8vw, 6.5rem) 0 3rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
}

.intro-copy,
.page-heading > p:last-child {
  max-width: 64ch;
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.home-search {
  margin-top: 2rem;
}

.search-label,
.results-search > label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.search-line {
  display: flex;
  gap: 0.5rem;
}

.search-line input {
  min-width: 0;
  flex: 1;
  padding: 0.8rem 0.9rem;
}

.button {
  min-height: 46px;
  padding: 0.65rem 1rem;
  font-weight: 600;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}

.button-primary:hover {
  background: #1D4B37;
}

.button-secondary {
  border-color: var(--control-border);
  background: var(--surface);
  color: var(--text-primary);
}

.home-filters {
  display: flex;
  gap: 1rem;
  margin-top: 0.85rem;
}

.home-filters label,
.filters-panel label,
.sort-control {
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

select,
input[type="date"],
input[type="number"] {
  min-height: 42px;
  padding: 0.45rem 0.6rem;
}

.home-filters select {
  min-width: 210px;
}

.coverage-note,
.refresh-line,
.disclosure,
.filter-help {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.coverage-note {
  margin-top: 1rem;
}

.recent-section {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--hairline);
}

.section-heading {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.4rem;
}

.text-link {
  font-weight: 600;
}

.tender-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tender-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px 150px;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.tender-title {
  overflow-wrap: anywhere;
}

.tender-title a {
  color: var(--text-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.title-note {
  display: inline-block;
  margin-left: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
}

.tender-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.source-name {
  color: var(--text-secondary);
  font-weight: 600;
}

.meta-separator {
  color: var(--text-secondary);
}

.tender-value,
.tender-deadline {
  display: grid;
  justify-items: start;
  gap: 0.2rem;
  font-weight: 500;
}

.column-label {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tabular {
  font-variant-numeric: lining-nums tabular-nums;
}

.value-secondary {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 400;
}

.deadline-soon {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  background: var(--deadline-bg);
  color: var(--deadline-text);
  font-size: 0.75rem;
  font-weight: 600;
}

.refresh-line {
  margin: 0.85rem 0 0;
}

.sources-section {
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--hairline);
}

.sources-section h2 {
  max-width: 25ch;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--accent);
}

.source-list span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.disclosure {
  max-width: 75ch;
}

.site-footer {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.3rem 0 2rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.site-footer a {
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  text-decoration: none;
}

.page-heading {
  padding: 2.5rem 0 1.5rem;
}

.page-heading h1 {
  font-size: clamp(2.25rem, 4vw, 3.4rem);
}

.page-heading > p:last-child {
  font-size: 1rem;
}

.results-search {
  max-width: 850px;
  margin-bottom: 1.5rem;
}

.results-search > label {
  color: var(--text-primary);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.filters-mobile-heading {
  display: none;
}

.filters-panel {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--hairline);
  background: var(--surface);
}

.filters-panel h2 {
  margin-bottom: 1rem;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.filters-panel form {
  display: grid;
  gap: 0.9rem;
}

.filters-panel fieldset {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.filters-panel legend {
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.filters-panel fieldset label {
  margin-left: 0;
}

.filter-help {
  margin: 0;
  font-size: 0.78rem;
}

.text-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.results-toolbar {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 0.25rem;
}

.results-count {
  margin: 0;
  font-weight: 600;
}

.sort-control {
  grid-template-columns: auto minmax(155px, 1fr);
  align-items: center;
}

.sort-control select {
  min-width: 155px;
}

.pagination {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin: 1.5rem 0 2rem;
}

.pagination a {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--control-border);
  background: var(--surface);
  text-decoration: none;
}

.pagination a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--highlight);
  color: var(--text-primary);
  font-weight: 600;
}

.empty-state {
  padding: 2rem 0;
}

.empty-state h2 {
  font-size: 1.8rem;
}

.notice {
  color: var(--error);
}

.detail-page {
  max-width: 900px;
  padding-top: 1.5rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.55rem;
  margin: 0 0 2rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.detail-heading {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.detail-heading h1 {
  max-width: 28ch;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  overflow-wrap: anywhere;
}

.detail-section {
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--hairline);
}

.detail-section h2 {
  margin-bottom: 1rem;
  font-size: 1.55rem;
}

.summary-list,
.code-list,
.source-links {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.25rem;
}

.disclosure {
  margin-bottom: 0;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.facts-grid > div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline);
}

.facts-grid dt {
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 600;
}

.facts-grid dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

[hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .site-header,
  .site-main,
  .site-footer {
    width: min(100% - 2rem, var(--content-width));
  }

  .results-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .filters-mobile-heading {
    display: block;
  }

  .filters-panel {
    display: none;
    position: static;
  }

  .filters-panel.is-open {
    display: block;
  }

  .tender-row {
    grid-template-columns: minmax(0, 1fr) minmax(125px, auto);
    gap: 0.75rem 1rem;
  }

  .tender-main {
    grid-column: 1 / -1;
  }

  .tender-value,
  .tender-deadline {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: baseline;
    gap: 0.4rem;
  }

  .tender-value .value-secondary,
  .tender-deadline .deadline-soon {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 64px;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .site-nav a {
    font-size: 0.86rem;
  }

  .home-intro {
    padding-top: 3.25rem;
  }

  .search-line {
    display: grid;
  }

  .home-filters,
  .source-list,
  .facts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-filters {
    display: grid;
  }

  .home-filters select {
    width: 100%;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .results-toolbar {
    align-items: start;
  }

  .sort-control {
    grid-template-columns: 1fr;
    justify-items: end;
  }

  .sort-control select {
    max-width: 180px;
  }

  .site-footer {
    display: grid;
    gap: 0.35rem;
  }
}
