/* barecat brand: tokens, fonts, header and footer. Shared by the static
   pages in public/ (about, disclosures, impressum, datenschutz, terms) and
   the React app (loaded from index.html; frontend/src/styles.css builds on
   these tokens). Fonts are self-hosted in public/fonts (SIL OFL, licences
   next to them) -- the Datenschutzerklärung promises nothing is loaded
   from other servers. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
}

:root {
  /* "bare": ink on warm paper, one amber accent. */
  --ink: #141414;
  --paper: #f7f5f0;
  --card-bg: #ffffff;
  --line: #e4e0d6;
  --ink-muted: #6b665c;
  --ink-body: #34312b;
  /* Text-safe amber (≥4.5:1 on paper and on white) for links and active
     states; the bright "cat-eye" amber is for marks and chart lines only. */
  --amber: #9a5a00;
  --amber-bright: #e8a33d;
  --amber-soft: #fbf1e0;
  --gain: #15803d;
  --loss: #b91c1c;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Numbers are the product: tickers, percentages and money in the mono
   "ledger" face with aligned digits. */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.siteHeader {
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
}

.siteHeaderInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.siteBrand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.siteBrand:hover { text-decoration: none; }

.siteLogo { width: 26px; height: 26px; flex: none; }

.siteNav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}

.siteNav a { color: var(--ink-body); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.siteNav a:hover { color: var(--ink); border-bottom-color: var(--amber-bright); text-decoration: none; }
.siteNav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--amber-bright); }

.siteFooter {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
  display: grid;
  gap: 4px;
}

.siteFooter a { color: var(--amber); text-decoration: none; }
.siteFooter a:hover { text-decoration: underline; }
.siteFooterRisk { font-size: 12px; }

/* Phones: brand on its own line, the nav on one line below it that
   scrolls sideways if it ever doesn't fit (never wraps into a second row). */
@media (max-width: 640px) {
  .siteHeaderInner { padding: 10px 16px 0; gap: 4px; }
  .siteNav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 12px;
    font-size: 13px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .siteNav::-webkit-scrollbar { display: none; }
  /* Taller tap targets: the text is small, the touch area shouldn't be. */
  .siteNav a { white-space: nowrap; flex: none; padding: 8px 0 6px; }
  .siteFooter { padding: 16px; }
}

/* Static pages only (the React app has its own body styles). */
body.staticPage {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

.legalCard {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  max-width: 760px;
  margin: 24px auto;
  width: calc(100% - 32px);
  box-sizing: border-box;
}

.legalCard a { color: var(--amber); }
.legalCard h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.legalCard h2 { font-size: 16px; font-weight: 800; margin: 20px 0 6px; }
.legalCard p, .legalCard li { font-size: 14px; line-height: 1.6; color: var(--ink-body); }
.legalCard p { margin: 0 0 8px; }
.legalCard ul { margin: 0 0 8px; padding-left: 20px; }
.legalCard .muted { color: var(--ink-muted); font-size: 13px; margin-bottom: 8px; }
.legalCard .lead { font-size: 16px; color: var(--ink); }

@media (max-width: 640px) {
  .legalCard { padding: 18px; margin: 16px auto; }
  .legalCard h1 { font-size: 21px; }
  .legalCard ul { padding-left: 18px; }
  /* Long words (Datenschutz-Grundverordnung, email addresses) never push
     the page wider than the screen. */
  .legalCard p, .legalCard li { overflow-wrap: anywhere; hyphens: auto; }
}

/* A value the operator still has to fill in (see the README). */
.ph { background: #fef9c3; border-radius: 3px; padding: 0 2px; }

.phWarning {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: var(--loss);
  border-radius: 10px;
  font-size: 14px;
}

/* Read by screen readers and crawlers, not shown (table captions of the
   server-rendered public pages). */
.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
