/* Meisterbund – einzige Stylesheet-Datei. Reihenfolge: Tokens, Base, Komponenten, Helper, Breakpoints (ganz am Ende, je einer). */

/* 1. Tokens */
:root {
  --bg: #12100e;
  --surface: #1c1815;
  --surface-2: #272019;
  --border: #3a3027;
  --text: #ece4d8;
  --muted: #a89f92;
  --accent: #d0572f;
  --accent-text: #fff6ee;
  --gold: #c9a24a;
  --ok: #6fae63;
  --error: #e0604a;
  --info: #6c9bd1;
  --space: 1rem;
  --radius: 0.5rem;
  --container: 64rem;
  --font-body: system-ui, -apple-system, "Segoe UI", "Roboto", sans-serif;
  --font-head: "Georgia", "Palatino Linotype", "Book Antiqua", serif;
  --shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 40%);
}

/* 2. Base */
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at top, #241b14 0%, var(--bg) 55%) no-repeat; color: var(--text); font: 1rem/1.6 var(--font-body); }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 600; line-height: 1.2; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; color: var(--gold); }
p { margin: 0; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 3. Komponenten */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space); }
.site-header { background: rgb(18 16 14 / 85%); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space); min-height: 3.5rem; }
.brand { font: 600 1.25rem var(--font-head); color: var(--text); letter-spacing: 0.04em; }
.brand:hover { color: var(--gold); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 0.75rem; }
.site-nav form { margin: 0; }
.site-main { flex: 1; padding-block: 1.5rem 3rem; display: flex; flex-direction: column; gap: var(--space); }
.site-main:focus { outline: none; }
.site-footer { border-top: 1px solid var(--border); padding-block: var(--space); color: var(--muted); font-size: 0.875rem; }
.hero { padding-block: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space); }
.hero h1 { font-size: 2.25rem; }
.hero p { max-width: 40rem; color: var(--muted); }
.box { padding: var(--space); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { display: inline-block; padding: 0.6rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--gold); text-decoration: none; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.label { font-size: 0.875rem; color: var(--muted); }
.input { width: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; }
.input:focus { border-color: var(--gold); outline: none; }
.hint { font-size: 0.8125rem; color: var(--muted); }
.error { font-size: 0.875rem; color: var(--error); }
.alert { padding: 0.75rem 1rem; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.grid { display: grid; gap: var(--space); }
.stack { display: flex; flex-direction: column; gap: var(--space); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.stat { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-label { font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.stat-value { font: 600 1.75rem/1.2 var(--font-head); color: var(--text); }
.rows { margin: 0; padding: 0; list-style: none; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space); padding: 0.45rem 0; border-bottom: 1px solid var(--border); break-inside: avoid; }
.tag { display: inline-block; padding: 0.2rem 0.65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 0.8125rem; color: var(--muted); }

/* 4. Helper (erweitern genau eine Komponente, definieren nie eigene Optik) */
.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.is-ghost { background: transparent; }
.is-danger { background: transparent; border-color: var(--error); color: var(--error); }
.is-block { width: 100%; text-align: center; }
.is-narrow { width: 100%; max-width: 28rem; margin-inline: auto; }
.is-muted { color: var(--muted); }
.is-ok { border-left-color: var(--ok); }
.is-error { border-left-color: var(--error); }
.is-info { border-left-color: var(--info); }
.is-2 { grid-template-columns: 1fr; }
.is-3 { grid-template-columns: 1fr; }
.is-area { min-height: 7rem; resize: vertical; }
.is-pre { white-space: pre-line; }
.is-split { column-count: 1; column-gap: 2rem; }
.mt-3 { margin-top: 1.5rem; }

/* 5. Breakpoints – je Breakpoint genau ein Block, aufsteigend */
@media (min-width: 768px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 3rem; }
  .site-main { padding-block: 2.5rem 4rem; }
  .box { padding: 1.5rem; }
  .is-2 { grid-template-columns: repeat(2, 1fr); }
  .is-3 { grid-template-columns: repeat(3, 1fr); }
  .is-split { column-count: 2; }
}
@media (min-width: 1920px) {
  .stat-value { font-size: 2.25rem; }
  .stat { padding: 1rem 1.5rem; }
  .row { padding: 0.6rem 0; }
  :root { --container: 90rem; --space: 1.25rem; }
  body { font-size: 1.1875rem; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding-block: 4rem; }
  .hero h1 { font-size: 4rem; }
  .hero p { max-width: 52rem; font-size: 1.375rem; }
  .site-header .container { min-height: 4.5rem; }
  .brand { font-size: 1.625rem; }
  .is-narrow { max-width: 34rem; }
}
