/* Signature UI refinement — premium by restraint, not decoration.
   Removes the remaining card-template feel and restores practical mobile target sizes. */

:root{
  --nc-accent:#2848e8;
  --nc-accent-dark:#1733bd;
  --nc-rule:#b8beb9;
}

button,a,summary{touch-action:manipulation}

/* Once a decision exists, the product stops behaving like a marketing page. */
body.has-live-results .hero{
  padding:22px 0 18px!important;
}
body.has-live-results .hero > .eyebrow,
body.has-live-results .hero > h1,
body.has-live-results .hero > .hero-copy{
  display:none!important;
}
body.has-live-results:not(.decision-controls-editing) .search-panel{
  margin-top:0!important;
  padding:0 0 12px!important;
  border:0!important;
  border-top:1px solid var(--nc-ink)!important;
  border-bottom:1px solid var(--nc-line)!important;
  border-radius:0!important;
  background:transparent!important;
}
body.has-live-results .decision-check-summary{
  padding:12px 0!important;
  border-bottom:0!important;
}
body.has-live-results:not(.decision-controls-editing) .place-search-block{
  padding-top:10px!important;
  border-top:1px solid var(--nc-line)!important;
}

/* Make microcopy feel intentional rather than tiny. */
.po6-has-results .decision-kicker,
.decision-brief-label,
.try-nearby-eyebrow,
.decision-check-copy .decision-check-kicker{
  font-size:10px!important;
}
.decision-brief-row span{
  font-size:11px!important;
}
.decision-brief-row strong{
  font-size:13px!important;
}
.po6-has-results .decision-main>span,
body.decision-surface-active .place-card .status-line,
body.decision-surface-active .place-card .place-type,
.try-nearby-meta,
.try-nearby-distance{
  font-size:12px!important;
}

/* Best Match is the only true card-like object on the result screen. */
.po6-has-results .decision-banner{
  border-radius:2px!important;
  box-shadow:0 12px 30px rgba(11,14,13,.08)!important;
}
.po6-has-results .decision-primary.nearbycheck-directions,
.po6-has-results .decision-actions>button,
.po6-has-results .po6-card-directions,
.po6-has-results .po6-evidence-action{
  border-radius:2px!important;
}

/* Alternatives are ruled records, not a repeated stack of SaaS cards. */
.po6-has-results .results-grid{
  gap:0!important;
  border-top:1px solid var(--nc-line)!important;
}
.po6-has-results .place-card{
  padding:18px 0!important;
  border:0!important;
  border-bottom:1px solid var(--nc-line)!important;
  border-radius:0!important;
  background:transparent!important;
}
.po6-has-results .place-card:hover{
  background:rgba(255,255,255,.34)!important;
  border-color:var(--nc-line)!important;
}
.po6-has-results .place-name{
  font-size:20px!important;
}
.distance-badge{
  font-size:12px!important;
  font-variant-numeric:tabular-nums;
}
.decision-list-heading{
  margin-top:5px!important;
  border-bottom:0!important;
}
.decision-results-toggle{
  margin-top:12px!important;
  border-radius:2px!important;
  background:transparent!important;
}

/* Only Best Match gets the blue action. Alternatives stay quiet and editorial. */
.po6-has-results .place-card .po6-card-directions{
  border-color:var(--nc-ink)!important;
  background:var(--nc-ink)!important;
  color:#fff!important;
}
.po6-has-results .place-card .po6-card-directions:hover{
  border-color:#2e3431!important;
  background:#2e3431!important;
}
.po6-has-results .place-card .po6-evidence-action{
  border-color:var(--nc-line-strong)!important;
  background:transparent!important;
  color:var(--nc-ink)!important;
}

/* List/Map behaves like a mode rail. */
.po6-has-results .result-view-tabs{
  min-height:48px!important;
}
.po6-has-results .view-tab{
  min-height:48px!important;
  padding:0 18px!important;
}

/* Try Nearby becomes a secondary evidence register, not a nested card gallery. */
.try-nearby-section{
  margin-top:28px!important;
  padding-top:18px!important;
}
.try-nearby-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  margin-top:12px!important;
  border-top:1px solid var(--nc-line)!important;
}
.try-nearby-card{
  padding:17px 0!important;
  border:0!important;
  border-bottom:1px solid var(--nc-line)!important;
  border-radius:0!important;
  background:transparent!important;
}
.try-nearby-card:hover{
  background:rgba(255,255,255,.34)!important;
}
.try-nearby-badge,
.try-nearby-unconfirmed{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  font-size:10px!important;
  font-weight:780!important;
  letter-spacing:.08em!important;
}
.try-nearby-badge{color:var(--nc-faint)!important}
.try-nearby-unconfirmed{color:#8a5a00!important}
.try-nearby-unconfirmed::before{
  content:"●";
  margin-right:6px;
  color:#c88400;
  font-size:7px;
  vertical-align:1px;
}
.try-nearby-name{
  margin-top:8px!important;
  font-size:18px!important;
  letter-spacing:-.025em!important;
}
.try-nearby-access{
  margin-top:10px!important;
  padding:4px 0 4px 10px!important;
  border-radius:0!important;
  background:transparent!important;
  border-left:2px solid var(--nc-warn)!important;
  color:#765000!important;
}
.try-nearby-access.good{
  border-left-color:var(--nc-good)!important;
  background:transparent!important;
  color:var(--nc-good)!important;
}
.try-nearby-source,
.try-nearby-directions,
.try-nearby-toggle{
  border-radius:2px!important;
}

/* Search suggestions feel like a native command surface, not a floating AI card. */
.search-suggestions{
  border-radius:2px!important;
  box-shadow:0 18px 44px rgba(11,14,13,.14)!important;
}
.search-suggestion{
  border-radius:0!important;
}

/* Map and dialog carry the same square utility language. */
.results-map,
.detail-dialog,
.outcome-prompt{
  border-radius:2px!important;
}

@media(max-width:760px){
  /* Hard ergonomics: every repeated decision control remains a real touch target. */
  .time-tab,
  .decision-check-actions button,
  .po6-has-results .po6-card-directions,
  .po6-has-results .po6-evidence-action,
  .try-nearby-source,
  .try-nearby-directions,
  .try-nearby-toggle,
  .po6-has-results .view-tab{
    min-height:44px!important;
  }

  body.has-live-results .hero{
    padding:14px 0 12px!important;
  }
  body.has-live-results:not(.decision-controls-editing) .search-panel{
    padding:0 0 10px!important;
  }
  body.has-live-results .decision-check-summary{
    padding:10px 0!important;
  }

  .section-heading h2{
    font-size:30px!important;
    line-height:1.02!important;
    letter-spacing:-.055em!important;
  }
  .section-heading{
    padding-bottom:10px!important;
  }

  .po6-has-results .decision-banner{
    padding:19px 16px 17px 20px!important;
    box-shadow:none!important;
  }
  .po6-has-results .decision-main>strong{
    font-size:26px!important;
    line-height:1.02!important;
  }
  .decision-brief{
    margin-top:13px!important;
  }
  .decision-brief-row{
    grid-template-columns:72px minmax(0,1fr)!important;
    padding:8px 0!important;
  }

  /* The two primary Best Match actions share exactly the same width; refresh stays a fixed utility cell. */
  .po6-has-results .decision-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px!important;
    gap:6px!important;
    width:100%!important;
  }
  .po6-has-results .decision-actions>a,
  .po6-has-results .decision-actions>button{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .po6-has-results .decision-actions .decision-refresh{
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    padding:0!important;
  }

  .po6-has-results .results-grid{
    margin-top:2px!important;
  }
  .po6-has-results .place-card{
    padding:17px 0!important;
  }
  .po6-has-results .place-name{
    font-size:19px!important;
  }
  .po6-has-results .card-actions{
    gap:6px!important;
  }

  .try-nearby-section{
    margin-top:24px!important;
    padding-top:16px!important;
  }
  .try-nearby-card{
    padding:16px 0!important;
  }
  .try-nearby-name{
    font-size:18px!important;
  }
  .try-nearby-access{
    font-size:11px!important;
    line-height:1.45!important;
  }

  .outcome-prompt{
    left:10px!important;
    right:10px!important;
  }
}

/* Result-density pass — preserve the decision hierarchy while removing avoidable vertical drag. */
body.has-live-results:not(.decision-controls-editing) .place-search-block{
  padding-top:8px!important;
}
body.has-live-results:not(.decision-controls-editing) .search-field-wrap{
  margin-top:5px!important;
}
body.has-live-results:not(.decision-controls-editing) .search-field-wrap input{
  min-height:54px!important;
  font-size:15px!important;
}
body.has-live-results:not(.decision-controls-editing) .anchor-status-row{
  margin-top:6px!important;
}
body.has-live-results:not(.decision-controls-editing) .anchor-status{
  font-size:10.5px!important;
}

/* Ranking explanation is utility disclosure, not a rounded content card. */
.try-nearby-method{
  margin-top:10px!important;
  border:0!important;
  border-top:1px solid var(--nc-line)!important;
  border-bottom:1px solid var(--nc-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.try-nearby-method summary{
  min-height:44px!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
}
.try-nearby-method p{
  margin:0!important;
  padding:0 0 12px!important;
  max-width:760px;
}
.try-nearby-access.warn,
.try-nearby-access.good{
  background:transparent!important;
  box-shadow:none!important;
}

@media(min-width:761px){
  /* Desktop mode control should read as a compact switch, not a full-width navigation bar. */
  .po6-has-results .result-view-tabs{
    width:190px!important;
    max-width:190px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .po6-has-results .view-tab{
    width:95px!important;
    min-width:95px!important;
    padding:0 12px!important;
  }

  /* Best Match gets enough scale to own the decision without becoming decorative. */
  .po6-has-results .decision-banner{
    padding:26px 28px 24px 32px!important;
    gap:22px 30px!important;
  }
  .po6-has-results .decision-main>strong{
    font-size:36px!important;
  }
  .decision-brief-row{
    grid-template-columns:96px minmax(0,1fr)!important;
  }
  .po6-has-results .decision-actions{
    align-self:center!important;
  }

  /* Source-backed alternatives become compact decision rows with a dedicated action rail. */
  .po6-has-results .place-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 132px!important;
    column-gap:28px!important;
    align-items:start!important;
  }
  .po6-has-results .place-card .card-top,
  .po6-has-results .place-card .decision-card-summary,
  .po6-has-results .place-card .status-line{
    grid-column:1!important;
  }
  .po6-has-results .place-card .card-actions{
    grid-column:2!important;
    grid-row:1 / span 3!important;
    align-self:center!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    width:132px!important;
    margin-top:0!important;
  }
  .po6-has-results .place-card .po6-card-directions,
  .po6-has-results .place-card .po6-evidence-action{
    width:100%!important;
    min-height:42px!important;
  }
  .decision-results-toggle{
    width:auto!important;
    min-width:148px!important;
    padding-inline:18px!important;
  }

  /* Try Nearby is a compact fallback register: evidence text left, utility actions right. */
  .try-nearby-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 158px!important;
    grid-template-areas:
      "main actions"
      "status actions"!important;
    column-gap:28px!important;
    align-items:center!important;
  }
  .try-nearby-card-top{
    grid-area:main!important;
  }
  .try-nearby-access{
    grid-area:status!important;
    margin-top:8px!important;
  }
  .try-nearby-actions{
    grid-area:actions!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    width:158px!important;
    align-self:center!important;
  }
  .try-nearby-actions>a{
    width:100%!important;
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .try-nearby-toggle{
    width:auto!important;
    min-width:148px!important;
    padding-inline:18px!important;
  }
}

@media(max-width:760px){
  body.has-live-results:not(.decision-controls-editing) .search-field-wrap input{
    min-height:50px!important;
    font-size:14px!important;
  }
  body.has-live-results:not(.decision-controls-editing) .place-search-block{
    padding-top:7px!important;
  }
  .po6-has-results .result-view-tabs{
    width:100%!important;
  }
  .try-nearby-method{
    margin-top:8px!important;
  }
  .try-nearby-card{
    display:block!important;
  }
  .try-nearby-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:6px!important;
  }
  .try-nearby-access.warn,
  .try-nearby-access.good{
    background:transparent!important;
  }
}
