/* IBM Plex, self-hosted.
   Previously an @import of fonts.googleapis.com, which could not begin until this
   file had been fetched and parsed, and then had to reach a second origin
   (fonts.gstatic.com) for the files themselves. Serving them from our own origin
   removes two DNS+TCP+TLS handshakes from the critical render path.
   Weights 400-700 only: the 800/900 declarations elsewhere in the CSS have no real
   cut in IBM Plex and are synthesised by the browser, exactly as they were before. */
/* IBM Plex Sans 400 — latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-400-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;
}
/* IBM Plex Sans 400 — latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Sans 500 — latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-500-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;
}
/* IBM Plex Sans 500 — latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Sans 600 — latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-600-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;
}
/* IBM Plex Sans 600 — latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-600-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Sans 700 — latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-700-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;
}
/* IBM Plex Sans 700 — latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-700-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Serif 400 — latin */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-400-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;
}
/* IBM Plex Serif 400 — latin-ext */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Serif 500 — latin */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-500-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;
}
/* IBM Plex Serif 500 — latin-ext */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Serif 600 — latin */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-600-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;
}
/* IBM Plex Serif 600 — latin-ext */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-600-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Serif 700 — latin */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-700-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;
}
/* IBM Plex Serif 700 — latin-ext */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-serif-700-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f2f6fb;
  --surface: #ffffff;
  --panel: #f7f9fc;
  --highlight-sand: #dce8f7;
  --text: #1a1f2b;
  --muted: #5f6b7a;
  --muted-soft: rgba(95, 107, 122, 0.62);
  --brand: #0f62fe; /* Menacon logo blue */
  --brand-accent: #182237; /* Primary site accent */
  --brand-soft: rgba(15, 98, 254, 0.1);
  --procureplus-lavender: #6e3ce8; /* ProcurePlus lavender */
  --procureplus-lavender-soft: rgba(110, 60, 232, 0.08);
  --border: #e2e8f0;
  --accent: #182237; /* Primary ink for actions and active controls */
  --accent-hover: #24304a;
  --accent-soft: rgba(24, 34, 55, 0.08);
  --accent-border: rgba(24, 34, 55, 0.14);
  --accent-border-strong: rgba(24, 34, 55, 0.28);
  --focus-ring: rgba(15, 98, 254, 0.28);
  --success: #0f5132;
  --success-border: rgba(25, 134, 69, 0.32);
  --success-soft: rgba(25, 134, 69, 0.1);
  --warning: #184897;
  --warning-border: rgba(24, 72, 151, 0.28);
  --warning-soft: rgba(24, 72, 151, 0.1);
  --danger: #8f1d2c;
  --danger-border: rgba(176, 42, 55, 0.34);
  --danger-soft: rgba(176, 42, 55, 0.1);
  --info: #0f4fbf;
  --info-border: rgba(15, 98, 254, 0.32);
  --info-soft: rgba(15, 98, 254, 0.09);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 18px 46px rgba(15, 23, 42, 0.08);
  --transition: 0.2s ease;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --content-max: 1800px;
  --copy-max: 860px;
  --gutter: clamp(16px, 2.5vw, 32px);

  /* Typography scale (7 sizes total) */
  --type-caption: 0.75rem;    /* 12px */
  --type-small: 0.875rem;     /* 14px */
  --type-body: 1rem;          /* 16px */
  --type-subtitle: 1.125rem;  /* 18px */
  --type-title: 1.25rem;      /* 20px */
  --type-heading: 1.5rem;     /* 24px */
  --type-display: clamp(2rem, 4.2vw, 2.75rem);

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;
}

* { box-sizing: border-box; }

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--type-body);
  background: linear-gradient(180deg, var(--bg-soft) 0px, var(--surface) 340px), var(--bg);
  color: var(--text);
  line-height: var(--leading-normal);
}

.container {
  width: min(var(--content-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.site-main {
  width: 100%;
}

.site-main > * {
  width: min(var(--content-max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.site-main > .full-bleed {
  width: 100%;
  max-width: none;
}

.full-bleed img {
  display: block;
  width: 100%;
  height: auto;
}

.topbar {
  position: sticky; top: 0; backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 0;
}
.brand { color: var(--brand); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; font-size: var(--type-title);}
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 8px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.lang-switch .lang-option {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--type-caption);
  font-weight: 700;
  color: var(--muted);
}
.lang-switch .lang-option.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav-inline-logout {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.nav-inline-logout:hover {
  color: var(--text);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 5px;
}

.page-header { padding: 32px 0 10px; }

/* Typography */
h1 {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: var(--type-heading);
  line-height: var(--leading-snug);
  font-weight: 800;
  letter-spacing: -0.3px;
}

h2,
h3,
h4 {
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 600;
}

h2 {
  font-size: var(--type-heading);
  line-height: var(--leading-snug);
}

h3 {
  font-size: var(--type-title);
  line-height: var(--leading-snug);
}

h4 {
  font-size: var(--type-subtitle);
  line-height: var(--leading-normal);
}

h2.card-title {
  color: var(--accent);
}

.page-header h1 {
  margin: 0 0 12px;
  font-size: var(--type-display);
  line-height: var(--leading-tight);
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.3px;
}

.page-header h2 {
  color: var(--accent);
}

.page-header > h1,
.page-header > h2,
.page-header > p:not(.eyebrow) {
  max-width: 100%;
}

p {
  margin: 0 0 0.85rem;
  font-size: var(--type-body);
  line-height: var(--leading-relaxed);
}

.eyebrow { text-transform: uppercase; letter-spacing: 1.2px; font-size: var(--type-caption); color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: var(--type-small); }

.actions { display: flex; gap: 10px; margin: 16px 0; }
.btn,
.btn.secondary {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: 600;
  line-height: var(--leading-tight);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.btn.secondary {
  border-color: var(--accent-border);
  background: var(--surface);
  color: var(--accent);
  box-shadow: none;
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  filter: none;
}
.btn.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border-strong);
  color: var(--accent);
}
.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.btn:active {
  transform: translateY(1px);
}
.btn[aria-disabled="true"],
.btn:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}
.btn.small {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: var(--type-small);
}

.controls {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: var(--type-small);
  font-weight: 600;
  line-height: var(--leading-tight);
  transition: var(--transition);
}
.chip:hover {
  border-color: var(--accent-border-strong);
  color: var(--text);
}
.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.alert,
.notice,
.success {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
}
.alert {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}
.notice {
  background: var(--warning-soft);
  border: 1px solid var(--warning-border);
  color: var(--warning);
}
.success {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin: 10px 0 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid; gap: 14px; grid-template-columns: 1fr; padding: 10px 0 30px;
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }

main section + section {
  margin-top: 0;
  padding-top: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px;
}
.card-input,
.card--input {
  background: var(--panel);
}

.card-display,
.card--display {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-title { margin: 0 0 6px; font-size: var(--type-subtitle); color: var(--brand); }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

.results {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
}

.results > * {
  margin: 0;
}

.results > p {
  max-width: var(--copy-max);
}

.divider, hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.footer { padding: 18px 0; border-top: 1px solid var(--border); color: var(--muted); }

html[dir="rtl"] .topbar-inner {
  direction: rtl;
}

html[dir="rtl"] .nav-links {
  direction: rtl;
}

html[dir="rtl"] .live-tender-strip {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .actions {
  justify-content: flex-start;
}

@media (max-width: 800px) {
  h1 {
    font-size: var(--type-heading);
  }

  .page-header h1 {
    font-size: clamp(1.7rem, 7.6vw, 2.1rem);
    line-height: 1.2;
  }

  .topbar-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav {
    display: none;
    position: static;
    width: 100%;
    margin-top: 10px;
    padding: 0;
  }

  .nav.open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .lang-switch {
    margin: 10px 12px 0 12px;
    justify-content: center;
  }

  .nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .nav a:hover {
    background: var(--panel);
  }
}

@media (min-width: 960px) {
  .page-header > h1,
  .page-header > h2,
  .page-header > p:not(.eyebrow) {
    max-width: 66%;
  }
}
