/* 618 Local — shared design system for /618/, /food/, /houses/ and sub-boards.
   One card pattern, one button style, day + After Dark themes.
   Theme is set on <html data-theme="day|dark"> by local.js (auto 8 PM–6 AM,
   manual toggle overrides for the session). */

:root {
  --bg: #faf7f0;
  --surface: #fffdf8;
  --surface-2: #f4edde;
  --ink: #1e2a33;
  --ink-2: #50606b;
  --line: #e0d7c3;
  --accent: #0f766e;
  --accent-strong: #0b5a54;
  --accent-ink: #ffffff;
  --amber: #b45309;
  --amber-bg: #fdf3e0;
  --danger: #b3261e;
  --ok: #177245;
  --shadow: 0 1px 2px rgba(30, 42, 51, .06), 0 4px 14px rgba(30, 42, 51, .07);
  --shadow-lift: 0 2px 4px rgba(30, 42, 51, .08), 0 10px 26px rgba(30, 42, 51, .12);
  --hero-night-display: none;
  --hero-day-display: block;
}
html[data-theme="dark"] {
  --bg: #0c141d;
  --surface: #14202d;
  --surface-2: #1a2939;
  --ink: #f2ecdd;
  --ink-2: #aebcc7;
  --line: #27394e;
  --accent: #f0a848;
  --accent-strong: #f7bc66;
  --accent-ink: #1c1305;
  --amber: #f0a848;
  --amber-bg: #2a2113;
  --danger: #ff9d94;
  --ok: #7ed492;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 10px 26px rgba(0, 0, 0, .5);
  --hero-night-display: block;
  --hero-day-display: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  transition: background .35s ease, color .35s ease;
}
h1, h2, h3, .cond {
  font-family: "Libre Franklin", "Public Sans", system-ui, sans-serif;
  line-height: 1.15;
  margin: 0 0 .45em;
}
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--accent-strong); }
html[data-theme="dark"] a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }

/* ---------- header / nav ---------- */
.l-head {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.l-head-in {
  display: flex; align-items: center; gap: 14px;
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand .b-name { font-family: "Libre Franklin", sans-serif; font-weight: 850; font-size: 1.3rem; letter-spacing: .01em; white-space: nowrap; }
.brand .b-name em { font-style: normal; color: var(--accent); }
.brand .b-by { font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
.l-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.l-nav a, .l-nav summary {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 9px 11px; border-radius: 9px; cursor: pointer; list-style: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.l-nav a:hover, .l-nav summary:hover { background: var(--surface-2); }
.l-nav a[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 9px 9px 0 0; }
html[data-theme="dark"] .l-nav a[aria-current="page"] { color: var(--accent); }
.l-nav details { position: relative; }
.l-nav summary::-webkit-details-marker { display: none; }
.l-nav .more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lift); padding: 6px; display: flex; flex-direction: column;
}
.l-nav .more-menu a { border-radius: 8px; }
.theme-btn {
  margin-left: 6px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); border-radius: 999px; padding: 8px 13px; font: inherit;
  font-size: .88rem; font-weight: 650; cursor: pointer; min-height: 44px;
}
.theme-btn:hover { border-color: var(--accent); }

/* ---------- status strip ---------- */
.status-strip {
  background: var(--amber-bg); color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.status-strip .wrap { display: flex; gap: 10px; align-items: baseline; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.status-strip strong { color: var(--amber); }
.status-strip .when { margin-left: auto; color: var(--ink-2); font-size: .85rem; }

/* ---------- hero + featured spot ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero-art { position: relative; max-height: 430px; overflow: hidden; }
.hero-art img { width: 100%; height: 430px; object-fit: cover; display: block; }
.hero-art .art-night { display: var(--hero-night-display); }
.hero-art .art-day { display: var(--hero-day-display); }
.hero-shade {
  position: absolute; inset: auto 0 0 0; padding: 54px 0 20px;
  background: linear-gradient(transparent, rgba(10, 16, 22, .72));
  color: #fdf9ee;
}
.hero-shade h1 { margin-bottom: .15em; font-size: 2.35rem; }
.hero-shade p { margin: 0; max-width: 640px; color: #e9e2cf; }
.spot {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px 18px; margin: 18px 0;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.spot .spot-tag {
  font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--amber); border: 1px solid currentColor; border-radius: 999px; padding: 3px 9px;
  white-space: nowrap;
}
.spot .spot-body { flex: 1 1 320px; min-width: 240px; }
.spot .spot-body h2 { margin-bottom: .15em; font-size: 1.2rem; }
.spot .spot-body p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.spot .slots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.slot-chip {
  font-size: .8rem; font-weight: 650; border: 1px solid var(--line); color: var(--ink-2);
  border-radius: 999px; padding: 4px 10px; background: var(--surface-2);
}
.slot-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- buttons, chips, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none;
  padding: 10px 18px; border-radius: 10px; cursor: pointer; min-height: 46px;
  width: auto;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
html[data-theme="dark"] .btn:hover { color: #1c1305; }
html[data-theme="dark"] a.btn { color: var(--accent-ink); }
html[data-theme="dark"] a.door { color: var(--ink); }
.btn.ghost { background: transparent; color: var(--accent-strong); }
html[data-theme="dark"] .btn.ghost { color: var(--accent); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 7px 13px; min-height: 40px; font-size: .92rem; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; min-height: 42px;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-weight: 650; font-size: .95rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; width: 100%; max-width: 520px; min-height: 46px;
}
.field textarea { min-height: 96px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.form-status { display: none; color: var(--danger); font-weight: 600; margin: 8px 0; }
.form-status.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.search-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: end; }
.search-row .field { margin-bottom: 0; flex: 1 1 220px; max-width: 430px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; min-height: 44px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- sections, doors, strips ---------- */
.section { padding: 30px 0 6px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head .more-link { margin-left: auto; font-weight: 650; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.door {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 20px; transition: transform .15s ease, box-shadow .15s ease;
}
.door:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.door .d-kicker { font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
html[data-theme="dark"] .door .d-kicker { color: var(--accent); }
.door h3 { font-size: 1.35rem; margin: 4px 0 6px; }
.door p { color: var(--ink-2); margin: 0 0 10px; font-size: .97rem; }
.door .d-count { font-weight: 750; color: var(--ink); }
.strip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px 18px;
}
.strip h2 { font-size: 1.2rem; }
.strip-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.strip-item { background: var(--surface-2); border-radius: 10px; padding: 11px 13px; }
.strip-item strong { display: block; font-size: .99rem; }
.strip-item span { color: var(--ink-2); font-size: .9rem; }

/* ---------- cards (the one card pattern) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 15px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lift); }
.card .ph { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .ph .ph-tag {
  position: absolute; left: 9px; bottom: 9px; background: rgba(12, 20, 29, .82); color: #fdf9ee;
  font-size: .74rem; font-weight: 650; border-radius: 999px; padding: 3px 9px;
}
.card .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.12rem; }
.card .meta { color: var(--ink-2); font-size: .93rem; }
.card .meta strong { color: var(--ink); }
.card .rowline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .spacer { flex: 1; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 750;
  border-radius: 999px; padding: 3px 9px; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line);
}
.badge.verified { background: #e5f4ec; border-color: #bfe3cf; color: #0d5c36; }
html[data-theme="dark"] .badge.verified { background: #14301f; border-color: #245c3a; color: #8fe0ab; }
.badge.drop { background: #e5f4ec; border-color: #bfe3cf; color: #0d5c36; }
html[data-theme="dark"] .badge.drop { background: #14301f; border-color: #245c3a; color: #8fe0ab; }
.badge.trend-up { background: #fbeae8; border-color: #efc4be; color: #8c1d14; }
html[data-theme="dark"] .badge.trend-up { background: #331714; border-color: #5c2a24; color: #ff9d94; }
.badge.trend-down { background: #e5f4ec; border-color: #bfe3cf; color: #0d5c36; }
html[data-theme="dark"] .badge.trend-down { background: #14301f; border-color: #245c3a; color: #8fe0ab; }
.badge.open { background: #e5f4ec; border-color: #bfe3cf; color: #0d5c36; }
html[data-theme="dark"] .badge.open { background: #14301f; border-color: #245c3a; color: #8fe0ab; }
.price { font-weight: 800; font-size: 1.14rem; }
.menu-list { margin: 4px 0 0; padding: 0; list-style: none; font-size: .94rem; }
.menu-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.menu-list .mi-right { display: inline-flex; align-items: center; gap: 7px; }
.menu-list li:last-child { border-bottom: 0; }
.menu-list .mp { font-weight: 700; white-space: nowrap; }
.fav-btn {
  margin-left: auto; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; width: 42px; height: 42px; font-size: 1.15rem; cursor: pointer;
  color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center;
}
.fav-btn[aria-pressed="true"] { color: #d43d6b; border-color: #d43d6b; }
.stars { color: var(--amber); font-weight: 750; }

/* ---------- lists (events, yard sales, pets, trades) ---------- */
.rows-list { display: flex; flex-direction: column; gap: 11px; }
.list-row {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; gap: 14px; flex-wrap: wrap;
  align-items: baseline;
}
.list-row .lr-main { flex: 1 1 260px; min-width: 220px; }
.list-row h3 { margin: 0 0 2px; }
.list-row .meta { color: var(--ink-2); font-size: .93rem; }
.date-badge {
  font-family: "Libre Franklin", sans-serif; font-weight: 800; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 10px; min-width: 64px; line-height: 1.2;
}
.date-badge .db-m { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.date-badge .db-d { font-size: 1.3rem; }

/* ---------- town search results ---------- */
.town-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.town-col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 15px 17px; }
.town-col h3 { display: flex; justify-content: space-between; align-items: baseline; }
.town-col ul { margin: 0; padding: 0; list-style: none; }
.town-col li { padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: .96rem; }
.town-col li:last-child { border-bottom: 0; }
.town-col .tc-sub { color: var(--ink-2); font-size: .87rem; display: block; }

/* ---------- spotlight / roundup ---------- */
.spotlight {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 18px;
}
.spotlight img { width: 210px; height: 140px; object-fit: cover; border-radius: 10px; }
.spotlight .sp-body { flex: 1 1 300px; min-width: 240px; }

/* ---------- disclaimer / footer ---------- */
.disclaimer {
  border: 1px dashed var(--line); border-radius: 12px; padding: 13px 16px;
  color: var(--ink-2); font-size: .92rem; margin: 22px 0;
}
.l-foot { border-top: 1px solid var(--line); margin-top: 42px; padding: 26px 0 40px; background: var(--surface); }
.l-foot .f-grid { display: flex; gap: 26px; flex-wrap: wrap; }
.l-foot nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.l-foot nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.l-foot nav a:hover { color: var(--accent); }
.credit-line { font-weight: 750; }
.empty-note {
  border: 1px dashed var(--line); border-radius: 12px; padding: 18px;
  text-align: center; color: var(--ink-2);
}
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 20px; max-width: 640px;
}
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 760px) {
  .doors, .town-results { grid-template-columns: 1fr; }
  .form-2col { grid-template-columns: 1fr; }
  .hero-shade h1 { font-size: 1.8rem; }
  .hero-art img { height: 300px; }
  .brand .b-by { display: none; }
  .brand .b-name { font-size: 1.12rem; }
  .l-head-in { gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
  .l-nav { margin-left: 0; }
  .l-nav a, .l-nav summary { padding: 9px 8px; font-size: .94rem; }
  body { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.f-main { flex: 1 1 300px; min-width: 240px; }
.mt { margin-top: 12px; }
.lede-narrow { max-width: 680px; }
.l618-thanks { display: none; }
