/* Milou for Acquisition Diligence — the structured-workflow front door.
   Same tokens as chat.css (one warm neutral ramp, one teal accent, IBM Plex);
   verdicts are the only extra hues, and they always ride on a tinted pill with
   dark text so every label clears WCAG AA. */
:root {
  --bg: #FAF9F7;
  --bg-elev: #F5F3EF;
  --bg-panel: #FBFAF8;
  --bg-card: #FFFFFF;
  --bg-hover: #EBE8E2;
  --border: #E3E1DC;
  --border-strong: #DDDAD3;
  --border-soft: #EFEDE8;
  --border-hover: #B9B5AC;
  --text: #14161A;
  --text-soft: #5A6068;
  --text-dim: #696E75;
  --accent: #1F4A52;
  --accent-hover: #14383E;
  --accent-soft: #EEF2F1;
  --accent-border: #B9C7C7;
  --on-accent: #FFFFFF;
  --danger: #B3373A;
  --warning: #8A6514;
  --warning-soft: #FBF4E4;
  --row-hover: rgba(31, 74, 82, 0.06);
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, 0.04);
  --shadow-md: 0 6px 18px rgba(20, 22, 26, 0.08);

  --v-supported-bg: #E5F2EA;      --v-supported: #1C6A44;
  --v-overstated-bg: #FBF0DC;     --v-overstated: #7A4F08;
  --v-contradicted-bg: #FBE8E8;   --v-contradicted: #9B2629;
  --v-unverifiable-bg: #EEF0F2;   --v-unverifiable: #4B515A;
  --v-not_testable-bg: #F2F2F0;   --v-not_testable: #5B616B;
  --v-data_room-bg: #F3EEE5;      --v-data_room: #5E4F38;

  --rail: 260px;
  --copilot: 440px;
  --bar-h: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
button { font: inherit; }

/* ── Frame ── */
.dl-app { display: flex; height: 100vh; overflow: hidden; }
.dl-rail {
  width: var(--rail); flex: 0 0 var(--rail);
  background: var(--bg-elev); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px 12px; min-height: 0;
}
.dl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-copilot {
  width: var(--copilot); flex: 0 0 var(--copilot);
  border-left: 1px solid var(--border); background: var(--bg);
  display: flex; flex-direction: column; min-height: 0;
}
.dl-copilot[hidden] { display: none; }
.dl-copilot iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* ── Rail ── */
.dl-brand { display: flex; flex-direction: column; padding: 2px 6px 14px; }
.dl-word { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 22px; color: var(--accent); line-height: 1.1; }
.dl-brand-sub { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-soft); margin-top: 4px; }
.dl-new {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px;
  padding: 9px 12px; font-weight: 500; cursor: pointer;
}
.dl-new:hover { background: var(--accent-hover); }
.dl-rail-label { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin: 18px 6px 6px; }
.dl-deals { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.dl-deal {
  display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px;
  padding: 8px 10px; cursor: pointer; color: var(--text);
}
.dl-deal:hover { background: var(--bg-hover); }
.dl-deal.active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.dl-deal-title { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-deal-meta { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-dim); margin-top: 1px; }
.dl-rail-empty { color: var(--text-dim); font-size: 13px; padding: 6px 10px; }
.dl-rail-sublabel { margin-top: 14px; }
/* Workflow tag in each rail row, so ten running deals can be told apart. */
.dl-deal-kind {
  display: inline-block; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: 3px; padding: 0 4px; margin-right: 6px; line-height: 1.5; vertical-align: 1px;
}
.dl-rail-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-soft); padding: 10px 6px 2px; border-top: 1px solid var(--border); }
.dl-lock { width: 9px; height: 9px; border-radius: 50%; background: #0F766E; flex: 0 0 9px; }

/* ── Top bar ── */
.dl-bar {
  height: var(--bar-h); flex: 0 0 var(--bar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.dl-bar-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.dl-bar-title h1 { font-size: 15px; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-bar-title .dl-kind { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.dl-bar-actions { display: flex; gap: 8px; align-items: center; }
.dl-icon-btn { background: none; border: 0; color: var(--text-soft); padding: 6px; border-radius: 6px; cursor: pointer; display: inline-flex; }
.dl-icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.dl-rail-toggle { display: none; }
.dl-copilot-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.dl-copilot-toggle[hidden] { display: none; }
.dl-copilot-toggle[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.dl-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.dl-btn:hover { border-color: var(--border-hover); }
.dl-btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.dl-btn.primary:hover { background: var(--accent-hover); }
.dl-btn.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.dl-btn.danger { color: var(--danger); }
.dl-btn.small { padding: 4px 9px; font-size: 12px; }
.dl-btn.lg { padding: 11px 18px; font-size: 14.5px; }

/* ── Content column ── */
.dl-view { flex: 1; overflow-y: auto; padding: 28px 24px 64px; }
.dl-col { max-width: 980px; margin: 0 auto; }
.dl-eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.dl-h1 { font-size: 28px; line-height: 1.2; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
.dl-lede { color: var(--text-soft); font-size: 15.5px; max-width: 680px; margin: 0 0 26px; }
.dl-h2 { font-size: 18px; font-weight: 600; margin: 34px 0 12px; }
.dl-muted { color: var(--text-soft); }
.dl-small { font-size: 12.5px; }

/* Job cards */
.dl-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dl-job {
  text-align: left; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 18px 18px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.dl-job:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); }
/* The flagship is the front door: dark-teal frame and a filled CTA; the other
   two keep outlined CTAs so the eye lands here first. */
.dl-job.primary-job {
  border: 1.5px solid var(--accent); box-shadow: inset 0 3px 0 var(--accent), var(--shadow-sm);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-card) 60%);
}
.dl-job.primary-job:hover { border-color: var(--accent-hover); box-shadow: inset 0 3px 0 var(--accent), var(--shadow-md); }
.dl-job-actions { margin-top: auto; padding-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.dl-btn.outline { background: transparent; color: var(--accent); border-color: var(--accent-border); }
.dl-btn.outline:hover { border-color: var(--accent); background: var(--accent-soft); }
.dl-sample-link {
  color: var(--accent); font-size: 13px; font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--accent-border); text-underline-offset: 3px;
}
.dl-sample-link:hover { text-decoration-color: var(--accent); }
.dl-job-tag { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.dl-job h3 { margin: 0; font-size: 16.5px; font-weight: 600; }
.dl-job p { margin: 0; color: var(--text-soft); font-size: 13.5px; }
.dl-job dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12.5px; }
.dl-job dt { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.dl-job dd { margin: 0; color: var(--text); }

.dl-trust { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dl-trust div { border-top: 2px solid var(--accent); padding-top: 10px; }
.dl-trust h4 { margin: 0 0 4px; font-size: 13.5px; }
.dl-trust p { margin: 0; color: var(--text-soft); font-size: 13px; }

/* Forms */
.dl-card { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 12px; padding: 22px; }
.dl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.dl-field { display: flex; flex-direction: column; gap: 5px; }
.dl-field.wide { grid-column: 1 / -1; }
.dl-field label { font-size: 12.5px; font-weight: 500; }
.dl-field .hint { font-size: 12px; color: var(--text-dim); }
.dl-field input[type=text], .dl-field select, .dl-field textarea {
  font: inherit; font-size: 14px; border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 8px 10px; background: var(--bg-panel); color: var(--text); width: 100%;
}
.dl-field textarea { min-height: 70px; resize: vertical; }
.dl-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; }
.dl-checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.dl-drop {
  grid-column: 1 / -1; border: 1.5px dashed var(--accent-border); border-radius: 12px; background: var(--accent-soft);
  padding: 22px; text-align: center; cursor: pointer; color: var(--text-soft);
}
.dl-drop.over { border-color: var(--accent); background: #E4ECEB; }
.dl-drop.secondary { padding: 12px 16px; background: var(--bg-panel); border-color: var(--border-strong); font-size: 13.5px; }
.dl-drop.secondary strong { font-weight: 500; }
.dl-drop strong { color: var(--accent); }
.dl-drop .file { display: block; margin-top: 6px; font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--text); }
.dl-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 4px; }
.dl-privacy {
  display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-soft);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 16px;
}
.dl-privacy strong { color: var(--text); }
.dl-error { color: var(--danger); font-size: 13px; }
.dl-back { background: none; border: 0; color: var(--text-soft); cursor: pointer; padding: 0; margin-bottom: 14px; font-size: 13px; }
.dl-back:hover { color: var(--text); }

/* Progress */
.dl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-step { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.dl-step .st { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 2px solid var(--border-strong); }
.dl-step.running .st { border-color: var(--accent); border-right-color: transparent; animation: dl-spin 0.9s linear infinite; }
.dl-step.done .st { background: var(--accent); border-color: var(--accent); }
.dl-step.failed .st { background: var(--danger); border-color: var(--danger); }
.dl-step .tool { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--text-dim); }
@keyframes dl-spin { to { transform: rotate(360deg); } }
.dl-bar-meter { height: 4px; background: var(--border-soft); border-radius: 4px; overflow: hidden; margin: 14px 0 20px; }
.dl-bar-meter span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }

/* Verdicts */
.dl-pill {
  display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--v-unverifiable-bg); color: var(--v-unverifiable);
}
.dl-pill.supported { background: var(--v-supported-bg); color: var(--v-supported); }
.dl-pill.overstated { background: var(--v-overstated-bg); color: var(--v-overstated); }
.dl-pill.contradicted { background: var(--v-contradicted-bg); color: var(--v-contradicted); }
.dl-pill.not_testable { background: var(--v-not_testable-bg); color: var(--v-not_testable); }
.dl-pill.data_room { background: var(--v-data_room-bg); color: var(--v-data_room); }
.dl-pill.pending { background: var(--bg-elev); color: var(--text-dim); font-weight: 500; }
.dl-counts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 18px 0 8px; }
.dl-count { border-radius: 10px; padding: 10px 14px; background: var(--v-unverifiable-bg); color: var(--v-unverifiable); border: 1px solid transparent; text-align: left; font: inherit; cursor: pointer; }
.dl-count:not([disabled]):hover { border-color: currentColor; }
.dl-count[disabled] { cursor: default; opacity: 0.62; }
.dl-count b { display: block; font-size: 22px; line-height: 1.1; font-weight: 600; }
.dl-count span { font-size: 12px; font-weight: 500; }
.dl-count.supported { background: var(--v-supported-bg); color: var(--v-supported); }
.dl-count.overstated { background: var(--v-overstated-bg); color: var(--v-overstated); }
.dl-count.contradicted { background: var(--v-contradicted-bg); color: var(--v-contradicted); }
.dl-count.not_testable { background: var(--v-not_testable-bg); color: var(--v-not_testable); }
.dl-count.data_room { background: var(--v-data_room-bg); color: var(--v-data_room); }

/* Tables */
.dl-table-wrap { overflow-x: auto; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-card); }
.dl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dl-table th { text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-soft); background: var(--bg-elev); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dl-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.dl-table tr:last-child td { border-bottom: 0; }
.dl-table tr.clickable { cursor: pointer; }
.dl-table tr.clickable:hover td { background: var(--row-hover); }
.dl-table .id { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.dl-table .num { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; white-space: nowrap; }
.dl-quote { font-size: 13.5px; }
.dl-quote q { quotes: "\201C" "\201D"; }
.dl-sub { display: block; font-size: 12px; color: var(--text-dim); margin-top: 3px; }
/* Seller-framing flags: a true figure that misdescribes the deal. The warning
   tone, not red: the verdict says whether the number is right; the flag says
   why it still misleads. */
.dl-flag { display: inline-block; margin: 4px 6px 0 0; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--warning); background: var(--warning-soft);
  border: 1px solid #EBD9AE; }
.dl-flag-detail .k, .dl-stale { color: var(--warning); }
.dl-sources-line { margin: 6px 0; }
.dl-sources-line a { color: var(--accent); }
/* The calculation under a verdict. The figure the verdict uses is marked. */
.dl-calc { margin: 10px 0 12px; }
.dl-calc .dl-table-wrap { width: fit-content; max-width: 100%; }
.dl-calc .dl-table { width: auto; font-size: 12.5px; }
.dl-calc .dl-table th {
  font-family: inherit; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 6px 12px;
}
.dl-calc .dl-table td { padding: 6px 12px; background: var(--bg-card); color: var(--text-soft); }
.dl-calc .dl-table .hit td { color: var(--text); }
.dl-calc .dl-table .num { text-align: right; font-family: inherit; font-variant-numeric: tabular-nums; }
.dl-calc .dl-table th:not(:first-child) { text-align: right; }
.dl-calc .dl-sub { margin-top: 0; }
.dl-calc mark { background: #FBE7A8; color: var(--text); font-weight: 600; border-radius: 3px; padding: 1px 3px; margin: 0 -3px; }
.dl-calc .dl-calc-text mark { margin: 0; }
.dl-calc .dl-calc-text { margin: 0; padding-left: 12px; border-left: 2px solid var(--accent-border); max-width: 76ch; }
.dl-calc > .dl-muted { margin: 5px 0 0; }
.dl-tag { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--text-soft); background: var(--bg-elev); border-radius: 4px; padding: 1px 6px; margin-right: 4px; }
.dl-geo-input { font: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px; width: 170px; background: var(--bg-panel); }
.dl-detail td { background: var(--bg-panel); }
.dl-detail-body { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; font-size: 13px; }
.dl-detail-body p { margin: 0 0 6px; }
.dl-detail-body .k { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); }

/* Memo prose */
.dl-section { margin-top: 30px; }
.dl-prose { font-size: 14.5px; }
.dl-prose h1, .dl-prose h2, .dl-prose h3 { font-size: 15.5px; margin: 18px 0 8px; }
.dl-prose table { border-collapse: collapse; font-size: 13px; margin: 10px 0; display: block; overflow-x: auto; }
.dl-prose th, .dl-prose td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }
.dl-prose th { background: var(--bg-elev); }
.dl-prose img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.dl-prose code { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; background: var(--bg-elev); padding: 1px 5px; border-radius: 4px; }
.src-chip { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.dl-sources { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.dl-sources li { padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.dl-sources a { color: var(--accent); }
/* CIM page viewer ("View in CIM"): page text with the claim's quote marked. */
.dl-pagelink {
  font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent-border); text-underline-offset: 2px;
}
.dl-pagelink:hover { text-decoration-color: var(--accent); }
.dl-pagelink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.dl-detail-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.dl-modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 26, 0.38);
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.dl-modal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(20, 22, 26, 0.18); width: min(760px, 100%); max-height: min(86vh, 900px);
  display: flex; flex-direction: column; padding: 18px 20px 14px;
}
.dl-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dl-modal-head .dl-h2 { margin: 0; }
.dl-page-note { margin: 6px 0 10px; min-height: 1em; }
.dl-page-text {
  flex: 1; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: 14px; line-height: 1.6; color: var(--text);
  background: var(--bg-panel); border: 1px solid var(--border-soft); border-radius: 10px; padding: 14px 16px;
}
.dl-page-text:focus-visible { outline: 2px solid var(--accent-border); }
.dl-page-text mark { background: #FBE7A8; color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: 0 0 0 2px #FBE7A8; }
.dl-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.dl-modal-foot .dl-small { text-align: center; }
.dl-modal-foot .dl-btn[disabled] { opacity: 0.45; cursor: default; }
@media (max-width: 600px) {
  .dl-modal { padding: 0; align-items: stretch; }
  .dl-modal-card { border-radius: 0; max-height: none; width: 100%; padding: 14px 16px; }
  .dl-modal-foot { flex-wrap: wrap; }
  .dl-modal-foot .dl-small { order: 3; flex-basis: 100%; }
}
.dl-callout { background: var(--warning-soft); border: 1px solid #EBD9AE; color: #5E4610; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 14px 0; }
.dl-exports { display: flex; gap: 6px; }
.dl-expiry { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--text-dim); }

/* Read-only sample IC pack */
.dl-sample-banner {
  background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--text);
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin: 0 0 18px;
}
.dl-sample-banner a { color: var(--accent); font-weight: 500; }

/* Sign-in */
.dl-signin { max-width: 460px; margin: 60px auto; text-align: center; }
.dl-signin #dl-gsi { display: flex; justify-content: center; margin-top: 18px; }
.dl-signin-sample { margin-top: 26px; font-size: 13.5px; color: var(--text-soft); }

/* Published as the sample only: no workspaces, so no rail. */
.sample-only .dl-rail, .sample-only .dl-scrim, .sample-only .dl-rail-toggle { display: none; }
.dl-home { color: var(--accent); text-decoration: none; margin-right: 4px; }
.dl-bar-actions a.dl-btn { text-decoration: none; white-space: nowrap; }

.dl-short { display: none; }
@media (max-width: 600px) { .dl-full { display: none; } .dl-short { display: inline; } }
@media (max-width: 600px) { .sample-only .dl-bar-title { visibility: hidden; } }   /* the heading below has it in full */

/* ── Narrow screens ── */
.dl-scrim { display: none; }
@media (max-width: 1180px) {
  .dl-copilot {
    position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; width: min(var(--copilot), 100vw);
    box-shadow: var(--shadow-md);
  }
}
@media (max-width: 900px) {
  .dl-rail { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform .18s; }
  .dl-app.rail-open .dl-rail { transform: none; box-shadow: var(--shadow-md); }
  .dl-app.rail-open .dl-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 22, 26, .35); z-index: 35; }
  .dl-rail-toggle { display: inline-flex; }
  .dl-jobs, .dl-trust { grid-template-columns: 1fr; }
  .dl-form { grid-template-columns: 1fr; }
  .dl-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-view { padding: 20px 16px 48px; }
  .dl-bar { padding: 0 12px; }
  .dl-bar-title .dl-kind { display: none; }
  .dl-exports .dl-btn span.lbl { display: none; }
}
.dl-chart { display: block; max-width: 100%; margin: 14px 0 4px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.dl-copilot-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px 10px; border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.dl-copilot-title { margin: 0; font-size: 14px; font-weight: 600; }
.dl-copilot-sub { margin: 2px 0 0; font-size: 12px; color: var(--text-soft); }
/* Export buttons: format icon + label (label hidden on narrow screens). Muted
   format hues so PowerPoint / Excel / PDF read at a glance; all clear 4.5:1. */
.dl-ficon { display: inline-flex; flex: 0 0 auto; }
.dl-ficon.pptx { color: #B0461B; }
.dl-ficon.xlsx { color: #1D6F42; }
.dl-ficon.pdf { color: var(--danger); }

/* ── The CIM memo: tabs, an overview that fits a screen, evidence on demand ── */
.dl-tabs {
  position: sticky; top: -28px; z-index: 5; display: flex; gap: 2px; overflow-x: auto;
  background: var(--bg); border-bottom: 1px solid var(--border-strong); margin: 6px 0 20px; padding-top: 6px;
  scrollbar-width: none;
}
.dl-tabs::-webkit-scrollbar { display: none; }
.dl-tab {
  flex: 0 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 9px 12px 10px; font-size: 13.5px; font-weight: 500; color: var(--text-soft); cursor: pointer; white-space: nowrap;
}
.dl-tab:hover { color: var(--text); }
.dl-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.dl-tab:focus-visible { outline-offset: -3px; }
.dl-tab .n, .dl-filter .n, .dl-more summary .n, .dl-limit h3 .n {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; color: var(--text-dim); margin-left: 6px;
}
.dl-tab .warn {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 6px;
  border-radius: 50%; background: var(--warning-soft); color: var(--warning); font-size: 11px; font-weight: 600;
}
.dl-panel:focus { outline: none; }
.dl-panel > div > :first-child { margin-top: 0; }

.dl-block { margin-top: 28px; }
.dl-block .dl-h2 { margin: 0 0 10px; font-size: 16px; }
.dl-block-note { margin: -4px 0 12px; max-width: 76ch; }
.dl-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dl-block-head .dl-h2, .dl-block-head h3 { margin: 0; }
.dl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 0 36px; }
.dl-inline p { margin: 0; }

.dl-bottomline { background: var(--accent-soft); border-radius: 12px; padding: 16px 20px 17px; margin-bottom: 18px; }
.dl-bottomline .k { display: block; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.dl-bottomline p { margin: 0; font-size: 17px; line-height: 1.45; max-width: 74ch; text-wrap: pretty; }

.dl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.dl-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl-tile {
  display: flex; flex-direction: column; gap: 3px; text-align: left; font: inherit; color: var(--text);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
button.dl-tile { cursor: pointer; }
button.dl-tile:hover { border-color: var(--accent-border); background: var(--bg-panel); }
.dl-tile .k { font-size: 12.5px; color: var(--text-soft); line-height: 1.35; }
.dl-tile b { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.dl-tile .sub { font-size: 12px; color: var(--text-dim); line-height: 1.4; }

.dl-issues, .dl-asks { margin: 0; padding-left: 22px; }
.dl-issues li, .dl-asks li { padding-left: 4px; }
.dl-issues li::marker, .dl-asks li::marker { color: var(--text-dim); font-size: 13px; }
.dl-issues li + li { margin-top: 13px; }
.dl-issues h3 { font-size: 14.5px; font-weight: 600; margin: 0 0 2px; }
.dl-issues p { margin: 0; font-size: 13.5px; color: var(--text-soft); text-wrap: pretty; }
/* The label is a heading here, so the sentence after it starts one. */
.dl-issues p::first-letter { text-transform: uppercase; }
.dl-asks { font-size: 13.5px; }
.dl-asks li + li { margin-top: 10px; }
.dl-asks .dl-pagelink { font-size: 12.5px; white-space: nowrap; }
.dl-unsettled { margin: 26px 0 0; font-size: 13.5px; color: var(--text-soft); }
.dl-unsettled strong { color: var(--text); font-weight: 600; }

.dl-more { margin-top: 14px; border-top: 1px solid var(--border-soft); }
.dl-more + .dl-more { margin-top: 0; }
.dl-more > summary { cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 500; color: var(--accent); }
.dl-more > summary:hover { text-decoration: underline; text-underline-offset: 2px; }
.dl-more[open] > summary { margin-bottom: 6px; }
.dl-more .dl-prose { max-width: 80ch; }

/* Claims */
.dl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dl-filter {
  border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-soft);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.dl-filter:hover { border-color: var(--border-hover); color: var(--text); }
.dl-filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dl-filter[aria-pressed="true"] .n { color: inherit; }
.dl-table .dl-subhead th {
  font-family: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
  white-space: normal; color: var(--text-soft); border-top: 1px solid var(--border);
}
.dl-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.dl-part { display: block; font-size: 12px; font-weight: 500; color: var(--text-soft); margin-top: 2px; }
.dl-verdict { white-space: nowrap; }
.dl-chev {
  display: inline-block; width: 6px; height: 6px; margin-left: 10px; vertical-align: 2px; color: var(--text-dim);
  border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg);
}
tr.open .dl-chev { transform: translateY(3px) rotate(-135deg); }

.dl-mismatch .narrow { display: none; }

/* Benchmarks: this company in the accent, every comparison in gray */
.dl-benches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 10px; }
.dl-bench { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.dl-bench h3 { font-size: 14px; font-weight: 600; }
.dl-read { flex: 0 0 auto; font-size: 12px; font-weight: 500; color: var(--text-soft); background: var(--bg-elev); border-radius: 999px; padding: 2px 10px; }
.dl-read.strong { color: var(--warning); background: var(--warning-soft); }
.dl-bars { margin: 0; display: grid; gap: 8px; }
.dl-bars .row { display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 10px; font-size: 12.5px; }
.dl-bars dt { color: var(--text-soft); }
.dl-bars dd { margin: 0; display: grid; grid-template-columns: 1fr 72px; align-items: center; gap: 10px; }
.dl-bars b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.dl-bars .bar { display: block; height: 10px; background: #8A9099; border-radius: 0 4px 4px 0; }
.dl-bars .own dt, .dl-bars .own b { color: var(--text); font-weight: 600; }
.dl-bars .own .bar { background: var(--accent); }
.dl-bench > p { margin: 10px 0 0; }

/* Pay chart */
.dl-fig { margin: 16px 0 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 4px; }
.dl-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-soft); margin-bottom: 4px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 14px; height: 2px; border-radius: 1px; background: #8A9099; }
.key.local i { background: var(--accent); }
.dl-plot { position: relative; min-height: 220px; }
.dl-plot svg { display: block; max-width: 100%; }
.dl-plot .grid { stroke: var(--border-soft); stroke-width: 1; }
.dl-plot .cross { stroke: var(--border-hover); stroke-width: 1; }
.dl-plot .tick { font-size: 11px; fill: var(--text-dim); font-variant-numeric: tabular-nums; }
.dl-plot .end { font-size: 12px; font-weight: 500; fill: var(--text); }
.dl-plot .line { fill: none; stroke: #8A9099; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dl-plot .line.local { stroke: var(--accent); }
.dl-plot .dot { fill: #8A9099; stroke: var(--bg-card); stroke-width: 2; }
.dl-plot .dot.local { fill: var(--accent); }
.dl-tip {
  position: absolute; top: 0; pointer-events: none; display: grid; gap: 2px; white-space: nowrap; font-size: 12px;
  color: var(--text-soft); background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: var(--shadow-md); padding: 7px 10px;
}
.dl-tip[hidden] { display: none; }
.dl-tip b { color: var(--text); font-weight: 600; }

.dl-table td a { color: var(--accent); }

/* Limits and sources */
.dl-limit + .dl-limit { margin-top: 20px; }
.dl-limit h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.dl-limit > p { margin: 0 0 6px; max-width: 76ch; }
.dl-limits { margin: 6px 0 0; padding-left: 20px; font-size: 13.5px; max-width: 80ch; }
.dl-limits li + li { margin-top: 6px; }

@media (max-width: 900px) {
  .dl-tabs { top: -20px; }
}
@media (max-width: 600px) {
  .dl-tiles.three { grid-template-columns: 1fr; }
  .dl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-bottomline { padding: 14px 16px; }
  .dl-bottomline p { font-size: 16px; }
  .dl-bars .row { grid-template-columns: 104px 1fr; }
  /* Both figures must fit side by side: the period moves under the check. */
  .dl-mismatch th:nth-child(2), .dl-mismatch td:nth-child(2) { display: none; }
  .dl-mismatch .narrow { display: block; }
  .dl-mismatch th, .dl-mismatch .dl-sub { white-space: normal; }
  .dl-mismatch th, .dl-mismatch td { padding-left: 10px; padding-right: 8px; }
}
