/* news.k3rim.com – Farben, Schrift und Raster aus k3rim.com (src/app/(frontend)/styles.css). */

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

:root {
  --primary: #044bd9;
  --primary-dark: #0339a6;
  --on-primary: #ffffff;
  --surface: #f7f9fb;
  --on-surface: #191c1e;
  --on-surface-variant: #45464d;
  --container-lowest: #ffffff;
  --container-low: #f2f4f6;
  --container: #eceef0;
  --container-high: #e6e8ea;
  --outline: #76777d;
  --outline-variant: #c6c6cd;
  --secondary: #515f74;
  --accent: #d95f00;
  --accent-soft: #ffdbca;
  --accent-ink: #341100;
  --radius: 2px;
  --font: 'Switzer', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --header-h: 64px;
  --gutter: 1.5rem;
  --measure: 42rem;
}

@media (min-width: 640px) {
  :root { --header-h: 72px; --gutter: 3.5rem; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--on-surface);
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(4, 75, 217, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.header-shell {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--header-h);
  padding: 0.75rem var(--gutter);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: #fff; text-decoration: none; flex-shrink: 0;
}
.brand img { height: 1.125rem; width: auto; filter: brightness(0) invert(1); }
@media (min-width: 640px) { .brand img { height: 1.25rem; } }
.brand-tag {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.18em;
  padding: 0.2rem 0.5rem; border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #fff; text-transform: uppercase;
}
.brand:hover { color: #fff; }

.main-nav { display: none; gap: 1.75rem; }
.main-nav a {
  color: rgba(255, 255, 255, 0.78); font-weight: 700; text-decoration: none;
  border-bottom: 2px solid transparent; padding-bottom: 0.25rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.main-nav a:hover, .main-nav a[aria-current='page'] { color: #fff; border-bottom-color: #fff; }

.header-cta {
  display: none; white-space: nowrap; border-radius: 6px; background: #fff; color: var(--primary);
  padding: 0.5rem 1.25rem; font-weight: 700; font-size: 0.875rem; text-decoration: none;
  transition: opacity 0.3s ease;
}
.header-cta:hover { opacity: 0.9; color: var(--primary); }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px;
  background: transparent; color: #fff; cursor: pointer;
}
.menu-toggle svg { width: 1.25rem; height: 1.25rem; }

.mobile-menu {
  display: none; padding: 0.5rem var(--gutter) 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.mobile-menu.open { display: grid; gap: 0.25rem; }
.mobile-menu a {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1024px) {
  .main-nav, .header-cta { display: flex; }
  .menu-toggle, .mobile-menu, .mobile-menu.open { display: none; }
}

.progress {
  position: absolute; left: 0; bottom: -3px; height: 3px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0); background: var(--accent);
}

main { padding-top: var(--header-h); }

/* ---------- Gemeinsame Bausteine ---------- */

.container { max-width: 80rem; margin: 0 auto; padding: 0 var(--gutter); }

.blueprint-border { position: relative; border: 1px solid rgba(0, 0, 0, 0.1); background: #fff; }
.blueprint-border::before {
  content: ''; position: absolute; top: -5px; left: -5px; width: 10px; height: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2); background: #fff; z-index: 1;
}

.kinetic-hover { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.kinetic-hover:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 #000; }

.kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary);
}
.kicker::before { content: ''; width: 1.5rem; height: 2px; background: currentColor; }

.chip {
  display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.6rem;
  background: var(--container); color: var(--secondary); border-radius: 999px; text-decoration: none;
}
.chip--accent { background: var(--accent-soft); color: var(--accent-ink); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
  padding: 0.7rem 1.2rem; border-radius: 6px; font-weight: 700; font-size: 0.9rem; text-decoration: none;
  border: 1.5px solid var(--on-surface); color: var(--on-surface); background: #fff; cursor: pointer;
  font-family: inherit;
}
.btn:hover { color: var(--on-surface); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { color: #fff; background: var(--primary-dark); }
.btn svg { width: 1rem; height: 1rem; }

/* ---------- Startseite ---------- */

.home-hero { padding: 4.5rem 0 2.5rem; }
.home-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.035em; margin: 1rem 0;
  font-weight: 800; max-width: 14ch;
}
.home-hero p { color: var(--on-surface-variant); font-size: 1.15rem; max-width: 40rem; margin: 0; }

.featured {
  display: grid; gap: 0; text-decoration: none; color: inherit; margin-bottom: 4rem;
}
.featured:hover { color: inherit; }
.featured-media { background: var(--container-low); border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.featured-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.featured-body { padding: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.featured-body h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.featured-body p { margin: 0; color: var(--on-surface-variant); font-size: 1.05rem; }
@media (min-width: 900px) {
  .featured { grid-template-columns: 1.25fr 1fr; }
  .featured-media { border-bottom: 0; border-right: 1px solid rgba(0, 0, 0, 0.08); }
  .featured-media img { height: 100%; aspect-ratio: auto; }
  .featured-body { padding: 3rem; justify-content: center; }
}

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; font-size: 0.85rem; color: var(--outline); font-weight: 600; }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--outline-variant); }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-top: 2px solid var(--on-surface); padding-top: 1rem; margin: 0 0 1.5rem;
}
.section-title h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }

.card-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); margin-bottom: 5rem; }
.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card:hover { color: inherit; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--container-low); border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.015em; }
.card-body p { margin: 0; color: var(--on-surface-variant); font-size: 0.95rem; }
.card--soon { border-style: dashed; background: rgba(255, 255, 255, 0.6); }
.card--soon .card-media { display: grid; place-items: center; color: var(--outline); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Artikel-Kopf ---------- */

.article-head { padding-top: 3.5rem; padding-bottom: 2rem; }
.article-head .inner { max-width: 54rem; }
.breadcrumbs { font-size: 0.85rem; color: var(--outline); margin-bottom: 1.5rem; font-weight: 600; }
.breadcrumbs a { color: var(--secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.article-head h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.75rem); line-height: 0.98; letter-spacing: -0.04em; font-weight: 800;
  margin: 1rem 0 1.25rem;
}
.dek { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.4; color: var(--on-surface-variant); margin: 0 0 2rem; max-width: 44rem; }

.byline { display: flex; align-items: center; gap: 0.9rem; }
.avatar {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; flex-shrink: 0;
}
.avatar--lg { width: 4.5rem; height: 4.5rem; font-size: 1.4rem; }
.byline-name { font-weight: 700; }
.byline .meta-row { font-size: 0.82rem; }

.hero-figure { margin: 0 0 3rem; }
.hero-figure .frame { padding: 0; overflow: hidden; }
.hero-figure img { width: 100%; }

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

.article-layout { display: grid; gap: 2.5rem; padding-bottom: 4rem; }
@media (min-width: 1100px) {
  .article-layout { grid-template-columns: 14rem minmax(0, var(--measure)) 1fr; gap: 3.5rem; }
}

.toc { display: none; }
@media (min-width: 1100px) {
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; font-size: 0.88rem; }
}
.toc-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); margin: 0 0 0.75rem; }
.toc ol { list-style: none; margin: 0 0 2rem; padding: 0; border-left: 2px solid var(--container-high); }
.toc li a {
  display: block; padding: 0.35rem 0 0.35rem 0.9rem; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--on-surface-variant); text-decoration: none; font-weight: 600; line-height: 1.35;
}
.toc li a:hover { color: var(--primary); }
.toc li a.active { color: var(--primary); border-left-color: var(--primary); }

.share { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share a, .share button {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--outline-variant); background: #fff; color: var(--on-surface-variant); cursor: pointer;
  transition: all 0.2s ease;
}
.share a:hover, .share button:hover { border-color: var(--primary); color: var(--primary); }
.share svg { width: 1rem; height: 1rem; }
.share-copied { font-size: 0.78rem; color: var(--accent); font-weight: 700; min-height: 1.2em; margin-top: 0.4rem; }

/* ---------- Fliesstext ---------- */

.prose { font-size: 1.125rem; line-height: 1.75; min-width: 0; }
.prose > * + * { margin-top: 1.4em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.2em; }
.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 800;
  margin: 2.6em 0 0.8em; position: relative;
}
.prose h2 .num { display: block; font-size: 0.8rem; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 0.4rem; font-weight: 800; }
.prose strong { font-weight: 700; }
.lead::first-letter {
  float: left; font-size: 4.6em; line-height: 0.82; font-weight: 800; color: var(--primary);
  margin: 0.08em 0.1em 0 0;
}

.cite {
  color: var(--secondary); text-decoration: none; font-size: 0.92em; white-space: nowrap;
  border-bottom: 1px dashed var(--outline-variant); cursor: help;
}
.cite:hover, .cite[aria-expanded='true'] { color: var(--primary); border-bottom-color: var(--primary); }
.cite-pop {
  position: absolute; z-index: 60; max-width: min(26rem, calc(100vw - 2rem));
  background: var(--on-surface); color: #fff; padding: 0.9rem 1rem; border-radius: 6px; font-size: 0.85rem; line-height: 1.5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.cite-pop a { color: #9ec0ff; word-break: break-all; }
.cite-pop .pop-label { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 0.35rem; }

.pullquote {
  margin: 2.2em 0; padding: 1.75rem 1.75rem 1.5rem; border-left: 4px solid var(--accent); background: #fff;
  font-size: 1.35rem; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em;
}
.pullquote p { margin: 0; }
.pullquote footer { margin-top: 1rem; font-size: 0.9rem; font-weight: 600; color: var(--outline); letter-spacing: 0; }
.pullquote footer a { color: var(--secondary); }

.figure { margin: 2.4em 0; }
.figure figcaption { font-size: 0.85rem; color: var(--outline); margin-top: 0.75rem; line-height: 1.5; }
.figure figcaption strong { color: var(--on-surface-variant); }
.figure--wide { margin-left: 0; margin-right: 0; }

.figure--portrait { display: grid; gap: 1.25rem; align-items: end; }
.figure--portrait img { width: 100%; max-width: 15rem; filter: grayscale(1) contrast(1.05); }
@media (min-width: 640px) { .figure--portrait { grid-template-columns: 15rem 1fr; } }

/* Video mit Klick-zum-Laden (YouTube erst nach Klick) */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: opacity 0.3s ease; }
.video button {
  position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; color: #fff;
  display: grid; place-items: center; font-family: inherit; z-index: 2;
}
.video button:hover + img, .video:hover img { opacity: 1; }
.video .play {
  display: inline-flex; align-items: center; gap: 0.6rem; background: var(--primary); padding: 0.85rem 1.3rem;
  border-radius: 6px; font-weight: 700; font-size: 0.95rem; box-shadow: 6px 6px 0 #000;
}
.video .play svg { width: 1.1rem; height: 1.1rem; }
.video .notice {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.6rem 0.9rem; font-size: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); color: rgba(255, 255, 255, 0.9); text-align: left;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* Kennzahlen */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 2.4em 0; }
.stat { padding: 1.25rem 1.25rem 1.1rem; }
.stat-value { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--primary); }
.stat-value.neg { color: var(--accent); }
.stat-label { font-size: 0.88rem; line-height: 1.45; color: var(--on-surface-variant); margin-top: 0.6rem; }
.stat-source { font-size: 0.75rem; color: var(--outline); margin-top: 0.6rem; }

/* Rechenbeispiel Mittelwert/Median */
.demo { padding: 1.5rem; margin: 2.4em 0; }
.demo-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; margin-bottom: 1rem; }
.demo-head h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.01em; }
.demo-chart { width: 100%; height: auto; }
.demo-controls { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 640px) { .demo-controls { grid-template-columns: 1fr 1fr; } }
.demo label { display: grid; gap: 0.35rem; font-size: 0.85rem; font-weight: 700; color: var(--on-surface-variant); }
.demo input[type='range'] { width: 100%; accent-color: var(--primary); }
.demo-out { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.demo-out div { padding: 0.75rem 1rem; background: var(--container-low); }
.demo-out span { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.demo-out b { font-size: 1.5rem; letter-spacing: -0.02em; }
.demo-out .mean span { color: var(--accent); }
.demo-out .median span { color: var(--primary); }
.demo-presets { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.demo-presets button { font-size: 0.78rem; padding: 0.35rem 0.75rem; }
.demo-note { font-size: 0.8rem; color: var(--outline); margin-top: 1rem; }

/* Platzhalter für Memes und Bilder */
.meme { margin: 2.4em auto; max-width: 32rem; }
.meme img { width: 100%; border: 1px solid rgba(0, 0, 0, 0.1); }
.meme .slot {
  display: none; aspect-ratio: 4 / 3; border: 2px dashed var(--outline-variant); background: rgba(255, 255, 255, 0.7);
  place-items: center; text-align: center; padding: 1.5rem; color: var(--outline); font-size: 0.9rem;
}
.meme .slot b { display: block; color: var(--on-surface-variant); font-size: 1rem; margin-bottom: 0.3rem; }
.meme .slot code { font-family: var(--mono); font-size: 0.8rem; background: var(--container); padding: 0.1rem 0.35rem; }
.meme.empty img { display: none; }
.meme.empty .slot { display: grid; }
.meme figcaption { font-size: 0.85rem; color: var(--outline); margin-top: 0.6rem; text-align: center; }

.callout {
  padding: 1.25rem 1.4rem; background: var(--accent-soft); color: var(--accent-ink); font-size: 1rem; line-height: 1.6;
  border-left: 4px solid var(--accent);
}
.callout strong { display: block; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.35rem; }

/* Seitenleiste rechts */
.aside { display: none; }
@media (min-width: 1100px) {
  .aside { display: block; position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; max-width: 15rem; }
}
.aside-card { padding: 1.25rem; font-size: 0.88rem; }
.aside-card h3 { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); margin: 0 0 0.75rem; }
.aside-card p { margin: 0 0 0.9rem; color: var(--on-surface-variant); line-height: 1.5; }

/* Abschluss: Tags, Autor, Bücher, Quellen */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 3rem; }

.author-box { display: flex; gap: 1.25rem; padding: 1.5rem; margin-top: 2.5rem; align-items: flex-start; }
.author-box h3 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.author-box p { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--on-surface-variant); line-height: 1.55; }
.author-links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.88rem; font-weight: 700; }
.author-links a { text-decoration: none; }

.books { margin-top: 4rem; }
.book-list { display: grid; gap: 1.5rem; }
.book {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; padding: 1.25rem; align-items: start;
}
@media (min-width: 640px) { .book { grid-template-columns: 8rem 1fr; gap: 1.5rem; } }
.book img { width: 100%; box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.85); border: 1px solid rgba(0, 0, 0, 0.1); }
.book h3 { margin: 0.35rem 0 0.25rem; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.01em; }
.book .by { font-size: 0.88rem; color: var(--outline); font-weight: 600; margin: 0 0 0.6rem; }
.book p { font-size: 0.93rem; margin: 0 0 1rem; color: var(--on-surface-variant); line-height: 1.55; }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.btn--amazon { background: #ffd814; border-color: #fcd200; color: #0f1111; }
.btn--amazon:hover { background: #f7ca00; color: #0f1111; }
.book .btn--amazon img { width: auto; height: 1.05rem; box-shadow: none; border: 0; margin-top: 0.3rem; }
.book .isbn { font-size: 0.75rem; color: var(--outline); font-family: var(--mono); }
.disclosure { font-size: 0.8rem; color: var(--outline); margin-top: 1rem; }

.references { margin-top: 4rem; }
.references ol { list-style: none; padding: 0; margin: 0; counter-reset: ref; }
.references li {
  padding: 0.9rem 0.75rem 0.9rem 0; border-bottom: 1px solid var(--container-high);
  font-size: 0.92rem; line-height: 1.6; padding-left: 1.75rem; text-indent: -1.75rem;
  transition: background 0.6s ease;
}
.references li:target, .references li.flash { background: var(--accent-soft); }
.references li a { word-break: break-all; }
.references .back { text-decoration: none; font-weight: 700; margin-left: 0.35rem; }
.ref-note { font-size: 0.8rem; color: var(--outline); margin-top: 0.75rem; }

.ai-note { margin-top: 3rem; padding: 1.25rem 1.4rem; font-size: 0.9rem; color: var(--on-surface-variant); background: var(--container-low); border-left: 4px solid var(--outline-variant); }
.ai-note strong { display: block; color: var(--on-surface); margin-bottom: 0.3rem; }

.next-up { margin: 4rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .next-up { grid-template-columns: 1fr 1fr; } }
.next-up a { padding: 1.25rem 1.4rem; text-decoration: none; color: inherit; display: block; }
.next-up span { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); margin-bottom: 0.35rem; }
.next-up b { font-size: 1.05rem; line-height: 1.3; }

/* ---------- Transkript ---------- */

.transcript-layout { display: grid; gap: 2.5rem; padding-bottom: 5rem; }
@media (min-width: 1100px) { .transcript-layout { grid-template-columns: 14rem minmax(0, 46rem); gap: 3.5rem; } }
.transcript-tools { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 2rem; }
.search {
  flex: 1 1 16rem; display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; background: #fff;
  border: 1px solid var(--outline-variant); border-radius: 6px;
}
.search input { border: 0; outline: 0; font: inherit; width: 100%; background: transparent; }
.search svg { width: 1rem; height: 1rem; color: var(--outline); flex-shrink: 0; }
.search-count { font-size: 0.85rem; color: var(--outline); font-weight: 600; }
.transcript h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 2.75rem 0 1rem; padding-top: 1rem; border-top: 2px solid var(--on-surface); }
.seg { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 0.9rem 0.75rem; margin: 0 -0.75rem; line-height: 1.7; font-size: 1.05rem; }
.seg:target, .seg.highlight { background: var(--accent-soft); }
.seg .ts {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--primary); text-decoration: none;
  padding-top: 0.25rem;
}
.seg .ts:hover { text-decoration: underline; }
.seg p { margin: 0; }
.seg.hidden { display: none; }
mark { background: #ffe58a; color: inherit; padding: 0 0.1em; }
.seg .quote { background: linear-gradient(transparent 55%, rgba(217, 95, 0, 0.25) 55%); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid rgba(118, 119, 125, 0.1); background: #fff; padding: 5rem var(--gutter) 2.5rem; }
.footer-grid { max-width: 80rem; margin: 0 auto; display: grid; gap: 3rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid img { height: 1.75rem; width: auto; }
.footer-grid p { color: var(--on-surface-variant); font-size: 0.9rem; max-width: 20rem; line-height: 1.6; }
.footer-head { font-size: 0.875rem; font-weight: 700; margin: 0 0 1.5rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.footer-grid li a { color: var(--secondary); font-weight: 700; font-size: 0.94rem; text-decoration: none; }
.footer-grid li a:hover { color: var(--primary); }
.footer-bottom {
  max-width: 80rem; margin: 4rem auto 0; padding-top: 2rem; border-top: 1px solid rgba(118, 119, 125, 0.1);
  font-size: 0.875rem; font-weight: 700; color: var(--outline); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem var(--gutter); }
.not-found h1 { font-size: clamp(4rem, 14vw, 9rem); margin: 0; letter-spacing: -0.06em; color: var(--primary); line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kinetic-hover, .kinetic-hover:hover { transition: none; transform: none; }
}

@media print {
  .site-header, .toc, .aside, .share, .site-footer, .meme, .video button, .next-up { display: none !important; }
  main { padding-top: 0; }
  body { background: #fff; }
  .article-layout { display: block; }
}
