/* Die Farben und Schriften von Meterli, wie `apps/web-meterli/src/styles.css`
   sie im hellen `:root` setzt (Marketingkonzept §4.1): gleiche Namen, gleiche
   Werte, Zeichen für Zeichen. Ein Test vergleicht beide Dateien; ändert sich
   die App, folgt diese Datei. Die Website kennt nur die helle Fassung. Was die
   App zusätzlich für ihre Zeichenfläche setzt (Auswahl, Fangmarke, Griff,
   Schatten), braucht eine Seite nicht. */
:root {
  --plan-tusche: #17191c;
  --plan-papier: #f3f4f1;
  --plan-blatt: #ffffff;
  --plan-bleistift: #5d636a;
  --plan-linie: #d3d6d1;
  --plan-gelb: #e6b800;
  --plan-gelb-hover: #d4a900;
  --plan-rot: #dc2626;
  --plan-rot-text: #d82222;
  --plan-warnung: #a16207;
  --plan-warnung-text: #a06107;
  --plan-hover: #ebece8;

  --tusche: var(--plan-tusche);
  --papier: var(--plan-papier);
  --blatt: var(--plan-blatt);
  --bleistift: var(--plan-bleistift);
  --linie: var(--plan-linie);
  --gelb: var(--plan-gelb);
  --gelb-hover: var(--plan-gelb-hover);
  --auf-gelb: #17191c;
  --rot: var(--plan-rot);
  --warnung: var(--plan-warnung);
  --rot-text: var(--plan-rot-text);
  --warnung-text: var(--plan-warnung-text);
  --gruen: #166534;
  --hover: var(--plan-hover);
  --f-display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --f-text: 'Instrument Sans', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --f-mass: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

/* Die Stile der Website. Der Bau setzt `tokens.css` davor und schreibt beides
   als `/site.css`. Alle Stile stehen in Dateien, nie im Dokument: Die
   Content-Security-Policy des Servers erlaubt nichts Eingebettetes. */

/* Die vier Schriftdateien kopiert der Bau aus `apps/web-meterli/src/fonts/`;
   selbst gehostet, nie von einem CDN. Nur der Zeichensatz Latin. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/bricolage-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/instrument-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plexmono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plexmono-500-latin.woff2') format('woff2');
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  color: var(--tusche);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  font-family: var(--f-display);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
}
h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
}
h3 {
  margin-top: 1.75rem;
  font-size: 1.25rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.25rem;
  max-width: 40rem;
}

.prose {
  max-width: 44rem;
}

a {
  color: var(--tusche);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

/* Fokus: Rahmen 2 px in Tusche, Abstand 1 px — wie in der App
   (Marketingkonzept §3.8). */
:focus-visible {
  outline: 2px solid var(--tusche);
  outline-offset: 1px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Der Sprunglink: als erstes Element im Dokument, sichtbar erst im Fokus.
   Text auf Gelb ist Tusche. */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--gelb);
  color: var(--auf-gelb);
  border: 1.5px solid var(--tusche);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus {
  transform: none;
}

/* Kopf */
.site-header {
  background: var(--blatt);
  border-bottom: 1px solid var(--linie);
}
.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

/* Zeichen und Wortmarke stehen unten bündig; der rote Punkt über dem ı ist das
   einzige Rot im Logo (Marketingkonzept §3.2). */
.brand {
  display: flex;
  align-items: flex-end;
  gap: 0.14em;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--tusche);
  text-decoration: none;
}
.brand-sign {
  height: 0.86em;
  width: auto;
  flex: none;
  overflow: visible;
  margin-bottom: -0.02em;
}
.brand-wordmark {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.8;
  white-space: nowrap;
}
.brand-wordmark .i {
  position: relative;
  display: inline-block;
}
.brand-wordmark .dot {
  position: absolute;
  left: 0.115em;
  top: 0;
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  background: var(--rot);
  transform: translateX(-50%);
}

.site-header ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
}
.site-header nav a:hover {
  background: var(--hover);
}
.site-header nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* Navigation: Zeile ab 640 px, darunter das Menü aus `<details>`. */
.nav-inline {
  display: none;
}
.nav-menu {
  display: block;
}
.nav-menu summary {
  display: block;
  min-width: 5rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--tusche);
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  list-style: none;
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.nav-menu[open] summary {
  background: var(--hover);
}
.nav-menu nav {
  position: absolute;
  top: 100%;
  right: 1.25rem;
  left: 1.25rem;
  z-index: 5;
  padding: 0.5rem;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
  box-shadow: 0 6px 16px var(--linie);
}
.nav-menu ul {
  flex-direction: column;
}
.nav-menu nav a {
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
}
@media (min-width: 40em) {
  .nav-inline {
    display: block;
  }
  .nav-menu {
    display: none;
  }
}

/* Knopf: Hauptknopf gelb mit Rand 1.5 px in Tusche, Gewicht 700, Radius 4 px
   (Marketingkonzept §3.6). */
.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--gelb);
  color: var(--auf-gelb);
  border: 1.5px solid var(--tusche);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}
.button:hover {
  background: var(--gelb-hover);
}

/* Kopf: der Knopf zur Anmeldung neuer Konten und der Satz für die ruhenden Stufen hinter „Anmelden“. */
.site-header nav a.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gelb);
}
.site-header nav a.button:hover {
  background: var(--gelb-hover);
}
.site-header .nav-note {
  padding: 0.5rem 0.75rem;
  color: var(--bleistift);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.actions .note {
  color: var(--bleistift);
}

.link-list {
  padding-left: 1.25rem;
}
.link-list li {
  margin: 0.25rem 0;
}

/* Funktionen (/funktionen): je Gruppe Text und Bild(er), ab 56 em nebeneinander; mehrere Bilder stehen untereinander. */
.feature-intro {
  max-width: 44rem;
}
.feature-index ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.feature-index a {
  display: inline-block;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--tusche);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.feature-index a:hover {
  background: var(--hover);
}
.feature-note {
  margin: 1rem 0 0;
  color: var(--bleistift);
  font-size: 0.9375rem;
}
.feature-group {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--linie);
}
.feature-text h2 {
  margin-top: 0;
  scroll-margin-top: 1rem;
}
.feature-lead {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
}
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.feature-list li {
  padding: 0.15rem 0.6rem;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.feature-figures {
  display: grid;
  gap: 1.5rem;
}
.feature-figure {
  margin: 0;
}
.feature-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
}
.feature-figure figcaption {
  margin-top: 0.5rem;
  color: var(--bleistift);
  font-size: 0.875rem;
}
.feature-closing {
  margin-top: 3rem;
}
@media (min-width: 56em) {
  .feature-group {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
  }
}
@media print {
  .feature-index {
    display: none;
  }
  .feature-group {
    break-inside: avoid;
  }
}

/* Rechtstexte aus `content/*.md` (src/markdown.ts) */
.legal-version {
  margin-bottom: 1.5rem;
  color: var(--bleistift);
}
.legal h2:first-of-type {
  margin-top: 1.5rem;
}
/* Frühere Fassungen (/fassungen): je Art eine Liste, jede Zeile ein Ziel für den Daumen */
.version-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.version-list li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--linie);
}
.version-list li:last-child {
  border-bottom: 1px solid var(--linie);
}
/* Inhaltsverzeichnis der Rechtstexte: Links mit Fläche für den Daumen, im Druck weg */
.legal-toc {
  margin-bottom: 2rem;
}
.legal-toc-title {
  margin-bottom: 0.25rem;
  font-weight: 650;
}
/* Ohne Marke: Tragen die Überschriften ihre Nummer („1. Geltung“), stünde sie sonst doppelt */
.legal-toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.legal-toc a {
  display: inline-block;
  padding: 0.35rem 0;
}
/* Platzhalter `[[Name]]`: nur in der Sandbox sichtbar; die Produktion baut nicht damit */
mark.placeholder {
  padding: 0 0.25em;
  background: var(--gelb);
  color: var(--auf-gelb);
  outline: 2px dashed var(--rot);
  outline-offset: 1px;
}

/* Häufige Fragen: je Frage ein `<details>`; der Pfeil steht im Stil der Marke,
   die Zeile ist ein ganzes Ziel (mindestens 44 px hoch). */
.faq-list {
  margin-top: 2rem;
  border-top: 1px solid var(--linie);
}
.faq-item {
  border-bottom: 1px solid var(--linie);
  scroll-margin-top: 1rem;
}
.faq-item summary {
  position: relative;
  min-height: 2.75rem;
  padding: 0.85rem 2.25rem 0.85rem 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  top: 0.75rem;
  right: 0.25rem;
  font-size: 1.5rem;
  line-height: 1.2;
}
.faq-item[open] summary::after {
  content: '\2212';
}
.faq-answer {
  padding-bottom: 0.5rem;
}
.postal-address {
  font-style: normal;
}

/* Fuss */
.site-footer {
  flex: none;
  border-top: 1px solid var(--linie);
  background: var(--papier);
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  display: inline-block;
  padding: 0.35rem 0;
}
.site-footer-note {
  margin: 0;
  color: var(--bleistift);
}

@media print {
  .skip-link,
  .site-header nav,
  .site-header .nav-menu,
  .site-footer nav {
    display: none;
  }
  body {
    background: #ffffff;
    font-size: 11pt;
  }
  main {
    max-width: none;
    padding: 0;
  }
  /* Druck der Rechtstexte (MTR-N.112 Kriterium 8): schwarz auf weiss */
  body,
  .legal-version {
    background: #ffffff;
    color: #000000;
  }
  .legal-toc {
    display: none;
  }
  .legal a {
    color: #000000;
  }
}

/* Startseite (W3a) */
.home-top {
  display: grid;
  gap: 2rem;
  align-items: start;
}
.home-hero h1 {
  margin-top: 0;
}
.home-guest {
  margin: 0.75rem 0 0;
}
.fold {
  min-width: 0;
}
.fold-claim {
  margin: 0 0 1rem;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
}
.fold-switch {
  display: inline-flex;
  margin-bottom: 1rem;
  border: 1.5px solid var(--tusche);
  border-radius: 4px;
  background: var(--blatt);
}
.fold-switch[hidden] {
  display: none;
}
.fold-button {
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 0;
  border-left: 1.5px solid var(--tusche);
  background: var(--blatt);
  color: var(--tusche);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.fold-button:first-child {
  border-left: 0;
  border-radius: 2.5px 0 0 2.5px;
}
.fold-button:last-child {
  border-radius: 0 2.5px 2.5px 0;
}
.fold-button:hover {
  background: var(--hover);
}
.fold-button[aria-pressed='true'] {
  background: var(--tusche);
  color: var(--blatt);
}
.fold-button:focus-visible {
  position: relative;
  outline-offset: 2px;
}
.fold-figures {
  display: grid;
  gap: 1.5rem;
}
.fold-figure {
  margin: 0;
}
.fold-figure[hidden] {
  display: none;
}
.fold-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
}
.fold-figure figcaption,
.fold-note {
  margin: 0.5rem 0 0;
  color: var(--bleistift);
  font-size: 0.875rem;
}
.audiences {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}
.audience {
  padding-top: 1.25rem;
  border-top: 1px solid var(--linie);
}
.audience h2 {
  margin-top: 0;
  font-size: 1.5rem;
}
.audience p {
  margin-bottom: 0;
}
.audiences-more {
  margin: 1.5rem 0 0;
}
.home-plans {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--linie);
}
.home-plans h2 {
  margin-top: 0;
}
.home-plans-lead {
  max-width: 40rem;
}
.plan-list {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.plan {
  padding: 1rem 1.1rem;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
}
.plan h3 {
  margin: 0 0 0.25rem;
}
.plan p {
  margin: 0;
}
.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.4rem;
}
.plan-amount {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.plan-period,
.plan-tagline {
  color: var(--bleistift);
}
.plan-period {
  white-space: nowrap;
}
.plan .plan-tagline {
  margin-bottom: 0.5rem;
}
.home-plans-more {
  margin: 1.25rem 0 0;
}
@media (min-width: 36em) {
  .plan-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 56em) {
  .home-top {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
  }
  .audiences {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
  .plan-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Abos (W3c) */
.pricing-intro {
  max-width: 44rem;
}
.dormant-note {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-left: 6px solid var(--gelb);
  border-radius: 4px;
}

/* Die Stufen: untereinander, ab 40em zwei Spalten, ab 64em (1024 px) nebeneinander. */
.tiers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 40em) {
  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 64em) {
  .tiers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.tier {
  padding: 1.25rem;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
}
.tier h3 {
  margin: 0 0 0.25rem;
}
.tier-tagline {
  color: var(--bleistift);
}
.tier p {
  margin-bottom: 0.5rem;
}
.price-line {
  margin: 0;
}
.price-amount {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.price-gift {
  display: block;
  width: fit-content;
  margin-top: 0.15rem;
  padding: 0.05rem 0.5rem;
  background: var(--gelb);
  color: var(--auf-gelb);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
}
.price-free {
  margin-top: 0.75rem;
  color: var(--bleistift);
}

/* Die Grenzen: Unter 48em (Telefon) je Stufe eine Karte, ab 48em die Tabelle; beide stehen im Dokument. */
.limit-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.limit-card {
  padding: 1rem 1.25rem;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
}
.limit-card-title {
  margin: 0 0 0.5rem;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 750;
}
.limit-card-group-title {
  margin: 0.75rem 0 0.25rem;
  font-family: var(--f-display);
  font-weight: 750;
  color: var(--bleistift);
}
.limit-card dl {
  margin: 0;
}
.limit-card dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--linie);
}
.limit-card dt {
  margin: 0;
}
.limit-card dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.table-scroll {
  display: none;
}
@media (min-width: 48em) {
  .limit-cards {
    display: none;
  }
  .table-scroll {
    display: block;
  }
}

/* Die Grenzen-Tabelle ab 48em: Sie passt in die Breite; ein schmaleres Fenster scrollt nur sie in ihrem Rahmen, die erste Spalte bleibt stehen. */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  background: var(--blatt);
  border: 1px solid var(--linie);
  border-radius: 6px;
}
.limits {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.limits th,
.limits td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--linie);
  text-align: left;
  vertical-align: top;
}
.limits thead th {
  background: var(--papier);
  font-family: var(--f-display);
  font-weight: 750;
}
.limits th[scope='row'] {
  position: sticky;
  left: 0;
  width: 10rem;
  min-width: 10rem;
  background: var(--blatt);
  box-shadow: 1px 0 0 var(--linie);
  font-weight: 500;
}
.limits th[scope='rowgroup'] {
  background: var(--papier);
  font-family: var(--f-display);
  font-weight: 750;
}
.limits th[scope='rowgroup'] span {
  position: sticky;
  left: 0.75rem;
  display: inline-block;
}
.limits td {
  white-space: nowrap;
}
.limits tbody:last-child tr:last-child > * {
  border-bottom: 0;
}

.facts {
  max-width: 44rem;
  padding-left: 1.25rem;
}
.facts li {
  margin: 0 0 0.6rem;
}
.promise {
  max-width: 44rem;
  margin-top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}
