/* Pitchbook slides. Every slide is laid out at 1280 x 720 px (13.33 x 7.5 in, like PowerPoint 16:9)
   and scaled to the available width by deck.js. Text inside .slide-body uses em, so deck.js can shrink a
   crowded slide by lowering --fit. */

/* ---------- viewer page (site chrome around the slides – the slides themselves start below) ---------- */
.viewer-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap;
  margin-bottom: 22px; }
.viewer-title { min-width: 0; }
.viewer-title .back { margin-bottom: 12px; }
.viewer-title h1 { margin: 0; font-size: 2rem; line-height: 1.1; overflow-wrap: anywhere; }
.viewer-title .tags { margin-top: 12px; }
.viewer-actions { gap: 8px; }
.viewer-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; margin-top: 18px; }
@media (max-width: 1000px) { .viewer-grid { grid-template-columns: minmax(0, 1fr); } .slide-nav { display: none; } }
.slide-nav { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto;
  font-size: 13.5px; padding: 2px 6px 12px 0; }
.slide-nav-title { font: 600 1.1rem/1.3 var(--serif, Georgia, serif); color: #123D2F; margin: 0 0 10px; }
.slide-nav ol { list-style: none; padding: 0; margin: 0 0 20px; border-left: 1px solid #E5DFD2; }
.slide-nav li { margin: 0; }
.slide-nav a { display: flex; gap: 10px; padding: 5px 10px 5px 12px; margin-left: -1px; border-left: 2px solid transparent;
  color: #14231D; text-decoration: none; line-height: 1.35;
  transition: color .15s ease, border-color .2s ease, background-color .15s ease; }
.slide-nav a .n { flex: none; width: 1.5em; color: #5E6B65; font-variant-numeric: tabular-nums; }
.slide-nav a:hover { color: #123D2F; background: #F1EDE3; }
.slide-nav a.is-current { border-left-color: #B8975A; color: #123D2F; font-weight: 600; }
.slide-nav a.is-current .n { color: #7A5C18; }
.legend { border-top: 1px solid #E5DFD2; padding-top: 16px; }
.legend p { margin: 6px 0; }
.slide-nav .usage { margin-top: 16px; line-height: 1.5; }
.deck { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.unlock-card { border: 1px solid #E5DFD2; border-left: 3px solid #B8975A; background: #FFFCF4; border-radius: 4px;
  padding: 18px 22px; margin: 0 0 18px; }
.unlock-card h3 { margin: 0 0 6px; font: 600 1.3rem/1.3 var(--serif, Georgia, serif); color: #123D2F; }
.unlock-card p { margin: 0; }
.unlock-card .actions { margin-top: 14px; }
.more-menu > summary { padding: 9px 11px; border: 1px solid rgba(11, 31, 58, .28); border-radius: 4px; color: #123D2F; }
.menu-panel button.danger { color: #A3281E !important; }
.left-out-link { margin: -8px 0 18px; }
.left-out { border: 1px dashed #D2C9B8; border-radius: 6px; background: #FFFEFB; padding: 18px 22px; margin-top: 8px; }
.left-out h2 { margin: 0 0 6px; font-size: 1.3rem; }
.left-out p { margin: 0 0 12px; }
.left-out-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.left-out-list > li { border-top: 1px solid #E5DFD2; padding-top: 12px; }
.left-out-list .edit-panel { margin-top: 10px; }
.menu-panel button.danger .icon { color: #A3281E; }

/* ---------- slide frame ---------- */
.slide-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #fff;
  border: 1px solid #dce5df; border-radius: 6px; box-shadow: 0 1px 3px rgba(15, 39, 71, .08); margin-top: 10px; }
.slide { --brand: #123d2f; --accent: #b8975a; --muted: #4f5d57; --ink: #14231d; --fit: 1;
  position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0;
  transform: scale(var(--scale, 1)); padding: 38px 52px 16px; display: flex; flex-direction: column;
  font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: #fff; box-sizing: border-box; }
.slide-head { flex: none; margin-bottom: 18px; }
.slide-head h2 { margin: 0; font-size: 33px; line-height: 1.15; color: var(--brand); font-weight: 700; }
.slide-head p { margin: 4px 0 0; color: var(--muted); font-size: 17px; }
.slide-body { --air: 0px; flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  gap: calc(0.9em + var(--air)); font-size: calc(17px * var(--fit)); line-height: 1.38; }
.row-split { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 1.8em; }
.col-left, .col-right, .row-full { display: flex; flex-direction: column; gap: calc(0.85em + var(--air)); min-width: 0; }
/* a slide made of one block of cards: the cards share the whole slide */
.row-full:only-child:has(> .blk-cards:only-child) { flex: 1 1 auto; }
.row-full:only-child > .blk-cards:only-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.row-full:only-child > .blk-cards:only-child .cards { flex: 1 1 auto; grid-auto-rows: 1fr; }
.row-full:only-child > .blk-cards:only-child .card-item { display: flex; flex-direction: column; justify-content: center;
  padding: 1.2em 1.4em; }
.row-full:only-child > .blk-cards:only-child .card-item h4 { font-size: 1.2em; margin-bottom: 0.5em; }
.row-full:only-child > .blk-cards:only-child .card-item p { font-size: 1em; }
.slide-foot { flex: none; display: flex; justify-content: space-between; gap: 16px; font-size: 11.5px; color: #5E6B65;
  margin-top: 10px; padding-top: 6px; border-top: 1px solid #eef0f4; }
.slide-foot .foot-src { flex: 1; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.slide-foot .wm { color: #b8975a; }

/* ---------- cover ---------- */
.is-cover { padding: 0; }
.is-cover .slide-body { padding: 0; font-size: 17px; gap: 0; }
.is-cover .row-full, .is-cover .blk { flex: 1 1 auto; height: 100%; display: flex; flex-direction: column; }
.cover { flex: 1; display: flex; flex-direction: column; justify-content: center; background: var(--brand); color: #fff;
  padding: 64px 80px 34px; height: 100%; box-sizing: border-box; }
.cover-sub { text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; font-size: 16px; margin: 0; }
.cover-title { font-size: 56px; margin: 14px 0 12px; line-height: 1.08; }
.cover-tagline { font-size: 23px; opacity: .88; margin: 0; max-width: 1000px; line-height: 1.35; }
.cover-code { margin-top: 24px; font-weight: 700; color: var(--accent); font-size: 18px; }
.cover-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 30px; font-size: 16px; opacity: .95; }
.cover-conf { font-size: 12.5px; opacity: .72; margin: 10px 0 0; }
.cover-demo { background: var(--accent); color: var(--brand); font-weight: 700; padding: 5px 12px; border-radius: 4px;
  align-self: flex-start; margin-bottom: 22px; font-size: 14px; }

/* ---------- company branding: logo, slogan, colour ---------- */
.cover { position: relative; }
.cover.has-logo { padding-top: 214px; }
.cover.has-logo .cover-demo { position: absolute; top: 58px; left: 80px; margin: 0; }
.cover-logo { position: absolute; top: 56px; right: 80px; width: 340px; height: 124px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; padding: 18px 26px; background: #fff;
  border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.cover-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.cover-logo.is-light { background: transparent; box-shadow: none; padding: 0; justify-content: flex-end; }
.cover.has-stripe { box-shadow: inset 12px 0 0 var(--stripe); }
.cover-slogan { font-size: 21px; font-style: italic; color: #fff; opacity: .92; margin: -2px 0 12px; max-width: 1000px;
  line-height: 1.35; }
.slide-logo { position: absolute; top: 34px; right: 52px; width: 172px; height: 46px; object-fit: contain;
  object-position: right center; }
.slide-logo.is-light { width: auto; max-width: 196px; padding: 7px 11px; border-radius: 6px; background: var(--brand);
  box-sizing: border-box; }
.slide.has-logo .slide-head { padding-right: 204px; }
.slide.has-accent .slide-head { margin-bottom: 6px; }
.slide.has-accent .slide-head::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 9px;
  border-radius: 2px; background: var(--brand-accent); }

/* ---------- blocks ---------- */
.block-heading { font-size: 0.9em; margin: 0 0 0.4em; color: var(--brand); text-transform: none; }
.bullets { margin: 0; padding-left: 1.1em; }
.bullets li { margin: 0 0 calc(0.5em + var(--air)); }
.bullets li::marker { color: var(--accent); }
.cards { display: grid; gap: 0.8em; }
.cards-1 { grid-template-columns: minmax(0, 1fr); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-item { background: #f6f8f6; border-radius: 8px; padding: calc(0.85em + var(--air)) 1em; border-left: 4px solid var(--accent); }
.card-item h4 { margin: 0 0 0.35em; color: var(--brand); font-size: 1em; }
.card-item p { margin: 0; font-size: 0.88em; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(0.6em + var(--air) / 2); }
.row-full .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: #f6f8f6; border-radius: 8px; padding: 0.6em 0.8em; display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: 0.72em; color: var(--muted); }
.kpi-value { font-size: 1.4em; font-weight: 700; color: var(--brand); line-height: 1.2; overflow-wrap: anywhere; }
.kpi-sub { font-size: 0.7em; color: var(--muted); }
.slide dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: calc(0.32em + var(--air)) 1em; margin: 0;
  font-size: 0.82em; }
.slide dl.kv dt { color: var(--muted); max-width: 15em; }
.slide dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.deck-table { width: 100%; border-collapse: collapse; font-size: 0.78em; table-layout: auto; }
.deck-table th { text-align: left; font-weight: 700; color: #fff; background: var(--brand); padding: 0.35em 0.5em; }
.deck-table td { border-bottom: 1px solid #e6e9ef; padding: calc(0.32em + var(--air) / 2) 0.5em; vertical-align: top;
  overflow-wrap: break-word; hyphens: auto; }
.deck-table th { hyphens: auto; }
.deck-table tbody tr:nth-child(even) td { background: #f7f9fb; }
.deck-table .a-r { text-align: right; white-space: nowrap; }
.deck-table tr.hl td { background: #eef3ef !important; font-weight: 700; }
.deck-table td.hl-cell { background: #fdf3dc !important; font-weight: 700; }
.first-bold td:first-child { font-weight: 600; }
.note { font-size: 0.68em; color: var(--muted); margin: 0.3em 0 0; font-style: italic; }
.srcline { margin: 0.15em 0 0; line-height: 1; }
.body-text { font-size: 0.95em; max-width: 60em; margin: 0; }
.src { display: inline-block; font-size: 0.56em; font-weight: 700; padding: 0 0.35em; border-radius: 3px; text-decoration: none;
  vertical-align: 0.15em; margin-left: 0.15em; line-height: 1.55; font-style: normal; }
.src-ok { background: #e1f3e8; color: #17643c; } .src-info { background: #e6efea; color: #1b5141; }
.src-warn { background: #fff0d1; color: #8a5600; } .src-calc { background: #f3ecdd; color: #6e5524; }
.src-muted { background: #eef3ef; color: #4f5d57; }
.chart-box { position: relative; height: 15em; }
.chart-box.tall { height: 17em; }
.timeline { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2em; font-size: 0.82em; }
.timeline li { break-inside: avoid; display: flex; gap: 0.8em; padding: calc(0.32em + var(--air) / 2) 0;
  border-bottom: 1px dashed #dce5df; }
.tl-date { flex: 0 0 5.6em; font-weight: 700; color: var(--brand); }
.tl-web .tl-date { color: #1b5141; }
.grade { display: inline-flex; align-items: baseline; gap: 0.4em; font-weight: 800; font-size: 1.9em; padding: 0.05em 0.6em;
  border-radius: 8px; margin-bottom: 0.3em; }
.grade small { font-size: 0.4em; font-weight: 600; }
.grade-A { background: #e1f3e8; color: #17643c; } .grade-B { background: #eaf5dc; color: #3e6b12; }
.grade-C { background: #fff0d1; color: #8a5600; } .grade-D { background: #fde5d3; color: #9a4a00; } .grade-E { background: #fde5e3; color: #b42318; }
.flags { list-style: none; padding: 0; margin: 0; font-size: 0.78em; }
.flags li { padding: calc(0.3em + var(--air) / 2) 0; border-bottom: 1px solid #eef0f4; }
.sev { font-size: 0.75em; text-transform: uppercase; font-weight: 800; padding: 0.05em 0.45em; border-radius: 3px; }
.sev-critical { background: #b42318; color: #fff; } .sev-high { background: #fde5e3; color: #b42318; }
.sev-medium { background: #fff0d1; color: #8a5600; } .sev-low { background: #eef3ef; color: #1b5141; }
.sev-info { background: #eef3ef; color: #4f5d57; }
.sources-table { font-size: 0.7em; }
.sources-table .src { font-size: 0.85em; margin-left: 0; }
.sources-table a { color: #1b5141; text-decoration: none; }
.slide .muted { color: var(--muted); }

/* ---------- edit tools (web viewer only, below each slide) ---------- */
.slide-tools { display: flex; flex-direction: column; gap: 8px; }
.edit-panel { border: 1px solid #E5DFD2; border-radius: 6px; background: #FFFEFB; }
.edit-panel summary { cursor: pointer; color: #123D2F; font-size: 14px; font-weight: 500; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px; list-style: none; border-radius: 6px; transition: background-color .15s ease; }
.edit-panel summary::-webkit-details-marker { display: none; }
.edit-panel summary:hover { background: #F7F5EF; }
.edit-panel summary .icon { color: #7A5C18; }
.edit-panel[open] summary { border-bottom: 1px solid #E5DFD2; border-radius: 6px 6px 0 0; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 14px; }
.edit-item { display: grid; gap: 8px; padding: 12px; border: 1px solid #ECE7DC; border-radius: 6px; background: #fff;
  align-content: start; }
.edit-item.add { border-style: dashed; background: #FCFAF5; }
.edit-item input, .edit-item textarea, .edit-item select, .regen input { margin: 0; font-size: 13.5px; padding: 8px 10px; }
.edit-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.edit-item .small-input { font-size: 12.5px; }
.edit-actions { display: flex; gap: 8px; }
.regen { display: flex; gap: 8px; margin: 0 14px 14px; }
.regen input { flex: 1; }
.danger { color: #b42318 !important; }
.chart-box.chart-h { height: 13em; }

/* branding editor (under the cover) */
.brand-form { padding: 14px; }
.brand-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .brand-grid { grid-template-columns: minmax(0, 1fr); } }
.brand-logo, .brand-fields { display: grid; gap: 10px; align-content: start; }
.brand-label { margin: 0; font-weight: 600; font-size: 14px; color: #123D2F; }
.brand-preview { display: flex; align-items: center; justify-content: center; height: 84px; border-radius: 6px;
  padding: 12px 16px; box-sizing: border-box; border: 1px solid #E5DFD2; }
.brand-preview.on-white { background: #fff; }
.brand-preview.on-navy { background: #123D2F; border-color: #123D2F; }
.brand-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-fields label { display: grid; gap: 5px; font-size: 14px; font-weight: 500; color: #123D2F; margin: 0; }
.brand-fields label.check, .brand-colour label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.brand-fields input:not([type=checkbox]):not([type=color]) { margin: 0; font-size: 14px; padding: 8px 10px; }
.brand-row { display: flex; gap: 8px; }
.brand-row input { flex: 1; min-width: 0; }
.brand-colour { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.brand-colour input[type=color] { width: 56px; height: 36px; padding: 2px; border: 1px solid #D2C9B8; border-radius: 4px;
  background: #fff; cursor: pointer; }
.brand-logo input[type=file] { font-size: 13px; margin-top: 4px; }
.brand-logo .btn { justify-self: start; }

.cover-by { display: inline-flex; align-items: center; gap: 10px; }
.cover-firm-logo { height: 28px; width: auto; max-width: 140px; background: #fff; padding: 4px 6px; border-radius: 3px; }