/* Deal Lab: the overview, the buyout model of each company and the screen. Loaded after site.css on these pages only;
   every colour is a token of site.css, so both themes follow. Series: --s1 to --s4 in their fixed order. */
.dl-head .kicker a { color: inherit; }
.dl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dl-chip { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--ink-2); background: var(--surface); }
.dl-chip.link { color: var(--accent); }
.dl { padding-bottom: 48px; }
.dl-block { margin: 28px 0; }
.dl-block h2 { margin: 0 0 12px; font: 600 20px/1.3 var(--sans); }
.dl-block h3 { margin: 0 0 8px; font: 600 15px/1.3 var(--sans); color: var(--ink-2); }
.dl-scope { margin-top: 32px; }
.dl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 20px; }

/* the layout of the model: the assumptions beside the results */
.dl-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 18px; }
.dl-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding: 4px 6px 16px 0; }
.dl-group { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.dl-group > summary { cursor: pointer; padding: 11px 14px; font-weight: 600; list-style: none; display: flex;
  justify-content: space-between; }
.dl-group > summary::after { content: "+"; color: var(--ink-3); }
.dl-group[open] > summary::after { content: "−"; }
.dl-group > summary::-webkit-details-marker { display: none; }
.dl-field { padding: 8px 14px 10px; border-top: 1px solid var(--line); }
.dl-field .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.dl-field label { font-size: 13.5px; color: var(--ink-2); }
.dl-field .v { font: 500 13.5px var(--mono); color: var(--ink); white-space: nowrap; }
.dl-field .ctl { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 10px; align-items: center; margin-top: 6px; }
.dl-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.dl-field input[type="number"] { width: 100%; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 13px; }
.dl-field .o { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.dl-field.changed .o { color: var(--warm); }
.dl-field .reset { margin-left: 8px; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; }
.dl-field.flag label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
/* a grid of 2 columns: a button that changes its label (Copied) keeps its row and its cell */
.dl-actions { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 8px; margin-top: 12px; }
.dl-actions .btn { justify-self: stretch; justify-content: center; text-align: center; }
.dl-actions .btn, .btn.small { font-size: 13px; padding: 6px 12px; }

/* figures */
.dl-kpis { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dl-screen .dl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dl-tile, .dl-hero { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.dl-tile .l, .dl-hero .l { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.dl-tile .v { margin: 4px 0 0; font: 600 21px/1.2 var(--sans); }
.dl-tile .o { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.dl-tile.solver .btn { margin-top: 10px; }
.dl-hero { background: var(--accent-soft); border-color: transparent; }
.dl-hero .v { margin: 2px 0 0; font: 600 48px/1.05 var(--sans); }
.dl-hero .v.up { color: var(--accent-ink); }
.dl-hero .s { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }
.dl-solvers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* charts: marks carry the series tokens, text the ink tokens */
.dl-chart { position: relative; width: 100%; }
.dl-chart svg { display: block; overflow: visible; }
.dl-gl { stroke: var(--grid); stroke-width: 1; }
.dl-zero { stroke: var(--axis); stroke-width: 1; }
.dl-ax, .dl-xl, .dl-val, .dl-note { fill: var(--ink-3); font: 11.5px var(--sans); }
.dl-val { fill: var(--ink-2); font-weight: 600; }
.dl-note { font-style: italic; }
.dl-bar { stroke: var(--surface); stroke-width: 0; transition: opacity .15s; }
.dl-bar:hover, .dl-bar:focus { opacity: .82; outline: none; }
.dl-hit { fill: transparent; }
.dl-c1 { fill: var(--s1); stroke: var(--s1); background: var(--s1); }
.dl-c2 { fill: var(--s2); stroke: var(--s2); background: var(--s2); }
.dl-c3 { fill: var(--s3); stroke: var(--s3); background: var(--s3); }
.dl-c4 { fill: var(--s4); stroke: var(--s4); background: var(--s4); }
.dl-pos { fill: var(--s1); }
.dl-neg { fill: var(--s2); }
.dl-tot { fill: var(--ink-3); }
rect.dl-c1, rect.dl-c2, rect.dl-c3, rect.dl-c4 { stroke: none; }
.dl-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dl-dot { stroke: var(--surface); stroke-width: 2; }
.dl-dot.edge { fill: var(--surface); stroke-width: 2.5; }
.dl-dot.edge.dl-c1 { stroke: var(--s1); } .dl-dot.edge.dl-c2 { stroke: var(--s2); }
.dl-dot.edge.dl-c3 { stroke: var(--s3); } .dl-dot.edge.dl-c4 { stroke: var(--s4); }
.dl-limit { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 12.5px;
  color: var(--ink-2); }
.dl-legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dl-legend .k.line { height: 2px; width: 14px; border-radius: 1px; vertical-align: 3px; }
.dl-legend .k.dl-lim { background: var(--ink-3); }
.dl-legend .k.ring { border-radius: 50%; border: 2px solid var(--ink-3); background: var(--surface); }
.dl-tip { position: absolute; z-index: 5; min-width: 170px; max-width: 240px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); pointer-events: none; font-size: 12.5px; }
.dl-tip .t { margin: 0 0 4px; color: var(--ink-3); }
.dl-tip .r { margin: 2px 0; color: var(--ink-2); }
.dl-tip .r strong { color: var(--ink); font-weight: 600; }
.dl-tip .k { display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: 3px; }

/* sources and uses: 2 bars of the same length, a 2px gap of the surface between segments */
.dl-su { position: relative; display: grid; gap: 16px; }
.dl-su-row .n { margin: 0 0 6px; font-weight: 600; font-size: 13.5px; }
.dl-su-bar { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; background: var(--surface); }
.dl-su-bar .seg { min-width: 2px; }
.dl-su-bar .seg:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.dl-su .dl-legend strong { color: var(--ink); font-weight: 600; margin-left: 4px; }

/* the sensitivity tables: diverging tones around the target return, the case outlined */
.dl-heat { position: relative; overflow-x: auto; }
.dl-heat table { border-collapse: separate; border-spacing: 2px; width: 100%; font: 12.5px var(--mono); }
.dl-heat th { font: 500 12px var(--sans); color: var(--ink-3); padding: 4px 6px; text-align: center; text-transform: none; letter-spacing: 0; }
.dl-heat th.corner { text-align: left; }
.dl-heat td { text-align: center; padding: 8px 4px; border-radius: 4px; color: var(--ink); cursor: default; }
.dl-heat td.centre { outline: 2px solid var(--ink); outline-offset: -2px; font-weight: 600; }
.dl-heat td:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the bands of credit metrics, year by year: the name of the band always beside its tone */
.dl-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin-top: 16px; }
.dl-band { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); font-size: 12px; }
.dl-band span { display: block; }
.dl-band .y { color: var(--ink-3); }
.dl-band .b { font-weight: 600; color: var(--ink); }
.dl-band .x { font-family: var(--mono); color: var(--ink-2); }
.dl-band.b-minimal, .dl-band.b-modest { border-left: 4px solid var(--s3); }
.dl-band.b-intermediate { border-left: 4px solid var(--s1); }
.dl-band.b-significant, .dl-band.b-aggressive { border-left: 4px solid var(--s4); }
.dl-band.b-highly_leveraged { border-left: 4px solid var(--s2); }

/* tables */
.dl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dl-table th { text-align: right; font: 500 12.5px var(--sans); color: var(--ink-3); text-transform: none; letter-spacing: 0; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dl-table th:first-child { text-align: left; }
.dl-table td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.dl-table td.name { text-align: left; font-family: var(--sans); white-space: normal; color: var(--ink-2); }
.dl-table .est { font: 11px var(--sans); color: var(--warm); margin-left: 4px; }
.dl-inputs td:nth-child(3), .dl-inputs td:nth-child(4) { font-family: var(--sans); white-space: normal; text-align: left; color: var(--ink-2); }
.dl-table th .sort { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.dl-table th[aria-sort="ascending"] .sort::after { content: " ↑"; }
.dl-table th[aria-sort="descending"] .sort::after { content: " ↓"; }
.dl-checks { list-style: none; padding: 0; margin: 0; columns: 2; font-size: 13.5px; }
.dl-checks li { break-inside: avoid; padding: 3px 0 3px 22px; position: relative; color: var(--ink-2); }
.dl-checks li.ok::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.dl-checks li.bad::before { content: "✕"; position: absolute; left: 0; color: var(--fail); font-weight: 700; }
.dl-checks li.bad { color: var(--ink); }
.dl-missing { padding-left: 18px; }
.dl-missing li { margin: 4px 0; }
.dl-superseded { border-left: 3px solid var(--warm); padding-left: 10px; }

/* the screen */
.dl-terms { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; margin: 18px 0; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dl-terms label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); min-width: 160px; }
.dl-terms label strong { font: 500 13px var(--mono); color: var(--ink); margin-left: 6px; }
.dl-terms input[type="range"] { accent-color: var(--accent); }
.dl-terms select { padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color: var(--ink); }

/* the overview */
.dl-models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dl-model { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--ink-3); }
.dl-model.live { color: var(--ink); }
.dl-model .t { font-weight: 600; }
.dl-model .d { font-size: 13px; color: var(--ink-2); }
a.dl-model:hover { text-decoration: none; border-color: var(--accent); }
.dl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.dl-card { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13.5px; }
.dl-card .m { font-family: var(--mono); color: var(--ink-3); white-space: nowrap; }
a.dl-card:hover { text-decoration: none; border-color: var(--accent); }
.dl-principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.dl-principles h3 { margin: 0 0 4px; font-size: 15px; }
.dl-principles p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

@media (max-width: 1000px) {
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .dl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-hero { grid-column: 1 / -1; }
  .dl-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dl-two, .dl-solvers { grid-template-columns: minmax(0, 1fr); }
  .dl-screen .dl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dl-models { grid-template-columns: minmax(0, 1fr); }
  .dl-checks { columns: 1; }
  .dl-hero .v { font-size: 40px; }
  .dl-terms label { min-width: 0; width: 100%; }
}

/* ease of use: the 3 steps, the result in a sentence, a definition beside each term, how to read each chart */
.dl-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 4px; padding: 0;
  list-style: none; counter-reset: step; }
.dl-steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 44px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.dl-steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 600 12px/22px var(--sans); text-align: center; }
.dl-summary { margin: 0 0 14px; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 72ch; }
.dl-read { margin: -4px 0 12px; font-size: 13px; color: var(--ink-3); max-width: 80ch; }
.dl-help { display: inline; }
.dl-help .q { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 6px;
  padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink-3);
  font: 600 10.5px/1 var(--sans); cursor: pointer; vertical-align: 1px; }
.dl-help .q[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.dl-help .def { display: block; margin: 6px 0 2px; padding: 7px 9px; border-radius: 8px; background: var(--surface-2);
  font: 400 12.5px/1.45 var(--sans); color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.dl-field .lab { display: inline; }
.dl-field .top { flex-wrap: wrap; }
@media (max-width: 1000px) { .dl-steps { grid-template-columns: minmax(0, 1fr); } }
.dl-defs { display: grid; grid-template-columns: minmax(130px, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 16px 0 0;
  font-size: 13px; }
.dl-defs dt { font-weight: 600; color: var(--ink-2); }
.dl-defs dd { margin: 0; color: var(--ink-3); }
@media (max-width: 640px) { .dl-defs { grid-template-columns: minmax(0, 1fr); } .dl-defs dd { margin-bottom: 6px; } }
.dl-derived { margin: 0; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--accent-soft);
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
