/* Soleuno Auslastung — alternative design.
   One idea carries the page: how full the spa is, always shown on the same
   green scale (pale = empty, deep = full; inverted to "brighter = fuller" in
   dark mode). Everything else is neutral ink on a cool off-white. Amber marks
   "now". Type: Bricolage Grotesque, self-hosted (no third-party requests).
   Shape rule: panels 20px, cells 6px, nothing else rounded. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2');
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-2: #e8ece7;
  --line: rgba(20, 33, 27, 0.1);
  --line-strong: rgba(20, 33, 27, 0.2);
  --ink: #14211b;
  --ink-2: #47564e;
  --ink-3: #64726b;
  /* crowd level: validated 4-step ordinal ramp, evenly spaced in lightness
     (light end >= 2:1 on white) so "Gut besucht" and "Stark" stay apart */
  --l1: #86c29e;
  --l2: #54a077;
  --l3: #2b7049;
  --l4: #0c3a23;
  --now: #b45309;
  --warn: #b45309;
  --tip-bg: #14211b;
  --tip-ink: #f3f5f2;
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1412;
    --surface: #161d1a;
    --surface-2: #1f2824;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.17);
    --ink: #e8eeea;
    --ink-2: #aab7b0;
    --ink-3: #88958e;
    --l1: #2f5a45;
    --l2: #4c9470;
    --l3: #7fc9a0;
    --l4: #d0f5df;
    --now: #f0a24a;
    --warn: #f0a24a;
    --tip-bg: #27312c;
    --tip-ink: #e8eeea;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-optical-sizing: auto; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- masthead ---------- */
.masthead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; display: block; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.brand-sub { display: block; font-size: 14px; color: var(--ink-3); }
.updated { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.updated .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--l2); flex: none; }
.updated.is-stale { color: var(--warn); font-weight: 600; }
.updated.is-stale .dot { background: var(--warn); }

/* ---------- now ---------- */
.now { padding: 52px 0 46px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.now-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 56px; align-items: end; margin-top: 14px; }
.figure {
  display: flex; align-items: flex-start; font-weight: 800; letter-spacing: -0.065em; line-height: 0.8;
  font-size: clamp(116px, 21vw, 236px); font-variation-settings: 'opsz' 96;
}
.figure .pct { font-size: 0.3em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin: 0.1em 0 0 0.06em; }
.figure.is-word { font-size: clamp(54px, 9vw, 104px); letter-spacing: -0.045em; line-height: 0.95; color: var(--ink-2); }
.verdict { font-size: clamp(30px, 4.3vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.now-line { margin-top: 10px; color: var(--ink-2); max-width: 44ch; }
.now-line strong { color: var(--ink); font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-top: 22px; }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { font-weight: 600; }
@media (max-width: 720px) {
  .now { padding: 36px 0 34px; }
  .now-grid { grid-template-columns: minmax(0, 1fr); }
}

.scale { margin-top: 42px; }
.scale-bar { position: relative; display: flex; gap: 3px; height: 14px; }
.scale-bar > span { border-radius: 4px; }
.scale-marker {
  position: absolute; top: -9px; bottom: -9px; width: 4px; margin-left: -2px; border-radius: 2px;
  background: var(--ink); box-shadow: 0 0 0 3px var(--bg); transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scale-ticks { position: relative; height: 18px; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.scale-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale-ticks span:first-child { transform: none; }
.scale-ticks span:last-child { transform: translateX(-100%); }
.scale.is-off .scale-marker { display: none; }

/* ---------- sections ---------- */
.section { padding: 46px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(27px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.section-head p { color: var(--ink-2); font-size: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; min-width: 0; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.panel-title h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.panel-title span { font-size: 14px; color: var(--ink-3); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .panel { padding: 16px 14px; } .section { padding: 36px 0; } }

.chart { width: 100%; min-height: 190px; }
.chart svg { display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.sw-solid { background: var(--l2); }
.sw-hatch { background: repeating-linear-gradient(135deg, var(--l2) 0 2.5px, transparent 2.5px 6px); box-shadow: inset 0 0 0 1px var(--l2); }
.sw-now { width: 3px; height: 16px; border-radius: 2px; background: var(--now); }
.sw-line { width: 18px; height: 0; border-top: 2px solid var(--ink); border-radius: 0; }
.sw-line.dashed { border-top: 2px dashed var(--l2); }

/* ---------- week heatmap (a real table) ---------- */
.heat-scroll { overflow-x: auto; }
.heat { width: 100%; min-width: 300px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.heat thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); text-align: center; padding: 0 0 4px; }
.heat th.rowh { width: 132px; text-align: left; font-weight: 600; font-size: 15px; padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat th.rowh small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.heat td { height: 40px; border-radius: 6px; background: var(--surface-2); padding: 0; cursor: default; }
.heat td.l1, .day-dot.l1 { background: var(--l1); }
.heat td.l2, .day-dot.l2 { background: var(--l2); }
.heat td.l3, .day-dot.l3 { background: var(--l3); }
.heat td.l4, .day-dot.l4 { background: var(--l4); }
.heat td.past, .sw-past { background: repeating-linear-gradient(135deg, var(--line-strong) 0 1px, transparent 1px 6px); }
.heat td.na { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.heat td.is-hot { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat tr.is-today th.rowh { color: var(--ink); }
/* quietest hour of the day: a ringed dot that reads on pale and deep cells */
.heat td.quiet { position: relative; }
.heat td.quiet::after, .sw-quiet {
  content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--ink);
}
.sw-quiet { position: static; display: inline-block; margin: 0 3px; flex: none; }
@media (max-width: 640px) {
  .heat { border-spacing: 2px; }
  .heat th.rowh { width: 78px; font-size: 13px; padding-right: 6px; }
  .heat th.rowh small { display: none; }   /* the dot carries it on small screens */
  .heat td { height: 30px; border-radius: 4px; }
  .heat thead th { font-size: 10px; }
  .heat thead th.odd { color: transparent; }
}
.levels { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.levels .sw { width: 16px; height: 16px; }
.levels small { color: var(--ink-3); margin-left: 2px; }
.sw-empty { background: var(--surface-2); }

/* ---------- accuracy ---------- */
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
@media (max-width: 820px) { .acc-grid { grid-template-columns: minmax(0, 1fr); } }
.acc-main { font-size: clamp(64px, 8vw, 92px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; font-variation-settings: 'opsz' 96; }
.acc-main small { font-size: 0.36em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-left: 4px; }
.acc-cap { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.acc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.acc-stats b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.acc-stats span { font-size: 13px; color: var(--ink-3); }
.lead { color: var(--ink-2); max-width: 70ch; margin-bottom: 22px; }

details.model { margin-top: 16px; }
details.model summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 18px; font-weight: 700;
}
details.model summary::-webkit-details-marker { display: none; }
details.model summary::after {
  content: ''; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.2s ease; flex: none; margin-right: 6px;
}
details.model[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details.model summary small { font-size: 14px; font-weight: 400; color: var(--ink-3); margin-left: auto; }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; margin-top: 20px; font-size: 15px; }
.spec dt { color: var(--ink-3); }
.spec dd { font-weight: 600; word-break: break-word; }
.spec code, .feat code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.86em; font-weight: 500; }
.feat { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.feat h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.feat-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; padding: 6px 0; font-size: 14px; }
.feat-row b { font-weight: 600; }
.feat-row div { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); }
@media (max-width: 560px) { .spec, .feat-row { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .spec dd { margin-bottom: 8px; } }

/* ---------- prose (FAQ, legal) ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 12px; }
.prose h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 26px 0 6px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 10px 0 12px; }
.prose li + li { margin-top: 4px; }
.prose strong { color: var(--ink); font-weight: 600; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 56px; }
.faq-grid h2 { font-size: clamp(27px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

.legal { padding: 44px 0 20px; }
.legal h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; margin-bottom: 30px; font-variation-settings: 'opsz' 96; }
.legal .prose h2 { font-size: 21px; letter-spacing: -0.015em; margin: 34px 0 8px; }
.back { display: inline-block; margin-top: 26px; font-size: 15px; color: var(--ink-2); }

/* ---------- states ---------- */
.msg { padding: 60px 0; font-size: 20px; color: var(--ink-2); }
.skel { display: block; background: var(--surface-2); border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
[hidden] { display: none !important; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0 46px; font-size: 14px; color: var(--ink-3); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; }
.disclaimer { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { color: var(--ink-2); }

/* ---------- tooltip ---------- */
.tip {
  position: fixed; z-index: 40; display: none; pointer-events: none; min-width: 120px;
  background: var(--tip-bg); color: var(--tip-ink); border-radius: 10px; padding: 8px 12px;
  font-size: 14px; line-height: 1.4; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.tip-t { font-size: 12px; opacity: 0.72; margin-bottom: 2px; }
.tip b { font-weight: 700; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row i { width: 12px; flex: none; border-top: 2px solid currentColor; }
.tip-row i.dashed { border-top-style: dashed; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
