/* STL Deals — mobile first, no framework. Light and dark follow the device. */
:root {
  --bg: #f7f6f2; --surface: #ffffff; --text: #1f2933; --muted: #5f6b76; --line: #e3e1da;
  --brand: #0f6e56; --brand-ink: #ffffff; --accent: #ffd166; --bad: #b42318; --bad-bg: #fdecea;
  --ok-bg: #e8f5ef; --ok: #0f6e56; --note-bg: #fff6dc;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161a; --surface: #1b2127; --text: #e8ecef; --muted: #9aa6b1; --line: #2c343c;
    --brand: #3ccf9f; --brand-ink: #062b20; --bad: #ff8a80; --bad-bg: #3a1c1a; --ok-bg: #133227; --ok: #6fe0b8; --note-bg: #3a3218;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: .2rem 0 .8rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .7rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: .5rem; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.logo { font-weight: 800; font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.logo.big { font-size: 2.2rem; }
.acct { display: flex; align-items: center; gap: .9rem; font-size: .95rem; }
.acct a { text-decoration: none; }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.sections { border-top: 1px solid var(--line); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-top: .5rem; padding-bottom: .5rem; scrollbar-width: none; }
.chips a { flex: none; padding: .3rem .8rem; border-radius: 999px; background: var(--bg); color: var(--text); text-decoration: none; font-size: .92rem; border: 1px solid var(--line); }
.chips a:hover { border-color: var(--brand); }

main { padding-top: 1.5rem; padding-bottom: 3rem; min-height: 60vh; }

/* buttons */
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--brand); border-radius: 10px;
  padding: .65rem 1.15rem; font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.small { padding: .35rem .8rem; font-size: .9rem; }
.btn.wide { width: 100%; margin-top: .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* home */
.hero { padding: 1.5rem 0 .5rem; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); max-width: 18ch; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tiles a { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.tiles a:hover { border-color: var(--brand); }
.tiles strong { font-size: 1.1rem; }
.tiles span { color: var(--muted); font-size: .93rem; }
.tiles em { margin-top: auto; padding-top: .4rem; font-style: normal; font-size: .85rem; color: var(--brand); font-weight: 600; }

/* cards and forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; }
.card.narrow { max-width: 460px; margin: 1rem auto; }
.empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--muted); }
.intro { max-width: 70ch; margin-bottom: 1.2rem; }
form label { display: block; margin: .85rem 0 .2rem; font-weight: 600; font-size: .95rem; }
form label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input:not([type]) {
  display: block; width: 100%; margin-top: .3rem; padding: .62rem .75rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
input:focus { border-color: var(--brand); }
input[aria-invalid=true] { border-color: var(--bad); }
.err { display: block; color: var(--bad); font-size: .88rem; margin-top: .2rem; }
.choice { border: 0; padding: 0; margin: .5rem 0 0; }
.choice legend { font-weight: 600; margin-bottom: .3rem; }
.choice label { display: inline-flex; gap: .4rem; align-items: center; font-weight: 500; margin: .2rem 1.2rem .2rem 0; }
.check { display: flex !important; gap: .55rem; align-items: flex-start; font-weight: 500 !important; }
.check input { margin-top: .3rem; }
.biz { margin-top: .5rem; padding-top: .2rem; border-top: 1px solid var(--line); }
.biz h2 { margin: 1rem 0 0; font-size: 1.05rem; }
.row { display: grid; grid-template-columns: 2fr 1fr; gap: .8rem; }
.row-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.row-form input { flex: 1 1 200px; margin: 0; }
.cf-turnstile { margin-top: 1rem; }
.flash { padding: .7rem .9rem; border-radius: 9px; background: var(--ok-bg); color: var(--ok); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.note { background: var(--note-bg); padding: .7rem .9rem; border-radius: 9px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* footer */
.foot p { margin: .2rem 0; }

/* coming soon */
.soon main.center { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }

/* deals */
.deals { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.deal a { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.deal a:hover { border-color: var(--brand); }
.deal.featured a { border-color: var(--accent); border-width: 2px; }
.deal strong { font-size: 1.05rem; line-height: 1.3; }
.deal .sum { color: var(--muted); font-size: .93rem; }
.deal .meta { margin-top: auto; padding-top: .3rem; display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .85rem; color: var(--muted); }
.fact { font-weight: 700; color: var(--brand); }
.fact.big { font-size: 1.3rem; margin: .2rem 0; }
.soon { color: var(--bad); font-weight: 600; }
.tag { align-self: flex-start; display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .15rem .5rem; border-radius: 6px; background: var(--ok-bg); color: var(--ok); text-decoration: none; }
.tag-garage-sales { background: #fdf0e1; color: #9a4d00; }
.tag-rebates, .tag-surveys { background: #e8eefc; color: #2f4fa8; }
.tag-giveaways, .tag-contests { background: #f6e8fb; color: #7a2e94; }
@media (prefers-color-scheme: dark) {
  .tag-garage-sales { background: #3a2a14; color: #ffc27a; }
  .tag-rebates, .tag-surveys { background: #1d2a4a; color: #9db8ff; }
  .tag-giveaways, .tag-contests { background: #34203d; color: #e4a8f7; }
}
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.pager { display: flex; gap: .6rem; justify-content: center; margin: 1rem 0; }
.search { max-width: 560px; }
.filter { max-width: 360px; }
.deal-page { max-width: 720px; }
.deal-page .body { margin: 1rem 0; max-width: 65ch; }
.deal-page .facts.card { margin: 1.2rem 0; }

/* forms (deal posting) */
.form-card { max-width: 640px; margin: 0 auto; }
textarea, select { display: block; width: 100%; margin-top: .3rem; padding: .62rem .75rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=search] {
  display: block; width: 100%; margin-top: .3rem; padding: .62rem .75rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
.row-form input[type=search] { margin: 0; flex: 1 1 200px; }
.with-pre { position: relative; }
.with-pre .pre { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); margin-top: .15rem; color: var(--muted); }
.with-pre input { padding-left: 1.6rem; }
.help { display: block; font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.form-card .check { margin-top: .9rem; }

/* my account */
.mine { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.mine .card { padding: 1rem; }
.mine-top { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-bottom: .3rem; }
.mine-actions { display: flex; gap: 1rem; margin-top: .5rem; font-size: .93rem; }
.status { font-size: .8rem; font-weight: 700; padding: .1rem .5rem; border-radius: 6px; background: var(--note-bg); }
.status.s-approved { background: var(--ok-bg); color: var(--ok); }
.status.s-rejected { background: var(--bad-bg); color: var(--bad); }
.status.s-expired { background: var(--line); color: var(--muted); }
.link.danger { color: var(--bad); }
.acct .btn.small { color: var(--brand-ink); }

/* Connecting St. Louis family: header line and network footer */
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.family { font-size: .78rem; color: var(--muted); text-decoration: none; }
.family:hover { color: var(--brand); text-decoration: underline; }
.foot { margin-top: 3rem; border-top: 0; padding: 2.5rem 0; background: #414141; color: #fff; font-size: .9rem; }
.foot a { color: #7cc4ff; }
.foot .muted { color: #c9c9c9; }
.foot-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr; gap: 2rem; align-items: start; }
.foot-head, .foot-name { font-weight: 700; font-size: 1rem; margin-bottom: .6rem; }
.foot-name { font-size: 1.35rem; font-weight: 400; }
.foot-logo { text-align: center; }
.foot-logo img { max-width: 130px; height: auto; }
.foot-menu { margin: .4rem 0 .8rem; color: #c9c9c9; }
.foot-menu a { color: #fff; text-decoration: none; }
.foot-menu a:hover { color: #7cc4ff; }
.foot-copy { color: #7cc4ff; }
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
}

/* plain text pages (about, privacy, terms) */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6rem; font-size: 1.15rem; }
