:root {
  color-scheme: light;
  --ink: #173126;
  --muted: #60736a;
  --paper: #fbfaf3;
  --surface: #fffef9;
  --wash: #e7eee4;
  --line: #cbd7cd;
  --green: #246447;
  --green-dark: #194c35;
  --amber: #a96e17;
  --red: #a13c39;
  --blue: #315c76;
  --shadow: 0 18px 50px rgba(25, 55, 40, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(78, 130, 85, 0.18), transparent 32rem),
    linear-gradient(180deg, #f5f2e7 0%, #eef1e9 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select {
  min-height: 44px;
  border-radius: 10px;
}

button {
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(49, 92, 118, 0.3);
  outline-offset: 2px;
}

code,
pre,
textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.page {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.card {
  border: 1px solid rgba(166, 184, 169, 0.7);
  border-radius: 20px;
  background: rgba(255, 254, 249, 0.94);
  box-shadow: var(--shadow);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 12px 10px 18px;
  border-radius: 14px;
}

.brand {
  color: var(--ink);
  font-weight: 950;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--green-dark);
  background: var(--wash);
}

.nav-links a[aria-current="page"] {
  color: white;
  background: var(--green);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding: clamp(26px, 5vw, 52px);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 800px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.runtime {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 185px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(169, 110, 23, 0.13);
}

.status-dot.ready {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(36, 100, 71, 0.13);
}

.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(161, 60, 57, 0.13);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
  margin-top: 22px;
}

.query-panel,
.result-panel,
.data-card,
.browser-lab {
  padding: 26px;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.safe-badge,
.feedback-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.safe-badge {
  color: var(--green-dark);
  background: #dcebdd;
}

.feedback-badge.idle {
  color: #53635b;
  background: #e5e9e4;
}

.feedback-badge.loading {
  color: #805510;
  background: #f6e8c9;
}

.feedback-badge.success {
  color: var(--green-dark);
  background: #dcebdd;
}

.feedback-badge.error {
  color: #7f2f2d;
  background: #f4dedd;
}

label {
  display: block;
  margin: 16px 0 7px;
  font-size: 0.88rem;
  font-weight: 850;
}

.input-hint,
.section-copy {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #afc0b2;
  color: var(--ink);
  background: white;
}

input[aria-invalid="true"] {
  border-color: var(--red);
}

.field-error {
  min-height: 1.25rem;
  margin: 5px 0 0;
  color: var(--red);
  font-size: 0.82rem;
}

.primary {
  color: white;
  background: var(--green);
}

.primary:hover:not(:disabled) {
  background: var(--green-dark);
}

#runQueryButton {
  width: 100%;
  margin-top: 18px;
}

.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.mode-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 850;
}

.mode-picker label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
}

.mode-picker label:has(input:checked) {
  border-color: var(--green);
  color: var(--green-dark);
  background: #e8f2e8;
}

.mode-picker input {
  width: auto;
  min-height: auto;
  margin: 0;
  accent-color: var(--green);
}

.lookup-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 10px;
}

.lookup-grid label {
  margin-top: 0;
}

.lookup-button {
  width: 100%;
  margin-top: 10px;
}

.lookup-feedback {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 9px;
  color: var(--muted);
  background: #f1f3ed;
  font-size: 0.78rem;
  line-height: 1.45;
}

.lookup-feedback.loading {
  color: #805510;
  background: #fcf4e2;
}

.lookup-feedback.success {
  color: var(--green-dark);
  background: #e8f3e9;
}

.lookup-feedback.error {
  color: #762e2b;
  background: #fae9e8;
}

.survey-choices {
  display: grid;
  gap: 7px;
  max-height: 230px;
  margin-top: 9px;
  overflow: auto;
}

.survey-choice {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 0;
  padding: 10px 11px;
  border-color: var(--line);
  color: var(--ink);
  background: white;
  text-align: left;
}

.survey-choice:hover,
.survey-choice.selected {
  border-color: var(--green);
  background: #edf5ed;
}

.survey-choice strong {
  color: var(--green-dark);
  font-size: 0.82rem;
}

.survey-choice span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
}

.selected-survey {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 9px;
  align-items: baseline;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}

.selected-survey .metric-label {
  grid-column: 1 / -1;
}

.selected-survey strong {
  color: var(--green-dark);
}

.selected-survey > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: white;
}

.flow {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 800;
}

.flow span {
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--wash);
}

.callout {
  margin-top: 18px;
  padding: 15px;
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
  color: #3b5147;
  background: #edf3f5;
  font-size: 0.84rem;
  line-height: 1.5;
}

.callout p {
  margin: 5px 0 0;
}

.feedback {
  min-height: 64px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #43574e;
  background: #f5f6f1;
  line-height: 1.45;
}

.feedback.loading {
  border-color: #dfc78f;
  background: #fcf6e8;
}

.feedback.success {
  border-color: #9ebda5;
  background: #edf7ee;
}

.feedback.error {
  border-color: #d7a7a5;
  color: #762e2b;
  background: #fcf0ef;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.metric strong {
  display: block;
  overflow: hidden;
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.data-card,
.browser-lab {
  margin-top: 22px;
}

.empty-state {
  padding: 50px 20px;
  border: 1px dashed #b6c4b8;
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
  background: #fafaf5;
}

.table-wrap {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  max-width: 250px;
  padding: 10px 12px;
  overflow: hidden;
  border-bottom: 1px solid #dce3dc;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: white;
  background: var(--green-dark);
}

tbody tr:nth-child(even) {
  background: #f5f7f1;
}

.query-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f6f7f2;
}

summary {
  padding: 13px 15px;
  cursor: pointer;
  font-weight: 800;
}

.query-details pre,
.console,
textarea {
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 0;
  color: #e5f2e8;
  background: #14241b;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.query-details pre + pre {
  border-top: 1px solid #3b4d42;
}

.lab-heading {
  align-items: center;
}

.section-copy {
  max-width: 780px;
  margin: 8px 0 0;
}

.r-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

textarea,
.console {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  resize: vertical;
}

.compact {
  margin-top: 10px;
}

footer {
  padding: 26px 12px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.use-case-hero {
  padding: clamp(30px, 6vw, 64px);
}

.use-case-hero h1 {
  max-width: 900px;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.category-links a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.category-links a:hover {
  border-color: var(--green);
  background: #eaf3e9;
}

.insight-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 22px;
  color: #eaf3ec;
  background: var(--green-dark);
}

.insight-number {
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.insight-strip p {
  margin: 4px 0 0;
  color: #c5d9cb;
  font-size: 0.8rem;
  line-height: 1.5;
}

.insight-strip a {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: white;
  font-size: 0.74rem;
  font-weight: 850;
  text-decoration: none;
}

.insight-strip a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.use-case-section {
  margin-top: 42px;
}

.collection-heading {
  display: flex;
  gap: 28px;
  align-items: end;
  justify-content: space-between;
  margin: 0 4px 18px;
}

.collection-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: right;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.use-case-card {
  display: flex;
  min-height: 440px;
  padding: 23px;
  flex-direction: column;
}

.featured-card {
  border-color: #9ab6a0;
  background:
    linear-gradient(145deg, rgba(230, 241, 228, 0.8), transparent 48%),
    var(--surface);
}

.priority-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.priority-card {
  border-top: 4px solid var(--blue);
}

.discovery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.use-case-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
}

.water-icon {
  background: #315f79;
}

.wet-icon,
.climate-icon {
  background: #3b7182;
}

.garden-icon,
.farm-icon,
.habitat-icon {
  background: #456c3f;
}

.home-icon,
.septic-icon {
  background: #775b37;
}

.profile-icon,
.story-icon,
.trail-icon {
  background: #5e5273;
}

.availability {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.availability.available {
  color: var(--green-dark);
  background: #dcebdd;
}

.availability.next {
  color: #1f526d;
  background: #dcebf1;
}

.availability.planned {
  color: #6a5b3d;
  background: #eee8da;
}

.use-case-card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.tile-kicker {
  margin: 0 0 6px !important;
  color: var(--green) !important;
  font-size: 0.68rem !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.use-case-card > p {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.tile-reveals {
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  color: #43574e;
  font-size: 0.78rem;
  line-height: 1.35;
  list-style: none;
}

.tile-reveals li {
  position: relative;
  padding-left: 16px;
}

.tile-reveals li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "•";
  font-weight: 950;
}

.use-case-card dl {
  margin: auto 0 20px;
  border-top: 1px solid var(--line);
}

.use-case-card dl div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.77rem;
}

.use-case-card dt {
  color: var(--muted);
  font-weight: 700;
}

.use-case-card dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

.card-link {
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.card-link:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.planned-section .use-case-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planned-section .use-case-card {
  min-height: 340px;
  box-shadow: 0 10px 32px rgba(25, 55, 40, 0.07);
}

.use-case-cta {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 42px;
  padding: 28px;
  color: white;
  background: var(--green-dark);
}

.use-case-cta .eyebrow {
  color: #a8d2b5;
}

.use-case-cta p:last-child {
  margin: 7px 0 0;
  color: #c8dbce;
}

.interpretation-note {
  margin: 18px auto 0;
  padding: 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.interpretation-note strong {
  color: var(--ink);
}

.compare-hero {
  padding: clamp(30px, 6vw, 64px);
}

.compare-hero h1 {
  max-width: 860px;
}

.compare-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 20px;
}

.place-picker {
  padding: 24px;
}

.place-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 18px;
}

.place-heading .eyebrow {
  margin-bottom: 3px;
}

.place-heading h2 {
  font-size: 1.15rem;
}

.place-letter {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--green);
  font-weight: 950;
}

.place-letter.alternate {
  background: var(--blue);
}

.place-lookup {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.place-lookup summary {
  padding: 13px 0 3px;
  color: var(--green-dark);
  font-size: 0.8rem;
}

.place-lookup .lookup-grid {
  margin-top: 12px;
}

.versus {
  display: grid;
  width: 40px;
  height: 40px;
  margin-top: 78px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.compare-submit {
  display: flex;
  grid-column: 1 / -1;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 5px 0 0;
}

.compare-submit p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.compare-output {
  margin-top: 20px;
  padding: 26px;
}

#comparisonResults {
  margin-top: 22px;
}

.comparison-headings,
.comparison-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(130px, 1fr) minmax(130px, 1fr);
}

.comparison-headings {
  gap: 1px;
  margin-bottom: 6px;
}

.comparison-place {
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  color: white;
}

.comparison-place.left {
  border-radius: 10px 0 0 10px;
  background: var(--green);
}

.comparison-place.right {
  border-radius: 0 10px 10px 0;
  background: var(--blue);
}

.comparison-place span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.comparison-row {
  border-bottom: 1px solid var(--line);
}

.comparison-row:nth-child(odd) {
  background: #f5f7f2;
}

.comparison-label,
.comparison-value {
  padding: 11px 13px;
  font-size: 0.8rem;
}

.comparison-label {
  color: var(--muted);
  font-weight: 750;
}

.comparison-value {
  font-weight: 900;
}

.comparison-value.left {
  color: var(--green-dark);
}

.comparison-value.right {
  color: var(--blue);
}

.characteristic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.characteristic-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.characteristic-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.characteristic-values strong {
  padding: 9px;
  border-radius: 8px;
  background: var(--wash);
  font-size: 0.78rem;
  line-height: 1.4;
}

.characteristic-values strong:last-child {
  background: #e6eef2;
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.secondary-link {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.secondary-link:hover {
  border-color: var(--green);
  background: var(--wash);
}

.method-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f6f7f2;
}

.method-details p {
  margin: 0;
  padding: 0 15px 13px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.button-link {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 10px;
  color: var(--green-dark);
  background: white;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.button-link:hover {
  background: #eaf2e9;
}

.water-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 40px;
  align-items: center;
  padding: clamp(30px, 6vw, 64px);
  background:
    radial-gradient(circle at 90% 20%, rgba(77, 145, 170, 0.2), transparent 18rem),
    rgba(255, 254, 249, 0.94);
}

.water-cycle {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 24px;
  border: 1px solid #b9d0d8;
  border-radius: 18px;
  color: var(--blue);
  background: rgba(235, 244, 246, 0.88);
  font-weight: 900;
}

.water-cycle > span {
  padding: 7px 13px;
  border-radius: 999px;
  background: white;
}

.water-cycle b {
  font-size: 1.3rem;
}

.water-cycle div {
  display: flex;
  gap: 22px;
  font-size: 0.7rem;
}

.water-cycle em {
  font-style: normal;
}

.water-layout {
  display: grid;
  grid-template-columns: minmax(275px, 0.65fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.water-picker,
.water-output {
  padding: 26px;
}

.water-picker {
  position: sticky;
  top: 14px;
}

.water-submit {
  width: 100%;
  margin-top: 20px;
}

.screening-note {
  margin: 12px 3px 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.water-narrative {
  margin-top: 18px;
  padding: 21px;
  border-left: 5px solid var(--blue);
  border-radius: 0 14px 14px 0;
  background: #edf4f6;
}

.water-narrative h3 {
  margin: 7px 0;
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  letter-spacing: -0.025em;
}

.water-narrative p {
  margin: 0;
  color: #415b66;
  line-height: 1.6;
}

.water-section {
  margin-top: 26px;
}

.water-section-heading {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 13px;
}

.water-section-heading h3 {
  margin: 0;
  font-size: 1.18rem;
}

.water-section-heading > span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
}

.group-distribution {
  display: grid;
  gap: 9px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.group-row {
  display: grid;
  grid-template-columns: 82px minmax(80px, 1fr) 72px;
  gap: 10px;
  align-items: center;
  font-size: 0.75rem;
}

.group-row > strong {
  color: var(--green-dark);
}

.group-row > span:last-child {
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}

.group-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7e0;
}

.group-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b8ba1, var(--green));
}

.water-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.water-metric {
  min-width: 0;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f3;
}

.water-metric strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.water-metric small {
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.group-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.group-guide-card {
  display: flex;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.group-letter {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
}

.group-b .group-letter {
  background: #4f7f65;
}

.group-c .group-letter {
  background: #9b792b;
}

.group-d .group-letter {
  background: #8f5044;
}

.group-guide-card h4 {
  margin: 0 0 2px;
  font-size: 0.86rem;
}

.group-guide-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.group-guide-card p,
.dual-group-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.dual-group-note {
  padding: 10px 13px;
  border-radius: 9px;
  background: var(--wash);
}

.water-records {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f7f2;
}

.water-records summary,
.method-details summary {
  padding: 14px 15px;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
}

.water-records .table-wrap {
  max-height: 430px;
  margin: 0 12px 12px;
  background: white;
}

.method-details a {
  color: var(--green-dark);
}

.wet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 34px;
  align-items: center;
  padding: clamp(30px, 6vw, 64px);
  background:
    radial-gradient(circle at 93% 12%, rgba(68, 118, 126, 0.22), transparent 20rem),
    rgba(255, 254, 249, 0.94);
}

.wet-hero-clues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wet-hero-clues span {
  display: grid;
  min-height: 78px;
  padding: 12px;
  place-items: center;
  border: 1px solid #aec9ca;
  border-radius: 50% 50% 44% 56%;
  color: #285b61;
  background: rgba(232, 244, 243, 0.9);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.wetland-warning {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-top: 16px;
  padding: 16px 20px;
  border-color: #d7bd88;
  color: #67470e;
  background: #fff8e8;
  box-shadow: 0 10px 28px rgba(74, 54, 19, 0.06);
}

.wetland-warning strong {
  flex: 0 0 auto;
}

.wetland-warning span {
  color: #765d2d;
  font-size: 0.8rem;
  line-height: 1.5;
}

.wet-narrative {
  border-left-color: #4a7f81;
  background: #eaf3f1;
}

.wet-distribution .group-row {
  grid-template-columns: minmax(180px, 0.8fr) minmax(100px, 1fr) 72px;
}

.wet-band-none {
  background: #aab9af;
}

.wet-band-some {
  background: #69a3a0;
}

.wet-band-majority {
  background: #39777b;
}

.wet-band-all {
  background: #1f5963;
}

.wet-clue-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wet-clue-guide article {
  padding: 16px;
  border: 1px solid #b8ceca;
  border-radius: 12px;
  background: #f1f7f5;
}

.wet-clue-guide strong {
  color: #285b61;
  font-size: 0.88rem;
}

.wet-clue-guide p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hero,
  .workspace,
  .r-grid {
    grid-template-columns: 1fr;
  }

  .runtime {
    width: fit-content;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .use-case-grid,
  .planned-section .use-case-grid,
  .priority-grid,
  .discovery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .compare-form {
    grid-template-columns: 1fr;
  }

  .water-hero,
  .wet-hero,
  .water-layout {
    grid-template-columns: 1fr;
  }

  .water-cycle {
    display: none;
  }

  .wet-hero-clues {
    max-width: 420px;
  }

  .water-picker {
    position: static;
  }

  .versus {
    margin: -5px auto;
  }

  .compare-submit {
    grid-column: auto;
  }
}

@media (max-width: 540px) {
  .page {
    width: min(100% - 20px, 1220px);
    padding-top: 10px;
  }

  .hero,
  .query-panel,
  .result-panel,
  .data-card,
  .browser-lab {
    padding: 20px;
    border-radius: 15px;
  }

  .section-heading,
  .lab-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }

  .lookup-grid,
  .mode-picker {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .collection-heading,
  .use-case-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    gap: 10px;
    padding: 14px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .collection-heading > p {
    text-align: left;
  }

  .use-case-grid,
  .planned-section .use-case-grid,
  .priority-grid,
  .discovery-grid {
    grid-template-columns: 1fr;
  }

  .insight-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .insight-strip a {
    grid-column: 1 / -1;
    text-align: center;
  }

  .compare-submit,
  .compare-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compare-submit button,
  .compare-actions > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .comparison-headings,
  .comparison-row {
    grid-template-columns: minmax(115px, 1.25fr) minmax(85px, 1fr) minmax(85px, 1fr);
  }

  .comparison-label,
  .comparison-value {
    padding: 9px 7px;
    font-size: 0.68rem;
  }

  .characteristic-grid {
    grid-template-columns: 1fr;
  }

  .water-picker,
  .water-output {
    padding: 20px;
  }

  .water-metrics,
  .group-guide,
  .wet-clue-guide {
    grid-template-columns: 1fr;
  }

  .water-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .wetland-warning {
    align-items: flex-start;
    flex-direction: column;
  }

  .wet-distribution .group-row {
    grid-template-columns: minmax(135px, 0.9fr) minmax(65px, 1fr) 62px;
  }
}
