/* ============================================================================
   Handover — a document, not a screen.

   It is set like something you would print and hand to somebody: a real
   measure, real hierarchy, no app chrome inside the sheet. The print rules at
   the bottom are the feature, not an afterthought — "save as PDF" goes through
   the browser's own dialogue, so there is no library and no server round trip.
   ========================================================================== */

html.v10-ho-on{overflow:hidden}
.v10-ho{position:fixed;inset:0;z-index:9200;background:var(--bg,#F3F6F8);overflow:auto}
.v10-ho-bar{
  position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;
  padding:12px 20px;background:rgba(255,255,255,.93);
  border-bottom:1px solid var(--line,#DCE5EB);
  backdrop-filter:blur(16px) saturate(160%);
}
.v10-ho-bar strong{font-size:15px;font-weight:650}
.v10-ho-bar small{font-size:12px;color:var(--muted,#93A0B6)}
.v10-ho-bar .spacer{flex:1}

.v10-ho-sheet{padding:30px 20px 80px}
.ho-doc{
  max-width:860px;margin:0 auto;background:#fff;
  border:1px solid var(--line,#DCE5EB);border-radius:14px;
  padding:clamp(28px,4vw,56px);
  box-shadow:0 2px 6px rgba(28,45,95,.05),0 24px 60px -30px rgba(28,45,95,.3);
  font-size:14.5px;line-height:1.6;color:#22304A;
}

.ho-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;
  padding-bottom:22px;margin-bottom:26px;border-bottom:2px solid #22304A}
.ho-kicker{font-size:11px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:#C2567F}
.ho-head h1{margin:8px 0 0;font-size:clamp(28px,4vw,40px);font-weight:700;letter-spacing:-.03em;line-height:1.1}
.ho-sub{margin:8px 0 0;font-size:14px;color:#5A6880;max-width:56ch}
.ho-stamp{text-align:right;flex:0 0 auto}
.ho-stamp strong{display:block;font-size:14px;font-weight:650}
.ho-stamp span{display:block;font-size:12px;color:#8494AD;margin-top:2px}

.ho-doc h2{font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:#8494AD;margin:34px 0 16px;padding-bottom:7px;border-bottom:1px solid #E2E8F0}
.ho-doc h2:first-child{margin-top:0}

.ho-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:12px;margin-bottom:20px}
.ho-stats div{border:1px solid #E2E8F0;border-radius:10px;padding:12px 14px}
.ho-stats b{display:block;font-size:24px;font-weight:720;letter-spacing:-.03em;line-height:1}
.ho-stats span{display:block;font-size:11px;color:#8494AD;margin-top:4px}
.ho-stats .bad b{color:#A8446A}
.ho-callout{border-left:3px solid #C2567F;padding:2px 0 2px 16px;margin-top:18px}
.ho-callout>strong{display:block;font-size:13.5px;margin-bottom:7px}
.ho-callout ul{margin:0;padding-left:18px}
.ho-callout li{margin-bottom:4px}

.ho-project{
  border:1px solid #E2E8F0;border-left:4px solid var(--pc);border-radius:10px;
  padding:20px 22px;margin-bottom:16px;break-inside:avoid;
}
.ho-project header{margin-bottom:10px}
.ho-project h3{margin:0;font-size:19px;font-weight:680;letter-spacing:-.02em}
.ho-project-meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;font-size:12px;color:#8494AD}
.ho-pill{background:color-mix(in srgb,var(--pc) 13%,#fff);color:color-mix(in srgb,var(--pc) 75%,#22304A);
  border-radius:999px;padding:2px 10px;font-weight:650}
.ho-asleep{color:#8A6212;font-weight:600}
.ho-summary{margin:10px 0 0;color:#42506B}
.ho-next{margin:12px 0 0;border-left:3px solid var(--pc);padding-left:14px;font-weight:550}
.ho-next span{display:block;font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#8494AD;margin-bottom:3px}

.ho-block{margin-top:16px}
.ho-block h4{margin:0 0 7px;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#8494AD}
.ho-block h4 span{color:#22304A}
.ho-block ul{margin:0;padding-left:18px}
.ho-block li{margin-bottom:5px}
.ho-decisions li{margin-bottom:11px}
.ho-decisions em{display:block;font-style:normal;color:#5A6880;font-size:13.5px;margin-top:2px}
.ho-notes li{margin-bottom:12px}
.ho-notes p{margin:3px 0 0;color:#5A6880;font-size:13.5px}
.ho-quiet{color:#8494AD;font-size:12.5px}
.ho-warn{color:#A8446A;font-weight:650;font-size:12.5px}

.ho-people table{width:100%;border-collapse:collapse;font-size:13.5px}
.ho-people th{text-align:left;font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#8494AD;border-bottom:1px solid #E2E8F0;padding:0 10px 7px 0}
.ho-people td{padding:8px 10px 8px 0;border-bottom:1px solid #F1F5F9;vertical-align:top}

.ho-done ul{margin:0;padding-left:18px}
.ho-foot{margin-top:36px;padding-top:18px;border-top:1px solid #E2E8F0;
  font-size:12px;line-height:1.6;color:#8494AD}

/* ============================================================== printing
   The whole app gets out of the way and the sheet becomes the page. */
@media print{
  /* No page SIZE here: a stylesheet that fixes the size also locks the
     browser's Portrait / Landscape choice. The switch in the bar sets it
     only when landscape is chosen (see v10-handover.js, orient()). */
  @page{margin:14mm 12mm}
  html,body{background:#fff!important;height:auto!important;overflow:visible!important}
  /* Everything that is not the handover simply is not printed. */
  html.v10-ho-on body > *:not(.v10-ho){display:none!important}
  .v10-ho{position:static!important;inset:auto!important;overflow:visible!important;background:#fff!important}
  .v10-ho-bar{display:none!important}
  .v10-ho-sheet{padding:0!important}
  .ho-doc{
    max-width:none!important;border:0!important;border-radius:0!important;
    box-shadow:none!important;padding:0!important;font-size:10.5pt;line-height:1.5;
  }
  .ho-head{border-bottom:1.5pt solid #000}
  .ho-head h1{font-size:22pt}
  .ho-doc h2{margin-top:18pt;font-size:8.5pt}
  /* A project should not be split across a page break if it can be helped. */
  .ho-project{break-inside:avoid;page-break-inside:avoid;border:0.5pt solid #ccc}
  .ho-people table{font-size:9pt}
  .ho-people tr{break-inside:avoid}
  a{text-decoration:none;color:inherit}
}


/* ============================================================ brief / full
   The chooser, the switch in the bar, the brief's compact lines, and the
   QIP / audit record inside the full one. */
.ho-choose{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ho-choice{display:grid;gap:6px;align-content:start;text-align:left;font:inherit;padding:16px 16px 18px;border-radius:14px;
  border:1px solid var(--line,#DCE5EB);background:var(--surface,#fff);color:var(--text,#22304A);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.ho-choice:hover,.ho-choice:focus-visible{border-color:var(--v-accent,#1E86C8);box-shadow:0 10px 26px -18px var(--v-accent,#1E86C8)}
.ho-choice-ico{font-size:22px;line-height:1;color:var(--v-accent,#1E86C8)}
.ho-choice b{font-size:15.5px}
.ho-choice small{font-size:12.5px;line-height:1.5;color:var(--muted,#8494AD)}
.ho-choose-hint{margin:12px 0 0;font-size:12px;color:var(--muted,#8494AD)}
@media(max-width:560px){.ho-choose{grid-template-columns:1fr}}

.ho-switch{display:inline-flex;padding:3px;border-radius:10px;background:var(--surface-2,#EEF3F7);gap:2px}
.ho-switch button{font:inherit;font-size:12.5px;font-weight:650;padding:5px 11px;border:0;border-radius:8px;background:none;color:var(--muted,#6B7A90);cursor:pointer}
.ho-orient{margin-left:4px}
.ho-switch button[aria-checked=true]{background:#fff;color:var(--text,#22304A);box-shadow:0 1px 3px rgba(28,45,95,.14)}

.ho-qi-line{display:flex;gap:10px;align-items:flex-start;margin:12px 0 0;padding:10px 12px;border-radius:10px;background:#F6F4FE;border:1px solid #E6E0FB}
.ho-qi-badge{flex:none;font-size:10px;font-weight:800;letter-spacing:.08em;padding:3px 7px;border-radius:6px;color:#fff;background:#6d4fd8}
.ho-qi-badge.aud{background:#0d8a8f}
.ho-qi-badge.deal{background:#c86f12}
.ho-qi-badge.cus{background:#b03a6e}
.ho-qi-line b{display:block;font-size:13.5px;font-weight:650;line-height:1.4}
.ho-qi-line small{display:block;margin-top:2px;font-size:12px;color:#6B7A90}
.ho-who,.ho-counts{margin:10px 0 0;font-size:13.5px;color:#42506B}
.ho-who span{font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#8494AD;margin-right:8px}
.ho-who em{font-style:normal;color:#8494AD}
.ho-counts{font-size:12.5px;color:#6B7A90}
.ho-project.brief .ho-block{margin-top:12px}

/* The QIP / audit tab inside the full record: always the light sheet, even
   when the app is dark, because this is paper. */
.ho-qi{--surface:#fff;--surface-2:#F4F7FA;--text:#22304A;--muted:#8494AD;--line:#E2E8F0;margin-top:22px}
.ho-qi>h4{margin-bottom:10px}
.ho-qi .qip{gap:12px;padding:0}
.ho-qi .qip-card{box-shadow:none;padding:14px 16px}
.ho-qi .qip-steps a span{display:block}
.ho-record-text{white-space:pre-wrap}

@media print{
  /* A full record runs to pages: let the project break between cards, and
     keep each card, chart and cycle whole. */
  .ho-project.full{break-inside:auto;page-break-inside:auto}
  .ho-qi .qip-card,.ho-qi .qip-measure,.ho-qi .qip-cycle,.ho-qi .qip-pmap,.ho-qi .aud-crit,.ho-qi .qip-dr-primary{break-inside:avoid;page-break-inside:avoid}
  .ho-qi .qip-card{border:0.5pt solid #ccc}
  .ho-qi .qip-data summary{list-style:none}
  .ho-qi .qip-steps a span{display:block!important;position:static!important;font-size:7.5pt}
  .ho-switch{display:none}
  /* Browsers leave backgrounds out of print by default; the aim box (white on
     purple), the driver levels, the audit bars and the problem steps all rely
     on them, so this sheet asks for them. */
  .ho-doc,.ho-doc *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  /* The driver diagram in four columns on an A4 page: smaller type, the aim
     at the top rather than floating mid-diagram across a page break. */
  .ho-qi .qip-dr{align-items:start}
  .ho-qi .qip-dr-aim{align-items:start}
  .ho-qi .qip-dr-legend span{font-size:6.5pt}
  .ho-qi .qip-node{font-size:8pt;line-height:1.3;padding:4pt 6pt;border-radius:6pt}
  .ho-qi .qip-node.aim{font-size:8.5pt;box-shadow:none}
  .ho-qi .qip-dr-primary,.ho-qi .qip-dr-second{gap:8pt}
}

@media(max-width:700px){
  .ho-head{flex-direction:column;gap:12px}
  .ho-stamp{text-align:left}
  .v10-ho-bar{flex-wrap:wrap;gap:8px}
  .v10-ho-bar small{width:100%;order:3}
  .ho-people table{font-size:12px}
}
