/*! JDServer station profile v1.0.0 */
.station-profile-page{display:grid;gap:26px;padding:22px 0 72px}
.station-profile-hero{position:relative;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(250px,.6fr);gap:28px;overflow:hidden;padding:clamp(26px,5vw,56px);border:1px solid color-mix(in srgb,var(--site-primary,#3478f6) 22%,rgba(120,140,170,.18));border-radius:clamp(24px,4vw,38px);background:radial-gradient(circle at 92% 0,color-mix(in srgb,var(--site-accent,#18b7a0) 22%,transparent),transparent 42%),linear-gradient(145deg,color-mix(in srgb,var(--site-primary,#3478f6) 12%,var(--card,#fff)),var(--card,#fff));box-shadow:0 26px 80px rgba(20,40,75,.1)}
.station-profile-hero:after{content:"";position:absolute;right:-80px;bottom:-120px;width:320px;height:320px;border:1px solid color-mix(in srgb,var(--site-primary,#3478f6) 22%,transparent);border-radius:50%;box-shadow:0 0 0 34px color-mix(in srgb,var(--site-primary,#3478f6) 5%,transparent),0 0 0 72px color-mix(in srgb,var(--site-primary,#3478f6) 4%,transparent);pointer-events:none}
.station-profile-hero-copy,.station-profile-geo{position:relative;z-index:1}
.station-profile-eyebrow{display:block;margin-bottom:10px;color:var(--site-primary,#3478f6);font-size:.74rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.station-profile-hero h1{margin:0;font-size:clamp(2.35rem,7vw,5.4rem);line-height:.95;letter-spacing:-.05em}
.station-profile-identity{margin:18px 0 0;font-size:clamp(1.05rem,2.5vw,1.35rem);font-weight:850}
.station-profile-description{max-width:760px;margin:18px 0 0;color:var(--muted,#667085);font-size:clamp(1rem,2vw,1.14rem);line-height:1.72;white-space:pre-line}
.station-profile-geo{align-self:end;display:grid;gap:12px}
.station-profile-geo article{padding:18px;border:1px solid color-mix(in srgb,var(--site-primary,#3478f6) 16%,rgba(120,140,170,.2));border-radius:20px;background:color-mix(in srgb,var(--card,#fff) 82%,transparent);backdrop-filter:blur(16px)}
.station-profile-geo span{display:block;margin-bottom:7px;color:var(--muted,#667085);font-size:.74rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.station-profile-geo strong{font-size:1.12rem;word-break:break-word}
.station-profile-section,.station-profile-narrative article,.station-profile-rain{padding:clamp(22px,4vw,34px);border:1px solid rgba(100,120,150,.16);border-radius:28px;background:var(--card,#fff);box-shadow:0 16px 50px rgba(25,45,80,.07)}
.station-profile-section>h2,.station-profile-narrative h2,.station-profile-rain h2{margin:0 0 20px;font-size:clamp(1.45rem,3vw,2rem)}
.station-profile-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.station-profile-fact{padding:17px;border-radius:18px;background:color-mix(in srgb,var(--site-primary,#3478f6) 7%,var(--card,#fff));border:1px solid color-mix(in srgb,var(--site-primary,#3478f6) 14%,transparent)}
.station-profile-fact dt{color:var(--muted,#667085);font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.station-profile-fact dd{margin:7px 0 0;font-size:1.02rem;font-weight:850;line-height:1.35}
.station-profile-narrative{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.station-profile-narrative article{min-height:100%}.station-profile-narrative p{margin:0;color:var(--muted,#667085);line-height:1.68;white-space:pre-line}
.station-profile-sensors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.station-profile-sensor{position:relative;min-height:150px;padding:20px;border:1px solid color-mix(in srgb,var(--site-secondary,#7657f6) 18%,rgba(120,140,170,.15));border-radius:21px;background:linear-gradient(150deg,color-mix(in srgb,var(--site-secondary,#7657f6) 8%,var(--card,#fff)),var(--card,#fff))}
.station-profile-sensor-number{position:absolute;top:15px;right:16px;color:color-mix(in srgb,var(--site-secondary,#7657f6) 46%,transparent);font-size:1.2rem;font-weight:950}
.station-profile-sensor h3{max-width:80%;margin:0 0 14px;font-size:1.16rem}.station-profile-sensor strong{display:block;margin-bottom:8px;color:var(--site-secondary,#7657f6)}.station-profile-sensor p{margin:0;color:var(--muted,#667085);line-height:1.5}
.station-profile-rain{display:grid;grid-template-columns:auto 1fr;gap:20px;align-items:start;background:linear-gradient(135deg,color-mix(in srgb,#64748b 8%,var(--card,#fff)),var(--card,#fff))}
.station-profile-rain.is-corrected{border-color:color-mix(in srgb,var(--site-accent,#18b7a0) 32%,transparent);background:linear-gradient(135deg,color-mix(in srgb,var(--site-accent,#18b7a0) 13%,var(--card,#fff)),var(--card,#fff))}
.station-profile-rain-icon{display:grid;width:54px;height:54px;place-items:center;border-radius:18px;background:color-mix(in srgb,var(--site-accent,#18b7a0) 17%,transparent);color:var(--site-accent,#18b7a0);font-size:1.4rem}.station-profile-rain h2{margin-bottom:10px}.station-profile-rain p{margin:6px 0;color:var(--muted,#667085);line-height:1.55}
.station-profile-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.station-profile-photo{overflow:hidden;margin:0;border:1px solid rgba(100,120,150,.16);border-radius:22px;background:color-mix(in srgb,var(--site-primary,#3478f6) 4%,var(--card,#fff))}.station-profile-photo-button{position:relative;display:block;width:100%;height:240px;padding:0;border:0;background:#0b1220;cursor:zoom-in;overflow:hidden}.station-profile-photo-button img{width:100%;height:100%;object-fit:cover;transition:transform .28s ease}.station-profile-photo-button:hover img{transform:scale(1.035)}.station-profile-photo-button span{position:absolute;right:14px;bottom:14px;display:grid;width:38px;height:38px;place-items:center;border-radius:50%;background:rgba(255,255,255,.9);color:#111;font-size:1.4rem}.station-profile-photo figcaption{padding:15px 17px;color:var(--muted,#667085);line-height:1.45}
.station-profile-dialog{width:min(1200px,calc(100vw - 24px));max-height:calc(100vh - 24px);padding:0;border:0;border-radius:24px;background:#05070b;color:#fff;box-shadow:0 40px 120px rgba(0,0,0,.7);overflow:auto}.station-profile-dialog::backdrop{background:rgba(1,5,15,.86);backdrop-filter:blur(10px)}.station-profile-dialog button{position:fixed;z-index:3;top:24px;right:24px;width:46px;height:46px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#111;font-size:1.65rem;cursor:pointer}.station-profile-dialog img{display:block;width:100%;height:auto;max-height:86vh;object-fit:contain}.station-profile-dialog p{margin:0;padding:17px 24px;color:#d9e2ef}
.station-profile-unavailable{display:grid;min-height:48vh;place-items:center;align-content:center;padding:38px;text-align:center;border:1px solid rgba(100,120,150,.17);border-radius:30px;background:var(--card,#fff)}.station-profile-unavailable-mark{display:grid;width:46px;height:46px;place-items:center;margin-bottom:16px;border-radius:50%;background:color-mix(in srgb,var(--site-primary,#3478f6) 14%,transparent);color:var(--site-primary,#3478f6);font-weight:950}.station-profile-unavailable h1{margin:0 0 10px}.station-profile-unavailable p{margin:0 0 20px;color:var(--muted,#667085)}.station-profile-unavailable a{padding:11px 18px;border-radius:999px;background:var(--site-primary,#3478f6);color:#fff;text-decoration:none;font-weight:850}
@media(max-width:850px){.station-profile-hero{grid-template-columns:1fr}.station-profile-geo{grid-template-columns:1fr 1fr}.station-profile-facts,.station-profile-sensors,.station-profile-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.station-profile-narrative{grid-template-columns:1fr}}
@media(max-width:560px){.station-profile-page{gap:18px;padding-top:14px}.station-profile-hero{padding:26px 20px}.station-profile-geo,.station-profile-facts,.station-profile-sensors,.station-profile-gallery{grid-template-columns:1fr}.station-profile-photo-button{height:220px}.station-profile-rain{grid-template-columns:1fr}.station-profile-dialog button{top:16px;right:16px}}

/* Station profile R3 · instrument artwork */
.station-profile-hero.has-instrument-art {
  grid-template-rows: minmax(150px, auto) auto;
  isolation: isolate;
}

.station-profile-hero.has-instrument-art .station-profile-hero-copy {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.station-profile-hero.has-instrument-art .station-profile-geo {
  grid-column: 2;
  grid-row: 2;
}

.station-profile-instrument-art {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: clamp(158px, 18vw, 220px);
  margin: 0;
  pointer-events: none;
  transform: rotate(-3deg);
}

.station-profile-instrument-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 13% -13% 7%;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--site-accent, #18b7a0) 30%, transparent) 0,
    color-mix(in srgb, var(--site-primary, #3478f6) 13%, transparent) 48%,
    transparent 72%);
  filter: blur(9px);
  transform: rotate(7deg);
}

.station-profile-instrument-sticker {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: .92;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--site-primary, #3478f6) 24%, rgba(255, 255, 255, .86));
  border-radius: 34% 66% 58% 42% / 40% 39% 61% 60%;
  background: #fff;
  box-shadow:
    0 22px 45px color-mix(in srgb, var(--site-primary, #3478f6) 18%, transparent),
    0 8px 18px rgba(15, 23, 42, .16),
    inset 0 0 0 7px rgba(255, 255, 255, .58);
}

.station-profile-instrument-sticker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, .55), transparent 42%);
  pointer-events: none;
}

.station-profile-instrument-sticker img {
  display: block;
  width: 88%;
  height: 91%;
  object-fit: contain;
  filter: contrast(1.03) saturate(.94);
}

@media (prefers-reduced-motion: no-preference) {
  .station-profile-instrument-art {
    animation: station-profile-instrument-arrive .55s cubic-bezier(.2, .75, .28, 1) both;
  }
}

@keyframes station-profile-instrument-arrive {
  from { opacity: 0; transform: translate3d(16px, 10px, 0) rotate(1deg) scale(.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(-3deg) scale(1); }
}

@media (max-width: 850px) {
  .station-profile-hero.has-instrument-art {
    grid-template-rows: auto;
  }

  .station-profile-hero.has-instrument-art .station-profile-hero-copy,
  .station-profile-hero.has-instrument-art .station-profile-geo,
  .station-profile-instrument-art {
    grid-column: 1;
    grid-row: auto;
  }

  .station-profile-instrument-art {
    justify-self: end;
    width: clamp(130px, 31vw, 166px);
    margin: -10px 12px -12px 0;
  }
}

@media (max-width: 560px) {
  .station-profile-instrument-art {
    width: clamp(122px, 35vw, 150px);
    margin-right: 2px;
  }
}

/* Station profile R4 · artwork integrated as a background watermark */
.station-profile-instrument-art {
  z-index: 0;
  width: clamp(205px, 22vw, 280px);
  transform: rotate(-6deg);
}

.station-profile-instrument-art::before {
  inset: 18% -8% 10%;
  opacity: .42;
  filter: blur(18px);
}

.station-profile-instrument-sticker {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.station-profile-instrument-sticker::after {
  display: none;
}

.station-profile-instrument-sticker img {
  width: 100%;
  height: 100%;
  opacity: .31;
  mix-blend-mode: multiply;
  filter: grayscale(.12) contrast(1.16) saturate(.9);
}

html[data-theme="dark"] .station-profile-instrument-sticker img {
  opacity: .36;
  mix-blend-mode: screen;
  filter: invert(1) grayscale(.18) contrast(1.12);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .station-profile-instrument-sticker img {
    opacity: .36;
    mix-blend-mode: screen;
    filter: invert(1) grayscale(.18) contrast(1.12);
  }
}

@media (max-width: 850px) {
  .station-profile-instrument-art {
    width: clamp(168px, 44vw, 205px);
    margin: -24px -16px -48px 0;
  }
}

@media (max-width: 560px) {
  .station-profile-instrument-art {
    width: clamp(164px, 46vw, 190px);
    margin-right: -12px;
  }
}

/* Station profile R6 · exact instrument cutout, with no rectangular veil */
.station-profile-instrument-sticker img {
  opacity: .24;
  mix-blend-mode: normal;
  filter: grayscale(.1) saturate(.88);
}

html[data-theme="dark"] .station-profile-instrument-sticker img {
  opacity: .29;
  mix-blend-mode: normal;
  filter: invert(1) grayscale(.14) contrast(1.04);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .station-profile-instrument-sticker img {
    opacity: .29;
    mix-blend-mode: normal;
    filter: invert(1) grayscale(.14) contrast(1.04);
  }
}

/* Station profile R7 · universal weather-station artwork */
.station-profile-instrument-art.is-generic-weather-station {
  width: clamp(218px, 23vw, 294px);
  margin: -42px -24px -88px 0;
  transform: none;
}

.station-profile-instrument-art.is-generic-weather-station::before {
  inset: 22% -2% 8% 12%;
  opacity: .28;
}

.station-profile-instrument-art.is-generic-weather-station img {
  display: block;
  width: 100%;
  height: auto;
  opacity: .25;
  object-fit: contain;
  filter: grayscale(.16) saturate(.78) contrast(.96);
}

html[data-theme="dark"] .station-profile-instrument-art.is-generic-weather-station img {
  opacity: .34;
  filter: grayscale(.2) saturate(.7) brightness(1.55) contrast(.84);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .station-profile-instrument-art.is-generic-weather-station img {
    opacity: .34;
    filter: grayscale(.2) saturate(.7) brightness(1.55) contrast(.84);
  }
}

@media (max-width: 850px) {
  .station-profile-instrument-art.is-generic-weather-station {
    width: clamp(198px, 48vw, 238px);
    margin: -54px -20px -86px 0;
  }
}

@media (max-width: 560px) {
  .station-profile-instrument-art.is-generic-weather-station {
    width: clamp(192px, 52vw, 220px);
    margin: -50px -20px -82px 0;
  }
}

/* R8: keep the desktop hero title in proportion with the rest of the profile. */
@media (min-width: 851px) {
  .station-profile-hero h1 {
    font-size: clamp(2.5rem, 3vw, 2.625rem);
    line-height: 1;
    letter-spacing: -.035em;
  }
}
