.topbar .right {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

.topbar .right {
      margin-left: auto;
      align-items: stretch;
    }

.preview-panel {
      display: none;
    }

.preview-wrap {
      padding: 10px;
      overflow: auto;
      max-height: calc(100vh - 120px);
      background: #fff;
    }

@page {
      margin: 1.5mm;
      size: A3 landscape;
      size: 420mm 297mm;
    }

@supports (-webkit-appearance: none) {
      @page {
        size: A3 landscape !important;
        margin: 1.5mm !important;
      }
    }

@-moz-document url-prefix() {
      @page {
        size: A3 landscape !important;
        margin: 1.5mm !important;
      }
    }

.sheet {
      width: calc(420mm - 3mm);
      min-height: calc(297mm - 3mm);
      margin: 0 auto 12px auto;
      background: #fff;
      border: 1px solid #ccd6ce;
      padding: 1.8mm;
      overflow: hidden;
      position: relative;
    }

.sheet-1 { page-break-after: always; }

.sheet-2 {
      page-break-before: auto;
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 4px;
      min-height: 0;
      background: #fff;
    }

.sheet-3 {
      page-break-before: auto;
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 4px;
      min-height: 0;
      background: #fff;
    }

.sheet-4 {
      page-break-before: auto;
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 4px;
      min-height: 0;
      background: #fff;
    }

body.planning-page-off .sheet-3 {
      display: none !important;
    }

body.budget-page-off .sheet-4 {
      display: none !important;
    }

.cover {
      height: 100%;
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 8px;
      min-height: 0;
    }

.cover-header {
      display: grid;
      grid-template-rows: auto auto;
      gap: 8px;
      min-height: 0;
    }

.cover-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }

.cover-date { font-size: 14px; color: #627468; }

.cover-logo {
      border: 2px solid var(--green);
      border-radius: 12px;
      padding: 10px 12px;
      font-weight: 700;
      color: var(--green);
      max-width: 340px;
    }

.cover-logo img {
      display: none;
      width: auto;
      height: auto;
      max-width: 100%;
      max-height: 64px;
      object-fit: contain;
    }

.cover-logo.has-image img {
      display: block;
    }

.cover-logo.has-image .cover-logo-text {
      display: none;
    }

.cover-logo:not(.has-image) .cover-logo-text {
      display: block;
    }

.cover-hero {
      overflow: hidden;
    }

.cover-hero h1 {
      margin: 0 0 10px 0;
      font-size: 52px;
      line-height: 1;
      letter-spacing: -0.02em;
      color: #1b2537;
    }

.cover-hero p {
      margin: 0;
      font-size: 20px;
      color: #445266;
      max-width: 80%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

.cover-image {
      border: 2px solid #bfc8c1;
      border-radius: 10px;
      overflow: hidden;
      background: #f5f7f5;
      min-height: 520px;
      position: relative;
    }

.cover-content-frame {
      display: grid;
      grid-template-rows: minmax(0, 1fr) auto;
      gap: 8px;
      min-height: 0;
    }

.cover-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: none;
    }

.cover-image.has-image img {
      display: block;
    }

.cover-image-placeholder {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      text-align: center;
      padding: 16px;
      color: #617067;
      font-size: 15px;
      line-height: 1.35;
      background: linear-gradient(135deg, #f2f7f3 0%, #ffffff 100%);
    }

.cover-image.has-image .cover-image-placeholder {
      display: none;
    }

.cover-meta {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

.meta-pill {
      border: 1px solid #cde5d6;
      border-radius: 10px;
      padding: 10px;
      background: #f8fdf9;
      font-size: 12px;
      min-height: 68px;
      overflow: hidden;
    }

.meta-pill strong { display: block; color: #0b6c3a; margin-bottom: 4px; }

.p2-header {
      display: block;
      margin-bottom: 6px;
    }

.p2-top {
      display: flex;
      justify-content: space-between;
      align-items: start;
      gap: 10px;
    }

.p2-hero {
      display: block;
    }

.p2-meta {
      margin: 0 0 1px 0;
      font-size: 12px;
      color: #6e7783;
      font-weight: 500;
    }

.p2-title {
      margin: 0;
      font-size: 25px;
      line-height: 1.08;
      color: #1a2230;
      font-weight: 900;
      letter-spacing: -0.01em;
      white-space: normal;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

.p2-title.long { font-size: 23px; }

.p2-title.xlong { font-size: 20px; }

.p2-date { display: none; }

.p2-logo {
      display: none;
      max-width: 340px;
    }

.p2-logo img {
      display: none;
      width: auto;
      height: auto;
      max-width: 100%;
      max-height: 64px;
      object-fit: contain;
    }

.p2-logo.has-image img {
      display: block;
    }

.p2-logo.has-image .p2-logo-text {
      display: none;
    }

.p2-logo:not(.has-image) .p2-logo-text {
      display: block;
    }

.report-grid {
      display: grid;
      grid-template-rows: minmax(0, 0.34fr) minmax(0, 1.34fr) minmax(0, 0.78fr);
      gap: 3px;
      height: calc(100% - 22px);
      margin: 11px 0;
      min-height: 0;
      overflow: hidden;
      align-content: start;
    }

.planning-page-grid {
      height: calc(100% - 22px);
      margin: 11px 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr);
      gap: 0;
      align-items: start;
      overflow: hidden;
      align-content: start;
    }

.budget-page-grid {
      height: calc(100% - 22px);
      margin: 11px 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr);
      gap: 0;
      align-items: start;
      overflow: hidden;
      align-content: start;
    }

.planning-card {
      min-height: 0;
      height: 100%;
      grid-column: 1;
      grid-row: 1;
    }

.budget-page-card {
      min-height: 0;
      height: 100%;
      grid-column: 1;
      grid-row: 1;
    }

.planning-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      margin-bottom: 6px;
    }

.planning-kpi {
      border: 1px solid #d7e0eb;
      background: #f7fafd;
      padding: 4px 6px;
      min-height: 32px;
    }

.planning-kpi .label {
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: #4b5d76;
      font-weight: 700;
      line-height: 1.1;
    }

.planning-kpi .value {
      display: block;
      margin-top: 2px;
      font-size: 13px;
      color: #1f2b3a;
      font-weight: 800;
      line-height: 1.1;
    }

.gantt-wrap {
      font-size: 11px;
      line-height: 1.2;
      min-height: 0;
      height: auto;
      overflow: hidden;
      display: grid;
      grid-template-rows: auto auto;
      gap: 5px;
      margin-bottom: 8px;
    }

.gantt-years-row {
      display: grid;
      grid-template-columns: 21% 79%;
      gap: 6px;
      align-items: center;
      margin-bottom: 2px;
    }

.gantt-years-row .y-label {
      font-size: 9px;
      color: #42546d;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

.gantt-years {
      display: flex;
      gap: 0;
      border-bottom: 1px solid #dbe4ee;
      padding: 0 0 2px 0;
      font-size: 9px;
      color: #42546d;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.02em;
      margin-bottom: 2px;
    }

.gantt-years span {
      min-width: 0;
      text-align: center;
      border-left: 1px solid #e3eaf2;
      font-weight: 800;
    }

.gantt-years span:first-child { border-left: 0; }

.gantt-months-row {
      display: grid;
      grid-template-columns: 21% 79%;
      gap: 6px;
      align-items: center;
      margin-bottom: 2px;
    }

.gantt-months-row .m-label {
      font-size: 9px;
      color: #42546d;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

.gantt-months-grid {
      display: flex;
      gap: 0;
      border-bottom: 1px solid #dbe4ee;
      padding: 0 0 2px 0;
      font-size: 9px;
      color: #42546d;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.02em;
      margin-bottom: 2px;
    }

.gantt-months-grid span {
      min-width: 0;
      text-align: center;
      border-left: 1px solid #e3eaf2;
    }

.gantt-months-grid span:first-child { border-left: 0; }

.gantt-weeks-row {
      display: grid;
      grid-template-columns: 21% 79%;
      gap: 6px;
      align-items: center;
      margin-bottom: 2px;
    }

.gantt-weeks-row .w-label {
      font-size: 9px;
      color: #42546d;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

.gantt-weeks {
      display: flex;
      gap: 0;
      border-bottom: 1px solid #dbe4ee;
      padding: 0 0 2px 0;
      font-size: 8.5px;
      color: #516782;
      font-weight: 700;
      letter-spacing: 0.01em;
      margin-bottom: 2px;
    }

.gantt-weeks span {
      flex: 1 1 0;
      min-width: 0;
      text-align: center;
      border-left: 1px solid #e3eaf2;
      padding: 0 1px;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

.gantt-weeks span:first-child { border-left: 0; }

.gantt-head {
      display: grid;
      grid-template-columns: 21% 79%;
      gap: 6px;
      border-bottom: 1px solid #dbe4ee;
      padding-bottom: 3px;
      font-size: 10px;
      font-weight: 700;
      color: #30465e;
      text-transform: uppercase;
      letter-spacing: 0.02em;
    }

.gantt-plan-label {
      text-align: left;
      color: #30465e;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.02em;
    }

.gantt-body {
      min-height: 0;
      overflow: hidden;
      display: grid;
      align-content: start;
      gap: 1px;
    }

.gantt-row {
      display: grid;
      grid-template-columns: 21% 79%;
      gap: 6px;
      align-items: center;
      min-height: 16px;
    }

.gantt-label {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #243546;
      font-size: 10.8px;
    }

.gantt-track {
      position: relative;
      height: 12px;
      border: 1px solid #d8e2ec;
      background: #f7fafd;
      overflow: hidden;
    }

.gantt-bar {
      position: absolute;
      top: 1px;
      bottom: 1px;
      border-radius: 2px;
      min-width: 2px;
      background: #8aa3bf;
    }

.gantt-bar.g { background: #1f9364; }

.gantt-bar.o { background: #bf7c24; }

.gantt-bar.r { background: #9e3f45; }

.gantt-empty {
      color: #5e6f81;
      font-size: 11px;
      padding-top: 4px;
    }

.gantt-wrap.dense .gantt-row {
      min-height: 14px;
      gap: 3px;
    }

.gantt-wrap.dense .gantt-body {
      gap: 1px;
    }

.gantt-wrap.dense .gantt-head {
      font-size: 9px;
      padding-bottom: 2px;
    }

.gantt-wrap.dense .gantt-label {
      font-size: 9.5px;
      line-height: 1.05;
    }

.gantt-wrap.dense .gantt-track {
      height: 8px;
    }

.planning-conclusion {
      border-top: 1px solid #dbe4ee;
      padding-top: 4px;
    }

.planning-conclusion h4 {
      margin: 0 0 3px 0;
      font-size: 9.4px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: #3f536e;
    }

.planning-conclusion ul {
      margin: 0;
      padding-left: 14px;
      display: grid;
      gap: 1px;
      font-size: 9.8px;
      color: #25384e;
      line-height: 1.2;
    }

.planning-conclusion li {
      margin: 0;
    }

.planning-image-wrap {
      border: 1px solid #d8e2ec;
      background: #f9fcff;
      min-height: 120px;
      display: none;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

.planning-image-wrap.show, .planning-image-wrap.has-image {
      display: flex;
    }

.planning-image-wrap .empty-note {
      font-size: 12px;
      color: #5c7090;
      text-align: center;
      padding: 12px;
    }

.planning-image-wrap img {
      width: 100%;
      height: auto;
      max-height: 100%;
      object-fit: contain;
      display: none;
    }

.planning-image-wrap.has-image img {
      display: block;
    }

.budget-image-wrap {
      border: 1px solid #d8e2ec;
      background: #f9fcff;
      min-height: 120px;
      display: none;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

.budget-image-wrap.show, .budget-image-wrap.has-image {
      display: flex;
    }

.budget-image-wrap .empty-note {
      font-size: 12px;
      color: #5c7090;
      text-align: center;
      padding: 12px;
    }

.budget-image-wrap img {
      width: 100%;
      height: auto;
      max-height: 100%;
      object-fit: contain;
      display: none;
    }

.budget-image-wrap.has-image img {
      display: block;
    }

.cards-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; min-height: 0; align-items: stretch; }

.cards-row.bottom-row { align-items: stretch; }

.cards-row.bottom-row .card { grid-template-rows: auto 1fr; }

.card {
      border: 1px solid #c6d0db;
      border-radius: 0;
      background: #fff;
      padding: 9px;
      display: grid;
      grid-template-rows: auto 1fr;
      overflow: hidden;
      min-height: 0;
      min-width: 0;
      position: relative;
    }

.card[data-tone="g"] { border-color: #c6d0db; }

.card[data-tone="o"] { border-color: #c6d0db; }

.card[data-tone="r"] { border-color: #c6d0db; }

.card-head {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      margin-bottom: 6px;
      gap: 6px;
      min-height: 22px;
      border-bottom: 1px solid #dde4ed;
      padding-bottom: 4px;
    }

.card-head h3 {
      margin: 0;
      font-size: 12px;
      color: #1f2b3a;
      font-weight: 700;
      letter-spacing: 0.01em;
      line-height: 1.08;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-transform: uppercase;
    }

.cards-row.bottom-row .card-head h3 { font-size: 12px; line-height: 1.08; }

.cards-row.bottom-row .card-head {
      min-height: 24px;
      margin-bottom: 6px;
      padding-bottom: 5px;
    }

.status-indicator {
      width: auto;
      min-width: 0;
      height: auto;
      border-radius: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      border: none;
      background: transparent;
      padding: 0;
      font-size: 10px;
      color: #1f2937;
      font-weight: 800;
      letter-spacing: 0.02em;
    }

.status-indicator.g, .status-indicator.o, .status-indicator.r { color: #1f2937; }

.status-symbol {
      display: inline;
      font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
      color: currentColor;
      font-weight: 800;
      font-size: 11px;
      line-height: 1;
      font-style: normal;
      letter-spacing: 0;
    }

.card-content {
      font-size: 11.5px;
      line-height: 1.32;
      overflow: hidden;
      min-height: 0;
      min-width: 0;
    }

.cards-row:nth-child(2) .card-content {
      line-height: 1.2;
    }

.cards-row:nth-child(2) .card:first-child .card-content {
      line-height: 1.16;
    }

.table-card .card-content {
      display: block;
      padding-top: 0;
      margin-top: 0;
    }

.cards-row.bottom-row .table-card .card-content {
      padding-top: 0;
      margin-top: 0;
    }

.card-content p { margin: 0 0 5px 0; }

.card-content ul { margin: 0; padding-left: 14px; }

.card-content li {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0 0 4px 0;
    }

.progress-group { margin-bottom: 6px; }

.status-list { list-style: none; padding-left: 0; margin: 0; }

.status-list li {
      display: grid;
      grid-template-columns: 12px minmax(0, 1fr);
      gap: 4px;
      align-items: baseline;
      white-space: normal;
      overflow: hidden;
    }

.status-list li span:last-child {
      display: block;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      line-height: 1.15;
    }

.status-mark {
      font-size: 10px;
      line-height: 1;
      color: #68766d;
      text-align: center;
      font-weight: 700;
    }

.status-mark.done { color: #18aa57; }

.status-mark.doing { color: #df8e14; }

.status-mark.next { color: #97a3ad; }

.clamp {
      display: -webkit-box;
      -webkit-line-clamp: 7;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

.cards-row:first-child .clamp {
      -webkit-line-clamp: 6;
      line-clamp: 6;
    }

.right { text-align: right; }

.table-card table {
      border: 1px solid #cfdbd3;
      background: #fff;
    }

.table-card th {
      background: #e8edf3;
      color: #223042;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      font-size: 0.9em;
    }

.table-card tbody tr:nth-child(even) td {
      background: #f7f9fc;
    }

.table-card td {
      white-space: normal;
      word-break: normal;
      overflow-wrap: anywhere;
      hyphens: auto;
      hyphenate-character: "-";
      overflow: hidden;
      text-overflow: ellipsis;
    }

.table-card .cell-text {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      line-height: 1.2;
    }

.table-card .cell-1 { -webkit-line-clamp: 1; }

.milestone-table td:last-child, .issue-table td:nth-child(2), .risk-table td:nth-child(2), .risk-table td:nth-child(3) {
      text-align: center;
      white-space: nowrap;
    }

.milestone-table th:nth-child(1), .milestone-table td:nth-child(1) { width: 66%; }

.milestone-table th:nth-child(2), .milestone-table td:nth-child(2) { width: 18%; }

.milestone-table th:nth-child(3), .milestone-table td:nth-child(3) { width: 14%; }

.budget-table th:nth-child(1), .budget-table td:nth-child(1) { width: 48%; }

.budget-table th:nth-child(2), .budget-table td:nth-child(2) { width: 19%; }

.budget-table th:nth-child(3), .budget-table td:nth-child(3) { width: 21%; }

.budget-table th:nth-child(4), .budget-table td:nth-child(4) { width: 12%; }

.budget-table th:nth-child(4), .budget-table td:nth-child(4) { text-align: right; }

.budget-table td:nth-child(2), .budget-table td:nth-child(3), .budget-table td:nth-child(4) {
      font-variant-numeric: tabular-nums;
    }

.milestone-table td:nth-child(2) {
      font-variant-numeric: tabular-nums;
    }

.issue-table th:nth-child(1), .issue-table td:nth-child(1) { width: 41%; }

.issue-table th:nth-child(2), .issue-table td:nth-child(2) { width: 18%; }

.issue-table th:nth-child(3), .issue-table td:nth-child(3) { width: 41%; }

.risk-table th:nth-child(1), .risk-table td:nth-child(1) { width: 37.5%; }

.risk-table th:nth-child(2), .risk-table td:nth-child(2) { width: 12%; }

.risk-table th:nth-child(3), .risk-table td:nth-child(3) { width: 13%; }

.risk-table th:nth-child(4), .risk-table td:nth-child(4) { width: 37.5%; }

.issue-table, .risk-table {
      border: none;
      border-collapse: collapse;
      border-spacing: 0;
    }

.issue-table thead th, .issue-table tbody td, .risk-table thead th, .risk-table tbody td {
      border: 1px solid #d7dde3;
    }

.issue-table thead th:first-child, .issue-table tbody td:first-child, .risk-table thead th:first-child, .risk-table tbody td:first-child {
      border-left: none;
    }

.issue-table thead th:last-child, .issue-table tbody td:last-child, .risk-table thead th:last-child, .risk-table tbody td:last-child {
      border-right: none;
    }

.issue-table thead th, .risk-table thead th {
      border-bottom: 2px solid #c6ced6;
    }

.decision-table th:nth-child(1), .decision-table td:nth-child(1) { width: 46%; }

.decision-table th:nth-child(2), .decision-table td:nth-child(2) { width: 30%; }

.decision-table th:nth-child(3), .decision-table td:nth-child(3) { width: 24%; }

.decision-table td:nth-child(3), .decision-table th:nth-child(3) {
      text-align: center;
      white-space: nowrap;
      padding-left: 2px;
      padding-right: 2px;
      font-size: 0.9em;
    }

/* Besluitstatus (VGR punt 11): gekleurde, vette tekst met label —
   kleurenblind-veilig want de tekst staat er altijd bij, en past netjes in
   de smalle kolom (breekt gerust over twee regels). Open = neutraal,
   In behandeling = oranje, Gesloten = groen. Zelfde taal als de
   niveau-teksten in de issue-/risicotabel. */
.decision-table td .decision-status-badge {
      display: inline-block !important;
      max-width: 100%;
      font-size: 0.8em;
      font-weight: 700;
      line-height: 1.2;
      color: #56606e;
      word-break: keep-all !important;
      overflow-wrap: normal !important;
      hyphens: none !important;
      -webkit-hyphens: none !important;
    }

.decision-table td .decision-status-badge.o { color: #b26a00; }

.decision-table td .decision-status-badge.g { color: #0a7a45; }

.budget-table tbody tr.total-row td {
      white-space: nowrap;
      overflow: visible;
      text-overflow: clip;
      font-variant-numeric: tabular-nums;
    }

.issue-table .cell-text {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      line-height: 1.2;
      white-space: normal;
      text-overflow: ellipsis;
    }

.risk-table td:nth-child(1) .cell-text, .risk-table td:nth-child(4) .cell-text {
      display: block;
      line-height: 1.16;
      min-block-size: calc(3 * 1.16em);
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      word-break: normal;
      overflow-wrap: break-word;
      hyphens: auto;
      -webkit-line-clamp: unset;
      -webkit-box-orient: initial;
    }

.decision-table .cell-text {
      display: block;
      line-height: 1.2;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
    }

.issue-table td:nth-child(1) .cell-text, .issue-table td:nth-child(3) .cell-text, .decision-table td:nth-child(1) .cell-text {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
      line-height: 1.16;
      min-block-size: calc(3 * 1.16em);
      white-space: normal;
      text-overflow: ellipsis;
    }

.issue-table td {
      vertical-align: top;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      word-break: normal;
      overflow-wrap: anywhere;
      hyphens: auto;
      hyphenate-character: "-";
    }

.risk-table td {
      vertical-align: top;
      overflow: visible;
      text-overflow: clip;
      white-space: normal;
      word-break: normal;
      overflow-wrap: break-word;
      hyphens: auto;
      hyphenate-character: "-";
    }

.decision-table td {
      vertical-align: top;
      overflow: visible;
      text-overflow: clip;
      white-space: normal;
      word-break: normal;
      overflow-wrap: anywhere;
      hyphens: auto;
      hyphenate-character: "-";
    }

.issue-table th, .risk-table th, .decision-table th {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: clip;
      line-height: 1.08;
      font-size: 0.95em;
      padding-top: 1.8px;
      padding-bottom: 1.8px;
    }

.cards-row.bottom-row .card-content {
      overflow: hidden;
      display: block;
    }

.cards-row.bottom-row table {
      height: auto;
      align-self: auto;
    }

.budget-table tbody tr:nth-child(odd) td {
      background: #fff;
    }

.budget-table tbody tr:nth-child(even) td {
      background: #f7f9fc;
    }

.budget-table tbody tr.total-row td {
      background: #e9eeea !important;
      font-weight: 800;
      border-top: 2px solid #8ea296;
      white-space: nowrap;
      overflow: visible;
      text-overflow: clip;
      font-variant-numeric: tabular-nums;
    }

.issue-table tbody tr.tone-high:not(.no-data-row) td, .risk-table tbody tr.tone-high:not(.no-data-row) td, .issue-table tbody tr.tone-medium:not(.no-data-row) td, .risk-table tbody tr.tone-medium:not(.no-data-row) td, .issue-table tbody tr.tone-low:not(.no-data-row) td, .risk-table tbody tr.tone-low:not(.no-data-row) td {
      background: #fff;
    }

.issue-table tbody tr.tone-high:not(.no-data-row):nth-child(even) td, .risk-table tbody tr.tone-high:not(.no-data-row):nth-child(even) td, .issue-table tbody tr.tone-medium:not(.no-data-row):nth-child(even) td, .risk-table tbody tr.tone-medium:not(.no-data-row):nth-child(even) td, .issue-table tbody tr.tone-low:not(.no-data-row):nth-child(even) td, .risk-table tbody tr.tone-low:not(.no-data-row):nth-child(even) td {
      background: #f7f9fc;
    }

.level-text {
      font-weight: 650;
      font-size: 0.95em;
      line-height: 1.1;
      display: inline-block;
      white-space: nowrap;
    }

.level-high { color: #c62828; }

.level-medium { color: #b26d00; }

.level-low { color: #1f7f48; }

.status-dot-inline {
      display: inline-flex;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #bbb;
      vertical-align: middle;
      align-items: center;
      justify-content: center;
    }

.status-dot-inline.g { background: var(--green); }

.status-dot-inline.o { background: var(--orange); }

.status-dot-inline.r { background: var(--red); }

.status-dot-inline .status-symbol {
      display: none;
      font-size: 8px;
      color: #111;
      font-weight: 700;
      line-height: 1;
    }

.percent-badge.g { background: #0b9d52; }

.percent-badge.o { background: #e88a00; }

.percent-badge.r { background: #d62828; }

.budget-status-text {
      font-weight: 600;
      color: #1f2937;
      font-size: 0.95em;
      white-space: nowrap;
    }

.budget-note {
      margin: 0 0 5px 0;
      font-size: 0.98em;
      line-height: 1.24;
      color: #30473a;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 10;
      overflow: hidden;
    }

#vBudgetPageNote {
      -webkit-line-clamp: 20;
    }

.budget-page-section-title {
      margin: 0 0 4px 0;
      font-size: 9.8px;
      line-height: 1.1;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      font-weight: 700;
      color: #455a73;
    }

.budget-page-divider {
      border-top: 1px solid #dbe4ee;
      margin: 6px 0 5px;
    }

.badge {
      display: inline-block;
      border-radius: 999px;
      color: #fff;
      font-size: 9px;
      min-width: 42px;
      text-align: center;
      font-weight: 700;
      padding: 1px 5px;
    }

.bg-g { background: var(--green); }

.bg-o { background: var(--orange); }

.bg-r { background: var(--red); }

.sheet-note {
      position: absolute;
      right: 10mm;
      bottom: 8mm;
      font-size: 10px;
      color: #6a766e;
    }

.sheet-credit {
      position: absolute;
      right: 2.4mm;
      bottom: 1.8mm;
      font-size: 7px;
      color: #8d97a5;
      letter-spacing: 0.01em;
    }

@media screen {
.topbar .right {
        gap: var(--sp-3);
        align-items: center;
      }
}

@media print {
      :root {
        --p2-content-height: calc(100% - 22mm);
        --p2-content-margin-y: 11mm;
        --p2-content-margin-top: calc(var(--p2-content-margin-y) * 0.80);
        --p2-content-margin-bottom: calc(var(--p2-content-margin-y) * 1.20);
        --p2-header-gap: 1.2mm;
        --print-title-top-bump: 10mm; /* duidelijke top-witruimte boven titel, met ondercompensatie */
        --print-card-radius: 1.6mm;
        --print-table-line: #d6dee8;
        --print-table-head: #eaf0f5;
      }

      /* Watermerk voor gratis/demo-export: een herhaald diagonaal patroon
         over de hele pagina (ook over tabellen heen), consistent op elke
         sheet. Als achtergrondpatroon (SVG data-URI) i.p.v. losse CSS
         `content`-tekst: Chromium schrijft dit als afbeeldingslaag naar de
         PDF, niet als selecteerbare tekst — "tekst aanklikken en
         verwijderen" in een PDF-editor pakt dit niet meer, en het overlapt
         de echte inhoud (niet alleen lege witruimte), dus ook overtekenen
         vraagt om de onderliggende data te reconstrueren. Bewust een lage
         dekking per herhaling (0.11) — de dichtheid komt van de herhaling,
         niet van één schreeuwerige tekst; de gratis PDF blijft een bruikbare
         preview van de tool. Tekst is de herkomst (voortgangsrapportage.nl),
         geen "demo"-stempel — een gedeelde gratis PDF verwijst zo altijd
         naar waar hij gemaakt is, in plaats van "onaf" te ogen. */
      body.pro-demo-watermark .sheet::after,
      body.pro-demo-watermark .sheet::before {
        content: none;
      }

      body.pro-demo-watermark .sheet::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 20;
        pointer-events: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='150'%3E%3Ctext x='190' y='75' text-anchor='middle' dominant-baseline='middle' transform='rotate(-18 190 75)' font-family='Arial, Helvetica, sans-serif' font-size='22' font-weight='800' letter-spacing='0.3' fill='rgba(42,73,113,0.09)'%3EVoortgangsrapportage.nl%3C/text%3E%3C/svg%3E");
        background-repeat: repeat;
        background-size: 155mm 62mm;
      }

      body.pro-demo-watermark .sheet::after {
        content: "Voortgangsrapportage.nl — activeer Pro voor een watermerkvrije PDF";
        position: absolute;
        right: 10mm;
        bottom: 8mm;
        padding: 2mm 3.2mm;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.9);
        border: 0.2mm solid rgba(42, 73, 113, 0.22);
        color: rgba(42, 73, 113, 0.85);
        font-size: 3.2mm;
        font-weight: 700;
        letter-spacing: 0.02em;
        z-index: 21;
      }

      html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
      }

      .topbar,
      .topbar-toast,
      .documentbar,
      .mobile-print-warning,
      .editor-recovery-notice,
      .editor-view,
      #guidedShell,
      #guidedFooter,
      #screenPreviewAnchor,
      .panel.form-panel,
      .panel.preview-panel > .head {
        display: none !important;
      }
      .preview-toggle { display: none !important; }
      .screen-editor-shell {
        min-height: 0 !important;
        padding: 0 !important;
        background: #fff !important;
      }
      .app {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
      }
      .report-view {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
      }
      .panel.preview-panel {
        display: block !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        background: #fff !important;
      }
      .preview-wrap {
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
      }

      .sheet {
        width: 100%;
        height: calc(297mm - 3mm);
        min-height: calc(297mm - 3mm);
        max-height: calc(297mm - 3mm);
        border: none;
        margin: 0 auto;
        padding: 1.2mm;
        box-sizing: border-box;
        break-inside: avoid;
        page-break-inside: avoid;
        overflow: hidden;
      }

      .sheet-1 { break-after: page; page-break-after: always; }
      .sheet-2 {
        break-before: auto;
        page-break-before: auto;
        break-after: page;
        page-break-after: always;
        gap: 0.8mm;
      }
      .sheet-3 {
        break-before: auto;
        page-break-before: auto;
        gap: 0.8mm;
      }
      .sheet-4 {
        break-before: auto;
        page-break-before: auto;
        gap: 0.8mm;
      }
      body.budget-page-on .sheet-3 {
        break-after: page;
        page-break-after: always;
      }
      body.budget-page-off .sheet-3 {
        break-after: auto;
        page-break-after: auto;
      }
      .sheet-note {
        left: 3.2mm;
        right: auto;
        bottom: 1.8mm;
        font-size: 7px;
        color: #8d97a5;
        letter-spacing: 0.01em;
        display: block !important;
      }
      .sheet-credit {
        right: 3.2mm;
        bottom: 1.8mm;
      }

      .p2-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 6mm;
        row-gap: 0;
        align-items: start;
        padding-top: var(--print-title-top-bump);
        margin-bottom: calc(var(--p2-header-gap) - var(--print-title-top-bump));
      }
      .p2-meta {
        grid-column: 1;
        grid-row: 2;
        font-size: 3.4mm;
        line-height: 1;
        margin: -1.1mm 0 0 0;
      }
      .p2-title {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
      }
      .p2-date {
        display: none !important;
      }
      .p2-logo {
        display: block;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        border: none !important;
        border-radius: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
      }
      .p2-logo .p2-logo-text {
        border: none !important;
        background: transparent !important;
        padding: 0;
        margin: 0;
      }
      .p2-logo.has-image img {
        max-height: 19.2mm;
        max-width: 64mm;
      }
      .p2-title {
        font-size: 7.7mm;
        line-height: 1.08;
      }
      .p2-title.long { font-size: 7.2mm; }
      .p2-title.xlong { font-size: 6.8mm; }

      .card,
      .meta-pill,
      .planning-kpi,
      .planning-image-wrap,
      .budget-image-wrap,
      .table-card table {
        border-radius: var(--print-card-radius);
      }

      .report-grid {
        height: var(--p2-content-height);
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0;
        grid-template-rows: minmax(0, 0.2142fr) minmax(0, 0.6035985fr) minmax(0, 0.2882015fr);
        gap: 0.8mm;
        overflow: hidden;
        align-content: start;
      }
      .sheet-1 .cover {
        grid-template-rows: auto 1fr;
        gap: 0;
      }
      .sheet-1 .cover-header,
      .sheet-2 .p2-header,
      .sheet-3 .p2-header,
      .sheet-4 .p2-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto;
        column-gap: 6mm;
        row-gap: 0;
        align-items: start;
        padding-top: var(--print-title-top-bump);
        margin-bottom: calc(var(--p2-header-gap) - var(--print-title-top-bump));
      }
      .sheet-1 .cover-top,
      .sheet-2 .p2-top,
      .sheet-3 .p2-top,
      .sheet-4 .p2-top {
        display: contents;
      }
      .sheet-1 .cover-date,
      .sheet-2 .p2-date,
      .sheet-3 .p2-date,
      .sheet-4 .p2-date {
        display: none !important;
        grid-column: 1;
        grid-row: 1;
        align-self: start;
      }
      .sheet-1 .cover-hero,
      .sheet-2 .p2-hero,
      .sheet-3 .p2-hero,
      .sheet-4 .p2-hero {
        grid-column: 1;
        grid-row: 1;
      }
      .sheet-1 .cover-logo,
      .sheet-2 .p2-logo,
      .sheet-3 .p2-logo,
      .sheet-4 .p2-logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
      }
      .sheet-1 .cover-logo,
      .sheet-2 .p2-logo,
      .sheet-3 .p2-logo,
      .sheet-4 .p2-logo {
        border: none !important;
        border-radius: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
      }
      .sheet-1 .cover-logo .cover-logo-text,
      .sheet-2 .p2-logo .p2-logo-text,
      .sheet-3 .p2-logo .p2-logo-text,
      .sheet-4 .p2-logo .p2-logo-text {
        border: none !important;
        background: transparent !important;
        padding: 0;
        margin: 0;
      }
      .sheet-1 .cover-logo.has-image img,
      .sheet-2 .p2-logo.has-image img,
      .sheet-3 .p2-logo.has-image img,
      .sheet-4 .p2-logo.has-image img {
        max-height: 19.2mm; /* 20% smaller to reduce tall uploaded logos */
        max-width: 64mm;
      }
      .sheet-1 .cover-hero h1,
      .sheet-2 .p2-hero .p2-title,
      .sheet-3 .p2-hero .p2-title,
      .sheet-4 .p2-hero .p2-title {
        font-size: 7.7mm;
        line-height: 1.08;
        margin: 0 0 1.2mm 0;
      }
      .sheet-2 .p2-hero .p2-title.long,
      .sheet-3 .p2-hero .p2-title.long,
      .sheet-4 .p2-hero .p2-title.long {
        font-size: 7.2mm;
      }
      .sheet-2 .p2-hero .p2-title.xlong,
      .sheet-3 .p2-hero .p2-title.xlong,
      .sheet-4 .p2-hero .p2-title.xlong {
        font-size: 6.8mm;
      }
      .sheet-1 .cover-hero p,
      .sheet-2 .p2-hero .p2-meta,
      .sheet-3 .p2-hero .p2-meta,
      .sheet-4 .p2-hero .p2-meta {
        font-size: 3.8mm;
        line-height: 1.08;
        margin: 0;
        max-width: 100%;
        color: #445266;
        font-weight: 400;
      }
      .sheet-1 .cover-content-frame {
        height: var(--p2-content-height);
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0.7mm;
        min-height: 0;
      }
      .sheet-1 .cover-image {
        min-height: 0;
      }
      .sheet-1 .cover-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        border: 0.16mm solid rgba(55, 74, 98, 0.11);
        border-radius: 2.1mm;
        background: linear-gradient(180deg, rgba(253, 254, 255, 0.98) 0%, rgba(247, 249, 252, 0.98) 100%);
        box-shadow: inset 0 0.22mm 0 rgba(255, 255, 255, 0.88);
        overflow: hidden;
      }
      .sheet-1 .cover-meta .meta-pill {
        min-height: 14.2mm;
        padding: 2.25mm 3.2mm 2.4mm;
        border: 0;
        border-right: 0.18mm solid rgba(55, 74, 98, 0.1);
        border-radius: 0;
        background: transparent;
        font-size: 3.0mm;
        line-height: 1.3;
        box-shadow: none;
      }
      .sheet-1 .cover-meta .meta-pill:last-child {
        border-right: 0;
      }
      .sheet-1 .cover-meta .meta-pill strong {
        margin-bottom: 0.8mm;
        color: #748599;
        font-size: 2.15mm;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
      }
      .sheet-1 .cover-meta .meta-pill span {
        display: block;
        color: #223446;
        font-weight: 580;
        line-height: 1.24;
        overflow-wrap: anywhere;
      }
      .cards-row.bottom-row,
      .cards-row.bottom-row .card {
        break-inside: avoid;
        page-break-inside: avoid;
      }
      .cards-row.bottom-row .card-content {
        overflow: hidden;
      }
      .planning-page-grid {
        height: var(--p2-content-height);
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
      }
      .budget-page-grid {
        height: var(--p2-content-height);
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
      }
      .planning-card { height: 100%; grid-column: 1; grid-row: 1; }
      .budget-page-card { height: 100%; grid-column: 1; grid-row: 1; }
      .planning-summary { gap: 1mm; margin-bottom: 0.8mm; }
      .planning-kpi { min-height: 8.5mm; padding: 0.8mm 1.1mm; }
      .planning-kpi .label { font-size: 2.4mm; }
      .planning-kpi .value { font-size: 3.9mm; }
      .gantt-wrap.dense .gantt-row { min-height: 9.45mm; gap: 1.1mm; }
      .gantt-wrap.dense .gantt-body { gap: 1px; }
      .gantt-wrap.dense .gantt-head { font-size: 3.45mm; padding-bottom: 0.7mm; }
      .gantt-wrap.dense .gantt-label { font-size: 4.0mm; }
      .gantt-wrap.dense .gantt-track { height: 6.9mm; }
      .gantt-years-row { gap: 0.9mm; margin-bottom: 0.3mm; }
      .gantt-years-row .y-label { font-size: 2.3mm; }
      .gantt-years { font-size: 2.3mm; padding-bottom: 0.3mm; margin-bottom: 0; }
      .gantt-months-row { gap: 0.9mm; margin-bottom: 0.3mm; }
      .gantt-months-row .m-label { font-size: 2.2mm; }
      .gantt-months-grid { font-size: 2.2mm; padding-bottom: 0.3mm; margin-bottom: 0; }
      .gantt-weeks-row { gap: 0.9mm; margin-bottom: 0.3mm; }
      .gantt-weeks-row .w-label { font-size: 2.2mm; }
      .gantt-weeks { font-size: 2.0mm; padding-bottom: 0.3mm; margin-bottom: 0; }
      .gantt-wrap { font-size: 4.15mm; gap: 1.1mm; }
      .gantt-head { font-size: 3.45mm; padding-bottom: 0.7mm; }
      .gantt-row { min-height: 9.45mm; gap: 1.1mm; }
      .planning-conclusion { padding-top: 1mm; }
      .planning-conclusion h4 { font-size: 2.5mm; margin-bottom: 0.5mm; }
      .planning-conclusion ul { font-size: 2.8mm; gap: 0.4mm; }
      .gantt-track { height: 6.9mm; }
      .gantt-label { font-size: 4.0mm; }
      .cards-row {
        gap: 1.28mm;
        min-height: 0;
      }
      .report-grid {
        gap: 1.1mm;
      }
      .card {
        padding: 1.6mm;
        border-width: 0.22mm;
        border-color: rgba(86, 106, 128, 0.2);
        background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(250,252,254,1) 100%);
      }
      .sheet-2 .card[data-tone="o"] {
        border-color: rgba(168, 115, 36, 0.34);
      }
      .sheet-2 .card[data-tone="r"] {
        border-color: rgba(164, 69, 69, 0.34);
      }
      .card-head {
        margin-bottom: 1.34mm;
        padding-bottom: 0.92mm;
        border-bottom-color: rgba(115, 136, 159, 0.16);
      }
      .card-head h3,
      .cards-row.bottom-row .card-head h3 {
        font-size: 5.58mm;
        line-height: 1.06;
        font-weight: 665;
        letter-spacing: 0.014em;
        color: #23374d;
      }
      .status-indicator {
        min-height: 5.8mm;
        padding: 0.8mm 1.7mm 0.7mm;
        border: 0.2mm solid rgba(86, 106, 128, 0.18);
        border-radius: 999px;
        background: rgba(248, 250, 253, 0.92);
        font-size: 2.65mm;
        font-weight: 760;
        line-height: 1;
        letter-spacing: 0.04em;
        color: #415469;
      }
      .status-indicator.g {
        border-color: rgba(53, 112, 74, 0.18);
        color: #2f6c43;
        background: rgba(241, 248, 244, 0.95);
      }
      .status-indicator.o {
        border-color: rgba(168, 115, 36, 0.18);
        color: #996525;
        background: rgba(253, 248, 240, 0.95);
      }
      .status-indicator.r {
        border-color: rgba(164, 69, 69, 0.18);
        color: #944848;
        background: rgba(252, 243, 243, 0.95);
      }
      .status-symbol {
        font-size: 2.75mm;
        font-weight: 800;
        letter-spacing: 0.03em;
      }
      .card-content {
        font-size: 4.18mm;
        line-height: 1.26;
        color: #28384a;
      }
      .cards-row:nth-child(2) .card-content {
        font-size: 3.95mm;
        line-height: 1.18;
      }
      .cards-row:nth-child(2) .card:first-child .card-content {
        font-size: 3.95mm;
        line-height: 1.18;
      }
      .cards-row:nth-child(2) .status-list li {
        margin: 0 0 0.16mm 0;
      }
      .cards-row:nth-child(2) .progress-group {
        margin-bottom: 0.72mm;
      }
      .cards-row:nth-child(2) .progress-group:last-child {
        margin-bottom: 0;
      }
      .cards-row:nth-child(2) .progress-group > p {
        margin: 0 0 0.24mm 0;
        line-height: 1.1;
      }
      .status-list li {
        grid-template-columns: 3.4mm minmax(0, 1fr);
        gap: 0.62mm;
      }
      .status-list li span:last-child {
        line-height: 1.11;
      }
      .status-mark {
        font-size: 3.5mm;
        line-height: 0.95;
      }
      table {
        font-size: 3.85mm;
        line-height: 1.16;
      }
      .cards-row:nth-child(2) table {
        font-size: 4.05mm;
      }
      .sheet-2 .table-card {
        padding-left: 0;
        padding-right: 0;
      }
      .sheet-2 .table-card .card-head {
        padding-left: 1.6mm;
        padding-right: 1.6mm;
      }
      .sheet-2 .table-card > .card-content {
        padding-left: 0.28mm;
        padding-right: 0.28mm;
      }
      .sheet-2 .table-card table {
        border-left: none;
        border-right: none;
      }
      th, td {
        padding: 1.0mm 0.92mm;
        border-color: var(--print-table-line);
      }
      .table-card th {
        background: var(--print-table-head);
        border-color: var(--print-table-line);
        font-weight: 630;
        letter-spacing: 0.011em;
        color: #506176;
        padding-top: 0.92mm;
        padding-bottom: 0.86mm;
      }
      .table-card td {
        border-color: var(--print-table-line);
      }
      .sheet-2 .table-card thead th:first-child,
      .sheet-2 .table-card tbody td:first-child {
        border-left: none;
      }
      .sheet-2 .table-card thead th:last-child,
      .sheet-2 .table-card tbody td:last-child {
        border-right: none;
      }
      .sheet-2 #vBudgetNote {
        margin: 1.1mm 1.6mm 0;
      }
      .table-card tbody tr:nth-child(even) td {
        background: #f7f9fc;
      }

      .issue-table th:nth-child(1), .issue-table td:nth-child(1) { width: 43%; }
      .issue-table th:nth-child(2), .issue-table td:nth-child(2) { width: 14%; }
      .issue-table th:nth-child(3), .issue-table td:nth-child(3) { width: 43%; }
      .budget-table th:nth-child(4), .budget-table td:nth-child(4) { text-align: right; }
      .risk-table th:nth-child(1), .risk-table td:nth-child(1) { width: 37.5%; }
      .risk-table th:nth-child(2), .risk-table td:nth-child(2) { width: 12%; }
      .risk-table th:nth-child(3), .risk-table td:nth-child(3) { width: 13%; }
      .risk-table th:nth-child(4), .risk-table td:nth-child(4) { width: 37.5%; }
      .issue-table,
      .risk-table {
        border: none;
        border-collapse: collapse;
        border-spacing: 0;
      }
      .issue-table thead th,
      .issue-table tbody td,
      .risk-table thead th,
      .risk-table tbody td {
        border: 1px solid #d7dde3;
      }
      .issue-table thead th:first-child,
      .issue-table tbody td:first-child,
      .risk-table thead th:first-child,
      .risk-table tbody td:first-child {
        border-left: none;
      }
      .issue-table thead th:last-child,
      .issue-table tbody td:last-child,
      .risk-table thead th:last-child,
      .risk-table tbody td:last-child {
        border-right: none;
      }
      .issue-table thead th,
      .risk-table thead th {
        border-bottom: 2px solid #c6ced6;
      }

      .risk-table td:nth-child(1),
      .risk-table td:nth-child(4) {
        vertical-align: top;
      }
      .risk-table td:nth-child(1) .cell-text,
      .risk-table td:nth-child(4) .cell-text {
        display: block;
        line-height: 1.14;
        min-block-size: calc(3 * 1.14em);
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-line-clamp: unset;
        -webkit-box-orient: initial;
      }
      .issue-table td:nth-child(1) .cell-text,
      .issue-table td:nth-child(3) .cell-text,
      .decision-table td:nth-child(1) .cell-text {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        line-height: 1.14;
        min-block-size: calc(3 * 1.14em);
        white-space: normal;
        text-overflow: ellipsis;
      }
      /* Fallback for long unbroken tokens can be enabled per engine if print layout ever breaks. */

      .milestone-table .status-dot-inline {
        width: 2mm;
        height: 2mm;
        border: 0.12mm solid rgba(54, 67, 82, 0.2);
        opacity: 0.9;
      }
      .milestone-table td:last-child {
        vertical-align: middle;
      }

      .budget-table tbody tr.total-row td {
        background: #edf2f6 !important;
        color: #1f2f3f;
        border-top: 0.36mm solid #8c9bab;
        font-weight: 760;
      }
      .budget-table tbody tr.total-row td:first-child {
        font-size: 0.9em;
      }

      .issue-table td .level-text,
      .risk-table td .level-text {
        color: #2f3c4b !important;
        font-weight: 620;
      }
      .issue-table tbody tr.tone-high:not(.no-data-row) td,
      .risk-table tbody tr.tone-high:not(.no-data-row) td,
      .issue-table tbody tr.tone-medium:not(.no-data-row) td,
      .risk-table tbody tr.tone-medium:not(.no-data-row) td,
      .issue-table tbody tr.tone-low:not(.no-data-row) td,
      .risk-table tbody tr.tone-low:not(.no-data-row) td {
        background: #fff !important;
      }
      .issue-table tbody tr.tone-high:not(.no-data-row):nth-child(even) td,
      .risk-table tbody tr.tone-high:not(.no-data-row):nth-child(even) td,
      .issue-table tbody tr.tone-medium:not(.no-data-row):nth-child(even) td,
      .risk-table tbody tr.tone-medium:not(.no-data-row):nth-child(even) td,
      .issue-table tbody tr.tone-low:not(.no-data-row):nth-child(even) td,
      .risk-table tbody tr.tone-low:not(.no-data-row):nth-child(even) td {
        background: #f7f9fc !important;
      }
      .issue-table tbody tr.no-data-row td,
      .risk-table tbody tr.no-data-row td {
        background: #fff !important;
      }
    }

@media print and (-webkit-min-device-pixel-ratio: 0) {
      * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
      }
      .sheet {
        width: 100% !important;
        height: calc(297mm - 3mm) !important;
        min-height: calc(297mm - 3mm) !important;
        max-height: calc(297mm - 3mm) !important;
      }
    }

@media print {
      html.is-safari {
        --safari-page-h: calc(297mm - 24mm);
        --safari-page-pad: 1.1mm;
      }
      html.is-safari .sheet {
        width: 100% !important;
        height: var(--safari-page-h) !important;
        min-height: var(--safari-page-h) !important;
        max-height: var(--safari-page-h) !important;
        margin: 0 auto !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        padding: var(--safari-page-pad) !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        break-before: auto !important;
        page-break-before: auto !important;
        break-after: auto !important;
        page-break-after: auto !important;
      }
      html.is-safari .sheet-1,
      html.is-safari .sheet-2,
      html.is-safari .sheet-3,
      html.is-safari .sheet-4 {
        break-before: auto !important;
        page-break-before: auto !important;
        break-after: auto !important;
        page-break-after: auto !important;
      }
      html.is-safari .sheet + .sheet {
        break-before: page !important;
        page-break-before: always !important;
      }
      html.is-safari .sheet-1 .cover {
        height: 100% !important;
        min-height: 0 !important;
        display: grid !important;
        grid-template-rows: auto 1fr !important;
        gap: 0 !important;
      }
      html.is-safari .sheet-1 .cover-header,
      html.is-safari .sheet-2 .p2-header,
      html.is-safari .sheet-3 .p2-header,
      html.is-safari .sheet-4 .p2-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-rows: auto !important;
        column-gap: 6mm !important;
        row-gap: 0 !important;
        align-items: start !important;
        padding-top: var(--print-title-top-bump) !important;
        margin-bottom: calc(var(--p2-header-gap) - var(--print-title-top-bump)) !important;
      }
      html.is-safari .sheet-1 .cover-top,
      html.is-safari .sheet-2 .p2-top,
      html.is-safari .sheet-3 .p2-top,
      html.is-safari .sheet-4 .p2-top {
        display: contents !important;
      }
      html.is-safari .sheet-1 .cover-date,
      html.is-safari .sheet-2 .p2-date,
      html.is-safari .sheet-3 .p2-date,
      html.is-safari .sheet-4 .p2-date {
        display: none !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-self: start !important;
      }
      html.is-safari .sheet-1 .cover-hero,
      html.is-safari .sheet-2 .p2-hero,
      html.is-safari .sheet-3 .p2-hero,
      html.is-safari .sheet-4 .p2-hero {
        grid-column: 1 !important;
        grid-row: 1 !important;
      }
      html.is-safari .sheet-1 .cover-logo,
      html.is-safari .sheet-2 .p2-logo,
      html.is-safari .sheet-3 .p2-logo,
      html.is-safari .sheet-4 .p2-logo {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: start !important;
      }
      html.is-safari .sheet-1 .cover-hero h1,
      html.is-safari .sheet-2 .p2-hero .p2-title,
      html.is-safari .sheet-3 .p2-hero .p2-title,
      html.is-safari .sheet-4 .p2-hero .p2-title {
        font-size: 7.7mm !important;
        line-height: 1.08 !important;
        margin: 0 0 1.2mm 0 !important;
      }
      html.is-safari .sheet-2 .p2-hero .p2-title.long,
      html.is-safari .sheet-3 .p2-hero .p2-title.long,
      html.is-safari .sheet-4 .p2-hero .p2-title.long {
        font-size: 7.2mm !important;
      }
      html.is-safari .sheet-2 .p2-hero .p2-title.xlong,
      html.is-safari .sheet-3 .p2-hero .p2-title.xlong,
      html.is-safari .sheet-4 .p2-hero .p2-title.xlong {
        font-size: 6.8mm !important;
      }
      html.is-safari .sheet-1 .cover-hero p,
      html.is-safari .sheet-2 .p2-hero .p2-meta,
      html.is-safari .sheet-3 .p2-hero .p2-meta,
      html.is-safari .sheet-4 .p2-hero .p2-meta {
        font-size: 3.8mm !important;
        line-height: 1.08 !important;
        margin: 0 !important;
        max-width: 100% !important;
        color: #445266 !important;
        font-weight: 400 !important;
      }
      html.is-safari .sheet-1 .cover-content-frame {
        height: var(--p2-content-height) !important;
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0 !important;
        display: grid !important;
        grid-template-rows: minmax(0, 1fr) auto !important;
        gap: 0.6mm !important;
        min-height: 0 !important;
      }
      html.is-safari .sheet-1 .cover-image {
        flex: none !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
      }
      html.is-safari .sheet-1 .cover-meta {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0 !important;
        border: 0.16mm solid rgba(55, 74, 98, 0.11) !important;
        border-radius: 2.1mm !important;
        background: linear-gradient(180deg, rgba(253, 254, 255, 0.98) 0%, rgba(247, 249, 252, 0.98) 100%) !important;
        box-shadow: inset 0 0.22mm 0 rgba(255, 255, 255, 0.88) !important;
        overflow: hidden !important;
      }
      html.is-safari .sheet-1 .cover-meta .meta-pill {
        min-height: 14.2mm !important;
        padding: 2.25mm 3.2mm 2.4mm !important;
        border: 0 !important;
        border-right: 0.18mm solid rgba(55, 74, 98, 0.1) !important;
        border-radius: 0 !important;
        background: transparent !important;
        font-size: 3.0mm !important;
        line-height: 1.3 !important;
        box-shadow: none !important;
      }
      html.is-safari .sheet-1 .cover-meta .meta-pill:last-child {
        border-right: 0 !important;
      }
      html.is-safari .sheet-1 .cover-meta .meta-pill strong {
        margin-bottom: 0.8mm !important;
        color: #748599 !important;
        font-size: 2.15mm !important;
        font-weight: 700 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
      }
      html.is-safari .sheet-1 .cover-meta .meta-pill span {
        display: block !important;
        color: #223446 !important;
        font-weight: 580 !important;
        line-height: 1.24 !important;
        overflow-wrap: anywhere !important;
      }
      html.is-safari .sheet-2,
      html.is-safari .sheet-3,
      html.is-safari .sheet-4 {
        height: var(--safari-page-h) !important;
        min-height: var(--safari-page-h) !important;
        max-height: var(--safari-page-h) !important;
        display: grid !important;
        grid-template-rows: auto 1fr !important;
        gap: 0.8mm !important;
        overflow: hidden !important;
      }
      html.is-safari .sheet-2 .report-grid {
        height: var(--p2-content-height) !important;
        min-height: 0 !important;
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0 !important;
        grid-template-rows: minmax(0, 0.2142fr) minmax(0, 0.6035985fr) minmax(0, 0.2882015fr) !important;
        gap: 1.1mm !important;
        align-content: start !important;
        overflow: hidden !important;
      }
      html.is-safari .sheet-3 .planning-page-grid {
        height: var(--p2-content-height) !important;
        min-height: 0 !important;
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0 !important;
        overflow: hidden !important;
      }
      html.is-safari .sheet-4 .budget-page-grid {
        height: var(--p2-content-height) !important;
        min-height: 0 !important;
        margin: var(--p2-content-margin-top) 0 var(--p2-content-margin-bottom) 0 !important;
        overflow: hidden !important;
      }
      html.is-safari body.budget-page-on .sheet-3,
      html.is-safari body.budget-page-off .sheet-3 {
        break-after: auto !important;
        page-break-after: auto !important;
      }
      html.is-safari .cards-row.bottom-row {
        align-items: start !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
      }
      html.is-safari .cards-row.bottom-row .card {
        grid-template-rows: auto auto !important;
        height: auto !important;
        min-height: 0 !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
      }
      html.is-safari .cards-row.bottom-row .card-content {
        overflow: hidden !important;
      }
      html.is-safari .card,
      html.is-safari .card-content {
        overflow: hidden !important;
      }
      html.is-safari .cards-row {
        gap: 1.08mm !important;
      }
      html.is-safari .report-grid {
        gap: 1.02mm !important;
      }
      html.is-safari .card {
        padding: 1.6mm !important;
        border-width: 0.22mm !important;
        border-color: rgba(86, 106, 128, 0.2) !important;
        background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(250,252,254,1) 100%) !important;
      }
      html.is-safari .sheet-2 .card[data-tone="o"] {
        border-color: rgba(168, 115, 36, 0.34) !important;
      }
      html.is-safari .sheet-2 .card[data-tone="r"] {
        border-color: rgba(164, 69, 69, 0.34) !important;
      }
      html.is-safari .card-head {
        margin-bottom: 1.34mm !important;
        padding-bottom: 0.92mm !important;
        border-bottom-color: rgba(115, 136, 159, 0.16) !important;
      }
      html.is-safari .card-head h3,
      html.is-safari .cards-row.bottom-row .card-head h3 {
        font-size: 5.58mm !important;
        font-weight: 665 !important;
        letter-spacing: 0.014em !important;
        color: #23374d !important;
      }
      html.is-safari .status-indicator {
        min-height: 5.8mm !important;
        padding: 0.8mm 1.7mm 0.7mm !important;
        border: 0.2mm solid rgba(86, 106, 128, 0.18) !important;
        border-radius: 999px !important;
        background: rgba(248, 250, 253, 0.92) !important;
        font-size: 2.65mm !important;
        font-weight: 760 !important;
        line-height: 1 !important;
        letter-spacing: 0.04em !important;
        color: #415469 !important;
      }
      html.is-safari .status-indicator.g {
        border-color: rgba(53, 112, 74, 0.18) !important;
        color: #2f6c43 !important;
        background: rgba(241, 248, 244, 0.95) !important;
      }
      html.is-safari .status-indicator.o {
        border-color: rgba(168, 115, 36, 0.18) !important;
        color: #996525 !important;
        background: rgba(253, 248, 240, 0.95) !important;
      }
      html.is-safari .status-indicator.r {
        border-color: rgba(164, 69, 69, 0.18) !important;
        color: #944848 !important;
        background: rgba(252, 243, 243, 0.95) !important;
      }
      html.is-safari .status-symbol {
        font-size: 2.75mm !important;
        font-weight: 800 !important;
        letter-spacing: 0.03em !important;
      }
      html.is-safari .card-content {
        font-size: 4.18mm !important;
        line-height: 1.26 !important;
        color: #28384a !important;
      }
      html.is-safari .cards-row:nth-child(2) .card-content,
      html.is-safari .cards-row:nth-child(2) .card:first-child .card-content {
        font-size: 3.95mm !important;
        line-height: 1.18 !important;
      }
      html.is-safari .table-card th {
        font-weight: 630 !important;
        letter-spacing: 0.011em !important;
        color: #506176 !important;
        padding-top: 0.92mm !important;
        padding-bottom: 0.86mm !important;
      }
      html.is-safari .sheet-note {
        position: absolute !important;
        left: 3.2mm !important;
        right: auto !important;
        bottom: 1.8mm !important;
        font-size: 7px !important;
        color: #8d97a5 !important;
        letter-spacing: 0.01em !important;
        display: block !important;
      }
      html.is-safari .sheet-credit {
        position: absolute !important;
        right: 3.2mm !important;
        left: auto !important;
        bottom: 1.8mm !important;
        font-size: 7px !important;
        color: #8d97a5 !important;
        letter-spacing: 0.01em !important;
        display: block !important;
      }
    }

@media screen and (max-width: 1200px) {
.topbar .right {
        width: 100%;
      }
.topbar .right {
        margin-left: 0;
        justify-content: flex-start;
      }
.preview-wrap { max-height: none; }
.sheet { width: 100%; min-height: auto; }
.cover-hero p { max-width: 100%; }
.report-grid { display: block; height: auto; }
.cards-row { grid-template-columns: 1fr; margin-bottom: 8px; }
.card { min-height: 220px; }
}

@media screen and (max-width: 900px) {
.topbar .right {
        gap: 6px;
      }
.topbar .right button {
        width: 100%;
      }
}

@media print {
      .mobile-print-warning {
        display: none !important;
      }
    }

@media screen {
body.editor-screen-corporate .report-view, body.editor-screen-corporate .preview-panel {
        max-width: 100%;
        width: 100%;
      }
body.editor-screen-corporate .report-view {
        display: none;
      }
}

body.editor-screen-corporate.editor-mode-guided:not(.guided-preview-active) .report-view {
        display: none;
      }

body.editor-screen-corporate.editor-mode-free .report-view {
        display: none;
      }

body.editor-screen-corporate.editor-mode-guided.guided-preview-active .report-view {
        display: block;
      }

body.editor-screen-corporate .screen-preview-anchor {
        position: relative;
        top: calc(-1 * var(--scroll-offset));
        height: 0;
        width: 100%;
      }

body.editor-screen-corporate .preview-panel .head {
        border-bottom: 1px solid #dde6f2;
      }

body.editor-screen-corporate .preview-panel {
        margin-top: 8px;
        border-color: #d2deeb;
      }

body.editor-screen-corporate .preview-wrap {
        background: #eaf0f7;
        padding: 14px;
        border-radius: 0 0 12px 12px;
      }

body.editor-screen-corporate .preview-wrap .sheet {
        border-color: #c9d6e6;
        box-shadow: 0 6px 16px rgba(16, 31, 49, 0.07);
      }

body.editor-screen-corporate .report-view .preview-panel {
        display: block;
      }

.issue-table tbody tr.tone-high:not(.no-data-row) td:first-child, .risk-table tbody tr.tone-high:not(.no-data-row) td:first-child {
      box-shadow: none !important;
    }

.issue-table tbody tr.tone-medium:not(.no-data-row) td:first-child, .risk-table tbody tr.tone-medium:not(.no-data-row) td:first-child {
      box-shadow: none !important;
    }

.issue-table tbody tr.tone-low:not(.no-data-row) td:first-child, .risk-table tbody tr.tone-low:not(.no-data-row) td:first-child {
      box-shadow: none !important;
    }

.issue-table thead th:first-child, .issue-table tbody td:first-child, .risk-table thead th:first-child, .risk-table tbody td:first-child {
      border-left: none !important;
    }

.issue-table thead th:last-child, .issue-table tbody td:last-child, .risk-table thead th:last-child, .risk-table tbody td:last-child {
      border-right: none !important;
    }

@media print {
      .issue-table thead th:first-child,
      .issue-table tbody td:first-child,
      .risk-table thead th:first-child,
      .risk-table tbody td:first-child {
        border-left: none !important;
      }
      .issue-table thead th:last-child,
      .issue-table tbody td:last-child,
      .risk-table thead th:last-child,
      .risk-table tbody td:last-child {
        border-right: none !important;
      }
    }

body.sheet-credit-hidden .sheet-credit {
  display: none !important;
}

@media screen {
body.editor-screen-corporate .report-view {
    display: none !important;
  }
}

/* -- Zelfvoorzienendheid van dit stylesheet --------------------------------
   Dit bestand is de ENIGE stylesheet in de server-side PDF-render
   (api/render-pdf.js laadt bewust geen app-ui.css). In de app zelf erfde het
   rapport zijn basisfont, tekstkleur en enkele variabelen stilzwijgend van
   app-ui.css (html/body-regels + :root) — daardoor viel de serverrender terug
   op Times en verdwenen de statuskleuren. Alles wat het rapport nodig heeft
   hoort dus hiér te staan. De waarden zijn identiek aan die in app-ui.css,
   zodat browser-print en server-PDF exact hetzelfde ogen. */
:root {
  --green: #00a651;
  --orange: #ff9800;
  --red: #e30613;
  --ink: #26312a;
  --sp-3: 12px;
  --scroll-offset: 0px;
}
.report-view,
.report-view .sheet {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
