/* @comment -- "App reconstructions. Each app keeps its own typography and colours; values follow VS Code Dark Modern, Slack's aubergine theme and GitHub Primer light" */

/* ---------- shared window + pieces ---------- */
.workflow { background: #111719; color: #edf2ee; border: 1px solid #34413b; border-radius: 12px; padding: 26px 32px; display: flex; flex-direction: column; gap: 18px; overflow: auto; font-family: Inter, system-ui, sans-serif; }
.wf-head { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #a6b6ad; }
.wf-label { color: #b8e1a0; text-transform: uppercase; letter-spacing: .1em; }
/* Enterprise edge light: slow luminance pulse, never a flashing overlay on the content. */
.workflow[data-tier="enterprise"] { border-color: #397c6c; background: radial-gradient(ellipse at 95% 0%, #15302b 0%, transparent 52%), #111719; }
.workflow[data-tier="enterprise"] .wf-label { color: #70e6c7; }
.cl-card--enterprise { position: relative; border-color: #397c6c !important; }
.workflow[data-tier="enterprise"]::after,
.cl-card--enterprise::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 1px solid rgba(88, 239, 198, .7);
  box-shadow: inset 0 0 14px rgba(45, 212, 167, .16), inset 0 0 2px rgba(180, 255, 233, .7);
  opacity: .55;
}
.workflow.is-active[data-tier="enterprise"]::after,
.closing.is-active.has-cards .cl-card--enterprise::after { animation: enterprise-edge 4.8s ease-in-out infinite; }
@keyframes enterprise-edge { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }
.workflow[data-mode="orchestrate"] { border-color: rgba(255, 255, 255, .15); }
.workflow[data-mode="orchestrate"]::after {
  border-color: #fff;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .18), inset 0 0 3px rgba(255, 255, 255, .8);
}
.workflow.is-active[data-mode="orchestrate"]::after { animation: enterprise-white-edge 3.6s ease-in-out infinite; }
@keyframes enterprise-white-edge { 0%, 100% { opacity: .12; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .workflow.is-active[data-tier="enterprise"]::after,
  .closing.is-active.has-cards .cl-card--enterprise::after { animation: none; opacity: .65; }
}
.workflow h2 { margin: 0; font-size: clamp(19px, 2.2vw, 29px); letter-spacing: -.035em; }
.wf-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; flex: 1; min-height: 0; }
.wf-map { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
/* @comment -- "'again' scene: a stepped vertical track replaces the old circular ring. Square numbered markers on a rail that fills with scroll (--fill, set from the chapter's t), then a square return bracket from the last step back to 01. Non-again modes keep the plain list." */
.wf-track-head, .wf-return, .wf-return-line { display: none; }
.wf-track { min-width: 0; }
.workflow[data-mode="again"] .wf-map { --row: 46px; --mk: 30px; width: min(100%, 360px); align-self: center; justify-self: center; gap: 16px; }
.workflow[data-mode="again"] .wf-track-head { display: flex; align-items: center; gap: 12px; padding-left: 26px; font-size: 12px; color: #c7dbd0; }
.wf-track-head .product-icon { width: 24px; height: 24px; }
.wf-track-head .product-brand--bravos .product-wordmark { font-size: 20px; }
.workflow[data-mode="again"] .wf-track { position: relative; padding-left: 26px; }
.workflow[data-mode="again"] .wf-track::before { content: ''; position: absolute; left: calc(26px + var(--mk) / 2 - 1px); top: calc(var(--row) / 2); bottom: 18px; width: 2px; background: #2c3b35; transition: background .3s; }
.workflow[data-mode="again"] .wf-steps { position: relative; }
.workflow[data-mode="again"] .wf-steps::after { content: ''; position: absolute; left: calc(var(--mk) / 2 - 1px); top: calc(var(--row) / 2); bottom: calc(var(--row) / 2); width: 2px; background: #6de3bf; transform-origin: top; transform: scaleY(var(--fill, 0)); transition: transform .45s ease; }
.workflow[data-mode="again"] .wf-steps li { position: relative; z-index: 1; display: grid; grid-template-columns: var(--mk) minmax(0, 1fr); align-items: center; gap: 14px; height: var(--row); padding: 0; border: 0; background: none; font-size: 14px; }
.workflow[data-mode="again"] .wf-steps li span { display: grid; place-items: center; width: var(--mk); height: var(--mk); border: 1px solid #3c5249; border-radius: 6px; background: #111719; font-size: 11px; transition: background .25s, border-color .25s, color .25s; }
.workflow[data-mode="again"] .wf-steps li.is-done span { border-color: #6de3bf; color: #6de3bf; }
.workflow[data-mode="again"] .wf-steps li.is-current span { border-color: #6de3bf; background: #6de3bf; color: #0b1512; }
.workflow[data-mode="again"] .wf-steps li.is-current b { color: #e8fff6; }
.workflow[data-mode="again"] .wf-steps li.is-next span { outline: 1px dashed #6de3bf; outline-offset: 3px; }
.workflow[data-mode="again"] .wf-return { position: relative; z-index: 1; display: grid; grid-template-columns: var(--mk) minmax(0, 1fr); align-items: center; gap: 14px; height: 36px; margin: 0; font-size: 12px; color: #92ac9e; transition: color .3s; }
.workflow[data-mode="again"] .wf-return-icon { display: grid; place-items: center; width: var(--mk); height: var(--mk); border: 1px dashed #3c5249; border-radius: 6px; background: #111719; font-size: 15px; transition: border-color .3s, color .3s; }
.workflow[data-mode="again"] .wf-return-line { display: block; position: absolute; left: 0; top: calc(var(--row) / 2 - 1px); bottom: 17px; width: 26px; border: 2px solid #2c3b35; border-right: 0; transition: border-color .3s; }
.wf-return-line::after { content: ''; position: absolute; right: 0; top: -6px; border-left: 7px solid #2c3b35; border-block: 5px solid transparent; transition: border-left-color .3s; }
.workflow.is-looping[data-mode="again"] .wf-track::before { background: #6de3bf; }
.workflow.is-looping[data-mode="again"] .wf-return { color: #e8fff6; }
.workflow.is-looping[data-mode="again"] .wf-return-icon { border-style: solid; border-color: #6de3bf; color: #6de3bf; }
.workflow.is-looping[data-mode="again"] .wf-return-line { border-color: #6de3bf; }
.workflow.is-looping[data-mode="again"] .wf-return-line::after { border-left-color: #6de3bf; }
@media (min-width: 651px) and (max-height: 780px) {
  .workflow[data-mode="again"] .wf-map { --row: 38px; --mk: 26px; gap: 10px; }
}
/* @comment -- "Phones: the same track turns horizontal. Chips on a rail (fill = scaleX), a ↺ chip at the end, and a square bracket above the row returning to 01." */
@media (max-width: 650px) {
  .workflow[data-mode="again"] .wf-map { width: 100%; gap: 0; }
  .workflow[data-mode="again"] .wf-track-head { display: none; }
  .workflow[data-mode="again"] .wf-track { display: flex; gap: 6px; padding: 9px 0 0; }
  .workflow[data-mode="again"] .wf-track::before { left: calc((100% - 56px) / 10); right: 13px; top: calc(50% + 4px); bottom: auto; width: auto; height: 2px; }
  .workflow[data-mode="again"] .wf-steps { flex: 1; min-width: 0; flex-direction: row; gap: 6px; }
  .workflow[data-mode="again"] .wf-steps::after { left: calc((100% - 24px) / 10); right: calc((100% - 24px) / 10); top: calc(50% - 1px); bottom: auto; width: auto; height: 2px; transform-origin: left; transform: scaleX(var(--fill, 0)); }
  .workflow[data-mode="again"] .wf-steps li { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; height: auto; padding: 5px 0; border: 1px solid #3c5249; border-radius: 6px; background: #111719; font-size: 10px; text-align: center; }
  .workflow[data-mode="again"] .wf-steps li span { display: block; width: auto; height: auto; border: 0; background: none; font-size: 8px; }
  .workflow[data-mode="again"] .wf-steps li.is-done { border-color: #6de3bf; }
  .workflow[data-mode="again"] .wf-steps li.is-current { border-color: #6de3bf; background: #6de3bf; }
  .workflow[data-mode="again"] .wf-steps li.is-current span, .workflow[data-mode="again"] .wf-steps li.is-current b { background: none; color: #0b1512; }
  .workflow[data-mode="again"] .wf-steps li.is-next { outline: 1px dashed #6de3bf; outline-offset: 2px; }
  .workflow[data-mode="again"] .wf-steps li.is-next span { outline: 0; }
  .workflow[data-mode="again"] .wf-return { flex: none; display: block; width: 26px; height: auto; }
  .workflow[data-mode="again"] .wf-return-icon { width: 26px; height: 100%; }
  .workflow[data-mode="again"] .wf-return > span:not(.wf-return-icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .workflow[data-mode="again"] .wf-return-line { left: calc((100% - 56px) / 10); right: 12px; top: 1px; bottom: auto; width: auto; height: 8px; border: 2px solid #2c3b35; border-bottom: 0; }
  .wf-return-line::after { right: auto; left: -6px; top: auto; bottom: -7px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #2c3b35; border-block-end: 0; }
  .workflow.is-looping[data-mode="again"] .wf-return-line::after { border-top-color: #6de3bf; border-left-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .workflow[data-mode="again"] .wf-steps::after, .workflow[data-mode="again"] .wf-track::before, .wf-return, .wf-return-icon, .wf-return-line, .wf-return-line::after, .workflow[data-mode="again"] .wf-steps li span { transition: none; }
}
.wf-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; }
.wf-steps li { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-bottom: 1px solid #2a3530; color: #89998f; transition: color .25s, background .25s; font-size: 13px; }
.wf-steps li span { font: 11px monospace; }
.wf-steps li.is-current { color: #d3efc3; background: #203028; border-left: 2px solid #b8e1a0; }
.wf-steps li.is-done { color: #becbc2; }
.wf-detail { min-width: 0; align-self: center; padding: 16px 0 16px 28px; border-left: 1px solid #3a4940; }
.wf-person { min-height: 36px; display: flex; align-items: center; gap: 12px; }
.product-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #b8e1a0; }
.product-icon { width: 32px; height: 32px; flex: none; object-fit: contain; }
.product-wordmark { font: 600 20px/1.1 Inter, system-ui, sans-serif; }
.product-brand--bravos .product-wordmark { font: 28px/1.2 'Monoska', monospace; letter-spacing: -.03em; }
.product-ascii { display: block; white-space: pre; font: 5px/1.15 monospace; letter-spacing: 0; }
.product-ascii + .product-wordmark { display: none; }
.wf-cli { display: grid; gap: 5px; border-top: 1px solid #34413b; padding-top: 10px; }
.wf-cli small { font-size: 8px; color: #8c9e92; letter-spacing: .08em; }
.wf-cli code { font: 12px/1.4 monospace; color: #e0eadf; overflow-wrap: anywhere; }
.wf-cli > span { font-size: 10px; line-height: 1.4; color: #a6b6ad; }
.wf-bravos { font-size: 25px; letter-spacing: -.06em; color: #b8e1a0; }
.wf-actor { color: #b8e1a0; font-size: 12px; margin: 14px 0 10px; }
.wf-detail h3 { font-size: clamp(20px, 2vw, 28px); line-height: 1.2; margin: 0; }
.wf-description { color: #c4cec8; font-size: 14px; line-height: 1.65; }
.wf-outcome { color: #d3efc3; font: 12px/1.5 monospace; padding-top: 14px; border-top: 1px solid #34413b; }
.wf-note { font-size: 11px; line-height: 1.5; color: #a6b6ad; margin: 0; }
@media (max-width: 650px) {
  .workflow { padding: 16px; gap: 12px; }
  .wf-head { font-size: 9px; }
  .wf-body { display: flex; flex-direction: column; gap: 12px; min-height: auto; }
  .wf-steps li { padding: 6px 8px; font-size: 10px; gap: 8px; }
  .wf-detail { padding: 0; border: 0; align-self: stretch; }
  .wf-person { min-height: 24px; margin-bottom: 8px; }
  .wf-person .portrait { display: none; }
  .product-ascii { display: none; }
  .product-ascii + .product-wordmark { display: inline; }
  .product-wordmark { font-size: 16px; }
  .product-brand--bravos .product-wordmark { font-size: 20px; }
  .product-icon { width: 22px; height: 22px; }
  .wf-steps li { display: none; }
  .wf-steps li.is-current { display: flex; }
  .wf-cli { margin-top: 8px; padding-top: 8px; gap: 3px; }
  .wf-cli code { font-size: 11px; }
  .wf-actor { margin: 0 0 6px; font-size: 10px; }
  .wf-detail h3 { font-size: 18px; }
  .wf-description { font-size: 12px; line-height: 1.5; margin: 8px 0; }
  .wf-outcome { padding-top: 8px; margin: 8px 0 0; font-size: 10px; }
  .wf-note { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .wf-steps li { transition: none; } }
@media (max-width: 650px) and (max-height: 740px) {
  /* @comment -- "Short phones: chips drop their numbers so the horizontal track stays one compact row." */
  .workflow[data-mode="again"] .wf-steps li { padding: 3px 0; font-size: 9px; }
  .workflow[data-mode="again"] .wf-steps li span { display: none; }
  .workflow[data-mode="again"] .wf-return-icon { font-size: 12px; }
  .wf-steps li { display: none; }
  .wf-steps li.is-current { display: flex; }
  .wf-body { flex: 1; }
  .workflow h2 { font-size: 18px; }
  .workflow { gap: 8px; padding: 12px; }
  .wf-body { gap: 8px; }
  .wf-person { margin-bottom: 4px; }
  .wf-detail h3 { font-size: 16px; }
  .wf-description { margin: 6px 0; }
  .wf-outcome { display: none; }
  .wf-cli > span { font-size: 9px; }
}
@media (min-width: 651px) and (max-height: 780px) {
  .workflow { padding: 18px 26px; gap: 10px; }
  .wf-detail { padding-top: 0; padding-bottom: 0; }
  .wf-actor { margin: 8px 0; }
  .wf-description { font-size: 13px; margin: 8px 0; }
  .wf-outcome { padding-top: 8px; margin: 8px 0; }
  .wf-steps li { padding-top: 10px; padding-bottom: 10px; }
}
/* The hidden attribute must win over component display rules (flex/grid rows set their own display). */
.app [hidden] { display: none !important; }
.win {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 .5px rgba(0,0,0,.6);
}
.win-titlebar { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; position: relative; }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.ico { display: inline-flex; flex: none; }
.ico svg { display: block; }

.portrait {
  --size: 32px; flex: none; width: var(--size); height: var(--size); display: inline-grid; place-items: center; overflow: hidden;
  border-radius: 50%; background: hsl(var(--hue) 38% 40%); color: #fff;
  font: 600 calc(var(--size) * .38)/1 Inter, system-ui, sans-serif; letter-spacing: .02em;
}
.portrait--rounded { border-radius: calc(var(--size) * .22); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.pointer {
  position: absolute; left: 0; top: 0; z-index: 10; pointer-events: none;
  transition: transform 650ms var(--ease-frame);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.app:not(.is-active) .pointer { transition: none; }

/* ---------- VS Code (Dark Modern) ---------- */
.vscode {
  --vs-bg: #1f1f1f; --vs-side: #181818; --vs-border: #2b2b2b; --vs-fg: #cccccc; --vs-dim: #9d9d9d; --vs-accent: #0078d4;
  background: var(--vs-bg); color: var(--vs-fg);
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.vs-titlebar { background: var(--vs-side); border-bottom: 1px solid var(--vs-border); justify-content: center; }
.vs-titlebar .lights { position: absolute; left: 12px; }
.vs-title { font-size: 12px; color: var(--vs-dim); }
.vs-body { flex: 1; min-height: 0; display: flex; }
.vs-activity { flex: 0 0 48px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; background: var(--vs-side); border-right: 1px solid var(--vs-border); color: #868686; }
.vs-activity > .ico { padding: 12px 0; width: 48px; justify-content: center; }
.vs-activity > .ico.is-active { color: #d7d7d7; box-shadow: inset 2px 0 var(--vs-accent); }
.vs-activity-spacer { flex: 1; }
.vs-account { padding: 8px 0; }
.vs-sidebar { flex: 0 0 214px; background: var(--vs-side); border-right: 1px solid var(--vs-border); font-size: 13px; overflow: hidden; }
.vs-sidebar-title { padding: 10px 20px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--vs-dim); }
.vs-section { display: flex; align-items: center; gap: 2px; padding: 2px 4px; font-size: 11px; }
.vs-tree-row { display: flex; align-items: center; gap: 4px; height: 22px; padding-left: calc(8px + var(--depth) * 12px); white-space: nowrap; }
.vs-tree-row.is-active { background: #37373d; box-shadow: inset 0 0 0 1px var(--vs-accent); }
.vs-tree-row.is-dim { color: #8b8b8b; }
.vs-new-guardlink, .vs-new-annotate, .vs-new-template { display: none; }
.vscode.has-guardlink .vs-new-guardlink, .vscode.has-annotations .vs-new-annotate, .vscode.is-split .vs-new-template { display: flex; color: #73c991; }
.vs-twist { width: 12px; display: inline-flex; color: var(--vs-dim); }
.vs-file-ico--ts { color: #3178c6; }
.vs-file-ico--json { color: #cbcb41; }
.vs-workbench { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vs-groups { flex: 1; min-height: 0; display: flex; }
.vs-group { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vs-group--side { display: none; border-left: 1px solid var(--vs-border); }
.vscode.is-split .vs-group--side { display: flex; }
.vs-yaml { font-size: 12.5px; }
.vs-file-ico--yaml { color: #cb4b8f; }
.vs-tabs { flex: 0 0 35px; display: flex; background: var(--vs-side); border-bottom: 1px solid var(--vs-border); }
.vs-tab { display: flex; align-items: center; gap: 6px; padding: 0 14px 0 12px; border-right: 1px solid var(--vs-border); color: var(--vs-dim); font-size: 13px; }
.vs-tab.is-active { background: var(--vs-bg); color: #fff; box-shadow: inset 0 1px var(--vs-accent); margin-bottom: -1px; }
.vs-tab-x { font-style: normal; color: var(--vs-dim); margin-left: 6px; }
.vs-crumbs { flex: 0 0 22px; display: flex; align-items: center; gap: 2px; padding: 0 16px; color: #a9a9a9; font-size: 12px; }
.vs-crumbs .ico { color: #6f6f6f; }
.vs-crumb-sym { display: inline-flex; align-items: center; gap: 2px; }
.vs-scroll { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.vs-scroll-inner {
  padding-top: 4px;
  font: 13px/20px Menlo, Monaco, "SF Mono", Consolas, "Courier New", monospace;
  transition: transform 700ms var(--ease-frame);
}
.vscode.is-framed .vs-group--main .vs-scroll-inner { transform: translateY(var(--frame-y, 0)); }
.vs-group--side .vs-scroll-inner { transform: translateY(var(--tpl-y, 0)); }
.vs-group--side .vs-code { position: relative; }
.vs-code { position: relative; }
.vs-row { position: relative; display: flex; min-height: 20px; }
.vs-ln { position: relative; flex: 0 0 64px; text-indent: 0; padding-right: 18px; text-align: right; color: #6e7681; user-select: none; }
.vs-line { flex: 1; min-width: 0; padding-left: calc(4px + 2ch); text-indent: -2ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.vs-row[hidden] { display: none; }
/* SCM gutter: rows added in this chapter show the "added" bar, as VS Code does for uncommitted lines. */
.vs-row::after { content: ""; position: absolute; left: 56px; top: 0; bottom: 0; width: 3px; background: #2ea043; opacity: 0; transition: opacity 200ms var(--ease-out); }
.vscode[data-added="annotate"] .vs-row.stage-annotate::after,
.vscode[data-added="confirm"] .vs-row.stage-confirm::after { opacity: 1; }
.vscode[data-added="annotate"] .vs-row.stage-annotate:not([hidden]),
.vscode[data-added="confirm"] .vs-row.stage-confirm:not([hidden]) { animation: vs-insert 520ms var(--ease-out) both; }
@keyframes vs-insert { from { background: rgba(46,160,67,.28); } to { background: transparent; } }
.vscode[data-added="confirm"] .vs-row.stage-confirm .vs-text { background: rgba(46,160,67,.12); }
.vs-glyph { position: absolute; left: 8px; top: 4px; opacity: 0; transition: opacity 180ms var(--ease-out); }
.vscode.has-thread .vs-glyph { opacity: 1; color: #cccccc; }
.vs-text { padding-right: .6ch; transition: background-color 160ms var(--ease-out); }
.vscode.is-selected .vs-row.in-sel .vs-text { background: #264f78; }
.vscode.is-selected .vs-row.sel-end .vs-ln { color: #cccccc; }

/* Comment thread: a view zone that opens below the line, like VS Code's comments widget. */
.vs-thread-slot { position: relative; padding-left: 68px; text-indent: 0; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); white-space: normal; }
.vs-thread-slot > .vs-thread { overflow: hidden; min-height: 0; }
.vscode.has-thread .vs-thread-slot { grid-template-rows: 1fr; }
.vs-thread {
  margin: 0 0 0 4px; max-width: 560px;
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #252526;
}
.vscode.has-thread .vs-thread { padding: 10px 12px 12px; border-top: 2px solid #3794ff; border-bottom: 2px solid #3794ff; }
.vs-thread-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vs-thread-when { color: var(--vs-dim); font-size: 12px; }
.vs-thread-resolved { display: none; margin-left: auto; padding: 0 6px; border-radius: 3px; background: #2ea04333; color: #7ee787; font-size: 11px; }
.vscode.is-resolved .vs-thread-resolved { display: inline; }
.vscode.is-resolved .vs-thread { opacity: .7; }
.vs-thread-text { min-height: 38px; padding: 6px 8px; background: #313131; border: 1px solid #3c3c3c; border-radius: 2px; }
.vscode.is-posted .vs-thread-text { background: none; border-color: transparent; padding: 0 0 2px; min-height: 0; }
.vs-thread-text code { font: 12px Menlo, monospace; background: rgba(255,255,255,.08); padding: 1px 4px; border-radius: 3px; }
.caret { display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; vertical-align: text-bottom; background: #aeafad; }
.vs-thread-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.vscode.is-posted .vs-thread-actions { display: none; }
.vs-btn { padding: 3px 10px; border-radius: 2px; font-size: 12px; }
.vs-btn--primary { background: var(--vs-accent); color: #fff; }
.vs-btn--ghost { background: #313131; color: var(--vs-fg); }
.vs-status {
  flex: 0 0 22px; display: flex; align-items: center; gap: 14px; padding-right: 12px;
  background: var(--vs-side); border-top: 1px solid var(--vs-border); color: var(--vs-dim); font-size: 12px; white-space: nowrap;
}
.vs-status > span { display: inline-flex; align-items: center; gap: 4px; }
.vs-status-remote { align-self: stretch; padding: 0 10px; background: var(--vs-accent); color: #fff; font-size: 11px; letter-spacing: -.1em; }
.vs-status-spacer { flex: 1; }
.vscode[data-branch^="fix"] .vs-status-branch { color: #fff; }

/* Integrated terminal panel */
.vs-panel { display: none; flex: 0 0 50%; min-height: 0; flex-direction: column; border-top: 1px solid var(--vs-border); background: var(--vs-side); }
.vscode.has-terminal .vs-panel { display: flex; }
.vscode.is-term-max .vs-panel { flex: 1 1 auto; }
.vscode.is-term-max .vs-groups { display: none; }
.vs-panel-tabs { flex: 0 0 auto; display: flex; gap: 18px; padding: 8px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--vs-dim); white-space: nowrap; overflow: hidden; }
.vs-panel-tabs .is-active { color: #e7e7e7; box-shadow: inset 0 -1px #e7e7e7; padding-bottom: 3px; }
.vs-panel-shell { margin-left: auto; text-transform: none; }
.vs-term-body {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 4px 16px 10px; font: 13px/19px Menlo, Monaco, "SF Mono", Consolas, monospace; color: #cccccc;
  -webkit-mask-image: linear-gradient(transparent, #000 32px); mask-image: linear-gradient(transparent, #000 32px);
}
.vs-term-block[hidden], .vs-term-line[hidden], .vs-term-prompt[hidden] { display: none; }
.vs-term-wrap { flex: 1; min-height: 0; display: flex; }
.vs-term-wrap > .vs-term-body { flex: 1; min-width: 0; }
/* Terminal instance list (VS Code shows it beside the terminal when there is more than one). */
.vs-term-tabs { display: none; flex: 0 0 210px; flex-direction: column; gap: 2px; padding: 6px 6px; border-left: 1px solid var(--vs-border); }
.vscode.can-compare .vs-term-tabs { display: flex; }
.vs-term-tab {
  display: grid; grid-template-columns: 14px auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; align-items: center;
  padding: 6px 8px; border: 0; border-radius: 3px; background: none; color: var(--vs-dim); text-align: left; cursor: pointer;
  font: 12px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.vs-term-tab small { font: 11px Menlo, monospace; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-term-tab em { grid-column: 2 / 4; font-style: normal; font-size: 11px; }
.vs-term-tab[data-compare="before"] em { color: #f0883e; }
.vs-term-tab[data-compare="after"] em { color: #3fb950; }
.vs-term-tab:hover { background: #2a2d2e; color: #e7e7e7; }
.vs-term-tab.is-active { background: #37373d; color: #ffffff; box-shadow: inset 2px 0 var(--vs-accent); }
.vscode.can-compare .vs-term-tabs::before { content: "Compare runs"; padding: 2px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--vs-dim); }
.vs-term-line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 19px; }
.vs-term-line:not([hidden]) { animation: term-in 160ms var(--ease-out) both; }
@keyframes term-in { from { opacity: 0; } }
.tl-cmd { color: #e5e5e5; font-weight: 600; }
.tl-ok { color: #3fb950; }
.tl-bad { color: #f0883e; }
.tl-warn { color: #d29922; }
.tl-hl { color: #ffa198; font-weight: 600; }
.vs-term-prompt .caret { height: 1em; background: #cccccc; width: 7px; }

/* Dark Modern token colours */
.tk-kw { color: #c586c0; }
.tk-decl { color: #569cd6; }
.tk-str { color: #ce9178; }
.tk-num { color: #b5cea8; }
.tk-fn { color: #dcdcaa; }
.tk-type { color: #4ec9b0; }
.tk-const { color: #4fc1ff; }
.tk-var { color: #9cdcfe; }
.tk-com { color: #6a9955; }

/* ---------- Slack ---------- */
.slack {
  --sl-aub: #3f0e40; --sl-aub-2: #350d36; --sl-ink: #1d1c1d; --sl-dim: #616061; --sl-line: #e8e8e8; --sl-link: #1264a3;
  background: var(--sl-aub-2); color: var(--sl-ink);
  font: 15px/1.46668 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.sl-titlebar { background: var(--sl-aub-2); justify-content: center; }
.sl-titlebar .lights { position: absolute; left: 12px; }
.sl-search {
  display: flex; align-items: center; gap: 8px; width: min(46%, 520px); height: 24px; padding: 0 10px;
  border-radius: 6px; background: rgba(255,255,255,.14); color: rgba(255,255,255,.72); font-size: 13px;
}
.sl-me { position: absolute; right: 12px; }
.sl-body { flex: 1; min-height: 0; display: flex; }
.sl-rail { flex: 0 0 70px; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; color: #fff; }
.sl-ws-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: var(--sl-aub); font-weight: 900; font-size: 18px; }
.sl-rail-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .8; }
.sl-rail-btn .ico { width: 36px; height: 36px; justify-content: center; align-items: center; border-radius: 8px; }
.sl-rail-btn.is-active .ico { background: rgba(255,255,255,.2); }
.sl-rail-btn small { font-size: 11px; font-weight: 700; }
.sl-sidebar {
  flex: 0 0 250px; padding: 4px 8px; color: rgba(249,237,255,.8); background: var(--sl-aub);
  border-radius: 8px 0 0 8px; overflow: hidden; font-size: 15px;
}
.sl-ws { display: flex; align-items: center; gap: 4px; padding: 10px 10px 12px; color: #fff; font-size: 18px; }
.sl-ws b { font-weight: 900; }
.sl-group { display: flex; align-items: center; gap: 6px; padding: 14px 10px 4px; font-size: 15px; }
.sl-item { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 6px; white-space: nowrap; }
.sl-item.is-active { background: rgba(249,237,255,.92); color: var(--sl-aub); font-weight: 700; }
.sl-item.is-bold { color: #fff; font-weight: 900; }
.sl-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; border-radius: 0 8px 8px 0; margin: 0 6px 6px 0; }
.sl-head { flex: 0 0 49px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; border-bottom: 1px solid var(--sl-line); }
.sl-head b { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 900; }
.sl-head-members { display: flex; align-items: center; gap: 0; padding: 3px 8px 3px 3px; border: 1px solid var(--sl-line); border-radius: 6px; font-size: 13px; color: var(--sl-dim); }
.sl-head-members .portrait + .portrait { margin-left: -4px; box-shadow: 0 0 0 2px #fff; }
.sl-head-members > span:last-child { margin-left: 6px; }
.sl-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
.sl-list { padding: 8px 0 6px; }
.sl-day { position: relative; text-align: center; margin: 8px 0; }
.sl-day::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--sl-line); }
.sl-day span { position: relative; padding: 2px 14px; border: 1px solid var(--sl-line); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 700; }
.sl-msg { display: flex; gap: 8px; padding: 8px 20px; }
.sl-msg:not([hidden]) { animation: sl-in 260ms var(--ease-out) both; }
@keyframes sl-in { from { opacity: 0; transform: translateY(8px); } }
.sl-msg-meta { display: flex; align-items: baseline; gap: 8px; }
.sl-msg-meta b { font-weight: 900; }
.sl-msg-meta time { font-size: 12px; color: var(--sl-dim); }
.sl-msg-text code { font: 12px Monaco, Menlo, Consolas, monospace; color: #c01343; background: rgba(29,28,29,.04); border: 1px solid rgba(29,28,29,.13); border-radius: 3px; padding: 2px 3px; }
.sl-unfurl { margin-top: 6px; padding: 2px 0 2px 12px; border-left: 4px solid #dddddd; border-radius: 0; transition: border-color 220ms var(--ease-out); }
.slack.is-link-focus .sl-unfurl { border-left-color: var(--sl-link); }
.sl-unfurl-host { font-size: 13px; font-weight: 900; }
.sl-unfurl-title { color: var(--sl-link); font-weight: 700; }
.sl-unfurl-desc { font-size: 14px; color: var(--sl-ink); }
.sl-compose { flex: 0 0 auto; margin: 0 20px 22px; border: 1px solid #bbbabb; border-radius: 8px; }
.sl-input { padding: 10px 12px 4px; color: #868686; }
.sl-compose-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 6px; color: var(--sl-dim); }
.sl-send { opacity: .5; }
.sl-typing { position: absolute; left: 22px; bottom: 4px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sl-dim); opacity: 0; transition: opacity 180ms var(--ease-out); }
.slack.is-typing .sl-typing { opacity: 1; }
.sl-dots { display: inline-flex; gap: 2px; }
.sl-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.slack.is-typing .sl-dots i { animation: sl-dot 1s infinite ease-in-out; }
.sl-dots i:nth-child(2) { animation-delay: .15s !important; }
.sl-dots i:nth-child(3) { animation-delay: .3s !important; }
@keyframes sl-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* ---------- Jira (Atlassian light) ---------- */
.jira {
  --jr-ink: #172b4d; --jr-dim: #44546f; --jr-line: #dcdfe4; --jr-blue: #0c66e4; --jr-bg: #f7f8f9;
  background: #fff; color: var(--jr-ink);
  font: 14px/1.43 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
.jr-top { flex: 0 0 48px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--jr-line); }
.jr-apps { color: var(--jr-dim); }
.jr-product { color: var(--jr-blue); font-size: 16px; }
.jr-search { display: flex; align-items: center; gap: 6px; width: min(40%, 380px); height: 32px; margin-left: 24px; padding: 0 10px; border: 1px solid #8590a2; border-radius: 4px; color: var(--jr-dim); }
.jr-me { margin-left: auto; }
.jr-body { flex: 1; min-height: 0; display: flex; }
.jr-side { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; background: var(--jr-bg); border-right: 1px solid var(--jr-line); color: var(--jr-dim); }
.jr-side > span { padding: 6px 10px; border-radius: 3px; }
.jr-side > span.is-active { background: #e9f2ff; color: var(--jr-blue); font-weight: 600; box-shadow: inset 2px 0 var(--jr-blue); }
.jr-proj { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.jr-proj b { display: block; color: var(--jr-ink); font-size: 14px; }
.jr-proj small { font-size: 12px; }
.jr-proj-ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; background: #1f845a; color: #fff; font-weight: 700; font-size: 12px; }
.jr-main { flex: 1; min-width: 0; padding: 20px 28px; overflow: hidden; }
.jr-crumbs { color: var(--jr-dim); font-size: 14px; }
.jr-key { display: inline-flex; align-items: center; gap: 6px; }
.jr-type { width: 14px; height: 14px; border-radius: 3px; background: #e2483d; }
.jr-title { margin: 10px 0 12px; font-size: 24px; font-weight: 600; line-height: 1.2; }
.jr-actions { display: flex; gap: 8px; margin-bottom: 18px; }
.jr-actions span { padding: 4px 10px; border-radius: 3px; background: #091e420f; color: var(--jr-dim); font-weight: 500; }
.jr-main h4 { margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.jr-desc p { margin: 0 0 8px; max-width: 64ch; }
.jr-desc code, .jr-comment-text code, .jr-field code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #091e420f; padding: 1px 4px; border-radius: 3px; }
.jr-activity-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.jr-activity-tabs span { padding: 2px 8px; border-radius: 3px; color: var(--jr-dim); }
.jr-activity-tabs .is-active { background: #e9f2ff; color: var(--jr-blue); }
.jr-comment, .jr-add { display: flex; gap: 12px; margin-bottom: 14px; }
.jr-comment:not([hidden]) { animation: sl-in 240ms var(--ease-out) both; }
.jr-comment-meta { display: flex; gap: 8px; align-items: baseline; }
.jr-comment-meta span { color: var(--jr-dim); font-size: 12px; }
.jr-add > span:last-child { flex: 1; padding: 6px 10px; border: 1px solid var(--jr-line); border-radius: 3px; color: var(--jr-dim); }
.jr-panel { flex: 0 0 320px; padding: 20px 20px 0 0; }
.jr-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 3px; background: #091e420f; font-weight: 600; margin-bottom: 16px; }
.jr-details { border: 1px solid var(--jr-line); border-radius: 3px; }
.jr-details-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--jr-line); font-weight: 600; }
.jr-field { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 14px; opacity: 0; transform: translateY(4px); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), background-color 220ms var(--ease-out); }
.jira.has-fields .jr-field { opacity: 1; transform: none; }
.jira.has-fields .jr-field:nth-child(3) { transition-delay: 40ms; } .jira.has-fields .jr-field:nth-child(4) { transition-delay: 80ms; }
.jira.has-fields .jr-field:nth-child(5) { transition-delay: 120ms; } .jira.has-fields .jr-field:nth-child(6) { transition-delay: 160ms; }
.jira.is-tested-focus .jr-field--tested { background: #fff7d6; box-shadow: inset 3px 0 #e2b203; }
.jr-label { color: var(--jr-dim); font-size: 13px; font-weight: 600; }
.jr-person { display: inline-flex; align-items: center; gap: 8px; }
.jr-priority i { color: #e2483d; font-style: normal; margin-right: 4px; }
.jr-labels { display: flex; gap: 4px; flex-wrap: wrap; }
.jr-lozenge { padding: 0 6px; border-radius: 3px; background: #091e420f; font-size: 12px; }
.jr-note { color: var(--jr-dim); font-size: 12px; }
.jr-created { margin-top: 10px; color: var(--jr-dim); font-size: 12px; }

/* ---------- GitHub (Primer light) ---------- */
.github {
  --gh-fg: #1f2328; --gh-dim: #59636e; --gh-border: #d1d9e0; --gh-subtle: #f6f8fa; --gh-accent: #0969da; --gh-green: #1f883d;
  background: #fff; color: var(--gh-fg);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
}
.br-titlebar { background: #e3e5e8; border-bottom: 1px solid #cfd2d6; }
.br-url {
  display: flex; align-items: center; gap: 6px; margin: 0 auto; width: min(56%, 560px); height: 22px; padding: 0 10px;
  border-radius: 6px; background: #fff; color: #4a4d52; font-size: 12px; white-space: nowrap; overflow: hidden;
}
.br-url-files { opacity: 0; transition: opacity 160ms var(--ease-out); }
.github[data-tab="files"] .br-url-files { opacity: 1; }
.gh-top { background: var(--gh-subtle); border-bottom: 1px solid var(--gh-border); padding: 10px 20px 0; }
.gh-repo { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gh-repo b { font-weight: 600; }
.gh-me { margin-left: auto; }
.gh-repo-tabs { display: flex; gap: 4px; margin-top: 8px; }
.gh-repo-tabs > span { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px; color: var(--gh-fg); font-size: 14px; }
.gh-repo-tabs > span.is-active { box-shadow: inset 0 -2px #fd8c73; font-weight: 600; }
.gh-count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 2em; background: rgba(129,139,152,.12); font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; }
.gh-pr { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px 24px 0; }
.gh-pr-title { margin: 0; font-size: 24px; font-weight: 400; line-height: 1.25; }
.gh-pr-num { color: var(--gh-dim); font-weight: 300; }
.gh-pr-meta { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; color: var(--gh-dim); flex-wrap: wrap; }
.gh-pr-meta b { color: var(--gh-fg); font-weight: 600; }
.gh-pr-meta code, .gh-tl-event code { font: 12px ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; color: var(--gh-accent); background: #ddf4ff; padding: 2px 6px; border-radius: 6px; }
.gh-state { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 2em; background: var(--gh-green); color: #fff; font-weight: 500; }
.gh-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gh-border); }
.gh-tab { white-space: nowrap; display: flex; align-items: center; gap: 6px; padding: 8px 16px; margin-bottom: -1px; border: 1px solid transparent; border-radius: 6px 6px 0 0; color: var(--gh-dim); transition: color 160ms var(--ease-out); }
.gh-tab.is-active { border-color: var(--gh-border); border-bottom-color: #fff; background: #fff; color: var(--gh-fg); }
.gh-panels { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding-top: 16px; }
.gh-panels > * { grid-area: 1 / 1; min-height: 0; min-width: 0; transition: opacity 200ms var(--ease-out); }
.github[data-tab="conversation"] .gh-files, .github[data-tab="files"] .gh-convo { opacity: 0; visibility: hidden; }

.gh-tl-item { display: flex; gap: 14px; max-width: 760px; }
.gh-box { flex: 1; border: 1px solid var(--gh-border); border-radius: 6px; }
.gh-box-head { padding: 8px 16px; background: var(--gh-subtle); border-bottom: 1px solid var(--gh-border); border-radius: 6px 6px 0 0; color: var(--gh-dim); }
.gh-box-head b { color: var(--gh-fg); }
.gh-box-body { padding: 12px 16px; }
.gh-box-body code, .gh-rc-text code { font: 85% ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(129,139,152,.15); padding: .2em .4em; border-radius: 6px; }
.gh-tl-event { display: flex; align-items: center; gap: 8px; margin: 14px 0 0 64px; color: var(--gh-dim); font-size: 14px; white-space: nowrap; overflow: hidden; }
.gh-tl-event b { color: var(--gh-fg); }
.gh-muted { color: var(--gh-dim); overflow: hidden; text-overflow: ellipsis; }

.github[data-checks="idle"] .gh-mergebox, .github:not(.is-approved) .gh-approved { display: none; }
.github[data-checks]:not([data-checks="idle"]) .gh-convo { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 36px); mask-image: linear-gradient(transparent, #000 36px); }
.gh-convo > * { flex-shrink: 0; }
.gh-approved { margin-top: 14px; }
.gh-approved:not([hidden]) { animation: sl-in 240ms var(--ease-out) both; }
.gh-ok-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gh-green); color: #fff; }
.gh-mergebox { margin: 16px 0 12px 64px; max-width: 760px; border: 1px solid var(--gh-border); border-radius: 6px; }
.gh-mergebox-head { padding: 12px 16px; border-bottom: 1px solid var(--gh-border); }
.gh-check { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; border-bottom: 1px solid var(--gh-border); }
.gh-check b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-check-status { color: var(--gh-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-check-ico { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #bf8700; }
.github[data-checks="running"] .gh-check-ico { border-color: #bf8700 transparent #bf8700 #bf8700; animation: gh-spin 1s linear infinite; }
.github[data-checks="done"] .gh-check-ico { border: 0; background: var(--gh-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5 5.5-6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/10px no-repeat; }
@keyframes gh-spin { to { transform: rotate(360deg); } }
.gh-mergebox-merge { padding: 12px 16px; }
.gh-merge-btn { display: inline-block; padding: 5px 16px; border-radius: 6px; background: #eef1f4; color: #8c959f; font-weight: 500; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out); }
.github[data-checks="done"].is-approved .gh-merge-btn { background: var(--gh-green); color: #fff; }
.gh-merged-note { display: none; align-items: flex-start; gap: 10px; padding: 12px 16px; color: #8250df; }
.github.is-merged .gh-merged-note { display: flex; }
.github.is-merged .gh-mergebox-merge { display: none; }
.github.is-merged .gh-state { background: #8250df; }
.gh-files { display: flex; flex-direction: column; }
.gh-file { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--gh-border); border-bottom: 0; border-radius: 6px 6px 0 0; }
.gh-file-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--gh-subtle); border-bottom: 1px solid var(--gh-border); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.gh-file-head b { font-weight: 600; }
.gh-diffstat .plus { color: var(--gh-green); } .gh-diffstat .minus { color: #d1242f; }
.gh-viewed { margin-left: auto; font: 12px -apple-system, system-ui, sans-serif; color: var(--gh-dim); }
.gh-diff-clip { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.gh-diff { width: 100%; border-collapse: collapse; table-layout: fixed; font: 12px/20px ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; transition: transform 700ms var(--ease-frame); }
.github.is-line-focus .gh-diff { transform: translateY(var(--diff-y, 0)); }
.gh-diff td { padding: 0 10px; vertical-align: top; }
.gh-col-num { width: 50px; }
.gh-num { text-align: right; color: var(--gh-dim); user-select: none; }
.gh-code { white-space: pre; overflow: hidden; }
.gh-sign { user-select: none; margin-right: 4px; }
.gh-add .gh-num { background: #d1f8d9; } .gh-add .gh-code { background: #dafbe1; }
.gh-del .gh-num { background: #ffcecb; } .gh-del .gh-code { background: #ffebe9; }
.gh-hunk td { background: #ddf4ff; color: var(--gh-dim); padding-top: 4px; padding-bottom: 4px; }
.gh-hunk .gh-num { background: #b6e3ff; }
.github.is-line-focus .gh-thread-row ~ tr:not(.gh-add), .github.is-line-focus tr:has(+ .gh-thread-row) .gh-code { transition: background-color 200ms; }
.github.is-line-focus tr:has(+ .gh-thread-row) td { box-shadow: inset 0 0 0 9999px rgba(255, 212, 59, .22); }
.gh-thread-row > td { padding: 0 !important; background: #fff; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: normal; }
.gh-thread { margin: 8px 12px 10px 110px; max-width: 640px; border: 1px solid var(--gh-border); border-radius: 6px; overflow: hidden; }
.gh-rc { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--gh-border); }
.gh-rc:not([hidden]) { animation: sl-in 240ms var(--ease-out) both; }
.gh-rc-meta { display: flex; gap: 8px; align-items: baseline; }
.gh-rc-meta b { font-weight: 600; } .gh-rc-meta span { color: var(--gh-dim); font-size: 12px; }
.gh-reply { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--gh-subtle); color: var(--gh-dim); }
.gh-reply > span:last-child { flex: 1; padding: 4px 8px; background: #fff; border: 1px solid var(--gh-border); border-radius: 6px; }

/* GitHub light syntax colours, scoped so VS Code keeps Dark Modern */
.github .tk-kw, .github .tk-decl { color: #cf222e; }
.github .tk-str { color: #0a3069; }
.github .tk-num, .github .tk-const { color: #0550ae; }
.github .tk-fn { color: #6639ba; }
.github .tk-type { color: #953800; }
.github .tk-var { color: var(--gh-fg); }
.github .tk-com { color: #59636e; }

/* ---------- phone art direction: one region per app, readable at ≥14px ---------- */
@media (max-width: 720px) {
  .pointer { display: none; }
  .win { border-radius: 12px; }

  .vs-activity, .vs-sidebar, .vs-crumbs, .vs-tab:not(.is-active), .vs-status > span:not(:nth-child(2)):not(.vs-status-spacer) { display: none; }
  .vs-titlebar .lights { display: none; }
  .vs-scroll-inner { font-size: 14px; line-height: 22px; }
  .vs-row { min-height: 22px; }
  .vs-ln { flex-basis: 36px; padding-right: 8px; }
  .vs-glyph { display: none; }
  .vs-thread-slot { padding-left: 8px; }
  .vs-row::after { left: 32px; }
  .vscode.is-selected .vs-row.in-sel .vs-text { background: none; }
  .vscode.is-selected .vs-row.in-sel .vs-line { background: #264f78; }
  .vs-thread { font-size: 15px; margin-right: 8px; }

  .vscode.is-split .vs-group--main { display: none; }
  .vs-panel { flex-basis: 50%; }
  .vs-term-wrap { flex-direction: column-reverse; }
  .vs-term-tabs { flex: 0 0 auto; flex-direction: row; border-left: 0; border-bottom: 1px solid var(--vs-border); padding: 4px 8px; }
  .vscode.can-compare .vs-term-tabs::before { display: none; }
  .vs-term-tab { flex: 1; grid-template-columns: auto minmax(0, 1fr); font-size: 13px; }
  .vs-term-tab .ico { display: none; }
  .vs-term-tab em { grid-column: 1 / 3; font-size: 12px; }
  .vs-panel-tabs > span:not(.is-active):not(.vs-panel-shell) { display: none; }
  .vs-term-body { font-size: 13px; line-height: 19px; padding: 4px 10px 8px; }
  .vs-yaml { font-size: 13px; }

  .jr-side, .jr-search, .jr-actions, .jr-activity-tabs, .jr-add, .jira .br-titlebar .lights { display: none; }
  .jr-body { flex-direction: column; overflow: hidden; }
  .jr-main { padding: 12px 14px 0; flex: 0 1 auto; }
  .jr-title { font-size: 19px; margin: 6px 0 8px; }
  .jr-main h4 { margin: 10px 0 4px; }
  .jr-desc p { font-size: 14px; }
  .jr-panel { order: -1; flex: 0 0 auto; padding: 10px 14px 0; }
  .jr-status { margin-bottom: 8px; }
  .jr-details-head, .jr-created, .jr-field:nth-child(2), .jr-field:nth-child(4), .jr-field:nth-child(5) { display: none; }
  .jr-field { grid-template-columns: 116px minmax(0, 1fr); padding: 6px 10px; }
  .jira .br-url { width: 100%; }

  .gh-mergebox { margin-left: 0; }
  .gh-check { flex-wrap: wrap; row-gap: 0; }
  .gh-check-status { flex-basis: 100%; padding-left: 24px; }


  .sl-rail, .sl-sidebar, .sl-search, .sl-titlebar .lights { display: none; }
  .sl-main { margin: 0; border-radius: 0; }
  .sl-msg { padding: 8px 14px; }
  .sl-compose { margin: 0 14px 18px; }

  /* Phone: one diff hunk and its thread; PR identity kept to a compact header. */
  .br-titlebar .lights, .gh-top, .gh-tab--minor, .gh-pr-meta > span:not(.gh-state), .gh-viewed { display: none; }
  .br-url { width: 100%; }
  .gh-pr { padding: 10px 12px 0; }
  .gh-pr-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gh-pr-meta { margin: 6px 0 10px; }
  .gh-state { padding: 2px 10px; font-size: 13px; }
  .gh-panels { padding-top: 10px; }
  .gh-col-num { width: 30px; }
  .gh-tab { padding: 6px 10px; font-size: 13px; }
  .gh-tab .gh-count { display: none; }
  .gh-tl-item .portrait { display: none; }
  .gh-tl-event { margin-left: 0; }
  .gh-diff { font-size: 13px; line-height: 20px; }
  .gh-diff td { padding: 0 4px; }
  .gh-num { font-size: 11px; }
  .gh-code { white-space: pre-wrap; word-break: break-word; }
  .gh-thread { margin: 8px 8px 10px; }
  .gh-rc .portrait { --size: 24px !important; }
  .gh-thread-row > td { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .pointer, .caret { display: none; }
  .vs-scroll-inner, .gh-diff, .vs-thread-slot { transition: none; }
  .sl-msg:not([hidden]), .gh-rc:not([hidden]) { animation: none; }
  .slack.is-typing .sl-dots i { animation: none; }
}

/* ---------- Closing (chapter 11): brand surface, not an app ---------- */
.sl-huddle { position: absolute; inset: 34px 0 0; z-index: 12; background: #19171d; color: #eee9f0; padding: 24px 32px 18px; display: flex; flex-direction: column; gap: 16px; overflow: auto; font-family: var(--sans); }
.sl-huddle[hidden] { display: none; }
.sl-huddle > * { flex-shrink: 0; }
.sl-huddle:not([hidden]) { animation: hu-arrive .38s cubic-bezier(.16,1,.3,1) both; }
@keyframes hu-arrive { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.has-huddle .sl-body { opacity: .1; }
.hu-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hu-eyebrow { font-size: 12px; color: #c1acc9; }
.hu-head h3 { font-size: 22px; letter-spacing: -.025em; margin: 4px 0 0; }
.hu-status { font-size: 12px; color: #b5aabb; }
.hu-people { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; flex: 1; min-height: 140px; }
.hu-person { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 18px; background: radial-gradient(ellipse at 50% 35%,#39313e,#27222b 75%); border: 2px solid transparent; border-radius: 14px; transition: border-color .3s, background .3s; }
.hu-person.is-speaking { border-color: #b7d09a; background: radial-gradient(ellipse at 50% 35%,#3f4140,#27282a 75%); }
.hu-person .portrait { box-shadow: 0 8px 30px #0005; transition: transform .5s; }
.hu-person.is-speaking .portrait { transform: scale(1.04); }
.hu-name { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hu-name b { font-size: 15px; }.hu-name span { font-size: 12px; color: #bcb0c1; }
.hu-meter { position: absolute; right: 14px; bottom: 16px; display: flex; gap: 3px; align-items: center; height: 20px; }
.hu-meter i { width: 3px; height: 3px; border-radius: 3px; background: #858087; }
.is-speaking .hu-meter i { background: #c7e4ac; }
.is-listening .is-speaking .hu-meter i { animation: hu-voice .7s ease-in-out infinite alternate; }
.hu-meter i:nth-child(2) { animation-delay: -.22s !important; }.hu-meter i:nth-child(3) { animation-delay: -.4s !important; }.hu-meter i:nth-child(4) { animation-delay: -.1s !important; }.hu-meter i:nth-child(5) { animation-delay: -.55s !important; }
@keyframes hu-voice { to { height: 18px; } }
.hu-caption { padding: 14px 18px; border-radius: 10px; background: #100f13; min-height: 100px; }
.hu-caption > div { display: flex; justify-content: space-between; gap: 12px; }
.hu-caption b { color: #c7e4ac; font-size: 12px; }.hu-count { font-size: 12px; color: #998ca1; }
.hu-caption p { margin: 8px 0 0; font-size: 16px; line-height: 1.5; max-width: 80ch; }
.hu-controls { display: flex; align-items: center; gap: 16px; }.hu-controls > span { font-size: 11px; color: #ac9fb3; }
.hu-play { padding: 9px 16px; border: 0; border-radius: 7px; background: #c7e4ac; color: #1b2416; font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; }
.hu-transcript { font-size: 12px; color: #baadbf; }.hu-transcript summary { cursor: pointer; }.hu-transcript p { font-size: 14px; }
@media (max-width:720px) {
  .sl-huddle { padding: 14px 12px; gap: 12px; }
  .hu-head h3 { font-size: 17px; }.hu-status { display: none; }
  .hu-people { gap: 8px; min-height: 140px; flex: 0 0 160px; }
  .hu-person { padding: 12px 5px; gap: 8px; }.hu-person .portrait { --size: 66px !important; }
  .hu-name b { font-size: 13px; }.hu-name span { font-size: 11px; }.hu-meter { right: 8px; bottom: 6px; }
  .hu-caption { min-height: 0; padding: 12px; }.hu-caption p { font-size: 14px; line-height: 1.45; }
  .hu-controls { gap: 10px; }.hu-controls > span { font-size: 10px; }
  .hu-head { order: 0; }.hu-people { order: 1; }.hu-controls { order: 2; }.hu-caption { order: 3; }.hu-transcript { order: 4; }
}
@media (max-height:760px) { .sl-huddle { gap: 10px; padding-top: 12px; }.hu-people { min-height: 100px; }.hu-person .portrait { --size: 64px !important; }.hu-person { gap: 6px; padding: 8px; } }
@media (max-width:720px) and (max-height:760px) {
  .hu-people { flex-basis: 102px; min-height: 102px; }
  .hu-person .portrait { --size: 48px !important; }
  .hu-name span, .hu-head h3 { display: none; }
  .hu-person { gap: 5px; }
  .hu-meter { top: 8px; bottom: auto; }
  .hu-caption p { font-size: 14px; }
}
@media (prefers-reduced-motion:reduce) { .sl-huddle:not([hidden]) { animation: none; }.hu-person, .hu-person .portrait { transition: none; }.hu-meter i { animation: none !important; } }

.closing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 0 16px; }
.cl-snippet { margin: 0; width: min(760px, 100%); border-radius: 10px; background: #1f1f1f; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); overflow: hidden; }
.cl-snippet figcaption { padding: 8px 16px; border-bottom: 1px solid #2b2b2b; color: #9d9d9d; font: 12px -apple-system, system-ui, sans-serif; }
.cl-code { padding: 14px 0; font: 15px/24px Menlo, Monaco, "SF Mono", Consolas, monospace; color: #cccccc; }
.cl-row { display: flex; }
.cl-ln { flex: 0 0 52px; padding-right: 16px; text-align: right; color: #6e7681; }
.cl-text { flex: 1; min-width: 0; padding-right: 16px; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2ch; text-indent: -2ch; }
.cl-row:first-child .cl-text { color: #7ee787; }
.cl-row:first-child .cl-text .tk-com { color: inherit; }
.cl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(760px, 100%); opacity: 0; transform: translateY(8px); transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
.closing.has-cards .cl-cards, .closing.has-cards .cl-cta { opacity: 1; transform: none; }
.cl-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); text-decoration: none; transition: border-color 180ms var(--ease-out); }
a.cl-card:hover { border-color: var(--lime); }
.cl-kicker { font: 11px var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--lime); }
.cl-card b { font-size: 17px; }
.cl-desc { color: var(--dim); font-size: 14px; }
.cl-card em { margin-top: auto; padding-top: 6px; font-style: normal; font-size: 13px; color: var(--cyan); }
.cl-card.is-soon em { color: var(--faint); }
.cl-cta { display: flex; gap: 12px; align-items: center; opacity: 0; transition: opacity 320ms var(--ease-out) 80ms; }
.cl-primary { padding: 10px 18px; border-radius: 8px; background: var(--lime); color: #04110c; font-weight: 600; text-decoration: none; }
.cl-replay { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--dim); font: inherit; cursor: pointer; }
.cl-replay:hover { color: var(--ink); }

@media (max-width: 720px) {
  .cl-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cl-card { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; padding: 10px 14px; }
  .cl-card .cl-desc { display: none; }
  .cl-card em { margin: 0 0 0 auto; padding: 0; }
  .cl-code { font-size: 14px; line-height: 21px; }
  .closing { gap: 16px; justify-content: flex-start; padding-top: 4px; }
  .cl-snippet { flex-shrink: 0; }
  .cl-row:nth-child(3) { display: none; }
}

/* Short phones: keep the annotation and every link above the fold. */
@media (max-width: 720px) and (max-height: 760px) {
  .cl-snippet figcaption, .cl-row:nth-child(n+2), .cl-card.is-soon { display: none; }
  .cl-code { padding: 8px 0; font-size: 13px; line-height: 19px; }
  .cl-card { padding: 8px 12px; }
  .cl-cards { gap: 6px; }
  .closing { gap: 10px; }
  .cl-primary, .cl-replay { padding: 8px 14px; }
}

/* ---------- Proof trace (confirmed beat): a Bugb explainer surface, not a third-party app ---------- */
.trace { display: flex; flex-direction: column; gap: 14px; padding: 4px 8px 0; color: var(--ink); }
.tr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tr-kicker { font: 12px var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--lime); }
.tr-run { font: 12px Menlo, monospace; color: var(--dim); }
.tr-chain { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.25fr) 28px minmax(0, 1fr); align-items: start; align-content: start; }
.tr-node {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 10px; overflow: hidden;
  background: #1f1f1f; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 24px 60px -30px rgba(0,0,0,.8);
  opacity: .18; transform: translateY(8px); transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out), border-color 320ms;
}
.tr-node.is-in { opacity: 1; transform: none; }
.tr-node > header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #2b2b2b; font-size: 13px; }
.tr-step { font: 11px var(--display); color: var(--lime); }
.tr-node pre { flex: 1; min-height: 0; margin: 0; padding: 12px 14px; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/19px Menlo, Monaco, "SF Mono", Consolas, monospace; color: #cccccc; }
.tr-lines > div { min-height: 19px; }
.tr-node > footer { padding: 8px 14px; border-top: 1px solid #2b2b2b; }
.tr-src { font: 11px Menlo, monospace; color: var(--dim); }
.tr-node--verdict.is-in { border-color: rgba(51,212,157,.45); }
.tr-node--verdict .tr-code { color: #7ee787; }
.tr-node--verdict .tr-code .tk-com { color: inherit; }
.tr-link { align-self: start; margin-top: 21px; height: 2px; margin-left: 4px; margin-right: 4px; background: linear-gradient(90deg, rgba(51,212,157,.15), var(--lime)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 420ms var(--ease-frame); }
.tr-link.is-in { transform: scaleX(1); }
.tr-summary { display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity 320ms var(--ease-out); font-size: 15px; }
.trace.has-summary .tr-summary { opacity: 1; }
.tr-verdict { padding: 4px 10px; border-radius: 6px; background: rgba(51,212,157,.16); border: 1px solid rgba(51,212,157,.5); color: var(--lime); font-weight: 600; }
.tr-note { margin: 0 0 4px; font-size: 12px; color: var(--faint); }

@media (max-width: 1100px) {
  .tr-chain { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 14px auto 14px auto; }
  .tr-link { width: 2px; height: auto; align-self: stretch; justify-self: center; margin: 2px 0; background: linear-gradient(rgba(51,212,157,.15), var(--lime)); transform: scaleY(0); transform-origin: 50% 0; }
  .tr-link.is-in { transform: scaleY(1); }
  .tr-node pre { font-size: 13px; }
  .tr-node:not(.is-in) { display: none; }
  .tr-link:not(.is-in) { display: none; }
}
@media (max-width: 720px) {
  .trace { padding: 0; gap: 8px; }
  .tr-chain { overflow: hidden; }
  /* Phone: only the newest step is open; earlier steps collapse to their header. */
  .tr-node.is-in:not(.is-latest) > pre, .tr-node.is-in:not(.is-latest) > footer { display: none; }
  .tr-node.is-in:not(.is-latest) > header { border-bottom: 0; }
  .tr-node pre { font-size: 13px; line-height: 19px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tr-node, .tr-link, .tr-summary { transition: none; }
}

/* Final product reveal: accessible, local HTML dashboard rather than embedded screenshots. */
.closing { gap: 12px; padding: 0; justify-content: flex-start; }
.db-preview { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid #303940; border-radius: 12px; overflow: hidden; background: #0d1215; color: #dce2e8; font: 13px/1.5 Inter, system-ui, sans-serif; }
.db-header { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid #283038; background: #0a0e11; }
.db-header .product-brand { color: #e3e9ed; }
.db-header .product-wordmark { font-size: 22px; }
.db-header .product-icon { width: 24px; height: 24px; }
.db-header > span:not(.product-brand) { color: #8d9aa5; font-size: 11px; }
.db-header .db-example { margin-left: auto; }
.db-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.db-page { position: absolute; inset: 0; padding: 18px 24px; overflow: auto; background: #0d1215; }
.db-page h3 { margin: 0 0 14px; font-size: 18px; line-height: 1.35; }
.db-page h3 small { margin-left: 8px; font-size: 12px; font-weight: 400; color: #9ba8b3; }
.db-page code { display: block; color: #a7b4bf; font: 12px/1.5 monospace; overflow-wrap: anywhere; }
.db-repo, .db-finding { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; border: 1px solid #283038; border-radius: 8px; }
.db-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.db-badge { border: 1px solid #303940; border-radius: 20px; padding: 2px 9px; font-size: 11px; white-space: nowrap; }
.db-alert { background: #301d1d; color: #f08a80; border-color: #482726; }
.db-summary { padding: 18px 0; color: #a7b4bf; }
.db-summary p { margin: 6px 0; }
.db-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.db-stats > div { display: flex; flex-direction: column; border: 1px solid #303940; border-left: 3px solid #e77b72; border-radius: 8px; padding: 12px 16px; }
.db-stats > div + div { border-left-color: #6bcbb2; }
.db-stats strong { font-size: 24px; }
.db-stats small, .db-muted { color: #a1aeb9; font-size: 11px; }
.db-breadcrumb { font-size: 11px; color: #90b4d0; margin: 0 0 10px; }
.db-advisory { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 24px; }
.db-advisory p { margin: 6px 0 12px; color: #b5c0ca; }
.db-advisory dl { margin: 0; border-left: 1px solid #303940; padding-left: 16px; font-size: 11px; }
.db-advisory dt { color: #8d9aa5; }
.db-advisory dd { margin: 0 0 8px; overflow-wrap: anywhere; }
.db-page > .db-badges { margin-bottom: 12px; }
.db-controls { display: flex; justify-content: center; gap: 6px; padding: 8px; border-top: 1px solid #283038; }
.db-controls button { cursor: pointer; font: inherit; font-size: 11px; color: #bac6cf; background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 5px 9px; }
.db-controls button[aria-pressed="true"] { color: #fff; background: #272f35; border-color: #45515a; }
.db-controls button:focus-visible { outline: 2px solid #6de3bf; outline-offset: 1px; }
.db-disclosure { margin: 0; padding: 0 8px 7px; text-align: center; color: #98a6b0; font-size: 10px; }
.closing .cl-cards { width: 100%; gap: 8px; flex: none; }
.closing .cl-card { padding: 10px 14px; }
.closing .cl-card .cl-desc { font-size: 12px; }
.closing .cl-card em { font-size: 11px; }
.closing .cl-cta { flex: none; }
@media (max-width: 650px) {
  .closing { gap: 8px; }
  .db-header { gap: 8px; padding: 9px 12px; }
  .db-header > span:not(.product-brand):not(.db-example) { display: none; }
  .db-header .product-wordmark { font-size: 17px; }
  .db-header .db-example { font-size: 9px; }
  .db-page { padding: 12px; font-size: 12px; }
  .db-page h3 { font-size: 15px; margin-bottom: 10px; }
  .db-repo, .db-finding { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .db-stats { gap: 6px; }
  .db-stats > div { padding: 8px; }
  .db-stats strong { font-size: 19px; }
  .db-advisory { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .db-advisory dl { border-left: 0; border-top: 1px solid #303940; padding: 8px 0 0; }
  .db-controls { gap: 0; padding: 5px 2px; }
  .db-controls button { font-size: 10px; padding: 5px 6px; }
  .db-disclosure { font-size: 9px; }
  .closing .cl-cards { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .closing .cl-card { padding: 8px; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 5px; min-width: 0; }
  .closing .cl-kicker { font: 8px/1.3 Inter,system-ui,sans-serif; letter-spacing: 0; }
  .closing .cl-card em, .closing .cl-card .cl-desc { display: none; }
  .closing .cl-card .product-wordmark { font-size: 12px; }
  .closing .cl-card .product-icon { width: 16px; height: 16px; }
  .closing .cl-card .product-brand { gap: 4px; }
  .closing .cl-cta { font-size: 12px; }
}

/* ---------- Closing, one view: three dashboard cells in a row, then three product cards ---------- */
.closing { justify-content: center; gap: 14px; }
.db-preview--grid { flex: none; }
.db-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #283038; }
.db-grid .db-page { position: static; inset: auto; overflow: hidden; padding: 14px 16px; font-size: 12px; }
.db-grid .db-page[hidden] { display: block !important; }
.db-grid .db-page h3 { font-size: 14px; margin-bottom: 10px; }
.db-grid .db-repo, .db-grid .db-finding { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; }
.db-grid .db-summary { padding: 10px 0 0; font-size: 12px; }
.db-grid .db-stats { gap: 8px; margin-bottom: 10px; }
.db-grid .db-stats > div { padding: 8px 10px; }
.db-grid .db-stats strong { font-size: 18px; }
.db-grid .db-advisory { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.db-grid .db-advisory p { margin: 2px 0 8px; font-size: 12px; }
.db-grid .db-advisory dl { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; border-left: 0; border-top: 1px solid #303940; padding: 8px 0 0; }
.db-grid .db-advisory dd { margin: 0 0 2px; }
.db-grid .db-muted { margin: 6px 0 0; }

.closing .cl-cards { width: 100%; }
.closing .cl-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.closing .cl-card .cl-desc { flex: 1; }
.cl-visit {
  align-self: flex-start; margin-top: 4px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(51,212,157,.5); color: var(--lime); font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background-color 160ms var(--ease-out);
}
.cl-visit:hover { background: rgba(51,212,157,.12); }
.cl-card--enterprise .cl-visit { background: var(--lime); color: #04110c; border-color: var(--lime); }
.cl-card--enterprise .cl-visit:hover { background: #5be3b4; }

@media (max-width: 720px) {
  /* Phone: the three cells stack, each reduced to its headline facts. */
  .db-grid { grid-template-columns: minmax(0, 1fr); }
  .db-grid .db-page { padding: 10px 12px; }
  .db-grid .db-summary, .db-grid .db-muted, .db-grid .db-advisory p, .db-grid .db-advisory > div > b,
  .db-grid .db-stats small, .db-grid .db-page > .db-badges { display: none; }
  .db-grid .db-page h3 { font-size: 13px; margin-bottom: 6px; }
  .db-grid .db-repo, .db-grid .db-finding { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 10px; }
  .db-grid .db-stats { margin-bottom: 6px; }
  .db-grid .db-stats strong { font-size: 15px; }
  .db-grid .db-breadcrumb { display: none; }
  .db-grid .db-repo code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; max-width: 100%; }
  .db-grid .db-repo > div:first-child { min-width: 0; }
  .closing .cl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .closing .cl-card { padding: 8px; }
  .closing .cl-card .cl-desc { display: none; }
  .cl-visit { padding: 4px 10px; font-size: 12px; }
}
/* Short screens: the closing keeps one view by trimming secondary lines. */
@media (min-width: 721px) and (max-height: 780px) {
  .closing { gap: 10px; }
  .db-header { padding: 8px 16px; }
  .db-grid .db-page { padding: 10px 14px; }
  .db-grid .db-summary p, .db-grid .db-muted { display: none; }
  .db-grid .db-advisory p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .closing .cl-card { padding: 10px 14px; gap: 4px; }
  .closing .cl-card .cl-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 720px) and (max-height: 760px) {
  .closing { gap: 8px; }
  .db-header { padding: 6px 12px; }
  .db-grid .db-page { padding: 8px 12px; }
  .db-grid .db-advisory dl { display: none; }
  .db-grid .db-stats { margin-bottom: 4px; }
  .closing .cl-kicker { display: none; }
}
