:root {
  --bg: #f7f4ee;
  --card: #fdfbf7;
  --raised: #efe9df;
  --text: #1f1b16;
  --text-2: #5e554a;
  --muted: #776e62;
  --line: rgba(31, 27, 22, 0.09);
  --line-strong: rgba(31, 27, 22, 0.16);
  --on-text: #fdfbf7;

  /* Bin lid colors: they mean something, so they are the only hues on the page */
  --compost: #3f7a39;
  --recycle: #2a609f;
  --multibin: #b0670c;
  --multibin-ink: #8a4f08;
  --landfill: #6f6a63;
  --special: #1f1b16;

  --shadow: 0 1px 2px rgba(31, 27, 22, 0.05);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513;
    --card: #1c1a18;
    --raised: #262421;
    --text: #efe9de;
    --text-2: #aaa398;
    --muted: #8f897f;
    --line: rgba(239, 233, 222, 0.09);
    --line-strong: rgba(239, 233, 222, 0.16);
    --on-text: #161513;
    --compost: #74b56b;
    --recycle: #72a4e3;
    --multibin: #dd9c45;
    --multibin-ink: #dd9c45;
    --landfill: #9b958c;
    --special: #efe9de;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161513;
  --card: #1c1a18;
  --raised: #262421;
  --text: #efe9de;
  --text-2: #aaa398;
  --muted: #8f897f;
  --line: rgba(239, 233, 222, 0.09);
  --line-strong: rgba(239, 233, 222, 0.16);
  --on-text: #161513;
  --compost: #74b56b;
  --recycle: #72a4e3;
  --multibin: #dd9c45;
  --multibin-ink: #dd9c45;
  --landfill: #9b958c;
  --special: #efe9de;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/22px var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; white-space: nowrap; }
.brand-mark { width: 18px; height: 18px; display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 14px;
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 8px; white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.nav a:hover { background: var(--raised); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--raised); }
@media (max-width: 420px) { .top .wrap { gap: 12px; } .nav { gap: 0; } .nav a { padding: 0 8px; } }

/* Shared type */
h1, h2, h3 { margin: 0; font-weight: 500; }
.h-hero { font-size: 60px; line-height: 1.04; letter-spacing: -0.03em; max-width: 12ch; }
.h-page { font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; }
.h-sec { font-size: 24px; line-height: 1.2; }
.lede { font-size: 19px; line-height: 29px; color: var(--text-2); max-width: 34rem; margin: 20px 0 0; }
.muted { color: var(--muted); }
.meta { font: 400 12px/16px var(--mono); color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .h-hero { font-size: 40px; }
  .h-page { font-size: 28px; }
  .lede { font-size: 17px; line-height: 26px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text); color: var(--on-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.btn-secondary { background: var(--card); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--raised); }
.btn-block { width: 100%; }
.btn svg, .icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--recycle); outline-offset: 2px;
}

.back {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none;
  font-size: 14px; font-weight: 500; height: 32px; margin-bottom: 16px;
}
.back:hover { color: var(--text); }
.back .icon { width: 16px; height: 16px; }

/* Lid swatch: the bin's lid color, seen from the side */
.lid { width: 14px; height: 14px; border-radius: 4px; flex: none; background: var(--c, var(--landfill)); }
.k-compost { --c: var(--compost); --ink: var(--compost); }
.k-recycle { --c: var(--recycle); --ink: var(--recycle); }
.k-multibin { --c: var(--multibin); --ink: var(--multibin-ink); }
.k-landfill { --c: var(--landfill); --ink: var(--text-2); }
.k-special { --c: transparent; --ink: var(--text); }
.k-special .lid, .lid.k-special { box-shadow: inset 0 0 0 1.5px var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 8px;
  border-radius: 6px; background: var(--raised); font-size: 13px; font-weight: 500; color: var(--ink, var(--text));
  white-space: nowrap;
}
.chip .lid { width: 10px; height: 10px; border-radius: 3px; }

/* Home */
.hero { padding-top: 72px; padding-bottom: 80px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero-map { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 4px 0; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 56px; gap: 40px; }
}

.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head p { margin: 8px 0 0; color: var(--text-2); max-width: 36rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.steps .n { font: 500 13px/22px var(--mono); color: var(--muted); }
.steps h3 { font-size: 17px; line-height: 22px; }
.steps p { margin: 6px 0 0; color: var(--text-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

.bins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bin-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.bin-card header { display: flex; align-items: center; gap: 10px; }
.bin-card h3 { font-size: 16px; }
.bin-card .sub { margin: 6px 0 16px; color: var(--text-2); font-size: 14px; line-height: 20px; }
.bin-card ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bin-card li a {
  display: flex; align-items: center; min-height: 36px; padding: 6px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: 14px; line-height: 20px;
}
.bin-card li a:hover { color: var(--ink); }
.bin-card .more { margin-top: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 960px) { .bins { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .bins { grid-template-columns: 1fr; } }

.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 13px; line-height: 20px; }
.foot .wrap { display: grid; gap: 8px; }
.foot p { margin: 0; max-width: 46rem; }
.foot a { color: var(--text-2); }

/* App views */
.view { padding: 40px 0 80px; }
.app-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .app-grid { grid-template-columns: 1fr; gap: 32px; } .view { padding: 24px 0 64px; } }

.here {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2);
  margin-bottom: 12px;
}
.here .lid { width: 10px; height: 10px; border-radius: 3px; }

.choices { display: grid; gap: 8px; margin-top: 24px; }
.choice {
  display: grid; grid-template-columns: 6px 1fr auto; gap: 16px; align-items: center; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 16px 0;
  cursor: pointer; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}
.choice::before { content: ""; align-self: stretch; margin: -16px 0; background: var(--c); }
.choice:hover { background: var(--raised); border-color: var(--line-strong); }
.choice:active { transform: scale(0.99); }
.choice strong { display: block; font-weight: 500; font-size: 17px; line-height: 24px; }
.choice span.sub { display: block; color: var(--text-2); font-size: 14px; line-height: 20px; margin-top: 2px; }
.choice .icon { color: var(--muted); }

.or { display: flex; align-items: center; gap: 12px; margin: 32px 0 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.search {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color 150ms var(--ease);
}
.search:focus-within { border-color: var(--text-2); }
.search .icon { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; height: 100%; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search .clear { border: 0; background: transparent; padding: 4px; color: var(--muted); cursor: pointer; border-radius: 6px; display: flex; }
.search .clear:hover { color: var(--text); }

/* Result */
.result-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); font-weight: 500; }
.result-name { font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; margin-top: 8px; }
.walk { display: flex; align-items: baseline; gap: 12px; margin-top: 24px; }
.walk .min { font: 500 56px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.walk .unit { font-size: 17px; color: var(--text-2); }
.walk-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.result .actions { margin-top: 28px; }
.note {
  margin-top: 24px; padding: 14px 16px; border-radius: 10px; background: var(--raised);
  font-size: 14px; line-height: 20px; color: var(--text-2);
}
.note strong { color: var(--text); font-weight: 500; }

.nearby { margin-top: 32px; }
.nearby h3 { font-size: 14px; color: var(--text-2); font-weight: 500; margin-bottom: 8px; }
.nearby ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.nearby a {
  display: grid; grid-template-columns: 1fr auto 18px; gap: 12px; align-items: center;
  min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.nearby a:hover .nm { color: var(--ink); }
.nearby .icon { width: 16px; height: 16px; color: var(--muted); }

.map-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); position: sticky; top: 24px; }
.map-card .meta { padding: 8px 4px 0; }
.map { width: 100%; display: block; }
.map text { font-family: var(--sans); }
.map .grid line { stroke: var(--line); stroke-width: 1; }
.map .st { fill: var(--c); }
.map .st.faint { opacity: 0.35; }
.map .lbl { fill: var(--text-2); font-size: 11px; }
.map .lbl-strong { fill: var(--text); font-size: 13px; font-weight: 500; }
.map .halo { paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.map .route { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.1 7; }
.map .you { fill: var(--card); stroke: var(--text); stroke-width: 2.5; }
.map .scale line { stroke: var(--muted); stroke-width: 1.5; }
.map .scale text { fill: var(--muted); font: 400 11px var(--mono); paint-order: stroke; stroke: var(--card); stroke-width: 4px; }
.map .route.draw { animation: draw 600ms var(--ease) both; }
@keyframes draw { from { opacity: 0; } to { opacity: 1; } }

.status { display: flex; align-items: center; gap: 10px; color: var(--text-2); margin-top: 24px; }
.status .spin { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); border-top-color: var(--text); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 8px; margin-top: 16px; }
.field label { font-size: 14px; font-weight: 500; }
.select {
  height: 46px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card);
  padding: 0 12px; font-size: 16px; width: 100%;
}

/* Search results */
.results { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.results a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 8px 4px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.results a:hover, .results a.active { background: var(--raised); }
.results .nm { font-size: 16px; }
.results .alias { display: block; font-size: 13px; color: var(--muted); }
.empty { margin-top: 24px; color: var(--text-2); }
.empty p { margin: 0 0 8px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick a {
  height: 34px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 14px;
  transition: background-color 150ms var(--ease);
}
.quick a:hover { background: var(--raised); }

/* Item */
.item-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.item-title { margin-bottom: 24px; }
.guide > h2:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .item-grid { grid-template-columns: 1fr; gap: 32px; }
  .item-grid .verdict { order: -1; position: static; }
}
.verdict {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow);
  position: sticky; top: 24px;
}
.verdict .lid { display: block; width: 100%; height: 6px; border-radius: 3px; margin-bottom: 16px; }
.verdict h2 { font-size: 22px; line-height: 28px; color: var(--ink); }
.verdict p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
.verdict .btn { margin-top: 20px; }

.guide { font-size: 16px; line-height: 26px; max-width: 40rem; }
.guide h2 { font-size: 14px; font-weight: 500; color: var(--text-2); margin: 32px 0 8px; }
.guide p { margin: 0 0 12px; }
.guide ul { margin: 0 0 12px; padding-left: 20px; }
.guide li { margin-bottom: 8px; }
.guide li ul { margin-top: 8px; }
.guide strong { font-weight: 500; }
.guide a { color: var(--recycle); text-underline-offset: 2px; }
.guide details { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.guide summary { cursor: pointer; color: var(--text-2); font-size: 14px; font-weight: 500; }
.guide details[open] summary { margin-bottom: 12px; }
.guide .src { margin-top: 32px; font-size: 13px; color: var(--muted); line-height: 20px; }
.guide .src a { color: var(--text-2); }

.enter { animation: enter 360ms var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
