/* Tea Atlas styles: app/atlas.css of tea-atlas@1607389, verbatim. The only change is the first line: the live
   file imported leaflet/dist/leaflet.css, which the layout now links from /atlas/lib/leaflet/leaflet.css (Leaflet 1.9.4). */

:root {
  --atlas-plum: #662461;
  --atlas-plum-deep: #2b1730;
  --atlas-gold: #d5bb75;
  --atlas-gold-light: #e0be6b;
  --atlas-gold-dark: #7a571a;
  --atlas-cream: #f5f0e7;
  --atlas-ivory: #fbf7ec;
  --atlas-paper: #fffdf8;
  --atlas-header-plum: #4b1638;
  --atlas-header-deep: #33102a;
  --atlas-green: #245e31;
  --atlas-green-light: #dfe8dc;
  --atlas-ink: #2b232a;
  --atlas-muted: #756c70;
  --atlas-line: rgba(69, 44, 48, 0.14);
  --atlas-shadow: 0 24px 70px rgba(41, 24, 38, 0.13);
}

html:has(.atlas-app) { scroll-behavior: smooth; background: var(--atlas-cream); }
body:has(.atlas-app) { background: var(--atlas-cream); }

.atlas-app {
  min-height: 100vh;
  overflow: hidden;
  color: var(--atlas-ink);
  background:
    radial-gradient(circle at 93% 5%, rgba(212, 185, 110, 0.18), transparent 28rem),
    radial-gradient(circle at 5% 28%, rgba(92, 36, 88, 0.06), transparent 28rem),
    var(--atlas-cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.atlas-app button,
.atlas-app input { font: inherit; }

.atlas-app button:focus-visible,
.atlas-app input:focus-visible,
.atlas-app a:focus-visible {
  outline: 3px solid rgba(92, 36, 88, 0.28);
  outline-offset: 3px;
}

.atlas-header {
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(224, 190, 107, 0.35);
  background: linear-gradient(105deg, var(--atlas-header-deep), var(--atlas-header-plum));
  color: var(--atlas-ivory);
  box-shadow: 0 8px 22px rgba(51, 16, 42, 0.14);
}

.atlas-header-inner {
  width: min(100%, 1240px);
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
}

.atlas-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(224, 190, 107, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--atlas-ivory);
  font-size: 2rem;
  line-height: 1;
}

.atlas-back:hover { border-color: var(--atlas-gold-light); background: rgba(255, 255, 255, 0.09); color: white; }

.atlas-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--atlas-plum-deep);
  text-decoration: none;
}

.atlas-header .atlas-brand { color: var(--atlas-ivory); }

.atlas-brand-mark {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(224, 190, 107, 0.72);
  border-radius: 50%;
  background: var(--atlas-header-plum);
  box-shadow: 0 4px 12px rgba(20, 4, 17, 0.2);
}

.atlas-brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.atlas-brand-copy { display: grid; line-height: 1.05; }
.atlas-brand strong,
.atlas-brand small { display: block; }
.atlas-brand strong { font-family: Georgia, serif; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.atlas-brand small { margin-top: 0.23rem; color: var(--atlas-gold-dark); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.atlas-header .atlas-brand small { color: var(--atlas-gold-light); }

.atlas-header button:focus-visible,
.atlas-header a:focus-visible { outline-color: var(--atlas-gold-light); }

.atlas-intro {
  width: min(1380px, calc(100% - 48px));
  min-height: 330px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  gap: clamp(40px, 8vw, 128px);
  align-items: center;
  padding: 54px 0 48px;
}

.atlas-eyebrow {
  margin: 0;
  color: var(--atlas-gold-dark);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.atlas-intro h1 {
  margin: 12px 0 0;
  color: var(--atlas-plum-deep);
  font: 500 clamp(3.1rem, 6.1vw, 6rem)/0.92 Georgia, "Times New Roman", serif;
  letter-spacing: -0.055em;
}
.atlas-intro h1 em { color: var(--atlas-plum); font-weight: 500; }

.atlas-intro-copy > p {
  max-width: 570px;
  margin: 0;
  color: var(--atlas-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.75;
}

.atlas-intro-copy dl {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--atlas-line);
}
.atlas-intro-copy dl > div { padding: 20px 12px 0; border-right: 1px solid var(--atlas-line); }
.atlas-intro-copy dl > div:first-child { padding-left: 0; }
.atlas-intro-copy dl > div:last-child { border-right: 0; }
.atlas-intro-copy dt { color: var(--atlas-plum-deep); font: 500 1.65rem Georgia, serif; }
.atlas-intro-copy dd { margin: 4px 0 0; color: var(--atlas-muted); font-size: 0.57rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }

.atlas-explorer {
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px clamp(18px, 3vw, 44px) 44px;
  border: 1px solid rgba(78, 51, 68, 0.12);
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.82);
  box-shadow: 0 30px 90px rgba(46, 28, 44, 0.08);
}

.atlas-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.atlas-toolbar h2,
.atlas-directory-heading h2 {
  margin: 8px 0 0;
  color: var(--atlas-plum-deep);
  font: 500 clamp(1.7rem, 3.2vw, 2.7rem)/1.04 Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.atlas-search {
  width: min(390px, 100%);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 15px;
  border: 1px solid var(--atlas-line);
  border-radius: 13px;
  background: white;
  box-shadow: 0 6px 20px rgba(44, 24, 48, 0.05);
}
.atlas-search > span:first-child { color: var(--atlas-plum); font-size: 1.1rem; }
.atlas-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--atlas-ink); font-size: 0.76rem; }
.atlas-search input::placeholder { color: #9a9296; }
.atlas-search button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f0e8ef; color: var(--atlas-plum); }

.atlas-layer-switch {
  width: fit-content;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 6px;
  margin-top: 24px;
  padding: 5px;
  border: 1px solid var(--atlas-line);
  border-radius: 14px;
  background: rgba(245, 240, 231, 0.72);
}
.atlas-layer-switch button {
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--atlas-muted);
}
.atlas-layer-switch button span { font-size: 0.68rem; font-weight: 850; }
.atlas-layer-switch button small { font-size: 0.5rem; }
.atlas-layer-switch button.is-active { border-color: rgba(92, 36, 88, 0.24); background: var(--atlas-paper); color: var(--atlas-plum); box-shadow: 0 5px 14px rgba(44, 24, 48, 0.07); }

.atlas-filter-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.atlas-filter-row > div { display: flex; flex-wrap: wrap; gap: 7px; }
.atlas-filter-row button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--atlas-line);
  border-radius: 999px;
  background: transparent;
  color: var(--atlas-muted);
  font-size: 0.64rem;
  font-weight: 750;
}
.atlas-filter-row button:hover,
.atlas-filter-row button.is-active { border-color: var(--atlas-plum); background: var(--atlas-plum); color: white; }
.atlas-filter-row > p { margin: 0; color: var(--atlas-muted); font-size: 0.65rem; white-space: nowrap; }
.atlas-filter-row > p strong { color: var(--atlas-plum-deep); font-family: Georgia, serif; font-size: 0.92rem; }
.atlas-filter-row > .atlas-review-note { display: flex; align-items: center; gap: 8px; color: var(--atlas-plum); font-weight: 750; white-space: normal; }
.atlas-review-note > span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--atlas-gold); border-radius: 50%; color: var(--atlas-gold-dark); }

.atlas-map-shell {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 395px;
  overflow: hidden;
  border: 1px solid rgba(42, 29, 39, 0.18);
  border-radius: 20px;
  background: #dce6dc;
  box-shadow: var(--atlas-shadow);
}

.atlas-map-area { min-width: 0; min-height: 720px; position: relative; background: #dce6dc; }
.atlas-map { width: 100%; height: 100%; min-height: 720px; background: #dce6dc; }
.atlas-map .leaflet-tile-pane { filter: saturate(0.64) sepia(0.08) hue-rotate(76deg) brightness(1.04) contrast(0.9); }
.atlas-map .leaflet-control-attribution { padding: 3px 7px; background: rgba(255, 252, 247, 0.82); color: #6c6568; font-size: 0.5rem; backdrop-filter: blur(6px); }
.atlas-map .leaflet-control-attribution a { color: var(--atlas-plum); }

.atlas-map .atlas-farm-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(64, 31, 60, 0.16);
  border-radius: 15px;
  background: #fffdf8;
  box-shadow: 0 18px 44px rgba(44, 24, 48, 0.22);
}
.atlas-map .atlas-farm-popup .leaflet-popup-content { width: auto !important; margin: 0; }
.atlas-map .atlas-farm-popup .leaflet-popup-tip { background: #fffdf8; box-shadow: 3px 3px 9px rgba(44, 24, 48, 0.12); }
.atlas-map .atlas-farm-popup .leaflet-popup-close-button {
  z-index: 2;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--atlas-plum);
  font-size: 20px;
  line-height: 26px;
}
.atlas-map .atlas-farm-popup .leaflet-popup-close-button:hover { background: rgba(75, 22, 56, 0.08); }
.atlas-popup-card {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 17px 18px 15px;
  border: 0;
  background: #fffdf8;
  color: var(--atlas-ink);
  text-align: left;
  cursor: pointer;
}
.atlas-popup-card:hover,
.atlas-popup-card:focus-visible { background: #fbf6e9; outline: none; }
.atlas-popup-location {
  max-width: calc(100% - 26px);
  overflow: hidden;
  color: var(--atlas-green);
  font-size: 0.49rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.atlas-popup-card > strong { padding-right: 24px; color: var(--atlas-plum-deep); font: 500 1.24rem/1.05 Georgia, serif; }
.atlas-popup-fact { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 9px; padding-top: 8px; border-top: 1px solid var(--atlas-line); }
.atlas-popup-fact small { color: var(--atlas-muted); font-size: 0.45rem; font-weight: 800; letter-spacing: 0.035em; text-transform: uppercase; }
.atlas-popup-fact b { color: var(--atlas-plum-deep); font-family: Georgia, serif; font-size: 0.58rem; font-weight: 500; line-height: 1.3; }
.atlas-popup-open { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--atlas-line); color: var(--atlas-plum); font-size: 0.56rem; font-weight: 850; }
.atlas-popup-open i { font-size: 0.9rem; font-style: normal; }

.atlas-map-loading {
  position: absolute;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  background: linear-gradient(145deg, #e8eadf, #d9e4d9);
  color: var(--atlas-green);
  font-family: Georgia, serif;
}
.atlas-map-loading i { width: 34px; height: 34px; border: 1px solid rgba(36, 79, 54, 0.25); border-top-color: var(--atlas-green); border-radius: 50%; animation: atlas-spin 1s linear infinite; }

.atlas-map-controls {
  position: absolute;
  z-index: 700;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 6px;
}
.atlas-map-controls button {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(44, 24, 48, 0.15);
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.95);
  color: var(--atlas-plum-deep);
  font-size: 1.25rem;
  box-shadow: 0 6px 18px rgba(44, 24, 48, 0.12);
  backdrop-filter: blur(10px);
}
.atlas-map-controls button:hover { background: var(--atlas-plum); color: white; }
.atlas-map-controls .atlas-home-control { margin-top: 4px; font-size: 0.95rem; }

.atlas-map-hint {
  max-width: 350px;
  position: absolute;
  z-index: 700;
  left: 18px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px 11px 11px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(43, 24, 47, 0.9);
  color: white;
  box-shadow: 0 12px 30px rgba(37, 24, 34, 0.18);
  backdrop-filter: blur(12px);
}
.atlas-hint-symbol { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(212,185,110,0.52); border-radius: 50%; color: #f2d58d; }
.atlas-map-hint strong,
.atlas-map-hint small { display: block; }
.atlas-map-hint strong { font-family: Georgia, serif; font-size: 0.74rem; font-weight: 500; }
.atlas-map-hint small { margin-top: 3px; color: rgba(255,255,255,0.67); font-size: 0.55rem; }

.atlas-empty-map {
  min-width: 250px;
  position: absolute;
  z-index: 720;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 24px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.95);
  color: var(--atlas-ink);
  text-align: center;
  box-shadow: var(--atlas-shadow);
}
.atlas-empty-map > span { font-size: 2rem; color: var(--atlas-plum); }
.atlas-empty-map strong { display: block; margin-top: 4px; font-family: Georgia, serif; }
.atlas-empty-map p { margin: 7px 0 14px; color: var(--atlas-muted); font-size: 0.65rem; }
.atlas-empty-map button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; background: var(--atlas-plum); color: white; font-size: 0.63rem; font-weight: 750; }

.atlas-cluster-wrap,
.atlas-farm-wrap { border: 0 !important; background: transparent !important; }
.atlas-cluster-wrap { overflow: visible !important; }
.atlas-cluster {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  position: relative;
  border: 1px solid rgba(255, 244, 214, 0.9);
  border-radius: 50%;
  background: rgba(62, 29, 59, 0.92);
  color: white;
  box-shadow: 0 0 0 7px rgba(92,36,88,0.13), 0 10px 26px rgba(44,24,48,0.25);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.atlas-cluster::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(212,185,110,0.35); border-radius: 50%; }
.atlas-cluster b { position: relative; z-index: 1; font: 500 1.35rem/1 Georgia, serif; }
.atlas-cluster small { max-width: 55px; position: relative; z-index: 1; margin-top: 2px; overflow: hidden; color: #e7cd8a; font-size: 0.43rem; font-weight: 800; letter-spacing: 0.06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.atlas-cluster-wrap:hover .atlas-cluster,
.atlas-cluster-wrap:focus .atlas-cluster { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(92,36,88,0.16), 0 14px 34px rgba(44,24,48,0.3); }

.atlas-farm-wrap { overflow: visible !important; }
.atlas-farm-pin {
  width: 32px;
  height: 32px;
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 1px solid rgba(255,248,224,0.92);
  border-radius: 50% 50% 50% 5px;
  background: var(--atlas-plum);
  box-shadow: 0 0 0 5px rgba(92,36,88,0.14), 0 8px 18px rgba(44,24,48,0.3);
  transition: transform 160ms ease, background 160ms ease;
}
.atlas-farm-pin i { width: 8px; height: 8px; transform: rotate(-45deg); border: 1px solid #f7dfa4; border-radius: 50%; background: rgba(255,255,255,0.18); }
.atlas-farm-pin.is-selected { background: var(--atlas-green); box-shadow: 0 0 0 7px rgba(36,79,54,0.18), 0 10px 24px rgba(32,57,41,0.32); }
.atlas-farm-wrap:hover .atlas-farm-pin,
.atlas-farm-wrap:focus .atlas-farm-pin { transform: rotate(45deg) scale(1.12); background: #762d70; }
.atlas-farm-label {
  max-width: 130px;
  position: absolute;
  left: 40px;
  top: 1px;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(44,24,48,0.13);
  border-radius: 8px;
  background: rgba(255,252,247,0.94);
  color: var(--atlas-plum-deep);
  font-size: 0.58rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(44,24,48,0.13);
  backdrop-filter: blur(7px);
}

.atlas-research-wrap { overflow: visible !important; border: 0 !important; background: transparent !important; }
.atlas-research-marker {
  min-width: 144px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(255, 244, 214, 0.88);
  border-radius: 999px;
  background: rgba(62, 29, 59, 0.93);
  color: white;
  box-shadow: 0 0 0 6px rgba(92, 36, 88, 0.12), 0 10px 26px rgba(44, 24, 48, 0.24);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.atlas-research-marker b { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(224, 190, 107, 0.58); border-radius: 50%; color: #efd58e; font: 500 0.9rem Georgia, serif; }
.atlas-research-marker small { max-width: 106px; overflow: hidden; font-size: 0.54rem; font-weight: 820; letter-spacing: 0.02em; text-overflow: ellipsis; white-space: nowrap; }
.atlas-research-marker.is-selected { background: var(--atlas-green); box-shadow: 0 0 0 8px rgba(36, 94, 49, 0.16), 0 12px 28px rgba(32, 57, 41, 0.3); }
.atlas-research-wrap:hover .atlas-research-marker,
.atlas-research-wrap:focus .atlas-research-marker { transform: translateY(-2px); background: #762d70; box-shadow: 0 0 0 8px rgba(92, 36, 88, 0.15), 0 14px 32px rgba(44, 24, 48, 0.28); }

.atlas-detail-panel {
  min-width: 0;
  max-height: 720px;
  overflow-y: auto;
  border-left: 1px solid var(--atlas-line);
  background: var(--atlas-paper);
  scrollbar-width: thin;
  scrollbar-color: rgba(92,36,88,0.25) transparent;
}

.atlas-welcome { min-height: 100%; padding: 42px 35px; display: flex; flex-direction: column; }
.atlas-compass {
  width: 94px;
  height: 94px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 2px auto 35px;
  border: 1px solid rgba(92,36,88,0.19);
  border-radius: 50%;
  color: var(--atlas-gold-dark);
}
.atlas-compass::before,
.atlas-compass::after { content: ""; position: absolute; background: rgba(92,36,88,0.16); }
.atlas-compass::before { width: 1px; height: 116px; }
.atlas-compass::after { width: 116px; height: 1px; }
.atlas-compass span { position: absolute; top: 9px; font: 600 0.55rem Georgia, serif; }
.atlas-compass i { width: 29px; height: 43px; transform: rotate(28deg); clip-path: polygon(50% 0, 100% 100%, 50% 75%, 0 100%); background: linear-gradient(90deg, var(--atlas-plum) 50%, var(--atlas-gold) 50%); }
.atlas-welcome h3 { margin: 9px 0 24px; color: var(--atlas-plum-deep); font: 500 1.75rem/1.12 Georgia, serif; }
.atlas-welcome ol { margin: 0; padding: 0; list-style: none; }
.atlas-welcome li { display: flex; gap: 13px; padding: 13px 0; border-top: 1px solid var(--atlas-line); }
.atlas-welcome li > span { margin-top: 2px; color: var(--atlas-gold-dark); font-size: 0.52rem; font-weight: 850; }
.atlas-welcome li p { margin: 0; }
.atlas-welcome li strong,
.atlas-welcome li small { display: block; }
.atlas-welcome li strong { color: var(--atlas-plum-deep); font-family: Georgia, serif; font-size: 0.78rem; }
.atlas-welcome li small { margin-top: 4px; color: var(--atlas-muted); font-size: 0.58rem; line-height: 1.45; }

.atlas-quick-picks { margin-top: auto; padding-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.atlas-quick-picks > span { grid-column: 1 / -1; margin-bottom: 2px; color: var(--atlas-muted); font-size: 0.52rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.atlas-quick-picks button { min-width: 0; display: flex; justify-content: space-between; gap: 7px; padding: 9px 10px; overflow: hidden; border: 1px solid var(--atlas-line); border-radius: 8px; background: transparent; color: var(--atlas-plum-deep); font-size: 0.56rem; font-weight: 750; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.atlas-quick-picks button:hover { border-color: var(--atlas-plum); background: #f2eaf1; }
.atlas-quick-picks i { color: var(--atlas-plum); font-style: normal; }

.research-welcome { padding-top: 32px; }
.research-database-seal { width: 104px; height: 104px; display: grid; place-items: center; align-content: center; margin: 0 auto 28px; border: 1px solid rgba(92, 36, 88, 0.23); border-radius: 50%; color: var(--atlas-plum); box-shadow: inset 0 0 0 6px rgba(212, 185, 110, 0.12); }
.research-database-seal strong { font: 500 1.65rem/1 Georgia, serif; }
.research-database-seal span { margin-top: 5px; color: var(--atlas-gold-dark); font-size: 0.43rem; font-weight: 850; letter-spacing: 0.1em; line-height: 1.15; text-align: center; text-transform: uppercase; }
.research-welcome h3 { margin-bottom: 12px; }
.research-welcome-copy { margin: 0 0 18px; color: var(--atlas-muted); font-family: Georgia, serif; font-size: 0.72rem; line-height: 1.58; }
.research-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 18px; border: 1px solid var(--atlas-line); border-radius: 12px; overflow: hidden; }
.research-summary > div { padding: 12px 8px; border-right: 1px solid var(--atlas-line); text-align: center; }
.research-summary > div:last-child { border-right: 0; }
.research-summary dt { color: var(--atlas-plum); font: 500 0.92rem Georgia, serif; }
.research-summary dd { margin: 4px 0 0; color: var(--atlas-muted); font-size: 0.43rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.research-safeguard { display: flex; gap: 10px; padding: 12px; border: 1px solid rgba(36, 94, 49, 0.18); border-radius: 11px; background: rgba(223, 232, 220, 0.52); }
.research-safeguard > span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(36, 94, 49, 0.26); border-radius: 50%; color: var(--atlas-green); }
.research-safeguard p { margin: 0; }
.research-safeguard strong,
.research-safeguard small { display: block; }
.research-safeguard strong { color: var(--atlas-green); font-size: 0.61rem; }
.research-safeguard small { margin-top: 3px; color: var(--atlas-muted); font-size: 0.5rem; line-height: 1.4; }
.research-quick-picks { margin-top: 20px; padding-top: 0; }

.research-detail { min-height: 100%; position: relative; background: var(--atlas-paper); }
.research-detail-close { border-color: rgba(255, 255, 255, 0.4); }
.research-detail-art { height: 190px; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 70% 15%, rgba(247, 222, 156, 0.3), transparent 8rem), linear-gradient(145deg, #351633, #662461 60%, #2b1730); color: white; }
.research-detail-art > span { font: 500 3.4rem/0.9 Georgia, serif; }
.research-detail-art > small { margin-top: 9px; color: #efd58e; font-size: 0.54rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
.research-detail-copy { padding: 26px 29px 31px; }
.research-detail-copy h3 { margin: 8px 0 5px; color: var(--atlas-plum-deep); font: 500 2.15rem/1.03 Georgia, serif; letter-spacing: -0.035em; }
.research-facts dd { font-size: 0.76rem; }
.research-review-stack { display: grid; gap: 7px; margin-top: 20px; }
.research-review-stack > span { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--atlas-line); border-radius: 8px; color: var(--atlas-muted); font-size: 0.54rem; font-weight: 750; }
.research-review-stack i { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(92, 36, 88, 0.1); color: var(--atlas-plum); font-size: 0.5rem; font-style: normal; }
.research-provenance { margin: 16px 0 0; color: var(--atlas-muted); font-size: 0.47rem; line-height: 1.45; }

.farm-detail { min-height: 100%; position: relative; background: var(--atlas-paper); }
.farm-detail-close {
  width: 35px;
  height: 35px;
  position: absolute;
  z-index: 4;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  background: rgba(43,24,47,0.7);
  color: white;
  font-size: 1.1rem;
  backdrop-filter: blur(8px);
}
.farm-detail-art {
  height: 190px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 75% 14%, rgba(247,222,156,0.36), transparent 7rem),
    linear-gradient(145deg, #1f4935, #52744e 57%, #283f34);
}
.farm-detail-art::before,
.farm-detail-art::after,
.farm-detail-art i,
.farm-detail-art b { content: ""; position: absolute; border: 1px solid rgba(242,221,161,0.2); border-radius: 50%; }
.farm-detail-art::before { width: 420px; height: 120px; left: -90px; bottom: -62px; transform: rotate(7deg); }
.farm-detail-art::after { width: 360px; height: 90px; left: 55px; bottom: -45px; transform: rotate(-7deg); }
.farm-detail-art i { width: 250px; height: 75px; left: -55px; bottom: -30px; transform: rotate(-8deg); }
.farm-detail-art b { width: 18px; height: 34px; right: 48px; top: 32px; transform: rotate(37deg); border-radius: 100% 0 100% 0; }
.farm-detail-art > span {
  width: 74px;
  height: 74px;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247,226,171,0.6);
  border-radius: 50%;
  color: #f3db9e;
  font: 500 1.35rem Georgia, serif;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.04), 0 12px 30px rgba(22,44,31,0.2);
}

.farm-detail-copy { padding: 26px 29px 31px; }
.farm-detail-copy h3 { margin: 8px 0 5px; color: var(--atlas-plum-deep); font: 500 2.15rem/1.03 Georgia, serif; letter-spacing: -0.035em; }
.farm-location { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--atlas-muted); font-size: 0.62rem; }
.farm-location span { color: var(--atlas-plum); font-size: 0.85rem; }
.farm-description { margin: 19px 0 15px; color: var(--atlas-muted); font-family: Georgia, serif; font-size: 0.83rem; line-height: 1.62; }
.farm-tea-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.farm-tea-tags span { padding: 5px 8px; border: 1px solid rgba(36,79,54,0.16); border-radius: 999px; background: #edf3e9; color: var(--atlas-green); font-size: 0.5rem; font-weight: 800; }
.farm-facts { margin: 21px 0 0; border-top: 1px solid var(--atlas-line); }
.farm-facts > div { display: grid; grid-template-columns: 95px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--atlas-line); }
.farm-facts dt { color: var(--atlas-muted); font-size: 0.51rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.farm-facts dd { margin: 0; color: var(--atlas-plum-deep); font-family: Georgia, serif; font-size: 0.67rem; line-height: 1.35; }
.farm-links { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.farm-links a,
.farm-links button { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 0 12px; border: 1px solid var(--atlas-plum); border-radius: 9px; background: transparent; color: var(--atlas-plum); font: inherit; font-size: 0.58rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.farm-links > :first-child { background: var(--atlas-plum); color: white; }
.farm-links a:hover,
.farm-links button:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(44,24,48,0.12); }
.farm-source { margin: 14px 0 0; display: flex; align-items: center; gap: 7px; color: var(--atlas-muted); font-size: 0.5rem; }
.farm-source i { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #e5eee1; color: var(--atlas-green); font-size: 0.45rem; font-style: normal; }

.atlas-directory {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 98px;
}
.atlas-directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.atlas-directory-heading > p { max-width: 440px; margin: 0; color: var(--atlas-muted); font-family: Georgia, serif; font-size: 0.78rem; line-height: 1.55; text-align: right; }
.atlas-farm-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.atlas-farm-grid > button {
  min-height: 235px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 15px;
  background: rgba(255,252,247,0.74);
  color: var(--atlas-ink);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.atlas-farm-grid > button::after { content: ""; width: 120px; height: 120px; position: absolute; right: -69px; top: -70px; border: 1px solid rgba(92,36,88,0.07); border-radius: 50%; }
.atlas-farm-grid > button:hover,
.atlas-farm-grid > button.is-selected { transform: translateY(-3px); border-color: rgba(92,36,88,0.34); background: var(--atlas-paper); box-shadow: 0 17px 36px rgba(44,24,48,0.09); }
.farm-card-number { color: var(--atlas-gold-dark); font: 500 0.65rem Georgia, serif; }
.farm-card-region { margin: 17px 0 6px; color: var(--atlas-plum); font-size: 0.49rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.atlas-farm-grid strong { color: var(--atlas-plum-deep); font: 500 1.15rem/1.1 Georgia, serif; }
.atlas-farm-grid small { margin-top: 5px; color: var(--atlas-muted); font-size: 0.54rem; line-height: 1.4; }
.farm-card-teas { margin-top: 16px; color: var(--atlas-green); font-size: 0.51rem; font-weight: 800; }
.farm-card-open { width: 100%; margin-top: auto; display: flex; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--atlas-line); color: var(--atlas-muted); font-size: 0.54rem; font-weight: 750; }
.farm-card-open i { color: var(--atlas-plum); font-size: 0.75rem; font-style: normal; }
.atlas-farm-grid > .research-card { min-height: 225px; background: linear-gradient(155deg, rgba(255, 252, 247, 0.84), rgba(239, 230, 237, 0.62)); }
.atlas-farm-grid > .research-card .farm-card-region { color: var(--atlas-gold-dark); }
.atlas-farm-grid > .research-card .farm-card-teas { color: var(--atlas-plum); }

.atlas-footer {
  min-height: 126px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 24px clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--atlas-line);
  background: rgba(255,252,247,0.62);
}
.atlas-footer p { margin: 0; color: var(--atlas-muted); font-family: Georgia, serif; font-size: 0.66rem; text-align: center; }
.atlas-footer > a:last-child { justify-self: end; color: var(--atlas-plum); font-size: 0.62rem; font-weight: 750; text-decoration: none; }

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

@media (max-width: 1180px) {
  .atlas-map-shell { grid-template-columns: minmax(0, 1fr) 355px; }
  .atlas-farm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 930px) {
  .atlas-intro { grid-template-columns: 1fr; gap: 26px; padding: 48px 0; }
  .atlas-intro-copy { max-width: 660px; }
  .atlas-map-shell { grid-template-columns: 1fr; }
  .atlas-map-area,
  .atlas-map { min-height: 610px; }
  .atlas-detail-panel { max-height: none; border-top: 1px solid var(--atlas-line); border-left: 0; }
  .atlas-welcome { min-height: 500px; }
  .farm-detail { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr); }
  .farm-detail-art { height: 100%; min-height: 600px; }
  .atlas-farm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .atlas-header { min-height: 68px; }
  .atlas-header-inner { padding: 10px 16px; gap: 14px; }
  .atlas-brand-mark { width: 37px; height: 37px; }
  .atlas-back { width: 38px; height: 38px; }
  .atlas-brand strong { font-size: 0.76rem; }
  .atlas-brand small { font-size: 0.45rem; }
  .atlas-intro { width: min(100% - 32px, 620px); min-height: 0; padding: 44px 0 38px; }
  .atlas-intro h1 { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .atlas-intro-copy > p { font-size: 0.92rem; }
  .atlas-intro-copy dl > div { padding-inline: 8px; }
  .atlas-intro-copy dt { font-size: 1.35rem; }
  .atlas-intro-copy dd { font-size: 0.47rem; }
  .atlas-explorer { width: 100%; padding: 28px 14px 22px; border-right: 0; border-left: 0; border-radius: 0; }
  .atlas-toolbar { align-items: stretch; flex-direction: column; gap: 20px; }
  .atlas-search { width: 100%; }
  .atlas-layer-switch { width: 100%; grid-template-columns: 1fr 1fr; }
  .atlas-layer-switch button { padding-inline: 8px; }
  .atlas-filter-row { align-items: flex-start; flex-direction: column; padding: 16px 0 18px; }
  .atlas-filter-row > div { flex-wrap: nowrap; width: calc(100vw - 28px); padding-bottom: 4px; overflow-x: auto; }
  .atlas-filter-row button { flex: 0 0 auto; }
  .atlas-map-shell { min-height: 0; border-radius: 14px; }
  .atlas-map-area,
  .atlas-map { min-height: 66vh; }
  .atlas-map-hint { right: 14px; bottom: 16px; left: 14px; max-width: none; }
  .atlas-map-controls { top: 13px; left: 13px; }
  .atlas-map-controls button { width: 38px; height: 38px; }
  .farm-detail { display: block; }
  .farm-detail-art { height: 175px; min-height: 0; }
  .farm-detail-copy { padding: 25px 21px 28px; }
  .farm-detail-copy h3 { font-size: 1.85rem; }
  .research-detail-art { height: 175px; }
  .research-detail-copy { padding: 25px 21px 28px; }
  .research-detail-copy h3 { font-size: 1.85rem; }
  .atlas-welcome { min-height: 560px; padding: 38px 25px; }
  .atlas-directory { width: min(100% - 32px, 620px); padding: 64px 0 72px; }
  .atlas-directory-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .atlas-directory-heading > p { text-align: left; }
  .atlas-farm-grid { grid-template-columns: 1fr; }
  .atlas-farm-grid > button { min-height: 215px; }
  .atlas-footer { grid-template-columns: 1fr auto; }
  .atlas-footer p { display: none; }
}

@media (max-width: 420px) {
  .farm-links { grid-template-columns: 1fr; }
  .atlas-map-area,
  .atlas-map { min-height: 600px; }
}

html[data-vintage-fork-mobile="true"] .atlas-back { display: none; }

html[data-vintage-fork-mobile="true"] .atlas-header {
  min-height: 60px;
  padding: 8px 16px;
}

html[data-vintage-fork-mobile="true"] .atlas-header-inner {
  min-height: 44px;
  grid-template-columns: 1fr;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .atlas-app *,
  .atlas-app *::before,
  .atlas-app *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
