/* =============================================================
   thomas-knorr.io — site styles
   v0.2 · Design-system-aligned (knorr. v0.1, April 2026)
   Imports `colors_and_type.css` from the DS as the single source
   of typographic + color tokens. Adds only app-specific layout.
   Invariants enforced:
     • paper #F5F2EC is NOT white
     • ink   #141414 is NOT black
     • accent #C4552D is SINGULAR per surface
     • no shadows, no blur, no gradients, no pills
     • hover: color shift only (no scale, no glow, no bg-tint)
   ============================================================= */
@import url("knorr/colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
}

.mono   { font-family: var(--font-mono); }
.serif  { font-family: var(--font-serif); }
.italic { font-style: italic; }

/* ── Topbar (header) ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 22px;
  border-bottom: 1px solid var(--fog);
  background: var(--paper);
}
.brand {
  display: flex; align-items: baseline; gap: 8px;
  font-size: var(--fs-16);
}
.brand .mono { font-weight: 500; }
.brand .dot { color: var(--graphite); }
.brand .serif { font-style: italic; font-weight: 500; font-size: 17px; }

.back-link {
  display: inline-block;
  text-decoration: none;
  color: var(--graphite);
  margin-right: 4px;
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  transition: color var(--dur-1) var(--ease);
}
.back-link:hover { color: var(--accent); }
.brand-name {
  text-decoration: none;
  color: var(--ink);
  transition: color var(--dur-1) var(--ease);
}
.brand-name:hover { color: var(--accent); }

.topbar .meta {
  display: flex; gap: 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--graphite);
  letter-spacing: 0.05em;
}
.topbar .meta b { color: var(--ink); font-weight: 500; }

/* ── Layout ──────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 53px);
  min-height: 600px;
}

.controls {
  padding: 24px 22px;
  border-right: 1px solid var(--fog);
  overflow-y: auto;
  background: var(--paper);
}
.ctl-block { margin-bottom: 28px; }
.ctl-h {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--graphite);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fog);
}

/* search input — uses kn-input pattern */
#search {
  width: 100%;
  padding: 9px 11px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--fog);
  border-radius: var(--radius-chrome);
  outline: none;
  transition: border-color var(--dur-1) var(--ease);
}
#search:focus { border-color: var(--ink); }

/* filter chips — borders only, no fill */
.chips { display: flex; flex-direction: column; gap: 6px; }
.chip {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--fog);
  border-radius: var(--radius-chrome);
  cursor: pointer;
  user-select: none;
  text-align: left;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="false"] { opacity: 0.42; }
.chip[aria-pressed="false"]:hover { opacity: 0.7; border-color: var(--graphite); }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.chip .label { flex: 1; }
.chip .count { font-family: var(--font-mono); color: var(--graphite); font-size: 11px; }

/* layer toggles */
.layer-toggles { display: flex; flex-direction: column; gap: 4px; }
.layer-toggle {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  cursor: pointer;
  user-select: none;
  color: var(--ink);
  transition: color var(--dur-1) var(--ease);
}
.layer-toggle:hover { color: var(--graphite); }
.layer-toggle input { margin: 0; cursor: pointer; accent-color: var(--ink); }

/* bezirk list — table-style, mono */
.bezirk-list {
  list-style: none; padding: 0; margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
}
.bezirk-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--fog);
  cursor: pointer;
  transition: color var(--dur-1) var(--ease);
}
.bezirk-list li:hover { color: var(--accent); }
.bezirk-list .name { letter-spacing: 0.06em; color: var(--ink); }
.bezirk-list .n,
.bezirk-list .stud { color: var(--graphite); font-variant-numeric: tabular-nums; }
.bezirk-list li.active .name { color: var(--accent); font-weight: 500; }

/* sources footer */
.src {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--fog);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--graphite);
  letter-spacing: 0.04em;
  line-height: 1.65;
}
.src p { margin: 0; }
.src b { color: var(--ink); font-weight: 500; }
.src .mini { font-size: 9.5px; opacity: 0.8; }
.src a {
  color: var(--graphite);
  text-decoration: underline;
  text-decoration-color: var(--fog);
  text-underline-offset: 2px;
  transition: color var(--dur-1) var(--ease), text-decoration-color var(--dur-1) var(--ease);
}
.src a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* ── Mapwrap ─────────────────────────────────────────────────── */
.mapwrap {
  position: relative;
  background: var(--paper);
  overflow: hidden;
}
#map {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}

/* hochschule dot states */
.dot {
  cursor: pointer;
  transition: opacity var(--dur-2) var(--ease);
}
.dot[data-hidden="true"] { opacity: 0.06; pointer-events: none; }
.dot:hover { stroke: var(--ink); stroke-width: 1.4; }
.dot-label[data-hidden="true"] { display: none; }
.leader[data-hidden="true"] { display: none; }

.dot-ring {
  fill: none; stroke: var(--accent); stroke-width: 1.4;
  pointer-events: none;
  display: none;
}
.dot-ring.show { display: block; }

/* ── Detail panel ────────────────────────────────────────────── */
.detail {
  position: absolute;
  top: 22px; right: 22px;
  width: 320px; max-height: calc(100% - 44px);
  background: var(--paper);
  border: 1px solid var(--fog);
  padding: 22px 22px 18px;
  overflow-y: auto;
  z-index: 5;
}
.detail-empty h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-25);
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  color: var(--ink);
}
.detail-empty p {
  margin: 0;
  color: var(--graphite);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.5;
}
.detail-card { position: relative; }
.detail-card .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 6px;
}
.detail-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-20);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 12px;
}
.detail-card .type-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 4px 8px;
  border: 1px solid var(--fog);
  background: transparent;
}
.detail-card .type-row .sw { width: 9px; height: 9px; border-radius: 50%; }
.detail-card .stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 18px;
  border-top: 1px solid var(--fog);
}
.detail-card .stats .cell {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--fog);
}
.detail-card .stats .cell:nth-child(odd) { padding-right: 12px; }
.detail-card .stats .cell:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--fog);
}
.detail-card .stats .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 6px;
}
.detail-card .stats .n {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-25);
  letter-spacing: -0.005em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.detail-card .stats .n .u {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  margin-left: 3px;
  font-weight: 400;
}
.detail-card .stats .n.acc { color: var(--accent); }
.detail-card .stats .d {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--graphite);
  margin-top: 5px;
}

.detail-card .addr-block {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  color: var(--graphite);
  border-top: 1px solid var(--fog);
  padding-top: 14px;
  margin-top: 6px;
}
.detail-card .addr-block .lbl {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 4px;
}
.detail-card .addr-block .val {
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  color: var(--ink);
  font-weight: 500;
}
.detail-card a {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur-1) var(--ease);
}
.detail-card a:hover { color: var(--accent); }

.detail-card .close {
  position: absolute; top: -2px; right: 0;
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--graphite);
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color var(--dur-1) var(--ease);
}
.detail-card .close:hover { color: var(--accent); }
@media (max-width: 900px) {
  .detail-card .close { display: none; }   /* grab-handle replaces the X */
}

/* ── Tooltip (cursor-following) ───────────────────────────────── */
.tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 8;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: var(--radius-chrome);
  white-space: nowrap;
}
.tooltip[hidden] { display: none; }
.tooltip .name { color: var(--paper); font-weight: 500; }
.tooltip .stud { color: var(--paper); margin-left: 8px; opacity: 0.7; }

/* ── Loading ─────────────────────────────────────────────────── */
.loading {
  position: fixed; inset: 0;
  background: var(--paper);
  display: grid; place-items: center;
  z-index: 100;
  transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.loading[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-inner {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}
.loading-inner p { margin: 14px 0 0; }
.loading-spinner {
  width: 32px; height: 32px;
  border: 1px solid var(--fog);
  border-top-color: var(--ink);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Share button + popover ──────────────────────────────────── */
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 4px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-chrome);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.share-btn:hover { background: var(--graphite); border-color: var(--graphite); }
.share-btn .ar { font-size: 13px; line-height: 1; }
.share-popover {
  position: absolute;
  top: 50px; right: 22px;
  z-index: 60;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px;
  width: 240px;
  font-family: var(--font-sans);
}
.share-popover[hidden] { display: none; }
.share-popover h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0 0 10px;
  font-weight: 500;
}
.share-popover .row {
  display: flex; flex-direction: column; gap: 6px;
}
.share-popover button,
.share-popover a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  font-weight: 500;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--fog);
  border-radius: var(--radius-chrome);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.share-popover button:hover,
.share-popover a:hover {
  border-color: var(--ink);
  color: var(--accent);
}
.share-popover .ok { color: var(--accent); }

/* ── Profile (front) page ─────────────────────────────────────── */
.profile-body { background: var(--paper); }
.profile-topbar {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 32px;
  border-bottom: 1px solid var(--fog);
  background: var(--paper);
}
.profile-topbar .brand {
  display: flex; align-items: baseline; gap: 8px;
}
.profile-topbar .brand-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-16);
  color: var(--ink);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}
.profile-topbar .brand-name:hover { color: var(--accent); }

.lang-switch {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.lang-switch a {
  color: var(--graphite);
  text-decoration: none;
  padding: 0 1px;
  transition: color var(--dur-1) var(--ease);
}
.lang-switch a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.lang-switch a:hover { color: var(--accent); }
.lang-switch .sep { color: var(--fog); }

.profile {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 96px;
}
.profile-hero { margin-bottom: 48px; }
.profile-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 24px;
}
.profile-hero h1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 60px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 12px;
  color: var(--ink);
}
.profile-role {
  font-family: var(--font-sans);
  font-size: var(--fs-20);
  letter-spacing: -0.01em;
  color: var(--graphite);
  margin: 0;
}
.profile-role a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur-1) var(--ease);
}
.profile-role a:hover { color: var(--accent); }

/* Bio prose (single accent — already used on the role line) */
.profile-bio.prose {
  margin: 0 0 64px;
  border-top: 1px solid var(--fog);
  padding-top: 28px;
  font-size: 18px;
  max-width: var(--measure);
}
.profile-bio.prose p { margin: 0 0 1.2em; }
.profile-bio.prose p:last-child { margin-bottom: 0; }
.profile-bio.prose b { font-weight: 500; }

.profile-section { margin: 0 0 48px; }
.section-h-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--fog);
}

/* Link list — anchored rows with underline-color shift on hover */
.link-list {
  list-style: none; padding: 0; margin: 0;
}
.link-list li { border-bottom: 1px solid var(--fog); }
.link-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
  transition: color var(--dur-1) var(--ease);
  gap: 16px;
}
.link-row:hover { color: var(--accent); }
.link-row .link-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-16);
  letter-spacing: -0.005em;
}
.link-row .link-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--graphite);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease);
}
.link-row:hover .link-meta { color: var(--accent); }

/* Project list — bigger row blocks */
.project-list {
  list-style: none; padding: 0; margin: 0;
}
.project-list li { border-bottom: 1px solid var(--fog); }
.project-list li:first-child { border-top: 1px solid var(--fog); }
.project-row {
  display: block;
  padding: 22px 0 24px;
  text-decoration: none;
  color: var(--ink);
  transition: color var(--dur-1) var(--ease);
}
.project-row:hover { color: var(--accent); }
.project-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--graphite);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 500;
}
.project-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-25);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 8px;
  transition: color var(--dur-1) var(--ease);
}
.project-row:hover .project-name { color: var(--accent); }
.project-desc {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--graphite);
  max-width: 56ch;
  margin: 0 0 10px;
}
.project-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.06em;
}

.profile-foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--fog);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  display: flex; justify-content: space-between; align-items: baseline;
}
.profile-foot p { margin: 0; }
.profile-foot a {
  color: var(--graphite);
  text-decoration: underline;
  text-decoration-color: var(--fog);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.profile-foot a:hover { color: var(--ink); text-decoration-color: var(--accent); }

@media (max-width: 600px) {
  .profile-topbar { padding: 16px 20px; }
  .profile { padding: 48px 20px 64px; }
  .profile-hero { margin-bottom: 32px; }
  .profile-foot { flex-direction: column; gap: 6px; }
  .link-row { flex-direction: column; gap: 4px; align-items: flex-start; }
  .link-row .link-meta { white-space: normal; }
}

/* ── Landing page (Bundesländer overview) ─────────────────────── */
.landing-body { background: var(--paper); }
.landing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}
.landing-hero {
  margin-bottom: 64px;
  border-bottom: 1px solid var(--fog);
  padding-bottom: 64px;
}
.landing-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 18px;
}
.landing-hero h1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 64px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 22px;
  color: var(--ink);
  max-width: 16ch;
}
.landing-hero .lead {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 60ch;
  margin: 0 0 36px;
}
.landing-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* CTA — design-system .btn pattern: ink fill, accent on hover via underline */
.cta {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 22px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius-chrome);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.cta:hover { background: var(--graphite); border-color: var(--graphite); }
.cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--paper);
  opacity: 0.6;
}
.cta-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-20);
  letter-spacing: -0.015em;
}
.cta-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper);
  opacity: 0.7;
}

.section-h {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.section-sub {
  color: var(--graphite);
  font-family: var(--font-serif);
  font-size: var(--fs-14);
  margin: 0 0 24px;
  max-width: 60ch;
}

/* Bundesländer grid — paper rectangles separated by 1px fog rules */
.laender-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--fog);
  border: 1px solid var(--fog);
}
.land-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 16px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  /* Hover follows DS rule — color shift only, no bg-tint, no scale */
  transition: color var(--dur-1) var(--ease);
}
.land-card.ready { cursor: pointer; }
/* Hover: text shifts toward accent + bar fills accent. No bg change. */
.land-card.ready:hover .land-name,
.land-card.ready:hover .land-status { color: var(--accent); }
.land-card.ready:hover .land-bar span { background: var(--accent); }
.land-card.soon { opacity: 0.55; }
.land-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--graphite);
  font-weight: 500;
}
.land-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  margin: 0;
  transition: color var(--dur-1) var(--ease);
}
.land-bar {
  position: relative;
  height: 3px;
  background: var(--fog);
  overflow: hidden;
  margin: 4px 0 6px;
}
.land-bar span {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: var(--ink);
  transition: background var(--dur-1) var(--ease);
}
.land-stat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.02em;
}
.land-stat b {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.land-anf { color: var(--graphite); }
.land-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-top: 4px;
  transition: color var(--dur-1) var(--ease);
}
.land-card.ready .land-status { color: var(--ink); font-weight: 500; }

/* Landing footer */
.landing-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--fog);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--graphite);
}
.foot-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--graphite);
  margin: 0 0 10px;
  font-weight: 500;
}
.landing-foot p { margin: 0 0 4px; line-height: 1.55; }
.landing-foot b { color: var(--ink); font-weight: 500; }
.landing-foot a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--fog);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-1) var(--ease);
}
.landing-foot a:hover { text-decoration-color: var(--accent); }

@media (max-width: 600px) {
  .landing { padding: 32px 18px 64px; }
  .landing-hero { margin-bottom: 36px; padding-bottom: 32px; }
  .landing-foot { grid-template-columns: 1fr; gap: 18px; }
  .laender-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile (Hamburg-map page) ───────────────────────────────── */
@media (max-width: 900px) {
  .topbar { padding: 11px 14px; flex-wrap: wrap; gap: 8px; }
  .topbar .meta { font-size: 11px; gap: 10px; flex: 1 1 auto; flex-wrap: wrap; }
  .topbar .meta span { white-space: nowrap; }
  .share-btn { padding: 5px 9px; font-size: 10px; }

  /* On mobile: map FIRST, controls AFTER (reverse the natural source order). */
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: auto;
    min-height: 0;
  }
  .controls {
    grid-row: 2;
    border-right: 0;
    border-top: 1px solid var(--fog);
    padding: 20px 18px 28px;
    max-height: none;
    overflow-y: visible;
  }
  .mapwrap {
    grid-row: 1;
    height: calc(100svh - 56px);  /* viewport minus topbar */
    min-height: 460px;
    border-bottom: 1px solid var(--fog);
  }

  /* Filter chips become horizontal-scrolling row */
  .chips {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-right: -18px;
    padding-right: 18px;
  }
  .chips .chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Layer toggles in 2-col grid on mobile */
  .layer-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
  }

  /* Bezirk list stays as-is — already compact */
  .bezirk-list { font-size: 12px; }
  .bezirk-list li { padding: 8px 0; }

  /* DETAIL becomes a bottom-sheet on mobile */
  .detail {
    position: fixed;
    top: auto; right: 0; left: 0; bottom: 0;
    width: 100%;
    max-height: 70vh;
    padding: 22px 22px 28px;
    border: 0;
    border-top: 1px solid var(--ink);
    transform: translateY(100%);
    transition: transform 220ms var(--ease);
    z-index: 50;
  }
  .detail.has-content { transform: translateY(0); }

  /* Backdrop behind bottom-sheet */
  .detail-backdrop {
    position: fixed; inset: 0;
    background: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease);
    z-index: 49;
  }
  .detail-backdrop.show {
    opacity: 0.35;
    pointer-events: auto;
  }

  /* A grab-handle affordance on the sheet */
  .detail::before {
    content: "";
    display: block;
    width: 36px; height: 3px;
    background: var(--fog);
    border-radius: 2px;
    margin: 0 auto 14px;
  }

  /* Detail-empty hidden on mobile (would float over map weirdly) */
  .detail-empty { display: none; }

  /* Tooltip larger / clearer on touch */
  .tooltip { font-size: 12px; padding: 7px 10px; }

  /* Bigger search input on iOS */
  #search { padding: 11px 12px; font-size: 16px; }
  /* Bigger chip tap targets */
  .chip { padding: 8px 12px; font-size: 13px; }
  .layer-toggle { padding: 7px 4px; font-size: 12px; }
  .layer-toggle input { width: 16px; height: 16px; }

  /* Touch-target hit areas for dots: an invisible larger circle */
  .dot-hit { fill: transparent; cursor: pointer; }
}

/* ── /ai-readiness · video + prose ─────────────────────────────── */
.ai-article { max-width: 760px; }

.ai-video-figure {
  margin: 0 0 64px;
}
.ai-video-figure video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink);
  border: 1px solid var(--ink);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.ai-video-figure figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.06em;
  display: flex; gap: 8px; align-items: baseline;
}
.ai-video-figure figcaption a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.ai-video-figure figcaption a:hover { color: var(--accent); }

/* AI-prose section uses serif body with knorr's prose typography */
.ai-prose.prose {
  max-width: var(--measure);
}
.ai-prose.prose p {
  margin: 0 0 1em;
  font-size: 19px;
  line-height: 1.65;
}
.ai-prose.prose .ai-h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 36px 0 12px;
  color: var(--ink);
}
.ai-prose.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--fog);
  padding: 1px 5px;
  border-radius: 2px;
}
.ai-prose.prose hr {
  border: 0;
  border-top: 1px solid var(--fog);
  margin: 48px 0;
}
.ai-prose.prose i { color: var(--ink); font-style: italic; }
.ai-prose.prose b { font-weight: 500; }

.ai-quickwins {
  list-style: none; padding: 0; margin: 24px 0 0;
  border-top: 1px solid var(--ink);
}
.ai-quickwins li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--fog);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--graphite);
}
.ai-quickwins .qn {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--graphite);
  letter-spacing: 0.06em;
  padding-top: 4px;
}
.ai-quickwins b { color: var(--ink); font-weight: 500; }
.ai-quickwins a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.ai-quickwins a:hover { color: var(--accent); }
.ai-quickwins code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--fog);
  padding: 1px 5px;
  border-radius: 2px;
}

@media (max-width: 700px) {
  .ai-prose.prose p { font-size: 17px; }
  .ai-prose.prose .ai-h3 { font-size: 22px; }
  .ai-quickwins li { grid-template-columns: 36px 1fr; gap: 12px; padding: 16px 0; }
}

/* ── MapLibre integration ───────────────────────────────────── */
#map {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  cursor: grab;
}
#map:active { cursor: grabbing; }
.maplibregl-canvas { cursor: inherit !important; }

/* Hide MapLibre default attribution; show our own corner */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-logo { display: none !important; }

/* Re-style MapLibre controls to match knorr palette */
.maplibregl-ctrl-group {
  background: var(--paper) !important;
  border: 1px solid var(--fog) !important;
  box-shadow: none !important;
  border-radius: var(--radius-chrome) !important;
}
.maplibregl-ctrl-group button {
  background-color: transparent !important;
  width: 32px; height: 32px;
}
.maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--fog) !important;
}
.maplibregl-ctrl-group button:hover {
  background-color: rgba(20, 20, 20, 0.04) !important;
}
.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: grayscale(1) brightness(0.4);
}
.maplibregl-ctrl-scale {
  background: rgba(245, 242, 236, 0.9) !important;
  border: 1px solid var(--ink) !important;
  border-top: none !important;
  color: var(--ink) !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
  border-radius: 0 !important;
}

/* Custom corner attribution */
.map-attribution {
  position: absolute;
  bottom: 8px; right: 12px;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--graphite);
  letter-spacing: 0.04em;
  background: rgba(245, 242, 236, 0.78);
  padding: 4px 8px;
  pointer-events: auto;
}
.map-attribution a {
  color: var(--graphite);
  text-decoration: underline;
  text-decoration-color: var(--fog);
  text-underline-offset: 2px;
}
.map-attribution a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* View buttons */
.view-buttons {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.view-btn {
  flex: 1; min-width: 80px;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--fog);
  border-radius: var(--radius-chrome);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.view-btn:hover { border-color: var(--ink); }
.view-btn:active { color: var(--accent); border-color: var(--accent); }

@media (max-width: 900px) {
  .map-attribution { font-size: 9px; bottom: 6px; right: 8px; padding: 3px 6px; }
  .maplibregl-ctrl-top-right { top: 8px !important; right: 8px !important; }
  .maplibregl-ctrl-bottom-left { bottom: 8px !important; left: 8px !important; }
}

/* ── Mobile-first map (≤900px): full-bleed map, sheet-based controls ── */
.ctl-toggle {
  display: none;
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 0;
  border-radius: var(--radius-chrome);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.ctl-toggle:hover { background: var(--graphite); }
.ctl-toggle .ctl-toggle-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; padding: 2px 6px;
  background: var(--accent);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.ctl-toggle .ctl-toggle-count b { font-weight: 500; }

.ctl-sheet-close {
  display: none;
  position: sticky;
  top: 0;
  margin-left: auto;
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--graphite);
  padding: 8px 10px;
  cursor: pointer;
  z-index: 5;
}
.ctl-sheet-close:hover { color: var(--accent); }

@media (max-width: 900px) {
  /* Topbar: tighter, no flex-wrap pile-up */
  .topbar {
    padding: 10px 12px;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }
  .topbar .brand { gap: 6px; flex: 0 0 auto; min-width: 0; }
  .topbar .brand .serif { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topbar .brand .dot { display: none; }
  .topbar .meta {
    flex: 1 1 auto;
    justify-content: flex-end;
    font-size: 10.5px;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .topbar .meta span:nth-child(2) { display: none; }   /* hide "X sichtbar" — covered by FAB */
  .topbar .meta span:nth-child(3) { display: none; }   /* hide "121.178 Studierende" — appears in sheet */

  /* Layout: map fills the rest of viewport. Sidebar hides off-screen. */
  .layout {
    display: block;
    height: auto;
    min-height: 0;
  }
  .mapwrap {
    position: fixed;
    inset: 49px 0 0 0;
    z-index: 1;
    height: auto !important;
    border-bottom: 0;
  }

  /* Sidebar becomes a sliding bottom-sheet ~88vh tall */
  .controls {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    z-index: 60;
    height: 78vh;
    max-height: 78svh;
    border-right: 0;
    border-top: 1px solid var(--ink);
    padding: 14px 18px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    transition: transform 240ms var(--ease);
    background: var(--paper);
    box-shadow: none;
  }
  .controls.open { transform: translateY(0); }
  .controls::before {
    content: "";
    display: block;
    width: 36px; height: 3px;
    background: var(--fog);
    border-radius: 2px;
    margin: 0 auto 10px;
  }
  .ctl-sheet-close { display: block; }

  /* Show the FAB */
  .ctl-toggle { display: inline-flex; }

  /* When sheet is open, hide the FAB to declutter */
  .controls.open ~ .ctl-toggle,
  body:has(.controls.open) .ctl-toggle { display: none; }

  /* Larger tap targets inside the sheet */
  #search { padding: 12px 12px; font-size: 16px; }
  .chip { padding: 9px 12px; font-size: 13px; }
  .layer-toggle { padding: 8px 4px; font-size: 13px; }
  .layer-toggle input { width: 18px; height: 18px; }
  .bezirk-list li { padding: 10px 0; font-size: 12px; }
  .view-btn { padding: 11px 12px; font-size: 12px; min-width: 96px; }

  /* Filter chips: horizontal scroll row in the sheet */
  .chips {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
    margin-right: -18px;
    padding-right: 18px;
  }
  .chips .chip { flex: 0 0 auto; white-space: nowrap; }

  /* Layer toggles: 2-col grid */
  .layer-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }

  /* Detail panel: bottom-sheet layered above map but BELOW the controls sheet */
  .detail {
    position: fixed;
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 78vh;
    max-height: 78svh;
    padding: 22px 22px 28px;
    border: 0;
    border-top: 1px solid var(--ink);
    transform: translateY(100%);
    transition: transform 240ms var(--ease);
    z-index: 70;
    background: var(--paper);
  }
  .detail.has-content { transform: translateY(0); }
  .detail::before {
    content: "";
    display: block;
    width: 36px; height: 3px;
    background: var(--fog);
    border-radius: 2px;
    margin: 0 auto 14px;
  }
  .detail-empty { display: none; }
  .detail-card .close { display: none; }   /* swipe handle replaces */

  .detail-backdrop {
    position: fixed; inset: 0;
    background: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease);
    z-index: 65;
  }
  .detail-backdrop.show {
    opacity: 0.32;
    pointer-events: auto;
  }

  /* MapLibre controls: smaller + position-aware of the FAB */
  .maplibregl-ctrl-top-right { top: 14px !important; right: 12px !important; }
  .maplibregl-ctrl-group { transform: scale(0.95); transform-origin: top right; }
  .maplibregl-ctrl-bottom-left { bottom: 76px !important; left: 12px !important; }
  .map-attribution { bottom: 80px; right: 12px; }

  /* Tooltip ↦ slightly bigger touch tap-friendly */
  .tooltip { font-size: 12px; padding: 7px 10px; }

  /* Loading spinner above everything */
  .loading { z-index: 200; }
}

@media (max-width: 480px) {
  .topbar .meta { font-size: 10px; gap: 6px; }
  .topbar .meta span:first-child { font-size: 10px; }
  .share-btn { padding: 4px 8px; font-size: 9.5px; }
  .ctl-toggle { padding: 10px 14px; font-size: 11px; }
  .controls { padding: 12px 14px 24px; }
}

/* ── Audit fixes (precision pass) ──────────────────────────────── */

/* Topbar height as a CSS variable — single source of truth.
   Updated at runtime where MapLibre depends on exact pixels. */
:root {
  --topbar-h-desktop: 53px;
  --topbar-h-mobile: 47px;
  --topbar-h: var(--topbar-h-desktop);
}
@media (max-width: 900px) {
  :root { --topbar-h: var(--topbar-h-mobile); }
}

/* .dot-live — small accent indicator next to "Im Moment:" / status lines */
.dot-live {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  margin-bottom: 1px;
  animation: dot-live-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.profile-now {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--graphite);
  letter-spacing: 0.04em;
  margin: 14px 0 0;
}

/* .reveal / .revealed — page-load staggered fade-up.
   Honors prefers-reduced-motion automatically (CSS prefers-reduced-motion media). */
.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* .article-body — neutral body for /abitur, /ai-readiness, /impressum, /hamburg */
.article-body { background: var(--paper); }

/* .article-meta — small mono header text in the topbar of article pages */
.article-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--graphite);
  letter-spacing: 0.06em;
}

/* Refine the project-arrow indicator on landing project cards (used in index/en) */
.project-arrow {
  display: inline-block;
  margin-left: 8px;
  color: var(--graphite);
  font-weight: 400;
  transition: color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.project-row:hover .project-arrow { color: var(--accent); }
.link-arrow {
  display: inline-block;
  margin-left: 4px;
  color: var(--graphite);
  transition: color var(--dur-1) var(--ease);
}
.link-row:hover .link-arrow { color: var(--accent); }
.link-meta-text {
  display: inline-block;
}

/* Hamburg mapwrap on mobile: use the real topbar height variable */
@media (max-width: 900px) {
  .mapwrap {
    inset: var(--topbar-h-mobile) 0 0 0 !important;
  }
}

/* Profile-foot link styling parity with .src */
.profile-foot a {
  color: var(--graphite);
  text-decoration: underline;
  text-decoration-color: var(--fog);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.profile-foot a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* Defensive: prevent horizontal scroll on any narrow viewport */
html, body { overflow-x: hidden; }

/* Forms: prevent iOS zoom on focused input by ensuring 16px+ font-size everywhere */
input, button, select, textarea { font-family: inherit; }

/* Improve focus visibility per DS rule (ink border replaces fog) */
:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}
.dot:focus-visible {
  outline: none;
  stroke: var(--accent);
  stroke-width: 2;
}
