:root {
  --ink: #111111;
  --muted: #444444;
  --bg: #FFFFFF;
  --wash: #F3F1EC;
  --line: #C8C4BA;
  --line-strong: #111111;
  --accent: #9A3412; /* solid rust — one accent only */
  --accent-hover: #7C2D12;
  --ok: #166534;
  --bad: #991B1B;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
.skip {
  position: absolute; left: 8px; top: -40px; background: var(--ink); color: #fff;
  padding: 8px 12px; z-index: 10;
}
.skip:focus { top: 8px; }
.wrap { width: min(720px, calc(100% - 32px)); margin: 0 auto; }
.wrap-wide { width: min(880px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  border-bottom: 2px solid var(--line-strong);
  margin-bottom: 28px;
}
.wordmark {
  text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
}
.wordmark span {
  display: inline-block; width: 10px; height: 10px;
  background: var(--accent); margin-right: 8px; vertical-align: middle;
}
.nav a {
  margin-left: 16px; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .95rem;
}
.nav a:hover { text-decoration: underline; color: var(--ink); }
h1 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  line-height: 1.2; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 10px;
}
h2 { font-size: 1.15rem; margin: 0 0 10px; font-weight: 700; }
.lede { color: var(--muted); margin: 0 0 18px; max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--ink); background: var(--ink); color: #fff;
  font: 650 0.95rem var(--sans); text-decoration: none; cursor: pointer;
  border-radius: 2px;
}
.btn:hover { background: #000; color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--wash); color: var(--ink); }
.btn-block { width: 100%; }
.muted { color: var(--muted); }
.fine { font-size: .875rem; color: var(--muted); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.panel {
  background: var(--wash);
  border: 1px solid var(--line);
  padding: 16px;
  margin: 0 0 24px;
}
label { display: block; font-weight: 650; margin: 0 0 4px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; min-height: 44px; border: 1px solid var(--line-strong);
  border-radius: 2px; padding: 8px 10px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.field { margin-bottom: 14px; }
.err { border: 1px solid var(--bad); background: #FEF2F2; color: var(--bad); padding: 10px 12px; margin-bottom: 12px; }
.ok { border: 1px solid var(--ok); background: #F0FDF4; color: var(--ok); padding: 10px 12px; margin-bottom: 12px; }

/* Classifieds-style tender rows */
.tender-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.tender-table th {
  text-align: left; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); font-weight: 650;
  border-bottom: 2px solid var(--line-strong); padding: 6px 8px 8px 0;
}
.tender-table td {
  border-bottom: 1px solid var(--line); padding: 12px 8px 12px 0;
  vertical-align: top;
}
.tender-table tr:last-child td { border-bottom: 2px solid var(--line-strong); }
.tender-table a.rowlink {
  color: var(--ink); text-decoration: none; font-weight: 650;
}
.tender-table a.rowlink:hover { text-decoration: underline; color: var(--accent); }
.meta { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.score-cell {
  font-variant-numeric: tabular-nums; font-weight: 700;
  white-space: nowrap; padding-right: 12px !important;
}
.score-hi { color: var(--ok); }
.score-mid { color: var(--ink); }
.score-lo { color: var(--muted); }

/* Match list as plain rows (app) */
.tender-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line-strong); }
.tender-list li { border-bottom: 1px solid var(--line); }
.tender-list a {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 12px;
  padding: 14px 0; text-decoration: none; color: inherit;
}
.tender-list a:hover .t-title { text-decoration: underline; color: var(--accent); }
.t-title { font-weight: 650; color: var(--ink); margin: 0 0 4px; font-size: 1rem; }
.reasons { margin: 6px 0 0; padding: 0; list-style: none; }
.reasons li { font-size: .875rem; color: var(--muted); }
.reasons li::before { content: "– "; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 2px;
  padding: 6px 10px; font-weight: 600; cursor: pointer; font: inherit; font-size: .9rem;
}
.chip.on { background: var(--ink); color: #fff; }
.footer {
  margin: 40px 0 24px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}
.price-line { margin: 0 0 8px; }
.stack { display: grid; gap: 12px; }
@media (max-width: 600px) {
  .tender-table .col-when { display: none; }
  .tender-list a { grid-template-columns: 2.75rem 1fr; }
}

#sampleBox { min-height: 28rem; }
@media (max-width:600px){ #sampleBox { min-height: 22rem; } }

/* v3 clarity */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; align-items: end;
}
.filters .field { margin: 0; min-width: 7rem; flex: 1 1 7rem; }
.filters label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.filters input, .filters select { min-height: 40px; }
.primary-only .btn-ghost { display: none; }
.step-note { font-size: .9rem; color: var(--muted); margin: 0 0 16px; }
.tender-list a {
  grid-template-columns: 3.5rem 1fr;
}
.t-why { font-size: .875rem; color: var(--muted); margin: 4px 0 0; }
.t-meta-row { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.empty {
  border: 1px dashed var(--line-strong); padding: 20px; background: var(--wash); margin: 12px 0;
}
.admin-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 16px; }
.admin-stat { border: 1px solid var(--line); padding: 12px; background: var(--wash); }
.admin-stat strong { display: block; font-size: 1.4rem; }
.danger { color: var(--bad); }
.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: #FEF2F2; color: var(--bad); }
[aria-live] .err, [aria-live] .ok { margin-top: 10px; }
