/* kalender-woche.ch
   Ruhiges, tabellarisches Layout: weisse Karten auf kühlem Grund,
   ein dunkles Blau als einzige Akzentfarbe, Rot nur für Sonn- und Feiertage. */

:root {
  color-scheme: light;
  --bg: #f8f9ff;
  --surface: #ffffff;
  --surface-low: #eff4ff;
  --surface-mid: #e5eeff;
  --canvas: #f6f8fc;
  --tint: #eef4ff;
  --text: #0b1c30;
  --muted: #475569;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --primary: #00288e;
  --primary-hover: #1e40af;
  --primary-soft: #dde1ff;
  --on-primary: #ffffff;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 8px 20px -6px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.18);
  --ring: 0 0 0 1px rgba(15, 23, 42, 0.03);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --content-width: 1216px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-label: "Geist", var(--font);
  --header-height: 64px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1120;
  --surface: #111a2c;
  --surface-low: #17233a;
  --surface-mid: #1e2c47;
  --canvas: #0d1627;
  --tint: #131f38;
  --text: #e6ecf7;
  --muted: #a3afc4;
  --faint: #66728a;
  --line: #22304a;
  --primary: #a9bbff;
  --primary-hover: #c3d0ff;
  --primary-soft: rgba(169, 187, 255, 0.16);
  --on-primary: #0a1120;
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.12);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ---------- Basis ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--surface-low);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.nowrap {
  white-space: nowrap;
}

.mono,
.live-value,
.year-pill,
.mini-calendar-grid,
.week-table td {
  font-variant-numeric: tabular-nums;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.site-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
}

/* ---------- Kleine Bausteine ---------- */

.eyebrow,
.stat-label,
.footer-heading {
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
}

.live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  animation: live-glow 2s ease-in-out infinite;
}

/* Welle, die vom Punkt nach aussen laeuft und dabei verblasst */
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--primary);
  animation: live-ripple 2s ease-out infinite;
}

@keyframes live-ripple {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }

  80%,
  100% {
    opacity: 0;
    transform: scale(3);
  }
}

@keyframes live-glow {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--surface-low);
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-solid,
.chip.active {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-accent {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-outline {
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--ring);
  font-weight: 600;
}

.chip {
  border-radius: var(--radius-xs);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.chip-row,
.tag-row,
.inline-actions,
.week-nav,
.link-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--surface-low);
  color: var(--primary);
}

.icon-tile-red {
  background: var(--red-soft);
  color: var(--red);
}

.inline-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.inline-link:hover {
  color: var(--primary-hover);
}

/* ---------- Buttons ---------- */

.button-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-label);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.button-link .icon,
.ghost-link .icon {
  width: 18px;
  height: 18px;
}

.button-link {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}

.button-link:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.ghost-link {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), var(--ring);
}

.ghost-link:hover {
  background: var(--surface-low);
}

.button-small {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 12px;
}

.link-row .ghost-link {
  background: var(--surface-low);
  box-shadow: none;
}

.link-row .ghost-link:hover {
  background: var(--surface-mid);
}

[hidden] {
  display: none !important;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .site-header {
  box-shadow: 0 1px 0 var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.brand-copy strong span {
  color: var(--primary);
}

.brand:hover .brand-copy strong {
  color: var(--primary);
}

.brand-copy > span {
  font-family: var(--font-label);
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  position: relative;
  padding: 6px 0;
  font-family: var(--font-label);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link[aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.theme-toggle,
.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-low);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--surface-mid);
  color: var(--text);
}

.theme-toggle .icon,
.menu-toggle .icon {
  width: 18px;
  height: 18px;
}

.theme-icon-sun,
html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.menu-toggle {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  padding: 32px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-title {
  margin: 0 0 16px;
}

.hero-title .eyebrow {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-left: 2px;
  font-size: 13px;
  line-height: 16px;
}

.hero-week {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 14px;
  font-size: clamp(52px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-year {
  color: var(--primary);
  font-size: 0.64em;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero-summary {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 26px;
  font-weight: 500;
}

.hero-summary strong {
  font-weight: 650;
}

.hero-summary [data-current-week-summary] {
  color: var(--primary);
  font-weight: 700;
}

.hero-lead {
  max-width: 42rem;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.hero-actions {
  gap: 12px;
  margin-bottom: 32px;
}

.hero-live {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--ring);
}

.live-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.live-card > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.live-card .icon-tile {
  width: 48px;
  height: 48px;
}

.live-card .icon-tile .icon {
  width: 24px;
  height: 24px;
}

.live-value {
  font-family: var(--font-label);
  font-size: 28px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.live-value small {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.year-jump-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.year-jump-head .stat-label:first-child {
  font-weight: 700;
}

.year-jump-head .stat-label:last-child {
  text-transform: none;
  letter-spacing: 0.02em;
}

.year-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.year-pill {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--ring);
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.year-pill:hover {
  background: var(--surface-mid);
}

.year-pill.current {
  padding-inline: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ---------- Datepicker ---------- */

.finder-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md), var(--ring);
}

.finder-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
}

.finder-top .badge {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.finder-top .icon {
  width: 18px;
  height: 18px;
}

.finder-panel h2 {
  margin-bottom: 4px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.finder-lead {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.mini-calendar {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--canvas);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.mini-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.mini-calendar-head strong {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
}

.mini-calendar-nav {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mini-calendar-nav:hover:not(:disabled) {
  background: var(--surface);
  color: var(--text);
}

.mini-calendar-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.mini-calendar-nav .icon {
  width: 18px;
  height: 18px;
}

.mini-calendar-weekdays,
.mini-calendar-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.mini-calendar-weekdays {
  margin-bottom: 6px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.mini-calendar-weekdays span:first-child {
  color: var(--primary);
}

.mini-calendar-weekdays span:last-child {
  color: var(--red);
}

.mini-calendar-grid {
  display: grid;
  gap: 2px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
}

.mini-calendar-row {
  border-radius: var(--radius-xs);
  transition: background-color 0.12s ease;
}

.mini-calendar-row:hover {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.mini-calendar-row:has(.is-selected) {
  background: var(--surface-mid);
}

.mini-calendar-week-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.mini-calendar-row:has(.is-selected) .mini-calendar-week-number,
.mini-calendar-week-number:hover {
  color: var(--primary);
}

.mini-calendar-day,
.mini-calendar-week-number {
  display: grid;
  place-items: center;
  height: 30px;
}

.mini-calendar-day {
  position: relative;
  color: var(--text);
}

.mini-calendar-day::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: background-color 0.12s ease;
}

.mini-calendar-day:hover::before {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mini-calendar-day {
  z-index: 0;
}

.mini-calendar-day:nth-child(8) {
  color: var(--red);
}

.mini-calendar-day.is-holiday {
  color: var(--red);
  font-weight: 800;
}

.mini-calendar-day.is-outside {
  color: var(--faint);
  font-weight: 500;
}

.mini-calendar-day.is-outside:nth-child(8),
.mini-calendar-day.is-outside.is-holiday {
  color: color-mix(in srgb, var(--red) 45%, transparent);
}

.mini-calendar-day.is-today::before {
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

.mini-calendar-day.is-selected {
  color: var(--on-primary);
  font-weight: 700;
}

.mini-calendar-day.is-selected::before {
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mini-calendar-day.is-disabled {
  pointer-events: none;
  opacity: 0.35;
}

/* Zahl ueber dem Kreis halten */
.mini-calendar-day {
  isolation: isolate;
}

.mini-calendar-day::before {
  z-index: -1;
}

.finder-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.finder-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finder-form label {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.finder-form input,
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.finder-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field-hint {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.finder-result {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-low);
}

.finder-result strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.finder-result strong::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.finder-result span {
  padding-left: 26px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.finder-result.error {
  background: var(--red-soft);
}

.finder-result.error strong::before {
  background: var(--red);
}

.finder-link {
  width: 100%;
  font-weight: 700;
}

/* ---------- Sektionen ---------- */

.section {
  padding: 48px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.section-head > div {
  max-width: 42rem;
}

.section-title {
  margin-bottom: 8px;
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.year-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--ring);
  transition: box-shadow 0.18s ease;
}

.year-card:hover {
  box-shadow: var(--shadow-md), var(--ring);
}

.year-card.is-current {
  box-shadow: var(--shadow-md), 0 0 0 2px var(--primary);
}

.year-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.year-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.year-stats {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin: 12px 0 20px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--canvas);
}

.year-stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.year-stats dt {
  font-family: var(--font-label);
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.year-stats dd {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.year-stats .is-long dd {
  color: var(--primary);
}

.year-card .link-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.year-card .link-row .icon {
  width: 16px;
  height: 16px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.info-card,
.story-card,
.faq-card,
.nav-card,
.download-card,
.detail-card,
.table-card,
.page-hero-card {
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm), var(--ring);
}

.info-card .icon-tile {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}

.info-card h2,
.story-card h2,
.nav-card h2,
.download-card h2 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.info-card p,
.story-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
}

.faq-card {
  padding: 32px;
}

.faq-card .section-title {
  margin-bottom: 24px;
  font-size: 24px;
  line-height: 32px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border-radius: var(--radius);
  background: var(--canvas);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item summary .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.faq-item[open] summary .icon {
  transform: rotate(90deg);
}

.faq-item p {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.aside-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.practice-tip {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--tint);
  box-shadow: var(--shadow-sm), var(--ring);
}

.practice-tip .badge {
  margin-bottom: 14px;
  white-space: normal;
}

.practice-tip p {
  font-size: 13px;
  line-height: 21px;
}

.practice-tip p + p {
  margin-top: 12px;
}

.story-card .eyebrow {
  margin-bottom: 4px;
}

.story-card p {
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 21px;
}

/* ---------- Unterseiten ---------- */

.page-hero {
  padding: 32px 0 0;
}

.page-hero-card {
  padding: 32px;
}

.page-hero-card h1 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-lead {
  max-width: 48rem;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 26px;
  font-weight: 500;
}

.page-lead strong {
  color: var(--primary);
}

.page-hero-card .section-copy {
  max-width: 48rem;
}

.page-hero-card .chip-row {
  margin-top: 20px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

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

.breadcrumbs span {
  color: var(--faint);
}

.breadcrumbs strong {
  color: var(--text);
}

.table-card h2,
.detail-card h2 {
  margin-bottom: 4px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.table-card > .section-copy,
.detail-card > .section-copy {
  margin-bottom: 20px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
}

.week-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.week-table .week-col {
  width: 72px;
}

.week-table .note-col {
  width: 24%;
}

.week-table th {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  background: var(--surface-low);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.week-table th:nth-child(8) {
  color: var(--red);
}

.week-table td {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.week-table tbody tr:hover td {
  background: var(--canvas);
}

.week-table td:nth-child(8) {
  color: var(--red);
}

.week-table .col-week a {
  font-weight: 700;
  color: var(--primary);
}

.week-table .col-week a:hover {
  text-decoration: underline;
}

.week-table .col-note {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.current-week-row td,
.week-table tbody tr.current-week-row:hover td {
  background: var(--surface-mid);
}

.current-week-row .col-week a::after {
  content: "heute";
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.holiday-cell {
  color: var(--red);
  font-weight: 700;
}

.holiday-dot {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--red-soft);
  color: var(--red);
  cursor: help;
}

.inline-actions {
  margin-top: 20px;
}

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

.detail-day-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.day-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--canvas);
}

.day-card.today {
  background: var(--surface-mid);
  box-shadow: inset 3px 0 0 var(--primary);
}

.day-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.day-card:nth-child(7) h3 {
  color: var(--red);
}

.day-card .section-copy {
  font-size: 13px;
}

.day-card .tag-row {
  justify-content: flex-end;
}

.day-card .holiday-cantons {
  grid-column: 1 / -1;
}

.tag,
.holiday-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  box-shadow: var(--ring);
}

.day-card.today .tag:first-child {
  background: var(--primary);
  color: var(--on-primary);
}

.tag.holiday,
.holiday-badge {
  background: var(--red-soft);
  color: var(--red);
}

.detail-card > .tag-row {
  margin-bottom: 8px;
}

.holiday-cantons {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.holiday-cantons strong {
  color: var(--text);
}

.holiday-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.week-nav {
  margin-top: 20px;
}

.jump-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.jump-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--canvas);
  transition: background-color 0.15s ease;
}

.jump-link:hover {
  background: var(--surface-low);
}

.jump-link > div {
  display: grid;
  gap: 2px;
}

.jump-link strong {
  font-size: 14px;
}

.jump-link small {
  color: var(--muted);
  font-size: 12px;
}

.jump-link > span {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
}

.download-card {
  background: var(--tint);
}

/* ---------- Rechtliches und Kontakt ---------- */

.legal-card {
  max-width: 820px;
}

.legal-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal-block strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.legal-block p {
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.legal-block p + p {
  margin-top: 10px;
}

.contact-shell {
  max-width: 820px;
}

.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form label:not(.privacy-check):not(.contact-honeypot) {
  display: grid;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.privacy-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 0;
  box-shadow: none;
  accent-color: var(--primary);
}

.contact-submit {
  justify-self: start;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 48px;
  background: var(--surface);
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .footer {
  box-shadow: 0 -1px 0 var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 48px 0 40px;
}

.brand-small {
  gap: 8px;
  margin-bottom: 12px;
}

.brand-small strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.footer-copy {
  max-width: 20rem;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.coffee-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: #ffdd00;
  color: #0b1c30;
  font-family: var(--font-label);
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px -4px rgba(200, 160, 0, 0.45);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.coffee-link:hover {
  background: #ffe433;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1), 0 8px 20px -6px rgba(200, 160, 0, 0.55);
  transform: translateY(-1px);
}

.coffee-link .icon {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-heading {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
}

.footer-column a,
.footer-link-button {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  transition: color 0.15s ease;
}

.footer-column a:hover,
.footer-link-button:hover {
  color: var(--primary);
}

.footer-link-button {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
}

.zone-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Cookie-Hinweis ---------- */

.analytics-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  max-width: 36rem;
  margin: 0 auto;
  padding: 16px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg), var(--ring);
}

.analytics-consent__content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.analytics-consent .analytics-consent__title {
  margin-bottom: 2px;
  color: var(--text);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
}

.analytics-consent p {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.analytics-consent__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.analytics-consent button {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-low);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.analytics-consent button:hover {
  background: var(--surface-mid);
}

.analytics-consent .analytics-consent__accept {
  padding-inline: 18px;
  background: var(--primary);
  color: var(--on-primary);
}

.analytics-consent .analytics-consent__accept:hover {
  background: var(--primary-hover);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .faq-grid,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .finder-panel {
    max-width: 560px;
  }
}

@media (max-width: 960px) {
  .header-bar {
    position: relative;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg), var(--ring);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover,
  .nav-link[aria-current="page"] {
    background: var(--surface-low);
  }

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

  .footer-brand-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .hero {
    padding: 24px 0 32px;
  }

  .hero-live {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions > a {
    flex: 1 1 100%;
  }

  .live-value {
    font-size: 24px;
  }

  .finder-panel,
  .faq-card,
  .practice-tip,
  .page-hero-card {
    padding: 20px;
  }

  .mini-calendar {
    padding: 12px 8px;
  }

  .section {
    padding: 32px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .overview-grid,
  .insight-grid,
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-grid {
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .day-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .day-card .section-copy {
    grid-column: 1;
    grid-row: 2;
  }

  .day-card .tag-row {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .analytics-consent__content {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-consent__actions {
    justify-content: flex-end;
  }

  .brand-copy > span {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .footer,
  .analytics-consent,
  .finder-panel,
  .hero-actions {
    display: none !important;
  }

  body {
    background: #fff;
  }
}
