:root {
  --color-primary: #0877be;
  --color-primary-dark: #075c91;
  --color-primary-soft: #eaf5fb;
  --color-text: #17212b;
  --color-muted: #51616e;
  --color-border: #dce5eb;
  --color-background: #f5f8fa;
  --color-surface: #ffffff;
  --color-cold: #1769aa;
  --color-warm: #a53a2b;
  --radius: 12px;
  --content-width: 1180px;
  --shadow-subtle: 0 1px 2px rgba(24, 49, 68, 0.05);
  --space-1: 0.35rem;
  --space-2: 0.65rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

button,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-primary);
}

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

:focus-visible {
  outline: 3px solid rgba(8, 119, 190, 0.34);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--color-text);
  color: #fff;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.97);
}

.site-header__inner {
  width: min(calc(100% - 2rem), var(--content-width));
  min-height: 4.25rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  color: var(--color-text);
  font-size: 1.02rem;
  font-weight: 750;
  text-decoration: none;
}

.brand svg {
  width: 2rem;
  height: 2rem;
}

.site-nav {
  margin-left: auto;
}

.site-nav__toggle {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  display: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.site-nav__toggle span,
.site-nav__toggle::before,
.site-nav__toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.15rem;
  height: 2px;
  display: block;
  border-radius: 99px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.site-nav__toggle span {
  margin: 0;
}

.site-nav__toggle::before {
  transform: translate(-50%, calc(-50% - 6px));
}

.site-nav__toggle::after {
  transform: translate(-50%, calc(-50% + 6px));
}

.site-nav__toggle[aria-expanded="true"] span {
  opacity: 0;
}

.site-nav__toggle[aria-expanded="true"]::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"]::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list a {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  color: #344451;
  font-size: 0.89rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav__list a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--color-border);
}

.language-switch a {
  padding: 0.35rem 0.45rem;
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.language-switch a[aria-current="page"] {
  border-radius: 6px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.hero {
  padding: clamp(2.25rem, 6vw, 4.75rem) 0 var(--space-5);
}

.hero__eyebrow,
.section-heading__eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-primary-dark);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.hero__intro {
  max-width: 720px;
  margin: var(--space-3) 0 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.content-section {
  padding: var(--space-5) 0;
  scroll-margin-top: 5rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.section-heading p {
  max-width: 500px;
  margin: 0;
  color: var(--color-muted);
}

.panel-card,
.reference-section,
.archive-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.tab-list {
  display: none;
}

.js .tab-list {
  width: fit-content;
  display: flex;
  gap: 0.25rem;
  margin: 0 0 var(--space-3);
  padding: 0.28rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #edf2f5;
}

.tab-list button {
  min-width: 7.25rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--color-muted);
  font-weight: 720;
  cursor: pointer;
}

.tab-list button[aria-selected="true"] {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  box-shadow: 0 1px 3px rgba(22, 47, 65, 0.1);
}

.tab-panel + .tab-panel {
  margin-top: var(--space-4);
}

.js .tab-panel[hidden] {
  display: none;
}

.js .tab-panel + .tab-panel {
  margin-top: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.btn:hover {
  border-color: var(--color-primary-dark);
  background: var(--color-primary-dark);
  color: #fff;
}
.weather-panel {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.weather {
  color: var(--color-text);
}

.weather h3 {
  margin: 0 0 var(--space-3);
  color: var(--color-text);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.weather b {
  color: #344552;
}

.weather .day {
  display: grid;
  gap: var(--space-3) var(--space-4);
}

.weather .day > h3 {
  grid-column: 1 / -1;
}

.weather .day > div:not(.map) {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 9px;
  background: #f7f9fa;
}

.weather .day > .weather {
  border-left: 3px solid var(--color-primary);
  background: var(--color-primary-soft);
}

.weather .day .daymap {
  position: relative;
}

.weather .karte {
  width: 100%;
  height: auto;
}

.weather .stationdata .symbol {
  position: absolute;
  width: 52px;
  text-align: center;
  transform: translate(-50%, -50%) scale(1.5);
}

.weather .stationdata .symbol > img {
  margin-inline: auto;
}

.weather .stationdata .symbol .description {
  display: none;
}

.weather .stationdata > .description {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--color-text);
  font-size: clamp(0.55rem, 1.6vw, 0.82rem);
  text-align: center;
  white-space: nowrap;
}

.weather .stationdata .ort {
  display: block;
  font-weight: 760;
}

.weather .stationdata .temperature {
  display: flex;
  justify-content: center;
}

.weather .stationdata .min,
.weather .stationdata .max {
  font-weight: 750;
}

.weather .stationdata .min {
  color: var(--color-cold);
}

.weather .stationdata .max {
  color: var(--color-warm);
}

.weather .schlanders .symbol,
.weather .silandro .symbol {
  left: 8.5%;
  top: 35%;
}
.weather .meran .symbol,
.weather .merano .symbol {
  left: 49%;
  top: 44%;
}
.weather .bozen .symbol,
.weather .bolzano .symbol {
  left: 43%;
  top: 81%;
}
.weather .brixen .symbol,
.weather .bressanone .symbol {
  left: 67%;
  top: 59%;
}
.weather .bruneck .symbol,
.weather .brunico .symbol {
  left: 80%;
  top: 15%;
}
.weather .sterzing .symbol,
.weather .vipiteno .symbol {
  left: 40%;
  top: 21%;
}
.weather .schlanders > .description,
.weather .silandro > .description {
  left: 12.5%;
  top: 53%;
}
.weather .meran > .description,
.weather .merano > .description {
  left: 32.5%;
  top: 53%;
}
.weather .sterzing > .description,
.weather .vipiteno > .description {
  left: 55.5%;
  top: 25%;
}
.weather .bruneck > .description,
.weather .brunico > .description {
  left: 78.5%;
  top: 36%;
}
.weather .brixen > .description,
.weather .bressanone > .description {
  left: 65.5%;
  top: 45%;
}
.weather .bozen > .description,
.weather .bolzano > .description {
  left: 51.5%;
  top: 70%;
}

.forecast-card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.weather .evolution > h3 {
  margin-bottom: var(--space-2);
}

.weather .evolution > .description {
  max-width: 900px;
  color: #3f4d58;
}

.weather .forecast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: var(--space-4);
}

.weather .dayforcast,
.weather .block {
  min-width: 0;
}

.weather .dayforcast > .block {
  height: 100%;
  padding: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #f8fafb;
  text-align: center;
}

.weather .dayforcast .symbol img {
  width: 62px;
  height: 62px;
  margin: 0.3rem auto;
}

.weather .symbol .description {
  color: var(--color-muted);
  font-size: 0.82rem;
}

.weather .temperature {
  display: flex;
  justify-content: center;
  gap: 0rem;
}

.weather .temperature .min,
.weather .temperature .max {
  padding: 0.1rem 0.22rem;

  font-size: 0.54rem;
  font-weight: 400;
}
.weather .temperature .min {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.weather .temperature .max {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}
@media (min-width: 620px) {
  .weather .temperature .min,
  .weather .temperature .max {
    padding: 0.18rem 0.42rem;
    font-size: 0.64rem;
    font-weight: 760;
  }
}

.weather .temperature .min {
  background: #e6f2fb;
  color: var(--color-cold);
}

.weather .temperature .max {
  background: #fff0ed;
  color: var(--color-warm);
}

.weather .hoechstwerte,
.weather .mindestwerte {
  display: block;
  margin-top: 0.2rem;
}

.weather .reliability {
  margin-top: 0.45rem;
  color: var(--color-muted);
  font-size: 0.75rem;
}

.mountain-panel {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.weather .mountain {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.weather .mountain > h3,
.weather .mountain > .conditions,
.weather .mountain > .weather {
  grid-column: 1 / -1;
}

.weather .mountain > div {
  min-width: 0;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 9px;
  background: #f7f9fa;
}

.weather .mountain > .weather {
  border-left: 3px solid var(--color-primary);
  background: var(--color-primary-soft);
}

.weather .mountainmap {
  display: none;
}

.weather .north-south-wind {
  text-align: center;
}

.weather .north-south-wind .symbol img {
  width: 58px;
  margin: 0.3rem auto;
}

.weather .sun-moon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.weather .mountain > .temperatures {
  line-height: 1.8;
}

.weather .mountain > .zerolimit,
.weather .mountain > .reliability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.9rem;
}

.district-grid {
  display: grid;
  gap: 0.8rem;
}

.district-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
}

.district-card[open] {
  grid-column: 1 / -1;
}

.district-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
}

.district-card > summary::-webkit-details-marker {
  display: none;
}

.district-card > summary::after {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  color: var(--color-primary-dark);
  content: "+";
  font-size: 1.25rem;
  font-weight: 500;
}

.district-card[open] > summary::after {
  content: "−";
}

.district-card__name,
.district-card__status {
  display: block;
}

.district-card__name {
  font-weight: 760;
}

.district-card__status {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-card__icon {
  grid-column: 2;
  grid-row: 1;
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.district-card__temperature {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  padding-right: 0.1rem;
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.district-card__temperature .min {
  color: var(--color-cold);
}
.district-card__temperature .max {
  color: var(--color-warm);
}

.district-card__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--color-border);
}

.district-card__body .district > h3 {
  padding-top: 1rem;
}

.district-card__body .forecast {
  grid-template-columns: none;
  grid-auto-columns: minmax(190px, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 0.55rem;
  scroll-snap-type: x proximity;
}

.district-card__body .dayforcast {
  scroll-snap-align: start;
}

.district-card__body .dayforcast > .block {
  height: auto;
  margin-bottom: 0.65rem;
}

.district-card__body .niederschlaege,
.district-card__body .niederschlagswahrscheinlichkeit,
.district-card__body .frostgefahr {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--color-border);
  color: #52616d;
  font-size: 0.76rem;
  line-height: 1.5;
}

.district-card__body i {
  color: var(--color-text);
  font-style: normal;
}

.archive-card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.archive-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem 1rem;
}

.archive-controls label {
  display: grid;
  gap: 0.35rem;
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

#SelectWetterarchiv {
  min-width: 12rem;
  height: 2.75rem;
  padding: 0 2.4rem 0 0.8rem;
  border: 1px solid #b9c8d2;
  border-radius: 8px;
  appearance: none;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath fill='%23075c91' d='m5 7 5 6 5-6z'/%3E%3C/svg%3E")
    no-repeat right 0.7rem center;
  color: var(--color-text);
  cursor: pointer;
}

.archive-status {
  min-height: 1.5em;
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font-size: 0.84rem;
}

#output {
  margin-top: var(--space-3);
}

#output[aria-busy="true"] {
  opacity: 0.55;
}

.reference-section {
  overflow: clip;
  margin-block: var(--space-4);
}

.reference-section > summary {
  position: relative;
  padding: 1.1rem 3rem 1.1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 760;
}

.reference-section > summary::-webkit-details-marker {
  display: none;
}

.reference-section > summary::after {
  position: absolute;
  right: 1.2rem;
  color: var(--color-primary-dark);
  content: "+";
  font-size: 1.35rem;
  font-weight: 500;
}

.reference-section[open] > summary::after {
  content: "−";
}

.reference-content {
  padding: 0 1.2rem 1.2rem;
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

.reference-content h1,
.reference-content h2,
.reference-content h3,
.reference-content h4 {
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
  font-size: 1.1rem;
}

.reference-content h4 {
  font-size: 0.96rem;
}

.reference-content p,
.reference-content ul {
  margin-block: 0.45rem;
}

.webcam-entry {
  margin-top: 1rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--color-border);
}

.reference-content p,
.reference-content li {
  max-width: 90ch;
  color: #485762;
  overflow-wrap: anywhere;
}

.copyright {
  margin-top: var(--space-3);
  color: var(--color-muted);
  font-size: 0.76rem;
}

.site-footer {
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  background: #eaf0f4;
}

.site-footer__inner {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
  padding: var(--space-4) 0;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--color-muted);
  font-size: 0.84rem;
}

.site-footer__row p {
  margin: 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-topics {
  margin-top: var(--space-3);
  border-top: 1px solid #d2dce3;
  padding-top: var(--space-3);
}

.footer-topics summary {
  width: fit-content;
  cursor: pointer;
  color: #465661;
  font-weight: 700;
}

.footer-topics__grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: var(--color-muted);
  font-size: 0.76rem;
}

.footer-topics__grid p {
  margin: 0;
}

.empty-weather {
  padding: 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 9px;
  color: var(--color-muted);
}

@media (min-width: 620px) {
  .district-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reference-content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-topics__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .weather .day {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  }

  .weather .day > .map {
    grid-column: 1;
    grid-row: 2 / span 3;
  }

  .weather .day > div:not(.map) {
    grid-column: 2;
  }

  .weather .forecast {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .district-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .district-card__body .forecast {
    grid-auto-columns: minmax(205px, 1fr);
  }
}

@media (max-width: 940px) {
  .js .site-nav__toggle {
    display: grid;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  .js .site-nav[hidden] {
    display: none;
  }

  .site-nav__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .site-nav__list a {
    padding: 0.72rem;
  }

  .language-switch {
    margin-left: 0;
    padding-left: 0.4rem;
  }
}

@media (max-width: 519px) {
  .site-header__inner,
  .page-shell,
  .site-footer__inner {
    width: min(calc(100% - 1.25rem), var(--content-width));
  }

  .brand__suffix {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: var(--space-2);
  }

  .js .tab-list {
    width: 100%;
  }

  .tab-list button {
    min-width: 0;
    flex: 1;
  }

  .weather-panel,
  .forecast-card,
  .mountain-panel {
    padding: 0.8rem;
  }

  .weather .stationdata .symbol {
    width: 42px;
    transform: translate(-50%, -50%) scale(1);
  }

  .weather .stationdata > .description {
    font-size: 0.52rem;
  }

  .weather .mountain {
    grid-template-columns: 1fr;
  }

  .weather .mountain > h3,
  .weather .mountain > .conditions,
  .weather .mountain > .weather {
    grid-column: 1;
  }

  .district-card > summary {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .district-card__icon {
    grid-column: 2;
  }

  .district-card__temperature {
    grid-column: 1;
    grid-row: 2;
  }

  .district-card > summary::after {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
