/* PKM Theme — Minimal Neutral
   Atkinson Hyperlegible Next (Display / UI) + Noto Serif (Lesetext).
   Schriften werden lokal ausgeliefert — keine Anfragen an Google Fonts.
   @font-face-Dateien liegen unter /static/fonts/ (siehe fonts/README.md). */

/* ——— Lokale Schriften ———————————————————— */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/static/fonts/AtkinsonHyperlegibleNext.woff2') format('woff2');
  font-weight: 200 800;          /* variabler Schnitt */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/static/fonts/AtkinsonHyperlegibleNext-Italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('/static/fonts/NotoSerif.woff2') format('woff2');
  font-weight: 100 900;          /* variabler Schnitt */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('/static/fonts/NotoSerif-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper:        #ffffff;
  --paper-raised: #f3f4f6;
  --ink:          #111827;
  --ink-soft:     #374151;
  --ink-muted:    #6b7280;
  --ink-faint:    #696e78;   /* AA: >= 4,5:1 auch auf erhöhter Fläche (paper-raised) */
  --rule:         #e5e7eb;
  --rule-soft:    #f3f4f6;
  --sage:         #2563eb;
  --sage-deep:    #1d4ed8;
  --sage-light:   #93c5fd;
  --sage-wash:    #eff6ff;

  /* Lesetext = Noto Serif · Überschriften & UI-Chrome = Atkinson Hyperlegible Next */
  --serif:   'Noto Serif', Georgia, 'Times New Roman', serif;
  --display: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --measure: 42rem;
}

/* ——— Reset botanischer Effekte ——————————— */

html { font-size: 100%; }   /* = 16px bei Browser-Standard, skaliert mit (WCAG 1.4.4) */

html, body {
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  background-image: none;
}

body {
  background-image: none;
  background: var(--paper);
}

/* ——— Masthead ——————————————————————————— */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand em {
  font-style: normal;
  color: var(--ink-muted);
  font-weight: 400;
  margin: 0 0.1em;
}

.brand .sprig {
  color: var(--sage);
  width: 24px;
  height: 24px;
}

.nav {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  align-items: center;
}

.nav a {
  color: var(--ink-muted);
  border-bottom: none;
  padding-bottom: 0;
  line-height: 1;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: none;
  padding-bottom: 0;
  box-shadow: 0 2px 0 var(--sage);
}

.nav a:hover {
  color: var(--ink);
  border-bottom: none;
  box-shadow: 0 2px 0 var(--rule);
}

.nav sup {
  font-size: 1em;
  font-weight: 400;
  color: var(--ink-muted);
  vertical-align: baseline;
  line-height: 1;
}

.nav sup::before { content: " ["; }
.nav sup::after  { content: "]"; }

/* ——— Typografie ————————————————————————— */

.kicker {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
}

h1.title {
  font-family: var(--display);
  font-variation-settings: normal;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1.title em {
  font-style: italic;          /* echte Kursive in Atkinson Hyperlegible Next */
  color: var(--ink);
  font-variation-settings: normal;
}

.meta {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* Kein initial cap */
article p.lede::first-letter {
  font-family: var(--serif);
  font-variation-settings: normal;
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  color: inherit;
}

article h2 {
  font-family: var(--display);
  font-variation-settings: normal;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2.4rem 0 0.7rem;
}

article h3 {
  font-family: var(--display);
  font-variation-settings: normal;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin: 1.8rem 0 0.6rem;
}

article ul li::before {
  content: "–";
  color: var(--ink-faint);
  font-weight: 300;
}

blockquote {
  font-family: var(--serif);
  font-variation-settings: normal;
  font-style: italic;            /* echte Kursive in Noto Serif */
  font-weight: 400;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
  padding-left: 1.25rem;
}

code {
  font-size: 0.85em;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-soft);
  padding: 0.1em 0.4em;
}

/* ——— Wikilinks — dezent, kein Symbol ————— */

article a.wikilink {
  color: var(--sage);
  text-decoration: none;
  border-bottom: 1px solid var(--sage-light);
  padding-bottom: 0;
  transition: background 120ms ease, border-color 120ms ease;
}

article a.wikilink:hover {
  background: var(--sage-wash);
  border-bottom-color: var(--sage);
}

article a.wikilink::before {
  content: none;
}

/* ——— Ornament ausblenden ——————————————— */

.ornament { display: none; }

/* ——— Index ————————————————————————————— */

.index-section h2 {
  font-family: var(--display);
  font-variation-settings: normal;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.index-chevron {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 2.2rem;
}

.index-list a.entry-title {
  font-family: var(--display);
  font-variation-settings: normal;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.index-list a.entry-title:hover {
  color: var(--sage);
}

/* ——— Buttons ——————————————————————————— */

.btn {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: var(--sage);
  border-radius: 4px;
}

.btn:hover:not(:disabled) { background: var(--sage-deep); }

.triage-btn {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 4px;
}

.triage-btn:hover {
  background: var(--sage-wash);
  color: var(--sage-deep);
  border-color: var(--sage-light);
}

.triage-btn.primary {
  background: var(--sage);
  border-color: var(--sage);
}

.triage-btn.primary:hover {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.action.primary {
  background: var(--sage);
  border-color: var(--sage);
}

.action.primary:hover {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

/* ——— Inbox-Badges ——————————————————————— */

.type-badge.link {
  background: var(--sage-wash);
  color: var(--sage-deep);
  border-color: var(--sage-light);
}

.interval-badge.fresh {
  color: var(--sage-deep);
  border-color: var(--sage-light);
  background: var(--sage-wash);
}

/* ——— Footer ————————————————————————————— */

.colophon {
  font-family: var(--display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ——— Responsive ———————————————————————— */

@media (max-width: 480px) {
  html { font-size: 93.75%; }   /* 15px-Äquivalent; ganzes UI skaliert proportional */
}
