/* AI Systems Finder: the before-and-after board (batch 2, the version 6 mock-up Kristian approved on 23 Oct 2026;
   docs/finder/batch-2-2026-10-23.md, section B). Loaded by the finder pages and by any library page with a board.
   Markup: assets/finder/board-html.ts. The board's own colour names, from the brand palette, so a library page (which
   has no --bla tokens) draws it the same. The dialog sits outside <main>, clear of site-taste.css. */
.bd, .bd-open, .bd-small, .lib-boards {
  --bd-ink: #232A31; --bd-paper: #FAFAF8; --bd-blue: #1B3A5B; --bd-sky: #AFC4DD; --bd-steel: #586069; --bd-stone: #E5E5E2;
}
.bd [hidden] { display: none !important; }
.bd-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Who does each task: grey by hand, then pale blue automated, blue AI, dark blue your team. */
.bd-sq { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 4px; }
.bd :is(.bd-sq, .bd-task).is-h, .bd-bar .is-h { background: var(--bd-stone); color: var(--bd-ink); box-shadow: inset 0 0 0 1px rgba(88, 96, 105, 0.45); }
.bd :is(.bd-sq, .bd-task).is-a, .bd-bar .is-a { background: color-mix(in srgb, var(--bd-sky) 32%, var(--bd-paper)); color: var(--bd-ink); box-shadow: inset 0 0 0 1px var(--bd-sky); }
.bd :is(.bd-sq, .bd-task).is-i, .bd-bar .is-i { background: var(--bd-sky); color: var(--bd-ink); }
.bd :is(.bd-sq, .bd-task).is-t, .bd-bar .is-t { background: var(--bd-blue); color: var(--bd-paper); }
.bd .bd-task.is-t { font-weight: 600; }

/* The button: two bars, the before all grey over the after split in proportion, then the two lines. */
.bd-open {
  display: flex; align-items: center; gap: 16px; width: 100%; margin: 0 0 30px; padding: 14px 18px; border: 0; border-radius: 14px;
  background: var(--bd-paper); box-shadow: 0 1px 2px rgba(35, 42, 49, 0.08), inset 0 0 0 1.5px rgba(35, 42, 49, 0.14);
  text-align: left; cursor: pointer; font: inherit; color: var(--bd-ink);
}
@media (hover: hover) and (pointer: fine){.bd-open:hover{ box-shadow: 0 1px 2px rgba(35, 42, 49, 0.08), inset 0 0 0 1.5px var(--bd-ink); }}
.bd-open:focus-visible, .bd-x:focus-visible, .bd-small:focus-visible { outline: 2px solid var(--bd-blue); outline-offset: 2px; }
.bd-mini { display: grid; gap: 5px; flex: none; width: 200px; }
.bd-bar { display: flex; gap: 2px; height: 12px; }
.bd-bar i { flex: var(--g) 1 0; min-width: 6px; border-radius: 3px; }
.bd-open__w { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bd-open__t { font-weight: 700; font-size: 16px; line-height: 1.3; }
.bd-open__s { font-size: 14px; line-height: 1.5; color: var(--bd-steel); }
.bd-open__go { flex: none; font: 600 15px/1 "Source Sans 3", system-ui, sans-serif; color: var(--bd-blue); text-decoration: underline; text-underline-offset: 3px; }
/* In an estimate card the bars take the top line, so the words keep theirs. */
.fd-ej > .bd-open { margin: 2px 0 6px; flex-wrap: wrap; gap: 12px 16px; }
.fd-ej > .bd-open .bd-mini { width: 100%; }
/* On a library page: under the steps or parts, as wide as the steps list. */
.lib-boards { display: grid; gap: 12px; max-width: 820px; margin: 0 0 24px; }
.lib-boards > .bd-open { margin: 0; }
.lib-boards__h { margin: 8px 0 0; font: 600 18px/1.35 "Source Sans 3", system-ui, sans-serif; color: var(--bd-ink); }
.lib-flow + .lib-boards { margin-top: 28px; }
.bd-small {
  position: absolute; right: 22px; bottom: 10px; display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
  font: 600 14px/1.5 "Source Sans 3", system-ui, sans-serif; color: var(--bd-blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* The full-screen board. */
.bd {
  position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  overflow: auto; overscroll-behavior: contain; background: var(--bd-stone); color: var(--bd-ink);
  font-family: "Source Sans 3", system-ui, sans-serif; font-size: 16px; line-height: 1.5; text-align: left;
}
.bd:not([open]) { display: none; }
.bd::backdrop { background: var(--bd-ink); }
html.bd-lock, html.bd-lock body { overflow: hidden; }
.bd-top {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) max(24px, env(safe-area-inset-right, 0px)) 14px max(24px, env(safe-area-inset-left, 0px));
  background: var(--bd-ink); color: var(--bd-paper);
}
.bd-top__k { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bd-sky); }
.bd-top__t { margin: 2px 0 0; font: 500 clamp(22px, 2.4vw, 30px)/1.15 "Fraunces", Georgia, serif; letter-spacing: -0.01em; text-wrap: balance; color: var(--bd-paper); }
.bd-x { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; background: var(--bd-paper); color: var(--bd-ink); font: 700 15px/1 "Source Sans 3", system-ui, sans-serif; cursor: pointer; }
.bd-body {
  display: grid; gap: 26px; max-width: 1500px; margin: 0 auto;
  padding: 24px max(24px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 36px) max(24px, env(safe-area-inset-left, 0px));
}
.bd-body > *, .bd-part > * { min-width: 0; }
.bd-part { display: grid; gap: 10px; min-width: 0; }
.bd-h { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 19px/1.5 "Source Sans 3", system-ui, sans-serif; color: var(--bd-ink); }
.bd-legend { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 500; color: var(--bd-steel); }
.bd-legend span { display: inline-flex; align-items: center; gap: 7px; }
.bd-sum { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 26px; font-size: 17px; color: var(--bd-steel); }
.bd-sum b { font: 400 34px/1.05 "Fraunces", Georgia, serif; letter-spacing: -0.015em; color: var(--bd-ink); margin-right: 6px; }
.bd-sum.is-after b { color: var(--bd-blue); }
.bd-this {
  display: inline-block; margin: 0 0 6px; padding: 3px 8px; border-radius: 999px; background: var(--bd-blue); color: var(--bd-paper);
  font: 600 12px/1.2 "Source Sans 3", system-ui, sans-serif; letter-spacing: 0.02em;
}

/* Computer: the two boards, one over the other, one column a step, scrolling sideways together. */
.bd-desk { display: grid; gap: 30px; }
.bd-frame { position: relative; border-radius: 14px; background: var(--bd-paper); box-shadow: inset 0 0 0 2px var(--bd-ink); }
.bd-scroll { overflow-x: auto; scroll-snap-type: x proximity; border-radius: 14px; scrollbar-width: thin; }
.bd-grid {
  --col: 150px; display: grid; grid-template-columns: repeat(var(--n), minmax(var(--col), 1fr)); column-gap: 12px; row-gap: 8px;
  padding: 14px; min-width: min-content;
}
.bd-grid > * { min-width: 0; }
.bd-gh { grid-row: 1; margin: 0 0 4px; padding: 9px 12px; border-radius: 8px; background: var(--bd-ink); color: var(--bd-paper); font: 600 15px/1.2 "Source Sans 3", system-ui, sans-serif; text-align: center; }
.bd-sh { grid-row: 2; position: relative; margin: 0; font-size: 14px; font-weight: 700; line-height: 1.28; color: var(--bd-ink); text-wrap: pretty; scroll-snap-align: start; scroll-margin-left: 14px; }
.bd-sh b { display: block; font: 500 13px/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--bd-steel); margin-bottom: 4px; }
.bd-sh:not(.is-last)::after { content: "\2192"; position: absolute; top: -1px; right: -12px; width: 12px; text-align: center; font: 600 14px/1 "Source Sans 3", system-ui, sans-serif; color: var(--bd-steel); background: var(--bd-paper); }
.bd-cl { grid-row: 3; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.bd-task { margin: 0; padding: 9px 10px; border-radius: 6px; font-size: 13.5px; line-height: 1.3; }
.bd-ps { grid-row: 4; margin: 0; padding-top: 8px; border-top: 1.5px dashed rgba(88, 96, 105, 0.4); font-size: 13px; line-height: 1.35; color: var(--bd-steel); }
.bd-ps b, .bd-pass b { color: var(--bd-ink); font-weight: 600; }
.bd-ring { margin: -6px; border-radius: 10px; box-shadow: 0 0 0 2px var(--bd-blue); pointer-events: none; }
.bd-frame.is-wide::after {
  content: ""; position: absolute; top: 2px; right: 2px; bottom: 2px; width: 36px; border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(250, 250, 248, 0), var(--bd-paper)); pointer-events: none;
}
.bd-frame.is-wide.at-end::after { display: none; }
.bd-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; }
.bd-cap { margin: 0; max-width: 70ch; font-size: 14px; line-height: 1.5; color: var(--bd-steel); }
.bd-more { margin: 0; font-size: 14px; font-weight: 600; color: var(--bd-steel); }

/* Phone: one row a step. Hidden on a computer. */
.bd-phone { display: none; }
.bd-rows { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--bd-paper); box-shadow: inset 0 0 0 2px var(--bd-ink); }
.bd-rgh { margin: 10px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--bd-ink); color: var(--bd-paper); font: 600 15px/1.2 "Source Sans 3", system-ui, sans-serif; text-align: center; }
.bd-rgh:first-child { margin-top: 0; }
.bd-row { display: grid; grid-template-columns: 1.5em minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 2px; list-style: none; border-radius: 8px; }
.bd-row::-webkit-details-marker { display: none; }
.bd-row.is-this { box-shadow: 0 0 0 2px var(--bd-blue); }
.bd-n { font: 500 14px/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--bd-steel); }
.bd-nm { font-weight: 700; font-size: 16px; line-height: 1.25; color: var(--bd-ink); }
.bd-nm .bd-this { display: table; margin: 4px 0 0; }
.bd-sqs { display: flex; gap: 5px; justify-content: flex-end; }
.bd-step > summary { cursor: pointer; grid-template-columns: 1.5em minmax(0, 1fr) auto 12px; }
.bd-step > summary::after {
  content: ""; width: 8px; height: 8px; margin-left: 2px; border-right: 2px solid var(--bd-steel); border-bottom: 2px solid var(--bd-steel);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s;
}
.bd-step[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.bd-step > summary:focus-visible { outline: 2px solid var(--bd-blue); outline-offset: 2px; }
.bd-opened { display: grid; gap: 6px; margin: 2px 0 12px calc(1.5em + 10px); }
.bd-opened .bd-task { padding: 8px 10px; font-size: 14.5px; }
.bd-pass { margin: 4px 0 0; padding-top: 8px; border-top: 1.5px dashed rgba(88, 96, 105, 0.4); font-size: 14.5px; line-height: 1.4; color: var(--bd-steel); }
.bd-tally { display: grid; gap: 14px; }
.bd-t { display: grid; gap: 4px; }
.bd-t .bd-sqs { justify-content: flex-start; flex-wrap: wrap; }
.bd-t p { margin: 0; font-size: 17px; color: var(--bd-steel); }
.bd-t b { font: 400 30px/1.05 "Fraunces", Georgia, serif; letter-spacing: -0.015em; color: var(--bd-ink); margin-right: 4px; }
.bd-tally.is-after .bd-t b { color: var(--bd-blue); }
.bd-hint { margin: -4px 0 0; font-size: 15px; line-height: 1.4; color: var(--bd-steel); }

@media (prefers-reduced-motion: reduce) { .bd-step > summary::after { transition: none; } }
@media (max-width: 720px) {
  .bd { background: color-mix(in srgb, var(--bd-sky) 20%, var(--bd-paper)); }
  .bd-top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bd-body { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 22px; }
  .bd .bd-desk { display: none; }
  .bd .bd-phone { display: grid; gap: 44px; }
  .bd .bd-phone .bd-part { gap: 14px; }
  .bd .bd-foot { padding-top: 4px; }
  .bd-open { flex-direction: column; align-items: stretch; gap: 12px; }
  .bd-open .bd-mini { width: 100%; }
  .bd-open__go { display: none; }
}
