/* =============================================================================
   THE EXECUTIVE ONE-PAGER (#/analytics/onepager)

   Its own stylesheet because it is a *document*, not a screen: fixed
   proportions, a landscape page box, and a print block that hides every
   control. The browser's own "Save as PDF" then produces exactly what is on
   screen — vector text, real colour, one sheet — which beats any
   canvas-screenshot route and needs no library.

   Ported from the QSprint executive report and adapted for a portfolio rather
   than a single project.
   ========================================================================== */

.exec-report { max-width: 1180px; margin: 0 auto; }

.exec-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--elev-2);
}

.exec-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .exec-kpis { grid-template-columns: repeat(2, 1fr); } }

.exec-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 12px; background: var(--surface);
}
.exec-card-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.exec-card-value { font-size: 25px; font-weight: 800; line-height: 1.15; margin-top: 2px; letter-spacing: -.02em; }
.exec-card-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.exec-panel {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 12px 14px; background: var(--surface);
  /* A panel that splits across a page break is the one thing a print layout
     must never do — half a decision list on page two reads as two lists. */
  break-inside: avoid;
  min-width: 0;
}
.exec-panel-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }

.exec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .exec-grid { grid-template-columns: 1fr; } }

.exec-list { display: flex; flex-direction: column; gap: 5px; }
.exec-list li { font-size: 11.5px; line-height: 1.45; padding-left: 12px; position: relative; }
.exec-list li::before { content: "•"; position: absolute; left: 0; color: var(--muted); }
.exec-meta { color: var(--muted); font-size: 10.5px; }
.exec-empty { font-size: 11.5px; color: var(--muted); }
.exec-note { font-size: 10.5px; color: var(--muted); margin-top: 6px; }

.exec-rows { display: flex; flex-direction: column; }
.exec-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 11.5px; padding: 4px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.exec-row:last-child { border-bottom: 0; }
.exec-row-main { display: flex; align-items: center; gap: 6px; min-width: 0; }
.exec-row-value { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exec-dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; flex: none; }

.exec-footer {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 10px; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 8px;
}

/* ------------------------------------------------------------------- print */
@page { size: A4 landscape; margin: 8mm; }

@media print {
  /* Everything that is chrome disappears — the shell, the rail, the story bar,
     and the buttons on the report itself. A PDF with a "Save as PDF" button
     printed on it is the tell of a screenshot. */
  .no-print, .rail, .topbar, .story, .toasts, .bgfx, .scrim, .imp-bar { display: none !important; }

  html, body { background: #fff !important; overflow: visible !important; height: auto !important; }
  .shell { position: static !important; display: block !important; }
  .main, .page { overflow: visible !important; height: auto !important; padding: 0 !important; }

  body * { visibility: hidden; }
  .exec-report, .exec-report * { visibility: visible; }
  .exec-report { position: absolute; inset: 0; margin: 0; padding: 0; width: 100%; max-width: none; }

  .exec-sheet {
    border: 0; border-radius: 0; padding: 0; box-shadow: none;
    /* One page, and let the browser scale the type rather than reflow. 90%,
       not 96%: a sheet that is five pixels over budget silently becomes two,
       and a one-pager that is sometimes two is not a one-pager. */
    font-size: 90%;
    gap: 6px;
  }
  .exec-panel { padding: 7px 9px; }
  .exec-card { padding: 6px 9px; }
  .exec-card-value { font-size: 18px; }
  .exec-card, .exec-panel {
    border-color: #d4d4d8 !important; background: #fff !important;
    /* Colour in a status report is load-bearing: an amber row printed grey
       says something different from what the page says. */
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .exec-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .exec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gantt-row { height: 17px; }
}
