/* Your Grid (/my-grid): an address lookup for residents. Extends explore.css. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The search: a big band under the header, compact once an address is showing. */
.finder { border-bottom: 1px solid var(--line); background: var(--panel); }
.finder-inner { max-width: 1440px; margin: 0 auto; padding: 36px 32px 28px; display: flex; flex-direction: column; gap: 8px; }
.finder h1 { font-size: 32px; line-height: 1.15; font-weight: 600; }
.finder p { margin: 0; }
.finder > .finder-inner > p.muted:first-of-type { font-size: 16px; }
#search { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-width: 900px; }
#search input {
  flex: 1 1 360px; min-width: 0; font: inherit; font-size: 17px; padding: 10px 14px; min-height: 48px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink);
}
#search .seg { min-height: 48px; font-size: 15px; padding: 8px 16px; }
/* Filters switch on and off independently, so they're separate pills, not a joined either/or. */
.group.chips { flex-wrap: wrap; gap: 6px; }
.group.chips .seg { flex: 0 1 auto; margin-left: 0; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.group.chips .seg[aria-pressed="true"] { background: var(--panel); border-color: var(--ink); color: var(--ink); font-weight: 600; }
.group.chips .seg[aria-pressed="false"] { color: var(--muted); }
@media (max-width: 480px) { .group.chips .seg { flex: 1 1 40%; } } /* two even rows, not a straggler */
.seg.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 600; }
.examples button { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; }
.matches { display: flex; flex-direction: column; gap: 4px; max-width: 900px; }
.matches p { font-size: 13px; }
.matches button {
  font: inherit; text-align: left; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.matches button:hover { border-color: var(--ink); }
.finder.compact .finder-inner { padding: 14px 32px; gap: 6px; }
.finder.compact h1, .finder.compact .finder-inner > p.muted:first-of-type, .finder.compact .privacy { display: none; }
.finder.compact #search { margin-top: 0; }

/* Results */
#view:empty { display: none; }
.lead .where { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.lead strong { font-weight: 700; }
.kpis .k-value.good { color: var(--good); }
.kpis .k-value.bad { color: var(--bad); }

.mapcard { gap: 10px; }
.mapcard .controls { gap: 8px 16px; }
#plantmap { height: min(640px, max(420px, calc(100vh - 330px))); border-radius: 8px; overflow: hidden; background: var(--bg); }
.mapkey { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); }
.mapkey span { display: inline-flex; align-items: center; gap: 6px; }
.mk { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.mk.run { background: var(--muted); }
.mk.plan { border: 3px solid var(--muted); background: var(--surface); }
.mk.retire { background: var(--muted); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.mk.gone { width: 9px; height: 9px; border: 2px solid var(--muted); opacity: .6; }
.mk.home { width: 14px; height: 14px; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.maplibregl-popup-content { background: var(--surface); color: var(--ink); font: 13px/1.35 system-ui, sans-serif; padding: 6px 10px; border-radius: 6px; box-shadow: 0 2px 10px rgb(0 0 0 / .2); }
.maplibregl-popup-tip { display: none; }

/* The plant card in the sidebar */
.plant-card { gap: 12px; }
.plant-card .kind { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.plant-card .kind i { width: 12px; height: 12px; border-radius: 50%; }
.plant-card h2 { font-size: 22px; line-height: 1.2; }
.plant-card .status { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--panel); }
.plant-card .status.plan { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.plant-card .status.retire, .plant-card .status.gone { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); }
.plant-card p { margin: 0; font-size: 14px; line-height: 1.5; }
.plant-card .explain { padding: 12px 14px; border-radius: 8px; background: var(--panel); font-size: 13px; }
.plant-card .close { align-self: flex-start; font-size: 13px; }
.nearlist { display: flex; flex-direction: column; }
.near-row {
  font: inherit; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 2px 10px; align-items: start;
  padding: 8px 4px; border: 0; border-bottom: 1px solid var(--faint); background: transparent; color: var(--ink); text-align: left; cursor: pointer;
}
.near-row:hover { background: var(--panel); }
.near-row i { width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; }
.near-row .nm { font-size: 14px; font-weight: 500; }
.near-row .meta { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
.near-row .v { font-size: 13px; text-align: right; white-space: nowrap; }

/* Mix rows: a plain-words list beside the bar */
.mixrows { display: flex; flex-direction: column; gap: 6px; }
.mixrow { display: grid; grid-template-columns: 12px minmax(0, 1fr) 48px; gap: 10px; align-items: baseline; font-size: 14px; }
.mixrow i { width: 12px; height: 12px; border-radius: 2px; align-self: center; }
.mixrow .v { text-align: right; font-weight: 600; }
.mixrow .d { grid-column: 2 / 4; font-size: 12px; color: var(--muted); margin-top: -4px; }
.twocol { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-top: 20px; }
.yearbars { width: 100%; height: auto; }
.utils { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.utils li { display: flex; justify-content: space-between; gap: 12px; }

@media (max-width: 760px) {
  .finder-inner, .finder.compact .finder-inner { padding-left: 16px; padding-right: 16px; }
  .finder h1 { font-size: 24px; }
  #search .seg { flex: 1 1 auto; }
  #plantmap { height: 420px; }
  .twocol { grid-template-columns: 1fr; }
}

/* The plant sheet (plant-sheet.js) in this page's palette. Same specificity as its dark-theme
   rules, and later, so these win in both themes. */
:root:not([data-ps-own-theme]) .ps-sheet, :root:not([data-ps-own-theme]) .ps-hover {
  --ps-card: var(--surface); --ps-text: var(--ink); --ps-muted: var(--muted); --ps-line: var(--line); --ps-track: var(--grid);
  --ps-accent: var(--accent); --ps-seg: color-mix(in srgb, var(--accent) 22%, var(--surface)); --ps-seg-text: var(--ink);
}
.ps-explain { padding: 10px 12px; border-radius: 8px; background: var(--panel); font-size: 13px; }
.near-row.on { background: var(--panel); outline: 2px solid var(--accent); outline-offset: -2px; }
