@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,900&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --bg:#faf8f1;
  --card:#ffffff;
  --text:#1e241c;
  --muted:#6c7365;
  --line:#e8e6da;
  --accent:#3e9a51;
  --accent-d:#2c7a3d;
  --shadow: 0 1px 2px rgba(20,32,28,.04), 0 12px 34px rgba(20,32,28,.07);
  --radius: 16px;
  --max: 980px;
  --pad: 16px;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 50% -10%, rgba(62,154,81,.10), transparent 60%), var(--bg);
  color:var(--text);
}

.wrap{ max-width:var(--max); margin:0 auto; padding:0 var(--pad); }

.site-header{ position:sticky; top:0; z-index:1000; backdrop-filter:blur(20px) saturate(180%); background:rgba(250,248,241,.82); border-bottom:1px solid var(--line); box-shadow:0 1px 0 rgba(20,32,28,.04),0 6px 20px rgba(20,32,28,.05); }
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px var(--pad); }
.brand{ display:flex; align-items:center; gap:10px; }
.brand-title{ font-family:'Fraunces',Georgia,serif; font-weight:600; font-size:16px; letter-spacing:0; color:var(--text); }
.brand-sub{ color:var(--muted); font-size:11px; margin-top:1px; }
.tabs{ display:flex; gap:6px; flex-wrap:wrap; }
.tab{ text-decoration:none; color:var(--muted); padding:7px 13px; border-radius:999px; border:1px solid var(--line); background:#fff; font-size:13px; font-weight:600; transition:all .15s ease; }
.tab:hover{ color:var(--text); background:#f0f2ec; border-color:#dfe0d6; text-decoration:none; }
.tab.active{ color:var(--accent-d); border-color:rgba(62,154,81,.4); background:rgba(62,154,81,.10); box-shadow:inset 0 0 0 1px rgba(62,154,81,.12); }

main.wrap{ padding: 22px var(--pad) 46px; }

.site-footer{ border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 18px 0 28px; }

.card{ background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); }
.card + .card{ margin-top: 14px; }
.card-title{ font-family:'Fraunces',Georgia,serif; font-weight:600; margin-bottom:10px; letter-spacing:0; font-size:17px; }

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

.hero{ display:flex; gap:12px; margin-bottom:12px; align-items:flex-start }
.status{font-size:14px; margin:4px 0 6px}

.map{ height:56vh; min-height:380px; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); box-shadow:var(--shadow); }

/* elevation card sits flush under the map */
#elevation{ display:block; margin-top:12px; }

.grid{ display:grid; grid-template-columns:1fr; gap:12px; margin-top:12px; align-items:start; }
@media (min-width:860px){ .grid{grid-template-columns:1fr 1fr; align-items:start;} }

.list{ margin:0; padding-left:18px; color:var(--muted); line-height:1.55; }

.posts{display:grid; gap:12px; margin-top:12px;}
.post-card{ display:block; text-decoration:none; padding:14px; border-radius:var(--radius); border:1px solid var(--line); background:var(--card); color:var(--text); box-shadow:var(--shadow); }
.post-card:hover{border-color: rgba(62,154,81,.4);}
.post-card-title{font-family:'Fraunces',Georgia,serif; font-weight:600; margin-bottom:4px}
.post-card-excerpt{color:var(--muted); margin-top:8px; line-height:1.45}

.post{ max-width:760px; margin:0 auto; }
.post-title{font-family:'Fraunces',Georgia,serif; margin:4px 0 8px; letter-spacing:0}
.post-meta{color:var(--muted); font-size:12px; margin-bottom:14px}
.post-content img{ width:100%; height:auto; border-radius:14px; border:1px solid var(--line); margin:10px 0; }

.button{ display:inline-block; text-decoration:none; padding:10px 12px; border-radius:999px; border:1px solid rgba(62,154,81,.4); color:var(--accent-d); background:rgba(62,154,81,.10); font-weight:600; }

code{ background:#f0f2ec; padding:2px 6px; border-radius:8px; border:1px solid #e3e5da; }

a{ color:var(--accent-d); }
a:visited{ color:var(--accent-d); }
a:hover{ text-decoration:underline; }

.updates{ max-width:760px; margin:0 auto; }
.updates-title{ font-family:'Fraunces',Georgia,serif; margin:0 0 14px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px 16px; font-size:22px; font-weight:600; letter-spacing:0; box-shadow:var(--shadow); }
.update-card{ background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px 16px; box-shadow:var(--shadow); margin:0 0 12px; }
.update-date{ font-family:'Fraunces',Georgia,serif; font-size:18px; font-weight:600; color:var(--text); margin-bottom:6px; }
.update-text{ color:#3f463c; line-height:1.5; }
.update-note{ margin-top:6px; color:var(--muted); font-style:italic; }

/* ---- Home hero (self-configuring) ---- */
.home-hero{ display:grid; grid-template-columns:1.05fr .95fr; gap:30px; align-items:center; margin:6px 0 20px; }
@media (max-width:860px){ .home-hero{ grid-template-columns:1fr; } }
.livepill{ display:inline-flex; align-items:center; gap:9px; font-size:13px; font-weight:700; color:var(--accent-d); background:rgba(62,154,81,.10); border:1px solid rgba(62,154,81,.24); padding:7px 14px; border-radius:999px; }
.beat{ width:9px; height:9px; border-radius:50%; background:var(--accent); position:relative; flex:none; }
.beat::after{ content:""; position:absolute; inset:-5px; border-radius:50%; border:2px solid var(--accent); opacity:.5; animation:heroBeat 2.4s ease-out infinite; }
@keyframes heroBeat{ 0%{transform:scale(.5);opacity:.6} 100%{transform:scale(1.9);opacity:0} }
.home-hero h1{ font-family:'Fraunces',Georgia,serif; font-weight:600; font-size:clamp(34px,5.3vw,56px); line-height:1.03; letter-spacing:-.02em; margin:16px 0 0; }
.home-hero h1 em{ font-style:italic; color:var(--accent-d); }
.home-hero .sub{ margin-top:16px; font-size:16.5px; color:#48503f; max-width:52ch; line-height:1.55; }
.home-hero .sub b{ color:var(--text); font-weight:600; }
.qstats{ display:flex; flex-wrap:wrap; gap:30px; margin-top:22px; padding-top:20px; border-top:1px solid var(--line); }
.qstat .n{ font-family:'Fraunces',Georgia,serif; font-weight:600; font-size:30px; line-height:1; }
.qstat .n small{ font-size:.5em; color:var(--muted); font-weight:600; font-family:'Inter'; margin-left:2px; }
.qstat .l{ font-size:12.5px; color:var(--muted); margin-top:6px; }

/* hero map */
.hero-map{ position:relative; border-radius:24px; overflow:hidden; border:1px solid var(--line); box-shadow:var(--shadow); min-height:320px; background:#eef4ec; }
.hero-map #map{ position:absolute; inset:0; height:100%; min-height:0; border:0; border-radius:0; box-shadow:none; }
.hero-map .mapbadge{ position:absolute; left:16px; top:15px; z-index:5; display:inline-flex; align-items:center; gap:8px; font-size:11px; font-weight:700; letter-spacing:.04em; color:var(--accent-d); background:rgba(255,255,255,.9); padding:6px 11px; border-radius:999px; backdrop-filter:blur(4px); }
.hero-map .mapcallout{ position:absolute; left:16px; right:16px; bottom:16px; z-index:5; background:rgba(255,255,255,.95); border:1px solid var(--line); border-radius:16px; padding:13px 15px; backdrop-filter:blur(6px); box-shadow:0 8px 24px rgba(20,32,28,.10); }
.hero-map .mapcallout .place{ font-family:'Fraunces',Georgia,serif; font-weight:600; font-size:19px; line-height:1.1; }
.hero-map .mapcallout .meta{ font-size:12.5px; color:var(--muted); margin-top:3px; }
.hero-map .mapcallout .meta b{ color:#cf7440; font-weight:700; }

/* progress bar */
.progress-card .ptop{ display:flex; justify-content:space-between; align-items:baseline; font-size:13px; color:var(--muted); margin-bottom:8px; }
.progress-card .ptop b{ font-family:'Fraunces',Georgia,serif; font-size:20px; color:var(--text); font-weight:600; }
.ptrack{ height:14px; border-radius:999px; background:#edeee6; overflow:hidden; }
.pfill{ height:100%; border-radius:999px; background:linear-gradient(90deg,var(--accent),#5cb56d); transition:width .3s ease; width:0%; }

/* status badge (light) */
.status-badge{ display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:650; color:#2c7a3d; background:rgba(62,154,81,.12); border:1px solid rgba(62,154,81,.24); white-space:nowrap; }
.status-dot{ width:9px; height:9px; border-radius:999px; background:var(--accent); }

/* hidden telemetry feeders (map.js needs these present) */
.tele-hidden{ position:absolute !important; width:1px !important; height:1px !important; min-height:0 !important; overflow:hidden; clip:rect(0 0 0 0); opacity:0; pointer-events:none; border:0 !important; }

/* ---- Light-theme overrides for map.js telemetry (stats + insights) ---- */
#statsList, #insightsList{ color:#26312a; }
#statsList *, #insightsList *{ color:#26312a !important; }
#statsList .label, #insightsList .label,
#insightsList .pct-day-meta, #insightsList .pct-day-date,
#insightsList .pct-row span, #insightsList .pct-section-title span{ color:#6c7365 !important; }
#statsList .pct-stat-hero, #statsList .pct-chip,
#insightsList .pct-section, #insightsList .pct-stat-hero, #insightsList .pct-chip{
  background:#faf9f4 !important; border-color:#e8e6da !important;
}
#insightsList .pct-progressbar{ background:#edeee6 !important; border-color:#e0e1d8 !important; }
#insightsList .pct-progressfill{ background:linear-gradient(90deg,#3e9a51,#5cb56d) !important; }
#insightsList div[style*="255,255,255,.18"]{ background:#dfe1d6 !important; }
#insightsList div[style*="70,243,255"]{ background:linear-gradient(180deg,#4fae62,#8fce9c) !important; }

/* ---- Map expand overlay ---- */
.mapexpand{ position:absolute; left:14px; top:14px; z-index:6; width:34px; height:34px; border-radius:10px; border:1px solid var(--line); background:rgba(255,255,255,.92); color:var(--accent-d); font-size:17px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(20,32,28,.12); }
.mapexpand:hover{ background:#fff; }
.hero-map.expanded{ position:fixed; inset:12px; z-index:3000; min-height:0; border-radius:18px; box-shadow:0 30px 90px rgba(20,32,28,.35); }
body.map-expanded{ overflow:hidden; }
.mapbackdrop{ display:none; }
body.map-expanded .mapbackdrop{ display:block; position:fixed; inset:0; background:rgba(20,32,28,.5); z-index:2900; }

/* ---- Language toggle ---- */
.langtoggle{ font-variant-numeric:tabular-nums; letter-spacing:.02em; cursor:pointer; }

/* ---- Off-screen map so map.js can compute stats on the Stats page ---- */
.map-compute{ position:absolute !important; left:-10000px !important; top:0 !important; width:860px !important; height:520px !important; min-height:0 !important; border:0 !important; box-shadow:none !important; border-radius:0 !important; }

/* Sprachumschaltung Update-Texte */
html[lang="de"] .update-text .lang-en{ display:none; }
html[lang="en"] .update-text .lang-de{ display:none; }
