/* Town Rulebook — lean Operate world (from scratch; old site is anti-reference) */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f6f3;
  --ink: #1a1a18;
  --muted: #5c5a54;
  --line: #e4e1d9;
  --accent: #2f5d4a;
  --accent-hover: #244a3b;
  --surface: #fffef9;
  --focus: #2f5d4a;
  --max: 42rem;
  --max-home: 32rem;
  --header-h: 3.25rem;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Geist", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16.5px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip:focus {
  left: 12px; top: 12px; width: auto; height: auto; z-index: 1000;
  background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 6px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .bar {
  max-width: 52rem;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  color: var(--ink) !important;
  text-decoration: none !important;
  font-family: var(--display);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.nav a {
  color: var(--muted) !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0;
}
.nav a:hover { color: var(--ink) !important; }

main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* —— Home: intentional first viewport, no dead vertical void —— */
main.home {
  max-width: none;
  display: block;
  padding: 0 1.25rem 3rem;
  min-height: 0;
}
.home-stage {
  width: 100%;
  max-width: var(--max-home);
  margin: 0 auto;
  padding: 2.75rem 0 0;
}
.home-inner {
  width: 100%;
}
@media (min-width: 720px) {
  .home-stage { padding-top: 3.5rem; }
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--ink);
  text-wrap: balance;
}
.home h1 {
  font-size: clamp(2.75rem, 9vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin: 0 0 1.85rem;
  text-align: center;
  max-width: 11ch;
  margin-left: auto;
  margin-right: auto;
}
h2 {
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 650;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.lede {
  font-size: 1.02rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 36rem;
}
.home .trust {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* One authored motion: home stage enters once */
@keyframes home-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-stage {
  animation: home-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* —— Search as hero object —— */
.search-panel { position: relative; width: 100%; }
.search-panel label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home .search-panel label {
  text-align: center;
  width: 100%;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 3.35rem;
}
.home .search-box {
  min-height: 4rem;
  border-radius: 999px;
  border-width: 1px;
  box-shadow:
    0 1px 2px rgba(26, 26, 24, 0.04),
    0 10px 32px rgba(26, 26, 24, 0.07);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.search-box {
  border-radius: 999px;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(47, 93, 74, 0.16),
    0 12px 36px rgba(26, 26, 24, 0.08);
}
.home .search-box:focus-within {
  transform: translateY(-1px);
}
.search-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 1.05rem;
  color: var(--muted);
  pointer-events: none;
}
.home .search-icon {
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 1.2rem;
}
.search-box:focus-within .search-icon { color: var(--accent); }
.search-panel input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.85rem 1rem 0.85rem 0.65rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  font-family: inherit;
}
.home .search-panel input[type="search"] {
  padding: 1.05rem 1.15rem 1.05rem 0.7rem;
  font-size: 1.2rem;
  font-weight: 500;
}
.search-panel input::placeholder { color: #9a968c; font-weight: 400; }
.search-submit {
  flex-shrink: 0;
  margin: 0 0.45rem 0 0;
  padding: 0.55rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 0.875rem/1 var(--font);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.search-submit:hover { background: var(--accent-hover); }
.search-kbd {
  flex-shrink: 0;
  display: none;
  align-items: center;
  gap: 0.2rem;
  margin-right: 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}
.search-kbd kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  font: 600 0.65rem/1.2 var(--font);
  color: var(--muted);
}
.home .search-submit { display: inline-flex; }
@media (min-width: 720px) {
  .home .search-kbd { display: inline-flex; margin-right: 0.35rem; }
  .home .search-box:focus-within .search-kbd { opacity: 0.55; }
}


.search-results {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  position: absolute;
  left: 0; right: 0;
  z-index: 30;
  box-shadow:
    0 4px 6px rgba(26, 26, 24, 0.04),
    0 18px 40px rgba(26, 26, 24, 0.12);
  animation: drop-in 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-results[hidden] { display: none !important; }
.search-results li { border-bottom: 0; }
.search-results a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  text-decoration: none !important;
  color: var(--ink) !important;
  font-weight: 600;
  transition: background 0.12s ease;
}
.search-results a:hover,
.search-results a:focus { background: #eef3f0; outline: none; }
.search-results .name { font-size: 1.02rem; }
.search-results .meta { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.search-results .empty {
  padding: 0.9rem 1.05rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}


/* City marquee — seamless auto-scroll of all published cities */
.city-marquee {
  margin: 1.35rem 0 0;
  width: 100%;
}
.city-marquee-label {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.city-marquee-viewport {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  outline: none;
}
.city-marquee-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  width: max-content;
  animation: city-marquee-scroll 42s linear infinite;
}
.city-marquee-viewport:hover .city-marquee-track,
.city-marquee-viewport:focus-within .city-marquee-track {
  animation-play-state: paused;
}
.city-marquee-track a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.city-marquee-track a:hover,
.city-marquee-track a:focus {
  color: var(--accent) !important;
  text-decoration: underline !important;
}
.city-marquee-static {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0;
}
.city-marquee-static a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted) !important;
  text-decoration: none !important;
}
.city-marquee-static a:hover { color: var(--accent) !important; text-decoration: underline !important; }

@keyframes city-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.popular {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.15rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.popular li:not(:last-child)::after {
  content: "·";
  margin: 0 0.45rem;
  color: var(--line);
  font-weight: 600;
}
.popular a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted) !important;
  text-decoration: none !important;
}
.popular a:hover { color: var(--accent) !important; text-decoration: underline !important; }

/* —— Answer / facts —— */
.answer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 0.35rem;
}
.src {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1.35rem;
  line-height: 1.4;
}
.src a { color: var(--muted); }
.src a:hover { color: var(--accent); }

.section {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.section + .section {
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
}
.section h2 { margin: 0 0 0.4rem; }
.section > p { margin: 0 0 0.35rem; }
.section .src { margin-bottom: 0; }

.facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.25rem 0 0.5rem;
}
.facts-table th,
.facts-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.5rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.facts-table th {
  width: 7.5rem;
  font-weight: 650;
  color: var(--ink);
  padding-right: 1rem;
}
.facts-table tr:last-child th,
.facts-table tr:last-child td { border-bottom: 0; }
.facts-table .src { margin: 0.25rem 0 0; }

.needs { color: #8a6a20; font-style: italic; }

.checklist {
  margin: 0.75rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.checklist-head {
  padding: 0.9rem 1.05rem;
  border-bottom: 1px solid var(--line);
}
.checklist-head h2 { margin: 0 0 0.2rem; font-size: 1rem; }
.checklist .sub { font-size: 0.85rem; color: var(--muted); margin: 0; }
.checklist-body { padding: 0.35rem 1.05rem 1.05rem; }
.check-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.65rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.check-item:last-of-type { border-bottom: 0; }
.check-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  padding-top: 0.15rem;
}
.check-label { font-weight: 650; font-size: 0.88rem; margin: 0 0 0.15rem; }
.check-val { margin: 0; font-size: 0.92rem; }
.addr-box {
  margin: 0.65rem 0 0.35rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.addr-box label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.addr-box input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
.cal-link { display: inline-block; font-size: 0.875rem; margin-top: 0.65rem; font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin: 0.75rem 0;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff !important;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.92rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--accent-hover); color: #fff !important; }
.btn.secondary {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line);
}
.btn.secondary:hover { border-color: var(--ink); background: var(--surface); }
.btn.ghost {
  background: transparent;
  color: var(--accent) !important;
  border: 0;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: 600;
}

.junk-cta {
  margin: 2rem 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}
.junk-cta h2 { font-size: 1rem; }
.junk-cta p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.92rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th { font-weight: 650; background: var(--bg); color: var(--ink); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

nav.crumb {
  font-size: 0.78rem;
  margin: 0 0 1rem;
  color: var(--muted);
}
nav.crumb a { color: var(--muted); text-decoration: none; }
nav.crumb a:hover { color: var(--ink); }

ul.links { padding-left: 1.1rem; margin: 0.35rem 0; }
ul.links li { margin: 0.35rem 0; }

.related {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.related h2 { margin: 0 0 0.65rem; }
.related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.related-grid a { font-weight: 600; font-size: 0.9rem; }

.city-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.city-list li { border-bottom: 1px solid var(--line); }
.city-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  text-decoration: none !important;
  color: var(--ink) !important;
  font-weight: 600;
}
.city-list a:hover { color: var(--accent) !important; }
.city-list .meta { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.city-list [hidden] { display: none !important; }

.note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  line-height: 1.45;
}

.faq {
  margin: 3.5rem auto 0;
  max-width: var(--max-home);
  width: 100%;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0;
  margin: 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.65rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .faq-a {
  padding: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 0.35rem;
}
.section-head h2 { margin: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem 2rem;
  background: var(--bg);
  margin-top: auto;
}
.site-footer .inner { max-width: 52rem; margin: 0 auto; }
.site-footer .foot-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.site-footer .foot-tag {
  font-size: 0.8rem;
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 28rem;
  line-height: 1.4;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.site-footer a {
  color: var(--muted) !important;
  text-decoration: none;
  font-size: 0.8rem;
}
.site-footer a:hover { color: var(--ink) !important; }

.ad-footer {
  border-top: 1px solid var(--line);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: center;
}
.ad-footer.ad-off { display: none; }
.ad-footer-inner {
  width: 100%;
  max-width: 728px;
  min-height: 40px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search hints */
.search-results .name { display: flex; flex-direction: column; gap: 0.1rem; }
.search-results .hint { font-size: 0.72rem; font-weight: 600; color: var(--accent); }
.search-results .empty a { color: var(--accent) !important; font-weight: 600; display: inline; padding: 0; text-decoration: underline !important; }

/* City jump bar */
.jumpbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  margin: 0 -1.25rem 1rem; padding: 0.55rem 1.25rem;
  background: rgba(247, 246, 243, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.jumpbar-city { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.jumpbar ul { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.jumpbar a {
  display: block; padding: 0.35rem 0.6rem; border-radius: 999px;
  color: var(--muted) !important; text-decoration: none !important; font-weight: 600; white-space: nowrap;
}
.jumpbar a:hover, .jumpbar a:focus-visible { background: var(--surface); color: var(--ink) !important; }
#trash, #bulk, #set-out, #holidays { scroll-margin-top: 4rem; }

@media (max-width: 640px) {
  .jumpbar { margin: 0 -1rem 0.9rem; padding: 0.45rem 1rem; gap: 0.6rem; }

  .site-header .bar { padding: 0.5rem 1rem; flex-wrap: wrap; }
  .nav { width: 100%; }
  main { padding: 1.15rem 1rem 2.5rem; }
  main.home { padding: 0 1rem 2.5rem; }
  .home-stage { padding-top: 2rem; }
  .home h1 { font-size: clamp(2.4rem, 11vw, 3.1rem); margin-bottom: 1.4rem; }
  .facts-table th { width: 5.5rem; font-size: 0.85rem; }
  .home .search-panel label { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .search-box { transition: none; }
  .home-stage { animation: none; }
  .search-results { animation: none; }
  .city-marquee-track { display: none !important; animation: none !important; }
  .city-marquee-static { display: flex; }
  .city-marquee-viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
  }
}

/* Hide native search cancel/decoration */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
