/* The Twenty consulting money page's own parts (rule 520): the hero card "In the room" (kit/MemoHero.astro), the
   decision meeting and its memo (kit/DecisionRoom.astro), and Twenty's release record with its what-ifs
   (kit/ReleaseLine.astro). The card head and the step panel take their look from kit-build.css and
   kit-build-parts.css (kbb__ and kbc__ classes), which SectionRenderer links with this file only on a page that draws
   one of these. Each answer's status has one colour: a fact settles it green, a test on your data the accent, a real
   limit amber. */

.kmh,
.kdr,
.krl {
  --st-fact: #00a35c;
  --st-test: var(--accent);
  --st-limit: #c77700;
}
:root[data-theme='dark'] .kmh,
:root[data-theme='dark'] .kdr,
:root[data-theme='dark'] .krl {
  --st-limit: #f0a429;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .kmh,
  :root:not([data-theme='light']) .kdr,
  :root:not([data-theme='light']) .krl {
    --st-limit: #f0a429;
  }
}
.kmh [data-st='fact'],
.kdr [data-st='fact'] { --st: var(--st-fact); }
.kmh [data-st='test'],
.kdr [data-st='test'] { --st: var(--st-test); }
.kmh [data-st='limit'],
.kdr [data-st='limit'] { --st: var(--st-limit); }
.kmh [hidden],
.kdr [hidden],
.krl [hidden] {
  display: none !important;
}

/* the status pill, shared by the hero, the chat and the memo */
.kdr__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  width: fit-content;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--st, var(--accent)) 13%, var(--paper));
  color: color-mix(in srgb, var(--st, var(--accent)) 82%, var(--ink));
  font-size: var(--fs-mono-xs);
  white-space: nowrap;
}

/* ---------- hero: in the room ---------- */

.hero__memo {
  align-self: center;
}
.kmh__card {
  display: grid;
  gap: var(--s-4);
}
.kmh .kbb__head {
  margin-bottom: 0;
}
.kmh__seats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.kmh__seat {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
  transition: border-color 220ms var(--ease), background 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.kmh__seat:hover {
  border-color: var(--accent);
}
.kmh__seat:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.kmh__seat[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--ink);
  box-shadow: 0 10px 22px -16px var(--accent);
  transform: translateY(-2px);
}
.kmh__face {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--accent-deep);
  border: 1px solid var(--line);
}
.kmh__seat[aria-pressed='true'] .kmh__face {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.kmh__sname {
  font-size: var(--fs-xs);
  font-weight: 550;
  line-height: 1.2;
}
/* a seat's dot fills with its answer's status once it has been asked */
.kmh__sdot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 300ms var(--ease);
}
.kmh__seat.is-done .kmh__sdot {
  background: var(--st);
}
.kmh__talk {
  display: grid;
  gap: 10px;
  min-height: 236px;
  align-content: start;
}
.kmh__q {
  justify-self: start;
  max-width: 88%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  background: var(--paper);
}
.kmh__qwho {
  display: block;
  margin-bottom: 2px;
  color: var(--faint);
}
.kmh__q p {
  margin: 0;
  color: var(--ink);
  font-weight: 550;
  font-size: var(--fs-small);
  line-height: 1.35;
}
.kmh__a {
  position: relative;
  justify-self: end;
  width: min(100%, 92%);
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--st, var(--accent)) 35%, var(--line));
  border-left: 3px solid var(--st, var(--accent));
  border-radius: 14px 4px 14px 14px;
  background: color-mix(in srgb, var(--st, var(--accent)) 6%, var(--paper));
  transition: border-color 300ms var(--ease), background 300ms var(--ease);
}
.kmh__talk[data-st='fact'] { --st: var(--st-fact); }
.kmh__talk[data-st='test'] { --st: var(--st-test); }
.kmh__talk[data-st='limit'] { --st: var(--st-limit); }
.kmh__abody {
  display: grid;
  gap: 6px;
}
.kmh__abody p {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.kmh__abody .kmh__src {
  color: var(--faint);
  font-size: var(--fs-mono-xs);
}
.kmh__pic {
  display: inline-flex;
}
.kmh__typing {
  display: none;
  gap: 4px;
  padding: 4px 0;
}
.kmh__typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: kmh-dot 900ms ease-in-out infinite;
}
.kmh__typing i:nth-child(2) { animation-delay: 150ms; }
.kmh__typing i:nth-child(3) { animation-delay: 300ms; }
@keyframes kmh-dot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}
.kmh__talk[data-phase='ask'] .kmh__q {
  animation: kmh-in 360ms var(--ease) 1;
}
.kmh__talk[data-phase='ask'] .kmh__a {
  opacity: 0;
}
.kmh__talk[data-phase='typing'] .kmh__abody {
  display: none;
}
.kmh__talk[data-phase='typing'] .kmh__typing {
  display: inline-flex;
}
.kmh__talk[data-phase='typing'] .kmh__a {
  width: auto;
  animation: kmh-in 260ms var(--ease) 1;
}
.kmh__talk[data-phase='answer'] .kmh__abody {
  animation: kmh-fade 420ms var(--ease) 1;
}
@keyframes kmh-in {
  from { opacity: 0; transform: translateY(8px); }
}
@keyframes kmh-fade {
  from { opacity: 0; }
}
.kmh__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line-2);
}
.kmh__tally {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}
.kmh__tc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.kmh__tc svg {
  color: var(--st);
}
.kmh__tn {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* ---------- the decision meeting ---------- */

.kdr .kbc__grid {
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
}
.kdr__side {
  padding: var(--s-5);
}
.kdr__card {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.kdr__head {
  margin-bottom: 0;
}
.kdr__count {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent-deep);
  white-space: nowrap;
}
.kdr[data-example='yes'] .kdr__count {
  background: var(--paper-2);
  color: var(--muted);
  border: 1px dashed var(--line-2);
}
.kdr__chat {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: 470px;
  margin: 0;
  padding: 4px 6px 4px 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.kdr__turn {
  display: grid;
  gap: 8px;
}
.kdr__turn.is-new {
  animation: kdr-turn 520ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 420ms);
}
@keyframes kdr-turn {
  from { opacity: 0; transform: translateY(10px); }
}
.kdr__q {
  justify-self: start;
  max-width: 90%;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  background: var(--paper-2);
}
.kdr__q p {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 550;
  font-size: var(--fs-small);
  line-height: 1.35;
}
.kdr__who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
}
.kdr__a {
  display: grid;
  gap: 5px;
  justify-self: end;
  width: 92%;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--st) 30%, var(--line));
  border-left: 3px solid var(--st);
  border-radius: 14px 4px 14px 14px;
  background: color-mix(in srgb, var(--st) 5%, var(--paper));
}
.kdr__a p {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.kdr__a .kdr__src {
  color: var(--faint);
  font-size: var(--fs-mono-xs);
}
.kdr__turn--empty p {
  margin: 0;
  padding: var(--s-4);
  border: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: var(--fs-small);
}
.kdr__tally {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.kdr__tcell {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--st);
  background: var(--paper);
}
.kdr__tn {
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kdr__tl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.25;
}
.kdr__tl svg {
  flex: none;
  color: var(--st);
}

/* the steps on the right */
/* the step panel is top-aligned: "Why we ask" sits right under the options and the Next row, not pushed to the
   bottom (owner's polish, 17 Nov 2026, as on the integrations page) */
.kdr.is-js .kbc__why {
  margin-top: var(--s-5);
  border-top: 0;
}
.kdr.is-js .kbc__step.is-on,
.kdr .kbc__steps {
  flex: 0 0 auto;
}
.kdr__multi {
  position: relative;
  padding-right: 40px;
}
.kdr__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line-2);
  color: transparent;
  background: var(--paper);
}
.kdr__multi .kdr__box {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.kdr__multi[aria-pressed='true'] .kdr__box,
.kdr__ask[aria-pressed='true'] .kdr__box {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.kdr__next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.kdr__hint {
  color: var(--faint);
}
.kdr__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kdr__go[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.kdr__froms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: var(--s-5);
}
.kdr__chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-small);
  text-align: left;
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
}
.kdr__chip > svg {
  flex: none;
  width: 28px;
  color: var(--muted);
}
.kdr__chip .tool-tile {
  flex: none;
  width: 28px;
  height: 28px;
}
.kdr__chip:hover,
.kdr__ask:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.kdr__chip[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--ink);
  font-weight: 550;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.kdr__chip:focus-visible,
.kdr__ask:focus-visible,
.krl__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.kdr__asks {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.kdr__group {
  display: grid;
  gap: 6px;
}
.kdr__gname {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-deep);
}
.kdr__qs {
  display: grid;
  gap: 6px;
}
.kdr__ask {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-left: 3px solid color-mix(in srgb, var(--st) 70%, var(--line));
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-small);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.kdr__ask[aria-pressed='true'] {
  border-color: var(--accent);
  border-left-color: var(--st);
  background: var(--accent-tint);
  color: var(--ink);
}

/* the result */
.kdr__limits {
  display: grid;
  gap: 6px;
  margin: 0 0 var(--s-3);
  padding: 0;
  list-style: none;
}
.kdr__limits:empty {
  display: none;
}
.kdr__limits li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-left: 3px solid var(--st-limit);
  background: color-mix(in srgb, var(--st-limit) 9%, var(--paper));
  color: var(--ink);
  font-size: var(--fs-small);
}
.kdr__limits .kdr__ic {
  display: inline-flex;
  margin-top: 2px;
  color: var(--st-limit);
}
.kdr__settle {
  display: grid;
  gap: 8px;
  margin: 0 0 var(--s-4);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.kdr__sh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--accent-deep);
}
.kdr__slist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kdr__slist li,
.kdr .kbc__nlist li:has(.kdr__sitem) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.kdr__slist .kdr__ic {
  margin-top: 3px;
  color: var(--st-test);
}
.kdr__slist li > span:last-child,
.kdr__sitem {
  display: grid;
  gap: 2px;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--ink-2);
}
.kdr__slist strong,
.kdr__sitem strong {
  color: var(--ink);
  font-weight: 600;
}
.kdr[data-verdict='weigh'] .kbc__dot {
  background: var(--st-limit);
}
.kdr[data-verdict='clear'] .kbc__dot {
  background: var(--st-fact);
}

/* the memo */
.kdr__mverdict {
  border-left: 4px solid var(--st-test);
  padding-left: var(--s-4) !important;
}
.kdr__mverdict[data-verdict='weigh'] { border-left-color: var(--st-limit); }
.kdr__mverdict[data-verdict='clear'] { border-left-color: var(--st-fact); }
.kdr__mvt {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.kdr__mvl {
  margin: 0;
  color: var(--ink-2);
}
.kdr__mlines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kdr__mline {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--st);
  background: var(--paper);
}
/* an odd last card takes the whole row, so no half row stands empty */
.kdr__mline:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.kdr__mq {
  display: grid;
  gap: 4px;
  margin: 0;
}
.kdr__mask {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}
.kdr__mdl {
  display: grid;
  gap: 6px;
  margin: 0;
}
.kdr__mdl div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}
.kdr__mdl dt {
  color: var(--faint);
  padding-top: 2px;
}
.kdr__mdl dd {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.kdr__read {
  color: var(--accent-deep);
  font-size: var(--fs-small);
}
.kdr__mfrom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.kdr__tile .tool-tile {
  width: 26px;
  height: 26px;
}
.kdr__mnote {
  margin: 0 0 6px;
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.kdr__ic {
  display: inline-flex;
}
.kdr__mneeds {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
