/* EU Public Tenders & Open-Data Explorer — Institutional European Data Design */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --eu-blue: #1e3a8a;
  --eu-blue-bright: #2563eb;
  --eu-gold: #eab308;
  --emerald: #047857;
  --radius: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6; overflow-x: hidden;
}
a { color: var(--eu-blue-bright); text-underline-offset: 3px; }
code, pre { font-family: var(--font-mono); font-size: 0.86em; }
code { background: var(--surface-alt); padding: 2px 6px; border-radius: 5px; }
pre {
  background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; font-size: 0.82rem; line-height: 1.5; margin: 10px 0 0;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 13px 0;
}
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fde047; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 0.98rem; color: var(--ink); }
.brand-sub { font-size: 0.76rem; color: var(--muted); }

.header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.nav-link { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.9rem; }
.nav-link:hover { color: var(--eu-blue-bright); }
.btn-nav {
  text-decoration: none; background: var(--eu-blue); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 0.86rem;
}

.hero {
  padding: 44px 0 34px;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  border-bottom: 1px solid var(--border);
}
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--eu-blue-bright); text-decoration: none; font-weight: 600; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: #eff6ff; color: var(--eu-blue); border: 1px solid #bfdbfe; margin-bottom: 12px;
}
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.18; margin: 0 0 12px; letter-spacing: -0.02em; }
.hero-lead { color: var(--ink-2); font-size: 1.02rem; max-width: 74ch; margin: 0 0 20px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 14px; margin-top: 18px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.kpi-val { display: block; font-size: 1.5rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-val.accent { color: var(--eu-blue-bright); }
.kpi-val.ok { color: var(--emerald); }
.kpi-label { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

.section { padding: 34px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: 1.38rem; margin: 0 0 10px; letter-spacing: -0.015em; }
.section-sub { color: var(--muted); margin: 0 0 18px; max-width: 74ch; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
}

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 170px; }
.field label { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.field input, .field select {
  padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.93rem; background: #fff;
}
.btn-primary {
  background: var(--eu-blue-bright); color: #fff; border: none; border-radius: 8px;
  padding: 10px 16px; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--eu-blue); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-alt); font-weight: 700; color: var(--ink-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; }
tr:last-child td { border-bottom: none; }

.cpv-pill {
  display: inline-block; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; background: #eff6ff; color: var(--eu-blue); border: 1px solid #bfdbfe;
}
.deadline-pill {
  display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; white-space: nowrap;
}

.rails-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 15px; margin-top: 16px; }
.rail-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
}
.rail-card h3 { margin: 8px 0 6px; font-size: 1rem; }
.rail-card p { margin: 0; font-size: 0.87rem; color: var(--ink-2); }
.rail-tag {
  display: inline-block; font-size: 0.73rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: #eff6ff; color: var(--eu-blue); border: 1px solid #bfdbfe;
}
.rail-tag.live { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.btn-rail {
  display: inline-block; text-align: center; text-decoration: none;
  background: var(--ink); color: #fff; padding: 9px 13px; border-radius: 8px; font-weight: 700; font-size: 0.85rem;
}
.btn-rail:hover { background: var(--eu-blue); }

.sector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.sector-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 15px;
  transition: border-color 0.15s ease;
}
.sector-card:hover { border-color: var(--eu-blue-bright); }
.sector-card strong { font-size: 0.98rem; color: var(--ink); }
.sector-card .meta { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.sector-card .stats { display: flex; justify-content: space-between; font-size: 0.82rem; margin-top: 10px; padding-top: 8px; border-top: 1px solid #f1f5f9; font-weight: 700; }

.dir-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.dir-pill {
  padding: 6px 12px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff;
  font-size: 0.81rem; font-weight: 600; cursor: pointer;
}
.dir-pill[aria-pressed="true"] { background: var(--eu-blue); color: #fff; border-color: var(--eu-blue); }

.faq-list details {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.faq-list summary { font-weight: 700; cursor: pointer; }
.faq-list p { margin: 10px 0 0; color: var(--ink-2); font-size: 0.92rem; }

.site-footer {
  background: #0f172a; color: #cbd5e1; padding: 30px 0; margin-top: 36px; font-size: 0.86rem;
}
.site-footer a { color: #93c5fd; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.disclosure { font-size: 0.78rem; color: #94a3b8; margin-top: 10px; }
