/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Funnel+Sans:ital,wght@0,300..800;1,300..800&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --main-green:#166534 ;
    --medium-green: #45845D;
    --light-green: #E8F0EB;
    --black:  #1E1E1E;
    --dark-grey: #696969;
    --light-grey: #D3D3D3;
    --extra-light-grey: #F5F5F5;
    --blue: #0B67BD;
    --light-blue: #E7F0F8;
    --purple: #AF26BE;
    --light-purple: #F7E9F9;
    --orange: #DB6917;
    --light-orange: #FBF0E8;
    --light-grey-100: #D9D9D9;
    --red: #F1471D;
    --light-red: #FEEDE8;
    --white: #ffffff;

    --font-family: 'Roboto', sans-serif;
    --font-display: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius: 4px;
    --container-max: 1440px;
    --container-px-sm: 16px;
    --shadow-tooltip: 0 2px 8px rgba(30, 30, 30, 0.16);
    overscroll-behavior: none;
}

body {
    font-family: var(--font-family);
    color: var(--black);
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 30px;
}

.rate-color-A-bg {
    background-color: var(--light-green);}
.rate-color-A-text {
    color: var(--main-green);}
.rate-color-A-border {
    border-color: var(--main-green);}

.rate-color-B-bg {
    background-color: var(--light-blue);}
.rate-color-B-text {
    color: var(--blue);}
.rate-color-B-border {
    border-color: var(--blue);}

.rate-color-C-bg {
    background-color: var(--light-purple);}
.rate-color-C-text {
    color: var(--purple);}
.rate-color-C-border {
    border-color: var(--purple);}

.rate-color-D-bg {
    background-color: var(--light-orange);}
.rate-color-D-text {
    color: var(--orange);}
.rate-color-D-border {
    border-color: var(--orange);}

.rate-color-E-bg {
    background-color: var(--light-red);}
.rate-color-E-text {
    color: var(--red);}
.rate-color-E-border {
    border-color: var(--red);}

/* ── Landing page aspect strip ── */

@keyframes lp-aspect-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lp-aspect-strip {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(24px, 5vw, 56px);
  flex-wrap: wrap;
  padding: 0 20px;
}

.lp-aspect-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  animation: lp-aspect-in 520ms cubic-bezier(0, 0, 0.2, 1) both;
  cursor: default;
}

.lp-aspect-item:nth-child(1) { animation-delay: 260ms; }
.lp-aspect-item:nth-child(2) { animation-delay: 340ms; }
.lp-aspect-item:nth-child(3) { animation-delay: 420ms; }
.lp-aspect-item:nth-child(4) { animation-delay: 500ms; }
.lp-aspect-item:nth-child(5) { animation-delay: 580ms; }

.lp-aspect-icon {
  width: 26px;
  height: 26px;
  opacity: 0.38;
  transition: opacity 220ms ease;
  display: block;
}

.lp-aspect-item:hover .lp-aspect-icon { opacity: 0.65; }

.lp-aspect-label {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  color: var(--dark-grey);
  text-align: center;
  max-width: 72px;
  opacity: 0.65;
  transition: opacity 220ms ease;
  letter-spacing: 0.01em;
}

.lp-aspect-item:hover .lp-aspect-label { opacity: 1; }

/* ── Address autocomplete ── */

/* Input frame — carries the border and focus ring */
.autocomplete-frame {
  display: flex;
  align-items: center;
  height: 52px;
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  padding: 0 6px 0 14px;
  background: #ffffff;
  gap: 10px;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}
.autocomplete-frame:focus-within {
  border-color: var(--main-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-green) 9%, transparent);
}
.autocomplete-frame .input {
  flex: 1;
  height: 100%;
  padding: 0;
  font-size: 15px;
  line-height: 24px;
  border: none;
  background: transparent;
  outline: none;
  color: var(--black);
  min-width: 0;
}
.autocomplete-frame .input::placeholder { color: var(--dark-grey); }
.autocomplete-frame .btn.primary {
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}
.autocomplete-search-icon {
  color: var(--dark-grey);
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}

/* Slide-in for dropdown */
@keyframes ac-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  text-align: left;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  box-shadow:
    0 2px 8px rgba(22, 101, 52, 0.06),
    0 8px 28px rgba(30, 30, 30, 0.12);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
  animation: ac-in 130ms cubic-bezier(0, 0, 0.2, 1);
}

/* Two-line option */
.autocomplete-option {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 80ms ease;
  gap: 1px;
}
.autocomplete-option:hover { background-color: var(--extra-light-grey); }
.autocomplete-option--active { background-color: var(--light-green); }

.autocomplete-option-primary {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.autocomplete-option-secondary {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
  color: var(--dark-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Highlighted match — green, heavier weight */
.autocomplete-option mark {
  background: none;
  color: var(--main-green);
  font-weight: 700;
}

/* Keyboard hint row at bottom of list */
.autocomplete-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 7px 16px 6px;
  border-top: 1px solid var(--extra-light-grey);
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--dark-grey);
  letter-spacing: 0.01em;
  user-select: none;
}
.autocomplete-footer kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--light-grey);
  border-radius: 3px;
  font-family: var(--font-family);
  font-size: 10px;
  line-height: 16px;
  color: var(--dark-grey);
  background: var(--extra-light-grey);
}

/* ── Vietos įžvalga insight card ── */
@keyframes insight-shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.insight-skel {
  background-color: #ECECEC;
  background-image: linear-gradient(90deg, #ECECEC 0px, #F5F5F5 80px, #ECECEC 160px);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  animation: insight-shimmer 1.4s linear infinite;
  border-radius: 3px;
  display: block;
}

.insight-refreshing {
  opacity: 0.35;
  transition: opacity 200ms ease;
}

@keyframes insight-spin { to { transform: rotate(360deg); } }

.insight-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--light-grey);
  border-top-color: var(--main-green);
  animation: insight-spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Persona switcher — segmented pill */
.insight-segmented {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  background: var(--extra-light-grey);
  border-radius: 4px;
  gap: 0;
  scrollbar-width: none;
  max-width: 100%;
}
.insight-segmented::-webkit-scrollbar { display: none; }

.insight-ps-tab {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: var(--dark-grey);
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}
.insight-ps-tab:hover {
  background: rgba(255,255,255,0.6);
  color: var(--black);
}
.insight-ps-tab[aria-selected="true"] {
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(30,30,30,0.08), 0 0 0 1px rgba(30,30,30,0.04);
}
.insight-ps-tab:focus-visible {
  outline: 2px solid var(--main-green);
  outline-offset: 2px;
}

/* Quick Take tags — outlined variant */
.insight-tag {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--light-grey);
}
.insight-tag-strength { border-color: var(--main-green); }
.insight-tag-risk     { border-color: var(--orange); }

.insight-tag-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 20px;
  flex-shrink: 0;
  line-height: 20px;
}

/* Source chips */
.insight-src-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--extra-light-grey);
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 12px;
  line-height: 18px;
  color: var(--dark-grey);
  transition: background-color 120ms ease, color 120ms ease;
}
.insight-src-chip:hover {
  background: var(--light-green);
  color: var(--main-green);
}

/* ── Location page header ── */

.loc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--light-grey);
  margin-bottom: 32px;
}

.loc-header__text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.loc-header__primary {
  font-family: var(--font-family);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--black);
  margin: 0;
  letter-spacing: -0.01em;
}

.loc-header__secondary {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--dark-grey);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-header__postcode {
  flex-shrink: 0;
  margin-top: 6px;
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--light-grey);
  border-radius: 3px;
  background: var(--extra-light-grey);
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.06em;
  color: var(--dark-grey);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── POI groups inside aspect tabs ── */

.poi-content {
  padding: 24px 20px 20px;
  border-radius: 0 0 4px 4px;
}

@media (min-width: 1024px) {
  .poi-content { padding: 28px 30px 24px; }
}

.poi-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.poi-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.poi-group__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.poi-group__title {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dark-grey);
  white-space: nowrap;
}

.poi-group__count {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 400;
  color: var(--dark-grey);
  opacity: 0.5;
}

/* Hairline extending to the right of the header */
.poi-group__header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.12;
}

.poi-group__rows {
  display: flex;
  flex-direction: column;
}

.poi-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid oklch(0% 0 0 / 0.05);
}

.poi-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.poi-row:first-child {
  padding-top: 0;
}

.poi-dist {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  color: var(--main-green);
  min-width: 54px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Distance inherits the section's accent colour when available */
.rate-color-B-bg .poi-dist { color: var(--blue); }
.rate-color-C-bg .poi-dist { color: var(--purple); }
.rate-color-D-bg .poi-dist { color: var(--orange); }
.rate-color-E-bg .poi-dist { color: var(--red); }

.poi-place {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--black);
}

.poi-empty {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--dark-grey);
  padding: 8px 0;
}

.poi-more {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid oklch(0% 0 0 / 0.07);
}

.poi-more__link {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: var(--main-green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: oklch(39% 0.095 145 / 0.3);
  transition: text-decoration-color 140ms ease;
}

.poi-more__link:hover {
  text-decoration-color: var(--main-green);
}

/* ── Aspect-specific layouts v2 ── */

/* Shared accent helpers */
.rate-color-A-bg { --asp-ink: var(--main-green); }
.rate-color-B-bg { --asp-ink: var(--blue); }
.rate-color-C-bg { --asp-ink: var(--purple); }
.rate-color-D-bg { --asp-ink: var(--orange); }
.rate-color-E-bg { --asp-ink: var(--red); }

/* Summary metric — headline + sub ── */
.asp-summary {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--light-grey);
  margin-bottom: 14px;
}
.asp-summary__headline {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}
.asp-summary__sub {
  font-family: var(--font-family);
  font-size: 13px;
  line-height: 1.5;
  color: var(--dark-grey);
  margin-top: 3px;
}

/* Component metrics grid — 2×2 ── */
.asp-comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.asp-comp-cell {
  padding: 11px 13px;
}
.asp-comp-cell:nth-child(odd)  { border-right: 1px solid var(--light-grey); }
.asp-comp-cell:nth-child(n+3)  { border-top: 1px solid var(--light-grey); }
.asp-comp-cell__label {
  font-family: var(--font-family);
  font-size: 11px;
  line-height: 14px;
  color: var(--dark-grey);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asp-comp-cell__value {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}
.asp-comp-cell__unit {
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--dark-grey);
  margin-left: 2px;
}

/* Subsection heading dot + label ── */
.asp-subsection {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  margin-top: 14px;
}
.asp-subsection__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--main-green);
  flex-shrink: 0;
}
.asp-subsection__label {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

/* Place list — rows with badge + name + dist + walk ── */
.asp-place-eyebrow {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-grey);
  padding-top: 14px;
  border-top: 1px solid var(--light-grey);
  margin-bottom: 8px;
}
.asp-place-row {
  display: grid;
  grid-template-columns: 26px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--light-grey);
}
.asp-place-row:last-child { border-bottom: none; padding-bottom: 0; }

.asp-place-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--main-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--main-green);
}
.asp-place-info { min-width: 0; }
.asp-place-name {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asp-place-cat {
  font-family: var(--font-family);
  font-size: 11px;
  line-height: 14px;
  color: var(--dark-grey);
  text-transform: lowercase;
  margin-top: 1px;
}
.asp-place-dist {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.asp-place-dist--near { color: var(--main-green); }
.asp-place-dist--mid  { color: var(--orange); }
.asp-place-dist--far  { color: var(--red); }

.asp-place-walk {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 46px;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.asp-place-walk--near { color: var(--main-green); }
.asp-place-walk--mid  { color: var(--orange); }
.asp-place-walk--far  { color: var(--red); }

/* Route chips for transit stops ── */
.asp-route-chips {
  display: inline-flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 2px;
  align-items: center;
}
.asp-route-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}
.asp-route-chip--bus     { background: var(--light-blue); color: var(--blue); }
.asp-route-chip--trolley { background: #FBE3E2; color: #A41B1B; }

/* Transit access gauge — banded progress bar with needle ── */
.asp-ta-gauge { display: flex; flex-direction: column; gap: 8px; }
.asp-ta-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.asp-ta-score {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 30px;
  font-variant-numeric: tabular-nums;
}
.asp-ta-score-label {
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--dark-grey);
  margin-left: 4px;
}
.asp-ta-pill {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.asp-scale-wrap { position: relative; }
.asp-scale-track {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--light-grey);
}
.asp-scale-needle {
  position: absolute;
  top: -3px;
  height: calc(100% + 6px);
  width: 3px;
  background: var(--black);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px white;
  pointer-events: none;
}
.asp-scale-ticks {
  position: relative;
  height: 14px;
  margin-top: 4px;
}
.asp-scale-tick {
  position: absolute;
  font-family: var(--font-family);
  font-size: 9px;
  line-height: 12px;
  color: var(--dark-grey);
  transform: translateX(-50%);
}
.asp-scale-tick:first-child { transform: translateX(0); }
.asp-scale-tick:last-child  { transform: translateX(-100%); }
.asp-ta-subscores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 2px;
}
.asp-ta-sub {
  padding: 7px 10px;
  background: var(--extra-light-grey);
  border-radius: var(--radius);
}
.asp-ta-sub__label {
  font-family: var(--font-family);
  font-size: 10px;
  line-height: 14px;
  color: var(--dark-grey);
}
.asp-ta-sub__value {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}

/* Vitality bar (economic) ── */
.asp-vit-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--light-grey);
}
.asp-vit-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.asp-vit-bar__label {
  font-family: var(--font-family);
  font-size: 12px;
  color: var(--dark-grey);
}
.asp-vit-bar__value {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--black);
}
.asp-vit-bar__track {
  height: 4px;
  background: oklch(0% 0 0 / 0.09);
  border-radius: 999px;
  overflow: hidden;
}
.asp-vit-bar__fill {
  height: 100%;
  background: var(--asp-ink, var(--main-green));
  border-radius: 999px;
  transition: width 400ms ease-out;
}

/* Green density bars (environment) ── */
.asp-green-bars { display: flex; flex-direction: column; gap: 10px; }
.asp-green-bar-row {
  display: grid;
  grid-template-columns: 50px 1fr 46px;
  align-items: center;
  gap: 10px;
}
.asp-green-bar-label {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 500;
  color: var(--dark-grey);
  text-align: right;
  white-space: nowrap;
}
.asp-green-bar-track {
  position: relative;
  height: 14px;
  background: var(--extra-light-grey);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--light-grey);
}
.asp-green-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 999px;
  transition: width 320ms ease-out;
}
.asp-green-bar-threshold {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 1px;
  border-left: 1px dashed rgba(0,0,0,0.18);
  pointer-events: none;
}
.asp-green-bar-value {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}
.asp-green-bar-value span {
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--dark-grey);
  margin-left: 1px;
}

/* Air quality meter — banded scale ── */
.asp-aq { display: flex; flex-direction: column; gap: 8px; }
.asp-aq__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.asp-aq__value {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.asp-aq__unit {
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--dark-grey);
  margin-left: 4px;
}
.asp-aq__pill {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.asp-aq__source {
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--dark-grey);
  margin-top: 2px;
}

/* Pollution row ── */
.asp-pollution-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--light-grey);
}
.asp-pollution-row:last-child { border-bottom: none; padding-bottom: 0; }
.asp-env-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.asp-env-dot--clean    { background: #166534; }
.asp-env-dot--moderate { background: #DB6917; }
.asp-env-dot--poor     { background: #F1471D; }
.asp-env-dot--unknown  { background: var(--light-grey); }
.asp-pollution-label {
  flex: 1;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--black);
}
.asp-pollution-count {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.asp-pollution-count--clean { color: #166534; }
.asp-pollution-count--warn  { color: #F1471D; }

/* ── Loading page ── */

@keyframes loading-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.18; }
  50%       { transform: scale(1.6); opacity: 0;    }
}

@keyframes loading-blink {
  0%, 80%, 100% { opacity: 0.15; }
  40%           { opacity: 1;    }
}

@keyframes loading-chip-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes loading-fade-cycle {
  0%, 10%  { opacity: 0; transform: translateY(4px); }
  20%, 80% { opacity: 1; transform: translateY(0);   }
  90%, 100%{ opacity: 0; transform: translateY(-4px);}
}

/* Pin wrapper */
.loading-pin-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Concentric pulsing rings */
.loading-pin-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--main-green);
  animation: loading-pulse 2.4s ease-out infinite;
}
.loading-pin-ring--1 { animation-delay: 0s; }
.loading-pin-ring--2 { animation-delay: 0.8s; }
.loading-pin-ring--3 { animation-delay: 1.6s; }

/* Center icon */
.loading-pin-core {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--light-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--main-green);
}
.loading-pin-icon {
  width: 22px;
  height: 22px;
}

/* Status text */
.loading-status {
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  color: var(--dark-grey);
  min-height: 24px;
  transition: opacity 200ms ease;
}

/* Bouncing dots */
.loading-dots {
  display: flex;
  gap: 5px;
}
.loading-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--main-green);
  animation: loading-blink 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Aspect chips row */
.loading-aspects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.loading-aspect-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--extra-light-grey);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 500;
  color: var(--dark-grey);
  opacity: 0;
  animation: loading-chip-in 360ms cubic-bezier(0, 0, 0.2, 1) forwards;
}
.loading-aspect-icon {
  width: 14px;
  height: 14px;
  opacity: 0.55;
}

/* ── Map tooltip ── */
/* ── Mapbox custom markers & popups ── */

/* Main location pin */
.map-main-pin {
  position: relative;
  width: 32px;
  height: 44px;
  cursor: default;
}
.map-main-pin svg { display: block; width: 32px; height: 44px; }
.map-main-pin__pulse {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(22,101,52,0.18);
  animation: pin-pulse 2s ease-out infinite;
}
@keyframes pin-pulse {
  0%   { transform: translate(-50%,-60%) scale(0.6); opacity: 0.8; }
  100% { transform: translate(-50%,-60%) scale(1.8); opacity: 0; }
}

/* POI category dot */
.map-poi-marker {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--marker-color, #166534);
  background: var(--marker-bg, #E8F0EB);
  color: var(--marker-color, #166534);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30,30,30,0.14);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.map-poi-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(30,30,30,0.22);
}
.map-poi-marker svg { width: 14px; height: 14px; }

/* ── Map tooltips ── */

/* POI hover: near-black surface, inverted from the light map tiles */
.map-poi-tooltip {
  background: #1E1E1E !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 18px rgba(30,30,30,0.32), 0 1px 4px rgba(30,30,30,0.18) !important;
  padding: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
.map-poi-tooltip::before { display: none !important; }

.map-tt {
  display: flex;
  flex-direction: column;
  padding: 7px 12px;
  gap: 2px;
}

.map-tt-name {
  display: block;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #F0F5F1;
  white-space: nowrap;
}

.map-tt-detail {
  display: block;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(240,245,241,0.55);
  white-space: nowrap;
}

/* Main address label: civic canopy green, permanent, anchored to the pin */
.map-main-tooltip {
  background: #166534 !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 12px rgba(22,101,52,0.35), 0 1px 3px rgba(22,101,52,0.2) !important;
  padding: 6px 12px !important;
  white-space: nowrap !important;
}
.map-main-tooltip.leaflet-tooltip-top::before {
  border-top-color: #166534 !important;
}

.map-tt-main {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #F0F5F1;
  letter-spacing: 0.01em;
}

/* ── Legacy Leaflet tooltip (kept for compat) ── */
.map-tooltip {
    border-radius: var(--radius);
    border: 1px solid var(--light-grey);
    background: var(--white);
    box-shadow: var(--shadow-tooltip);
    display: flex;
    padding: 4px 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    color: var(--black);
    text-overflow: ellipsis;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}
.leaflet-tooltip.map-tooltip::before { display: none; }

/* ════════════════════════════════════════════════
   Open Data Sources section — About page
   ════════════════════════════════════════════════ */

.ds-section {
  padding-top: 60px;
  padding-bottom: 80px;
  border-top: 1px solid var(--light-grey);
  margin-top: 0;
}
@media (min-width: 768px) {
  .ds-section { padding-top: 80px; padding-bottom: 100px; }
}
@media (min-width: 1024px) {
  .ds-section { padding-top: 100px; padding-bottom: 120px; }
}

/* ── Section header ── */
.ds-header {
  max-width: 600px;
  margin-bottom: 48px;
}
.ds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--main-green);
  margin-bottom: 16px;
}
.ds-title {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 14px;
}
.ds-subtitle {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--dark-grey);
  max-width: 56ch;
}

/* ── Stat blocks strip ── */
.ds-stat-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--light-grey);
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 48px;
}
@media (min-width: 640px) {
  .ds-stat-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .ds-stat-strip { grid-template-columns: repeat(5, 1fr); }
}

.ds-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 24px 20px 20px;
  background: #fff;
}
@media (min-width: 768px) {
  .ds-stat-block { padding: 28px 24px 22px; }
}

.ds-stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--black);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .ds-stat-number { font-size: 32px; }
}

.ds-stat-label {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}
.ds-stat-note {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 400;
  color: var(--dark-grey);
  line-height: 1.3;
}

/* ── Source list ── */
.ds-source-list {
  display: flex;
  flex-direction: column;
}
.ds-source-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--light-grey);
}
@media (min-width: 768px) {
  .ds-source-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }
}
.ds-source-row:last-child {
  border-bottom: 1px solid var(--light-grey);
}

.ds-source-main {
  flex: 1;
  min-width: 0;
}
.ds-source-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.ds-source-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--extra-light-grey);
  border: 1px solid var(--light-grey);
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dark-grey);
  white-space: nowrap;
}
.ds-source-org {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 400;
  color: var(--dark-grey);
}
.ds-source-name {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.ds-source-desc {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--dark-grey);
  max-width: 60ch;
}

/* ── Source meta (right column) ── */
.ds-source-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .ds-source-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 160px;
    padding-top: 4px;
  }
}

.ds-source-count {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: var(--black);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.ds-source-unit {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 400;
  color: var(--dark-grey);
  text-align: right;
}
.ds-source-freq {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--dark-grey);
  text-transform: uppercase;
}
.ds-source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 500;
  color: var(--main-green);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: opacity 120ms ease;
}
.ds-source-link:hover { opacity: 0.7; }
.ds-source-link:focus-visible {
  outline: 2px solid var(--main-green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Creators section ── */
.creators-section {
  border-top: 1px solid var(--light-grey);
  padding-top: 60px;
  padding-bottom: 80px;
}
@media (min-width: 768px) {
  .creators-section { padding-top: 80px; padding-bottom: 100px; }
}
@media (min-width: 1024px) {
  .creators-section { padding-top: 100px; padding-bottom: 120px; }
}

.creators-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  padding: 32px 28px;
  max-width: 680px;
}
@media (min-width: 640px) {
  .creators-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 36px;
    padding: 36px 40px;
  }
}

.creators-logo-col {
  flex-shrink: 0;
}
.creators-logo-link {
  display: inline-block;
  opacity: 0.9;
  transition: opacity 120ms ease;
}
.creators-logo-link:hover { opacity: 1; }
.creators-logo {
  height: 32px;
  width: auto;
  display: block;
}

.creators-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.creators-name {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--black);
  letter-spacing: -0.01em;
}
.creators-desc {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--dark-grey);
  max-width: 56ch;
}
.creators-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: var(--main-green);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: opacity 120ms ease;
}
.creators-link:hover { opacity: 0.7; }
.creators-link:focus-visible {
  outline: 2px solid var(--main-green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Location result page redesign (2026-05) ── */

.loc-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-grey);
}

/* Copy row in place details table */
.loc-copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  transition: background-color 80ms;
}
.loc-copy-row:hover { background: var(--extra-light-grey); }
.loc-copy-row__label {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 16px;
  color: var(--dark-grey);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  width: 120px;
}
.loc-copy-row__value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  color: var(--black);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loc-copy-row__hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 16px;
  color: var(--dark-grey);
  opacity: 0;
  transition: opacity 80ms;
}
.loc-copy-row:hover .loc-copy-row__hint,
.loc-copy-row:focus-visible .loc-copy-row__hint {
  opacity: 1;
}
.loc-copy-row:focus-visible {
  outline: 2px solid var(--main-green);
  outline-offset: -2px;
}

/* External link button */
.loc-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--black);
  text-decoration: none;
  transition: background-color 80ms;
}
.loc-ext-link:hover { background: var(--extra-light-grey); }

/* ── Aspect tab strip (desktop) ── */
.asp-tab-card {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  text-align: left;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  background: var(--white);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: background-color 80ms;
  color: var(--black);
}
.asp-tab-card:hover:not(.asp-tab-card--active) { background: var(--extra-light-grey); }
.asp-tab-icon-wrap {
  width: 28px; height: 28px;
  border-radius: 9999px;
  background: var(--extra-light-grey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-grey);
}
.asp-tab-icon-wrap--active {
  background: var(--white);
}
.asp-tab-icon {
  width: 16px; height: 16px;
}

/* ── Aspect content wrapper ── */
.asp-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Active panel below tab strip ── */
.asp-panel--desktop {
  display: block;
  border: 1px solid var(--light-grey);
  border-top: 0;
  border-radius: 0 0 4px 4px;
}
.asp-detail-grid {
  grid-template-columns: minmax(220px, 340px) 1fr;
}
@media (max-width: 767px) {
  .asp-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Report incorrect information flow */
.report-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  background: var(--extra-light-grey);
}
.report-trigger__text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--dark-grey);
}
.report-trigger__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--main-green);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--main-green);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.report-trigger__button:hover { background: var(--light-green); }
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
.report-modal.hidden { display: none; }
.report-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: default;
}
.report-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  background: var(--white);
}
.report-dialog__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--light-grey);
}
.report-dialog__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--light-orange);
  color: var(--orange);
}
.report-dialog__title-wrap {
  flex: 1;
  min-width: 0;
}
.report-dialog__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: var(--black);
}
.report-dialog__address {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  color: var(--dark-grey);
}
.report-dialog__address span { color: var(--black); }
.report-dialog__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--dark-grey);
  cursor: pointer;
}
.report-dialog__close:hover { background: var(--extra-light-grey); }
.report-dialog__body {
  padding: 20px;
  overflow-y: auto;
}
.report-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.report-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.report-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-field__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}
.report-field__label b { color: var(--red); }
.report-field__hint {
  min-height: 16px;
  color: var(--dark-grey);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
}
.report-field__hint--empty:empty { display: none; }
.report-field__hint--error { color: var(--red); }
.report-input,
.report-textarea {
  width: 100%;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 24px;
  transition: border-color 120ms ease;
}
.report-input {
  height: 46px;
  padding: 0 14px;
}
.report-textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}
.report-input:focus,
.report-textarea:focus {
  border-color: var(--dark-grey);
  outline: none;
}
.report-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--extra-light-grey);
  color: var(--dark-grey);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 20px;
}
.report-note i { margin-top: 3px; }
.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.report-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.report-button--secondary {
  border: 1px solid var(--light-grey);
  background: transparent;
  color: var(--black);
}
.report-button--secondary:hover { background: var(--extra-light-grey); }
.report-button--primary {
  border: 0;
  background: var(--main-green);
  color: var(--white);
}
.report-button--primary:hover { background: var(--medium-green); }
.report-stage {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.report-stage.hidden { display: none; }
.report-stage__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.report-stage__icon--spin {
  background: var(--light-green);
  color: var(--main-green);
}
.report-stage__icon--spin i {
  animation: report-spin 1s linear infinite;
}
.report-stage__icon--success {
  background: var(--light-green);
  color: var(--main-green);
  font-size: 28px;
}
.report-stage__title {
  color: var(--black);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
.report-stage__text {
  max-width: 420px;
  color: var(--dark-grey);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 22px;
}
.report-stage__text strong { color: var(--black); }
@keyframes report-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (min-width: 640px) {
  .report-modal {
    align-items: center;
    padding: 24px;
  }
  .report-dialog__header {
    padding: 24px 28px 12px;
  }
  .report-dialog__body {
    padding: 24px 28px;
  }
  .report-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Mobile accordion row ── */
.asp-mob-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
  background: transparent;
  text-decoration: none;
  color: var(--black);
  transition: background-color 80ms;
}
.asp-mob-icon-wrap {
  width: 28px; height: 28px;
  border-radius: 9999px;
  background: var(--white);
  border: 1px solid var(--light-grey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--main-green);
  flex-shrink: 0;
}
.asp-mob-icon { width: 15px; height: 15px; }
.asp-mob-panel { display: block; }

/* ── Persona tab bar ── */
.ptabs {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--light-grey);
  margin: 0;
}
.ptab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--light-grey);
  background: transparent;
  color: var(--dark-grey);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
  text-decoration: none;
}
.ptab:last-child { border-right: 0; }
.ptab:hover { background: var(--extra-light-grey); }
.ptab[aria-selected="true"] {
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 600;
}
.ptab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: var(--extra-light-grey);
  flex-shrink: 0;
}
.ptab[aria-selected="true"] .ptab__icon { background: var(--white); }
.ptab__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.ptab__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.ptab__underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  opacity: 0;
  transition: opacity 120ms ease;
}
.ptab[aria-selected="true"] .ptab__underline { opacity: 1; }

/* ── Persona tab bar — mobile dropdown ── */
.ptabs-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--extra-light-grey);
  border-bottom: 1px solid var(--light-grey);
}
.ptabs-mobile__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 8px;
  height: 46px;
  border-radius: var(--radius);
}
.ptabs-mobile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: var(--white);
  flex-shrink: 0;
}
.ptabs-mobile__name {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
}
.ptabs-mobile__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
}
.ptabs-mobile__chev { color: var(--dark-grey); font-size: 12px; line-height: 1; }
.ptabs-mobile__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
}
@media (max-width: 899px) {
  .ptabs { display: none; }
  .ptabs-mobile { display: flex; }
}

/* ── Persona panel ── */
.persona-panel { overflow: hidden; }
.persona-panel__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  flex-wrap: wrap;
}
.persona-panel__hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.persona-panel__hero-score-wrap { display: flex; flex-direction: column; gap: 4px; }
.persona-panel__track-wrap { padding: 0 20px 12px; }
.persona-panel__track-bar {
  height: 8px;
  background: var(--light-grey);
  border-radius: 9999px;
  overflow: hidden;
}
.persona-panel__track-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 400ms ease;
}
.persona-conf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}
.persona-conf-pill__dot {
  width: 8px; height: 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}
/* pp-metric-bar: ECharts host — overflow:visible so the marker dot isn't clipped */
.pp-metric-bar { overflow: visible !important; position: relative; }
.pp-metric-bar canvas, .pp-metric-bar svg { overflow: visible !important; }

/* Responsive switch: desktop tabs vs mobile dropdown (mirrors JS MOBILE_MAX=899) */
@media (max-width: 899px) {
  [data-pp-region="tabs-desktop"] { display: none !important; }
  [data-pp-region="tabs-mobile"]  { display: flex !important; }
}
@media (min-width: 900px) {
  [data-pp-region="tabs-mobile"]  { display: none !important; }
}
