/* Use case portfolio board (includes/visuals/kanban.php) */
.kb { --kb-gap: 14px; --kb-pad: 10px; --kb-lane: #e8e4de; background: var(--paper); border-radius: var(--radius); padding: 14px; padding: clamp(12px, 1.8vw, 24px); }
.section--paper .kb { background: var(--white); --kb-lane: var(--paper); }

/* top bar of the board */
.kb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 2px 4px 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.kb-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: 14px; color: var(--ink-2); }
.kb-title strong { font-size: 16.5px; color: var(--forest); }
.kb-logo { position: relative; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--forest); }
.kb-logo::before, .kb-logo::after { content: ""; position: absolute; top: 6px; width: 4px; border-radius: 2px; background: var(--green); }
.kb-logo::before { left: 6px; height: 12px; }
.kb-logo::after { left: 13px; height: 7px; }
.kb-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.kb-grid-l { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green-text); }
.kb-crit { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kb-crit li { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.section--paper .kb-crit li { background: var(--paper); }

/* columns */
.kb-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--kb-gap); align-items: start; }
.kb-lane { min-width: 0; padding: var(--kb-pad); border-radius: 12px; background: var(--kb-lane); }
.kb-lane-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; margin: 0; padding: 4px 4px 12px; }
.kb-lane-h::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #7d8a80; }
.kb-lane--2 .kb-lane-h::before { background: var(--sage); box-shadow: inset 0 0 0 1.5px #5f9b7f; }
.kb-lane--3 .kb-lane-h::before { background: var(--green-2); }
.kb-lane--4 .kb-lane-h::before { background: var(--forest); }
.kb-lane-t { font-size: 15px; font-weight: 700; color: var(--forest); }
.kb-count { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--white); font-size: 12.5px; font-weight: 700; text-align: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.kb-lane-s { grid-column: 2 / -1; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }

/* cards */
.kb-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kb-card { position: relative; min-width: 0; padding: 12px 12px 13px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px rgba(12, 43, 21, .06), 0 1px 3px rgba(12, 43, 21, .08); }
.kb-card-t { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--forest); }
.kb-team { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-2); }
.kb-i { flex: none; width: 13px; height: 13px; }
.kb-tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.kb-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; background: var(--paper); color: var(--forest); }
.kb-tag--todo { background: none; box-shadow: inset 0 0 0 1px #b9b3aa; color: var(--ink-2); }
.kb-tag--gain { background: var(--mint); }
.kb-tag--data { background: #dcefe5; }
.kb-tag--ok .kb-i { color: var(--green-text); }
.kb-tag--risk { background: var(--forest); color: var(--white); }
.kb-tag--risk .kb-i { color: var(--green); }
.kb-scores { margin: 10px 0 0; display: grid; gap: 5px; }
.kb-scores div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kb-scores dt { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.kb-scores dd { display: flex; margin: 0; }
.kb-pips { display: inline-flex; gap: 3px; }
.kb-pips i { width: 14px; height: 5px; border-radius: 3px; background: var(--line); }
.kb-pips--1 i:nth-child(-n+1), .kb-pips--2 i:nth-child(-n+2), .kb-pips--3 i { background: var(--forest); }
.kb-kpi { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.kb-flag { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--green-text); }
.kb-card--move { box-shadow: 0 0 0 1.5px var(--green-2), 0 1px 3px rgba(12, 43, 21, .08); }

/* set aside */
.kb-card--stop { background: none; box-shadow: inset 0 0 0 1.5px #b9b3aa; }
.kb-card--stop .kb-card-t { color: var(--ink-2); text-decoration: line-through; text-decoration-color: #7d8a80; text-decoration-thickness: 1px; }
.kb-stop { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 4px 9px; border-radius: 6px; border: 1.5px solid var(--forest); background: var(--white); font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--forest); transform: rotate(-1.5deg); }

/* animation: cards settle, the two validated cards are dragged into their new column, then the stamps fall */
.js .vz-figure .kb-card { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.js .vz-figure.is-visible .kb-card { opacity: 1; transform: none; }
.js .vz-figure.is-visible .kb-n2 { transition-delay: .06s; }
.js .vz-figure.is-visible .kb-n3 { transition-delay: .12s; }
.js .vz-figure.is-visible .kb-n4 { transition-delay: .18s; }
.js .vz-figure.is-visible .kb-n5 { transition-delay: .24s; }
.js .vz-figure.is-visible .kb-n6 { transition-delay: .3s; }
.js .vz-figure.is-visible .kb-n7 { transition-delay: .36s; }
.js .vz-figure.is-visible .kb-n8 { transition-delay: .42s; }
.js .vz-figure.is-visible .kb-n9 { transition-delay: .48s; }
.js .vz-figure .kb-flag { opacity: 0; transition: opacity .5s ease; }
.js .vz-figure.is-visible .kb-flag { opacity: 1; }
.js .vz-figure.is-visible .kb-card--move3 .kb-flag { transition-delay: 1.5s; }
.js .vz-figure.is-visible .kb-card--move2 .kb-flag { transition-delay: 2.3s; }
.js .vz-figure .kb-stop { opacity: 0; transform: scale(1.35) rotate(-6deg); transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.js .vz-figure.is-visible .kb-stop { opacity: 1; transform: rotate(-1.5deg); }
.js .vz-figure.is-visible .kb-n5 .kb-stop { transition-delay: 2.5s; }
.js .vz-figure.is-visible .kb-n6 .kb-stop { transition-delay: 2.75s; }

@media (min-width: 900px) {
  /* the moving cards start one column to the left, lifted, then glide into place */
  .js .vz-figure .kb-card--move { opacity: 1; z-index: 2; transform: translateX(calc(-100% - 2 * var(--kb-pad) - var(--kb-gap))) rotate(-2deg);
    box-shadow: 0 0 0 1.5px var(--green-2), 0 14px 30px rgba(12, 43, 21, .2);
    transition: transform .9s cubic-bezier(.45, .05, .2, 1), box-shadow .5s ease; }
  .js .vz-figure.is-visible .kb-card--move { transform: none; box-shadow: 0 0 0 1.5px var(--green-2), 0 1px 3px rgba(12, 43, 21, .08); }
  .js .vz-figure.is-visible .kb-card--move3 { transition-delay: .7s, 1.5s; }
  .js .vz-figure.is-visible .kb-card--move2 { transition-delay: 1.5s, 2.3s; }
}

@media (max-width: 899px) {
  .kb-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .kb-board { grid-template-columns: minmax(0, 1fr); }
  .kb-bar { padding-inline: 2px; }
  .kb-card-t { font-size: 15px; }
  .kb-tag--todo { display: none; }
}
