/* The Utah lot check: map, search and status card. Uses the host page's tokens (--paper, --panel,
 * --paper-dim, --ink, --ink-soft, --line, --radius-pill) and adds no colours of its own. */
.lc{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;}
.lc>*{min-width:0;}
@media (min-width:900px){.lc{grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr);align-items:start;}}
.lc-search{display:flex;gap:8px;grid-column:1/-1;}
.lc-search input{flex:1;min-width:0;font:inherit;font-size:16px;padding:14px 18px;border:1px solid var(--line);border-radius:var(--radius-pill);background:var(--paper);color:var(--ink);outline:none;}
.lc-search input:focus{border-color:var(--ink);}
.lc-btn{font:inherit;font-size:14px;font-weight:600;padding:14px 22px;border-radius:var(--radius-pill);border:1px solid var(--ink);background:var(--ink);color:var(--paper);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;}
.lc-btn:hover{opacity:.85;}
.lc-btn[disabled]{opacity:.5;cursor:default;}
.lc-btn.ghost{background:transparent;color:var(--ink);}
.lc-btn.ghost:hover{background:var(--ink);color:var(--paper);opacity:1;}
.lc-btn.cream{background:var(--panel);border-color:var(--panel);color:var(--ink);}

.lc-mapwrap{position:relative;border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--paper-dim);}
.lc-map{height:420px;}
.lc .lc-map.leaflet-container{background:var(--paper-dim);}
@media (min-width:900px){.lc-map{height:520px;}}
.lc.statewide .lc-map{height:62vh;min-height:420px;}
.lc-map .leaflet-control-attribution{background:rgba(255,255,255,.7);color:var(--ink-soft);font-size:10px;}
.lc-map .leaflet-control-attribution a{color:var(--ink-soft);}
.lc-map .leaflet-bar a{color:var(--ink);}
.lc-tools{position:absolute;left:12px;bottom:12px;z-index:500;display:flex;gap:6px;flex-wrap:wrap;}
.lc-tools select,.lc-tools button{font:inherit;font-size:12.5px;font-weight:600;padding:8px 12px;border-radius:var(--radius-pill);border:1px solid var(--line);background:var(--paper);color:var(--ink);cursor:pointer;}
.lc-fit{position:absolute;right:12px;top:12px;z-index:500;font-size:12px;font-weight:600;padding:6px 12px;border-radius:var(--radius-pill);background:var(--paper);border:1px solid var(--line);}
.lc-fit.out{background:var(--ink);color:var(--paper);border-color:var(--ink);}
.lc-legend{position:absolute;right:12px;bottom:12px;z-index:500;display:flex;gap:12px;font-size:11.5px;color:var(--ink-soft);background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:7px 11px;}
.lc-legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:5px;vertical-align:-1px;border:1px solid var(--ink-soft);}
.lc-legend .on{background:var(--ink);opacity:.55;}
.lc-legend .off{background:var(--paper);}

/* Map paint lives here, not in Leaflet options: SVG presentation attributes cannot read tokens. */
.lc-county{stroke:var(--ink-soft);stroke-opacity:.35;stroke-width:1;fill:var(--paper);fill-opacity:1;}
.lc-city{stroke:var(--ink-soft);stroke-opacity:.5;stroke-width:.6;fill:var(--ink-soft);fill-opacity:.12;}
.lc-city.on{fill:var(--ink);fill-opacity:.32;stroke:var(--ink);stroke-opacity:.5;}
.lc-ctx{stroke:var(--ink-soft);stroke-opacity:.45;stroke-width:1;fill:none;}
.lc-parcel{stroke:var(--ink);stroke-width:2.2;fill:var(--panel);fill-opacity:.9;}
.lc-foot{stroke:var(--ink);stroke-width:1.5;fill:var(--ink);fill-opacity:.78;cursor:grab;touch-action:none;}
.lc-foot.out{fill-opacity:.35;stroke-dasharray:4 3;}
.lc-foot:active{cursor:grabbing;}
.lc-pin{stroke:var(--paper);stroke-width:2;fill:var(--ink);}

.lc-card{border:1px solid var(--line);border-radius:20px;background:var(--paper);padding:22px;display:flex;flex-direction:column;gap:14px;}
.lc-card.idle{background:var(--panel);border-color:var(--panel);}
.lc-badge{align-self:flex-start;display:inline-flex;align-items:center;gap:7px;font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:6px 12px;border-radius:var(--radius-pill);border:1px solid var(--ink);color:var(--ink);background:var(--paper);}
.lc-badge.yes{background:var(--ink);color:var(--paper);}
.lc-badge.soft{border-color:var(--line);background:var(--panel);}
.lc-card h3{margin:0;font-size:21px;line-height:1.25;letter-spacing:-.01em;}
.lc-card p{margin:0;font-size:14px;line-height:1.55;color:var(--ink-soft);}
.lc-facts{margin:0;display:grid;grid-template-columns:auto 1fr;gap:7px 14px;font-size:13.5px;border-top:1px solid var(--line);padding-top:14px;}
.lc-facts dt{color:var(--ink-soft);}
.lc-facts dd{margin:0;color:var(--ink);font-weight:500;overflow-wrap:anywhere;}
.lc-rule{font-size:13px;line-height:1.5;background:var(--panel);border-radius:12px;padding:11px 13px;color:var(--ink);}
.lc-nd{font-size:13px;line-height:1.5;border:1px dashed var(--ink-soft);border-radius:12px;padding:11px 13px;}
.lc-nd strong{display:block;margin-bottom:2px;}
.lc-notes{margin:0;padding-left:18px;font-size:12px;line-height:1.5;color:var(--ink-soft);}
.lc-disclaimer{font-size:12px !important;border-top:1px solid var(--line);padding-top:12px;}
.lc-actions{display:flex;gap:8px;flex-wrap:wrap;}
.lc-actions .lc-btn{flex:1 1 auto;white-space:normal;text-align:center;}
.lc-loading{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--ink-soft);}
.lc-loading::before{content:"";width:14px;height:14px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--ink);animation:lc-spin .8s linear infinite;}
@keyframes lc-spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.lc-loading::before{animation:none;}}

/* Map / Aerial view. The drawn map is the default. Over imagery the lines go light and the fills
 * clear, so the ground shows through the lot. */
.lc-view{position:absolute;left:56px;top:12px;z-index:500;display:flex;padding:3px;gap:2px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-pill);}
.lc-view button{font:inherit;font-size:12.5px;font-weight:600;padding:6px 12px;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--ink-soft);cursor:pointer;}
.lc-view button[aria-pressed="true"]{background:var(--ink);color:var(--paper);}
.lc-aerial-wait{position:absolute;left:50%;top:56px;transform:translateX(-50%);z-index:500;font-size:12px;font-weight:600;padding:6px 12px;border-radius:var(--radius-pill);background:var(--paper);border:1px solid var(--line);color:var(--ink-soft);}
.lc-map.aerial .lc-county{fill-opacity:0;stroke:var(--paper);stroke-opacity:.7;}
.lc-map.aerial .lc-city{fill:var(--paper);fill-opacity:.08;stroke:var(--paper);stroke-opacity:.6;}
.lc-map.aerial .lc-city.on{fill:var(--paper);fill-opacity:.35;stroke-opacity:.9;}
.lc-map.aerial .lc-ctx{stroke:var(--paper);stroke-opacity:.6;}
.lc-map.aerial .lc-parcel{fill-opacity:0;stroke:var(--paper);stroke-width:2.6;}
.lc-map.aerial .lc-foot{stroke:var(--paper);stroke-width:2;fill-opacity:.7;}
.lc-map.aerial .lc-pin{fill:var(--paper);stroke:var(--ink);}

/* The statewide count. */
.lc-citystat{font-size:13.5px !important;color:var(--ink) !important;}
.lc-citystat strong{font-weight:700;}
.lot-stat{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;border-top:1px solid var(--ink);padding-top:16px;margin-top:26px;max-width:640px;}
.lot-stat strong{font-size:clamp(36px,5.4vw,56px);font-weight:700;letter-spacing:-.025em;line-height:1;color:var(--ink);}
.lot-stat > span{flex:1 1 240px;font-size:15px;line-height:1.45;color:var(--ink);}
.lot-stat small{display:block;margin-top:6px;font-size:12.5px;line-height:1.5;color:var(--ink-soft);}

/* The rotate handle: a round grip off the far side of the building. */
.lc-rot{fill:var(--paper);stroke:var(--ink);stroke-width:2;cursor:grab;touch-action:none;}
.lc-rot:active{cursor:grabbing;}
.lc-map.aerial .lc-rot{fill:var(--paper);stroke:var(--ink);}

/* ------------------------------------------------------------------ phones and touch ---------- */
/* The map is its own stacking context, so its controls stay under a sticky site header instead of
 * floating over it when the page scrolls. */
.lc-mapwrap{isolation:isolate;z-index:0;}
.lc-strip{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid var(--line);border-radius:16px;background:var(--paper);padding:12px 14px;}
.lc-strip[hidden]{display:none;}
.lc-strip .lc-badge{flex:none;}
.lc-strip-text{flex:1 1 160px;display:flex;flex-direction:column;gap:2px;min-width:0;}
.lc-strip-text strong{font-size:15px;line-height:1.3;}
.lc-strip-text span{font-size:13px;color:var(--ink-soft);}
.lc-strip-more{font-size:13px;font-weight:600;color:var(--ink);text-underline-offset:3px;}
@media (min-width:900px){.lc-strip{display:none !important;}}
.lc-hint{position:absolute;inset:0;z-index:600;display:flex;align-items:center;justify-content:center;pointer-events:none;background:rgba(22,21,15,.45);color:#fff;font-size:15px;font-weight:600;opacity:0;transition:opacity .2s;}
.lc-hint.on{opacity:1;}
@media (prefers-reduced-motion:reduce){.lc-hint{transition:none;}}
@media (max-width:560px){
  .lc{gap:12px;}
  .lc-search{flex-direction:column;}
  .lc-search .lc-btn{width:100%;}
  .lc-map{height:min(62vh,440px);}
  .lc.statewide .lc-map{height:min(62vh,440px);min-height:360px;}
  .lc-wide{display:none;}
  /* Two rows of controls instead of one row that overlaps. */
  /* One row along the bottom - the building picker and a compact turn button - and the fit chip
   * just above it. Top right it sat over the Aerial button once the buttons grew to finger size,
   * and a tap on "Aerial" landed on the chip. */
  .lc-fit{top:auto;right:10px;bottom:76px;font-size:11.5px;padding:6px 10px;}
  .lc-tools{left:10px;right:10px;bottom:22px;flex-wrap:nowrap;}
  .lc-tools select{flex:1 1 auto;min-width:0;text-overflow:ellipsis;}
  .lc-tools button{flex:none;}
  .lc-legend{bottom:76px;right:10px;font-size:11px;}
  .lc-map .leaflet-control-attribution{font-size:9px;max-width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .lc-card{padding:18px;border-radius:16px;}
  .lc-card h3{font-size:19px;}
  .lc-facts{grid-template-columns:1fr;gap:1px 0;}
  .lc-facts dd{margin-bottom:8px;}
  .lc-actions{flex-direction:column;}
  .lot-stat{margin-top:18px;padding-top:12px;gap:8px 12px;}
  .lot-stat strong{font-size:40px;}
  .lot-stat > span{font-size:14px;}
}
/* Fingers: 44 px targets, and 16 px text in anything that takes focus so iOS doesn't zoom. */
@media (pointer:coarse){
  .lc-tools select,.lc-tools button{font-size:16px;min-height:44px;padding:8px 14px;}
  .lc-view button{min-height:38px;padding:8px 14px;font-size:14px;}
  .lc-map .leaflet-bar a{width:40px;height:40px;line-height:40px;font-size:20px;}
  .lc-strip-more{padding:10px 0;}
}

.lc-rot-hit{fill:transparent;stroke:none;cursor:grab;touch-action:none;pointer-events:all;}

/* A city page's map: that city's boundary, outlined, over the county lines. */
.lc-city-focus{stroke:var(--ink);stroke-width:1.6;stroke-opacity:.8;fill:var(--ink);fill-opacity:.05;}
.lc-map.aerial .lc-city-focus{stroke:var(--paper);fill-opacity:0;}
