/* ──────────────────────────────────────────────
   modus factum · content hub
   app shell — sidebar + workspace
   ────────────────────────────────────────────── */

/* ── Brand display font: Legal LT Std (Linotype) ── */
@font-face {
  font-family: 'Legal LT Std';
  src: url('fonts/Legal%20LT%20Std%20Book.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Legal LT Std';
  src: url('fonts/Legal%20LT%20Std%20Book%20Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Legal LT Std';
  src: url('fonts/Legal%20LT%20Std%20Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Legal LT Std';
  src: url('fonts/Legal%20LT%20Std%20Medium%20Italic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Legal LT Std';
  src: url('fonts/Legal%20LT%20Std%20Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Legal LT Std';
  src: url('fonts/Legal%20LT%20Std%20Bold%20Italic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg:        #ffffff;
  --bg-soft:   #f7f7f8;
  --bg-sunken: #f0f0f2;
  --ink:       #191D27;
  --ink-2:     #2a2f3b;
  --ink-3:     #4a505c;
  --muted:     #6b7280;
  --muted-2:   #9aa0aa;
  --rule:      #e6e7ea;
  --rule-2:    #eceef1;
  --red:       #9F0E1F;
  --red-soft:  #fbeaec;
  --red-line:  #f3d4d8;

  /* sidebar tones (dark) */
  --side:        #191D27;
  --side-2:      #1f242f;
  --side-rule:   #262b36;
  --side-text:   #d6d8dd;
  --side-muted:  #8b8f99;

  /* status hues, dezent */
  --ok-bg:    #ecf6ee;
  --ok-tx:    #1f6f33;
  --warn-bg:  #fdf3e0;
  --warn-tx:  #8a5a10;
  --gray-bg:  #f0f0f2;
  --gray-tx:  #4a505c;

  --sans: "Poppins", ui-sans-serif, -apple-system, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --side-w: 248px;
  --topbar-h: 56px;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ──────────────────────────────────────────────
   app shell
   ────────────────────────────────────────────── */

.app {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}

/* ──────────────────────────────────────────────
   sidebar
   ────────────────────────────────────────────── */

.side {
  background: var(--side);
  color: var(--side-text);
  border-right: 1px solid var(--side-rule);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side__brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.side__brand img { height: 30px; display: block; max-width: 100%; }

.side__ws {
  margin: 0 12px 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--side-2);
  border: 1px solid var(--side-rule);
  border-radius: var(--r-md);
  cursor: pointer;
}
.side__ws-badge {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}
.side__ws-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  flex: 1;
}
.side__ws-caret { color: var(--side-muted); }

.side__search {
  margin: 0 12px 14px;
  position: relative;
}
.side__search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  background: var(--side-2);
  border: 1px solid var(--side-rule);
  border-radius: var(--r-md);
  color: #fff;
  font: 13px var(--sans);
  outline: none;
  transition: border-color .15s;
}
.side__search input::placeholder { color: var(--side-muted); }
.side__search input:focus { border-color: var(--red); }
.side__search svg {
  position: absolute;
  left: 9px; top: 50%; transform: translateY(-50%);
  color: var(--side-muted);
}
.side__search kbd {
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  font: 500 10px var(--mono);
  color: var(--side-muted);
  background: transparent;
  border: 1px solid var(--side-rule);
  border-radius: 4px;
  padding: 2px 5px;
}

.side__section {
  padding: 14px 18px 6px;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--side-muted);
}

.side__nav { padding: 0 8px; display: flex; flex-direction: column; gap: 1px; }
.side__nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--side-text);
  font-size: 13.5px;
  font-weight: 450;
  transition: background .12s, color .12s;
}
.side__nav a svg { flex: 0 0 16px; color: var(--side-muted); transition: color .12s; }
.side__nav a:hover { background: var(--side-2); color: #fff; }
.side__nav a:hover svg { color: var(--side-text); }
.side__nav a.is-active {
  background: var(--side-2);
  color: #fff;
}
.side__nav a.is-active svg { color: var(--red); }
.side__nav a.is-active::before {
  content: "";
  width: 3px;
  background: var(--red);
  align-self: stretch;
  border-radius: 2px;
  margin: 3px 0 3px -8px;
}
.side__nav .count {
  margin-left: auto;
  font: 500 11px var(--mono);
  color: var(--side-muted);
}

.side__foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--side-rule);
}
.side__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-md);
  cursor: pointer;
}
.side__user:hover { background: var(--side-2); }
.side__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 11px var(--mono);
}
.side__user-name { font-size: 13px; color: #fff; font-weight: 500; line-height: 1.2; }
.side__user-mail { font-size: 11px; color: var(--side-muted); line-height: 1.2; }
.side__user > div { flex: 1; min-width: 0; }
.side__user-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__user-logout { color: var(--side-muted); opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.side__user:hover .side__user-logout { opacity: 1; }

/* ──────────────────────────────────────────────
   workspace (right side)
   ────────────────────────────────────────────── */

.work {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs strong { color: var(--ink); font-weight: 500; }
.crumbs .sep { color: var(--muted-2); }
.topbar__spacer { flex: 1; }

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  font: 500 13px var(--sans);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--bg-soft); }
.btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn--primary:hover { background: #0f131c; }
.btn--accent {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn--accent:hover { background: #8a0c1b; }
.btn--icon { width: 32px; padding: 0; justify-content: center; }

/* ──────────────────────────────────────────────
   page
   ────────────────────────────────────────────── */

.page {
  padding: 24px 28px 64px;
  max-width: 1280px;
  width: 100%;
}

.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page__title {
  font: 500 34px/1.05 'Legal LT Std', Georgia, serif;
  letter-spacing: -0.01em;
  margin: 0;
  position: relative;
}
/* Brand marker — 2px rote Akzentlinie über jedem Hauptkapitel */
.page__title::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--red);
  margin-bottom: 12px;
}
.page__sub {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.page__actions { display: flex; gap: 8px; }

/* tabs */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
  overflow-x: auto;
}
.tabs a {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .12s, border-color .12s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.is-active {
  color: var(--ink);
  border-bottom-color: var(--red);
}
.tabs .count {
  font: 500 11px var(--mono);
  color: var(--muted-2);
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 999px;
}
.tabs a.is-active .count { color: var(--ink); background: var(--bg-sunken); }

/* dashboard KPI cards */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  background: var(--bg);
}
.kpi__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.kpi__num {
  font: 600 26px/1.15 var(--sans);
  letter-spacing: -0.02em;
  margin: 4px 0 2px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.kpi__num small {
  font: 500 12px var(--mono);
  color: var(--muted);
}
.kpi__delta {
  font: 500 11.5px var(--mono);
  color: var(--ok-tx);
}
.kpi__delta.is-warn { color: var(--red); }

/* split layout */
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
.panel {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}
.panel__title {
  font: 600 13.5px var(--sans);
  margin: 0;
}
.panel__link {
  font: 500 12px var(--sans);
  color: var(--muted);
}
.panel__link:hover { color: var(--red); }
.panel__body { padding: 4px 0; }

/* table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table thead th {
  font: 500 11.5px var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
}
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-2);
  vertical-align: middle;
}
.table tbody tr:hover td { background: var(--bg-soft); cursor: pointer; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-title { width: 42%; }
.table .col-mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }

.row-actions {
  display: inline-flex;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
}
.icon-btn {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  opacity: .55;
  transition: opacity .12s, color .12s;
}
.icon-btn:hover { opacity: 1; color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: progress; }
.icon-btn--danger:hover { color: var(--red); }
.spinner--xs { width: 12px; height: 12px; border-width: 2px; }

.t-title { display: flex; align-items: center; gap: 10px; }
.t-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--bg-sunken);
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
}
.t-icon.is-report  { background: #eaf0fb; color: #2b53a8; }
.t-icon.is-deck    { background: #fbeaec; color: #9F0E1F; }
.t-icon.is-brief   { background: #ecf6ee; color: #1f6f33; }
.t-icon.is-memo    { background: #fdf3e0; color: #8a5a10; }
.t-name { font-weight: 500; color: var(--ink); }
.t-sub  { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11.5px var(--sans);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--gray-tx);
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.pill.is-draft  { background: var(--gray-bg); color: var(--gray-tx); }
.pill.is-review { background: var(--warn-bg); color: var(--warn-tx); }
.pill.is-final  { background: var(--ok-bg);  color: var(--ok-tx); }
.pill.is-due    { background: var(--red-soft); color: var(--red); }

/* avatars */
.av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 600 10px var(--mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -6px; border: 2px solid var(--bg); }

/* activity feed */
.feed { list-style: none; margin: 0; padding: 4px 0; }
.feed li {
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid var(--rule-2);
  font-size: 13px;
}
.feed li:last-child { border-bottom: 0; }
.feed .av { margin-top: 1px; }
.feed em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}
.feed .when {
  font: 500 11px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}

/* filters bar */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search-input {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}
.search-input input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font: 13px var(--sans);
  outline: none;
  background: var(--bg);
  color: var(--ink);
}
.search-input input:focus { border-color: var(--ink); }
.search-input svg {
  position: absolute; left: 9px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg);
  font: 13px var(--sans);
  color: var(--ink);
  cursor: pointer;
}

/* team cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.member {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 16px;
  background: var(--bg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.member__av {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 600 14px var(--mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
}
.member__av.is-red { background: var(--red); }
.member__body { flex: 1; min-width: 0; }
.member__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.member__role { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.member__rm {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.member__rm:hover {
  background: var(--red-soft);
  color: var(--red);
}
.member__rm:disabled { opacity: 0.4; cursor: wait; }

/* templates / vorlagen */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tpl {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .12s, transform .12s;
}
.tpl:hover { border-color: var(--ink); }
.tpl__preview {
  aspect-ratio: 16/10;
  background: var(--bg-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
}
.tpl__preview.is-dark {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
}
.tpl__preview.is-red {
  background: var(--red);
  color: rgba(255,255,255,0.7);
}
.tpl__body { padding: 12px 14px; }
.tpl__name { font-size: 13.5px; font-weight: 600; }
.tpl__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ──────────────────────────────────────────────
   wizard
   ────────────────────────────────────────────── */

.wizard {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}

.wizard__head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, #fafafb 0%, var(--bg) 100%);
  display: flex;
  align-items: center;
  gap: 18px;
}
.wizard__head-text { flex: 1; }
.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg);
  font: 500 11px var(--sans);
  color: var(--ink);
  white-space: nowrap;
}
.brand-tag::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--red);
  display: inline-block;
}
.wizard__badge {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wizard__head h2 {
  font: 600 17px/1.2 var(--sans);
  margin: 0 0 2px;
  letter-spacing: -0.005em;
}
.wizard__head h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--red);
  margin-bottom: 8px;
}
.wizard__head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 18px 26px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.stepper__step {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.stepper__num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 12px var(--mono);
  flex: 0 0 24px;
  transition: background .15s, color .15s;
}
.stepper__label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s;
}
.stepper__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin: 0 14px;
}
.stepper__step.is-active .stepper__num {
  background: var(--red);
  color: #fff;
}
.stepper__step.is-active .stepper__label { color: var(--ink); }
.stepper__step.is-done .stepper__num {
  background: var(--ink);
  color: #fff;
}
.stepper__step.is-done .stepper__label { color: var(--ink); }

/* panels */
.wizard__body {
  padding: 26px;
}
.wizard__panel { display: none; }
.wizard__panel.is-active { display: block; animation: wizFade .25s ease; }
@keyframes wizFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wizard__panel h3 {
  font: 600 15px var(--sans);
  margin: 0 0 4px;
}
.wizard__panel p.help {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

/* choice cards */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.choice-grid--two {
  grid-template-columns: repeat(2, 1fr);
}
.choice {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 16px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.choice-grid--two .choice {
  padding: 22px 20px;
  align-items: center;
  text-align: center;
}
.choice-grid--two .choice__name { font-size: 15px; }
.choice:hover { border-color: var(--ink); background: var(--bg-soft); }
.choice .choice__icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--bg-sunken);
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.choice .choice__name { font-size: 13.5px; font-weight: 600; }
.choice .choice__desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.choice.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
}
.choice.is-selected .choice__icon { background: var(--red); color: #fff; }

/* field */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field__label {
  font: 500 12px var(--sans);
  color: var(--ink);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font: 14px var(--sans);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(25,29,39,0.06);
}
.field input[type="range"] { padding: 0; border: 0; background: transparent; }

/* OTP code input */
.otp-input {
  width: 100%;
  text-align: center;
  font: 600 22px/1 var(--mono);
  letter-spacing: 0.3em;
  padding: 14px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.otp-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(25,29,39,0.06);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* file upload */
.upload {
  border: 1.5px dashed var(--rule);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.upload:hover { border-color: var(--ink); background: #f3f3f5; }
.upload:focus { outline: none; border-color: var(--ink); }
.upload strong { color: var(--ink); font-weight: 600; }
.upload svg { display: block; margin: 0 auto 8px; color: var(--ink-3); }
.upload.is-dragover {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}
.upload.is-dragover strong { color: var(--red); }

.upload-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 13px;
}
.upload-list .name { flex: 1; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list .size { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }
.upload-list .kind {
  font: 500 10px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-sunken);
}
.upload-list .kind.is-text { background: var(--ok-bg); color: var(--ok-tx); }
.upload-list .kind.is-note { background: var(--warn-bg); color: var(--warn-tx); }

/* Cover image upload (single image) */
.cover-area { margin-top: 12px; }
.upload--cover { padding: 18px; }
.cover-preview {
  position: relative;
  margin-top: 10px;
  border: 0.5px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-soft);
  max-width: 360px;
  aspect-ratio: 4 / 3;
}
.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-preview__rm {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(25,29,39,0.85);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cover-preview__rm:hover { background: var(--red); }
.upload-list button {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.upload-list button:hover { background: var(--bg-sunken); color: var(--red); }

/* slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 22px;
}
.slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 2px;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
  margin-top: -7px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  cursor: pointer;
}
.slider-row input[type="range"]::-moz-range-track {
  height: 4px; background: var(--bg-sunken); border-radius: 2px;
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}
.slider-row output {
  font: 600 14px var(--mono);
  color: var(--ink);
  min-width: 32px;
  text-align: right;
}

/* "egal" toggle next to slider */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font: 500 12.5px var(--sans);
  color: var(--ink);
  white-space: nowrap;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: background .12s, border-color .12s;
}
.toggle:hover { background: var(--bg-soft); }
.field > .toggle { align-self: flex-start; }
.toggle input { accent-color: var(--red); margin: 0; }
.toggle:has(input:checked) {
  background: var(--red-soft);
  border-color: var(--red-line);
  color: var(--red);
}

.slider-row.is-disabled input[type="range"] {
  opacity: 0.4;
  pointer-events: none;
}
.slide-readout { font-weight: 500; color: var(--muted); }
.slide-readout.is-any { color: var(--red); }

/* summary */
.summary {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 0;
  margin-bottom: 18px;
}
.summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: 160px 1fr;
}
.summary dt, .summary dd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-2);
  font-size: 13px;
  margin: 0;
}
.summary dt {
  font: 500 11.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}
.summary dd { color: var(--ink); font-weight: 500; }
.sum-slides[data-any] .sum-suffix { display: none; }
.sum-slides[data-any] [data-sum="slides"] { color: var(--red); }
.summary dl > :nth-last-child(1),
.summary dl > :nth-last-child(2) { border-bottom: 0; }

/* nav buttons */
.wizard__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.wizard__foot .btn { height: 36px; padding: 0 16px; font-size: 13.5px; }
.wizard__foot-hint {
  font: 500 11px var(--mono, 'IBM Plex Mono', monospace);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* result */
.wizard__result { display: none; padding: 24px 0; }
.wizard__result.is-active { display: block; animation: wizFade .25s ease; }

.wizard__progress {
  display: none;
  margin: 0 0 20px;
}
.wizard__progress.is-visible { display: block; }
.wizard__bar {
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 999px;
  overflow: hidden;
}
.wizard__bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width .7s cubic-bezier(.4,.2,.2,1);
}
.wizard__status {
  margin-top: 10px;
  font: 500 13px var(--mono);
  color: var(--ink);
}

.wizard__slides {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.wizard__slides.is-visible { display: grid; animation: wizFade .35s ease; }
.slide-thumb {
  aspect-ratio: 16/10;
  border-radius: 8px;
  border: 1px solid var(--rule);
  padding: 10px;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .12s, transform .15s;
}
.slide-thumb:hover { border-color: var(--ink); transform: translateY(-1px); }
.slide-thumb .nb { color: var(--muted); }
.slide-thumb .ti {
  font: 600 12px var(--sans);
  text-transform: none;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--ink);
}
.slide-thumb.is-cover { background: var(--ink); color: #fff; }
.slide-thumb.is-cover .nb { color: rgba(255,255,255,0.6); }
.slide-thumb.is-cover .ti { color: #fff; }
.slide-thumb.is-accent { background: var(--red); color: #fff; border-color: var(--red); }
.slide-thumb.is-accent .nb { color: rgba(255,255,255,0.7); }
.slide-thumb.is-accent .ti { color: #fff; }

.result-cta {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

/* generic modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25,29,39,0.42);
  backdrop-filter: blur(2px);
  animation: fadeIn .15s ease;
}
.modal__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 24px 64px -16px rgba(25,29,39,0.35);
  overflow: hidden;
  animation: modalRise .22s cubic-bezier(.2,.7,.2,1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalRise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal__head h2 {
  font: 600 16px var(--sans);
  margin: 0;
  position: relative;
}
.modal__head h2::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--red);
  margin-bottom: 8px;
}
.icon-x {
  background: none;
  border: 0;
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-x:hover { background: var(--bg-sunken); color: var(--ink); }

.modal__body { padding: 20px 22px 8px; }
.modal__foot {
  padding: 14px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal__msg {
  margin: 6px 0 0;
  font: 500 13px var(--sans);
  min-height: 18px;
}
.modal__msg.is-err { color: var(--red); }
.modal__msg.is-ok  { color: var(--ok-tx); }

.confirm-text {
  margin: 0;
  font: 400 14px/1.55 var(--sans);
  color: var(--ink);
}
.confirm-text strong { font-weight: 600; }
.confirm-text__hint {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.field__hint {
  font: 400 11px var(--mono);
  color: var(--muted-2);
  letter-spacing: 0.04em;
  margin-left: 4px;
  text-transform: uppercase;
}

/* archive empty / loading states */
.archive-empty {
  text-align: center;
  padding: 56px 28px 64px;
  color: var(--muted);
}
.archive-empty__icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: var(--bg-sunken);
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.archive-empty h3 {
  font: 600 16px var(--sans);
  color: var(--ink);
  margin: 0 0 6px;
}
.archive-empty p {
  font-size: 13.5px;
  margin: 0 0 18px;
}
.archive-empty .btn {
  display: inline-flex;
}

.archive-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--muted);
  font: 500 13px var(--sans);
}
.archive-loading[hidden] { display: none; }
.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--rule);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────
   viewer — generated content (Editorial Hell)
   Matches the PPTX export 1:1.
   ───────────────────────────────────────────── */

.page--viewer { max-width: 1100px; }

.vw-slides {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* base slide shell — 16:9 white card */
.vw-slide {
  background: #FFFFFF;
  border: 0.5px solid #E5E5E0;
  border-radius: 4px;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.vw-accent {
  width: 32px;
  height: 2px;
  background: #9F0E1F;
}

/* ─── Cover slide ─── */
.vw-slide--cover {
  display: grid;
  grid-template-columns: 5fr 7fr;
}
.vw-cover__left {
  padding: 3.2% 3% 2.6%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.vw-cover__logo {
  width: 26%;
  max-width: 140px;
  height: auto;
  display: block;
}
.vw-cover__main {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.vw-meta-strip {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}
.vw-meta-strip > div { display: flex; flex-direction: column; }
.vw-meta-strip .ms-label {
  font: 500 8px/1 'Poppins', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888780;
  margin-bottom: 4px;
}
.vw-meta-strip .ms-val {
  font: 500 9.5px/1 'Poppins', sans-serif;
  color: #191D27;
}
.vw-meta-strip .ms-sep {
  width: 0.5px;
  background: #E5E5E0;
}
.vw-cover__title {
  font: 600 clamp(28px, 3.6vw, 44px)/0.98 'Legal LT Std', Georgia, serif;
  letter-spacing: -0.015em;
  color: #191D27;
  margin: 14px 0 0;
}
.vw-cover__sub {
  font: 400 clamp(10px, 0.95vw, 12px)/1.55 'Poppins', sans-serif;
  color: #5F5E5A;
  margin: 14px 0 0;
  max-width: 32ch;
}
.vw-cover__footer {
  display: flex;
  justify-content: space-between;
  border-top: 0.5px solid #E5E5E0;
  padding-top: 9px;
  font: 500 8px/1 'Poppins', sans-serif;
  color: #888780;
  letter-spacing: 0.05em;
}
.vw-cover__right {
  background: #191D27;
  position: relative;
  overflow: hidden;
}
.vw-cover__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.22;
}
.vw-cover__right.has-image { background: #FFFFFF; }
.vw-cover__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Shared chrome for non-cover slides (header / inner / footer) ─── */
.vw-content__header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 1.4% 3%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.5px solid #E5E5E0;
  z-index: 2;
}
.vw-content__kicker {
  font: 500 8px/1 'Poppins', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888780;
}
.vw-content__logo {
  height: 14px;
  width: auto;
  display: block;
}
.vw-slide__inner {
  position: absolute;
  top: 5.4%;
  left: 3%;
  right: 3%;
  bottom: 6%;
}
.vw-slide__footer {
  position: absolute;
  bottom: 2.2%;
  left: 3%;
  right: 3%;
  display: flex;
  justify-content: space-between;
  font: 500 8px/1 'Poppins', sans-serif;
  letter-spacing: 0.05em;
  color: #888780;
  z-index: 2;
}
.vw-content__watermark {
  position: absolute;
  bottom: -3%;
  right: -3%;
  width: 14%;
  height: auto;
  opacity: 0.06;
  pointer-events: none;
}

.vw-slide__title {
  font: 600 clamp(18px, 2.4vw, 30px)/1.04 'Legal LT Std', Georgia, serif;
  letter-spacing: -0.015em;
  color: #191D27;
  margin: 12px 0 0;
}
.vw-slide__lead {
  font: 400 clamp(9px, 0.9vw, 11.5px)/1.55 'Poppins', sans-serif;
  color: #5F5E5A;
  margin: 10px 0 0;
  max-width: 36ch;
}

/* ─── Layout: content-text (5fr/7fr narrative) ─── */
.vw-text__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 28px;
  height: 100%;
}
.vw-text__col-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}
.vw-text__col-right {
  font: 400 clamp(10.5px, 1.05vw, 13.5px)/1.55 'Poppins', sans-serif;
  color: #191D27;
  min-width: 0;
  overflow: hidden;
}
.vw-text__col-right p { margin: 0 0 10px; }
.vw-text__col-right ul { padding-left: 18px; margin: 0 0 10px; }
.vw-text__col-right li { margin-bottom: 4px; }
.vw-text__col-right strong { color: #191D27; font-weight: 600; }
.vw-text__col-right h2,
.vw-text__col-right h3,
.vw-text__col-right h4 {
  font: 600 13px/1.3 'Poppins', sans-serif;
  color: #191D27;
  margin: 8px 0 6px;
}

/* ─── Layout: agenda (numbered TOC) ─── */
.vw-agenda__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 28px;
  height: 100%;
}
.vw-agenda__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.vw-agenda__list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  justify-content: center;
}
.vw-agenda__row {
  display: grid;
  grid-template-columns: 28px 1fr 32px;
  gap: 14px;
  align-items: center;
  padding: clamp(6px, 0.95vw, 12px) 0;
  border-bottom: 0.5px solid #E5E5E0;
}
.vw-agenda__row:last-child { border-bottom: 0; }
.vw-agenda__nb {
  font: 500 clamp(9px, 0.95vw, 11px)/1 'Poppins', sans-serif;
  color: #9F0E1F;
  letter-spacing: 0.05em;
}
.vw-agenda__label {
  font: 500 clamp(11px, 1.1vw, 14px)/1 'Poppins', sans-serif;
  color: #191D27;
}
.vw-agenda__page {
  font: 400 clamp(8.5px, 0.85vw, 10.5px)/1 'Poppins', sans-serif;
  color: #888780;
  text-align: right;
}

/* ─── Layout: kpi-grid ─── */
.vw-kpi__head {
  margin-bottom: clamp(20px, 3.5vw, 48px);
}
.vw-kpi__grid {
  display: grid;
  gap: 0;
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: 9%;
}
.vw-kpi__grid--3 { grid-template-columns: repeat(3, 1fr); }
.vw-kpi__grid--4 { grid-template-columns: repeat(4, 1fr); }
.vw-kpi__card {
  padding: 0 clamp(10px, 1.8vw, 22px);
  border-right: 0.5px solid #E5E5E0;
}
.vw-kpi__card:first-child { padding-left: 0; }
.vw-kpi__card:last-child  { border-right: 0; padding-right: 0; }
.vw-kpi__val {
  font: 600 clamp(32px, 4.5vw, 56px)/1 'Legal LT Std', Georgia, serif;
  letter-spacing: -0.02em;
  color: #191D27;
  margin: 0;
}
.vw-kpi__card.is-hi .vw-kpi__val { color: #9F0E1F; }
.vw-kpi__label {
  font: 600 clamp(9px, 0.95vw, 11.5px)/1 'Poppins', sans-serif;
  color: #191D27;
  margin: 6px 0 3px;
}
.vw-kpi__desc {
  font: 400 clamp(8px, 0.8vw, 10px)/1.5 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
}

/* ─── Layout: timeline ─── */
.vw-tl__head { margin-bottom: clamp(16px, 2.5vw, 28px); }
.vw-tl__path { margin-bottom: clamp(20px, 3vw, 40px); }
.vw-tl__track {
  font: 500 clamp(8px, 0.85vw, 10px)/1 'Poppins', sans-serif;
  color: #888780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.vw-tl__rail { position: relative; }
.vw-tl__line {
  position: absolute;
  top: 6px;
  left: 5%;
  right: 5%;
  height: 1.5px;
  background: #E5E5E0;
}
.vw-tl__line-fill {
  position: absolute;
  top: 6px;
  left: 5%;
  height: 1.5px;
  background: #9F0E1F;
  max-width: 90%;
}
.vw-tl__stops {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.vw-tl__stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.vw-tl__dot {
  width: 10px;
  height: 10px;
  background: #C9C6C0;
  transform: rotate(45deg);
}
.vw-tl__stop.is-primary .vw-tl__dot { background: #9F0E1F; width: 12px; height: 12px; }
.vw-tl__label {
  margin-top: 10px;
  font: 500 clamp(8px, 0.85vw, 10.5px)/1.2 'Poppins', sans-serif;
  color: #888780;
  text-align: center;
}
.vw-tl__stop.is-primary .vw-tl__label { color: #191D27; }
.vw-tl__facts {
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: 9%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 20px;
}
.vw-tl__fact-label {
  font: 600 clamp(9px, 0.95vw, 11px)/1 'Poppins', sans-serif;
  color: #9F0E1F;
  margin: 0 0 4px;
}
.vw-tl__fact-text {
  font: 400 clamp(9px, 0.9vw, 11px)/1.5 'Poppins', sans-serif;
  color: #5F5E5A;
  margin: 0;
}

/* ─── Layout: module-grid (2x2) ─── */
.vw-mod__layout {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: clamp(16px, 2vw, 28px);
  height: 100%;
}
.vw-mod__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 6%;
}
.vw-mod__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(8px, 1vw, 14px);
  padding-bottom: 4%;
}
.vw-mod__card {
  border: 0.5px solid #E5E5E0;
  border-radius: 5px;
  padding: clamp(11px, 1.5vw, 18px) clamp(12px, 1.6vw, 20px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.vw-mod__card.is-dark { background: #191D27; border-color: #191D27; }
.vw-mod__kicker {
  font: 600 clamp(8px, 0.85vw, 10px)/1 'Poppins', sans-serif;
  color: #9F0E1F;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
}
.vw-mod__headline {
  font: 600 clamp(10px, 1.05vw, 13px)/1.25 'Poppins', sans-serif;
  color: #191D27;
  margin: 0 0 4px;
}
.vw-mod__card.is-dark .vw-mod__headline { color: #FFFFFF; }
.vw-mod__desc {
  font: 400 clamp(8.5px, 0.85vw, 10.5px)/1.5 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
}
.vw-mod__card.is-dark .vw-mod__desc { color: rgba(255,255,255,0.6); }

/* ─── Layout: editorial-split ─── */
.vw-slide--editorial-split { padding: 0; }
.vw-ed__layout {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 38% 1fr;
}
.vw-ed__anchor {
  background: #191D27;
  padding: 6.5% 3% 5%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.vw-ed__anchor .vw-accent { background: #9F0E1F; }
.vw-ed__title {
  font: 600 clamp(20px, 2.6vw, 32px)/1.04 'Legal LT Std', Georgia, serif;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  margin: 12px 0 0;
}
.vw-ed__anchor-val {
  font: 600 clamp(38px, 5.5vw, 64px)/1 'Legal LT Std', Georgia, serif;
  color: #9F0E1F;
  margin: 0;
}
.vw-ed__anchor-cap {
  font: 400 clamp(8.5px, 0.85vw, 10.5px)/1.5 'Poppins', sans-serif;
  color: rgba(255,255,255,0.6);
  margin: 8px 0 0;
  max-width: 32ch;
}
.vw-ed__list {
  padding: 7% 3% 7% 3.5%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: clamp(8px, 1vw, 16px);
}
.vw-ed__row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: clamp(8px, 1vw, 14px);
}
.vw-ed__row.has-rule { border-bottom: 0.5px solid #E5E5E0; }
.vw-ed__val {
  font: 600 clamp(20px, 2.4vw, 28px)/1 'Legal LT Std', Georgia, serif;
  color: #9F0E1F;
  margin: 0;
}
.vw-ed__headline {
  font: 600 clamp(10px, 1.05vw, 13px)/1.3 'Poppins', sans-serif;
  color: #191D27;
  margin: 0 0 2px;
}
.vw-ed__desc {
  font: 400 clamp(8.5px, 0.85vw, 10.5px)/1.5 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
}
.vw-ed__footer {
  position: absolute;
  bottom: 2.2%;
  left: 41%;
  right: 3%;
  display: flex;
  justify-content: space-between;
  font: 500 8px/1 'Poppins', sans-serif;
  letter-spacing: 0.05em;
  color: #888780;
}

/* ─── Layout: chapter-divider (dunkel) ─── */
.vw-slide--chapter-divider {
  background: #191D27;
  position: relative;
  overflow: hidden;
}
.vw-chap__mark {
  position: absolute;
  top: -18%;
  right: -18%;
  width: 60%;
  opacity: 0.10;
  pointer-events: none;
}
.vw-chap__logo {
  position: absolute;
  top: 4%;
  left: 3%;
  width: 13%;
  max-width: 110px;
  height: auto;
}
.vw-chap__body {
  position: absolute;
  top: 50%;
  left: 3%;
  right: 50%;
  transform: translateY(-50%);
}
.vw-chap__num {
  font: 600 clamp(60px, 9vw, 130px)/0.8 'Legal LT Std', Georgia, serif;
  color: rgba(255,255,255,0.12);
  margin: 0;
  letter-spacing: -0.02em;
}
.vw-chap__title {
  font: 600 clamp(22px, 2.8vw, 36px)/1.05 'Legal LT Std', Georgia, serif;
  color: #FFFFFF;
  margin: 12px 0 0;
  letter-spacing: -0.015em;
}
.vw-chap__lead {
  font: 400 clamp(9px, 0.9vw, 11px)/1.55 'Poppins', sans-serif;
  color: rgba(255,255,255,0.6);
  margin: 14px 0 0;
  max-width: 38ch;
}
.vw-chap__footer {
  position: absolute;
  bottom: 3%;
  left: 3%;
  font: 500 8px/1 'Poppins', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* ─── Layout: statement (dunkel, zentriert) ─── */
.vw-slide--statement {
  background: #191D27;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vw-stmt__logo {
  position: absolute;
  top: 4%;
  left: 3%;
  width: 9%;
  max-width: 80px;
  height: auto;
}
.vw-stmt__body {
  padding: 0 12%;
  text-align: center;
}
.vw-accent--center { margin: 0 auto 18px; }
.vw-stmt__quote {
  font: 600 clamp(20px, 2.3vw, 30px)/1.3 'Legal LT Std', Georgia, serif;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.01em;
}
.vw-stmt__quote::before { content: "„"; }
.vw-stmt__quote::after  { content: """; }
.vw-stmt__caption {
  font: 500 clamp(8px, 0.85vw, 10px)/1 'Poppins', sans-serif;
  color: rgba(255,255,255,0.5);
  margin: 18px 0 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── Layout: compare ─── */
.vw-cmp__head { margin-bottom: clamp(14px, 2vw, 24px); }
.vw-cmp__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.vw-cmp__col {
  padding: 0 clamp(14px, 1.8vw, 26px);
  position: relative;
}
.vw-cmp__col:last-child {
  border-left: 0.5px solid #E5E5E0;
}
.vw-cmp__col.is-rec .vw-accent {
  position: absolute;
  top: 0;
  left: clamp(14px, 1.8vw, 26px);
  margin: 0;
}
.vw-cmp__label {
  font: 500 clamp(7px, 0.85vw, 10px)/1 'Poppins', sans-serif;
  color: #888780;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 12px 0 4px;
}
.vw-cmp__col.is-rec .vw-cmp__label { color: #9F0E1F; font-weight: 600; }
.vw-cmp__name {
  font: 600 clamp(14px, 1.5vw, 18px)/1.2 'Legal LT Std', Georgia, serif;
  color: #191D27;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.vw-cmp__rows {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.9vw, 12px);
}
.vw-cmp__row-label {
  font: 500 clamp(8px, 0.95vw, 11px)/1.2 'Poppins', sans-serif;
  color: #191D27;
  margin: 0;
}
.vw-cmp__row-value {
  font: 400 clamp(7.5px, 0.85vw, 10px)/1.4 'Poppins', sans-serif;
  color: #888780;
  margin: 1px 0 0;
}

/* ─── Layout: data-chart ─── */
.vw-dc__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(16px, 2vw, 28px);
  height: 100%;
}
.vw-dc__chart { display: flex; flex-direction: column; }
.vw-dc__bars {
  display: flex;
  align-items: flex-end;
  gap: clamp(8px, 1.2vw, 18px);
  flex: 1;
  border-bottom: 1px solid #E5E5E0;
  padding: 12px 4px;
  max-height: 60%;
}
.vw-dc__bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.vw-dc__bar-val {
  font: 600 clamp(8px, 0.95vw, 11px)/1 'Poppins', sans-serif;
  color: #191D27;
  margin: 0;
}
.vw-dc__bar-val.is-hi { color: #9F0E1F; }
.vw-dc__bar { width: 100%; background: #C9D1DA; }
.vw-dc__bar.is-hi { background: #9F0E1F; }
.vw-dc__labels {
  display: flex;
  gap: clamp(8px, 1.2vw, 18px);
  padding: 6px 4px 0;
}
.vw-dc__bar-label {
  flex: 1;
  font: 400 clamp(7px, 0.75vw, 9px)/1 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
  text-align: center;
}
.vw-dc__anchor {
  border-left: 0.5px solid #E5E5E0;
  padding-left: clamp(14px, 1.8vw, 26px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vw-dc__anchor-val {
  font: 600 clamp(28px, 4vw, 52px)/1 'Legal LT Std', Georgia, serif;
  color: #9F0E1F;
  margin: 0;
  letter-spacing: -0.02em;
}
.vw-dc__anchor-head {
  font: 600 clamp(9px, 0.95vw, 12px)/1 'Poppins', sans-serif;
  color: #191D27;
  margin: 10px 0 4px;
}
.vw-dc__anchor-desc {
  font: 400 clamp(8px, 0.85vw, 10px)/1.5 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
}
.vw-dc__source {
  font: 400 clamp(7px, 0.7vw, 8.5px)/1 'Poppins', sans-serif;
  color: #888780;
  margin: 14px 0 0;
}

/* ─── Layout: roadmap (vertikaler Zeitstrahl) ─── */
.vw-rm__head { margin-bottom: clamp(14px, 2vw, 24px); }
.vw-rm__list {
  position: relative;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 18px);
}
.vw-rm__line {
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  background: #E5E5E0;
}
.vw-rm__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: baseline;
  position: relative;
}
.vw-rm__dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 9px;
  height: 9px;
  background: #C9C6C0;
  transform: rotate(45deg);
}
.vw-rm__dot.is-done { background: #9F0E1F; }
.vw-rm__period {
  font: 600 clamp(8px, 0.9vw, 10.5px)/1 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
}
.vw-rm__period.is-done { color: #9F0E1F; }
.vw-rm__title {
  font: 600 clamp(9.5px, 1.05vw, 12.5px)/1.25 'Poppins', sans-serif;
  color: #191D27;
  margin: 0 0 2px;
}
.vw-rm__desc {
  font: 400 clamp(8px, 0.85vw, 10.5px)/1.5 'Poppins', sans-serif;
  color: #888780;
  margin: 0;
}

/* ─── Layout: closing (dunkel) ─── */
.vw-slide--closing {
  background: #191D27;
  position: relative;
  overflow: hidden;
}
.vw-cls__mark {
  position: absolute;
  bottom: -18%;
  right: -18%;
  width: 55%;
  opacity: 0.12;
  pointer-events: none;
}
.vw-cls__body {
  position: absolute;
  top: 50%;
  left: 3%;
  right: 50%;
  transform: translateY(-50%);
}
.vw-cls__title {
  font: 600 clamp(22px, 3vw, 40px)/1.05 'Legal LT Std', Georgia, serif;
  color: #FFFFFF;
  margin: 14px 0 0;
  letter-spacing: -0.015em;
}
.vw-cls__lead {
  font: 400 clamp(9px, 0.95vw, 11px)/1.55 'Poppins', sans-serif;
  color: rgba(255,255,255,0.6);
  margin: 14px 0 0;
  max-width: 36ch;
}
.vw-cls__footer {
  position: absolute;
  bottom: 4%;
  left: 3%;
  right: 3%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.vw-cls__meta {
  display: flex;
  gap: clamp(20px, 2.6vw, 36px);
}
.vw-cls__meta-label {
  font: 500 8px/1 'Poppins', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin: 0 0 4px;
}
.vw-cls__meta-val {
  font: 400 clamp(8px, 0.9vw, 10.5px)/1.55 'Poppins', sans-serif;
  color: #FFFFFF;
  margin: 0;
}
.vw-cls__logo {
  height: 22px;
  width: auto;
}

/* report — section stack, A4-ish look */
.vw-report {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.vw-section {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  padding: 28px 32px;
}
.vw-section__num {
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.vw-section__title {
  font: 600 22px/1.2 var(--sans);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--ink);
  position: relative;
}
.vw-section__title::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--red);
  margin-bottom: 12px;
}
.vw-section__body {
  font: 400 15px/1.65 var(--sans);
  color: var(--ink-2);
}
.vw-section__body p { margin: 0 0 12px; }
.vw-section__body h2,
.vw-section__body h3,
.vw-section__body h4 {
  font: 600 15px var(--sans);
  margin: 18px 0 8px;
  color: var(--ink);
}
.vw-section__body ul { padding-left: 22px; margin: 0 0 12px; }
.vw-section__body li { margin-bottom: 6px; }
.vw-section__body strong { color: var(--ink); font-weight: 600; }

/* archive row hover hint — clickable */
.table tbody tr[data-id]:hover td { background: var(--bg-soft); }


/* ─────────────────────────────────────────────
   global error banner
   ───────────────────────────────────────────── */
.app-error-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(640px, calc(100vw - 32px));
  padding: 12px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 40px -10px rgba(25,29,39,0.4);
  font: 500 13px var(--sans);
  animation: bannerRise .25s cubic-bezier(.2,.7,.2,1);
}
@keyframes bannerRise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.app-error-banner__icon {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 13px var(--mono);
}
.app-error-banner__text { flex: 1; }
.app-error-banner__close {
  background: none;
  border: 0;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  font: 400 20px/1 var(--sans);
  width: 24px; height: 24px;
  padding: 0;
}
.app-error-banner__close:hover { color: #fff; }

/* misc */
.spacer-24 { height: 24px; }

/* ─── Screenshot slide (nachträglich eingefügter Bild-Beleg) ─── */
.vw-shot {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 12px;
}
.vw-shot__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vw-shot__kicker {
  font: 500 9px/1 'Poppins', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888780;
}
.vw-shot__frame {
  flex: 1 1 auto;
  min-height: 0;
  background: #F6F6F2;
  border: 0.5px solid #E5E5E0;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vw-shot__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.vw-shot__placeholder {
  color: #888780;
  font: 500 11px/1 'Poppins', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vw-shot__caption {
  margin: 0;
  font: 400 italic 11px/1.4 'Poppins', sans-serif;
  color: #888780;
}

/* ─── Per-slide overlay controls (Screenshot hinzufügen / entfernen) ─── */
.vw-shot-add,
.vw-shot-remove {
  position: absolute;
  z-index: 4;
  border: 0.5px solid #E5E5E0;
  background: rgba(255,255,255,0.94);
  color: #191D27;
  font: 500 10px/1 'Poppins', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease;
  box-shadow: 0 1px 2px rgba(25, 29, 39, 0.06);
}
.vw-shot-add { right: 12px; bottom: 12px; }
.vw-shot-remove {
  right: 12px; top: 12px;
  padding: 6px;
  color: #9F0E1F;
}
.vw-slide:hover .vw-shot-add,
.vw-slide:hover .vw-shot-remove { opacity: 1; }
.vw-shot-add:hover { background: #9F0E1F; color: #FFFFFF; border-color: #9F0E1F; }
.vw-shot-remove:hover { background: #9F0E1F; color: #FFFFFF; border-color: #9F0E1F; }

/* ─── Upload overlay (Spinner-Modal beim Hochladen / Entfernen) ─── */
.vw-shot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(25, 29, 39, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vw-shot-overlay__box {
  background: #FFFFFF;
  padding: 16px 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 13px/1 'Poppins', sans-serif;
  color: #191D27;
  box-shadow: 0 8px 24px rgba(25, 29, 39, 0.2);
}

/* responsive */
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
