:root {
  --paper: #ffffff; --paper-deep: #f3f3f3; --card: #ffffff; --ink: #1c1b18; --ink-soft: #3d3a33; --muted: #6f685a;
  --line: #e3ddd0; --forest: #14352b; --forest-soft: #1d6f5a; --forest-tint: #e4efe9; --coral: #d4553c; --coral-tint: #fbe7e2;
  --gold: #89651d; --gold-tint: #fbf1d9; --danger: #b3261e;
  --display: var(--body);
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 6px; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); line-height: 1.5; font-size: 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 .9em; }
a { color: var(--forest-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.muted-strong { color: var(--ink-soft); font-weight: 500; }
.center { text-align: center; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 640px; }
.fineprint { font-size: 13px; color: var(--muted); }
.field-error { color: var(--danger); font-size: 14px; }

/* Header and footer */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.topbar nav a { color: var(--ink); }
.topbar nav a.button { color: #fff; }
.topbar nav a.nav-muted, .topbar nav .nav-muted { color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; padding: 28px 24px 40px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-links a { margin-left: 14px; color: var(--muted); }
.container { max-width: 1040px; margin: 0 auto; padding: 28px 20px 40px; }
.narrow-page { max-width: 520px; margin: 24px auto 0; }
.narrow-page h1 { margin-bottom: 18px; }

/* Buttons, forms */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--forest); color: #fff; border: 1px solid var(--forest); border-radius: 10px; padding: 10px 18px; font-size: 15px; font-weight: 600; font-family: var(--body); cursor: pointer; line-height: 1.2; transition: transform .08s ease, background .15s ease; }
.button:hover { text-decoration: none; background: #1b473a; }
.button:active { transform: translateY(1px); }
.button.large { padding: 14px 22px; font-size: 16px; }
.button.small { padding: 7px 12px; font-size: 14px; }
.button.secondary { background: transparent; color: var(--forest); border-color: var(--forest); }
.button.secondary:hover { background: var(--forest-tint); }
.button[disabled] { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--forest-soft); cursor: pointer; font: inherit; font-weight: 500; padding: 0; }
button.link:hover { text-decoration: underline; }
button.link.danger { color: var(--danger); }
.inline { display: inline; }
label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
label .muted { font-weight: 400; }
input:not([type=checkbox]):not([type=hidden]), textarea, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--forest-soft); outline-offset: 1px; border-color: var(--forest-soft); }
textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--forest); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.form-grid .row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.form-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.capture { display: flex; gap: 10px; max-width: 560px; margin: 18px 0 8px; }
.capture input { margin: 0; flex: 1; padding: 14px 16px; font-size: 16px; }
.capture button { white-space: nowrap; }
@media (max-width: 560px) { .capture { flex-direction: column; } .form-grid .row-2 { grid-template-columns: 1fr; } }

:focus-visible { outline: 2px solid var(--forest-soft); outline-offset: 2px; }
.button:focus-visible, .swipe-btn:focus-visible { outline-offset: 3px; }

/* Flash and notices */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; background: var(--forest-tint); color: var(--forest); font-weight: 500; }
.flash-error { background: var(--coral-tint); color: var(--danger); }
.flash ul { margin: 0; padding-left: 18px; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; }
.notice-warn { background: var(--gold-tint); border: 1px solid #efd9a4; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--paper-deep); color: var(--muted); border-radius: 999px; padding: 3px 9px; vertical-align: middle; }
.tag.ok { background: var(--forest-tint); color: var(--forest); }
.tag.warn { background: var(--gold-tint); color: #8a6512; }
.next-up { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.next-up .eyebrow { margin-bottom: 4px; }
.next-up-line { margin: 0; font-size: 15px; color: var(--ink-soft); }
.next-up-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 6px; font-size: 14px; }
.next-up-steps li { counter-increment: step; display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.next-up-steps li::before { content: counter(step); display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--paper-deep); color: var(--muted); font-size: 12px; font-weight: 700; flex: none; }
.next-up-steps li.done { color: var(--forest); }
.next-up-steps li.done::before { content: "\2713"; background: var(--forest-tint); color: var(--forest); }
.today-line { margin: -6px 0 18px; font-size: 14px; }
@media (max-width: 720px) { .next-up { grid-template-columns: 1fr; } }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card h2 { margin-bottom: 6px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.details-card summary { cursor: pointer; font-weight: 600; color: var(--forest); }
.details-card form { margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); }
.status-pill.on { background: var(--forest-tint); color: var(--forest); }
.status-pill.off { color: var(--muted); }
.notice.compact { padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.suggestions-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 0 0 8px; }
.mode-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--paper-deep); color: var(--muted); }
.mode-badge.mode-filtered { background: var(--forest-tint); color: var(--forest); }
.mode-badge.mode-match { background: var(--gold-tint); color: #8a6512; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 6px; border-top: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.market-heading { margin-top: 14px; }
.tender-list { list-style: none; margin: 8px 0 0; padding: 0; }
.tender-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.tender-list li:first-child { border-top: 0; }
.tender-title { font-weight: 600; font-size: 15px; }
.tender-title a { color: var(--ink); }
.tender-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tender-summary { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.tender-why { font-size: 12.5px; color: var(--forest-soft); margin-top: 5px; font-weight: 500; }
.score { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--forest); background: var(--forest-tint); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.suggestions { background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.suggestions p { margin: 0 0 6px; }
.chip { display: inline-block; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); margin: 0 6px 6px 0; border: 0; font-family: var(--body); }
button.chip { cursor: pointer; border: 1px solid var(--line); background: #fff; text-align: left; }
button.chip:hover { border-color: var(--forest-soft); color: var(--forest); }
button.chip.chip-added { background: var(--forest-tint); color: var(--forest); border-color: var(--forest-tint); }
.upsell-inline { margin-top: 18px; padding: 16px 18px; background: var(--gold-tint); border-radius: 12px; }
.upsell-inline p { margin-bottom: 10px; }
.how { padding-left: 20px; color: var(--ink-soft); }
.how li { margin-bottom: 8px; }
.envelope { width: 64px; height: 44px; margin: 4px auto 18px; border-radius: 8px; background: var(--forest); position: relative; overflow: hidden; }
.envelope::before { content: ""; position: absolute; left: 50%; top: -30px; width: 46px; height: 46px; background: var(--forest); border: 3px solid var(--paper); transform: translateX(-50%) rotate(45deg); border-radius: 6px; box-sizing: border-box; }

/* Swipe page */
.swipe-body { background: var(--paper); }
.swipe-main { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.swipe-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.swipe-head h1 { margin: 0; font-size: 30px; }
.swipe-score { display: flex; gap: 14px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.swipe-score strong { color: var(--ink); font-size: 15px; }
.deck { position: relative; height: 480px; touch-action: pan-y; }
.deck-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.card-tender { position: absolute; inset: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 22px; box-shadow: 0 2px 4px rgba(28,27,24,.05), 0 18px 44px rgba(28,27,24,.12); display: flex; flex-direction: column; gap: 6px; transition: transform .25s ease, opacity .25s ease; will-change: transform; overflow: hidden; user-select: none; }
.card-tender.is-top { cursor: grab; }
.card-tender.is-top:active { cursor: grabbing; }
.card-tender.fly-right { transform: translate(140%, -30px) rotate(18deg) !important; opacity: 0; }
.card-tender.fly-left { transform: translate(-140%, -30px) rotate(-18deg) !important; opacity: 0; }
.card-org { font-size: 13px; font-weight: 600; color: var(--forest-soft); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.card-title { font-size: 24px; margin: 4px 0 6px; line-height: 1.2; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.card-close { color: var(--coral); font-weight: 600; }
.card-summary { font-size: 15px; color: var(--ink-soft); margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; }
.card-cats { margin: auto 0 0; padding-top: 10px; }
.stamp { position: absolute; top: 22px; font-size: 22px; font-weight: 800; letter-spacing: .12em; padding: 4px 10px; border: 3px solid; border-radius: 8px; opacity: 0; pointer-events: none; font-family: var(--body); }
.stamp-like { left: 20px; color: var(--forest-soft); border-color: var(--forest-soft); transform: rotate(-14deg); }
.stamp-pass { right: 20px; color: var(--coral); border-color: var(--coral); transform: rotate(14deg); }
.card-capture { justify-content: center; text-align: center; background: linear-gradient(160deg, #fff 0%, #f6f2e8 100%); }
.card-capture h2 { font-size: 26px; }
.card-capture p { color: var(--ink-soft); }
.card-capture .capture { margin: 8px auto; flex-direction: column; width: 100%; }
.card-capture .keep-swiping { margin-top: 8px; color: var(--muted); }
.card-signed-in { font-size: 14px; }
.swipe-controls { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.swipe-btn { border-radius: 999px; border: 2px solid; padding: 12px 20px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; background: #fff; transition: transform .08s ease, background .15s ease; }
.swipe-btn:active { transform: scale(.96); }
.swipe-btn.pass { color: var(--coral); border-color: var(--coral); }
.swipe-btn.pass:hover { background: var(--coral-tint); }
.swipe-btn.like { color: var(--forest-soft); border-color: var(--forest-soft); }
.swipe-btn.like:hover { background: var(--forest-tint); }
.swipe-btn.info { color: var(--muted); border-color: var(--line); font-weight: 600; }
.swipe-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.swipe-cta { text-align: center; font-size: 15px; margin: 16px 0 0; color: var(--ink-soft); }
.swipe-cta .link { font-weight: 600; font-size: 15px; }
@media (max-width: 480px) {
  .swipe-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .swipe-head h1 { font-size: 26px; }
  .deck { height: min(500px, 66vh); min-height: 400px; }
  .card-tender { padding: 22px 20px 18px; }
  .card-title { font-size: 21px; }
  .swipe-btn { padding: 11px 14px; font-size: 14px; }
  .swipe-btn.info { display: none; }
  .swipe-hint { display: none; }
}

/* Shared navigation and form ergonomics */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; flex: 1; }
.topbar { padding: 18px max(24px, calc((100vw - 1160px) / 2)); }
.topbar nav a:not(.button), .topbar nav button { min-height: 44px; display: inline-flex; align-items: center; }
.topbar nav [aria-current="page"] { color: var(--forest-soft); text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; }
.skip-link { position: absolute; top: -80px; left: 16px; padding: 12px 18px; background: var(--forest); color: white; z-index: 10; }
.skip-link:focus { top: 12px; }
.container { max-width: 1160px; padding-top: 36px; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { min-width: 0; font-size: 16px; }
.capture input:not([type=checkbox]):not([type=hidden]) { margin-top: 0; }
.button, select, input:not([type="checkbox"]):not([type="hidden"]) { min-height: 44px; }
.card, .facts dd, .notice, .next-up-line, .tender-meta { overflow-wrap: anywhere; }
.card-head { margin-bottom: 16px; }
.section-help { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.narrow-page > .lede { margin-bottom: 28px; }
.narrow-page .card > .button, .narrow-page .card > form > .button { width: 100%; margin-top: 6px; }
.details-card summary { padding-block: 6px; }
.footer { padding-inline: max(24px, calc((100vw - 1120px) / 2)); }

/* Signup */
.signup-page { max-width: 560px; margin: 48px auto; }
.signup-page h1 { font-size: 28px; margin-bottom: 16px; }
.signup-page form { margin: 28px 0; }
.signup-page label { margin-bottom: 8px; }
.signup-page .capture { margin-top: 0; }
@media (max-width: 760px) {
  .topbar { gap: 8px; padding: 14px 20px; }
  .topbar nav { gap: 8px 16px; font-size: 13px; }
  .card { padding: 20px; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 10px; }
  .signup-page { margin: 24px auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
