/* ==========================================================================
   Content Cockpit — Paper Editorial
   Look der Personal-Site: Creme-Papier, Fast-Schwarz-Ink, Lime-Akzent, Geist.
   Kanten scharf (radius 0–2px), Karten weiß, Kicker mit Lime-Punkt.
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f1efe9;
  --paper-2: #e9e6dd;
  --card: #fcfbf7;
  --ink: #0a0b0e;
  --ink-dim: rgba(10, 11, 14, 0.62);
  --ink-faint: rgba(10, 11, 14, 0.42);
  --ink-line: rgba(10, 11, 14, 0.14);
  --ink-line-soft: rgba(10, 11, 14, 0.08);
  --paper-dim: rgba(241, 239, 233, 0.66);
  --paper-line: rgba(241, 239, 233, 0.16);
  --lime: #b6ff39;
  --lime-deep: #4f7d00;
  --lime-soft: rgba(182, 255, 57, 0.28);

  /* Kanäle (validierte Chart-Palette) */
  --ch-linkedin: #2458c9;
  --ch-x: #a86a08;
  --ch-threads: #5b48e0;
  --ch-newsletter: #4f7d00;

  /* Topics (Site-Farbcode; llms = Chart-Stufe des Teals) */
  --t-tips: #4f7d00;
  --t-agentic: #5b48e0;
  --t-llms: #0a9486;
  --t-pm: #2458c9;
  --t-industry: #a86a08;

  --ok: #3e7a2f;
  --warn: #a8322c;

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --shadow: 0 1px 2px rgba(10, 11, 14, 0.05), 0 10px 32px -18px rgba(10, 11, 14, 0.22);
  --sheet-shadow: 0 -6px 40px -12px rgba(10, 11, 14, 0.35);
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--ink); }
a { color: inherit; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 3.5vw, 40px); }

/* ---------- Typo ---------- */

.kicker {
  font-size: 11px; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim); display: inline-flex; align-items: center; gap: 9px;
}
.kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); flex: 0 0 auto; }
.kicker--plain::before { display: none; }

h1.display { font-weight: 700; font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.035em; line-height: 1.02; }
.h-section { font-weight: 700; font-size: clamp(19px, 2.4vw, 24px); letter-spacing: -0.025em; }
.sub { color: var(--ink-dim); font-size: 14.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.accent-mark { background: var(--lime); color: var(--ink); padding: 0 0.14em 0.05em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- Topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 90;
  background: var(--ink); color: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar .bar { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); padding: 0 clamp(16px, 3.5vw, 40px); max-width: 1180px; margin: 0 auto; height: 58px; }
.brand { font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; white-space: nowrap; display: flex; align-items: baseline; gap: 7px; }
.brand .dot { color: var(--lime); }
.brand small { font-weight: 500; font-size: 12px; color: var(--paper-dim); letter-spacing: 0.02em; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; font-size: 13.5px; font-weight: 550; color: var(--paper-dim);
  padding: 7px 13px; border-radius: 100px; white-space: nowrap; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--paper); }
.nav a.on { background: var(--lime); color: var(--ink); font-weight: 650; }
.topdate { color: var(--paper-dim); font-size: 12.5px; white-space: nowrap; }
.sysbtn {
  all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--paper-dim); border: 1px solid var(--paper-line); font-size: 15px;
}
.sysbtn:hover { color: var(--lime); border-color: var(--lime); }

/* Test-Banner */
.testbanner {
  background: var(--lime); color: var(--ink); font-size: 12.5px; font-weight: 600;
  text-align: center; padding: 5px 14px;
}
.testbanner button { all: unset; cursor: pointer; text-decoration: underline; font-weight: 700; margin-left: 8px; }

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

main { padding: clamp(20px, 3.5vw, 36px) 0 110px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(18px, 3vw, 28px); }
.pagehead .lead { max-width: 640px; }
.pagehead h1 { margin-top: 10px; }
.pagehead .sub { margin-top: 6px; }

.card {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 2px;
  box-shadow: var(--shadow);
}
.card--pad { padding: clamp(16px, 2.6vw, 24px); }
.cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.cardhead .h-section { display: flex; align-items: baseline; gap: 10px; }
.cardhead .note { color: var(--ink-faint); font-size: 12.5px; }

.grid { display: grid; gap: 14px; }
.grid--kpi { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); }

/* KPI-Kachel */
.kpi { padding: 16px 18px 14px; }
.kpi .lbl { font-size: 11px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.kpi .val { font-size: clamp(24px, 3vw, 31px); font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12.5px; margin-top: 7px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.kpi .delta b { color: var(--lime-deep); font-weight: 650; }
.kpi .delta b.neg { color: var(--warn); }
.kpi .spark { margin-top: 10px; }

/* ---------- Buttons, Segmente, Chips ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; font-weight: 650; letter-spacing: 0.005em;
  padding: 9px 16px; border: 1.5px solid transparent; cursor: pointer; border-radius: 2px;
  transition: transform .2s cubic-bezier(.22,1,.36,1), background .2s, color .2s, border-color .2s;
  text-decoration: none; background: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #c5ff5c; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #22242b; }
.btn--ghost { border-color: var(--ink-line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { border-color: rgba(168,50,44,.35); color: var(--warn); }
.btn--danger:hover { border-color: var(--warn); }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.seg { display: inline-flex; border: 1px solid var(--ink-line); border-radius: 100px; padding: 3px; gap: 2px; background: var(--card); }
.seg button {
  all: unset; cursor: pointer; padding: 5px 13px; border-radius: 100px; font-size: 12.5px;
  color: var(--ink-dim); font-weight: 550; transition: .15s; white-space: nowrap;
}
.seg button.on { background: var(--ink); color: var(--paper); font-weight: 650; }
.seg button:hover:not(.on) { color: var(--ink); }

.chip {
  all: unset; cursor: pointer; font-size: 12px; font-weight: 550; padding: 5px 12px;
  border-radius: 100px; border: 1px solid var(--ink-line); color: var(--ink-dim); transition: .15s;
  white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.chip.on { color: var(--ink); border-color: var(--ink); background: var(--lime-soft); font-weight: 650; }

.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.controls .search { margin-left: auto; }
.controls .search input {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 100px;
  color: var(--ink); font: inherit; font-size: 13px; padding: 7px 15px; width: 180px; outline: none;
}
.controls .search input:focus { border-color: var(--ink); }

/* Badges */
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px; display: inline-flex; align-items: center; gap: 5px;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-linkedin { color: var(--ch-linkedin); background: rgba(36, 88, 201, 0.1); }
.b-x { color: #8a5706; background: rgba(168, 106, 8, 0.12); }
.b-threads { color: var(--ch-threads); background: rgba(91, 72, 224, 0.1); }
.b-tips { color: var(--t-tips); background: rgba(79, 125, 0, 0.1); }
.b-agentic-ai { color: var(--t-agentic); background: rgba(91, 72, 224, 0.1); }
.b-llms { color: #0b7d74; background: rgba(10, 148, 134, 0.1); }
.b-product-management { color: var(--t-pm); background: rgba(36, 88, 201, 0.1); }
.b-ai-industry { color: var(--t-industry); background: rgba(168, 106, 8, 0.12); }
.b-veeform { color: #fff; background: linear-gradient(120deg, #7c6af5, #0fb5a6); }
.b-authority { color: var(--ink-dim); border: 1px solid var(--ink-line); background: transparent; }
.b-new { color: var(--ch-threads); background: rgba(91, 72, 224, 0.1); }
.b-posted { color: var(--ok); background: rgba(62, 122, 47, 0.12); }
.b-discarded { color: var(--ink-faint); background: rgba(10, 11, 14, 0.06); }
.b-pick { color: var(--ink); background: var(--lime); }
.b-test { color: var(--ink); background: var(--lime); font-weight: 800; }
.b-slot { color: var(--ink-dim); border: 1px dashed var(--ink-faint); background: transparent; }

/* ---------- Post-Karten (Redaktion) ---------- */

.postcard { margin-bottom: 12px; transition: border-color .2s; }
.postcard:hover { border-color: var(--ink-faint); }
.postcard.discarded { opacity: 0.55; }
.postcard .inner { padding: 18px 20px; }
.badges { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.badges .bdate { color: var(--ink-faint); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; }
.postcard h2 {
  font-size: 17.5px; font-weight: 700; letter-spacing: -0.02em; cursor: pointer;
  display: flex; align-items: baseline; gap: 9px; line-height: 1.3;
}
.postcard h2:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2.5px; }
.postcard h2 .chev { font-size: 11px; color: var(--ink-faint); transition: transform .2s; flex-shrink: 0; }
.postcard.open h2 .chev { transform: rotate(90deg); }
.postcard .hook { color: var(--ink-dim); font-style: italic; margin-top: 6px; font-size: 14px; }
.postcard .why { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); display: flex; gap: 7px; align-items: baseline; }
.postcard .why::before { content: '◆'; font-size: 8px; color: var(--lime-deep); flex-shrink: 0; }
.postcard .head { cursor: pointer; }
.srcrow { margin-top: 10px; }
.srcrow a {
  color: var(--lime-deep); text-decoration: none; font-size: 12px; font-weight: 550;
  border: 1px solid rgba(79, 125, 0, 0.3); padding: 3px 10px; border-radius: 100px; transition: .15s;
}
.srcrow a:hover { background: rgba(182, 255, 57, 0.18); }

.postcard .mstats { display: flex; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-dim); font-variant-numeric: tabular-nums; flex-wrap: wrap; align-items: center; }
.postcard .mstats b { font-weight: 700; color: var(--ink); }

.postbody { display: none; margin-top: 16px; border-top: 1px solid var(--ink-line-soft); padding-top: 16px; }
.postcard.open .postbody { display: block; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button {
  all: unset; cursor: pointer; font-size: 12px; font-weight: 650; padding: 5px 14px;
  border-radius: 100px; color: var(--ink-dim); border: 1px solid var(--ink-line);
}
.tabs button.on { color: var(--ink); background: var(--lime-soft); border-color: var(--ink); }
.gfxrow { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.gfx { width: 210px; border: 1px solid var(--ink-line); cursor: zoom-in; display: block; transition: border-color .15s; border-radius: 2px; }
.gfx:hover { border-color: var(--ink); }
.gfxmeta { color: var(--ink-faint); font-size: 12px; line-height: 1.6; }
.posttext {
  background: var(--paper); border: 1px solid var(--ink-line-soft); border-radius: 2px;
  padding: 16px 18px; white-space: pre-wrap; font-size: 14px; line-height: 1.65;
}
.charcount { color: var(--ink-faint); font-size: 12px; margin-top: 7px; text-align: right; font-variant-numeric: tabular-nums; }
.charcount.over, .tparthead .over { color: var(--warn); font-weight: 650; }
.tpartwrap { margin-bottom: 12px; }
.tparthead { display: flex; align-items: center; justify-content: space-between; color: var(--ink-faint); font-size: 11.5px; margin: 0 2px 5px; }
.tparthead .right { display: flex; align-items: center; gap: 12px; }
.tcopy { all: unset; cursor: pointer; color: var(--ink-dim); font-size: 11.5px; font-weight: 650; transition: .15s; }
.tcopy:hover { color: var(--lime-deep); }
.actions { display: flex; gap: 9px; margin-top: 15px; flex-wrap: wrap; }

/* ---------- Kalender ---------- */

.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-title { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; min-width: 170px; }
.cal-navbtns { display: inline-flex; gap: 4px; }
.cal-navbtns .btn { padding: 6px 11px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--ink-line); border-top: 1px solid var(--ink-line); background: var(--card); box-shadow: var(--shadow); border-radius: 2px; overflow: hidden; }
.cal-dow { padding: 8px 10px; font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); border-right: 1px solid var(--ink-line); border-bottom: 1px solid var(--ink-line); background: var(--paper); }
.cal-cell {
  min-height: 108px; padding: 7px 8px; border-right: 1px solid var(--ink-line-soft);
  border-bottom: 1px solid var(--ink-line-soft); position: relative; background: var(--card);
}
.cal-cell.dim { background: var(--paper); }
.cal-cell.today { background: rgba(182, 255, 57, 0.12); box-shadow: inset 0 2px 0 var(--lime); }
.cal-cell .dnum { font-size: 12px; font-weight: 650; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.cal-cell.today .dnum { color: var(--ink); font-weight: 800; }
.cal-cell.dim .dnum { color: var(--ink-faint); }
.cal-entry {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  border: 0; background: none; cursor: pointer; padding: 3px 5px; margin-top: 3px;
  font-size: 11.8px; font-weight: 550; color: var(--ink); border-radius: 2px; line-height: 1.25;
}
.cal-entry:hover { background: var(--paper-2); }
.cal-entry .cdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-entry .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cal-entry.slot { color: var(--ink-dim); font-style: italic; }
.cal-entry.slot .cdot { background: transparent; border: 1.5px dashed var(--ink-faint); }
.cal-entry .st { margin-left: auto; font-size: 10px; flex-shrink: 0; }
.cal-entry.posted .lbl { color: var(--ink-dim); }
.cal-more { font-size: 11px; color: var(--ink-faint); padding: 2px 5px; }

/* Wochen-Liste (mobil + Wochenansicht) */
.week-list .day { margin-bottom: 16px; }
.week-list .dhead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.week-list .dhead .dname { font-weight: 700; font-size: 14.5px; }
.week-list .dhead.today .dname { background: var(--lime); padding: 0 7px 2px; }
.week-list .dhead .dnum { color: var(--ink-faint); font-size: 12.5px; }
.week-row {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 2px;
  padding: 11px 14px; margin-bottom: 6px; cursor: pointer; font: inherit;
}
.week-row:hover { border-color: var(--ink-faint); }
.week-row .cdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.week-row.slot { border-style: dashed; background: transparent; }
.week-row .wtitle { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-row.slot .wtitle { font-weight: 500; font-style: italic; color: var(--ink-dim); white-space: normal; }
.week-row .wmeta { color: var(--ink-faint); font-size: 11.5px; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ---------- Pipeline-Board ---------- */

.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.board-col { background: var(--paper-2); border: 1px solid var(--ink-line-soft); border-radius: 2px; padding: 10px; min-height: 220px; }
.board-col.dragover { outline: 2px dashed var(--lime-deep); outline-offset: -4px; }
.board-col > .colhead { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px 10px; }
.board-col > .colhead .cname { font-size: 12px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.board-col > .colhead .ccount { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.board-card {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 2px;
  padding: 11px 12px; margin-bottom: 8px; cursor: grab; transition: border-color .15s, box-shadow .15s;
}
.board-card:hover { border-color: var(--ink-faint); box-shadow: var(--shadow); }
.board-card.dragging { opacity: 0.45; }
.board-card .btitle { font-size: 13.5px; font-weight: 650; line-height: 1.3; cursor: pointer; }
.board-card .btitle:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; }
.board-card .bmeta { display: flex; align-items: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.board-card .bmeta .bdate { font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.board-card.slotcard { border-style: dashed; background: transparent; cursor: default; }
.board-card.slotcard .btitle { cursor: default; font-weight: 550; font-style: italic; color: var(--ink-dim); }
.board-card.slotcard .btitle:hover { text-decoration: none; }
.board-quick { display: flex; gap: 5px; margin-top: 9px; }
.board-quick button { all: unset; cursor: pointer; font-size: 11px; font-weight: 650; color: var(--ink-dim); border: 1px solid var(--ink-line); padding: 3px 9px; border-radius: 100px; }
.board-quick button:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Analytics ---------- */

.chart-tip {
  position: fixed; z-index: 200; pointer-events: none; background: var(--ink); color: var(--paper);
  font-size: 12px; line-height: 1.5; padding: 8px 11px; border-radius: 3px; max-width: 300px;
  box-shadow: 0 6px 24px -6px rgba(10,11,14,.4); display: none;
}
.chart-tip .tiphead { font-weight: 700; margin-bottom: 2px; }
.chart-tip .tiprow { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.chart-tip .tiprow .tdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.chart-tip .muted { color: var(--paper-dim); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-dim); }
.legend .li { display: inline-flex; align-items: center; gap: 6px; }
.legend .li .ldot { width: 8px; height: 8px; border-radius: 50%; }

.hbar-row { display: grid; grid-template-columns: minmax(110px, 170px) 1fr auto; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 13px; }
.hbar-row .hlbl { color: var(--ink); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row .hlbl small { color: var(--ink-faint); font-weight: 400; }
.hbar-row .track { height: 14px; position: relative; }
.hbar-row .fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-row .hval { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-dim); white-space: nowrap; }
.hbar-row .hval b { color: var(--ink); font-weight: 700; }

.heatmap { display: grid; gap: 2px; }
.heatmap .hm-cell { aspect-ratio: auto; height: 26px; border-radius: 2px; position: relative; cursor: default; }
.heatmap .hm-lbl { font-size: 10.5px; color: var(--ink-faint); display: flex; align-items: center; justify-content: center; height: 26px; }
.heatmap .hm-cell.empty { background: var(--paper-2); }

.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); padding: 8px 10px; border-bottom: 1px solid var(--ink-line); white-space: nowrap; cursor: pointer;
}
.dtable th.num, .dtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable th.sorton { color: var(--ink); }
.dtable td { padding: 9px 10px; border-bottom: 1px solid var(--ink-line-soft); vertical-align: middle; }
.dtable tbody tr { cursor: pointer; }
.dtable tbody tr:hover { background: var(--paper); }
.dtable .ttitle { font-weight: 600; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtable .rank { color: var(--ink-faint); font-variant-numeric: tabular-nums; width: 30px; }

.note-empty { color: var(--ink-faint); font-size: 13.5px; padding: 26px 0; text-align: center; }
.note-empty .big { font-size: 30px; margin-bottom: 8px; }

/* ---------- Erfassen ---------- */

.cap-row {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 2px;
  padding: 13px 16px; margin-bottom: 8px; cursor: pointer; font: inherit; transition: border-color .15s;
}
.cap-row:hover { border-color: var(--ink); }
.cap-row .cdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cap-row .ctitle { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-row .cmeta { color: var(--ink-faint); font-size: 12px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cap-row .cflag { font-size: 11px; font-weight: 700; color: var(--lime-deep); flex-shrink: 0; }

.aud-tile { padding: 16px 18px; }
.aud-tile .ahead { display: flex; align-items: center; gap: 8px; }
.aud-tile .ahead .ldot { width: 9px; height: 9px; border-radius: 50%; }
.aud-tile .ahead .aname { font-weight: 700; font-size: 14px; }
.aud-tile .aval { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.aud-tile .adelta { color: var(--ink-dim); font-size: 12.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.aud-tile form { display: flex; gap: 8px; margin-top: 12px; }
.aud-tile input {
  width: 100%; min-width: 0; font: inherit; font-size: 15px; padding: 8px 12px;
  border: 1px solid var(--ink-line); border-radius: 2px; background: var(--paper); outline: none;
  font-variant-numeric: tabular-nums;
}
.aud-tile input:focus { border-color: var(--ink); }

/* ---------- Sheet (Schnellerfassung) & Drawer (Post-Detail) ---------- */

.overlay { position: fixed; inset: 0; background: rgba(10, 11, 14, 0.45); z-index: 100; opacity: 0; transition: opacity .22s; }
.overlay.show { opacity: 1; }

.sheet {
  position: fixed; z-index: 110; background: var(--card); box-shadow: var(--sheet-shadow);
  inset: auto 0 0 0; max-height: 92dvh; border-radius: 10px 10px 0 0;
  transform: translateY(102%); transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
}
.sheet.show { transform: none; }
@media (min-width: 760px) {
  .sheet { inset: 0 0 0 auto; width: min(460px, 94vw); max-height: none; border-radius: 0; transform: translateX(103%); }
  .sheet.show { transform: none; }
}
.sheet .shead { padding: 16px 20px 12px; border-bottom: 1px solid var(--ink-line-soft); display: flex; align-items: flex-start; gap: 12px; }
.sheet .shead .stitle { font-weight: 700; font-size: 16px; letter-spacing: -0.015em; flex: 1; line-height: 1.3; }
.sheet .shead .sclose { all: unset; cursor: pointer; font-size: 19px; color: var(--ink-faint); padding: 2px 8px; }
.sheet .shead .sclose:hover { color: var(--ink); }
.sheet .sbody { padding: 16px 20px 26px; overflow-y: auto; }
.sheet .sfoot { padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ink-line-soft); display: flex; gap: 10px; }
.sheet .sfoot .btn { flex: 1; padding: 12px; font-size: 14.5px; }

.numgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.numfield label { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.numfield input, .field input, .field select {
  width: 100%; font: inherit; font-size: 17px; font-weight: 600; padding: 10px 12px;
  border: 1px solid var(--ink-line); border-radius: 2px; background: var(--paper); outline: none;
  font-variant-numeric: tabular-nums;
}
.numfield input:focus, .field input:focus, .field select:focus { border-color: var(--ink); box-shadow: 0 0 0 2.5px var(--lime-soft); }
.numfield .prev { font-size: 11px; color: var(--ink-faint); margin-top: 4px; font-variant-numeric: tabular-nums; }
.field { margin-top: 12px; }
.field label { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.field input, .field select { font-size: 14px; font-weight: 500; }
.sheet .hint { font-size: 12px; color: var(--ink-faint); margin-top: 12px; line-height: 1.5; }

.drawer {
  position: fixed; z-index: 110; inset: 0 0 0 auto; width: min(720px, 96vw);
  background: var(--paper); box-shadow: -8px 0 44px -14px rgba(10,11,14,.4);
  transform: translateX(103%); transition: transform .28s cubic-bezier(.22,1,.36,1);
  overflow-y: auto;
}
.drawer.show { transform: none; }
.drawer .dhead { position: sticky; top: 0; background: var(--paper); z-index: 5; padding: 14px 22px; border-bottom: 1px solid var(--ink-line); display: flex; align-items: center; gap: 12px; }
.drawer .dhead .dclose { all: unset; cursor: pointer; font-size: 20px; color: var(--ink-faint); padding: 2px 8px; }
.drawer .dhead .dclose:hover { color: var(--ink); }
.drawer .dhead .dtitle { font-weight: 700; font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .dcontent { padding: 18px 22px 40px; }

/* ---------- Import ---------- */

.dropzone {
  border: 2px dashed var(--ink-faint); border-radius: 2px; padding: clamp(26px, 5vw, 44px);
  text-align: center; cursor: pointer; transition: .15s; background: var(--card);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--lime-deep); background: rgba(182, 255, 57, 0.07); }
.dropzone .dz-big { font-weight: 700; font-size: 16px; }
.dropzone .dz-sub { color: var(--ink-dim); font-size: 13px; margin-top: 5px; }
.imp-guide { font-size: 13px; color: var(--ink-dim); line-height: 1.6; }
.imp-guide b { color: var(--ink); }
.imp-guide ol { padding-left: 18px; margin-top: 6px; }
.imp-guide code { font-family: var(--mono); font-size: 11.5px; background: var(--paper-2); padding: 1px 5px; border-radius: 2px; }
.match-hoch { color: var(--ok); font-weight: 650; }
.match-mittel { color: #a86a08; font-weight: 650; }
.match-keine { color: var(--warn); font-weight: 650; }
.imp-select { font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--ink-line); border-radius: 2px; background: var(--card); max-width: 260px; }

/* ---------- Toast ---------- */

#toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: var(--paper); padding: 11px 22px; border-radius: 100px;
  font-size: 13.5px; font-weight: 550; opacity: 0; transition: .25s; pointer-events: none; z-index: 300;
  box-shadow: 0 10px 34px -8px rgba(10, 11, 14, 0.5); max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--warn); }

/* ---------- Login ---------- */

.login-page { min-height: 100dvh; display: grid; place-items: center; background: var(--ink); color: var(--paper); padding: 24px; }
.login-box { width: min(400px, 100%); }
.login-box .kicker { color: var(--paper-dim); }
.login-box .kicker::before { background: var(--lime); }
.login-box h1 { font-size: clamp(30px, 6vw, 40px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; margin: 14px 0 6px; }
.login-box h1 .accent { color: var(--lime); }
.login-box .sub { color: var(--paper-dim); }
.login-box form { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.login-box input {
  font: inherit; font-size: 16px; padding: 14px 16px; background: rgba(241, 239, 233, 0.06);
  border: 1.5px solid var(--paper-line); border-radius: 2px; color: var(--paper); outline: none;
}
.login-box input:focus { border-color: var(--lime); }
.login-box .btn { padding: 14px; font-size: 15px; }
.login-err { color: #ff9a8f; font-size: 13.5px; min-height: 20px; }
.login-foot { margin-top: 34px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(241, 239, 233, 0.35); }

/* ---------- System-Popover ---------- */

.syspop {
  position: fixed; z-index: 120; top: 64px; right: clamp(12px, 3vw, 40px); width: 280px;
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 2px; box-shadow: var(--shadow);
  padding: 16px; display: none;
}
.syspop.show { display: block; }
.syspop .sp-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 6px; }
.syspop .sp-row b { color: var(--ink); font-weight: 650; }
.syspop hr { border: 0; border-top: 1px solid var(--ink-line-soft); margin: 12px 0; }
.syspop .btn { width: 100%; margin-top: 8px; }

/* ---------- Mobile ---------- */

.tabbar { display: none; }
@media (max-width: 759px) {
  body { font-size: 15px; }
  .topbar .bar { height: 52px; }
  .nav { display: none; }
  .topdate { display: none; }
  main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 95;
    background: var(--ink); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around; border-top: 1px solid rgba(255,255,255,0.08);
  }
  .tabbar a {
    text-decoration: none; color: var(--paper-dim); font-size: 10px; font-weight: 600;
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 8px;
    min-width: 54px;
  }
  .tabbar a .ticon { font-size: 17px; line-height: 1; }
  .tabbar a.on { color: var(--lime); }
  .board { grid-template-columns: 1fr; }
  .board-col { min-height: 0; }
  .cal-grid { display: none; }
  .dtable .ttitle { max-width: 160px; }
  .pagehead { flex-direction: column; align-items: flex-start; }
  .controls .search { margin-left: 0; width: 100%; }
  .controls .search input { width: 100%; }
  .drawer { width: 100vw; }
}
@media (min-width: 760px) {
  .week-only { display: none; }
}
