/* Candidate discovery: a bounded survey of the road network, its measured facts, and the promotion
   step into the ordinary candidate workflow. Restrained on purpose: no scores, no heat colours. */
.discovery-panel .discovery-body{padding:1rem 1.15rem}
.discovery-controls{display:flex;flex-wrap:wrap;align-items:end;gap:.75rem}
.discovery-controls .primary-button{flex:none}
.discovery-area{margin:0;color:#4c6458;font-size:.83rem}
.discovery-status{margin:0;color:#4c6458;font-size:.8rem}
.discovery-error{margin:.6rem 0 0;color:#8a3324;font-size:.82rem}
.discovery-coverage{margin-top:.9rem;padding:.7rem .85rem;border:1px solid #d2dbd0;border-left-width:4px;border-radius:6px;background:#f7f8f3}
.discovery-coverage.ok{border-left-color:#4d7f5b}
.discovery-coverage.caution{border-left-color:#b5852a}
.discovery-coverage p{margin:.3rem 0 0}
.discovery-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:end;gap:.75rem;margin-top:1rem}
.discovery-filters{display:flex;flex-wrap:wrap;gap:.6rem .9rem;align-items:end}
.discovery-field{display:flex;flex-direction:column;gap:.25rem;font-size:.72rem;letter-spacing:.03em;text-transform:uppercase;color:#5b6d61}
.discovery-field span{font-size:.72rem}
.discovery-input,.discovery-select{font:inherit;font-size:.85rem;text-transform:none;letter-spacing:0;padding:.3rem .4rem;border:1px solid #c8d3c6;border-radius:4px;background:#fff;color:#22322c;min-width:6.5rem}
.discovery-check{display:flex;align-items:center;gap:.35rem;font-size:.78rem;text-transform:none;letter-spacing:0;color:#33463d}
.discovery-count{margin:0;font-size:.8rem;color:#4c6458}
.discovery-table-wrap{margin-top:.75rem;max-height:420px;overflow:auto;border:1px solid #dce3d9;border-radius:6px}
.discovery-table{width:100%;border-collapse:collapse;font-size:.82rem}
.discovery-table th,.discovery-table td{padding:.45rem .6rem;text-align:left;border-bottom:1px solid #eef2ea;vertical-align:top;white-space:nowrap}
.discovery-table thead th{position:sticky;top:0;background:#f4f7f1;font-size:.68rem;letter-spacing:.05em;text-transform:uppercase;color:#4b5f54}
.discovery-table tr.selected{background:#eef4ea}
.discovery-table tr.promoted td:last-child{color:#2f6a43;font-weight:500}
.discovery-table tr.dismissed{color:#7b857d}
.discovery-row{font:inherit;font-weight:500;background:none;border:0;padding:0;color:#1c3b2c;cursor:pointer;text-align:left}
.discovery-row:hover{text-decoration:underline}
.discovery-table td small{display:block;color:#6b7a70;font-weight:400}
.discovery-note{margin:.5rem 0 0;font-size:.75rem;color:#63746a}
.discovery-selected{margin-top:1rem;padding:.85rem 1rem;border:1px solid #d2dbd0;border-radius:6px;background:#fbfcf8}
.discovery-selected h3{margin:.15rem 0 .6rem;font-size:1rem}
.discovery-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:.2rem .9rem}
.discovery-facts>div{display:flex;gap:.4rem;font-size:.78rem;border-bottom:1px solid #eef2ea;padding:.15rem 0}
.discovery-facts dt{color:#5b6d61;flex:none}
.discovery-facts dd{margin:0;color:#22322c}
.discovery-coverage-list{margin-top:.6rem}
.discovery-not-run{margin-top:.6rem;color:#5b6d61}
.discovery-not-run p{margin:.15rem 0}
.discovery-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}
.discovery-eligible{margin:.5rem 0 0;font-size:.74rem;color:#63746a}
/* Interactive search: a centre a person chose and a radius they chose. The controls stay ordinary form
   controls, and the coverage line states the FULL/PARTIAL/NONE answer in words as well as in colour. */
.discovery-search{display:flex;flex-direction:column;gap:.6rem;margin:.85rem 0 .1rem;padding:.8rem .85rem;border:1px solid #d2dbd0;border-radius:6px;background:#fbfcf8;flex:1 1 100%;min-width:0}
.discovery-coverage-status p{margin:0}
.discovery-coverage-status{padding-left:.6rem;border-left:3px solid #c8d3c6}
.discovery-coverage-status .discovery-coverage-line{font-weight:600;color:#22322c}
.discovery-coverage-status .discovery-coverage-line.full{border-left-color:#4d7f5b;color:#2f6a43}
.discovery-coverage-status .discovery-coverage-line.partial{color:#785222}
.discovery-coverage-status .discovery-coverage-line.none{color:#8a3324}
.discovery-coverage-status .discovery-coverage-line.full{color:#2f6a43}
.discovery-search-fields{margin:0}
.discovery-search-row{display:flex;flex-wrap:wrap;gap:.6rem .9rem;align-items:end}
.discovery-search-row .discovery-input{min-width:7.5rem}
.discovery-radius-row{display:flex;flex-wrap:wrap;gap:.5rem .7rem;align-items:center}
.discovery-range{width:min(220px,100%);flex:1 1 140px;accent-color:#205646;margin:0}
.discovery-radius-value{font-size:.82rem;font-weight:600;color:#22322c;text-transform:none;letter-spacing:0}
.discovery-presets{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}
.discovery-presets .eyebrow{margin:0 .2rem 0 0}
.discovery-presets .quiet-button{padding:.34rem .5rem;font-size:.76rem}
.discovery-summary{margin:.55rem 0 0;padding:.5rem .6rem;border:1px solid #dce3d9;border-radius:5px;background:#fff}
.discovery-summary p{margin:.25rem 0 0}
/* Find a place: a local, bounded lookup. The list sits under its field, never over the whole panel. */
.discovery-place{position:relative;display:flex;flex-direction:column;gap:.3rem}
.discovery-location{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .8rem}
.discovery-location .discovery-status{margin:0;flex:1 1 16rem;font-size:.78rem;color:#4b5c51}
.discovery-location-note{flex:1 1 100%;margin:0}
.discovery-place .discovery-field{max-width:22rem}
.discovery-place-results{position:absolute;z-index:5;top:100%;left:0;right:0;margin:0;padding:.2rem 0;list-style:none;max-height:15rem;overflow:auto;background:#fff;border:1px solid #c8d3c6;border-radius:5px;box-shadow:0 8px 20px #13231f1f}
.discovery-place-option{display:flex;justify-content:space-between;align-items:baseline;gap:.6rem;padding:.4rem .6rem;cursor:pointer;font-size:.86rem}
.discovery-place-option.active,.discovery-place-option:hover{background:#eef4ea}
.discovery-place-option[aria-selected="true"]{outline:2px solid #205646;outline-offset:-2px}
.discovery-place-name{font-weight:600;color:#1c3b2c}
.discovery-place-detail{color:#4a5b52}
.discovery-place-type{font-size:.72rem;color:#5b6d61;white-space:nowrap}
@media(max-width:700px){.discovery-panel .discovery-body{padding:.85rem}.discovery-filters{flex-direction:column;align-items:stretch}.discovery-input,.discovery-select{width:100%}.discovery-table-wrap{max-height:none}.discovery-table th:nth-child(6),.discovery-table td:nth-child(6){display:none}.discovery-search{padding:.7rem}.discovery-search-row,.discovery-radius-row{flex-direction:column;align-items:stretch}.discovery-range{width:100%}.discovery-place .discovery-field{max-width:none}.discovery-place-results{max-height:12rem}}
/* The line the panel names: the place a person chose, the nearest published place, or the coordinates. */
.discovery-center-label{font-weight:600;color:#22322c}

/* RECOMMENDATIONS FIRST, THE WORKBENCH SECOND.
   The answer a person came for: five ranked cards built from the measurements the run already made. Mobile-first, because
   this is the screen someone reads standing next to a car: one column, tappable actions, no metric grid, no overflow. */
.discovery-recommendations{margin:1rem 0 .2rem;display:grid;gap:.55rem}
.discovery-recommendations-head{display:flex;flex-direction:column;gap:.15rem}
.discovery-recommendations-head h3{margin:0;font-size:1.12rem}
.discovery-recommendations-head .eyebrow{margin-bottom:0}
.recommendations-note{margin:0;max-width:60rem}
.recommendations-sort-note{margin:0;color:#7a5a2b}
.recommendation-list{list-style:none;padding:0;margin:.35rem 0 0;display:grid;gap:.7rem}
.recommendation{border:1px solid #c8d3c6;border-radius:7px;background:#fffef9;padding:.8rem .9rem;display:grid;gap:.4rem;min-width:0;overflow-wrap:anywhere}
/* THE BEST OVERALL CARD IS NOT ONE OF FIVE EQUAL THINGS: it carries the rank in its own edge, and the reason is stated in
   words as well as in weight, so the emphasis survives a black-and-white screen or a colour-blind reader. */
.recommendation.best{border-color:#205646;border-left:5px solid #205646;background:#f5faf2}
.recommendation.selected{border-color:#b45309;box-shadow:inset 0 0 0 1px #b45309}
.recommendation-rank{margin:0;font:700 .7rem/1.4 ui-monospace,SFMono-Regular,monospace;letter-spacing:.12em;text-transform:uppercase;color:#527364}
.recommendation.best .recommendation-rank{color:#205646}
.recommendation-name{font:inherit;font-family:Georgia,"Times New Roman",serif;font-size:1.06rem;font-weight:600;background:none;border:0;padding:.15rem 0;min-height:1.75rem;color:#1c3b2c;cursor:pointer;text-align:left}
.recommendation-name:hover{text-decoration:underline}
.recommendation-label{margin:0;font-size:.95rem;font-weight:700;color:#205646}
.recommendation-reasons{margin:0;padding-left:1.05rem;display:grid;gap:.15rem;font-size:.85rem;color:#3c5245}
.recommendation-facts{margin:0;font-size:.78rem;color:#527364}
.recommendation-note{margin:0;font-size:.78rem;color:#7a5a2b}
.recommendation-caution{margin:0;font-size:.78rem;color:#8a5a2b}
.recommendation-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.15rem}
.recommendation-actions button{flex:1 1 8rem;min-height:2.5rem}
@media(min-width:900px){.recommendation-list{grid-template-columns:repeat(auto-fill,minmax(20rem,1fr))}}
/* THE BOUNDARY: a heading, not a hidden drawer. Everything below it is exactly what was there before. */
.discovery-advanced{margin:1.5rem 0 .2rem;padding-top:1rem;border-top:1px solid #dce3d9}
.discovery-advanced h3{margin:0;font-size:1.06rem}
.discovery-advanced-note{margin:.25rem 0 0;max-width:60rem}

/* PROGRESSIVE DISCLOSURE: WHERE TO SEARCH FIRST, EVERYTHING ELSE ON REQUEST.
   The ordinary path is a place, this device's location, and one button. The technical half of choosing where - and the
   whole workbench - are real <details> disclosures, so collapsed content is absent from the tab order rather than hidden. */
.discovery-primary{display:grid;gap:.6rem}
.discovery-primary-row{display:grid;gap:.5rem;grid-template-columns:minmax(0,1fr) auto;align-items:start}
.discovery-primary-row .discovery-place{margin:0}
.discovery-primary-row .discovery-location{margin:0;display:grid;gap:.3rem}
.discovery-primary-row .discovery-location .quiet-button{width:100%;min-height:2.75rem;white-space:nowrap}
/* The note about what asking for a location costs belongs to the row, not to one column of it. */
.discovery-primary-row .discovery-location .discovery-location-note,
.discovery-primary-row .discovery-location .discovery-status{grid-column:1 / -1}
@media(max-width:360px){.discovery-primary-row{grid-template-columns:1fr}}
.discovery-search-context{display:flex;flex-wrap:wrap;gap:.15rem .5rem;align-items:baseline}
.discovery-search-context p{margin:0}
.discovery-primary .discovery-presets{margin:0}
.discovery-primary .discovery-presets .quiet-button{min-height:2.5rem}
.discovery-search-assumption{margin:0}
.discovery-find{width:100%;min-height:3rem;font-size:1.02rem}
@media(min-width:700px){.discovery-primary-row{grid-template-columns:minmax(0,1fr) auto;align-items:end}
.discovery-primary-row .discovery-location .quiet-button{width:auto;padding-left:1rem;padding-right:1rem}}
.discovery-search-status-block:empty{display:none}
.discovery-coverage-note{margin:.6rem 0 0;padding:.6rem .8rem;border:1px solid #d9b48a;border-left:4px solid #bd7b36;border-radius:5px;background:#fdf6ec;color:#6a4212;font-size:.84rem}
.discovery-disclosure{margin:.9rem 0 0;border:1px solid #dce3d9;border-radius:6px;background:#fbfcf8}
.discovery-disclosure-summary{display:flex;align-items:center;gap:.5rem;padding:.7rem .9rem;cursor:pointer;font-weight:600;color:#25473b;list-style:none;min-height:2.75rem}
.discovery-disclosure-summary::-webkit-details-marker{display:none}
.discovery-disclosure-summary::after{content:'▾';margin-left:auto;color:#6e8075;font-size:.9rem}
.discovery-disclosure[open] .discovery-disclosure-summary::after{content:'▴'}
.discovery-disclosure-summary:hover{background:#f1f5ee}
.discovery-disclosure-note{margin:0;padding:0 .9rem .6rem}
.discovery-disclosure > *:not(summary):not(.discovery-disclosure-note){margin-left:.9rem;margin-right:.9rem}
/* THE DISPLAY RULE IS SCOPED TO [open], ON PURPOSE: a class selector that forced `display` on the content of a closed
   <details> would override the user agent's own hiding and leave collapsed controls on screen and in the tab order. */
.discovery-disclosure[open] > .discovery-advanced-search-body,
.discovery-disclosure[open] > .discovery-advanced-body{display:grid;gap:.8rem;padding-bottom:.9rem;min-width:0}
.discovery-advanced-body .discovery-coverage,.discovery-advanced-body .discovery-summary{margin-top:0}
.discovery-diagnostics{margin-top:.9rem;padding:.7rem .85rem;border:1px solid #d2dbd0;border-left-width:4px;border-radius:6px;background:#f7f8f3}
.discovery-diagnostics p{margin:.3rem 0 0}
.discovery-search-summary{margin:.6rem 0 0;color:#4c6458}
.recommendations-found{margin:.15rem 0 0}
.recommendations-explainer{margin:.3rem 0 0;max-width:62rem}
.recommendations-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:start;margin:.5rem 0 0}
.recommendations-actions .recommendations-how{margin:0}
.recommendations-how .recommendations-note{margin:0;padding:.4rem .9rem .7rem}
.recommendations-caveat{margin:.5rem 0 0;max-width:62rem;color:#6a4212}
@media(max-width:700px){.recommendations-actions{flex-direction:column;align-items:stretch}.recommendations-actions .recommendations-change{min-height:2.5rem}.recommendations-how{width:100%}}

/* THE SEARCH SURFACE AFTER IT HAS DONE ITS JOB: one statement of what was searched, and one way back to the controls.
   It replaces the whole ordinary form, so the answer sits where the form was. */
.discovery-compact{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.15rem .6rem;align-items:center;padding:.6rem .8rem;border:1px solid #dce3d9;border-radius:6px;background:#f7f9f4}
.discovery-compact-line{margin:0;font-size:1rem;color:#25473b}
.discovery-compact-facts{margin:0;color:#526b5d}
.discovery-compact .quiet-button{grid-column:2;grid-row:1 / span 2;min-height:2.5rem;white-space:nowrap}
@media(max-width:330px){.discovery-compact{grid-template-columns:1fr}.discovery-compact .quiet-button{grid-column:1;grid-row:auto;width:100%;margin-top:.35rem}}
.discovery-change-body{display:grid;gap:.8rem;padding-bottom:.9rem}
.discovery-change-body .discovery-primary{margin-top:.9rem}
