/* Landing page nullwatt.app – same design rules as the apps (concept ch. 6): paper, ink, one signal red,
   frames instead of shadows, radii 2/4 px, Barlow Condensed labels, Atkinson text, Plex Mono numbers. */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2"); }

:root {
  --font-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: 16px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font-body);
  /* clip, not hidden: hidden would make body a scroll container and break the sticky header */
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
/* long German words (Datenschutzerklärung, Steckdosenleiste) must not push past narrow screens */
body { overflow-wrap: break-word; }
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-label); font-weight: 600; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(46px, 8vw, 76px); letter-spacing: -0.005em; }
h2 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 16px; }
h3 { font-size: 24px; margin-bottom: 8px; }
p { margin: 0 0 16px; }
.mono { font-family: var(--font-mono); font-weight: 500; }
.label {
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px;
}
.note { font-size: 14px; color: var(--ink-soft); }
.intro { color: var(--ink-soft); max-width: 640px; }
.red-text { color: var(--red); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

section { padding: 64px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { section { padding: 96px 0; } }

/* ------------------------------------------------------------------ header */
/* sticky header on every page; anchors stop below it */
.top { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
html { scroll-padding-top: 80px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { height: 36px; width: auto; }
.brand span { font-family: var(--font-label); font-weight: 600; font-size: 22px; letter-spacing: 0.08em; }
/* Main navigation (tools/web-nav.mjs): visible on phones too; the landing anchors only from 720 px. */
.main-nav { display: flex; align-items: center; gap: 16px; }
.main-nav a { font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; padding: 12px 0; }
.main-nav > a:hover, .nav-menu > a:hover, .main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 720px) {
  .main-nav { gap: 24px; }
  .main-nav a { font-size: 16px; }
}
@media (max-width: 380px) { .brand span { font-size: 18px; } .main-nav { gap: 12px; } }
.nav-menu { position: relative; }
.nav-menu > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-sub {
  display: none; position: absolute; right: -12px; top: 100%; z-index: 20; min-width: 300px; list-style: none; margin: 0; padding: 6px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 4px;
}
@media (hover: hover) { .nav-menu:hover .nav-sub { display: block; } }
.nav-menu:focus-within .nav-sub { display: block; }
.nav-sub a { display: block; padding: 10px 12px; border-radius: 2px; text-transform: none; letter-spacing: 0.02em; font-size: 18px; }
.nav-sub a span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 14px; letter-spacing: 0; color: var(--ink-soft); }
.nav-sub a:hover, .nav-sub a:focus-visible { background: var(--paper-deep); }
.nav-sub-all { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.nav-sub-all a { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
@media (min-width: 720px) { .top-actions { gap: 24px; } }
.nav-toggle, .nav-close { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.nav-toggle:hover, .nav-close:hover { background: var(--paper-deep); }
.nav-toggle:focus-visible, .nav-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.nav-backdrop { display: none; }
/* Facebook: icon next to the theme switch from 720 px (same size), on phones a line in the menu panel */
.social-link { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); }
.social-link:hover { background: var(--paper-deep); }
.social-link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (min-width: 720px) { .social-link { display: inline-flex; } .top-actions .social-link { margin-right: -16px; } }
.nav-social { display: none; }
/* Phones with JavaScript (theme.js): burger button, the nav becomes a panel from the right, "Rechner" folds open. */
@media (max-width: 719px) {
  .js .top-actions { gap: 8px; }
  .js .nav-toggle:not([hidden]), .js .nav-close:not([hidden]) { display: inline-flex; }
  .js .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 2; width: min(340px, 88vw); overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; align-items: stretch; gap: 0; padding: 76px 20px 32px;
    background: var(--paper); border-left: 1px solid var(--line-strong);
    transform: translateX(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .js.nav-open .main-nav { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .js .nav-close { position: absolute; top: 10px; right: 16px; }
  .js .main-nav > a, .js .nav-menu > a { display: flex; align-items: center; justify-content: space-between; font-size: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .js .main-nav > .nav-social { display: flex; }
  .js .nav-menu > a::after { width: 8px; height: 8px; margin-right: 6px; transition: transform 0.2s ease; }
  .js .nav-menu.open > a::after { transform: translateY(2px) rotate(-135deg); }
  .js .nav-sub, .js .nav-menu:hover .nav-sub, .js .nav-menu:focus-within .nav-sub { display: none; position: static; min-width: 0; padding: 4px 0 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .nav-menu.open .nav-sub { display: block; }
  .js .nav-sub a { padding: 10px 8px; }
  .js .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.4); opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
  .js.nav-open .nav-backdrop { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
  .js.nav-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .js .main-nav, .js .nav-backdrop, .js .nav-menu > a::after { transition: none !important; } }

/* ------------------------------------------------------------------ buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border-radius: 4px; font-family: var(--font-label); font-weight: 600; font-size: 18px; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none; border: 1px solid var(--line-strong);
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary[aria-disabled="true"] { cursor: default; }
.btn-secondary:hover { background: var(--paper-deep); }
a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ------------------------------------------------------------------ hero */
.hero { border-top: 0; padding-top: 48px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.lead { font-size: 19px; max-width: 560px; margin-top: 20px; }
@media (min-width: 900px) {
  .hero { padding-top: 72px; }
  .hero-grid { grid-template-columns: 1.2fr 1fr; }
}

/* Screenshots in a line-drawn phone, like the illustrations: ink outline, diagonally hatched body
   (technical drawing), screen with a thin outline, island in ink. Hatching is drawn with hard-edged stripes. */
.shot { margin: 0; }
.phone {
  position: relative; display: block; width: 100%; max-width: 300px; margin: 0 auto;
  padding: 2.6%; border: 1.5px solid var(--ink); border-radius: 14% / 6.6%;
  background: repeating-linear-gradient(-45deg, var(--line-strong) 0 1px, transparent 1px 6px);
}
.phone::before, .phone::after {
  /* side buttons, outline only */
  content: ""; position: absolute; width: 4px; border: 1.5px solid var(--ink); background: var(--paper);
}
.phone::before { right: -5.5px; top: 24%; height: 11%; border-left: 0; border-radius: 0 2px 2px 0; }
.phone::after { left: -5.5px; top: 20%; height: 7%; border-right: 0; border-radius: 2px 0 0 2px; }
.screen { position: relative; display: block; border: 1.5px solid var(--ink); border-radius: 12% / 5.6%; overflow: hidden; background: #F3F0E8; }
.screen img { width: 100%; }
/* Island at its real place on the screen (iPhone 18 Pro: x 461–745, y 42–151 of 1206 × 2622). */
.screen::after {
  content: ""; position: absolute; left: 38.2%; top: 1.6%; width: 23.6%; height: 4.16%; background: var(--ink); border-radius: 999px;
}
.shot-hero .phone { max-width: 320px; }
.shot figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-soft); text-align: center; }
@media (min-width: 900px) { .shot-hero .phone { margin: 0 0 0 auto; } }

/* ------------------------------------------------------------------ calculator with meter */
.calc { background: var(--paper-deep); }
.calc-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.calc-fields { display: grid; gap: 20px; margin-top: 24px; max-width: 460px; }
.field .label { display: block; margin-bottom: 4px; }
.range-row { display: flex; align-items: center; gap: 16px; }
.range-row output { min-width: 96px; text-align: right; font-size: 17px; }
input[type="range"] { flex: 1; min-height: 44px; accent-color: var(--ink); background: transparent; }

.meter-box { justify-self: start; }
@media (min-width: 900px) { .meter-box { justify-self: center; } }
.meter { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.digit {
  display: inline-flex; align-items: center; justify-content: center; width: clamp(48px, 12vw, 64px); height: clamp(72px, 18vw, 96px);
  background: #1D1D1B; color: #F3F0E8; border-radius: 4px;
  font-family: var(--font-mono); font-weight: 500; font-size: clamp(44px, 11vw, 60px); line-height: 1;
}
.digit.red { background: #C3271D; }
.meter .digit:nth-child(3) { margin-right: 6px; }
.unit { font-family: var(--font-mono); font-size: clamp(32px, 8vw, 44px); margin-left: 6px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .digit { border: 1px solid var(--line-strong); }
}
:root[data-theme="dark"] .digit { border: 1px solid var(--line-strong); }

/* ------------------------------------------------------------------ nameplate tables */
.plate { width: 100%; max-width: 720px; border-collapse: collapse; border: 1px solid var(--line-strong); margin: 8px 0 20px; }
.plate th, .plate td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.plate thead th { font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); background: var(--paper-deep); }
.plate tbody th { font-family: var(--font-label); font-weight: 600; font-size: 18px; white-space: nowrap; }
.plate td.num, .plate th.num { text-align: right; font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
.plate tbody tr:last-child th, .plate tbody tr:last-child td { border-bottom: 0; }
.plate .picto { width: 22px; height: 22px; vertical-align: -5px; margin-right: 8px; color: var(--ink); }
.needs .plate td { color: var(--ink-soft); }
/* pricing: two plan cards, Pro with the ink frame */
.pricing .intro { max-width: 640px; }
.plans { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; align-items: stretch; } }
/* same hatched frame as screenshots and figures: ink outline, hatched band, paper screen inside */
.plan { display: flex; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: 4px; background: repeating-linear-gradient(-45deg, var(--line) 0 1px, transparent 1px 6px); }
/* Pro stands out through its frame in ledger green (the app's colour for savings; red stays reserved for signals) */
.plan-pro { border: 2.5px solid var(--ledger); background: repeating-linear-gradient(-45deg, var(--ledger) 0 1px, transparent 1px 6px); }
.plan-pro .plan-screen { border: 2px solid var(--ledger); }
.plan-pro .plan-badge { border-color: var(--ledger); color: var(--ledger); }
.plan-pro .plan-list li::before { border-color: var(--ledger); }
.plan-screen { flex: 1; display: flex; flex-direction: column; padding: 26px 22px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper); }
.plan:not(.plan-pro) .plan-screen { border-color: var(--line-strong); }
@media (max-width: 520px) { .plan { padding: 8px; } .plan-screen { padding: 22px 18px; } }
.plan h3 { font-size: 30px; margin: 0 0 12px; }
.plan-badge { align-self: flex-start; margin: 0 0 14px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 2px; font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase; }
.plan-badge-soft { border-color: var(--line-strong); color: var(--ink-soft); }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-amount { font-size: 44px; font-weight: 500; line-height: 1; }
.plan-per { font-size: 17px; color: var(--ink-soft); }
.plan-note { margin: 8px 0 20px; color: var(--ink-soft); font-size: 15px; }
.plan-list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.plan-list li { position: relative; padding-left: 28px; }
.plan-list li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 6px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.plan-trial { margin: auto 0 0; padding-top: 22px; font-family: var(--font-label); font-weight: 600; font-size: 17px; letter-spacing: 0.03em; text-transform: uppercase; }
.pricing-note { margin-top: 20px; max-width: 640px; }
@media (max-width: 520px) {
  .plate tbody th { white-space: normal; }
  .plate th, .plate td { padding: 10px; }
}

/* ------------------------------------------------------------------ steps */
.step-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 40px; }
@media (min-width: 820px) { .step-list { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.step-list li { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.step-list .illu { width: 100%; max-width: 320px; height: auto; margin-bottom: 20px; }
.step-no { font-size: 15px; color: var(--red); margin-bottom: 4px; }
.step-list p:last-child { color: var(--ink-soft); }

/* ------------------------------------------------------------------ features */
.feature-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1.3fr; gap: 64px; }
  .feature-grid.reverse { grid-template-columns: 1.3fr 1fr; }
}
@media (max-width: 899px) { .feature-grid.reverse .shot { order: -1; } }
.feature-alt { background: var(--paper-deep); }

.stamps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.stamps li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; }
@media (max-width: 480px) { .stamps li { grid-template-columns: 1fr; gap: 6px; } }
.stamp {
  justify-self: start; display: inline-block; padding: 4px 10px; border: 2px solid currentColor; border-radius: 2px;
  font-family: var(--font-label); font-weight: 600; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase;
  transform: rotate(-4deg);
}
.stamp-red { color: var(--red); }
.stamp-ochre { color: var(--ochre); }
.stamp-green { color: var(--ledger); }
.stamp-ink { color: var(--ink); }

.facts { margin: 24px 0; display: grid; gap: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); padding-top: 2px; }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

.shots-row { display: grid; gap: 32px; margin-top: 32px; }
@media (min-width: 720px) { .shots-row { grid-template-columns: repeat(3, 1fr); } }
.shots-row .phone { max-width: 260px; }

/* ------------------------------------------------------------------ needs, privacy, faq */
.needs-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .needs-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; } }

.privacy-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 24px; }
@media (min-width: 820px) { .privacy-list { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.privacy-list li { border-left: 4px solid var(--ledger); padding: 4px 0 4px 16px; }
.privacy-list h3 { font-size: 22px; }
.privacy-list p { color: var(--ink-soft); margin: 0; }

.faq-wrap { max-width: 760px; }
.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-of-type { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  min-height: 56px; padding: 12px 0; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 22px; color: var(--ink-soft); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding-bottom: 8px; }

/* Official store badge, unchanged artwork (Google brand rules); the PNG has transparent space above and below. */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { display: block; width: auto; height: 72px; }
.actions .store-badge { margin: -10px 0; }
.foot .store-badge img { height: 60px; }

/* ------------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot nav a { font-size: 15px; padding: 10px 0; }
.foot .note { margin: 0; width: 100%; }
@media (min-width: 720px) { .foot .note { width: auto; } }

/* ------------------------------------------------------------------ legal page */
.legal { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.legal section { border-top: 0; padding: 0 0 48px; }
.legal section + section { border-top: 1px solid var(--line); padding-top: 48px; }
.legal h1 { font-size: clamp(40px, 7vw, 60px); margin-bottom: 24px; }
.legal h2 { font-size: 24px; margin: 32px 0 8px; }
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal a { text-underline-offset: 3px; }

/* ------------------------------------------------------------------ guide (ratgeber) */
.article-wrap, .guide-wrap { padding-top: 32px; padding-bottom: 64px; }
.article-wrap > * { max-width: 760px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-soft); margin-bottom: 32px; }
.crumbs a { text-underline-offset: 3px; }
.article-head { margin-bottom: 32px; }
.article-head h1 { font-size: clamp(38px, 6.4vw, 60px); }
.article-head .lead { max-width: 680px; }
.article-head .note { margin: 0; }

.toc { border: 1px solid var(--line-strong); border-radius: 4px; padding: 16px 20px; margin-bottom: 40px; background: var(--paper-deep); }
.toc .label { margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { padding: 4px 0; }
.toc a { text-underline-offset: 3px; }

.prose h2 { font-size: clamp(28px, 4vw, 36px); margin: 48px 0 16px; scroll-margin-top: 16px; }
.prose h3 { font-size: 22px; margin: 32px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose a { text-underline-offset: 3px; }
.prose .plate { margin: 16px 0 8px; }
.prose .plate + .note { margin-bottom: 24px; }
.table-scroll { overflow-x: auto; }
.formula {
  font-family: var(--font-mono); font-weight: 500; font-size: 16px; line-height: 1.6;
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 14px 16px; margin: 16px 0 24px; overflow-x: auto;
}
.box { border-left: 4px solid var(--ink); padding: 4px 0 4px 16px; margin: 24px 0; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box .label { margin-bottom: 6px; }
.box-warn { border-left-color: var(--red); }
.box-ok { border-left-color: var(--ledger); }
.steps-ol { counter-reset: step; list-style: none; padding: 0 !important; }
.steps-ol > li { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 20px; }
.steps-ol > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 2px;
  font-family: var(--font-mono); font-weight: 500; font-size: 15px; color: var(--red);
}
.prose .faq { margin-top: 8px; }

.calc-box { border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper-deep); padding: 20px; margin: 24px 0 32px; }
.calc-box .calc-grid { gap: 24px; }
.calc-box .calc-fields { margin-top: 0; }
@media (min-width: 900px) { .calc-box .calc-grid { grid-template-columns: 1.2fr 1fr; } }
.calc-box .digit { width: clamp(40px, 9vw, 52px); height: clamp(60px, 13vw, 78px); font-size: clamp(36px, 8vw, 48px); }

.cta { border: 1px solid var(--line-strong); border-radius: 4px; padding: 24px; margin: 56px 0 0; }
.cta-title { font-family: var(--font-label); font-weight: 600; font-size: 28px; line-height: 1.1; margin-bottom: 12px; }
.related { margin-top: 56px; max-width: none !important; }
.related h2 { font-size: 30px; }

.guide-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .guide-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .guide-list-index { grid-template-columns: repeat(3, 1fr); } }
.guide-card a {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper);
}
.guide-card a:hover { background: var(--paper-deep); }
.guide-card .label { margin: 0; }
.guide-card-title { font-family: var(--font-label); font-weight: 600; font-size: 24px; line-height: 1.1; }
.guide-card a:hover .guide-card-title { text-decoration: underline; text-underline-offset: 4px; }
.guide-card-text { color: var(--ink-soft); flex: 1; }
.guide-card .note { margin: 0; }
.guide-links { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 0; max-width: 640px; border-top: 1px solid var(--line-strong); }
.guide-links li { border-bottom: 1px solid var(--line-strong); }
.guide-links a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 10px 0; text-decoration: none; font-weight: 700; }
.guide-links a::after { content: "→"; font-family: var(--font-mono); color: var(--ink-soft); }
.guide-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.prose h3 .picto { width: 24px; height: 24px; vertical-align: -3px; margin-right: 8px; }

/* guide figures (tools/web-figures.mjs) */
/* Frame like the screenshots on the landing page (.phone): ink outline, hatched body, screen with a thin outline. */
.article-figure { margin: 0 0 40px; }
.figure-frame {
  display: block; padding: 14px; border: 1.5px solid var(--ink); border-radius: 4px;
  background: repeating-linear-gradient(-45deg, var(--line-strong) 0 1px, transparent 1px 6px);
}
.figure-screen { display: block; padding: 20px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper); }
.figure-svg { display: block; width: 100%; height: auto; }
.article-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.guide-card-figure { display: block; margin-bottom: 8px; }
.guide-card-figure .figure-frame { padding: 8px; }
.guide-card-figure .figure-screen { padding: 10px; }
.guide-card-figure .figure-svg { max-height: 140px; }
@media (max-width: 520px) { .figure-frame { padding: 8px; } .figure-screen { padding: 12px; } }

/* guide sources */
.sources { margin-top: 48px; padding: 8px 0 0; border-top: 1px solid var(--line-strong); }
.sources h2 { font-size: 26px; margin-top: 24px; }
.sources ol { padding-left: 22px; }
.sources li { margin-bottom: 10px; font-size: 15px; }
.sources .source-pub { display: block; color: var(--ink-soft); font-size: 14px; }
.sources .note { margin-top: 16px; }

/* product recommendations (guide) */
.ad-note { font-size: 14px; color: var(--ink-soft); }
.ad-tag {
  display: inline-block; padding: 1px 6px; margin-right: 6px; border: 1px solid var(--line-strong); border-radius: 2px;
  font-family: var(--font-label); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft);
}
.prose .products { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; gap: 16px; }
.product { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 4px; margin: 0 !important; }
@media (max-width: 560px) { .product { grid-template-columns: 1fr; } }
.product-media {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 8px; border: 1.5px solid var(--ink); border-radius: 4px;
  background: repeating-linear-gradient(-45deg, var(--line-strong) 0 1px, transparent 1px 6px);
}
.product-drawing { display: block; width: 100%; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px; }
.product-drawing svg { display: block; width: 100%; height: auto; }
.product-media.has-photo { background: #fff; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 560px) { .product-media { max-width: 180px; } }
.product-body h3 { margin: 0 0 8px; }
.product-body .label { margin-bottom: 6px; }
.product:first-child .product-body .label { color: var(--red); }
.product-specs { margin: 0 0 12px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.product-specs div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.product-specs dt { font-family: var(--font-label); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); font-size: 14px; }
.product-specs dd { margin: 0; font-family: var(--font-mono); font-weight: 500; }
.product-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.product-buy .btn { margin-left: auto; }
.product-price { display: block; line-height: 1.3; }
.price-now { font-family: var(--font-mono); font-weight: 500; font-size: 22px; }
.price-was { margin-left: 10px; font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.price-was s { font-family: var(--font-mono); }
.price-save { display: block; margin-top: 2px; font-family: var(--font-mono); font-weight: 500; font-size: 14px; color: var(--red); }

/* guide categories */
.cat-nav ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper);
}
.cat-nav a:hover { background: var(--paper-deep); }
.cat-nav a[aria-current="page"] { border-color: var(--ink); background: var(--paper-deep); }
.cat-nav .picto { width: 22px; height: 22px; flex: none; color: var(--ink); }
.cat-name { font-family: var(--font-label); font-weight: 600; font-size: 18px; letter-spacing: 0.02em; flex: 1; }
.cat-count { font-size: 14px; color: var(--ink-soft); }
.cat-section { border-top: 1px solid var(--line-strong); padding: 40px 0 0; margin-top: 40px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.cat-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; }
.cat-head h2 a { text-decoration: none; }
.cat-head h2 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.cat-head h2 .picto, .cat-title .picto { width: 32px; height: 32px; flex: none; }
.cat-all { font-family: var(--font-label); font-weight: 600; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; text-underline-offset: 4px; padding: 10px 0; }
.cat-all::after { content: " →"; font-family: var(--font-mono); }
.cat-section .intro { margin: 8px 0 0; }
.cat-title { display: flex; align-items: center; gap: 14px; }
.cat-more { font-size: 26px; margin: 56px 0 16px; }
.label-link { color: inherit; text-decoration: none; }
.label-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* calculators (apps/web/rechner/tools.ts) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tool { border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper-deep); padding: 20px; margin: 16px 0 12px; }
.tool-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-field { display: block; margin: 0 0 14px; }
.tool-field .label { display: block; margin-bottom: 4px; }
.input-unit { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); }
.input-unit:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.input-unit input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; padding: 0 12px; font: 500 17px var(--font-mono); color: var(--ink); }
.input-unit input:focus { outline: none; }
.unit-label { padding: 0 12px; font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.hint { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.tool-error { color: var(--red); font-size: 14px; }
.tool .meter { margin: 4px 0 8px; }
.tool .digit { width: clamp(36px, 8vw, 48px); height: clamp(54px, 12vw, 72px); font-size: clamp(32px, 7vw, 44px); }
.tool .unit { font-size: clamp(26px, 6vw, 34px); }
.tool-verdict { margin: 16px 0 12px; }
.tool-verdict p { margin: 10px 0 0; }
.tool-facts { margin: 12px 0 0; }
.tool-facts div { grid-template-columns: 112px 1fr; gap: 8px; padding: 12px 14px; }
.tool-facts dd { font-size: 15px; }
.tool-big { font-size: 48px; line-height: 1; margin: 4px 0 12px; }
.tool-mode { border: 0; padding: 0; margin: 0 0 14px; }
.tool-mode legend { margin-bottom: 6px; }
.tool-mode label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.tool-mode input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }

.device-head, .device-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.85fr) minmax(0, 1fr) 36px; gap: 8px; align-items: end; }
.device-head { font-family: var(--font-label); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); padding-bottom: 4px; }
.device-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.device-cell { display: block; min-width: 0; }
.device-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.device-row select, .tool-field select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: var(--ink); font: 400 16px var(--font-body); padding: 0 8px; }
.device-row .input-unit input { padding: 0 8px; font-size: 16px; }
.device-row .unit-label { padding: 0 8px; }
.device-remove { display: flex; align-items: center; justify-content: center; width: 36px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.device-remove .picto { width: 18px; height: 18px; }
.device-remove:hover { color: var(--red); }
@media (max-width: 680px) {
  .device-head { display: none; }
  .device-row { grid-template-columns: repeat(3, 1fr); }
  .device-label { position: static; width: auto; height: auto; clip: auto; display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 2px; }
  .device-name { grid-column: 1 / -2; }
  .device-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; }
  .device-row .device-cell:nth-child(2) { grid-column: 1; }
  .device-remove { grid-column: 4; grid-row: 1; }
}
.device-actions { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin: 16px 0 0; }
.device-actions .tool-field { margin: 0; min-width: 200px; }
.tool-result-wide { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.tool-total { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 32px; margin-bottom: 16px; }
.tool-total p { margin: 0 0 6px; }
.ranking { list-style: none; padding: 0; margin: 8px 0; }
.ranking li { margin-bottom: 14px; }
.rank-head { display: flex; align-items: baseline; gap: 10px; }
.rank-no { font-size: 13px; color: var(--ink-soft); }
.rank-name { flex: 1; font-weight: 700; }
.rank-cost { font-size: 17px; }
.rank-bar { display: flex; height: 14px; margin: 6px 0 4px; }
.rank-bar span { display: block; height: 100%; }
.seg-active { border: 1.5px solid var(--ink); }
.seg-standby { border: 1.5px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--ink-soft) 0 1px, transparent 1px 5px); }
.seg-active + .seg-standby { border-left: 0; }
.rank-note { margin: 0; font-size: 13px; color: var(--ink-soft); }
.rank-legend span { display: inline-block; width: 22px; height: 12px; vertical-align: -1px; margin: 0 4px 0 12px; }
.rank-legend span:first-child { margin-left: 0; }
.legend-active { border: 1.5px solid var(--ink); }
.legend-standby { border: 1.5px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--ink-soft) 0 1px, transparent 1px 5px); }

/* custom select (device calculator): same field look as the inputs, drawn chevron instead of the system arrow */
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg);
}
.device-row select, .tool-field select { appearance: none; -webkit-appearance: none; padding: 0 36px 0 12px; cursor: pointer; text-overflow: ellipsis; }
.device-row select:focus-visible, .tool-field select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* calculator pages (tools/web-calc.mjs): wide, landing-page style */
.calc-hero { padding-top: 32px; padding-bottom: 40px; }
.calc-hero h1 { font-size: clamp(42px, 7vw, 68px); }
.calc-hero .crumbs { margin-bottom: 28px; }
.calc-hero .note { margin: 0; }
.tool-band { background: var(--paper-deep); padding: 40px 0 48px; }
.tool-band .tool { background: var(--paper); margin: 0; padding: 24px; }
@media (min-width: 900px) { .tool-band .tool { padding: 32px; } .tool-band .tool-grid { grid-template-columns: 1fr 1.1fr; gap: 48px; } }
.tool-band .tool .digit { width: clamp(40px, 9vw, 58px); height: clamp(60px, 13vw, 86px); font-size: clamp(36px, 8vw, 52px); }
.tool-band .tool-result-wide { margin-top: 24px; }
@media (min-width: 900px) {
  .tool-band .tool[data-tool="geraete"] { display: grid; grid-template-columns: 1.45fr 1fr; gap: 48px; align-items: start; }
  .tool-band .tool[data-tool="geraete"] .tool-result-wide { margin-top: 0; padding-top: 0; border-top: 0; }
}
.calc-figure { margin: 0; }
.calc-narrow { max-width: 760px; }
.feature .formula { background: var(--paper); }
.calc-sources { padding: 48px 0; }
.calc-sources .sources { margin-top: 0; border-top: 0; }
.calc-more h2 { margin-bottom: 20px; }
@media (min-width: 900px) { .calc-cards { grid-template-columns: repeat(3, 1fr); } }
.calc-cta { max-width: 760px; }
.calc-overview { border-top: 0; padding-top: 0; }
.calc-text { padding: 56px 0 24px; }
.calc-text h2:first-child { margin-top: 0; }
.calc-text .box { margin-top: 40px; }
.tool-field select { font-size: 17px; }
.compare { display: grid; gap: 8px; margin: 4px 0 16px; }
.compare-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.compare-name { font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.compare-bar { display: block; height: 22px; }
.compare-bar span { display: block; height: 100%; border: 1.5px solid var(--ink); }
.compare-bar [data-bar="you"] { border-width: 2px; }
.compare-bar [data-bar="avg"] { border-style: dashed; border-color: var(--ink-soft); }
.compare.is-above [data-bar="you"] { border-color: var(--red); }
.tool-table { margin: 16px 0 8px; }
.tool-table tbody th { font-size: 16px; }
/* compact link tiles: calculators in articles and on guide pages, articles on calculator pages (linkTiles in web-guide.mjs) */
.calc-links { margin: 32px 0; }
.calc-links .label { margin-bottom: 10px; }
.calc-links ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .calc-links ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .guide-wrap .calc-links ul, .calc-reading .calc-links ul { grid-template-columns: repeat(3, 1fr); } }
.calc-links li { margin: 0 !important; }
.calc-links a { display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: var(--ink); text-decoration: none; }
.calc-links a:hover { border-color: var(--ink); }
.calc-links a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.calc-links-name { font-family: var(--font-label); font-weight: 600; font-size: 20px; line-height: 1.15; }
.calc-links-name::after { content: " →"; color: var(--red); }
.calc-links-text { font-size: 15px; color: var(--ink-soft); }
.calc-reading { padding: 48px 0 0; }
.calc-reading .calc-links { margin: 20px 0 0; }
/* skip link: hidden until focused with the keyboard */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--paper); border-radius: 4px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; outline: 2px solid var(--red); outline-offset: 2px; }
main:focus { outline: none; }

/* ------------------------------------------------------------------ tables and header on phones */
@media (max-width: 440px) {
  /* without JavaScript the menu items stay in the header row: logo alone, so they fit next to it */
  html:not(.js) .top .brand span { display: none; }
}
@media (max-width: 640px) {
  /* narrow tables: wrap instead of pushing past the screen edge */
  .plate th, .plate td, .plate td.num, .plate th.num, .plate tbody th { white-space: normal; }
  .plate th, .plate td { padding: 10px; }
  /* 3+ columns (tools/web.mjs marks them plate-stack): every row becomes a card, column names as labels */
  .plate-stack, .plate-stack tbody, .plate-stack tr { display: block; width: 100%; }
  .plate-stack { border: 0; }
  .plate-stack thead { display: none; }
  .plate-stack tr { border: 1px solid var(--line-strong); border-radius: 4px; margin-bottom: 12px; background: var(--paper); }
  .plate-stack tr > * { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 14px; border-bottom: 1px solid var(--line); text-align: right; }
  .plate-stack tr > *:first-child { display: block; text-align: left; background: var(--paper-deep); font-family: var(--font-label); font-weight: 600; font-size: 18px; }
  .plate-stack tr > *:last-child { border-bottom: 0; }
  .plate-stack [data-label]::before { content: attr(data-label); flex: none; max-width: 55%; text-align: left; font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
  .plate-stack tbody tr:last-child th, .plate-stack tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .plate-stack tbody tr:last-child > *:last-child { border-bottom: 0; }
  .table-scroll:has(.plate-stack) { overflow: visible; }
}

/* calculators on small phones: grid children and fieldsets may shrink below their content width */
.tool-grid > *, .tool-fields, .tool-result, .tool-mode, .tool-field, .input-unit { min-width: 0; }
@media (max-width: 400px) {
  .tool-band .tool, .tool { padding: 16px; }
  .tool-mode label { align-items: flex-start; }
}

/* light/dark switch in the header (theme.js): moon in light, sun in dark */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--paper-deep); }
.theme-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.theme-toggle .icon-sun, .theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
@media (max-width: 400px) { .main-nav { gap: 12px; } .theme-toggle { width: 36px; height: 36px; margin-left: 0; } .nav-toggle, .nav-close { width: 36px; height: 36px; } }

/* Invitation page: the household code, large and monospaced. */
.invite-code { font-size: 2rem; letter-spacing: 0.06em; }

/* landing page: every block uses the full content width; only running text keeps a readable line length */
.landing .plate, .landing .guide-links { max-width: none; }
.landing .faq-wrap { max-width: var(--max); }
.landing .needs .plate { max-width: none; }
.landing .faq details p { max-width: 760px; }
