/* Zwibl Hosting – geteiltes minimales Stylesheet.
   Keine externen Schriften/CDNs (ADR 0009): Nunito liegt lokal unter
   /assets/fonts/, Fallback auf System-Schriftarten. Farben aus
   apps/zwibl_app/lib/app/theme/tokens.dart (ZwiblColors light/dark). */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --zw-background: #fff8f1;
  --zw-surface: #fffdf9;
  --zw-surface-raised: #fff0e3;
  --zw-outline: #eadbcd;
  --zw-text-primary: #3a2e28;
  --zw-text-secondary: #65554c;
  --zw-text-muted: #766559;
  --zw-accent: #f2a477;
  --zw-on-accent: #3a2e28;
  --zw-accent-soft: #fbe0ce;
  --zw-danger: #a8433f;
  /* Link text: the apricot accent is only 1.9:1 on cream (audit BF-02),
     this darker tone reaches 5.5:1 or more on every light surface. */
  --zw-link: #8f4520;
}

@media (prefers-color-scheme: dark) {
  :root {
    --zw-background: #1b1614;
    --zw-surface: #241e1b;
    --zw-surface-raised: #2e2622;
    --zw-outline: #41362f;
    --zw-text-primary: #f1e6dc;
    --zw-text-secondary: #cdbeb2;
    --zw-text-muted: #a89789;
    --zw-accent: #e39e78;
    --zw-on-accent: #2a1f1a;
    --zw-accent-soft: #4a3429;
    --zw-danger: #e59a92;
    --zw-link: #e39e78;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--zw-background);
  color: var(--zw-text-primary);
  font-family: "Nunito", -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.55;
}

.zw-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.zw-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.zw-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--zw-text-primary);
  text-decoration: none;
}

.zw-logo::before {
  content: "🧅";
  margin-right: 0.4rem;
}

h1 {
  font-weight: 700;
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
  color: var(--zw-text-primary);
}

h2 {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  color: var(--zw-text-primary);
}

h3 {
  font-weight: 600;
  font-size: 1.02rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--zw-text-primary);
}

p,
li {
  color: var(--zw-text-secondary);
}

a {
  color: var(--zw-link);
  font-weight: 600;
}

a:focus-visible,
.zw-button:focus-visible {
  outline: 3px solid var(--zw-text-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.zw-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--zw-surface);
  color: var(--zw-text-primary);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.zw-skip:focus {
  left: 1rem;
  top: 1rem;
}

a:hover {
  text-decoration: none;
}

.zw-lede {
  font-size: 1.1rem;
  color: var(--zw-text-secondary);
}

.zw-card {
  background: var(--zw-surface-raised);
  border: 1px solid var(--zw-outline);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  margin: 1.25rem 0;
}

.zw-badge {
  display: inline-block;
  background: var(--zw-accent-soft);
  color: var(--zw-text-primary);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.zw-notice {
  background: var(--zw-accent-soft);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--zw-text-primary);
  margin: 1.25rem 0 1.75rem;
}

.zw-button {
  display: inline-block;
  background: var(--zw-accent);
  color: var(--zw-on-accent);
  /* Visible edge: the apricot fill alone is under 3:1 against cream. */
  border: 1.5px solid var(--zw-text-primary);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  margin: 0.4rem 0.5rem 0.4rem 0;
}

.zw-button.zw-secondary {
  background: transparent;
  color: var(--zw-text-primary);
  border: 1.5px solid var(--zw-outline);
}

.zw-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--zw-outline);
  font-size: 0.85rem;
  color: var(--zw-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.zw-footer a {
  color: var(--zw-text-muted);
  font-weight: 400;
}

/* Table of contents on long legal pages. */
.zw-toc ol {
  margin: 0.5rem 0 1.5rem;
  padding-left: 1.4rem;
}

/* Landing page */
.zw-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.zw-hero-figure {
  flex: 0 0 auto;
}

.zw-hero-figure img {
  display: block;
  width: 120px;
  height: 180px;
}

.zw-benefits {
  padding-left: 1.2rem;
}

.zw-benefits li {
  margin: 0.35rem 0;
}

.zw-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.zw-shots figure {
  margin: 0;
}

.zw-shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 20;
  border-radius: 14px;
  border: 1px solid var(--zw-outline);
  background: var(--zw-surface-raised);
}

.zw-shots figcaption {
  font-size: 0.85rem;
  color: var(--zw-text-secondary);
  margin-top: 0.4rem;
}

.zw-small {
  font-size: 0.85rem;
  color: var(--zw-text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--zw-outline);
  font-size: 0.92rem;
  vertical-align: top;
}

th {
  color: var(--zw-text-primary);
}

td {
  color: var(--zw-text-secondary);
}

.zw-placeholder {
  background: var(--zw-accent-soft);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.85em;
  color: var(--zw-danger);
}

@media (max-width: 480px) {
  .zw-page {
    padding: 1.75rem 1rem 3rem;
  }
  h1 {
    font-size: 1.45rem;
  }
  .zw-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .zw-shots {
    grid-template-columns: 1fr 1fr;
  }
}

/* Spacing helpers (no inline styles: the CSP has no 'unsafe-inline'). */
.zw-mt0 {
  margin-top: 0;
}
.zw-mb0 {
  margin-bottom: 0;
}
/* Wide tables scroll inside their box instead of the page. */
table {
  display: block;
  overflow-x: auto;
}
code {
  overflow-wrap: anywhere;
}
/* Long URLs and e-mail addresses must wrap on narrow phones. */
p,
li,
td {
  overflow-wrap: anywhere;
}
