/* Scorecard page — fixed US Letter 8.5 × 11 in (preview + PDF)
   Tuned to fit ALL content on a single page (no overflow). */

.scorecard {
  --sc-navy: #162f49;
  --sc-blue: #185288;
  --sc-soft: #96b0c9;
  --sc-ink: #1a2332;
  --sc-muted: #5a6a7a;
  --sc-line: #d7e0ea;
  --sc-alt: #f3f6f9;
  --sc-red: #b42318;
  --sc-red-text: #ffffff;
  --sc-green: #1f7a3f;
  --sc-green-text: #ffffff;
  --sc-yellow: #e6b800;
  --sc-yellow-text: #1a2332;

  width: 8.5in;
  height: 11in;
  min-height: 11in;
  max-height: 11in;
  background: #fff;
  color: var(--sc-ink);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 7.4pt;
  line-height: 1.2;
  padding: 0.28in 0.34in 0.22in;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(22, 47, 73, 0.18);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.scorecard--pdf-capture,
#scorecard-pdf-clone {
  box-shadow: none !important;
  transform: none !important;
  width: 8.5in !important;
  height: 11in !important;
  min-height: 11in !important;
  max-height: 11in !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Avoid mid-element breaks if browser print is used */
.sc-block,
.sc-row,
.sc-header,
.sc-footer {
  break-inside: avoid;
  page-break-inside: avoid;
}

.sc-header {
  display: grid;
  grid-template-columns: 1.15in 1fr 1.95in;
  gap: 0.12in;
  align-items: center;
  padding-bottom: 0.09in;
  border-bottom: 2px solid var(--sc-navy);
  margin-bottom: 0.09in;
  flex: 0 0 auto;
}

.sc-logo {
  height: 0.58in;
  width: auto;
  object-fit: contain;
}

.sc-header__title {
  text-align: center;
  min-width: 0;
}

.sc-eyebrow {
  margin: 0 0 0.02in;
  font-family: "TrajanPro", "Times New Roman", serif;
  font-size: 6pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sc-blue);
}

.sc-header__title h1 {
  margin: 0;
  font-size: 13pt;
  font-weight: 800;
  color: var(--sc-navy);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.sc-header__meta {
  display: flex;
  flex-direction: column;
  gap: 0.04in;
}

.sc-meta-row {
  display: grid;
  grid-template-columns: 0.62in 1fr;
  gap: 0.05in;
  align-items: baseline;
}

.sc-meta-label {
  font-size: 5.8pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sc-muted);
}

.sc-meta-value {
  font-size: 7.6pt;
  font-weight: 800;
  color: var(--sc-navy);
  word-break: break-word;
}

.sc-block {
  margin-bottom: 0.07in;
  flex: 0 0 auto;
}

.sc-block--last {
  margin-bottom: 0.04in;
}

.sc-section-title {
  margin: 0 0 0.045in;
  padding: 0.035in 0.06in;
  background: var(--sc-navy);
  color: #fff;
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sc-subhead {
  margin: 0 0 0.03in;
  font-family: "TrajanPro", "Times New Roman", serif;
  font-size: 6.2pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-blue);
}

.sc-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.12in;
}

.sc-priority-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.03in 0.12in;
}

.sc-priority-list li {
  display: flex;
  gap: 0.06in;
  align-items: flex-start;
  min-height: 0.22in;
  padding: 0.025in 0.045in;
  background: var(--sc-alt);
  border-left: 2px solid var(--sc-soft);
  font-size: 7pt;
}

.sc-priority-num {
  flex: 0 0 auto;
  width: 0.15in;
  height: 0.15in;
  border-radius: 50%;
  background: var(--sc-navy);
  color: #fff;
  font-size: 5.8pt;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.01in;
}

.sc-rows {
  display: flex;
  flex-direction: column;
  gap: 0.018in;
}

.sc-rows--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.018in 0.12in;
}

.sc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.06in;
  align-items: center;
  padding: 0.018in 0.04in;
  border-bottom: 1px solid var(--sc-line);
}

.sc-row__label {
  color: var(--sc-ink);
  font-size: 7pt;
}

.sc-row__value {
  justify-self: end;
  min-width: 0.85in;
  text-align: center;
  font-weight: 800;
  font-size: 7pt;
  padding: 0.018in 0.055in;
  border-radius: 2px;
  color: var(--sc-navy);
  background: transparent;
}

/* Status treatment from Rule Formatting */
.sc-row.is-red .sc-row__value {
  background: var(--sc-red);
  color: var(--sc-red-text);
}
.sc-row.is-green .sc-row__value {
  background: var(--sc-green);
  color: var(--sc-green-text);
}
.sc-row.is-yellow .sc-row__value {
  background: var(--sc-yellow);
  color: var(--sc-yellow-text);
}

.sc-footer {
  margin-top: auto;
  padding-top: 0.06in;
  border-top: 1px solid var(--sc-line);
  display: flex;
  justify-content: space-between;
  gap: 0.15in;
  font-size: 5.8pt;
  color: var(--sc-muted);
  flex: 0 0 auto;
}

.sc-footer__note {
  text-align: right;
}

@media print {
  body {
    background: #fff;
  }
  .app-header,
  .workspace,
  .preview-pane__header,
  .app-footer,
  .banner {
    display: none !important;
  }
  .layout {
    display: block;
    padding: 0;
    max-width: none;
  }
  .preview-pane,
  .preview-frame,
  .preview-scale {
    all: unset;
  }
  .scorecard {
    box-shadow: none;
    transform: none !important;
    margin: 0 !important;
    width: 8.5in;
    height: 11in;
  }
  @page {
    size: letter portrait;
    margin: 0;
  }
}
