/* earthonline.de */
:root {
  --bg: #0a1120;
  --bg-2: #0f1a2e;
  --panel: #131f36;
  --panel-2: #1a2944;
  --line: #263856;
  --text: #e6ecf5;
  --muted: #9fb0c8;
  --sun: #f4b942;
  --sun-soft: rgba(244, 185, 66, .14);
  --earth: #5cb3ea;
  --earth-soft: rgba(92, 179, 234, .14);
  --link: #8cc8f2;
  --radius: 14px;
  --wrap: 1120px;
  --text-wrap: 720px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-2: #eaf0f8;
  --panel: #ffffff;
  --panel-2: #f1f5fb;
  --line: #d5dfec;
  --text: #15223a;
  --muted: #55657e;
  --sun: #b7790f;
  --sun-soft: rgba(214, 150, 30, .14);
  --earth: #1f78b8;
  --earth-soft: rgba(31, 120, 184, .12);
  --link: #1b65a3;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}
h1, h2, h3 { line-height: 1.25; hyphens: none; -webkit-hyphens: none; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.8em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
img, svg { max-width: 100%; height: auto; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--sun); color: #000; padding: .5em 1em; z-index: 10; }
.skip-link:focus { left: 1em; top: 1em; }

/* Kopf */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.site-header__inner { max-width: var(--wrap); margin: 0 auto; padding: .7rem 1.2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.12rem; letter-spacing: .01em; }
.brand__tld { color: var(--earth); }
.nav-toggle { margin-left: auto; display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .35rem .8rem; font: inherit; font-size: .95rem; cursor: pointer; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .3rem 1.2rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .97rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sun); }
.is-pending { opacity: .45; pointer-events: none; }
@media (max-width: 720px) {
  .js .nav-toggle { display: block; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .4rem 0; }
}

/* Seitenkopf */
.page-head { max-width: var(--wrap); margin: 0 auto; padding: 1.6rem 1.2rem .4rem; }
.page-head .lead { max-width: var(--text-wrap); color: var(--muted); font-size: 1.08rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin: 0; }
.breadcrumb a { color: var(--muted); }

.content { max-width: var(--wrap); margin: 0 auto; padding: 0 1.2rem 3rem; }
.prose { max-width: var(--text-wrap); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }

/* Live-Werte */
.live { max-width: var(--wrap); margin: 0 auto; padding: .6rem 1.2rem 0; }
.live__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; min-width: 0; }
.stat--main { grid-column: span 2; background: linear-gradient(135deg, var(--sun-soft), transparent 70%), var(--panel); }
.stat__label { color: var(--muted); font-size: .9rem; margin: 0 0 .25rem; }
.stat__value { font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); font-weight: 700; font-variant-numeric: tabular-nums; margin: 0; line-height: 1.2; white-space: nowrap; }
.stat--main .stat__value { font-size: clamp(1.8rem, 1.1rem + 3vw, 3rem); color: var(--sun); }
.stat__unit { font-size: .55em; font-weight: 600; color: var(--muted); margin-left: .2em; }
.stat__note { color: var(--muted); font-size: .9rem; margin: .35rem 0 0; }
.live__time { color: var(--muted); font-size: .88rem; margin: .6rem 0 0; }
@media (max-width: 880px) { .live__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .live__grid { grid-template-columns: 1fr; } .stat--main { grid-column: auto; } }

/* Skala Perihel bis Aphel */
.range { margin-top: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.range__bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--sun), var(--earth)); margin: 1.6rem 0 .5rem; }
.range__mark { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--text); }
.range__ends { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .88rem; }
.range__ends span:last-child { text-align: right; }

/* Bahn und Countdown */
.duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.2rem; margin-top: 2rem; align-items: start; }
@media (max-width: 880px) { .duo { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card h2 { margin-top: 0; font-size: 1.25rem; }
.orbit svg { display: block; width: 100%; max-width: 520px; margin: 0 auto; }
.orbit__switch { display: flex; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .6rem; }
.chip { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: .3rem .8rem; border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.orbit__caption { color: var(--muted); font-size: .9rem; margin: .6rem 0 0; }
.orbit text { font: 15px system-ui, sans-serif; fill: var(--muted); }
.orbit .t-strong { fill: var(--text); font-weight: 600; }

.countdown { margin: 0 0 1.2rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.countdown:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.countdown h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.countdown__when { color: var(--muted); font-size: .92rem; margin: 0 0 .6rem; }
.countdown__clock { display: flex; gap: .5rem; flex-wrap: wrap; }
.countdown__clock span { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: .35rem .6rem; min-width: 4.2rem; text-align: center; font-variant-numeric: tabular-nums; }
.countdown__clock b { display: block; font-size: 1.45rem; line-height: 1.2; }
.countdown__clock small { color: var(--muted); font-size: .78rem; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .96rem; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .9rem; }
td.r, th.r { text-align: right; }

.note { background: var(--earth-soft); border-left: 3px solid var(--earth); border-radius: 0 10px 10px 0; padding: .8rem 1rem; margin: 1.2em 0; }
.note p:last-child { margin: 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: .6rem 0 .2rem; }

/* Startseite */
.teaser { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.teaser a { display: block; text-decoration: none; color: var(--text); }
.teaser a:hover h2 { text-decoration: underline; }
.teaser h2 { margin: 0 0 .3rem; font-size: 1.15rem; color: var(--link); }
.teaser p { margin: 0; color: var(--muted); font-size: .95rem; }
.soon { color: var(--muted); }

/* Formular */
.form-status { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1rem; max-width: var(--text-wrap); }
.form-status--ok { background: rgba(70, 180, 110, .15); border: 1px solid rgba(70, 180, 110, .5); }
.form-status--error { background: rgba(220, 80, 70, .12); border: 1px solid rgba(220, 80, 70, .5); }
.contact-form { max-width: var(--text-wrap); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 2rem; }
.contact-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.contact-form__wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .contact-form__fields { grid-template-columns: 1fr; } }
.contact-form label { display: block; font-size: .92rem; margin-bottom: .25rem; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--earth); outline-offset: 1px; }
.optional, .contact-form__note { color: var(--muted); font-size: .88rem; }
.hp-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.button { font: inherit; font-weight: 600; background: var(--sun); color: #1a1200; border: 0; border-radius: 10px; padding: .65rem 1.3rem; cursor: pointer; }
.button:disabled { opacity: .6; cursor: wait; }
.cf-turnstile { margin: .4rem 0 1rem; }

/* Fuß */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: .92rem; }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 1.6rem 1.2rem 2rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0 0 .4rem; max-width: 560px; }
.theme-switch { font: inherit; font-size: .88rem; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: .25rem .7rem; cursor: pointer; }

@media print {
  .site-header, .site-footer, .orbit__switch, .theme-switch { display: none; }
  body { background: #fff; color: #000; }
}

/* Erdfoto */
.photo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; max-width: var(--wrap); margin: 0 auto; padding: .6rem 1.2rem 0; }
@media (max-width: 880px) { .photo { grid-template-columns: 1fr; } }
.photo figure { margin: 0; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #000; }
.photo figcaption { background: var(--panel); color: var(--muted); font-size: .88rem; padding: .6rem .9rem; }
.facts { margin: 0; }
.facts div { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { padding-top: 0; }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: .1rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts dd small { display: block; font-weight: 400; color: var(--muted); font-size: .86rem; }
.notice { background: var(--sun-soft); border-left: 3px solid var(--sun); border-radius: 0 10px 10px 0; padding: .8rem 1rem; margin: 1rem 0 0; }

/* Weltkarte */
.karte { position: relative; aspect-ratio: 2 / 1; background: #070c17 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.karte__canvas { display: block; width: 100%; height: 100%; }
.karte__loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .95rem; }
.karte.is-ready .karte__loading { display: none; }
.karte-wrap { max-width: var(--wrap); margin: 0 auto; padding: .6rem 1.2rem 0; }
.karte-caption { color: var(--muted); font-size: .88rem; margin: .5rem 0 0; }
.facts--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.4rem; }
.facts--grid div { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.facts--grid div:first-child { padding-top: .65rem; }

/* Ortslisten (Sonnenaufgang, Sonnenuntergang, Mitternacht) */
.orte-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1rem; }
@media (max-width: 880px) { .orte-duo { grid-template-columns: 1fr; } }
.orte-duo .card h2 { display: flex; align-items: center; gap: .55rem; }
.dot { width: .8rem; height: .8rem; border-radius: 50%; display: inline-block; flex: none; }
.dot--auf { background: #ffb347; }
.dot--unter { background: #c3a5ff; }
.dot--nacht { background: #7fb3ff; }
.orte-laender { color: var(--muted); font-size: .92rem; margin: -.2rem 0 .8rem; }
.orte-laender strong { color: var(--text); font-weight: 600; }
.ortliste { list-style: none; margin: 0; padding: 0; }
.ortliste li { display: grid; grid-template-columns: 1fr auto; column-gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.ortliste li:last-child { border-bottom: 0; }
.ortliste strong { font-weight: 600; }
.ort__zeit { font-variant-numeric: tabular-nums; color: var(--sun); white-space: nowrap; text-align: right; }
.ort__zeit.is-past { color: var(--muted); }
.ort__meta { grid-column: 1 / -1; color: var(--muted); font-size: .86rem; }
.orte-mehr { color: var(--muted); font-size: .88rem; margin: .5rem 0 0; }

/* Nacht-Statistik */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-top: 1rem; }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr; } }
.stat--nacht { background: linear-gradient(135deg, rgba(92,140,234,.16), transparent 70%), var(--panel); }

/* Startseite: Zeitregler */
.zeitregler { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; }
.zeitregler input[type=range] { flex: 1 1 240px; accent-color: var(--sun); }
.zeitregler output { font-variant-numeric: tabular-nums; min-width: 3.5rem; color: var(--sun); font-weight: 600; }
.legende { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); font-size: .86rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.legende i { display: inline-block; width: 1.4rem; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: .35rem; }
