@font-face { font-family: "Heros"; src: url("../fonts/heros-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Heros"; src: url("../fonts/heros-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Einfaches Haushaltsbuch - Website. Ein einziges Stylesheet, keine Abhaengigkeiten.
   Palette wie in der App (ui/theme/Theme.kt): steingraue Flaeche, fast schwarze Tinte,
   Haarlinien, Gelbgruen als einzige Signalfarbe - hier nur als Akzentlinie, nie als Textfarbe
   (auf Hell zu wenig Kontrast). */

:root {
  --body: #EBEBE8;
  --raised: #F7F7F5;
  --ink: #151515;
  --muted: #5F5F59;
  --hairline: #D3D2CD;
  --signal: #B7D225;
  --measure: 42rem;
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --body: #141413;
    --raised: #1F1F1D;
    --ink: #EDEDE9;
    --muted: #A3A39C;
    --hairline: #2E2E2B;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--body); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--body);
  color: var(--ink);
  font: 17px/1.6 "Heros", "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

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

.skip {
  position: absolute; left: -9999px;
  background: var(--signal); color: #151515; font-weight: 600;
  padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; top: 0; }

header.site { border-bottom: 1px solid var(--hairline); }
header.site .wrap {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand {
  font-weight: 700; font-size: 1.05rem; letter-spacing: -.005em;
  color: var(--ink); text-decoration: none;
  box-shadow: inset 0 -.35em 0 var(--signal);
}
nav.site a { color: var(--muted); text-decoration: none; margin-left: 1.1rem; font-size: .92rem; }
nav.site a:first-child { margin-left: 0; }
nav.site a:hover, nav.site a:focus { color: var(--ink); text-decoration: underline; }

main { padding: 2.5rem 0 3.5rem; }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.015em; }
h2 { font-size: 1.15rem; margin: 2.25rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 .4rem; }
p, li { color: var(--muted); }
p { margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
strong { color: var(--ink); }

.lead { font-size: 1.05rem; color: var(--ink); }
.stand { color: var(--muted); font-size: .875rem; margin-bottom: 2rem; }

a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

.card {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--signal);
  border-radius: 14px;
  padding: 1.1rem 1.25rem .3rem;
  margin: 1.5rem 0 2rem;
}

.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { color: var(--ink); font-weight: 600; }
td { color: var(--muted); }

.tiles { display: grid; gap: .75rem; margin: 2rem 0; padding: 0; list-style: none; }
.tiles a {
  display: block; text-decoration: none;
  background: var(--raised); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 1rem 1.15rem;
}
.tiles a:hover, .tiles a:focus { border-color: var(--signal); }
.tiles b { display: block; color: var(--ink); font-size: 1rem; }
.tiles em { display: block; color: var(--muted); font-style: normal; font-size: .9rem; margin-top: .15rem; }

address { font-style: normal; color: var(--muted); }

/* Anschrift hinter einem Ausklapper: einen Klick entfernt, aber nicht auf den ersten Blick. */
details.anschrift { margin: .5rem 0 1rem; }
details.anschrift summary {
  cursor: pointer; color: var(--ink); font-weight: 600;
  list-style: none; display: inline-flex; align-items: center; gap: .45rem;
}
details.anschrift summary::-webkit-details-marker { display: none; }
details.anschrift summary::before {
  content: ""; width: .45rem; height: .45rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .2s ease;
}
details.anschrift[open] summary::before { transform: rotate(45deg); }
details.anschrift address { margin-top: .6rem; padding-left: 1rem; border-left: 2px solid var(--signal); }

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted); font-size: .875rem;
}
footer.site a, footer.site p { color: var(--muted); }
footer.site p { margin: 0 0 .4rem; }

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

@media (max-width: 30rem) {
  h1 { font-size: 1.55rem; }
  header.site .wrap { padding-top: .85rem; padding-bottom: .85rem; }
}

.fine-print { margin-top: 3rem; font-size: .9rem; }
.fine-print h2 { font-size: .95rem; }

/* ------------------------------------------------------------------ Startseite und Anleitungen
   (erzeugt von tools/build.py). Tinte und Haarlinien, Signal nur fuer Balken, Punkte, Linien. */

.wrap.wide { max-width: var(--wide); }
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand:has(img) { box-shadow: none; }
.brand img { border-radius: 7px; }
nav.site a[aria-current="page"] { color: var(--ink); }

h1, h2, h3 { color: var(--ink); font-weight: 700; }
main h2 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -.01em; }
.kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .75rem;
}
.lead { font-size: 1.12rem; line-height: 1.55; }

/* Startseite */
main:has(.hero) { padding: 0 0 1rem; }
main section { padding: 3.5rem 0; }
main section + section { border-top: 1px solid var(--hairline); }
main section h2 { margin-top: 0; }
.hero { padding: 3rem 0 3.5rem; }
.hero__grid, .feature__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 1.1rem; }
.hero__shot, .feature__shot { display: flex; justify-content: center; }
@media (min-width: 52rem) {
  .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 4rem; }
  .feature__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature.flip .feature__text { order: 2; }
}
.feature__text p:not(.kicker) { font-size: 1.05rem; }

/* Die grosse Zahl wie in der App: Cents klein und grau, Balken mit Zeitstrich. */
.meter {
  display: grid; gap: .35rem; margin: 2rem 0 1.75rem; padding: 1.25rem 1.35rem 1.1rem;
  background: var(--raised); border: 1px solid var(--hairline); border-radius: 18px; max-width: 26rem;
}
.meter__label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meter__num { font-size: 3.2rem; font-weight: 700; line-height: 1.05; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter__num small { font-size: 1.15rem; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: .05rem; }
.meter__bar { position: relative; height: 6px; border-radius: 3px; background: var(--hairline); margin: .7rem 0 .55rem; }
.meter__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--signal); }
.meter__bar b { position: absolute; top: -6px; width: 2px; height: 18px; border-radius: 1px; background: var(--ink); }
.meter__note { font-size: .85rem; color: var(--muted); line-height: 1.45; }

/* Handy-Mockups (store/web_mockups.py): Rahmen, Schraeglage und Schatten stecken im Bild, transparent. */
.phone { margin: 0; }
.phone img { display: block; width: 100%; height: auto; }
.phone { width: min(100%, 340px); }
.hero__shot .phone { position: relative; width: min(100%, 400px); container-type: inline-size; }
@media (min-width: 52rem) { .feature__shot .phone { width: min(100%, 400px); } }

/* Bestaetigung wie in der App (AppSnackbarHost): sitzt im Hero-Bild an der Stelle der echten Meldung.
   Nur mit Animation sichtbar; im Dunkelmodus zeigt das dunkle Bild die echte Meldung schon. */
.toast { display: none; }
@supports (width: 1cqw) { .anim .toast {
  display: flex; align-items: center; gap: 1.1em; white-space: nowrap;
  position: absolute; left: 48.7%; top: 37.5%; z-index: 1;
  font-size: 2.55cqw; line-height: 1; color: #EDEDE9; background: #2C2C29;
  padding: 1.15em 1.5em; border-radius: 99em;
  box-shadow: 0 .8em 1.6em -.6em rgba(0,0,0,.5);
  transform: translate(-50%, -50%) rotate(-4deg) translateY(.8em) scale(.96); opacity: 0;
}
.anim .phone.go .toast { animation: toast .5s cubic-bezier(.2,.8,.2,1) .9s forwards; } }
.toast b { color: var(--signal); font-weight: 700; }
@keyframes toast { to { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg); } }
@media (prefers-color-scheme: dark) { .anim .toast { display: none; } }

/* Hereingleiten: nur Transform und Deckkraft, kein Layout-Sprung. Das Hero-Bild bleibt sichtbar (LCP). */
.anim .phone { transition: transform 1s cubic-bezier(.2,.75,.2,1), opacity .7s ease; }
.anim .feature__text { transition: transform .5s ease-out, opacity .5s ease-out; }
.anim .phone:not(.in) { opacity: 0; transform: translateY(56px) rotate(-3deg); }
.anim .flip .phone:not(.in) { transform: translateY(56px) rotate(3deg); }
.anim .feature__text:not(.in) { opacity: 0; transform: translateY(12px); }
.anim .hero__shot .phone { opacity: 1; animation: hero-in 1.1s cubic-bezier(.2,.75,.2,1) both; }
.anim .hero__shot .phone:not(.in) { opacity: 1; }
@keyframes hero-in { from { transform: translateY(40px) rotate(-2.5deg); } to { transform: none; } }
@media print {
  .anim .phone, .anim .feature__text, .anim .meter { opacity: 1 !important; transform: none !important; }
  .anim .meter .meter__bar i { width: 38% !important; } .anim .meter .meter__bar b { left: 50% !important; }
}

/* Zahl zaehlt vom Budget herunter (site.js), Balken fuellt sich, Zeitstrich laeuft an seinen Platz. */
.anim .meter .meter__bar i { transition: width 1.2s cubic-bezier(.2,.75,.2,1) .15s; }
.anim .meter .meter__bar b { transition: left 1.2s cubic-bezier(.2,.75,.2,1) .15s; }
.anim .meter:not(.in) .meter__bar i { width: 0 !important; }
.anim .meter:not(.in) .meter__bar b { left: 0 !important; }

/* Hinweis "bald bei Google Play" bzw. Knopf, sobald die App live ist */
.soon { display: inline-flex; align-items: center; gap: .6rem; margin: 0; padding: .7rem 1.1rem;
  border: 1px solid var(--hairline); border-radius: 999px; background: var(--raised); color: var(--ink); font-size: .95rem; line-height: 1.35; }
.soon .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--signal); flex: none; }
.btn { display: inline-block; padding: .9rem 1.6rem; border-radius: 999px; background: var(--signal); color: #151515;
  font-weight: 700; text-decoration: none; }
.btn:hover { filter: brightness(.95); }

main section.band { background: var(--raised); }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .8rem; }
.ticks li { position: relative; padding-left: 1.6rem; margin: 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: .65rem; height: .65rem; border-radius: 50%; background: var(--signal); }
@media (min-width: 52rem) { .ticks { grid-template-columns: 1fr 1fr; gap: 1rem 2.5rem; } }

.tiles.cols { margin-top: 1.5rem; }
@media (min-width: 52rem) { .tiles.cols { grid-template-columns: 1fr 1fr; } }
.final h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-child { border-top: 1px solid var(--hairline); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-weight: 400; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 .5rem; }

/* Anleitungen */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); }
.guide h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 1rem; }
.guide h2 { margin-top: 2.75rem; scroll-margin-top: 1rem; }
.answer.lead { color: var(--ink); border-left: 3px solid var(--signal); padding-left: 1rem; }
.guide .stand { margin-bottom: 1.5rem; }
.toc { border: 1px solid var(--hairline); border-radius: 14px; padding: .9rem 1.2rem .5rem; margin: 0 0 1rem; }
.toc p { font-weight: 700; color: var(--ink); margin: 0 0 .4rem; font-size: .9rem; }
.toc ol { margin: 0 0 .4rem; font-size: .95rem; padding-left: 1.2rem; }
.toc li { margin-bottom: .2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: .9rem; }
ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: -.05rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--ink);
  display: grid; place-items: center; font-size: .85rem; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.note { background: var(--raised); border: 1px solid var(--hairline); border-radius: 12px; padding: .85rem 1rem; }
.formula {
  font-weight: 700; color: var(--ink); font-size: 1.05rem; text-align: center;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 1rem .5rem; margin: 1.5rem 0;
}
table.calc { max-width: 28rem; margin: 1.25rem 0 1.5rem; font-variant-numeric: tabular-nums; }
table.calc caption { caption-side: bottom; text-align: left; font-size: .82rem; color: var(--muted); padding-top: .5rem; }
table.calc th { font-weight: 400; color: var(--muted); }
table.calc td { text-align: right; color: var(--ink); white-space: nowrap; }
table.calc tr.sum th, table.calc tr.sum td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--ink); border-bottom: none; font-size: 1.05rem; }
td strong { color: var(--ink); }

.app-box {
  display: grid; gap: 1.75rem; align-items: center;
  margin: 3rem 0 1rem; padding: 1.75rem 1.5rem;
  background: var(--raised); border: 1px solid var(--hairline); border-top: 3px solid var(--signal); border-radius: 18px;
}
.guide .app-box h2 { margin-top: 0; }
.app-box .soon, .app-box .btn { margin-top: .5rem; }
.app-box__shot { display: flex; justify-content: center; }
.app-box__shot .phone { width: 300px; }
.app-box.slim { margin-top: 2rem; }
.app-box__more { margin: 1rem 0 0; }
@media (min-width: 40rem) { .app-box:has(.app-box__shot) { grid-template-columns: 1fr 300px; } }
.related { padding-left: 1.1rem; }

footer.site .foot { display: grid; gap: .2rem; }
footer.site strong { color: var(--ink); }
footer.site .fine { font-size: .8rem; margin-top: .4rem; }
.feature__shot .meter { width: 100%; margin: 0; }

/* Bereiche der Anleitungen (24.11.2026) */
.hub-h { margin-top: 2.25rem; }
.hub-h a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.hub-h a:hover { text-decoration: underline; }
