/* Inflowork design kit: the example feed, the problem rail, the time bar and the before-and-after diagram.
   Behaviour lives in kit.js. Each design restyles these by overriding the --k-* variables (and may add its own rules). */

:root {
  --k-accent: #6390ff;
  --k-accent-rgb: 99 144 255;
  --k-accent-ink: #3e63d6;
  --k-ink: #1c1c1c;
  --k-n900: #3d3d3d;
  --k-n700: #525252;
  --k-n600: #636363;
  --k-n500: #767676;
  --k-n400: #949494;
  --k-n300: #b8b8b8;
  --k-n200: #dcdcdc;
  --k-n50: #f2f2f2;
  --k-card: #fff;
  --k-line: rgb(28 28 28 / 0.08);
  --k-line-soft: rgb(28 28 28 / 0.05);
  --k-radius: 20px;
  --k-radius-sm: 12px;
  --k-font-body:
    Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --k-font-display: Barlow, Inter, ui-sans-serif, system-ui, sans-serif;
  --k-font-label:
    "Barlow Semi Condensed", Barlow, ui-sans-serif, system-ui, sans-serif;
  --k-label-case: uppercase;
  --k-label-tracking: 0.06em;
  --k-label-weight: 700;
  --k-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --k-shadow:
    0 1px 2px rgb(28 28 28 / 0.04), 0 22px 44px -26px rgb(28 28 28 / 0.16);
  --k-shadow-float:
    0 1px 2px rgb(28 28 28 / 0.05), 0 34px 70px -34px rgb(44 70 140 / 0.38);
}

/* ---------- The example feed ---------- */

.feed {
  --row: 66px;
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--k-radius) - 4px);
  background: rgb(255 255 255 / 0.82);
  box-shadow:
    inset 0 0 0 1px rgb(28 28 28 / 0.07),
    var(--k-shadow-float);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  font-family: var(--k-font-body);
  text-align: left;
}
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--k-line);
}
.feed-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--k-font-label);
  font-weight: var(--k-label-weight);
  font-size: 0.8125rem;
  letter-spacing: var(--k-label-tracking);
  text-transform: var(--k-label-case);
  color: var(--k-n700);
}
.feed-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--k-n50);
  box-shadow: inset 0 0 0 1px var(--k-line);
  font-family: var(--k-font-label);
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: var(--k-label-tracking);
  text-transform: var(--k-label-case);
  color: var(--k-n500);
}
.k-dot {
  position: relative;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--k-accent);
}
@media (prefers-reduced-motion: no-preference) {
  .k-dot::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgb(var(--k-accent-rgb) / 0.7);
    animation: k-ping 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
}
@keyframes k-ping {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  80%,
  100% {
    transform: scale(2.3);
    opacity: 0;
  }
}
.feed-viewport {
  position: relative;
  height: calc(var(--row) * 4);
  overflow: hidden;
}
.feed-viewport::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38px;
  pointer-events: none;
  background: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / 0.88));
}
.feed-list {
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
.feed-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: var(--row);
  padding: 0 20px;
  border-bottom: 1px solid var(--k-line-soft);
  transition: opacity 0.5s var(--k-ease);
}
.feed-item.is-new {
  animation: k-flash 2.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.feed-item.is-leaving {
  opacity: 0;
}
@keyframes k-flash {
  from {
    background-color: rgb(var(--k-accent-rgb) / 0.13);
  }
  to {
    background-color: rgb(var(--k-accent-rgb) / 0);
  }
}
@keyframes k-rise-sm {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html.js .feed-item.init {
    opacity: 0;
    animation: k-rise-sm 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--feed-delay, 0.3s) + var(--i, 0) * 0.1s);
  }
}
.fi-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px var(--k-line),
    0 1px 2px rgb(28 28 28 / 0.05);
  color: var(--k-ink);
}
.fi-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feed-item[data-kind="idea"] .fi-icon {
  background: rgb(var(--k-accent-rgb) / 0.1);
  box-shadow: inset 0 0 0 1px rgb(var(--k-accent-rgb) / 0.28);
  color: var(--k-accent-ink);
}
.fi-body {
  min-width: 0;
}
.fi-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--k-ink);
}
.fi-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--k-n500);
  font-variant-numeric: tabular-nums;
}
.fi-kind {
  font-weight: 600;
  color: var(--k-n600);
}
.feed-item[data-kind="idea"] .fi-kind {
  color: var(--k-accent-ink);
}
.fi-done {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgb(var(--k-accent-rgb) / 0.12);
  color: var(--k-accent-ink);
}
.fi-done svg,
.k-tick svg,
.oc svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feed-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--k-line);
  background: rgb(250 250 250 / 0.7);
  font-size: 0.875rem;
  color: var(--k-n600);
}
/* Narrow cards: titles wrap to two lines instead of being cut off. Add .feed-wrap-lines to force it. */
.feed.feed-wrap-lines {
  --row: 80px;
}
.feed.feed-wrap-lines .fi-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 560px) {
  .feed {
    --row: 80px;
  }
  .fi-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.90625rem;
  }
  .fi-icon {
    width: 32px;
    height: 32px;
  }
  .feed-item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 16px;
  }
}

/* ---------- The problem rail (optional): pains light up as they reach the reading line ---------- */

[data-pains] {
  position: relative;
}
.pains-rail {
  position: absolute;
  z-index: 1;
  width: 1.5px;
  margin-left: -0.75px;
  background: var(--k-n200);
  pointer-events: none;
}
.pains-fill {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  transform: scaleY(0);
  background: linear-gradient(
    180deg,
    var(--k-accent),
    rgb(var(--k-accent-rgb) / 0.45)
  );
}
.pain-body {
  transition: opacity 0.5s var(--k-ease);
}
[data-pains][data-live] .pain:not(.is-active) .pain-body {
  opacity: 0.4;
}
.pain-num {
  transition:
    background-color 0.45s var(--k-ease),
    color 0.45s var(--k-ease),
    box-shadow 0.45s var(--k-ease);
}

/* ---------- The time bar: the work is quick, the waiting isn't ---------- */

.tl-track {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.tl-seg {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: var(--w) 1 0;
  min-width: 0;
}
.tl-tag {
  font-family: var(--k-font-label);
  font-weight: var(--k-label-weight);
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: var(--k-label-case);
  white-space: nowrap;
  color: var(--k-ink);
}
.tl-seg.wait .tl-tag {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--k-n400);
}
.tl-seg.wait .tl-tag svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tl-bar {
  height: 12px;
  border-radius: 4px;
  transform-origin: 0 50%;
}
.tl-seg.work .tl-bar {
  background: var(--k-ink);
}
.tl-seg.wait .tl-bar {
  background: repeating-linear-gradient(
      -45deg,
      rgb(28 28 28 / 0.15) 0 1.5px,
      transparent 1.5px 7px
    )
    var(--k-n50);
  box-shadow: inset 0 0 0 1px var(--k-line);
}
@media (prefers-reduced-motion: no-preference) {
  html.js .tl-bar {
    transform: scaleX(0);
    transition: transform var(--dur, 0.5s) var(--k-ease) var(--at, 0s);
  }
  html.js .tl.is-in .tl-bar {
    transform: scaleX(1);
  }
  html.js .tl-tag {
    opacity: 0;
    transition: opacity 0.5s var(--k-ease) var(--at, 0s);
  }
  html.js .tl.is-in .tl-tag {
    opacity: 1;
  }
  .tl-seg.wait .tl-bar {
    animation: k-march 4s linear infinite;
  }
}
@keyframes k-march {
  to {
    background-position: 39.6px 0;
  }
}
.tl-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--k-n600);
}
.tl-legend .k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tl-legend .k::before {
  content: "";
  width: 18px;
  height: 8px;
  border-radius: 3px;
}
.tl-legend .k-work::before {
  background: var(--k-ink);
}
.tl-legend .k-wait::before {
  background: repeating-linear-gradient(
      -45deg,
      rgb(28 28 28 / 0.2) 0 1.5px,
      transparent 1.5px 5px
    )
    var(--k-n50);
  box-shadow: inset 0 0 0 1px var(--k-line);
}
.tl-legend .k-note {
  margin-left: auto;
  font-style: italic;
  color: var(--k-n500);
}
.tl-legend .k-note::before {
  display: none;
}
@media (max-width: 560px) {
  .tl-tag,
  .tl-seg.wait .tl-tag {
    display: none;
  }
  .tl-legend .k-note {
    margin-left: 0;
  }
}

/* ---------- Before and after ---------- */

.flow {
  position: relative;
  overflow: hidden;
  border-radius: var(--k-radius);
  background: var(--k-card);
  box-shadow:
    inset 0 0 0 1px rgb(28 28 28 / 0.07),
    var(--k-shadow);
  font-family: var(--k-font-body);
  text-align: left;
}
.flow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 14px 16px 14px 28px;
  border-bottom: 1px solid var(--k-line);
  background: rgb(250 250 250 / 0.7);
}
.flow-caption {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--k-n700);
}
.swap {
  display: inline-grid;
}
.swap > * {
  grid-area: 1 / 1;
}
.seg {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  padding: 4px;
  border-radius: 999px;
  background: var(--k-n50);
  box-shadow: inset 0 0 0 1px var(--k-line);
}
.seg button {
  position: relative;
  z-index: 1;
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-family: var(--k-font-label);
  font-weight: var(--k-label-weight);
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: var(--k-label-tracking);
  text-transform: var(--k-label-case);
  color: var(--k-n500);
  transition: color 0.3s;
}
.seg button[aria-pressed="true"] {
  color: var(--k-ink);
}
.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(28 28 28 / 0.1),
    0 4px 12px -4px rgb(28 28 28 / 0.14);
  transition: transform 0.5s var(--k-ease);
}
.flow[data-state="after"] .seg-thumb {
  transform: translateX(100%);
}

.flow-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 228px) minmax(0, 1fr) minmax(0, 284px);
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 6vw, 88px);
  row-gap: 18px;
  min-height: 480px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 52px)
    clamp(32px, 4.5vw, 52px);
  background-image: radial-gradient(
    rgb(28 28 28 / 0.075) 1px,
    transparent 1.3px
  );
  background-size: 24px 24px;
  background-position: 12px 12px;
}
.flow-wires {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.flow-col {
  position: relative;
  z-index: 1;
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}
.flow-head {
  margin: 0;
  font-family: var(--k-font-label);
  font-weight: var(--k-label-weight);
  font-size: 0.75rem;
  line-height: 1.3;
  letter-spacing: 0.07em;
  text-transform: var(--k-label-case);
  color: var(--k-n500);
}
.mid .flow-head {
  justify-self: center;
  text-align: center;
}
.tool-list {
  display: grid;
  gap: 10px;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--k-radius-sm);
  background: #fff;
  box-shadow:
    inset 0 0 0 1px var(--k-line),
    0 1px 2px rgb(28 28 28 / 0.04);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--k-n900);
}
.tool svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--k-n500);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mid-body {
  display: grid;
  justify-items: center;
  align-content: center;
}
.direction {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  padding: 8px 15px 8px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(var(--k-accent-rgb) / 0.38);
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--k-n700);
  text-align: left;
}
.direction::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 30px;
  background: linear-gradient(
    rgb(var(--k-accent-rgb) / 0.65),
    rgb(var(--k-accent-rgb) / 0.2)
  );
}
.direction svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--k-accent-ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hubs {
  display: grid;
  width: 100%;
  justify-items: center;
}
.hubs > .hub {
  grid-area: 1 / 1;
}
.hub {
  width: min(100%, 290px);
  padding: 26px 24px 24px;
  border-radius: calc(var(--k-radius) - 2px);
  text-align: center;
}
.hub-after {
  position: relative;
  background: linear-gradient(180deg, #fff, rgb(246 248 255));
  box-shadow:
    inset 0 0 0 1px rgb(var(--k-accent-rgb) / 0.4),
    0 0 0 6px rgb(var(--k-accent-rgb) / 0.06),
    0 26px 50px -24px rgb(var(--k-accent-rgb) / 0.6);
}
@media (prefers-reduced-motion: no-preference) {
  .hub-after::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: calc(var(--k-radius) + 4px);
    box-shadow: 0 0 0 1px rgb(var(--k-accent-rgb) / 0.35);
    animation: k-hubring 3.2s ease-out infinite;
  }
}
@keyframes k-hubring {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.09);
    opacity: 0;
  }
}
.hub-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--k-ink);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.15),
    0 10px 20px -10px rgb(0 0 0 / 0.55);
}
.hub-mark svg {
  width: 25px;
  height: 27px;
}
.hub strong {
  display: block;
  font-family: var(--k-font-display);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--k-ink);
}
.hub-sub {
  display: block;
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--k-n600);
  text-wrap: balance;
}
.hub-before {
  background: #fff;
  box-shadow:
    inset 0 0 0 1px var(--k-n200),
    0 14px 30px -20px rgb(28 28 28 / 0.2);
}
.people {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.people span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--k-n50);
  box-shadow:
    0 0 0 2px #fff,
    inset 0 0 0 1px var(--k-line);
  color: var(--k-n600);
}
.people span:first-child {
  margin-left: 0;
}
.people svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.outs {
  display: grid;
  align-content: center;
}
.outs > .outcomes {
  grid-area: 1 / 1;
  display: grid;
  gap: 12px;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.outcome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--k-radius-sm);
  background: #fff;
  box-shadow:
    inset 0 0 0 1px var(--k-line),
    0 1px 2px rgb(28 28 28 / 0.04);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--k-n900);
}
.oc {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.outcomes-after .oc {
  background: rgb(var(--k-accent-rgb) / 0.14);
  color: var(--k-accent-ink);
}
.outcomes-before .oc {
  background: var(--k-n50);
  color: var(--k-n500);
  box-shadow: inset 0 0 0 1px var(--k-line);
}
.outcomes-before .outcome {
  color: var(--k-n700);
}

/* One state shows at a time. Opacity only, so the wires measure the boxes where they really sit. */
.st-before,
.st-after {
  transition:
    opacity 0.5s var(--k-ease),
    visibility 0s linear 0s;
}
.flow[data-state="after"] .st-before,
.flow[data-state="before"] .st-after {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s var(--k-ease),
    visibility 0s linear 0.45s;
}

.wires-before,
.wires-after {
  transition: opacity 0.6s var(--k-ease);
}
.flow[data-state="after"] .wires-before,
.flow[data-state="before"] .wires-after {
  opacity: 0;
}
.w-b {
  fill: none;
  stroke: var(--k-n300);
  stroke-width: 1.3;
  stroke-dasharray: 3 6;
  stroke-linecap: round;
}
.w-t {
  fill: none;
  stroke: rgb(28 28 28 / 0.16);
  stroke-width: 1.2;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
}
.w-a {
  fill: none;
  stroke: rgb(var(--k-accent-rgb) / 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.2s var(--k-ease) var(--wd, 0s);
}
.flow[data-state="after"] .w-a {
  stroke-dashoffset: 0;
}
.pk-a {
  fill: var(--k-accent);
}
.pk-halo {
  fill: rgb(var(--k-accent-rgb) / 0.22);
}
.pk-b {
  fill: var(--k-n400);
}

@media (max-width: 1100px) {
  .flow-stage {
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr) minmax(0, 250px);
    column-gap: 44px;
  }
}
/* Stacked below 960px. kit.js uses the same breakpoint to draw straight wires between the blocks. */
@media (max-width: 960px) {
  .flow-stage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 0;
    min-height: 0;
  }
  .flow-col {
    grid-row: auto;
    grid-template-rows: none;
    gap: 14px;
  }
  .flow-head,
  .mid .flow-head {
    justify-self: center;
    text-align: center;
  }
  .flow-col.tools,
  .flow-col.mid {
    margin-bottom: 64px;
  }
  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .outs {
    justify-self: center;
    width: min(100%, 420px);
  }
}
@media (max-width: 560px) {
  .flow-top {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    text-align: center;
  }
  .seg {
    align-self: center;
  }
  .tool-list {
    gap: 8px;
  }
  .tool {
    padding: 9px 11px;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed *,
  .flow *,
  .tl * {
    animation: none !important;
    transition: none !important;
  }
}
