:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --ink: #16161a;
  --muted: #6b6b70;
  --navy: #1f3a5f;
  --accent: #6a4fa0;
  --accent-light: #b8a3ee; /* accent tint for text/lines on dark backgrounds */
  --night: #0a0d1c;
  --night-line: rgba(255, 255, 255, 0.09);
  --line: #e5e5e7;
  --maxw: 1180px;
  --text: 780px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  border-top: 4px solid var(--accent);
}

h1, h2, h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.02em;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* Masthead */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px max(24px, calc((100vw - var(--maxw)) / 2));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.header-right { display: flex; align-items: center; gap: 28px; }

.site-header nav { display: flex; gap: 28px; }

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.site-header nav a:hover { color: var(--accent); }

.lang-toggle {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
.lang-toggle .lang-opt { opacity: 0.45; transition: opacity 0.15s, color 0.15s; }
.lang-toggle .lang-opt.is-active { opacity: 1; color: var(--accent); }
.lang-toggle .lang-sep { opacity: 0.3; margin: 0 5px; }

/* Layout */
main > section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 8px;
}

.overline {
  margin: 0 0 14px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h2.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 48px;
  max-width: 16ch;
}

/* Hero — editorial */
.hero { padding-top: 16px; padding-bottom: 36px; position: relative; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-text { position: relative; max-width: 620px; }

.hero-quotemark {
  position: absolute;
  top: -110px;
  left: -28px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.hero .overline { position: relative; }

.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  max-width: 20ch;
  position: relative;
}

.hero h1 .accent { color: var(--accent); }


.lead {
  max-width: 46ch;
  margin: 26px 0 36px;
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 2px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}

.btn:hover { background: var(--ink); color: #fff; }

.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* Hero data visualization — generative particle field, RAW DATA -> INSIGHT */
.viz-wrap {
  position: relative;
  width: 100%;
  height: 460px;
  margin-top: 0;
  cursor: crosshair;
}

#dataflow-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.milestone {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.milestone::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 26px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(106, 79, 160, 0.22) 0,
    rgba(106, 79, 160, 0.22) 4px,
    transparent 4px,
    transparent 9px
  );
}

.milestone-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.35;
  padding-left: 8px;
}

.stat-band {
  background: var(--ink);
  padding: 56px 24px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: var(--maxw);
}

.facts li {
  display: flex;
  flex-direction: column;
  flex: 1 1 160px;
  padding: 0 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.facts li:first-child { border-left: none; padding-left: 0; }

.facts strong {
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #fff;
}
.facts span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
  margin-top: 6px;
}

/* Projects — card grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

a.project-card { cursor: pointer; }
a.project-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(22, 22, 26, 0.07); }
a.project-card:hover .project-card-img img { transform: scale(1.04); }
a.project-card:hover .project-title { color: var(--accent); }
a.project-card:hover .project-arrow { background: var(--accent); border-color: var(--accent); color: #fff; }
div.project-card { cursor: default; }

.project-card-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.project-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.3s; }
.project-card-img.empty { background: var(--surface-alt); }

.project-card-body {
  display: block;
  flex: 1;
  padding: 26px 26px 20px;
}

.project-type {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-title {
  display: block;
  margin: 12px 0 12px;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.15s;
}

.project-card-body p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--muted);
}

.project-card-body .project-flow {
  display: block;
  margin-top: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.project-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 26px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
  font-size: 0.74rem;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  white-space: nowrap;
}

.project-arrow {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.05rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.project-soon {
  flex: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* Skills */
section#skills { background: var(--surface-alt); }

.skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.skills h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.skills ul { list-style: none; padding: 0; margin: 0; }
.skills li { padding: 5px 0; font-size: 0.97rem; line-height: 1.45; text-wrap: pretty; hyphens: none; }

/* "Currently building": areas in active development, not established expertise */
.skills .skills-building h3 { color: var(--accent); border-bottom: 2px dashed var(--accent); }
.skills .skills-building li { color: var(--muted); }

@media (min-width: 721px) { section#skills { padding-bottom: 64px; } }
@media (max-width: 1024px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; } }
@media (max-width: 560px) { .skills { grid-template-columns: 1fr; gap: 32px; } }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 660px);
  gap: 56px;
  row-gap: 28px;
  align-items: stretch;
  justify-content: center;
  grid-template-areas: "title title" "photo text";
}
h2.about-title { grid-area: title; margin: 0; max-width: none; text-align: left; }
.about-photo { grid-area: photo; }
.about-text { grid-area: text; }
.about-text { display: flex; flex-direction: column; justify-content: flex-start; }
.about-grid p:not(.overline) {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  max-width: none;
}
.about-grid p:not(.overline):last-child { margin-bottom: 0; }
.about-photo { max-width: 380px; }
.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 6px;
}

/* Contact */
.contact { border-top: 1px solid var(--ink); }
.contact p { max-width: 56ch; font-size: 1.05rem; }

.contact-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.contact-list a {
  display: inline-block;
  padding: 12px 24px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-list a:hover { background: var(--ink); color: #fff; }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 56px;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer p { margin: 0; }

/* --- Case study pages --- */
.cs-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 0;
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 40px;
}
.cs-back:hover { color: var(--accent); }

.cs-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: transparent;
}
.cs-status.done { color: var(--ink); }
.cs-status.wip { color: var(--accent); border-color: var(--accent); }

.cs-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); max-width: 20ch; }
.cs-hero .lead { margin-top: 24px; max-width: 60ch; }

.cs-cover {
  width: 100%;
  height: auto;
  margin: 48px 0;
}

.cs-cover-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 48px 0;
}

.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 56px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.cs-meta-grid > div {
  padding: 20px 20px 20px 0;
  border-right: 1px solid var(--line);
}
.cs-meta-grid > div:last-child { border-right: none; }

.cs-meta-grid h4 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cs-meta-grid p { margin: 0; font-size: 0.92rem; }

.cs-section { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 64px; }
.cs-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 20px; max-width: 20ch; }
.cs-section p { max-width: var(--text); font-size: 1.02rem; }
.cs-section ul { max-width: var(--text); padding-left: 20px; font-size: 1.02rem; }
.cs-section li { margin-bottom: 10px; }

.cs-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width: 720px) {
  .cs-cols, .cs-meta-grid, .cs-cover-row { grid-template-columns: 1fr; }
  .cs-meta-grid > div { border-right: none; border-bottom: 1px solid var(--line); }
}

/* Mobile */
@media (max-width: 720px) {
  .header-right { gap: 14px; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 0.72rem; }
  .lang-toggle { font-size: 0.7rem; padding: 4px 10px; }
  .about-grid { grid-template-columns: 1fr; grid-template-areas: "title" "photo" "text"; }
  main > section { padding: 56px 20px; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { max-width: none; }
  .hero-quotemark { font-size: 10rem; top: -50px; left: -10px; }
  .facts { flex-direction: column; gap: 20px; }
  .facts li { border-left: none; padding: 20px 0 0; border-top: 1px solid rgba(255,255,255,0.18); }
  .facts li:first-child { padding-top: 0; border-top: none; }
  .viz-wrap { height: 300px; margin-top: 40px; order: 2; }
  .milestone-label { font-size: 0.56rem; letter-spacing: 0.06em; padding-left: 5px; }
}

@media (max-width: 480px) {
  .brand { display: none; }
  .site-header { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* --- EDA case study (datenviz-eda.html) — editorial redesign, scoped to body.eda-page --- */
body.eda-page {
  --bg: #ffffff;
  --ink: #17151c;
  --muted: #77727f;
  --accent: #7c6fe8;
  --line: #e6e1d8;
  --orange: #e89a5b;
  --eda-w: 1240px;
  background: var(--bg);
  color: var(--ink);
  border-top-color: var(--accent);
}
.eda-page .site-header { background: rgba(250,248,244,0.94); border-bottom-color: var(--line); }
.eda-page .site-footer { background: var(--bg); border-top-color: var(--line); }
.eda-page .eda-wrap { max-width: var(--eda-w); margin: 0 auto; padding: 0 32px; }
.eda-page h1, .eda-page h2, .eda-page h3, .eda-page p { margin: 0; }

/* hero */
.eda-hero { padding: 72px 0 0; }
.eda-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eda-crumbs { display: flex; align-items: center; gap: 16px; margin-bottom: 56px !important; }
.eda-page .cs-status { margin: 0; }
.eda-title { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; text-transform: uppercase; max-width: 9em; }
.eda-sub { font-size: clamp(1.15rem, 2vw, 1.6rem); color: var(--accent); font-weight: 500; margin-top: 28px !important; letter-spacing: -0.01em; }
.eda-hero-meta { margin-top: 48px !important; display: flex; flex-direction: column; gap: 4px; font-size: 1rem; }
.eda-hero-meta span { color: var(--muted); }
.eda-hero-tech { margin-top: 20px !important; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.02em; }
.eda-link { display: inline-block; margin-top: 28px; color: var(--accent); font-weight: 600; font-size: 0.95rem; text-decoration: none; border-bottom: 1px solid transparent; }
.eda-link:hover { border-bottom-color: var(--accent); }
.eda-hero-vis img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.eda-hero-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 72px; border-top: 1px solid var(--ink); }
.eda-mini { padding: 20px 20px 0 0; display: flex; flex-direction: column; gap: 4px; }
.eda-mini strong { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.eda-mini span { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* sections */
.eda-sec { padding: 128px 0 0; }
.eda-head { margin-bottom: 56px; max-width: 760px; }
.eda-eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px !important; }
.eda-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.eda-lead { margin-top: 20px !important; color: var(--muted); font-size: 1.1rem; line-height: 1.6; }
.eda-small { color: var(--muted); font-size: 0.92rem; line-height: 1.65; max-width: 46ch; }

/* dataset */
.eda-dataset { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 72px; align-items: start; }
.eda-dataset .eda-head { margin-bottom: 28px; }
.eda-dataset-head .eda-small + .eda-small { margin-top: 12px; }
.eda-bignums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.eda-big { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 20px; }
.eda-big strong { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1; font-weight: 700; letter-spacing: -0.035em; color: var(--ink); }
.eda-big span { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.eda-big--period strong { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.5; color: var(--accent); }

/* journey */
.eda-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.eda-journey li { position: relative; padding: 28px 24px 0 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.eda-journey li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.eda-j-n { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; }
.eda-j-t { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.eda-j-d { font-size: 0.88rem; color: var(--muted); line-height: 1.5; max-width: 22ch; }

/* exploring */
.eda-explore { padding-top: 144px; }
.eda-block { margin-top: 112px; }
.eda-block:first-of-type { margin-top: 0; }
.eda-explore .eda-head { margin-bottom: 88px; }
.eda-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 28px; }
.eda-tech { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.eda-q { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.eda-fig { margin: 0; }
.eda-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.eda-fig img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.eda-fig figcaption { margin-top: 14px; font-size: 0.78rem; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.eda-take { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin-top: 44px; align-items: start; }
.eda-take h3, .eda-item h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.eda-take-text { display: flex; flex-direction: column; gap: 14px; }
.eda-take-text p, .eda-item p { font-size: 1rem; line-height: 1.7; color: #47434e; max-width: 60ch; }
.eda-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; margin-top: 112px; align-items: start; }
.eda-item { display: flex; flex-direction: column; min-width: 0; }
.eda-item .eda-meta { flex-direction: column; gap: 8px; min-height: 5.6em; }
.eda-item h3 { margin-top: 32px; font-size: clamp(1.25rem, 1.9vw, 1.5rem); }
.eda-item h3 + p { margin-top: 12px; }

/* outliers band */
.eda-outlier { margin-top: 128px; padding: 96px 0; background: #f5efe6; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eda-outlier .eda-tech { color: var(--orange); }
.eda-outlier-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr); gap: 64px; align-items: center; }
.eda-outlier h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }
.eda-ostats { display: flex; gap: 28px; flex-wrap: wrap; margin: 32px 0 24px; }
.eda-ostat { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid var(--orange); padding-top: 12px; }
.eda-ostat strong { font-size: 2.1rem; line-height: 1; letter-spacing: -0.03em; font-weight: 700; }
.eda-ostat span { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.eda-notebox { margin-top: 64px; padding: 4px 0 4px 24px; border-left: 3px solid var(--orange); max-width: 760px; }
.eda-notehead { font-weight: 700; font-size: 1.15rem; margin-bottom: 8px !important; }
.eda-notebox p { line-height: 1.7; color: #47434e; }
.eda-notebox .eda-notehead { color: var(--ink); }

/* findings */
.eda-findings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.eda-findings li { border-top: 1px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.eda-num { font-size: 0.8rem; color: var(--accent); font-weight: 600; letter-spacing: 0.1em; }
.eda-findings h3 { font-size: 1rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 700; line-height: 1.35; }
.eda-findings p { font-size: 0.95rem; line-height: 1.65; color: #47434e; }
.eda-method { margin-top: 72px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 4px; max-width: 820px; display: flex; flex-direction: column; gap: 10px; }
.eda-method p { max-width: none; font-size: 0.9rem; line-height: 1.65; color: var(--muted); }
.eda-method-label { font-size: 0.72rem !important; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink) !important; }

/* next questions */
.eda-next-head, .eda-next li { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 0 12px; align-items: baseline; }
.eda-next-head { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.eda-next { list-style: none; margin: 0; padding: 0; }
.eda-next li { padding: 26px 0; border-bottom: 1px solid var(--line); }
.eda-obs { color: var(--muted); font-size: 1.02rem; }
.eda-arrow { color: var(--accent); font-size: 1.3rem; text-align: center; }
.eda-nq { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }

/* methods footer */
.eda-methods { margin-top: 128px; padding: 40px 0 56px; border-top: 1px solid var(--line); }
.eda-methods-grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 40px; }
.eda-methods .eda-method-label { margin-bottom: 12px !important; }
.eda-tags { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; color: var(--muted); }
.eda-methods .eda-link { margin-top: 0; }

/* lightbox */
.eda-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(250,248,244,0.97); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.eda-lightbox[hidden] { display: none; }
.eda-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
body.eda-lb-open { overflow: hidden; }

/* tablet */
@media (max-width: 980px) {
  .eda-page .eda-wrap { padding: 0 24px; }
  .eda-hero { padding-top: 48px; }
  .eda-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .eda-crumbs { margin-bottom: 36px !important; }
  .eda-hero-strip { grid-template-columns: repeat(2, 1fr); margin-top: 48px; gap: 0; }
  .eda-mini { padding-bottom: 20px; }
  .eda-sec { padding-top: 96px; }
  .eda-dataset { grid-template-columns: 1fr; gap: 32px; }
  .eda-journey { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .eda-take { grid-template-columns: 1fr; gap: 20px; }
  .eda-pair { gap: 40px; margin-top: 88px; }
  .eda-outlier-grid { grid-template-columns: 1fr; gap: 40px; }
  .eda-findings { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .eda-methods-grid { grid-template-columns: 1fr; gap: 28px; }
}
/* mobile */
@media (max-width: 640px) {
  .eda-page .eda-wrap { padding: 0 20px; }
  .eda-title { font-size: 2.5rem; }
  .eda-sec { padding-top: 80px; }
  .eda-explore .eda-head { margin-bottom: 56px; }
  .eda-head { margin-bottom: 36px; }
  .eda-bignums { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .eda-big--period { grid-column: 1 / -1; }
  .eda-journey { grid-template-columns: 1fr; gap: 24px; }
  .eda-j-d { max-width: none; }
  .eda-block, .eda-pair { margin-top: 72px; }
  .eda-pair { grid-template-columns: 1fr; gap: 64px; }
  .eda-item .eda-meta { min-height: 0; }
  .eda-outlier { margin-top: 88px; padding: 64px 0; }
  .eda-findings { grid-template-columns: 1fr; gap: 32px; }
  .eda-next-head { display: none; }
  .eda-next li { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .eda-arrow { text-align: left; }
  .eda-arrow::before { content: "↓"; }
  .eda-arrow { font-size: 0; }
  .eda-arrow::before { font-size: 1.2rem; }
  .eda-methods { margin-top: 88px; }
}

/* Projects heading centered */
#projekte .overline,
#projekte .section-title { text-align: center; max-width: none; margin-left: auto; margin-right: auto; }

/* Project groups */
.project-group-title {
  margin: 0 0 24px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.project-group-title.second { margin-top: 80px; }

/* About text: justified lines, last line left-aligned, no auto-hyphenation */
.about-text p:not(.overline) {
  text-align: justify;
  text-align-last: left;
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* About: tablet — keep side-by-side, slimmer portrait */
@media (max-width: 1024px) and (min-width: 721px) {
  .about-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 40px; row-gap: 24px; }
  .about-photo { max-width: 300px; }
  main > section.about { padding-left: 28px; padding-right: 28px; }
}
/* About: mobile — stacked, portrait capped so text follows sooner */
@media (max-width: 720px) {
  .about-photo { max-width: 360px; margin: 0 auto; }
  .about-grid { gap: 24px; }
}

/* About: desktop — text column takes all remaining width; portrait stretches
   to the text height so photo and text end on the same line */
@media (min-width: 1025px) {
  .about-grid { grid-template-columns: minmax(0, 420px) minmax(0, 620px); }
  .about-photo { max-width: none; }
  .about-photo img { height: 100%; aspect-ratio: auto; }
}

/* Contact: two short paragraphs */
.contact p:not(.overline) { max-width: 60ch; margin: 0 0 14px; }


/* ==========================================================================
   Home page — dark hero (scoped to body.home so project pages are unchanged)
   Navy / near-black surface, existing purple accent, light typography.
   ========================================================================== */
body.home .site-header {
  background: rgba(10, 13, 28, 0.97);
  border-bottom: 1px solid var(--night-line);
}
body.home .brand,
body.home .site-header nav a { color: #e9e9f3; }
body.home .site-header nav a:hover { color: var(--accent-light); }
body.home .lang-toggle { color: #e9e9f3; border-color: rgba(255, 255, 255, 0.24); }
body.home .lang-toggle:hover { border-color: var(--accent-light); color: var(--accent-light); }
body.home .lang-toggle .lang-opt.is-active { color: var(--accent-light); }

body.home .hero {
  max-width: none;
  padding: 72px max(24px, calc((100vw - var(--maxw)) / 2 + 8px)) 88px;
  background:
    radial-gradient(56% 78% at 76% 52%, rgba(106, 79, 160, 0.26), transparent 72%),
    radial-gradient(40% 50% at 4% 100%, rgba(106, 79, 160, 0.10), transparent 70%),
    var(--night);
  color: #e9e9f3;
}

body.home .hero .overline { color: var(--accent-light); }
body.home .hero h1 { color: #f6f6fb; }
body.home .hero h1 .accent { color: var(--accent-light); }
body.home .hero .lead { color: #b6b9cf; }
/* the oversized quote mark from the light design has no place on the dark hero */
body.home .hero-quotemark { display: none; }

/* Buttons on dark */
body.home .hero .btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: #f1f1f8;
  background: transparent;
}
body.home .hero .btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
body.home .hero .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body.home .hero .btn.primary:hover { background: #7d62b8; border-color: #7d62b8; }
body.home .hero .btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

/* Visualization stage labels on dark */
body.home .milestone::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(184, 163, 238, 0.30) 0,
    rgba(184, 163, 238, 0.30) 4px,
    transparent 4px,
    transparent 9px
  );
}
body.home .milestone-label { color: #a3a7c1; }

@media (max-width: 720px) {
  body.home .hero { padding: 40px 20px 56px; }
}

/* ==========================================================================
   NordHome case study (nordhome-retail.html) — editorial layout
   Scoped with .nh-* / body.nh-page. ~80% white, 15% ink, 5% purple.
   ========================================================================== */
.nh { padding-bottom: 32px; }
.nh-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.nh-sec { padding: 88px 0; border-top: 1px solid var(--line); }
.nh-sec-tight { padding: 56px 0; }
.nh-sec-cta { padding: 56px 0 40px; }
.nh-eyebrow, .nh-label {
  margin: 0 0 14px; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.nh-label { color: var(--muted); margin-bottom: 8px; }
.nh-label-gap { margin-top: 44px; margin-bottom: 18px; }
.nh-h2 { margin: 0 0 20px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
.nh-head { margin-bottom: 44px; }
.nh-lead { margin: 0; font-size: 1.08rem; line-height: 1.6; color: var(--muted); }
.nh-lead-sm { font-size: 1rem; margin-bottom: 28px; }
.nh-body { margin: 0 0 20px; line-height: 1.65; color: var(--ink); }
.nh-note { margin: 28px 0 0; font-size: 0.86rem; line-height: 1.6; color: var(--muted); }
.nh-note-wide { }

/* 1 Hero — text only */
.nh-hero { padding: 48px 0 72px; }
.nh-hero .cs-back { margin-bottom: 72px; }
.nh-title { margin: 0 0 18px; font-size: clamp(1.9rem, 4.4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; color: var(--ink); }
.nh-sub { margin: 0 0 22px; font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--ink); font-weight: 500; }
.nh-intro { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--muted); }
.nh-meta { margin: 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nh-meta > div { padding: 20px 0; }
.nh-meta dt { margin: 0 0 6px; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.nh-meta dd { margin: 0; font-size: 0.95rem; color: var(--ink); }

/* 2 Glance */
.nh-glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.nh-glance-t { margin: 0; line-height: 1.5; color: var(--ink); }

/* 3 Journey */
.nh-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: none; }
.nh-journey li { position: relative; padding: 18px 20px 0 0; border-top: 1px solid var(--ink); display: flex; flex-direction: column; gap: 6px; }
.nh-journey li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nh-j-n { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; color: var(--accent); }
.nh-j-t { font-size: 1rem; font-weight: 600; color: var(--ink); }
.nh-j-d { font-size: 0.85rem; line-height: 1.55; color: var(--muted); }

/* 4 Model */
.nh-split { display: grid; gap: 64px; align-items: start; }
.nh-split-model { grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
.nh-split-problem { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
.nh-split-learn { grid-template-columns: 0.8fr 1.2fr; }
.nh-quote { margin: 0 0 20px; padding: 0 0 0 18px; border-left: 2px solid var(--accent); font-size: 1.15rem; line-height: 1.5; color: var(--ink); }
.nh-quote p { margin: 0; }
.nh-list { list-style: none; margin: 0; padding: 0; }
.nh-list li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.92rem; line-height: 1.5; color: var(--muted); }
.nh-list li:last-child { border-bottom: 1px solid var(--line); }
.nh-list strong { color: var(--ink); font-weight: 600; }

.nh-frame { margin: 0; border: 1px solid var(--line); padding: 24px; background: #fff; }
.nh-frame figcaption { margin-top: 18px; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.nh-star-shared { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px dashed var(--line); }
.nh-star-k { flex-basis: 100%; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.nh-dim { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); font-size: 0.74rem; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); background: var(--surface-alt); }
.nh-star-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nh-fact { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border: 1px solid var(--ink); }
.nh-fact-name { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.74rem; font-weight: 600; color: var(--ink); word-break: break-word; }
.nh-grain { font-size: 0.78rem; line-height: 1.4; color: var(--muted); }
.nh-grain-k { color: var(--accent); font-weight: 600; }
.nh-dim-own { background: #fff; }

.nh-sub-block { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.nh-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.nh-stat { padding: 20px 24px 8px 0; display: flex; flex-direction: column; gap: 6px; }
.nh-stat + .nh-stat { border-left: 1px solid var(--line); padding-left: 24px; }
.nh-num { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.nh-stat-t { font-size: 0.88rem; line-height: 1.45; color: var(--ink); }
.nh-stat-s { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; color: var(--muted); }
.nh-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.nh-trio h3 { margin: 0 0 8px; font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.nh-trio p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: var(--muted); }

.nh-pis { display: grid; gap: 0; }
.nh-pi { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.nh-pi:last-child { border-bottom: 1px solid var(--line); }
.nh-pi-k { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.nh-pi p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--ink); }
.nh-bars { margin: 0; }
.nh-bar-row { display: grid; grid-template-columns: 84px 1fr 78px; gap: 12px; align-items: center; padding: 8px 0; font-size: 0.85rem; }
.nh-bar-track { position: relative; height: 14px; background: var(--surface-alt); }
.nh-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.nh-bar-ghost { position: absolute; left: 0; top: 0; bottom: 0; border: 1px dashed var(--accent); }
.nh-bar-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.nh-bars-cap { margin: 14px 0 0; font-size: 0.8rem; line-height: 1.55; color: var(--muted); }

/* 5 EDA */
.nh-eda-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.nh-eda h3 { margin: 0 0 16px; font-size: 1.02rem; line-height: 1.35; font-weight: 600; color: var(--ink); min-height: 2.7em; }
.nh-fig { margin: 0 0 18px; }
.nh-zoom { display: block; aspect-ratio: 16/10; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.nh-zoom img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nh-eda .nh-body { font-size: 0.9rem; line-height: 1.6; margin-bottom: 14px; }
.nh-limit { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.8rem; line-height: 1.55; color: var(--muted); }
.nh-label-inline { margin-right: 4px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

/* 6 Power BI 2x2 */
.nh-views { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nh-view-link { display: block; color: inherit; text-decoration: none; }
.nh-view-label { margin: 0 0 6px; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.05em; white-space: nowrap; color: var(--muted); }
.nh-view-n { color: var(--accent); margin-right: 6px; }
.nh-view-q { margin: 0 0 12px; min-height: 3.9em; font-size: 0.85rem; line-height: 1.3; font-weight: 600; color: var(--ink); transition: color 0.2s; text-wrap: balance; }
.nh-view-img { display: block; border: 1px solid var(--line); overflow: hidden; background: #fff; }
.nh-view-img img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.nh-view-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; }
.nh-view-tags { font-size: 0.7rem; line-height: 1.4; color: var(--muted); }
.nh-view-arrow { display: inline-flex; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; align-items: center; justify-content: center; color: var(--muted); transition: all 0.2s; flex: none; }
.nh-view-link:hover .nh-view-q, .nh-view-link:focus-visible .nh-view-q { color: var(--accent); }
.nh-view-link:hover .nh-view-img img { transform: scale(1.02); }
.nh-view-link:hover .nh-view-arrow { color: var(--accent); border-color: var(--accent); }

/* 7 Findings */
.nh-findings { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.nh-find { padding: 28px 0 32px; border-top: 1px solid var(--ink); }
.nh-find-n { display: block; margin-bottom: 14px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; color: var(--accent); }
.nh-find h3 { margin: 0 0 14px; font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.22; letter-spacing: -0.015em; font-weight: 700; color: var(--ink); }
.nh-find p { margin: 0; font-size: 0.92rem; line-height: 1.65; color: var(--muted); }

/* 8 Architecture */
.nh-arch { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 0; }
.nh-arch li { position: relative; padding: 8px 16px; border: 1px solid var(--ink); font-size: 0.85rem; font-weight: 500; color: var(--ink); margin-right: 34px; }
.nh-arch li:not(:last-child)::after { content: "→"; position: absolute; right: -26px; top: 50%; transform: translateY(-52%); color: var(--accent); }
.nh-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nh-chips li { padding: 5px 12px; border: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }

/* 9 Reflection */
.nh-learn p { margin: 0 0 18px; line-height: 1.7; color: var(--ink); }
.nh-learn p:last-child { margin-bottom: 0; }

/* 10 Links */
.nh-links { display: flex; flex-wrap: wrap; gap: 14px 40px; padding: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.nh-links a { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.nh-links a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1000px) {
  .nh-split-model, .nh-split-problem, .nh-split-learn { grid-template-columns: 1fr; gap: 40px; }
  .nh-eda-grid, .nh-trio, .nh-views { grid-template-columns: 1fr 1fr; }
  .nh-view-q { min-height: 0; }
  .nh-view-label { white-space: normal; }
  .nh-journey { grid-template-columns: repeat(3, 1fr); gap: 28px 0; }
  .nh-stats { grid-template-columns: 1fr 1fr; }
  .nh-stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .nh-meta { grid-template-columns: 1fr 1fr; }
  .nh-meta > div { padding: 16px 20px 16px 0; }
}
@media (max-width: 720px) {
  .nh-sec { padding: 60px 0; }
  .nh-sec-tight { padding: 40px 0; }
  .nh-hero { padding: 32px 0 48px; }
  .nh-hero .cs-back { margin-bottom: 44px; }
  .nh-glance, .nh-eda-grid, .nh-trio, .nh-views, .nh-findings { grid-template-columns: 1fr; gap: 32px; }
  .nh-eda h3, .nh-view-q { min-height: 0; }
  .nh-journey { grid-template-columns: 1fr 1fr; }
  .nh-pi { grid-template-columns: 1fr; gap: 4px; }
  .nh-star-facts { grid-template-columns: 1fr; }
  .nh-frame { padding: 16px; }
  .nh-bar-row { grid-template-columns: 72px 1fr 64px; }
  .nh-arch li { margin-right: 30px; }
  .nh-links { flex-direction: column; }
}

.nh-schema { padding: 16px; }
.nh-schema img { border: 1px solid var(--line); }
.nh-zoom-schema { aspect-ratio: auto; border: 0; }
.nh-zoom-schema img { height: auto; }
.nh-split-model .nh-schema { border: 0; padding: 0; }

.nh-hero-journey { margin-top: 56px; }
.nh-hero { padding-bottom: 64px; }

.nh-title { margin-bottom: 26px; }

.nh-chips-hero { margin-top: 28px; }

/* Dark band */
.nh-sec-dark { background: var(--ink); border-top: 0; color: #fff; }
.nh-sec-dark .nh-label { color: var(--accent-light); }
.nh-sec-dark .nh-glance-t { color: #fff; }
.nh-sec-dark + .nh-sec { border-top: 0; }

/* ---- Hierarchy pass: major / supporting tiers ---- */
.nh-major { padding: 112px 0; }
.nh-major .nh-h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 22px; }
.nh-major .nh-head { margin-bottom: 56px; }
.nh-major .nh-eyebrow { font-size: 0.7rem; }
.nh-support { background: var(--surface-alt); border-top: 1px solid var(--line); }
.nh-support .nh-sec { border-top: 0; }
.nh-support-head { padding: 88px 0 8px; }
.nh-support-head .nh-h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 12px; }
.nh-minor { padding: 64px 0; }
.nh-minor .nh-h2 { font-size: 1.5rem; letter-spacing: -0.015em; }
.nh-minor .nh-frame, .nh-minor .nh-zoom { background: #fff; }
.nh-support .nh-list li { border-color: #e2e2e5; }

/* findings: big numerals */
.nh-find { padding: 32px 0 40px; }
.nh-find-n { font-size: 3rem; line-height: 1; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 18px; }
.nh-find h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.nh-find p { font-size: 0.98rem; }

/* dashboards on black */
.nh-major.nh-sec-dark .nh-h2, .nh-major.nh-sec-dark .nh-view-q { color: #fff; }
.nh-major.nh-sec-dark .nh-lead { color: #b4b4ba; }
.nh-major.nh-sec-dark .nh-eyebrow { color: var(--accent-light); }
.nh-major.nh-sec-dark .nh-view-label, .nh-major.nh-sec-dark .nh-view-tags, .nh-major.nh-sec-dark .nh-note { color: #9a9aa2; }
.nh-major.nh-sec-dark .nh-view-n { color: var(--accent-light); }
.nh-major.nh-sec-dark .nh-view-img { border-color: #33333a; }
.nh-major.nh-sec-dark .nh-view-arrow { border-color: #44444c; color: #b4b4ba; }
.nh-major.nh-sec-dark .nh-view-link:hover .nh-view-q { color: var(--accent-light); }
.nh-major.nh-sec-dark .nh-view-link:hover .nh-view-arrow { color: var(--accent-light); border-color: var(--accent-light); }
.nh-major.nh-sec-dark .nh-view-q { font-size: 0.95rem; }
@media (max-width: 720px) { .nh-major { padding: 72px 0; } .nh-find-n { font-size: 2.4rem; } }

.nh-repo { margin: 24px 0 0; }
.nh-repo a { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.nh-repo a:hover { color: var(--ink); }

.nh-learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.nh-learn { border-top: 1px solid var(--ink); padding-top: 20px; }
.nh-learn h3 { margin: 0 0 12px; font-size: 1.1rem; line-height: 1.3; font-weight: 700; color: var(--ink); }
.nh-learn p { font-size: 0.95rem; line-height: 1.7; }
@media (max-width: 1000px) { .nh-learn-grid { grid-template-columns: 1fr; gap: 32px; } }

/* AlpenTech page: feature view + three-column findings */
.ap-feature { grid-template-columns: 1fr; margin-bottom: 20px; }
.ap-feature .nh-view-q { min-height: 0; font-size: 1.15rem; }
.nh-findings.ap-three { grid-template-columns: repeat(3, 1fr); }
.nh-find-n { white-space: nowrap; }
@media (max-width: 720px) { .nh-findings.ap-three { grid-template-columns: 1fr; } }
.ap-two { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
.ap-two .nh-view-q { min-height: 0; font-size: 1.05rem; }
@media (max-width: 720px) { .ap-two { grid-template-columns: 1fr; } }
.ap-two { margin-bottom: 40px; }
.ap-three-views { grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
.ap-three-views .nh-view-q { min-height: 0; font-size: 1.05rem; }
@media (max-width: 720px) { .ap-three-views { grid-template-columns: 1fr; } }
.ap-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 20px; }
.ap-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ap-tile-l { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ap-tile-v { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.ap-tile-d { font-size: 0.78rem; color: var(--muted); }
.ap-tile-d.bad { color: #b3261e; }
.ap-tile-d.good { color: #2e7d32; }
@media (max-width: 1080px) { .ap-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .ap-tiles { grid-template-columns: repeat(2, 1fr); } }
.nh-findings.ap-seven { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 24px; }
.ap-seven .nh-find-n { font-size: 1.7rem; white-space: nowrap; }
.ap-seven .nh-find h3 { font-size: 0.95rem; }
.ap-seven .nh-find p { font-size: 0.8rem; }
@media (max-width: 1080px) { .nh-findings.ap-seven { gap: 0 14px; } .ap-seven .nh-find-n { font-size: 1.35rem; } .ap-seven .nh-find h3 { font-size: 0.85rem; } .ap-seven .nh-find p { font-size: 0.72rem; } }
@media (max-width: 720px) { .nh-findings.ap-seven { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; } .ap-seven .nh-find-n { font-size: 1.7rem; } }
/* AlpenTech KPI cards */
.ap-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.ap-kpi { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 18px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ap-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #b3261e; }
.ap-kpi-l { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); line-height: 1.35; min-height: 2.7em; }
.ap-kpi-v { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.ap-kpi-d { font-size: 0.74rem; font-weight: 600; line-height: 1.35; color: #b3261e; }
@media (max-width: 1080px) { .ap-kpis { gap: 10px; } .ap-kpi { padding: 14px 10px 14px 14px; } .ap-kpi-v { font-size: 1.2rem; } .ap-kpi-d { font-size: 0.68rem; } }
@media (max-width: 720px) { .ap-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-kpi-l { min-height: 0; } .ap-kpi-v { font-size: 1.5rem; } }
/* AlpenTech: compact key findings */
#findings.nh-major { padding: 64px 0; }
#findings .nh-head { margin-bottom: 28px; }
#findings .nh-h2 { font-size: 1.9rem; }
#findings .nh-findings { gap: 0 40px; }
#findings .nh-find { padding-top: 20px; padding-bottom: 20px; }
#findings .nh-find-n { font-size: 1.5rem; margin-bottom: 10px; }
#findings .nh-find h3 { font-size: 1.02rem; margin-bottom: 6px; }
#findings .nh-find p { font-size: 0.84rem; line-height: 1.55; }
@media (max-width: 720px) { #findings.nh-major { padding: 48px 0; } }
/* AlpenTech: one consistent section heading size */
body.nh-page.ap-page main .nh-sec .nh-h2 { font-size: 1.9rem; }
body.nh-page.ap-page main #dashboard .nh-h2 { font-size: 3rem; }
@media (max-width: 720px) { body.nh-page.ap-page main #dashboard .nh-h2 { font-size: 2.2rem; } }
/* AlpenTech: KPI logic cards */
.ap-dax { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ap-dax-c { display: flex; flex-direction: column; align-items: flex-start; padding: 22px 22px 24px; background: #fff; border: 1px solid var(--line); }
.ap-dax-n { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 12px; }
.ap-dax-c h3 { margin: 0 0 8px; font-size: 1rem; line-height: 1.3; font-weight: 700; color: var(--ink); }
.ap-dax-c p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--muted); }
.ap-dax-k { margin-top: auto; padding: 5px 8px; align-self: flex-start; background: #f1eef8; color: #4b3a80; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.72rem; }
.ap-dax-c p { margin-bottom: 16px; }
@media (max-width: 1000px) { .ap-dax { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .ap-dax { grid-template-columns: 1fr; } }
#glance::after { content: ""; display: block; margin-top: 48px; border-bottom: 1px solid var(--line); }
#glance { padding-bottom: 56px; }

/* Star Schema vs. Data Vault page */
.sv-meta { margin: 20px 0 0; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sv-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.sv-split .nh-body { margin: 0; }
.sv-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.sv-block { border-top: 1px solid var(--ink); padding-top: 16px; }
.sv-block-l { margin: 0 0 10px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.sv-block-l span:first-child { color: var(--accent); margin-right: 6px; }
.sv-block-t { margin: 0; font-size: 1.05rem; line-height: 1.4; font-weight: 600; color: var(--ink); }
.sv-tint { background: var(--surface-alt); }
.sv-models { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.sv-model-l { margin: 0 0 16px; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; color: var(--ink); }
.sv-model-l span:first-child { color: var(--accent); margin-right: 6px; }
.sv-fig { margin: 0 0 24px; border: 1px solid var(--line); background: #fff; padding: 16px; }
.sv-fig a { display: block; }
.sv-fig img { display: block; width: 100%; height: auto; }
.sv-model-h { margin: 0 0 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }
.sv-model .nh-body { margin: 0 0 20px; }
.sv-grain { border-left: 3px solid var(--ink); padding: 4px 0 4px 16px; }
.sv-grain-l, .sv-def dt { margin: 0 0 4px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.sv-grain-t { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink); font-weight: 500; }
.sv-defs { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.sv-def dd { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.sv-q { margin: 8px 0 40px; }
.sv-q-l { margin: 0 0 10px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; color: #b8a3ee; }
.sv-q-t { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.sv-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.sv-path { border-top: 1px solid #44444c; padding-top: 16px; }
.sv-path-l { margin: 0 0 10px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; color: #9a9aa2; }
.sv-path-t { margin: 0; font-size: 1.05rem; line-height: 1.8; color: #9a9aa2; }
.sv-path-t span { display: inline-block; padding: 2px 10px; border: 1px solid #44444c; color: #fff; }
.sv-table { border-top: 1px solid var(--ink); }
.sv-row { display: grid; grid-template-columns: 0.8fr 1.1fr 1.1fr; gap: 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.sv-row-h { padding: 12px 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--ink); border-bottom: 1px solid var(--ink); }
.sv-cell { font-size: 0.92rem; line-height: 1.55; color: var(--muted); }
.sv-cell-k { font-weight: 600; color: var(--ink); }
.sv-col { display: none; }
.sv-decs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.sv-dec { border-top: 1px solid var(--ink); padding-top: 16px; }
.sv-dec h3 { margin: 0 0 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }
.sv-dec p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--ink); }
.sv-split-learn { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
.sv-statement { margin: 0 0 24px; font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.sv-contrast { display: flex; flex-direction: column; align-items: stretch; border-left: 1px solid var(--ink); padding-left: 32px; }
.sv-pole-l { margin: 0 0 6px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.sv-pole-t { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.sv-axis { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 1.6rem; color: var(--accent); }
.sv-axis span { flex: 1; border-top: 1px solid var(--line); }
.sv-concl { color: #fff; font-size: 1.15rem; }
@media (max-width: 1000px) {
  .sv-split, .sv-split-learn, .sv-models { grid-template-columns: 1fr; gap: 40px; }
  .sv-decs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .sv-blocks, .sv-paths, .sv-defs, .sv-decs { grid-template-columns: 1fr; gap: 24px; }
  .sv-row-h { display: none; }
  .sv-row { grid-template-columns: 1fr; gap: 10px; }
  .sv-col { display: block; margin-bottom: 2px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }
  .sv-contrast { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 20px; }
}
.sv-page .nh-intro + .nh-intro { margin-top: 16px; }

/* ==========================================================================
   EDA page — compact overrides: smaller visuals, analysis beside the charts
   ========================================================================== */
.eda-page .eda-hero { padding: 40px 0 0; }
.eda-page .eda-hero-grid { grid-template-columns: 1fr; gap: 0; }
.eda-page .eda-hero-vis { display: none; }
.eda-page .eda-crumbs { margin-bottom: 24px !important; }
.eda-page .eda-title { font-size: clamp(2rem, 4vw, 3rem); max-width: none; }
.eda-page .eda-sub { font-size: 1.1rem; margin-top: 14px !important; }
.eda-page .eda-hero-meta { margin-top: 20px !important; font-size: 0.95rem; }
.eda-page .eda-hero-tech { margin-top: 8px !important; font-size: 0.85rem; }
.eda-page .eda-link { margin-top: 16px; font-size: 0.9rem; }
.eda-page .eda-hero-strip { margin-top: 32px; }
.eda-page .eda-mini { padding-top: 14px; }
.eda-page .eda-mini strong { font-size: 1.1rem; }
.eda-page .eda-sec { padding-top: 64px; }
.eda-page .eda-head { margin-bottom: 28px; }
.eda-page .eda-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.eda-page .eda-lead { margin-top: 10px !important; font-size: 1rem; }
.eda-page .eda-explore { padding-top: 64px; }
.eda-page .eda-explore .eda-head { margin-bottom: 8px; }
.eda-page .eda-dataset { gap: 40px; }
.eda-page .eda-bignums { gap: 24px 24px; }
.eda-page .eda-big { padding-top: 12px; gap: 4px; }
.eda-page .eda-big strong { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.eda-page .eda-big--period strong { font-size: 1.1rem; }
.eda-page .eda-journey li { padding-top: 18px; }
.eda-page .eda-j-d { font-size: 0.82rem; }

/* every finding: chart left, analysis right */
.eda-page .eda-block, .eda-page .eda-item { margin-top: 0; padding-top: 40px; margin-bottom: 0; border-top: 1px solid var(--line); margin-top: 40px; }
.eda-page .eda-block:first-of-type { margin-top: 32px; }
.eda-page .eda-block, .eda-page .eda-item {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); column-gap: 48px; row-gap: 0; align-items: start;
}
.eda-page .eda-block .eda-meta, .eda-page .eda-item .eda-meta { grid-column: 1 / -1; margin-bottom: 16px; min-height: 0; flex-direction: row; gap: 4px 16px; }
.eda-page .eda-fig { grid-column: 1; grid-row: 2 / span 3; }
.eda-page .eda-fig figcaption { margin-top: 8px; font-size: 0.72rem; }
.eda-page .eda-take { grid-column: 2; grid-row: 2; display: block; margin-top: 0; }
.eda-page .eda-take h3, .eda-page .eda-item h3 { grid-column: 2; margin: 0 0 8px; font-size: 1.2rem; line-height: 1.25; }
.eda-page .eda-item h3 { grid-row: 2; margin-top: 0; }
.eda-page .eda-item h3 + p { grid-column: 2; grid-row: 3; margin-top: 0; }
.eda-page .eda-take-text { gap: 8px; }
.eda-page .eda-take-text p, .eda-page .eda-item p { font-size: 0.92rem; line-height: 1.6; max-width: none; }
.eda-page .eda-pair { display: block; margin-top: 0; }

/* outliers band */
.eda-page .eda-outlier { margin-top: 48px; padding: 48px 0; }
.eda-page .eda-outlier-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: start; }
.eda-page .eda-outlier-side { order: 1; }
.eda-page .eda-outlier-main { order: 2; }
.eda-page .eda-outlier h3 { font-size: 1.2rem; }
.eda-page .eda-ostats { margin: 16px 0 12px; gap: 20px; }
.eda-page .eda-ostat strong { font-size: 1.5rem; }
.eda-page .eda-notebox { margin-top: 28px; }
.eda-page .eda-notehead { font-size: 1rem; }
.eda-page .eda-notebox p { font-size: 0.92rem; line-height: 1.6; }

/* findings, next, methods */
.eda-page .eda-findings { gap: 28px; }
.eda-page .eda-findings li { padding-top: 14px; gap: 8px; }
.eda-page .eda-findings h3 { font-size: 0.85rem; }
.eda-page .eda-findings p { font-size: 0.88rem; line-height: 1.55; }
.eda-page .eda-method { margin-top: 36px; padding: 16px 20px; }
.eda-page .eda-next li { padding: 16px 0; }
.eda-page .eda-nq { font-size: 1.02rem; }
.eda-page .eda-obs { font-size: 0.95rem; }
.eda-page .eda-methods { margin-top: 64px; padding: 28px 0 40px; }

@media (max-width: 820px) {
  .eda-page .eda-block, .eda-page .eda-item { display: block; }
  .eda-page .eda-fig { margin-bottom: 16px; }
  .eda-page .eda-take h3, .eda-page .eda-item h3 { margin-top: 0; }
  .eda-page .eda-outlier-grid { grid-template-columns: 1fr; gap: 24px; }
  .eda-page .eda-outlier-main { order: 0; }
}

/* EDA page — story refinements */
.eda-page .eda-crumbs { display: flex; align-items: center; gap: 16px; }
.eda-page .eda-block .eda-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
.eda-page .eda-block .eda-q { font-size: 1.4rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.eda-page .eda-take h3 { font-size: 1.05rem; color: var(--accent); }
.eda-page .eda-bridge { margin-top: 6px; padding-left: 14px; border-left: 2px solid var(--accent); color: var(--ink); font-weight: 600; font-size: 0.92rem; line-height: 1.5; }
.eda-page .eda-block--wide { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.eda-page .eda-from { margin-top: 10px; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eda-page #conclusion .eda-findings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eda-page .eda-mlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.eda-page .eda-mlist li { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; line-height: 1.5; }
.eda-page .eda-mlist .eda-obs { font-weight: 600; color: var(--ink); }
.eda-page #github { padding-bottom: 24px; }
@media (max-width: 820px) {
  .eda-page .eda-block--wide { display: block; }
  .eda-page .eda-mlist li { grid-template-columns: 1fr; gap: 2px; }
  .eda-page #conclusion .eda-findings { grid-template-columns: 1fr; }
}

/* AlpenTech — unified heading scale: H3 16px, eyebrow 11.52px */
body.nh-page.ap-page main h3, body.nh-page.ap-page main .nh-view-q, body.nh-page.ap-page main #findings .nh-find h3 { font-size: 1rem; }
body.nh-page.ap-page main .nh-eyebrow { font-size: 0.72rem; }

/* EDA page — hero / glance structure */
.eda-page .eda-hero { padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.eda-page .eda-hero .eda-eyebrow { margin-bottom: 12px; }
.eda-page .eda-dataset { display: block; }
.eda-page .eda-dataset-head { display: block; max-width: 760px; }
.eda-page .eda-dataset-head .eda-small { margin-top: 8px; }
.eda-page .eda-bignums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.eda-page .eda-big--period strong { font-size: 1.35rem; line-height: 1.5; }
@media (max-width: 820px) { .eda-page .eda-bignums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.eda-page .eda-crumbs .cs-status { margin: 0; }
.eda-page .eda-dataset-head { max-width: none; }
.eda-page .eda-dataset-head .eda-head { margin-bottom: 12px; }
.eda-page .eda-dataset-head .eda-small { max-width: 780px; }
.eda-page .eda-crumbs .cs-back { margin: 0; }
.eda-page .eda-scope { margin: 32px 0 8px; }
.eda-page .eda-scope .eda-method-label { margin-bottom: 10px; }
.eda-page .eda-scope .eda-mlist li { grid-template-columns: 160px minmax(0, 1fr); }
.eda-page .eda-scope .eda-small { margin-top: 14px; }

/* NordHome — Data foundation: pipeline steps + modeling decisions */
.nh-steps { margin-top: 12px; }
.nh-steps .nh-step-n { display: inline-block; width: 2.2em; color: var(--accent); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; }
.nh-decisions { margin-top: 40px; }
.nh-decisions .nh-quote { margin-top: 12px; }

/* NordHome — Data foundation: text column height matches the diagram */
.nh-split-model { grid-template-columns: 0.77fr 1.23fr; gap: 40px; }
.nh-split-model .nh-list li { padding: 6px 0; font-size: 0.86rem; line-height: 1.45; }
.nh-split-model .nh-decisions { margin-top: 18px; }
.nh-split-model .nh-decisions .nh-body { font-size: 0.95rem; line-height: 1.55; margin: 8px 0 12px; }

/* NordHome — sub-heading inside a section (e.g. "Found later…") */
.nh-subh { margin: 56px 0 20px; font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; color: var(--ink); }

/* About: closing line in italics */
.about-text p:not(.overline):last-of-type { font-style: italic; }

/* About: side-by-side layouts — the text sets the row height, the portrait
   fills it exactly (cropped, never taller than the text) */
@media (min-width: 1000px) {
  .about-photo { position: relative; }
  .about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
}
@media (min-width: 1000px) and (max-width: 1024px) {
  .about-grid { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
  .about-photo { max-width: 360px; }
}

/* Knowledge sections (Statistics, Data Storytelling) + "All projects" link */
#statistics .overline,
#statistics .section-title,
#data-storytelling .overline,
#data-storytelling .section-title { text-align: center; max-width: none; margin-left: auto; margin-right: auto; }

main > section.knowledge { position: relative; }
main > section.knowledge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(360px, 60%);
  height: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.section-intro {
  max-width: 560px;
  margin: 18px auto 48px;
  text-align: center;
  color: var(--muted);
}

.section-more { margin: 48px 0 0; text-align: center; }

/* Fewer than three cards: keep the three-column card width, centre the row */
.knowledge .project-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.knowledge .project-card { flex: 0 1 calc((100% - 64px) / 3); min-width: 0; }
@media (max-width: 1024px) { .knowledge .project-card { flex-basis: calc((100% - 32px) / 2); } }
@media (max-width: 640px) { .knowledge .project-card { flex-basis: 100%; } }

@media (max-width: 720px) {
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
}

main > section.knowledge .section-title { margin-bottom: 0; }

/* All projects page */
h1.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 48px;
  max-width: 16ch;
}
#alle-projekte .overline,
#alle-projekte .section-title { text-align: center; max-width: none; margin-left: auto; margin-right: auto; }
#alle-projekte .cs-back { margin-bottom: 24px; }

/* Section pages (Statistics, Data Storytelling) */
.knowledge-page::before { display: none; }
.knowledge-page .overline,
.knowledge-page .section-title { text-align: center; max-width: none; margin-left: auto; margin-right: auto; }
.knowledge-page .cs-back { margin-bottom: 24px; }

/* Quieter "more" buttons under each section */
.section-more .btn {
  padding: 9px 22px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s;
}
.section-more .btn:hover { color: var(--accent); border-color: var(--accent); background: transparent; }

/* Tighter vertical rhythm between Projects, Statistics and Data Storytelling */
main > section#projekte { padding-bottom: 48px; }
main > section.knowledge { padding-top: 56px; padding-bottom: 48px; }
.section-intro { margin-bottom: 36px; }
.section-more { margin-top: 36px; }

/* Knowledge article (blog format) */
main > article.post { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.post .cs-back { margin-bottom: 24px; }
.post-title { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.post-sub { margin: 0 0 32px; font-size: 1.15rem; font-style: italic; color: var(--muted); }
.post-cover { margin: 0 0 40px; }
.post-cover img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.post p { margin: 0 0 16px; font-size: 1.02rem; line-height: 1.75; }
.post h2 { font-size: 1.7rem; margin: 64px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.post h3 { font-size: 1.2rem; margin: 40px 0 12px; letter-spacing: -0.01em; }
.post .formula { padding: 12px 18px; background: var(--surface-alt); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-weight: 500; overflow-x: auto; }
.post-note { margin: 20px 0 24px; padding: 14px 18px; background: var(--surface-alt); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; }
.post-note p { margin: 0; font-size: 0.97rem; }
.post-note .post-note-l { margin-bottom: 6px; display: flex; align-items: center; gap: 9px; font-style: italic; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
/* Warning-sign icon in front of the note labels (not on the Key takeaway box) */
.post-note:not(.post-takeaway) .post-note-l::before { content: ""; flex: none; width: 20px; height: 18px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath fill-rule='evenodd' d='M10 0.8L19.4 17.2H0.6Z M9 6.6h2v5.4H9Z M9 13.2h2v2.2H9Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath fill-rule='evenodd' d='M10 0.8L19.4 17.2H0.6Z M9 6.6h2v5.4H9Z M9 13.2h2v2.2H9Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.post-note.post-note-plain .post-note-l::before { display: none; }
.post-note.post-note-explain { border-left-color: #1d57b5; }
.post-note.post-note-warn { border-left-color: #f5c548; }
.post-takeaway { margin-top: 48px; padding: 22px 26px; border: 1px solid var(--accent); border-radius: 10px; background: #fff; }
.post-fig { margin: 24px 0 28px; }
.post-fig img { width: 100%; height: auto; }
.post-fig figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
.post-fig figcaption span { margin-right: 8px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; color: var(--ink); }
.post-table-wrap { overflow-x: auto; margin: 16px 0 24px; }
.post-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.post-table th { text-align: left; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
.post-table th, .post-table td { padding: 10px 14px 10px 0; vertical-align: top; }
.post-table td { border-bottom: 1px solid var(--line); }
.post-flow { list-style: none; margin: 0 0 24px; padding: 0; }
.post-flow li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.post-flow strong { display: inline-block; min-width: 120px; letter-spacing: 0.06em; }
@media (max-width: 720px) {
  main > article.post { padding: 40px 20px 72px; }
  .post-flow strong { display: block; min-width: 0; }
}

.post-points { margin: 0 0 24px; padding-left: 1.2em; }
.post-points li { margin-bottom: 12px; padding-left: 4px; line-height: 1.7; }
.post-points li::marker { color: var(--accent); }
.post-points-color li::marker { font-size: 1.3em; }
.post-points-color li:nth-child(4n+1)::marker { color: #dc452d; }
.post-points-color li:nth-child(4n+2)::marker { color: #1d57b5; }
.post-points-color li:nth-child(4n+3)::marker { color: #f5c548; }
.post-points-color li:nth-child(4n+4)::marker { color: #0a0a0a; }
.post-code { margin: 16px 0 24px; padding: 16px 18px; overflow-x: auto; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px; }
.post-code code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; line-height: 1.65; color: var(--ink); white-space: pre; }
.post-code-out { margin-top: -12px; }
.post-code-out code { color: var(--muted); }
.post-formula { margin: 20px 0 24px; padding: 16px 20px; text-align: center; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px; }
.post-formula strong { display: block; font-size: 1.35rem; letter-spacing: 0.01em; }
.post-formula span { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--muted); }
/* Justified body text (add class post-justify to <article>): equal line lengths, hyphenated to avoid wide gaps */
.post.post-justify > p:not(.overline):not(.post-formula),
.post.post-justify .post-points li,
.post.post-justify .post-note p:not(.post-note-l) { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.post p code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; padding: 1px 6px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 5px; }

/* Slide deck bar */
.post-deck { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 24px; margin:0 0 32px; padding:14px 18px; background:#f3f3f5; border-radius:10px; }
.post-deck p { margin:0; }
.post-deck-t { font-size:.95rem; }
.post-deck-t span { color:var(--muted); margin-left:6px; }
.post-deck-l { display:flex; gap:10px; }
.post-deck-l a { padding:6px 14px; border:1px solid #16161a; border-radius:999px; font-size:.85rem; font-weight:600; color:#16161a; text-decoration:none; background:#fff; }
.post-deck-l a:hover { background:#16161a; color:#fff; }

/* Event-type cards (knowledge articles) */
.post-types { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 28px; }
.post-type { padding: 16px 18px 18px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px; }
.post-type .post-type-l { margin: 0 0 6px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.post-type .post-type-t { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.post-type p:not(.post-type-l):not(.post-type-t) { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.6; }
.post-type p:last-child { margin-bottom: 0; }
.post-type .post-type-use { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) { .post-types { grid-template-columns: 1fr; } }

/* Optional: italic main section titles in a knowledge article (add class to <article class="post">) */
.post.post-italic-h2 h2 { font-style: italic; }

/* Figure inside a note box */
.post-note .post-fig { margin: 18px 0 4px; }
.post-note .post-fig figcaption { margin-top: 6px; }

/* Smaller, quieter figures in a knowledge article (add class post-small-figs to <article>) */
.post.post-small-figs .post-fig { max-width: 78%; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .post.post-small-figs .post-fig { max-width: 100%; } }
.post.post-small-figs .post-fig.post-fig-wide { max-width: 100%; }

/* Statistics page: compact cards so two rows fit on one screen */
.knowledge-page .project-grid { gap: 20px; }
.knowledge-page .project-card { flex-basis: calc((100% - 60px) / 4); border-radius: 12px; }
.knowledge-page .project-card-img { aspect-ratio: 2 / 1; }
.knowledge-page .project-card-body { padding: 16px 18px 12px; }
.knowledge-page .project-type { font-size: 0.64rem; }
.knowledge-page .project-title { margin: 8px 0 6px; font-size: 1.08rem; }
.knowledge-page .project-card-body p { font-size: 0.8rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.knowledge-page .project-card-foot { margin: 0 18px; padding: 12px 0 14px; gap: 10px; }
.knowledge-page .project-tags { gap: 4px; }
.knowledge-page .project-tags span { font-size: 0.66rem; padding: 3px 9px; }
.knowledge-page .project-arrow { width: 30px; height: 30px; font-size: 0.9rem; }
.knowledge-page .section-intro { margin-bottom: 28px; }
@media (max-width: 1100px) { .knowledge-page .project-card { flex-basis: calc((100% - 40px) / 3); } }
@media (max-width: 820px) { .knowledge-page .project-card { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 560px) { .knowledge-page .project-card { flex-basis: 100%; } }
.knowledge-page { padding-top: 36px; padding-bottom: 48px; }
.knowledge-page .cs-back { margin-bottom: 8px; }
.knowledge-page .overline { margin-bottom: 6px; }
.knowledge-page h1.section-title { margin-bottom: 0; font-size: clamp(1.8rem, 3.2vw, 2.3rem); }
.knowledge-page .section-intro { margin: 8px auto 22px; }
.knowledge-page .project-card-img { aspect-ratio: 5 / 2; }
.knowledge-page .project-card-body { padding: 14px 18px 10px; }
.knowledge-page .project-card-body p { -webkit-line-clamp: 2; }
.knowledge-page .project-tags span:nth-child(n+4) { display: none; }
.knowledge-page .project-tags { flex-wrap: nowrap; }
.knowledge-page .project-card-foot { padding: 10px 0 12px; }
.knowledge-page .project-grid { gap: 16px; }
.knowledge-page .project-card { flex-basis: calc((100% - 48px) / 4); }
.knowledge-page .project-card-img { aspect-ratio: 2 / 1; }
.knowledge-page .project-card-img img { object-position: left center; }
.knowledge-page .project-card-body { padding: 12px 18px 8px; }
.knowledge-page .project-tags span:nth-child(n+3) { display: none; }
.knowledge-page .project-card-foot { padding: 8px 0 10px; }
.knowledge-page .project-arrow { width: 28px; height: 28px; }
.knowledge-page { padding-top: 28px; }
@media (max-width: 1100px) { .knowledge-page .project-card { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 820px) { .knowledge-page .project-card { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 560px) { .knowledge-page .project-card { flex-basis: 100%; } }
.knowledge-page .project-card-img { aspect-ratio: 5 / 2; }
.knowledge-page .project-card-img img { object-position: left 45%; }
.knowledge-page { padding-top: 18px; }
.knowledge-page .section-intro { margin: 6px auto 16px; }
.knowledge-page .project-card-img img { object-position: left 30%; }
.knowledge-page { max-width: 1340px; }
.knowledge-page .project-title { font-size: 1.15rem; }
.knowledge-page .project-card-body p { font-size: 0.84rem; }
.knowledge-page .project-tags span { font-size: 0.7rem; }
.knowledge-page { padding-top: 6px; }
/* Statistics page: show covers (almost) uncropped */
.knowledge-page .project-card-img { aspect-ratio: 3 / 2; }
.knowledge-page .project-card-img img { object-position: center; }
.knowledge-page a[href="datenviz-eda.html"] .project-card-img img { object-position: left center; }
.knowledge-page a[href="ab-testing.html"] .project-card-img { background: #f4f2ee; }
.knowledge-page a[href="ab-testing.html"] .project-card-img img { object-fit: contain; }
.knowledge-page a[href="simple-linear-regression.html"] .project-card-img,
.knowledge-page a[href="least-squares.html"] .project-card-img,
.knowledge-page a[href="regression-assumptions.html"] .project-card-img { background: #f6f3ea; }
.knowledge-page a[href="simple-linear-regression.html"] .project-card-img img,
.knowledge-page a[href="least-squares.html"] .project-card-img img,
.knowledge-page a[href="regression-assumptions.html"] .project-card-img img { object-fit: contain; }

/* Highlighted callout (knowledge articles): the one passage to remember */
.post-callout { position: relative; margin: 32px 0; padding: 26px 30px 28px; background: var(--surface-alt); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; }
.post-callout::before { content: "\201C"; position: absolute; top: 4px; right: 22px; font-size: 5.5rem; line-height: 1; font-weight: 700; color: var(--accent); opacity: 0.16; pointer-events: none; }
.post .post-callout .post-callout-l { margin: 0 0 12px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.post .post-callout .post-callout-q { margin: 0; font-size: 1.2rem; line-height: 1.7; font-weight: 500; }
.post .post-callout .post-callout-q strong { font-weight: 700; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--accent) 22%, transparent) 60%); }
.post .post-callout .post-callout-q + .post-callout-q { margin-top: 14px; }
/* Compact table + small subheading for secondary detail (does not compete with the main text) */
.post .post-h3-small { margin: 22px 0 6px; font-size: 0.95rem; letter-spacing: 0; color: var(--muted); }
.post-table-narrow { max-width: 340px; margin: 12px 0 20px; }
.post-table-narrow .post-table { font-size: 0.88rem; }
.post-table-narrow .post-table th, .post-table-narrow .post-table td { padding: 6px 14px 6px 0; }
.post-table-compact { margin: 6px 0 18px; }
.post-table-compact .post-table { font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.post-table-compact .post-table th { font-size: 0.62rem; padding-bottom: 4px; border-bottom-width: 1px; }
.post-table-compact .post-table th, .post-table-compact .post-table td { padding: 6px 14px 6px 0; }
.post-table-compact .post-table td:first-child { color: var(--ink); font-weight: 500; width: 34%; }
@media (max-width: 640px) { .post-callout { padding: 22px 20px 24px; } .post .post-callout .post-callout-q { font-size: 1.08rem; } }

/* Sub-heading with a grey background (knowledge articles) */
.post h3.post-subhead { margin: 44px 0 16px; padding: 10px 16px; background: var(--surface-alt); border-radius: 8px; }

/* Theme groups on the knowledge overview */
.knowledge-page .theme-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 40px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.knowledge-page .theme-head:first-of-type { margin-top: 8px; }
.knowledge-page .theme-head h2 { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.knowledge-page .theme-head p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.knowledge-page .project-grid { justify-content: flex-start; }
.knowledge-page .theme-head h2 { font-size: 1.85rem; font-style: italic; letter-spacing: -0.01em; }

/* Normal distribution post: small inline diagrams in the standard article layout */
.nd-svg { display: block; width: 100%; height: auto; }
.nd-svg text { fill: var(--ink); }
.nd-svg text.cr { fill: #fff; }
.nd-svg text.m { fill: var(--muted); }
.nd-svg .b { font-weight: 700; }
.nd-svg .l { font-size: 17px; }
.nd-svg .xl { font-size: 22px; }
.nd-svg .ls { font-size: 13px; }
.post-nd .nd-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-nd .nd-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-nd .nd-trio h3, .post-nd .nd-ba h3 { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-style: normal; }
.post-nd .nd-trio p { margin: 6px 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
.post-nd .nd-trio .nd-svg .ls { font-size: 12px; }
.post-nd .nd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-nd .nd-two h3 { margin: 24px 0 10px; font-size: 1rem; }
@media (max-width: 640px) {
  .post-nd .nd-trio, .post-nd .nd-ba, .post-nd .nd-two { grid-template-columns: 1fr; }
  .nd-svg .l { font-size: 24px; }
  .nd-svg .xl { font-size: 30px; }
  .nd-svg .ls, .post-nd .nd-ba .nd-svg .ls { font-size: 15px; }
  .post-nd .nd-trio .nd-svg { max-width: 260px; }
}
/* Quieter stakeholder quote box (Normal Distribution and Bayes posts) */
.post-nd .post-callout, .post-callout-s { margin: 20px 0 24px; padding: 16px 20px 18px; }
.post-nd .post-callout::before, .post-callout-s::before { font-size: 3.2rem; top: 2px; right: 16px; }
.post-nd .post-callout .post-callout-q, .post .post-callout-s .post-callout-q { font-size: 0.95rem; line-height: 1.6; font-weight: 400; }
.post-nd .post-callout .post-callout-q + .post-callout-q, .post .post-callout-s .post-callout-q + .post-callout-q { margin-top: 10px; }
.post-nd .nd-quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.post-nd .nd-quad h3 { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-style: normal; }
@media (max-width: 640px) { .post-nd .nd-quad { grid-template-columns: 1fr 1fr; } }

/* No lone words on the last line of post text */
.post p, .post li, .post figcaption, .post .post-callout-q { text-wrap: pretty; }

/* Justified post text on wider screens: equal line lengths except the last line */
@media (min-width: 641px) { .post p:not(.post-formula):not(.post-note-l), .post li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; } }

/* Space between the title and the first paragraph now that posts have no cover image */
.post .post-title + p { margin-top: 28px; }

/* Q-Q plot examples: thumbnail beside title and description (same height) */
.post .post-qq { margin: 24px 0; }
.post .post-qq-item { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: stretch; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post .post-qq-item:first-child { border-top: 1px solid var(--line); }
.post .post-qq-item img { width: 100%; height: 100%; min-height: 0; object-fit: contain; display: block; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.post .post-qq-item > div { display: flex; flex-direction: column; justify-content: center; text-align: left; }
.post .post-qq-item h3 { margin: 0 0 4px; font-size: 1.15rem; font-style: normal; line-height: 1.3; }
.post .post-qq-item p { margin: 0; line-height: 1.45; text-align: left !important; hyphens: none !important; }
.post .post-qq-item p + p { margin-top: 6px; }
.post .post-qq-item ul { margin: 6px 0; padding-left: 1.2em; }
.post .post-qq-item li { margin: 0 0 2px; line-height: 1.4; text-align: left !important; hyphens: none !important; }
@media (max-width: 640px) { .post .post-qq-item { grid-template-columns: 1fr; gap: 12px; } .post .post-qq-item img { height: auto; } }

/* Three charts in one row, captions centred underneath */
.post .post-row { margin: 20px 0 30px; }
.post .post-row img { width: 100%; height: auto; display: block; }
.post .post-row-caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; text-align: center; }
.post .post-row-caps strong { display: block; font-size: .92rem; }
.post .post-row-caps p { margin: 3px 0 0; font-size: .8rem; line-height: 1.4; color: #3a3a3a; text-align: center !important; hyphens: none !important; }
@media (max-width: 640px) { .post .post-row-caps { grid-template-columns: 1fr; gap: 12px; } }

/* Stacked fractions in formulas */
.post-formula .frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .15em; line-height: 1.25; font-size: 1em; color: inherit; }
.post-formula .frac > span { display: block; margin: 0; padding: 0 .3em; font-size: inherit; color: inherit; }
.post-formula .frac > span:first-child { border-bottom: 1.5px solid currentColor; padding-bottom: .1em; }
.post-formula .frac > span:last-child { padding-top: .1em; }
.post-formula .frac .frac > span { font-size: .85em; }

/* Continue the bullet colour sequence when a list is split by a chart */
.post-points-color.pc-2 li:nth-child(1)::marker { color: #1d57b5; }
.post-points-color.pc-3 li:nth-child(1)::marker { color: #f5c548; }
.post-points-color.pc-4 li:nth-child(1)::marker { color: #0a0a0a; }

/* Regression summary output (statsmodels-style) */
.post-summary { margin: 20px 0 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow-x: auto; }
.post-summary-t { text-align: center; font-weight: 600; padding: 12px 16px 8px; font-size: 0.95rem; }
.post-summary table { width: 100%; border-collapse: collapse; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.post-summary td, .post-summary th { padding: 2px 14px; line-height: 1.35; border: 0; text-align: left; white-space: nowrap; }
@media (max-width: 600px) { .post-summary td, .post-summary th { padding: 2px 8px; font-size: 0.8rem; } }
.post-summary th { font-weight: 600; }
.post-summary .ps-block { border-top: 1px solid var(--line); }
.post-summary .ps-coef th { font-size: 0.78rem; color: var(--muted); font-weight: 500; text-align: right; }
.post-summary .ps-coef th:first-child, .post-summary .ps-coef td:first-child { text-align: left; }
.post-summary .ps-coef td { text-align: right; }
.post-summary .ps-coef td:first-child { font-weight: 600; }
.post-summary .ps-coef .ps-hl { background: rgba(106, 79, 160, 0.08); }

/* Numbered subheading with circle badge */
.post-h3-num { display: flex; align-items: center; gap: 10px; }
.post-h3-num::before { content: attr(data-n); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; justify-content: center; line-height: 1; }
.post-h3-num-blue::before { background: #3f6fd0; }
.post-summary .ps-hl2 { background: rgba(63, 111, 208, 0.22); }
.post-summary .ps-hl2:first-child { border-radius: 4px 0 0 4px; }
.post-summary .ps-key td { font-weight: 700; }
