:root {
  --ink: #14202b;
  --ink-soft: #263746;
  --muted: #647381;
  --paper: #f3f0e8;
  --panel: #ffffff;
  --line: #d7dddf;
  --line-dark: #bcc5c9;
  --green: #087443;
  --green-bright: #18b968;
  --red: #a11919;
  --red-bright: #e43d3d;
  --orange: #d66b30;
  --orange-dark: #b94d19;
  --shadow: 0 18px 50px rgb(16 32 45 / 14%);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
}

body.panel-open { overflow: hidden; }

button,
select,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.shell {
  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px max(24px, calc((100vw - 1320px) / 2));
  color: white;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  background: linear-gradient(180deg, rgb(8 18 28 / 48%), transparent);
  transition: background .2s ease;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.01em;
}

.brand-mark { color: var(--orange); }

nav {
  display: flex;
  gap: 26px;
}

nav a {
  color: rgb(255 255 255 / 80%);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 700;
}

nav a:hover { color: white; }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: end;
  overflow: hidden;
  background-image: url("../img/hero-home.jpg");
  background-size: cover;
  background-position: center 48%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(5 15 25 / 82%) 0%, rgb(5 15 25 / 56%) 44%, rgb(5 15 25 / 12%) 78%),
    linear-gradient(0deg, rgb(5 15 25 / 68%) 0%, transparent 50%),
    linear-gradient(180deg, rgb(5 15 25 / 30%) 0%, transparent 25%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 60px;
  padding: 140px 0 92px;
  color: white;
}

.hero-copy-block { max-width: 860px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .76rem;
}

.hero-eyebrow { color: #ff9a61; }

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(3.8rem, 8.2vw, 8rem);
  line-height: .88;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 660px;
  margin-bottom: 32px;
  color: rgb(255 255 255 / 86%);
  font-size: clamp(1.12rem, 2.1vw, 1.45rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button,
.search-button,
.reset-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.primary-button {
  border: 1px solid var(--orange);
  background: var(--orange);
  color: white;
}

.primary-button:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.secondary-button {
  border: 1px solid rgb(255 255 255 / 42%);
  background: rgb(255 255 255 / 12%);
  color: white;
  backdrop-filter: blur(8px);
}

.secondary-button:hover {
  background: rgb(255 255 255 / 20%);
  transform: translateY(-2px);
}

.hero-data {
  min-width: 260px;
  display: grid;
  gap: 7px;
  justify-items: end;
  padding: 18px 0;
  color: rgb(255 255 255 / 70%);
  text-align: right;
  font-size: .82rem;
}

.hero-data p { margin: 0; }

.hero-data #hero-progress {
  color: white;
  font-size: 1rem;
  font-weight: 800;
}

.hero-data .ok { color: #b9f4d0; }

.hero-data .error { color: #ffd0d0; }

.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: rgb(255 255 255 / 74%);
  text-decoration: none;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  font-style: normal;
  font-size: 1.3rem;
  animation: float 1.8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.stats-section {
  padding: 88px 0 94px;
}

.section-intro.compact { margin-bottom: 28px; }

.section-intro h2 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 5vw, 5rem);
  letter-spacing: -.05em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.stat-card {
  min-height: 190px;
  position: relative;
  display: flex;
  align-items: end;
  padding: 26px;
  border-right: 1px solid var(--line-dark);
  background: transparent;
}

.stat-card:last-child { border-right: 0; }

.stat-number {
  position: absolute;
  top: 21px;
  right: 22px;
  color: #a7b0b5;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.stat-card > div {
  display: grid;
  gap: 5px;
}

.stat-card strong {
  font-size: clamp(2.9rem, 5vw, 5rem);
  line-height: .9;
  letter-spacing: -.055em;
}

.stat-card span:not(.stat-number) {
  color: var(--ink-soft);
  font-weight: 800;
}

.stat-card small {
  color: var(--muted);
  font-size: .8rem;
}

.map-section {
  padding: 84px 0 0;
  border-top: 1px solid var(--line);
  background: #ebe8df;
}

.map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.map-title-block { max-width: 920px; }

.map-heading h2 {
  margin-bottom: 11px;
  font-size: clamp(2.7rem, 6vw, 6rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.map-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.search-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.search-button:hover {
  background: #263846;
  transform: translateY(-2px);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.reset-button {
  min-height: 46px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  white-space: nowrap;
}

.reset-button:hover { background: rgb(255 255 255 / 62%); }

.map-frame {
  position: relative;
  width: 100%;
  border-top: 1px solid var(--line-dark);
  background: #dce4e5;
}

#map {
  width: 100%;
  height: min(84vh, 900px);
  min-height: 650px;
}

.map-legend {
  position: absolute;
  z-index: 500;
  left: 20px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 12px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 8px 30px rgb(0 0 0 / 14%);
  backdrop-filter: blur(8px);
  font-size: .79rem;
}

.legend-group {
  display: flex;
  gap: 13px;
}

.legend-group span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.legend-marker {
  display: inline-block;
  border-radius: 50%;
}

.legend-marker.climbed,
.legend-marker.pending {
  width: 11px;
  height: 11px;
  border: 2px solid;
}

.legend-marker.climbed {
  border-color: #075c36;
  background: var(--green-bright);
}

.legend-marker.pending {
  border-color: #8f1515;
  background: var(--red-bright);
}

.legend-marker.type-primary {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  background: transparent;
}

.legend-marker.type-secondary {
  width: 9px;
  height: 9px;
  border: 1px dashed var(--ink);
  background: transparent;
}

.map-search-fab { display: none; }

.search-panel {
  position: fixed;
  z-index: 2200;
  top: 0;
  right: 0;
  width: min(500px, 96vw);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  padding: 28px;
  background: var(--panel);
  box-shadow: -18px 0 60px rgb(20 30 40 / 20%);
  transform: translateX(105%);
  transition: transform .28s ease;
}

.search-panel.is-open { transform: translateX(0); }

.search-backdrop {
  position: fixed;
  z-index: 2100;
  inset: 0;
  display: none;
  border: 0;
  background: rgb(8 18 28 / 52%);
  backdrop-filter: blur(3px);
}

.search-backdrop.is-open { display: block; }

.search-panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.search-panel__header h2 {
  margin-bottom: 22px;
  font-size: 2.4rem;
  letter-spacing: -.04em;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  color: var(--ink);
  outline: none;
}

.search-field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgb(214 107 48 / 13%);
}

.search-count {
  margin: 15px 0 8px;
  color: var(--muted);
  font-size: .84rem;
}

.search-results {
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.search-result {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 15px 3px;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.search-result:hover { background: #f7f8f6; }

.search-result-marker {
  display: inline-block;
  border-radius: 50%;
  border-style: solid;
}

.search-result-marker.primary {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.search-result-marker.secondary {
  width: 9px;
  height: 9px;
  border-width: 1px;
  border-style: dashed;
}

.search-result-marker.done {
  border-color: #075c36;
  background: var(--green-bright);
}

.search-result-marker.pending {
  border-color: #8f1515;
  background: var(--red-bright);
}

.search-result-main,
.search-result-meta {
  display: grid;
  gap: 4px;
}

.search-result small { color: var(--muted); }

.search-result-meta {
  justify-items: end;
  text-align: right;
}

.search-result-meta b { font-size: .84rem; }

.search-result-meta small { font-size: .68rem; }

.empty-search {
  padding: 34px 0;
  text-align: center;
}

.empty-search p {
  color: var(--muted);
  font-size: .9rem;
}

.popup-card {
  min-width: 260px;
  max-width: 330px;
  padding: 2px;
}

.popup-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.popup-type {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.popup-status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .69rem;
  font-weight: 900;
}

.popup-status.done {
  color: #0b5934;
  background: #dcf5e6;
}

.popup-status.pending {
  color: #8a1717;
  background: #fee3e3;
}

.popup-card h3 {
  margin: 0 0 3px;
  font-size: 1.35rem;
  letter-spacing: -.025em;
}

.popup-alt-name {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: .78rem;
}

.popup-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding-bottom: 12px;
  color: var(--muted);
  font-size: .78rem;
}

.popup-facts strong {
  color: var(--ink);
  font-size: 1rem;
}

.popup-ascent {
  display: grid;
  gap: 9px;
  padding: 12px 0 3px;
  border-top: 1px solid var(--line);
}

.popup-detail {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.popup-detail div { display: grid; gap: 1px; }

.popup-detail small {
  color: var(--muted);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.popup-detail strong,
.popup-detail span {
  font-size: .82rem;
}

.popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}

.popup-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #edf1f2;
  text-decoration: none;
  font-size: .73rem;
  font-weight: 800;
}

.popup-link:hover { background: #e0e7e9; }

.popup-empty {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.leaflet-popup-content {
  margin: 15px 17px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0 50px;
  color: var(--muted);
  font-size: .85rem;
}

.site-footer a { text-decoration: none; }

@media (max-width: 1040px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-data {
    min-width: 0;
    justify-items: start;
    text-align: left;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card:nth-child(2) { border-right: 0; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }

  .map-heading {
    align-items: start;
    flex-direction: column;
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reset-button { width: 100%; }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1320px);
  }

  .site-header {
    padding: 16px 17px;
    background: rgb(7 17 27 / 60%);
    backdrop-filter: blur(9px);
  }

  .site-header nav { display: none; }

  .brand { font-size: .92rem; }

  .hero {
    min-height: 92svh;
    background-position: 62% center;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgb(5 15 25 / 88%) 0%, rgb(5 15 25 / 42%) 68%, rgb(5 15 25 / 22%) 100%);
  }

  .hero-content {
    padding: 120px 0 74px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

  .hero-lead {
    font-size: 1.03rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button { width: 100%; }

  .scroll-cue { display: none; }

  .stats-section { padding: 62px 0 68px; }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 145px;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .stat-card:last-child { border-bottom: 0; }

  .map-section { padding-top: 62px; }

  .map-heading { margin-bottom: 18px; }

  .map-heading h2 {
    font-size: clamp(2.65rem, 13vw, 4.2rem);
  }

  .search-button.prominent { display: none; }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .filter-bar label:nth-child(1),
  .reset-button {
    grid-column: 1 / -1;
  }

  #map {
    height: 72svh;
    min-height: 530px;
  }

  .map-legend {
    right: 14px;
    left: 14px;
    bottom: 14px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
  }

  .legend-divider { display: none; }

  .legend-group { gap: 10px; }

  .map-search-fab {
    position: absolute;
    z-index: 600;
    right: 16px;
    top: 16px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    box-shadow: var(--shadow);
    font-size: 1.5rem;
  }

  .search-panel {
    width: 100%;
    padding: 22px 18px;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}


/* =========================================================
   V5 · PULIDO GENERAL DE UI Y LEGIBILIDAD
   ========================================================= */

:root {
  font-size: 18px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --control-height: 62px;
  --shadow-soft: 0 14px 38px rgb(16 32 45 / 12%);
  --shadow-strong: 0 24px 70px rgb(16 32 45 / 20%);
}

body {
  font-size: 1rem;
  line-height: 1.55;
}

.site-header {
  min-height: 76px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  gap: 12px;
  font-size: 1.08rem;
}

.brand-mark {
  font-size: 1.12rem;
}

nav {
  gap: 34px;
}

nav a {
  font-size: 1rem;
  letter-spacing: .01em;
}

.eyebrow {
  margin-bottom: 15px;
  font-size: .92rem;
  letter-spacing: .13em;
}

.hero-content {
  padding-bottom: 110px;
}

h1 {
  max-width: 980px;
  margin-bottom: 30px;
  font-size: clamp(4.7rem, 9.6vw, 9.6rem);
  line-height: .88;
}

.hero-lead {
  max-width: 760px;
  margin-bottom: 38px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.48;
}

.hero-actions {
  gap: 16px;
}

.primary-button,
.secondary-button,
.search-button,
.reset-button {
  min-height: 58px;
  padding-inline: 25px;
  font-size: 1rem;
}

.hero-data {
  min-width: 310px;
  gap: 9px;
  font-size: .94rem;
}

.hero-data #hero-progress {
  font-size: 1.16rem;
}

.scroll-cue {
  bottom: 25px;
  font-size: .82rem;
}

.section-intro.compact {
  margin-bottom: 38px;
}

.section-intro h2,
.map-heading h2 {
  font-size: clamp(3.5rem, 6.8vw, 7rem);
  line-height: .94;
}

.stats-section {
  padding-top: 105px;
  padding-bottom: 108px;
}

.stat-card {
  min-height: 230px;
  padding: 32px;
}

.stat-number {
  top: 26px;
  right: 27px;
  font-size: .84rem;
}

.stat-card strong {
  font-size: clamp(3.6rem, 5.8vw, 6rem);
}

.stat-card span:not(.stat-number) {
  font-size: 1.08rem;
}

.stat-card small {
  margin-top: 2px;
  font-size: .93rem;
}

.map-section {
  padding-top: 105px;
}

.map-heading {
  margin-bottom: 36px;
}

.map-summary {
  max-width: 850px;
  font-size: 1.18rem;
  line-height: 1.5;
}

.search-button {
  min-width: 150px;
  font-size: 1.05rem;
}

.filter-bar {
  grid-template-columns: repeat(4, minmax(175px, 1fr)) auto;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar label {
  gap: 9px;
  font-size: 1rem;
  color: var(--ink-soft);
}

select {
  min-height: var(--control-height);
  padding: 0 48px 0 18px;
  border-width: 1.5px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgb(20 32 43 / 5%);
}

select:hover {
  border-color: #8f9da4;
}

select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgb(214 107 48 / 15%);
}

.reset-button {
  min-height: var(--control-height);
  padding-inline: 22px;
  border-width: 1.5px;
  font-size: 1rem;
}

#map {
  min-height: 710px;
}

.map-legend {
  left: 24px;
  bottom: 26px;
  gap: 17px;
  padding: 15px 18px;
  border-radius: 15px;
  font-size: .95rem;
}

.legend-group {
  gap: 17px;
}

.legend-group span {
  gap: 9px;
  font-weight: 700;
}

.legend-marker.climbed,
.legend-marker.pending {
  width: 14px;
  height: 14px;
}

.legend-marker.type-primary {
  width: 16px;
  height: 16px;
}

.legend-marker.type-secondary {
  width: 12px;
  height: 12px;
}

.search-panel {
  width: min(590px, 96vw);
  padding: 36px;
}

.search-panel__header h2 {
  margin-bottom: 28px;
  font-size: 3rem;
}

.icon-button {
  width: 52px;
  height: 52px;
  font-size: 2rem;
}

.search-field {
  gap: 10px;
  font-size: 1rem;
  color: var(--ink-soft);
}

.search-field input {
  min-height: 62px;
  padding: 16px 18px;
  border-width: 1.5px;
  border-radius: var(--radius-sm);
  font-size: 1.08rem;
}

.search-count {
  margin: 20px 0 11px;
  font-size: 1rem;
}

.search-result {
  gap: 16px;
  padding: 19px 7px;
}

.search-result-main strong {
  font-size: 1.16rem;
}

.search-result small {
  font-size: .91rem;
  line-height: 1.35;
}

.search-result-meta b {
  font-size: 1rem;
}

.search-result-meta small {
  font-size: .79rem;
}

.search-result-marker.primary {
  width: 15px;
  height: 15px;
}

.search-result-marker.secondary {
  width: 12px;
  height: 12px;
}

.popup-card {
  min-width: 310px;
  max-width: 380px;
  padding: 5px 3px;
}

.popup-topline {
  margin-bottom: 13px;
}

.popup-type {
  font-size: .82rem;
}

.popup-status {
  padding: 6px 10px;
  font-size: .81rem;
}

.popup-card h3 {
  margin-bottom: 5px;
  font-size: 1.72rem;
  line-height: 1.12;
}

.popup-alt-name {
  margin-bottom: 15px;
  font-size: .94rem;
}

.popup-facts {
  gap: 8px 13px;
  padding-bottom: 15px;
  font-size: .94rem;
}

.popup-facts strong {
  font-size: 1.25rem;
}

.popup-ascent {
  gap: 13px;
  padding-top: 15px;
}

.popup-detail {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
}

.popup-detail > span {
  font-size: 1.08rem;
}

.popup-detail small {
  font-size: .79rem;
}

.popup-detail strong,
.popup-detail div > span {
  font-size: 1rem;
  line-height: 1.4;
}

.popup-actions {
  gap: 9px;
  margin-top: 5px;
}

.popup-link {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: .9rem;
}

.popup-empty {
  font-size: .96rem;
}

.leaflet-popup-content {
  margin: 19px 21px;
}

.leaflet-popup-content-wrapper {
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
}

.leaflet-control-zoom a {
  width: 40px !important;
  height: 40px !important;
  line-height: 38px !important;
  font-size: 1.35rem !important;
}

.site-footer {
  padding-top: 42px;
  font-size: .98rem;
}

@media (max-width: 1040px) {
  :root {
    font-size: 17px;
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reset-button {
    min-height: 58px;
  }
}

@media (max-width: 720px) {
  :root {
    font-size: 16px;
    --control-height: 58px;
  }

  .site-header {
    min-height: 66px;
  }

  .brand {
    font-size: 1rem;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  h1 {
    font-size: clamp(3.65rem, 18vw, 5.6rem);
  }

  .hero-lead {
    font-size: 1.18rem;
  }

  .primary-button,
  .secondary-button {
    min-height: 58px;
    font-size: 1.03rem;
  }

  .hero-data {
    font-size: .92rem;
  }

  .section-intro h2,
  .map-heading h2 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .stats-section,
  .map-section {
    padding-top: 74px;
  }

  .stat-card {
    min-height: 165px;
    padding: 27px;
  }

  .stat-card strong {
    font-size: 4rem;
  }

  .stat-card span:not(.stat-number) {
    font-size: 1.08rem;
  }

  .stat-card small {
    font-size: .94rem;
  }

  .map-summary {
    font-size: 1.08rem;
  }

  .filter-bar {
    gap: 11px;
  }

  .filter-bar label {
    font-size: .96rem;
  }

  select {
    font-size: 1rem;
  }

  #map {
    min-height: 560px;
  }

  .map-legend {
    padding: 13px 14px;
    font-size: .88rem;
  }

  .search-panel {
    padding: 27px 20px;
  }

  .search-panel__header h2 {
    font-size: 2.55rem;
  }

  .search-result-main strong {
    font-size: 1.08rem;
  }

  .popup-card {
    min-width: 250px;
    max-width: 285px;
  }

  .popup-card h3 {
    font-size: 1.48rem;
  }

  .popup-facts,
  .popup-detail strong,
  .popup-detail div > span {
    font-size: .92rem;
  }
}


/* =========================================================
   V6 · AJUSTE DE JERARQUÍA EN ESTADÍSTICAS
   ========================================================= */

.section-intro h2 {
  font-size: clamp(3rem, 5.8vw, 6rem);
}

.stats-section {
  padding-top: 92px;
  padding-bottom: 112px;
}

.section-intro.compact {
  margin-bottom: 46px;
}

.stat-card {
  min-height: 250px;
  padding: 36px 32px;
}

.stat-card > div {
  gap: 8px;
}

.stat-card strong {
  font-size: clamp(3.9rem, 6vw, 6.4rem);
}

.stat-card span:not(.stat-number) {
  font-size: 1.14rem;
  line-height: 1.28;
}

.stat-card small {
  max-width: 230px;
  margin-top: 4px;
  font-size: .98rem;
  line-height: 1.42;
}

@media (max-width: 720px) {
  .section-intro h2 {
    font-size: clamp(2.8rem, 13vw, 4.3rem);
  }

  .section-intro.compact {
    margin-bottom: 32px;
  }

  .stat-card {
    min-height: 178px;
    padding: 30px 27px;
  }

  .stat-card strong {
    font-size: 4.15rem;
  }
}


/* =========================================================
   V7 · ESTADÍSTICAS PERSONALES, SIN ENFOQUE DE COMPLETAR
   ========================================================= */

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
  min-width: 0;
  align-items: stretch;
}

.stat-card:nth-child(2) {
  border-right: 1px solid var(--line-dark);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-content {
  width: 100%;
  display: grid !important;
  grid-template-rows: 1.05em minmax(3.05rem, auto) minmax(2.85rem, auto);
  align-content: end;
  gap: 9px !important;
}

.stat-card strong {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  margin: 0;
  font-size: clamp(3rem, 4.55vw, 5.15rem);
  line-height: 1.05;
  letter-spacing: -.06em;
  white-space: nowrap;
}

.stat-card span:not(.stat-number) {
  display: flex;
  align-items: start;
  min-height: 2.6em;
}

.stat-card small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-card:nth-child(3) {
    border-right: 0;
  }

  .stat-card:nth-child(-n+3) {
    border-bottom: 1px solid var(--line-dark);
  }

  .stat-card:nth-child(4) {
    border-right: 1px solid var(--line-dark);
  }

  .stat-card:nth-child(5) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .stat-card:nth-child(2),
  .stat-card:nth-child(3),
  .stat-card:nth-child(4) {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .stat-card:last-child {
    border-bottom: 0;
  }

  .stat-content {
    grid-template-rows: auto auto auto;
  }

  .stat-card strong {
    font-size: 4rem;
  }

  .stat-card span:not(.stat-number) {
    min-height: 0;
  }
}


/* =========================================================
   V8 · PORTADA PANORÁMICA Y NUEVA JERARQUÍA DE ESTADÍSTICAS
   ========================================================= */

/* La portada deja de ocupar toda la pantalla y funciona como
   una panorámica amplia, manteniendo visible el inicio de la
   siguiente sección. */
.hero {
  min-height: clamp(560px, 68svh, 720px);
  align-items: center;
  background-position: center 47%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgb(5 15 25 / 83%) 0%, rgb(5 15 25 / 51%) 48%, rgb(5 15 25 / 10%) 80%),
    linear-gradient(0deg, rgb(5 15 25 / 44%) 0%, transparent 48%),
    linear-gradient(180deg, rgb(5 15 25 / 34%) 0%, transparent 27%);
}

.hero-content {
  align-items: center;
  padding-top: 118px;
  padding-bottom: 78px;
}

h1 {
  max-width: 960px;
  font-size: clamp(4.1rem, 7.7vw, 8rem);
}

.hero-lead {
  font-size: clamp(1.28rem, 2vw, 1.65rem);
}

.hero-data {
  align-self: end;
  padding-bottom: 18px;
}

.scroll-cue {
  bottom: 15px;
}

/* La sección ocupa menos altura y las tarjetas se leen como una
   sola pieza visual. */
.stats-section {
  padding-top: 76px;
  padding-bottom: 86px;
}

.section-intro.compact {
  margin-bottom: 30px;
}

.section-intro h2 {
  font-size: clamp(3rem, 5.2vw, 5.5rem);
}

.stats-grid {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 17px;
  background: rgb(255 255 255 / 24%);
  box-shadow: 0 10px 30px rgb(20 32 43 / 4%);
}

.stat-card {
  min-height: 286px;
  align-items: stretch;
  justify-content: center;
  padding: 30px 24px 28px;
  text-align: center;
}

.stat-number {
  top: 15px;
  right: 17px;
  opacity: .72;
}

.stat-content {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0 !important;
  width: 100%;
}

.stat-icon {
  display: grid !important;
  place-items: center;
  width: 46px;
  height: 46px;
  min-height: 0 !important;
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 2rem !important;
  font-weight: 500 !important;
  line-height: 1;
}

.stat-label {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  min-height: 2.65em !important;
  margin-bottom: 10px;
  color: var(--ink) !important;
  font-size: 1.03rem !important;
  font-weight: 850 !important;
  line-height: 1.24 !important;
  text-wrap: balance;
}

.stat-card strong {
  order: 3;
  justify-content: center;
  min-height: 0;
  margin: 0 0 9px;
  font-size: clamp(3.2rem, 4.6vw, 5.1rem);
  line-height: .95;
  text-align: center;
}

.stat-card small {
  order: 4;
  max-width: 220px;
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.42;
  text-align: center;
  text-wrap: balance;
}

@media (max-width: 1180px) {
  .stat-card {
    min-height: 270px;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 690px;
    align-items: end;
    background-position: 61% center;
  }

  .hero-content {
    padding-top: 105px;
    padding-bottom: 76px;
  }

  .hero-data {
    align-self: auto;
  }

  .stats-section {
    padding-top: 64px;
    padding-bottom: 70px;
  }

  .stats-grid {
    border-radius: 14px;
  }

  .stat-card {
    min-height: 225px;
    padding: 28px 22px;
  }

  .stat-label {
    min-height: 0 !important;
    margin-bottom: 12px;
    font-size: 1.08rem !important;
  }

  .stat-card strong {
    font-size: 4rem;
  }

  .stat-card small {
    font-size: .96rem;
  }
}


/* =========================================================
   V9 · REPRODUCCIÓN DEL BOCETO APROBADO
   ========================================================= */

:root {
  --page-bg: #f7f4ee;
  --card-bg: #fbfaf7;
  --orange: #cf4e08;
  --orange-dark: #a83d04;
  --header-height: 84px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body {
  background: var(--page-bg);
}

/* Cabecera blanca */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1600;
  min-height: var(--header-height);
  padding: 0 max(30px, calc((100vw - 1450px) / 2));
  color: var(--ink);
  border-bottom: 1px solid #ddd8cf;
  background: rgb(251 249 244 / 96%);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--ink);
  font-size: 1.08rem;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.brand-logo {
  width: 48px;
  height: 34px;
  display: inline-flex;
  color: var(--ink);
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.site-header nav {
  align-self: stretch;
  gap: 34px;
}

.site-header nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: .98rem;
  font-weight: 700;
}

.site-header nav a.active::after,
.site-header nav a:hover::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  height: 2px;
  background: var(--orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-icon-button,
.profile-dot {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.header-icon-button {
  border: 1px solid #d8d3ca;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.profile-dot {
  border-radius: 50%;
  background: var(--orange);
  color: white;
}

.header-icon-button svg,
.profile-dot svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero panorámico */
.hero {
  min-height: clamp(410px, 47vw, 520px);
  align-items: center;
  background-position: center 49%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgb(4 15 24 / 80%) 0%, rgb(4 15 24 / 44%) 49%, rgb(4 15 24 / 8%) 76%),
    linear-gradient(0deg, rgb(4 15 24 / 28%) 0%, transparent 48%);
}

.hero-content {
  grid-template-columns: 1fr;
  align-items: center;
  padding: 70px 0 64px;
}

.hero-copy-block {
  max-width: 900px;
}

h1 {
  max-width: 900px;
  margin-bottom: 10px;
  font-size: clamp(2.9rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.hero-lead {
  margin-bottom: 26px;
  font-size: clamp(1.2rem, 1.75vw, 1.55rem);
}

.hero-actions {
  gap: 14px;
}

.primary-button,
.secondary-button {
  min-height: 58px;
  padding-inline: 26px;
}

.primary-button {
  background: var(--orange);
  border-color: var(--orange);
}

.primary-button:hover {
  background: var(--orange-dark);
}

.scroll-cue,
.hero-data {
  display: none !important;
}

/* Estadísticas */
.stats-section {
  padding-top: 52px;
  padding-bottom: 58px;
}

.section-intro.compact {
  margin-bottom: 18px;
}

.section-intro h2 {
  font-size: clamp(3rem, 4.75vw, 5rem);
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stat-card {
  min-height: 278px;
  padding: 26px 20px 24px;
  border: 1px solid #ddd8cf !important;
  border-radius: 15px;
  background: rgb(255 255 255 / 38%);
  text-align: center;
}

.stat-card:last-child {
  border-right: 1px solid #ddd8cf !important;
}

.stat-number {
  display: none;
}

.stat-content {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.stat-icon {
  width: 52px;
  height: 52px;
  display: grid !important;
  place-items: center;
  margin: 0 0 13px;
  color: var(--orange);
}

.stat-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card strong {
  order: 2;
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 0 0 11px;
  font-size: clamp(3.1rem, 4.2vw, 4.65rem);
  line-height: .95;
  white-space: nowrap;
}

.stat-unit {
  margin-left: 7px;
  font-size: .38em;
  font-weight: 800;
  letter-spacing: 0;
}

.stat-label {
  order: 3;
  min-height: 2.4em !important;
  margin-bottom: 8px;
  font-size: 1.03rem !important;
  font-weight: 850 !important;
}

.stat-card small {
  order: 4;
  font-size: .92rem;
}

/* Cabecera de mapa */
.map-section {
  padding-top: 34px;
}

.map-heading {
  align-items: end;
  margin-bottom: 22px;
}

.map-heading h2 {
  font-size: clamp(2.9rem, 4.6vw, 4.9rem);
}

.map-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-map-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid #d8d3ca;
  border-radius: 13px;
  background: rgb(255 255 255 / 45%);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.view-map-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1180px) {
  .site-header nav a:nth-child(n+5) {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 68px;
  }

  .site-header nav,
  .profile-dot {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero {
    min-height: 560px;
    background-position: 61% center;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 70px;
  }

  h1 {
    font-size: clamp(3rem, 13vw, 4.5rem);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 230px;
  }

  .map-heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .view-map-button,
  .search-button.prominent {
    flex: 1 1 220px;
  }
}


/* V9.1 · Corrección de carga y ajuste del hero */
@media (min-width: 1050px) {
  .hero-copy-block {
    max-width: 1120px;
  }

  h1 {
    max-width: 1120px;
    font-size: clamp(2.8rem, 4.2vw, 4.65rem);
    white-space: nowrap;
  }
}


/* ============================================================
   v12 · Navigation system and mobile experience
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 1px 0 rgb(20 30 40 / 8%);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-icon {
  display: none;
  width: 18px;
  height: 18px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 11px;
  border: 0;
  border-radius: 11px;
  background: #eef0ed;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.mobile-menu-overlay {
  position: fixed;
  z-index: 1998;
  inset: 0;
  visibility: hidden;
  background: rgb(5 14 20 / 48%);
  opacity: 0;
  transition: opacity .24s ease, visibility .24s ease;
}

.mobile-menu-drawer {
  position: fixed;
  z-index: 1999;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 390px);
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: #f7f4ee;
  box-shadow: -24px 0 70px rgb(5 14 20 / 20%);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.22,.8,.32,1);
}

.mobile-menu-open {
  overflow: hidden;
}

.mobile-menu-open .mobile-menu-overlay {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-open .mobile-menu-drawer {
  transform: translateX(0);
}

.mobile-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--orange);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mobile-menu-head strong {
  font-size: 1.65rem;
  line-height: 1.02;
}

.mobile-menu-close {
  align-self: flex-start;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #e7e5df;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav {
  display: grid;
  gap: 3px;
  padding: 22px 0;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 820;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: #e8e6df;
  color: var(--orange);
}

.mobile-nav .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.mobile-menu-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgb(255 255 255 / 63%);
  font-size: .78rem;
  font-weight: 750;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: white;
}

.detail-breadcrumbs {
  margin-bottom: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  main {
    animation: pageFade .35s ease both;
  }

  @keyframes pageFade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 900px) {
  .site-header {
    min-height: 68px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-header > nav {
    display: none;
  }

  .site-header .brand {
    max-width: calc(100% - 62px);
    font-size: .98rem;
  }

  .site-header .brand-logo {
    width: 39px;
  }

  .mobile-menu-toggle {
    display: block;
    margin-left: auto;
    flex: 0 0 auto;
  }
}

/* Firebase Authentication · Base Camp */
.auth-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
}

.auth-login-button,
.auth-user-button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  padding: .58rem .82rem;
  color: inherit;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  border: 1px solid rgba(17, 33, 29, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  cursor: pointer;
}

.auth-login-button:hover,
.auth-user-button:hover {
  border-color: #dd5512;
}

.auth-login-button:disabled {
  cursor: wait;
  opacity: .7;
}

.auth-login-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.auth-menu {
  position: relative;
}

.auth-menu > summary {
  list-style: none;
}

.auth-menu > summary::-webkit-details-marker {
  display: none;
}

.auth-avatar {
  display: grid;
  width: 25px;
  height: 25px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #173f34;
  font-size: .68rem;
}

.auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-chevron {
  transform: translateY(-1px);
  font-size: .85rem;
}

.auth-popover {
  position: absolute;
  z-index: 1400;
  top: calc(100% + .65rem);
  right: 0;
  width: min(290px, calc(100vw - 2rem));
  padding: .8rem;
  border: 1px solid #d7d5cd;
  background: #fff;
  box-shadow: 0 18px 42px rgba(10, 31, 25, .18);
}

.auth-identity {
  padding: .5rem .55rem .8rem;
  border-bottom: 1px solid #e2e0da;
}

.auth-identity strong,
.auth-identity span {
  display: block;
}

.auth-identity span {
  margin-top: .2rem;
  overflow-wrap: anywhere;
  color: #69736f;
  font-size: .78rem;
}

.auth-basecamp-link,
.auth-signout-button {
  display: block;
  width: 100%;
  padding: .72rem .58rem;
  color: #152620;
  text-align: left;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.auth-basecamp-link {
  margin-top: .45rem;
  color: #0d5c47;
  font-weight: 800;
}

.auth-basecamp-link:hover,
.auth-signout-button:hover {
  background: #f3f1eb;
}

.auth-signout-button {
  font: inherit;
  font-size: .84rem;
}

.auth-access-note {
  margin: .65rem .55rem;
  color: #9b4b20;
  font-size: .78rem;
  line-height: 1.4;
}

.auth-loading {
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 2px solid rgba(15, 55, 44, .18);
  border-top-color: #0f372c;
  border-radius: 50%;
  animation: auth-spin .8s linear infinite;
}

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

.auth-toast {
  position: fixed;
  z-index: 3000;
  right: 1rem;
  bottom: 1rem;
  max-width: min(390px, calc(100vw - 2rem));
  padding: .9rem 1rem;
  color: #fff;
  border-radius: 4px;
  background: #183d33;
  box-shadow: 0 16px 35px rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}

.auth-toast[data-tone="warning"] { background: #8a4a15; }
.auth-toast[data-tone="error"] { background: #8c2e27; }
.auth-toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .site-header > .header-actions {
    margin-left: auto;
    margin-right: 3.4rem;
  }

  .auth-user-label,
  .auth-chevron {
    display: none;
  }

  .auth-login-button span {
    display: none;
  }

  .auth-login-button,
  .auth-user-button {
    justify-content: center;
    width: 40px;
    padding: 0;
  }
}
