/* ============================================================
   Shared SCV sheet styling. Used by the SCV generator, the
   candidate bench, and every standalone candidate page, so all
   three render an SCV identically. Load AFTER tokens.css + fonts.css.
   ============================================================ */
.sheet-scroll { overflow: auto; }
.sheet {
  width: 210mm; min-height: 297mm; margin: 0 auto; background: var(--t-white);
  color: var(--t-forest); box-shadow: var(--shadow-lift); padding: 18mm 18mm 16mm;
  position: relative; font-size: 10.5pt; line-height: 1.5;
}
.sheet [contenteditable]:focus { outline: 2px solid var(--t-lime-bright); outline-offset: 2px; border-radius: 3px; }

.scv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 6mm; }
.scv-brand { text-align: right; }
.scv-brand img { height: 30px; display: inline-block; }
.scv-brand .contact { font-size: 8pt; color: var(--t-mid-green); margin-top: 5px; line-height: 1.5;
  font-variant-numeric: tabular-nums; }

.scv-name { font-size: 21pt; font-weight: 700; color: var(--t-forest); line-height: 1.15; margin: 0; }
.scv-name .vid { font-size: 12pt; font-weight: 600; color: var(--t-forest-mid); }
.scv-name .vid a { color: var(--t-forest-mid); text-decoration: underline; text-decoration-color: var(--t-lime-bright); text-underline-offset: 2px; }
.scv-intro { margin: 4mm 0 6mm; font-size: 10.5pt; color: var(--t-dark); line-height: 1.55; }

.scv-sec { margin-bottom: 5.5mm; }
.scv-sec > h2 {
  font-size: 10.5pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--t-forest); margin: 0 0 3mm; padding-bottom: 1.5mm; border-bottom: 2px solid var(--t-lime); break-after: avoid;
}
.scv-sec ul { margin: 0; padding-left: 5mm; }
.scv-sec li { margin-bottom: 1.4mm; break-inside: avoid; }

.exp-entry { margin-bottom: 4mm; break-inside: avoid; }
.exp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.exp-role { font-weight: 700; color: var(--t-forest); font-size: 10.5pt; }
.exp-dates { font-size: 9pt; color: var(--t-mid-green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.exp-entry ul { margin: 1.5mm 0 0; padding-left: 5mm; }

.edu-entry { margin-bottom: 2mm; break-inside: avoid; }
.edu-line { font-size: 10.5pt; }
.edu-line b { font-weight: 700; }
.edu-line .yr { color: var(--t-mid-green); font-variant-numeric: tabular-nums; }

.exp-earlier { font-size: 9.5pt; color: var(--t-dark); margin-top: 1.5mm; line-height: 1.5; }
.exp-earlier .k { font-weight: 700; color: var(--t-forest); }

.scv-foot { margin-top: 7mm; padding-top: 3mm; border-top: 1px solid var(--t-border-light);
  display: flex; align-items: center; justify-content: center; gap: 7px; }
.scv-foot img { height: 15px; opacity: 0.92; }
.scv-foot span { font-size: 8pt; letter-spacing: 0.08em; color: var(--t-mid-green); text-transform: lowercase; }

/* one-page compaction (applied by the generator auto-fit loop; persisted per candidate) */
.sheet.tight { font-size: 10pt; padding: 15mm 16mm 13mm; }
.sheet.tight .scv-intro { margin: 3mm 0 4mm; }
.sheet.tight .scv-sec { margin-bottom: 4mm; }
.sheet.tight .scv-sec > h2 { margin-bottom: 2mm; }
.sheet.tight .exp-entry { margin-bottom: 2.5mm; }
.sheet.tight .scv-sec li { margin-bottom: 1mm; }
.sheet.tight .scv-foot { margin-top: 5mm; }

/* low-confidence / needs-check flag */
.flag { position: relative; }
.flag::after {
  content: "check"; position: absolute; top: -7px; right: -2px; font-size: 6.5pt; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--t-tan-text); background: #fbf6e3;
  padding: 1px 5px; border-radius: 999px; pointer-events: none;
}
.placeholder-txt { color: #b8b2a0; font-style: italic; }

/* Read-only view surfaces (candidate pages, bench preview): scale the fixed A4 sheet down to
   fit small screens so nothing clips. EXCLUDES the generator's live #sheet, whose one-page
   auto-fit measures real rendered height (zoom would skew scrollHeight). Print is unaffected. */
@media screen and (max-width: 820px) {
  .sheet-scroll .sheet:not(#sheet) { zoom: 0.6; }
}
@media screen and (max-width: 500px) {
  .sheet-scroll .sheet:not(#sheet) { zoom: 0.42; }
}

/* shared print rules for the sheet (each page adds its own chrome-hiding rules) */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff; margin: 0; padding: 0; }
  .sheet-scroll { overflow: visible; }
  .sheet { box-shadow: none; margin: 0; width: 210mm; min-height: 297mm; }
  .flag::after { display: none; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .exp-entry, .edu-entry, .scv-sec li { break-inside: avoid; }
  .scv-sec > h2 { break-after: avoid; }
}
