/* Institut LLS – site template
   Design language: roll-up (brown/teal/tan, organic) + LLS-Praxis structure.
   Three tiers: brand (decorative), surface, text (WCAG AA >= 4.5:1).
   See docs/template-content-analysis.md (design decision log). */

:root {
  /* ---- Brand tier (decorative only) ---- */
  --brown: #9e9a74; /* roll-up dominant brown */
  --brown-dark: #9b9872; /* darker shape tone */
  --brown-light: #b2b098; /* light shape tone */
  --teal: #61aaa9; /* roll-up teal */
  --teal-light: #7ab7b6; /* light teal tone */
  --tan: #ffde9a; /* roll-up text tan (decorative) */

  /* ---- Surface tier ---- */
  --brown-header: #686549; /* header/footer band (AA vs tan-text) */
  --teal-surface: #3b6d6c; /* notice/teal band (AA vs tan-text) */
  --surface: #fefefe; /* cards, content areas */
  --border: #e8e0d5; /* fine warm lines */

  /* ---- Text tier (WCAG AA >= 4.5:1 on their surfaces) ---- */
  --teal-text: #447f7e; /* headings, links on light */
  --brown-text: #7a7755; /* secondary text, overlines */
  --tan-text: #ffdf9d; /* text on dark bands */
  --text-dark: #221f1f; /* body text */
  --text-muted: #6e675d; /* muted text */

  /* ---- Aliases (transitional: v1 rules migrate to tier names in A2+) ---- */
  --brand: var(--teal-text);
  --text: var(--text-dark);
  --bg: var(--surface);
  --sage: #ddebe9; /* light teal tint – tables/boxes, transitional */
  --olive: var(--brown-header);

  /* ---- Typography ---- */
  --font-serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --font-sans:
    "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* ---- Rhythm & shape (Phase A2/A3 will apply these) ---- */
  --container: 1080px;
  --container-prose: 820px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1.25rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(62, 58, 52, 0.08);
  --breakpoint-mobile: 720px;
}

@font-face {
  font-family: "Vollkorn";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/vollkorn-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn";
  font-style: normal;
  font-weight: 700;
  src: url("fonts/vollkorn-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn";
  font-style: italic;
  font-weight: 400;
  src: url("fonts/vollkorn-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/work-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 600;
  src: url("fonts/work-sans-latin-600-normal.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

a {
  color: var(--brand);
}

a:hover,
a:focus {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal-surface);
  color: var(--tan-text);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---- Kopfbereich (Oliv) ---- */

.site-header {
  background: var(--olive);
  padding: 1.25rem 0;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.logo {
  color: var(--tan-text);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  text-decoration: none;
}

.logo:hover,
.logo:focus {
  text-decoration: underline;
}

/* ---- Navigation (Menü-Modul in der Position "header") ---- */

.header-modules ul.mod-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.header-modules a {
  color: var(--tan-text);
  font-weight: 600;
  text-decoration: none;
}

.header-modules a:hover,
.header-modules a:focus {
  color: var(--brand);
  text-decoration: underline;
}

/* ---- Layout ---- */

.wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.site-main {
  flex: 1 1 auto;
  min-width: 0;
}

.site-sidebar {
  flex: 0 0 260px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-top: 2.5rem;
}

@media (max-width: 700px) {
  .wrapper {
    flex-direction: column;
  }

  .site-sidebar {
    flex-basis: auto;
    width: 100%;
  }
}

/* ---- Inhalte ---- */

h1,
.page-header h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--brown-text);
  margin: 2.5rem 0 1.25rem;
}

.page-header {
  margin: 0; /* h2 übernimmt die Abstände */
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--brown-text);
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--brown-text);
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0.75rem 0;
}

/* ---- Abschnittstrenner ---- */
hr {
  border: 0;
  height: 2px;
  max-width: 260px;
  margin: var(--space-6) auto;
  background: var(--border);
  border-radius: 2px;
}

/* ---- Listen ---- */
ul,
ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

li {
  margin: 0.4rem 0;
}

li::marker {
  color: var(--teal-text);
}

ol li::marker {
  font-weight: 700;
  color: var(--brown-text);
}

/* Regeln-Liste (Muster der alten Seite): <ol> mit fettem Begriff */
ol strong:first-child {
  color: var(--brown-text);
}

/* ---- Bilder ---- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: var(--space-5) 0;
}

figure img {
  border-radius: var(--radius);
}

figcaption {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Kleingedrucktes ---- */
small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Tabellen (Salbeigrün mit dicken weißen Rändern) ---- */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sage);
  border: 3px solid #fff;
  font-size: 0.95rem;
  margin: 1.25rem 0;
}

caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

th,
td {
  padding: 0.7rem 0.9rem;
  border: 2px solid #fff;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--brand);
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Hinweis-Boxen (im Artikel als blockquote anlegen) ---- */

blockquote {
  margin: var(--space-5) 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--teal);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--brown-text);
}

blockquote p:first-child {
  margin-top: 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ---- Definitionslisten (z. B. Bankdaten) ---- */

dl {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

dt {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  color: #333;
  word-break: break-word;
}

/* ---- System-Meldungen ---- */

.alert {
  border: 3px solid #fff;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}

.alert-success,
.alert-info,
.alert-warning {
  background: var(--sage);
}

.alert-danger {
  background: #e8c8c8;
}

/* ---- Fußbereich (Oliv) ---- */

.site-footer {
  background: var(--olive);
  color: var(--tan-text);
  font-size: 0.95rem;
  text-align: center;
  padding: 1.75rem 1.25rem 2.5rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--tan-text);
  text-decoration: underline;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--brand);
}
