:root {
  color-scheme: light;
  --ink: #17231c;
  --muted: #647069;
  --paper: #f4f6f1;
  --white: #ffffff;
  --line: #dce3dc;
  --forest: #173f2a;
  --green: #23844f;
  --lime: #c7e56b;
  --yellow: #f4d84d;
  --orange: #e8893f;
  --blue: #4b89aa;
  --shadow: 0 20px 55px rgba(20, 45, 30, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding: 0.8rem max(1rem, calc((100vw - 1180px) / 2));
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: var(--forest);
  color: var(--lime);
  font-family: Manrope, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { line-height: 1.15; }
.brand small { margin-top: 0.15rem; color: var(--muted); font-size: 0.72rem; }
nav { display: flex; align-items: center; gap: 1.6rem; font-size: 0.9rem; font-weight: 700; }
nav a { color: #435048; }
nav a:hover, nav a:focus-visible { color: var(--green); }
.mobile-centres-link { display: none; color: var(--forest); font-size: 0.82rem; font-weight: 800; }

main { overflow: hidden; }
main#top { scroll-margin-top: 74px; }
.hero {
  position: relative;
  display: flex;
  height: 360px;
  min-height: 0;
  align-items: flex-start;
  overflow: hidden;
  background: #27372e;
}
.hero-image, .hero-shade { position: absolute; inset: 0; }
.hero-image {
  background: url("assets/rayleigh-tip-clean-markings.png") center 54% / cover no-repeat;
  transform: rotate(180deg) scale(1.03);
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(10,31,20,0.91) 0%, rgba(10,31,20,0.7) 42%, rgba(10,31,20,0.16) 75%),
    linear-gradient(0deg, rgba(10,31,20,0.72) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 20px 0 2rem;
  color: white;
}
.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow.light { color: var(--lime); }
h1, h2 { font-family: Manrope, sans-serif; letter-spacing: 0; }
h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 3.1rem);
  line-height: 0.98;
}
.hero-intro { max-width: 610px; margin: 1.35rem 0 1.8rem; color: rgba(255,255,255,0.84); font-size: 1.15rem; }
.hero-actions { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}
.button-light { background: var(--lime); color: #17301f; }
.button-secondary { min-height: 42px; margin-top: 1rem; border: 1px solid rgba(255,255,255,0.24); background: rgba(255,255,255,0.08); color: white; }
.save-visit-plan { margin-top: 1rem; }
.button-secondary:hover, .button-secondary:focus-visible { background: rgba(255,255,255,0.16); }
.hero-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 7px;
  background: rgba(11,34,21,0.66);
  color: rgba(255,255,255,0.78);
  font-size: 0.8rem;
  backdrop-filter: blur(10px);
}
.hero-status strong { color: white; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(244,216,77,0.18); }

.finder-section, .prepare-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
  scroll-margin-top: 74px;
}
.section-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 3rem; align-items: end; }
.section-intro .eyebrow { grid-column: 1 / -1; }
.section-intro h2, .map-heading h2, .prepare-heading h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.25vw, 2.05rem);
  line-height: 1.04;
}
#finder-title { scroll-margin-top: 104px; }
.section-intro > p:last-child { margin: 0 0 0.3rem; color: var(--muted); }
.finder-panel { margin-top: 2rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.search-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 64px;
  padding: 0 1rem;
  border: 2px solid #cfd8d0;
  border-radius: 7px;
}
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(35,132,79,0.11); }
.search-icon { width: 16px; height: 16px; border: 2px solid var(--muted); border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; transform: rotate(45deg); background: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); font-size: 1.05rem; }
.search-box kbd { padding: 0.28rem 0.42rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); font-size: 0.66rem; }
.search-actions { display: flex; gap: 0.65rem; }
.search-actions .search-box { flex: 1; }
.add-material-button { flex: 0 0 auto; }
.add-material-button:disabled { background: #e2e8df; color: #78857c; cursor: not-allowed; }
.waste-suggestions {
  display: none;
  overflow: hidden;
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
.waste-suggestions.active { display: block; }
.suggestion-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover, .suggestion-item:focus-visible { background: #edf4e6; outline: 0; }
.suggestion-item strong, .suggestion-item small { display: block; }
.suggestion-item small { margin-top: 0.08rem; color: var(--muted); font-size: 0.76rem; }
.suggestion-item em { flex: 0 0 auto; color: var(--forest); font-style: normal; font-weight: 800; }
.material-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1rem 0 1.5rem; }
.material-chip {
  min-height: 38px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9f5;
  color: #405048;
  cursor: pointer;
  font-weight: 700;
}
.material-chip:hover, .material-chip.active { border-color: var(--forest); background: var(--forest); color: white; }
.mobile-selection-help, .mobile-map-button { display: none; }
.finder-result { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 110px; padding: 1.1rem 1.4rem; border-radius: 7px; background: #edf4e6; }
.result-kicker { color: var(--green); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.finder-result h3, .map-card h3 { margin: 0.25rem 0 0.45rem; font-family: Manrope, sans-serif; font-size: 1.65rem; line-height: 1.1; }
.finder-result h4 { margin: 1.05rem 0 0.2rem; font-family: Manrope, sans-serif; font-size: 1.05rem; line-height: 1.15; }
.finder-result p, .map-card p { max-width: 620px; margin: 0; color: var(--muted); }
.route-note { margin-top: 0.1rem !important; font-size: 0.88rem; }
.result-list { display: grid; gap: 0.45rem; max-width: 620px; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.result-list li { display: grid; grid-template-columns: 30px minmax(120px, 1fr) auto; gap: 0.8rem; align-items: center; color: var(--muted); }
.route-step { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 999px; background: var(--forest); color: white; font-size: 0.72rem; font-weight: 800; }
.result-list strong { color: var(--ink); }
.result-list li > span:last-child { justify-self: end; font-weight: 800; color: var(--forest); }
.result-list .route-step { justify-self: start; color: white; }
.finder-note { margin-top: 0.75rem !important; font-size: 0.82rem; }
.text-link { flex: 0 0 auto; color: var(--forest); font-weight: 800; }

.map-section { padding: 3rem max(1rem, calc((100vw - 1180px) / 2)); background: var(--forest); color: white; scroll-margin-top: 74px; }
.map-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.map-heading h2 { max-width: 700px; }
.mobile-copy { display: none; }
.map-layout { display: grid; grid-template-columns: minmax(360px, 0.85fr) minmax(280px, 0.55fr); gap: 1rem; align-items: stretch; max-width: 900px; margin: 0 auto; }
.aerial-map {
  position: relative;
  aspect-ratio: 1152 / 1408;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.19);
  border-radius: 8px;
  background: #5c695e;
  box-shadow: 0 25px 60px rgba(0,0,0,0.28);
}
.aerial-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/rayleigh-tip-clean-markings.png") center / cover no-repeat;
  transform: rotate(180deg) scale(1.002);
}
.bin-pin {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 27px;
  height: 23px;
  place-items: center;
  transform: translate(-50%,-50%);
  border: 2px solid white;
  border-radius: 4px;
  background: var(--forest);
  color: white;
  box-shadow: 0 3px 9px rgba(0,0,0,0.38);
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 800;
}
.bin-pin[data-section="far"] { background: #705d13; }
.bin-pin[data-section="right"] { background: #245f7a; }
.bin-pin:hover, .bin-pin.active { background: var(--lime); color: var(--forest); transform: translate(-50%,-50%) scale(1.16); }
.bin-pin.attention { background: var(--lime); color: var(--forest); animation: bin-attention 0.32s ease-in-out 2; }
.bin-label {
  position: absolute;
  z-index: 5;
  min-width: max-content;
  max-width: 150px;
  padding: 0.45rem 0.6rem;
  transform: translate(-50%, calc(-100% - 11px));
  border-radius: 999px;
  background: white;
  color: var(--forest);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: 700;
  pointer-events: none;
}
.bin-label[hidden] { display: none; }
.bin-label::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 11px; height: 11px; transform: translateX(-50%) rotate(45deg); background: white; }
@keyframes bin-attention {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(199,229,107,0); }
  50% { opacity: 0.18; box-shadow: 0 0 0 9px rgba(199,229,107,0.42); }
}
@media (prefers-reduced-motion: reduce) {
  .bin-pin.attention { animation: none; outline: 4px solid var(--yellow); }
}
.direction { position: absolute; z-index: 3; padding: 0.42rem 0.6rem; border-radius: 4px; background: rgba(19,63,42,0.88); color: white; font-size: 0.68rem; font-weight: 800; }
.entrance-label { left: 5%; bottom: 16%; }
.map-card { padding: 1.3rem; border: 1px solid rgba(255,255,255,0.14); border-radius: 8px; background: #234e35; }
.map-card { align-self: start; position: sticky; top: 90px; min-height: 320px; }
.map-card .result-kicker { color: var(--lime); }
.map-card p { color: rgba(255,255,255,0.68); }
.map-card .result-list { margin-top: 0.9rem; }
.map-card .result-list li { color: rgba(255,255,255,0.68); }
.map-card .result-list strong, .map-card .result-list li > span:last-child { color: white; }
.map-card .result-list .route-step { background: var(--lime); color: var(--forest); }
.bin-large { display: grid; width: 72px; height: 72px; margin-bottom: 1.3rem; place-items: center; border-radius: 8px; background: var(--lime); color: var(--forest); font-family: Manrope, sans-serif; font-size: 2rem; font-weight: 800; }
.notice { margin-top: 1.4rem; padding: 0.85rem; border-left: 3px solid var(--yellow); background: rgba(0,0,0,0.15); color: rgba(255,255,255,0.72); font-size: 0.78rem; }
.notice strong { color: white; }

.prepare-section { width: 100%; max-width: none; padding: 3rem max(1rem, calc((100vw - 1180px) / 2)); background: #d8e98e; }
.prepare-heading { display: grid; grid-template-columns: 0.7fr 1fr; gap: 2rem; align-items: end; }
.prepare-heading .eyebrow { color: var(--forest); }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 1.5rem; background: rgba(23,63,42,0.2); border: 1px solid rgba(23,63,42,0.2); }
.steps article { padding: 1.4rem; background: #d8e98e; }
.steps span { color: var(--forest); font-family: Manrope, sans-serif; font-size: 0.75rem; font-weight: 800; }
.steps h3 { margin: 1.7rem 0 0.4rem; font-size: 1.2rem; }
.steps p { margin: 0; color: #53623e; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.5rem max(1rem, calc((100vw - 1180px) / 2)); background: #10271a; color: white; }
.footer-brand .brand-mark { background: var(--lime); color: var(--forest); }
.footer-brand small, footer p { color: rgba(255,255,255,0.6); }
footer p { max-width: 440px; margin: 0; font-size: 0.8rem; text-align: right; }
.manager-link { display: inline-block; color: inherit; font-size: inherit; line-height: 1; opacity: 1; text-decoration: none; transition: opacity 160ms ease; }
.manager-link:hover, .manager-link:focus-visible { opacity: 1; outline: 2px solid var(--lime); outline-offset: 3px; }

@media (min-width: 1200px) {
  .hero { height: 270px; }
}

@media (max-width: 900px) {
  .hero { height: 360px; }
  nav { display: none; }
  .mobile-centres-link { display: inline-flex; align-items: center; min-height: 42px; }
  .section-intro, .prepare-heading { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; }
  .aerial-map { min-height: 360px; }
  .map-card { min-height: 230px; }
}
@media (max-width: 620px) {
  .site-header { min-height: 66px; }
  .desktop-copy { display: none; }
  .mobile-copy { display: inline; }
  main#top { scroll-margin-top: 66px; }
  .brand strong { font-size: 0.88rem; }
  .hero { height: 380px; min-height: 0; }
  .hero-content { padding: 20px 0 2rem; }
  .hero-image { background-position: 53% center; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-status { max-width: 100%; }
  .finder-section { padding: 1.25rem 0 2.5rem; }
  .finder-result { display: none; }
  .mobile-selection-help { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -0.4rem 0 0.75rem; color: var(--muted); font-size: 0.82rem; }
  .mobile-selection-help button { padding: 0; border: 0; background: none; color: var(--forest); font: inherit; font-weight: 800; text-decoration: underline; }
  .mobile-map-button { display: flex; width: 100%; margin: 0 0 1.25rem; }
  .mobile-map-button:disabled { background: #e2e8df; color: #78857c; cursor: not-allowed; }
  .map-section { padding-top: 1rem; padding-bottom: 2.5rem; }
  .prepare-section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .finder-section .section-intro h2 { font-size: 1.175rem; }
  #finder-title { scroll-margin-top: 130px; }
  .finder-result, .map-heading, footer { align-items: flex-start; flex-direction: column; }
  .result-list li { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0.5rem; }
  .result-list span { justify-self: start; }
  .result-list li > span:last-child { justify-self: end; }
  .text-link { margin-top: 1rem; }
  .aerial-map { min-height: 0; aspect-ratio: 1140 / 1380; }
  .bin-pin { width: 24px; height: 20px; font-size: 0.58rem; }
  .bin-label { max-width: 118px; padding: 0.38rem 0.48rem; font-size: 0.64rem; }
  .detail-layout { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 0.7rem; align-items: start; }
  .detail-layout .bin-large { width: 36px; height: 36px; margin: 0; font-size: 1rem; }
  .detail-copy h3 { margin-bottom: 0; }
  .detail-copy .notice { margin-top: 1rem; }
  .steps { grid-template-columns: 1fr; }
  footer p { text-align: left; }
  .search-box input { font-size: 0.9rem; }
  .search-box kbd { display: none; }
  .search-actions { flex-direction: column; gap: 0.5rem; }
  .add-material-button { width: 100%; }
  .mobile-search-close { display: none; }
  body.mobile-search-open { overflow: hidden; }
  body.mobile-search-open::before { position: fixed; z-index: 40; inset: 0; content: ""; background: rgba(23, 35, 28, 0.3); }
  body.mobile-search-open .search-actions { position: fixed; z-index: 50; top: clamp(1rem, 28dvh, 7rem); right: 5.25rem; left: 1rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
  body.mobile-search-open .waste-suggestions.active { position: fixed; z-index: 50; top: calc(clamp(1rem, 28dvh, 7rem) + 8.5rem); right: 1rem; bottom: calc(env(keyboard-inset-height, 0px) + 1rem); left: 1rem; overflow-y: auto; margin: 0; box-shadow: var(--shadow); }
  body.mobile-search-open .mobile-search-close { position: fixed; z-index: 51; top: calc(clamp(1rem, 28dvh, 7rem) + 0.75rem); right: 1rem; display: inline-flex; min-height: 42px; align-items: center; border: 0; border-radius: 7px; background: var(--forest); color: white; font: inherit; font-size: 0.82rem; font-weight: 800; padding: 0 0.8rem; }
  .suggestion-item { align-items: flex-start; }
}
