/* GTS-Rechner — noocene.org
   Gemeinsames Stylesheet für die Rechner-Seiten hinter der GTS-Seite.
   Visuelle Sprache an noocene.org angelehnt (Referenzwerk-Look,
   Bauhaus-Palette des GTS-Logos: Blau, Rot, Ocker auf Creme). */

:root {
  --cream:   #FBF7EE;
  --paper:   #FFFFFF;
  --ink:     #1B1B1A;
  --muted:   #6B6760;
  --blue:    #1F4E8C;
  --blue-dk: #163A69;
  --red:     #B23A2E;
  --ochre:   #C68A2E;
  --rule:    #E5DECC;
  --rule-dk: #D6CDB6;
  --good:    #2E7D52;
  --shadow:  0 1px 2px rgba(40,30,10,.05), 0 6px 22px rgba(40,30,10,.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Kopf / Navigation ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: rgba(251,247,238,.85);
  backdrop-filter: saturate(160%) blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 880px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.wordmark { font-weight: 700; letter-spacing: .2px; color: var(--ink); }
.wordmark span { color: var(--red); }
.breadcrumb { color: var(--muted); font-size: 14.5px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- Layout ---------- */
.wrap { max-width: 880px; margin: 0 auto; padding: 30px 22px 70px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: 12.5px; font-weight: 700; color: var(--ochre);
  margin: 0 0 8px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; font-size: 2.05rem; line-height: 1.15;
  margin: 0 0 .35em;
}
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem; margin: 2.2em 0 .5em;
  padding-bottom: .25em; border-bottom: 1px solid var(--rule);
}
.lede { font-size: 1.12rem; color: #34302A; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }

/* ---------- Karten ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule-dk);
  border-top: 3px solid var(--blue);
  border-radius: 10px;
  padding: 22px 22px 24px;
  box-shadow: var(--shadow);
  margin: 22px 0;
}
.card.red    { border-top-color: var(--red); }
.card.ochre  { border-top-color: var(--ochre); }

/* Rechner-Kachel auf der Hub-Seite */
.tiles { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 26px 0; }
@media (min-width: 680px){ .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  display: block; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-dk); border-radius: 10px;
  padding: 20px 20px 22px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease; text-decoration: none;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(40,30,10,.10); text-decoration: none; }
.tile .kap { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--ochre); text-transform: uppercase; }
.tile h3 { font-family: Georgia, serif; margin: 6px 0 6px; font-size: 1.25rem; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }
.tile .arrow { color: var(--blue); font-weight: 700; }

/* ---------- Steuerung ---------- */
.control { margin: 16px 0; }
.control label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; gap: 12px; }
.control label .val { font-variant-numeric: tabular-nums; color: var(--blue-dk); font-weight: 700; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 6px; background: var(--rule-dk); margin: 12px 0 4px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--blue);
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
input[type="number"] {
  font: inherit; padding: 7px 9px; border: 1px solid var(--rule-dk);
  border-radius: 7px; width: 110px; background: #fff; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
input[type="number"]:focus { border-color: var(--blue); outline: 2px solid rgba(31,78,140,.15); }

/* ---------- Ergebnis ---------- */
.result {
  background: linear-gradient(180deg, #fff, #FCFAF4);
  border: 1px solid var(--rule-dk); border-radius: 10px;
  padding: 20px; margin: 20px 0; text-align: center;
}
.result .big { font-family: Georgia, serif; font-size: 2.6rem; font-weight: 700; color: var(--blue-dk); line-height: 1.05; font-variant-numeric: tabular-nums; }
.result .big.red { color: var(--red); }
.result .cap { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.compare .box { background: #fff; border: 1px solid var(--rule-dk); border-radius: 9px; padding: 14px; text-align: center; }
.compare .box .n { font-family: Georgia, serif; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.compare .box.today .n { color: var(--red); }
.compare .box.gts .n { color: var(--good); }
.compare .box .l { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* Tabellen */
table.kette { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; }
table.kette th, table.kette td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: right; font-variant-numeric: tabular-nums; }
table.kette th { color: var(--muted); font-weight: 600; text-align: right; }
table.kette td:first-child, table.kette th:first-child { text-align: left; }
table.kette tr.sum td { border-top: 2px solid var(--rule-dk); border-bottom: none; font-weight: 700; }

/* Balken / Schwellen (Aufkommensmodell) */
.gauge { position: relative; height: 56px; background: #F1EAD8; border-radius: 8px; margin: 26px 0 40px; border: 1px solid var(--rule-dk); }
.gauge .fill { position: absolute; left:0; top:0; bottom:0; background: linear-gradient(90deg,var(--blue),#3A78C4); border-radius: 8px 0 0 8px; transition: width .15s ease; }
.gauge .mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); }
.gauge .mark span { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; color: var(--ink); background: var(--cream); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--rule-dk); }
.gauge .mark.hit span { background: var(--good); color: #fff; border-color: var(--good); }
.gauge .lbl-now { position: absolute; bottom: -34px; transform: translateX(-50%); font-weight: 700; color: var(--blue-dk); font-size: 13.5px; }

.note { background: #FBF3E0; border: 1px solid #ECD9A8; border-radius: 9px; padding: 12px 15px; font-size: 14.5px; color: #5C4A22; margin: 18px 0; }
.btn-reset { font: inherit; font-size: 14px; background: #fff; border: 1px solid var(--rule-dk); border-radius: 7px; padding: 6px 12px; cursor: pointer; color: var(--ink); }
.btn-reset:hover { border-color: var(--blue); color: var(--blue); }

footer { border-top: 1px solid var(--rule); margin-top: 50px; padding-top: 18px; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }

.backlink { display: inline-block; margin: 8px 0 0; font-weight: 600; }
