/* TendersNearMe — shared styles */
:root {
  --paper: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #14213d;
  --ink-2: #2b3a5c;
  --slate: #5b6578;
  --rule: #dde2ea;
  --marker: #ffd43b;
  --marker-ink: #14213d;
  --fit: #1d6b45;
  --fit-bg: #e4f3ea;
  --caution: #a14a12;
  --caution-bg: #fdf0e4;
  --danger: #b42318;
  --focus: #3b6cf6;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .06);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1424; --surface: #141d31; --surface-2: #1b2640; --ink: #e9eef7; --ink-2: #c5cfe2;
    --slate: #93a0b8; --rule: #26324d; --fit: #6fd39f; --fit-bg: #133325; --caution: #f2a66b;
    --caution-bg: #3a2414; --danger: #ff8a80; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1424; --surface: #141d31; --surface-2: #1b2640; --ink: #e9eef7; --ink-2: #c5cfe2;
  --slate: #93a0b8; --rule: #26324d; --fit: #6fd39f; --fit-bg: #133325; --caution: #f2a66b;
  --caution-bg: #3a2414; --danger: #ff8a80; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font); font-variation-settings: "wdth" 100;
}
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--slate); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
[hidden] { display: none !important; }

/* Display type: condensed Archivo is the voice of the brand */
.display, h1, h2 { font-variation-settings: "wdth" 72; font-weight: 800; letter-spacing: -.01em; line-height: 1.02; }
h1 { font-size: clamp(42px, 7vw, 84px); margin: 0 0 18px; }
h2 { font-size: clamp(30px, 4.4vw, 50px); margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 6px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 12px; }

/* The highlighter mark — used for closing dates everywhere */
.mark {
  background: linear-gradient(100deg, transparent 0 2%, var(--marker) 3% 96%, transparent 97%) no-repeat 0 60% / 100% 78%;
  color: var(--marker-ink); padding: 0 .28em; font-weight: 700; white-space: nowrap;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.mark.urgent { background-image: linear-gradient(100deg, transparent 0 2%, #ff9f43 3% 96%, transparent 97%); }
.mark.muted-mark { background-image: linear-gradient(100deg, transparent 0 2%, var(--surface-2) 3% 96%, transparent 97%); color: var(--slate); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-m);
  border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--paper); transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--ink-2); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.secondary:hover { border-color: var(--ink); background: transparent; }
.btn.marker { background: var(--marker); color: var(--marker-ink); }
.btn.marker:hover { background: #ffc800; }
.btn.ghost { background: transparent; color: var(--ink); min-height: 36px; padding: 6px 10px; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--rule); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.saved { background: var(--fit-bg); color: var(--fit); border-color: transparent; }

/* Forms */
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-m);
  border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink);
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field { margin-bottom: 16px; }
.hint { font-size: 13px; color: var(--slate); margin-top: 5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1 1 180px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  border: 1.5px solid var(--rule); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; margin: 0;
}
.check input { accent-color: var(--ink); margin: 0; }
.check:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }

/* Tags input */
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1.5px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); min-height: 46px; }
.tags input { border: 0; outline: 0; flex: 1 1 140px; min-width: 120px; background: transparent; padding: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 14px; font-weight: 600; }
.tag button { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 5px; border-radius: 50%; color: var(--slate); }

/* Site header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 21px; font-variation-settings: "wdth" 80; letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo [data-logo] { flex: none; display: inline-flex; }
.logo { flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: var(--radius-s); }
.nav a:not(.btn):hover { background: var(--surface-2); }
.theme-btn { border: 1.5px solid var(--rule); background: transparent; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .nav .hide-m { display: none; } }

/* Notice rows (used on the home page, search and matches) */
.notice-list { display: grid; gap: 12px; }
.notice {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l);
  padding: 18px 20px; display: grid; gap: 8px; position: relative;
}
.notice h3 a { text-decoration: none; }
.notice h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.notice .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--slate); }
.notice .meta strong { color: var(--ink); font-weight: 600; }
.notice .snippet { font-size: 14.5px; color: var(--ink-2); }
.notice .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.pill.fit { background: var(--fit-bg); color: var(--fit); }
.pill.caution { background: var(--caution-bg); color: var(--caution); }
.reasons, .flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.reasons li::before { content: "✓"; color: var(--fit); font-weight: 800; margin-right: 7px; }
.flags li { color: var(--caution); }
.flags li::before { content: "!"; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--caution-bg); font-weight: 800; font-size: 12px; margin-right: 7px; }
.score { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.score .bar { width: 90px; height: 7px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.score .bar i { display: block; height: 100%; background: var(--fit); border-radius: 9px; }

.empty { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--rule); border-radius: var(--radius-l); color: var(--slate); background: var(--surface); }
.empty h3 { color: var(--ink); }
.banner { padding: 12px 16px; border-radius: var(--radius-m); background: var(--caution-bg); color: var(--caution); font-size: 14px; font-weight: 600; }
.banner.info { background: var(--surface-2); color: var(--ink-2); }
.skeleton { height: 120px; border-radius: var(--radius-l); background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite linear; border: 1px solid var(--rule); }
@keyframes sk { to { background-position: -200% 0; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--radius-m); font-weight: 600; font-size: 15px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.error { background: var(--danger); color: #fff; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 36px 0 90px; margin-top: 60px; font-size: 14px; color: var(--slate); }
.site-foot .wrap { display: grid; gap: 18px; grid-template-columns: 2fr 1fr 1fr; }
.site-foot a { display: block; text-decoration: none; padding: 3px 0; }
.site-foot a:hover { color: var(--ink); }
@media (max-width: 700px) { .site-foot .wrap { grid-template-columns: 1fr 1fr; } .site-foot .wrap > :first-child { grid-column: 1 / -1; } }

/* Simple content pages */
.page { padding: 40px 0; max-width: 760px; }
.page h1 { font-size: clamp(38px, 6vw, 60px); }
.page h2 { font-size: 30px; margin-top: 30px; }
.page p, .page li { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  .site-head, .site-foot, .app-nav, .no-print, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .app-main { padding: 0 !important; }
}

.nav .btn { white-space: nowrap; }
.site-foot .wrap.four { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .site-foot .wrap.four { grid-template-columns: 1fr 1fr; } .site-foot .wrap.four > :first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- app (PWA) */
html { -webkit-tap-highlight-color: transparent; }
a, button, .btn, input[type="checkbox"], select { touch-action: manipulation; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.site-head { padding-top: env(safe-area-inset-top); }

/* Installed app: feels native rather than like a web page */
.is-app body { overscroll-behavior-y: none; }
.is-app .bottom-nav, .is-app .app-nav, .is-app .btn, .is-app .tabs, .is-app .logo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.is-app .bottom-nav a:active, .is-app .btn:active { transform: scale(.97); }
@media (display-mode: standalone) { .hide-in-app { display: none !important; } }

/* "Get the app" sheet */
.install-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); animation: tn-up .28s ease-out; }
.install-card { position: relative; max-width: 520px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 20px; box-shadow: 0 -4px 30px rgba(13, 20, 36, .22); padding: 16px 16px 14px; display: grid; grid-template-columns: 52px 1fr; gap: 4px 14px; align-items: start; }
.install-card img { border-radius: 13px; grid-row: span 1; }
.install-text { display: grid; gap: 3px; padding-right: 22px; }
.install-text strong { font-size: 17px; line-height: 1.25; }
.install-text span { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.install-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--slate); cursor: pointer; border-radius: 50%; }
.install-actions, .install-ios { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.install-ios { display: grid; justify-items: stretch; }
.install-ios .btn { justify-self: end; }
.install-steps { margin: 4px 0 0; padding-left: 22px; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 6px; }
.install-steps svg { color: var(--focus); }
@keyframes tn-up { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Offline notice */
.offline-bar { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 95; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow); max-width: calc(100% - 24px); text-align: center; }
