/* ════════════════════════════════════════════════════════════
   Vorstands-Dossier - screen preview + print to A4 (2 pages)
   Print via browser: Cmd/Ctrl+P, margins "default", background
   graphics ON.
   ════════════════════════════════════════════════════════════ */
:root {
  --d-navy:   #053a5e;
  --d-blue:   #045d92;
  --d-green:  #0da45a;
  --d-orange: #f6890c;
  --d-ink:    #101a29;
  --d-ink-2:  #2c3c54;
  --d-mute:   #4f6179;
  --d-line:   #dde5ef;
  --d-soft:   #f2f6fb;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: #e9eef5;
  color: var(--d-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.doc-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--d-line);
}
.doc-bar p { margin: 0; font-size: 14.5px; color: var(--d-mute); max-width: 62ch; }
.doc-bar .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.doc-bar button, .doc-bar a.btn-link {
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 999px;
  border: 1px solid var(--d-line);
  background: #fff;
  color: var(--d-ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.doc-bar button.primary {
  background: linear-gradient(135deg, #ffaf48, #f6890c);
  border-color: transparent;
  color: #2b1500;
}

.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 24px auto;
  padding: 15mm 16mm 13mm;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(5, 58, 94, 0.3);
  position: relative;
}

/* ── Head ───────────────────────────────────────────────── */
.d-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--d-navy);
}
.d-logo { display: flex; align-items: center; gap: 10px; }
.d-logo img { width: 42px; height: 42px; }
.d-logo .wm { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--d-navy); }
.d-logo .sub { font-size: 11.5px; color: var(--d-mute); margin-top: 1px; }
.d-head .meta { text-align: right; font-size: 11px; color: var(--d-mute); line-height: 1.5; }

.d-title {
  margin: 14px 0 4px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.1;
  color: var(--d-ink);
}
.d-sub { margin: 0 0 14px; font-size: 13px; color: var(--d-mute); }

.d-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.d-field {
  padding: 7px 9px;
  background: var(--d-soft);
  border-radius: 6px;
  font-size: 10.5px;
}
.d-field span { display: block; color: var(--d-mute); text-transform: uppercase; letter-spacing: 0.08em; font-size: 8.5px; margin-bottom: 3px; }
.d-field strong { font-weight: 600; color: var(--d-ink-2); font-size: 11px; }

/* ── Sections ───────────────────────────────────────────── */
.d-sec { margin-top: 12px; break-inside: avoid; }
.d-sec > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--d-navy);
  text-transform: uppercase;
}
.d-sec > h2 .n {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: var(--d-navy);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
.d-sec > p { margin: 0 0 7px; font-size: 11.5px; line-height: 1.5; color: var(--d-ink-2); }

table.d-tab {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.8px;
}
table.d-tab th, table.d-tab td {
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--d-line);
  line-height: 1.42;
}
table.d-tab thead th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--d-mute);
  border-bottom: 1.5px solid #c8d4e2;
}
table.d-tab td:first-child, table.d-tab th[scope="row"] {
  font-weight: 600;
  color: var(--d-ink);
  width: 22%;
}
table.d-tab .num { text-align: right; white-space: nowrap; font-weight: 600; color: var(--d-navy); width: 20%; }
table.d-tab tr:last-child td { border-bottom: 0; }

.d-promises {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px 14px;
  padding: 9px 11px;
  background: var(--d-soft);
  border-left: 3px solid var(--d-green);
  border-radius: 0 6px 6px 0;
}
.d-promises li { font-size: 10.6px; line-height: 1.45; color: var(--d-ink-2); }
.d-promises ol { margin: 0; padding-left: 15px; }

.d-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-step {
  padding: 8px 10px;
  border: 1px solid var(--d-line);
  border-radius: 6px;
  font-size: 10.6px;
  line-height: 1.45;
  color: var(--d-ink-2);
}
.d-step strong { display: block; font-size: 10px; color: var(--d-navy); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }

.d-resolution {
  padding: 10px 12px;
  background: #fffaf2;
  border: 1px solid #ffdfb0;
  border-radius: 6px;
  font-size: 10.8px;
  line-height: 1.55;
  color: #4a2f00;
}

.d-foot {
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px solid var(--d-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: var(--d-mute);
  line-height: 1.5;
}
.d-foot strong { color: var(--d-ink); font-size: 11px; }

.d-pagenum {
  position: absolute;
  right: 16mm;
  bottom: 8mm;
  font-size: 9px;
  color: var(--d-mute);
}

.todo {
  background: #fff3cd;
  outline: 1px dashed #b8860b;
  padding: 0 2px;
}

@media (max-width: 900px) {
  .sheet { width: 100%; min-height: 0; margin: 12px 0; padding: 18px 16px; box-shadow: none; }
  .d-fields { grid-template-columns: repeat(2, 1fr); }
  .d-promises { grid-template-columns: 1fr; }
  .d-steps { grid-template-columns: 1fr; }
  body { background: #fff; }
}

@page { size: A4; margin: 9mm; }

@media print {
  body { background: #fff; font-size: 15px; }
  .doc-bar { display: none !important; }
  .sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    break-after: page;
  }
  .sheet:last-of-type { break-after: auto; }
  .todo { background: none; outline: none; }
  a { text-decoration: none; }
}

/* ════════════════════════════════════════════════════════════
   Density pass - the dossier has to be exactly two A4 pages.
   Screen preview keeps the same rhythm so what you see prints.
   ════════════════════════════════════════════════════════════ */
.sheet { padding: 11mm 13mm 9mm; }

.d-head { padding-bottom: 7px; border-bottom-width: 2.5px; }
.d-logo img { width: 34px; height: 34px; }
.d-logo .wm { font-size: 18px; }
.d-logo .sub { font-size: 10px; }
.d-head .meta { font-size: 9.5px; line-height: 1.45; }

.d-title { margin: 10px 0 3px; font-size: 20px; }
.d-sub { margin-bottom: 9px; font-size: 11px; }

.d-fields { gap: 6px; margin-bottom: 9px; }
.d-field { padding: 5px 7px; }
.d-field span { font-size: 8px; margin-bottom: 2px; }
.d-field strong { font-size: 10px; }

.d-sec { margin-top: 9px; }
.d-sec > h2 { margin-bottom: 5px; font-size: 11.5px; }
.d-sec > h2 .n { width: 15px; height: 15px; font-size: 9.5px; border-radius: 4px; }
.d-sec > p { margin-bottom: 5px; font-size: 10.2px; line-height: 1.42; }

table.d-tab { font-size: 9.6px; }
table.d-tab th, table.d-tab td { padding: 3px 6px; line-height: 1.34; }
table.d-tab thead th { font-size: 8.2px; }

.d-promises { gap: 3px 12px; padding: 7px 9px; }
.d-promises li { font-size: 9.5px; line-height: 1.36; }

.d-steps { gap: 6px; }
.d-step { padding: 6px 8px; font-size: 9.5px; line-height: 1.36; }
.d-step strong { font-size: 9px; margin-bottom: 2px; }

.d-resolution { padding: 8px 10px; font-size: 9.8px; line-height: 1.5; }

.d-foot { margin-top: 10px; padding-top: 7px; font-size: 9px; line-height: 1.45; }
.d-foot strong { font-size: 10px; }

/* Absolute positioning has no anchor once print collapses the sheet box,
   so the number would float into the middle of the page. */
.d-pagenum { display: none; }

/* Final print-only tightening so each sheet lands inside one A4 page */
@media print {
  /* The density pass above re-declares .sheet padding after the first print
     block, so restore the print box here. */
  .sheet { padding: 0; }
  table.d-tab { font-size: 9.3px; }
  .d-sec { margin-top: 6px; }
  .d-sec > h2 { margin-bottom: 4px; }
  table.d-tab th, table.d-tab td { padding: 2.2px 6px; line-height: 1.28; }
  .d-promises { padding: 6px 9px; }
  .d-promises li { line-height: 1.3; }
  .d-step { padding: 5px 8px; line-height: 1.3; }
  .d-resolution { padding: 7px 10px; line-height: 1.45; }
  .d-foot { margin-top: 8px; padding-top: 6px; }
  .d-title { margin-top: 8px; font-size: 19px; }
  .d-fields { margin-bottom: 8px; }
}
