*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f7f4;color:#1d2a22;line-height:1.5}
.wrap{width:min(1120px,92%);margin:auto}
.site-header{background:#173d2b;color:#fff;padding:42px 0 34px;border-bottom:6px solid #b7d33f}
.admin-header{background:#263f35}
.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;font-weight:700;margin:0 0 8px;color:#d7e7da}
.site-header h1{font-size:clamp(2rem,5vw,3.4rem);margin:0}
.lede{max-width:790px;margin:.5rem 0 0;color:#edf5ef}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:28px 0}
.summary-card,.panel,.notice,.login-card{background:#fff;border:1px solid #dce6df;border-radius:14px;box-shadow:0 3px 12px rgba(20,50,35,.06)}
.summary-card{padding:18px}
.summary-card span{display:block;font-size:.83rem;color:#5f7066}
.summary-card strong{font-size:1.55rem}
.panel,.login-card{padding:22px;margin:22px 0}
.panel-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px}
.panel-heading h2{margin:0 0 3px}
.panel-heading p{margin:0;color:#64736a}
.filter,.field{display:flex;flex-direction:column;gap:5px;font-size:.82rem;font-weight:700;color:#56645c}
.filter{min-width:240px}
select,input,textarea{font:inherit;padding:10px;border:1px solid #bbc8bf;border-radius:8px;background:#fff;width:100%}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:13px 10px;border-bottom:1px solid #e4ebe6;vertical-align:top}
th{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:#617066}
.status{display:inline-block;padding:4px 9px;border-radius:999px;font-weight:700;font-size:.8rem}
.covered{background:#d9f1e2;color:#175c36}
.needed{background:#fff0c9;color:#795400}
.complete{background:#dce6f8;color:#234b87}
.admin-link{text-align:right;margin:20px 0 45px}
.admin-link a{color:#145f3b;font-weight:700}
.notice{padding:14px 18px;margin:25px 0;background:#fff8df;border-color:#f2df9a}
.error{background:#fdeaea;border-color:#e7b4b4}
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab,.primary,.secondary,.danger,.choice,.icon-btn{border:0;border-radius:8px;padding:10px 13px;font-weight:700;cursor:pointer}
.tab{background:#e6ece8}
.tab.active,.primary{background:#19623d;color:#fff}
.secondary{background:#e7efe9;color:#214c34}
.danger{background:#fbe2e2;color:#8a2929}
.admin-section{display:none}
.admin-section.active{display:block}
.record{display:grid;grid-template-columns:1.65fr 1.15fr .9fr auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #e5ebe7}
.record small{color:#68776e}
.record-actions{display:flex;gap:6px;flex-wrap:wrap}
.pill{display:inline-block;background:#edf4ef;border:1px solid #d6e5da;border-radius:999px;padding:3px 8px;margin:2px 3px 2px 0}
.modal-backdrop{position:fixed;inset:0;background:rgba(17,31,23,.48);display:grid;place-items:center;padding:18px;z-index:20}
.hidden{display:none!important}
.modal{background:#fff;width:min(760px,100%);max-height:90vh;overflow:auto;border-radius:16px;padding:20px;box-shadow:0 20px 50px rgba(0,0,0,.24)}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.modal-head h2{margin:0}
.icon-btn{font-size:1.5rem;background:#eef2ef;color:#24382d;padding:5px 11px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.picker-section,.recurrence-box{margin-top:18px}
.picker-section h3{margin:0 0 4px;font-size:1rem}
.picker-section p{margin:0 0 10px;color:#66756c;font-size:.9rem}
.recurrence-box{padding:14px;border:1px solid #dce6df;border-radius:12px;background:#fafcfb}
.choice-grid,.team-person-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.choice{background:#edf2ef;color:#294034;text-align:left;border:2px solid transparent;min-height:48px}
.choice.selected{background:#d9efe0;border-color:#19623d;color:#12482d}
.choice small{display:block;font-weight:400;opacity:.8;margin-top:2px}
.team-person{border:1px solid #d8e2dc;border-radius:12px;padding:10px;background:#fafcfb}
.team-person.selected-member{border-color:#19623d;background:#f1f8f3}
.member-toggle{width:100%;border:0;border-radius:9px;background:#edf2ef;color:#294034;text-align:left;padding:11px;cursor:pointer}
.member-toggle.selected{background:#d9efe0;color:#12482d}
.person-name{display:block;font-weight:700}
.person-state{display:block;font-size:.8rem;font-weight:400;margin-top:2px;opacity:.8}
.coordinator-choice{display:flex;align-items:center;gap:8px;margin-top:9px;font-size:.9rem;font-weight:700}
.coordinator-choice.disabled{opacity:.45}
.coordinator-choice input,.inline-check input{width:auto}
.inline-check{display:flex;align-items:flex-start;gap:10px;margin-top:12px;font-weight:700}
.help-text{font-size:.84rem;color:#66756c;margin-top:4px}
.assignment-summary{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}
.toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.login-card{max-width:520px;margin:32px auto}
.login-card h2{margin-top:0}
.login-actions{display:flex;gap:8px;margin-top:16px}
.muted{color:#68776e}
.loading{padding:22px;text-align:center;color:#68776e}
footer{background:#e5ebe7;padding:20px 0;color:#536259;font-size:.9rem}

/* Compact Webador Survey Schedule */
.embedded-schedule #publicHeader,
.embedded-schedule #publicFooter{display:none}
.embedded-schedule body{background:transparent}
.embedded-schedule main.wrap{width:100%;max-width:none;padding:0}
.embedded-schedule .summary-grid{margin-top:0}
.embedded-schedule .panel{margin-bottom:0}
.embedded-schedule #assignmentHeading,
.embedded-schedule .assignment-column{display:none}

/* Email coordinator */
.contact-button{border:0;border-radius:8px;padding:8px 11px;font-weight:700;cursor:pointer;background:#e7efe9;color:#214c34;white-space:nowrap}
.contact-button:hover,
.contact-button:focus-visible{background:#d9e8dd;outline:2px solid #19623d;outline-offset:2px}
.contact-unavailable{color:#68776e;font-size:.86rem}
.contact-modal textarea{resize:vertical;min-height:120px}

/* Survey Rounds sub-tabs */
.round-status-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.round-status-tab{border:1px solid #cfdcd2;border-radius:999px;background:#f7faf8;color:#234231;padding:7px 12px;font:inherit;font-size:.86rem;font-weight:700;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}
.round-status-tab:hover,
.round-status-tab:focus-visible{background:#eef7f0;border-color:#9fb4a4;outline:none}
.round-status-tab.active{background:#173d2b;border-color:#173d2b;color:#fff}
.round-status-count{display:inline-block;margin-left:5px;min-width:1.4em;text-align:center;font-size:.78rem;opacity:.85}
.round-status-list{display:grid;gap:10px}
.round-record{grid-template-columns:minmax(0,1fr) auto}
.round-record .record-main{min-width:0}
.round-record-actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.round-status-select-label{display:flex;flex-direction:column;gap:4px;font-size:.75rem;font-weight:700;color:#5f7066}
.round-status-select{min-width:135px;padding:8px 10px}
.empty-state{padding:18px;border:1px dashed #cfdcd2;border-radius:10px;color:#68776e;background:#fafcfb}

@media(max-width:760px){
  .summary-grid{grid-template-columns:1fr 1fr}
  .panel-heading{align-items:stretch;flex-direction:column}
  .record,.form-grid,.choice-grid,.team-person-grid{grid-template-columns:1fr}
  .admin-link{text-align:left}
  .round-record{grid-template-columns:1fr}
  .round-record-actions{align-items:stretch;flex-direction:column}
  .round-status-select{width:100%}
}

/* ============================================================
   Upcoming Survey Site Map disclosure
   ============================================================ */

.site-map-disclosure {
  margin-top: 8px;
  max-width: 520px;
}

.site-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
  background: #f4f8f5;
  color: #214c34;
  padding: 6px 9px;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.site-map-toggle:hover,
.site-map-toggle:focus-visible {
  background: #eaf4ed;
  border-color: #8fac98;
  outline: none;
}

.site-map-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.site-map-panel {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #d7e2da;
  border-radius: 10px;
  background: #fbfdfb;
}

.site-map-meta {
  margin: 0 0 7px;
  color: #617068;
  font-size: .82rem;
}

.site-map-canvas {
  width: 100%;
  height: 270px;
  border-radius: 8px;
  overflow: hidden;
  background: #edf2ef;
}

.site-map-open-link {
  display: inline-block;
  margin-top: 7px;
  color: #145f3b;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}

.site-map-open-link:hover,
.site-map-open-link:focus-visible {
  text-decoration: underline;
}

.site-map-error {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 18px;
  color: #68776e;
  text-align: center;
}

.embedded-schedule .site-map-panel {
  background: #ffffff;
}

@media (max-width: 600px) {
  .site-map-disclosure {
    max-width: none;
  }

  .site-map-canvas {
    height: 320px;
  }

  .site-map-toggle {
    padding: 8px 10px;
  }
}


/* Site-specific Volunteer Portal link */
.volunteer-signup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border: 1px solid #19623d;
  border-radius: 8px;
  background: #19623d;
  color: #ffffff;
  padding: 7px 10px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.volunteer-signup-link:hover,
.volunteer-signup-link:focus-visible {
  background: #124c30;
  border-color: #124c30;
  color: #ffffff;
  outline: 2px solid #8fbea0;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .volunteer-signup-link {
    padding: 9px 11px;
  }
}


/* ============================================================
   Full-width map row in Upcoming Surveys
   ============================================================ */

.survey-site-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.survey-site-actions .site-map-toggle,
.survey-site-actions .volunteer-signup-link {
  margin: 0;
}

.site-map-table-row > td {
  padding: 0 10px 16px;
  border-bottom: 1px solid #e4ebe6;
}

.survey-main-row:has(+ .site-map-table-row:not(.hidden)) > td {
  border-bottom: 0;
}

.site-map-full-panel {
  width: 100%;
  padding: 12px;
  border: 1px solid #d7e2da;
  border-radius: 10px;
  background: #fbfdfb;
}

.site-map-canvas-full {
  width: 100%;
  height: 340px;
  min-width: 0;
}

.embedded-schedule .site-map-canvas-full {
  height: 320px;
}

@media (max-width: 600px) {
  .site-map-canvas-full {
    height: 360px;
  }

  .site-map-table-row > td {
    padding-left: 0;
    padding-right: 0;
  }
}


/* ============================================================
   Survey View map pin — latest live FreshWater Watch assessment
   Data source: queens-park-canal-map/freshwater.csv
   ============================================================ */

.water-result-map-pin-wrapper {
  background: transparent !important;
  border: 0 !important;
}

.water-result-map-pin {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.water-result-map-pin span {
  position: absolute;
  width: 8px;
  height: 8px;
  left: 8px;
  top: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
}

/* Existing Canal Watch assessment colours */
.water-result-map-pin.excellent { background: #006400; }
.water-result-map-pin.good { background: #00a86b; }
.water-result-map-pin.fair { background: #ffd966; }
.water-result-map-pin.poor { background: #f4b183; }
.water-result-map-pin.very-poor { background: #c00000; }
.water-result-map-pin.unrated { background: #777777; }

.map-water-result-label {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
}


.map-water-result-date {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  color: #5f6f64;
}


.map-water-result-source {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  color: #7a857e;
}
