/*
  Case study articles: a reading column sized for long text, a sticky contents
  rail on wide screens, and figures that break out to the full column width.
  Figures are built from real text and assemble once when they scroll into view
  (article.js adds .is-armed and .is-live). Without JavaScript or with reduced
  motion every figure simply shows its finished state.
*/
:root {
  --ink-body: #272623;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink-body: #deddd8;
  }
}

/* Reading progress under the header, driven by the article's own scroll range */
.project-main {
  timeline-scope: --article;
}
.read-progress {
  display: none;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .case-study {
      view-timeline: --article block;
    }
    .read-progress {
      position: fixed;
      top: calc(var(--header) - 1px);
      left: 0;
      right: 0;
      z-index: 31;
      display: block;
      height: 2px;
      background: var(--ink);
      transform: scaleX(0);
      transform-origin: 0 50%;
      pointer-events: none;
      animation: read-progress linear both;
      animation-timeline: --article;
      animation-range: contain 0% contain 100%;
    }
  }
}
@keyframes read-progress {
  to {
    transform: scaleX(1);
  }
}

/* Article head */
.case-study {
  margin-top: 112px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}
.case-head {
  max-width: 820px;
}
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 14px;
  color: var(--ink-3);
}
.case-meta span + span::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 18px 0 0;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: middle;
  translate: 0 -2px;
}
.case-summary {
  max-width: 24em;
  margin-top: 18px;
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}
.case-body {
  display: grid;
  gap: 40px;
  margin-top: 56px;
}

/* Contents */
.case-toc {
  font-size: 14px;
  line-height: 1.35;
}
.case-toc-title {
  margin-bottom: 12px;
  color: var(--ink-3);
}
.case-toc ol {
  display: grid;
  list-style: none;
  border-left: 1px solid var(--line);
}
.case-toc a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 1px solid transparent;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 200ms, border-color 200ms;
}
.case-toc a:hover {
  color: var(--ink);
}
.case-toc a[aria-current="true"] {
  border-left-color: var(--ink);
  color: var(--ink);
}

/* Prose: one reading column, figures may take the full width */
.prose {
  /* About 68 characters per line; Geist's zero is wide, so ch would overshoot */
  --measure: 34.5em;
  display: grid;
  grid-template-columns: [wide-start text-start] minmax(0, var(--measure)) [text-end] minmax(0, 1fr) [wide-end];
  min-width: 0;
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink-body);
  counter-reset: fig;
  font-kerning: normal;
  hanging-punctuation: first;
}
.prose > * {
  grid-column: text;
  min-width: 0;
}
.prose > .fig {
  grid-column: wide;
}
.prose > * + * {
  margin-top: 1.15em;
}
.prose h2 {
  margin-top: 2.1em;
  padding-top: 1em;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(1.625rem, 1.3rem + 0.9vw, 2.125rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.028em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header) + 28px);
}
.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose h3 {
  margin-top: 1.9em;
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.012em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header) + 28px);
}
.prose h2 + *,
.prose h3 + * {
  margin-top: 0.7em;
}
.prose > p,
.prose > ul > li,
.prose > ol > li {
  text-wrap: pretty;
}
.prose strong {
  color: var(--ink);
  font-weight: 500;
}
.prose a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, var(--ink) 32%, transparent);
  transition: text-decoration-color 150ms;
}
.prose a:hover {
  text-decoration-color: var(--ink);
}
.prose ul,
.prose ol {
  list-style: none;
}
.prose > ul > li + li,
.prose > ol > li + li {
  margin-top: 0.6em;
}
.prose > ul > li {
  position: relative;
  padding-left: 1.5em;
}
.prose > ul > li::before {
  content: "";
  position: absolute;
  top: 0.74em;
  left: 0.35em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--ink-3);
}
.prose > ol {
  counter-reset: step;
}
.prose > ol > li {
  position: relative;
  padding-left: 2.5em;
  counter-increment: step;
}
.prose > ol > li::before {
  content: counter(step);
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-2);
  font: 500 12px/24px var(--mono);
  text-align: center;
}
.prose code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  font-family: var(--mono);
  font-size: 0.86em;
}
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 1.6em;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.prose th,
.prose td {
  padding: 12px 20px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  border-bottom-color: var(--line-strong);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
}
.prose th:last-child,
.prose td:last-child {
  padding-right: 0;
}
.prose [align="right"] {
  text-align: right;
}
.prose [align="center"] {
  text-align: center;
}

/* Figure frame: a tinted stage like the project scenes, a numbered caption */
.fig {
  margin-top: 2.4em;
  margin-bottom: 0.4em;
  counter-increment: fig;
  --tint: var(--tint-youtube);
}
.prose > .fig + * {
  margin-top: 1.9em;
}
.prose > h2 + .fig,
.prose > h3 + .fig {
  margin-top: 1.2em;
}
.fig[data-slug="blunatech"] { --tint: var(--tint-blunatech); }
.fig[data-slug="berichtsheftki"] { --tint: var(--tint-berichtsheftki); }
.fig[data-slug="mmk-chatbot"] { --tint: var(--tint-mmk-chatbot); }
.fig[data-slug="sharehood"] { --tint: var(--tint-sharehood); }
.fig[data-slug="karla"] { --tint: var(--tint-karla); }
.fig[data-slug="clew-agent"] { --tint: var(--tint-clew-agent); }
.fig[data-slug="clew-nfc"] { --tint: var(--tint-clew-nfc); }
.fig-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(20px, 3.4vw, 44px);
  border-radius: var(--r-lg);
  background: var(--tint);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
.fig-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 50% 0%, var(--stage-light), transparent 64%);
  pointer-events: none;
}
.fig figcaption {
  display: flex;
  gap: 12px;
  max-width: 78ch;
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}
.fig figcaption::before {
  content: attr(data-label) "\00a0" counter(fig);
  flex: none;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
}
.fig-replay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--ink-2);
  cursor: pointer;
  opacity: 0;
  transition: opacity 250ms, color 150ms;
}
.fig-replay[hidden] {
  display: none;
}
.fig:hover .fig-replay,
.fig-replay:focus-visible {
  opacity: 1;
}
.fig-replay:hover {
  color: var(--ink);
}
@media (hover: none) {
  .fig-replay {
    opacity: 0.9;
  }
}

/* Figure atoms */
.fc {
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.f-mono {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
}
.f-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.f-sub {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}
.f-big {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
}
.chip--ink {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skel {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 11%, transparent);
}
.skel--ink {
  background: var(--ink);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

/* Flows: numbered steps joined by connectors; vertical on phones */
.flow {
  --gap: 34px;
  display: grid;
  gap: var(--gap);
  list-style: none;
  counter-reset: flow;
}
.flow > li {
  position: relative;
  counter-increment: flow;
}
.flow > li + li::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--gap));
  left: 22px;
  width: 1px;
  height: var(--gap);
  background: color-mix(in srgb, var(--ink) 30%, transparent);
  transform-origin: 50% 0;
}
.flow > li + li::after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--gap) - 3px);
  left: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
}
.flow-no {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}
.flow-no::before {
  content: counter(flow, decimal-leading-zero);
}
.flow .fc {
  padding: 14px 16px;
}
@media (min-width: 900px) {
  .flow--row {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    --gap: 26px;
  }
  .flow--row > li + li::before {
    top: 50px;
    left: calc(-1 * var(--gap));
    width: var(--gap);
    height: 1px;
    transform-origin: 0 50%;
  }
  .flow--row > li + li::after {
    top: 47px;
    left: calc(-1 * var(--gap) - 3px);
  }
}

/* Bars */
.bars {
  display: grid;
  gap: 14px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.bar-head b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  border-radius: 6px;
  background: var(--ink);
  transform-origin: 0 50%;
}
.bar--ghost {
  background: color-mix(in srgb, var(--ink) 26%, transparent);
}

/* Screenshots: browser windows and phone store shots */
.shot {
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}
.shot-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.shot-bar span {
  margin-left: 10px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
}
.shot img,
.gallery img {
  display: block;
  width: 100%;
  height: auto;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 24px);
  align-items: start;
}
.gallery img {
  border-radius: clamp(10px, 1.6vw, 18px);
  box-shadow: var(--shadow-lg);
}
.gallery--thumbs {
  gap: clamp(10px, 1.6vw, 18px);
}
.gallery--thumbs img {
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.thumb figcaption,
.thumb-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
@media (max-width: 639px) {
  .gallery--thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Motion primitives. Time runs on a sixteenth grid (125 ms at 120 BPM):
   --d is the start in sixteenths, --dur the length. Springs overshoot a hair. */
.fig {
  --beat: 125ms;
  --arrive: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.3, 1.16, 0.45, 1);
  --travel: cubic-bezier(0.65, 0, 0.35, 1);
}
.fig [data-m] {
  transform-box: fill-box;
}
.fig [data-m="draw"] {
  stroke-dasharray: 1;
}
.fig [data-m="travel"] {
  stroke-dasharray: 0.08 1.2;
  opacity: 0;
}
.fig [data-m="cursor"],
.fig [data-m="ripple"],
.fig [data-m="out"],
.fig [data-m="flash"] {
  opacity: 0;
}
.fig [data-m="grow-x"] {
  transform-origin: 0 50%;
}
.fig [data-m="grow-y"] {
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .fig.is-armed [data-m],
  .fig.is-armed .flow > li + li::before,
  .fig.is-armed .flow > li + li::after {
    animation-duration: var(--dur, 720ms);
    animation-delay: calc(var(--d, 0) * var(--beat));
    animation-timing-function: var(--arrive);
    animation-fill-mode: both;
    animation-play-state: paused;
  }
  .fig.is-live [data-m],
  .fig.is-live .flow > li + li::before,
  .fig.is-live .flow > li + li::after {
    animation-play-state: running;
  }
  .fig.is-armed [data-m="rise"] { animation-name: m-rise; }
  .fig.is-armed [data-m="pop"] { animation-name: m-pop; animation-timing-function: var(--spring); }
  .fig.is-armed [data-m="blur"] { animation-name: m-blur; }
  .fig.is-armed [data-m="fade"] { animation-name: m-fade; }
  .fig.is-armed [data-m="slide"] { animation-name: m-slide; }
  .fig.is-armed [data-m="grow-x"] { animation-name: m-grow-x; animation-timing-function: var(--spring); }
  .fig.is-armed [data-m="grow-y"] { animation-name: m-grow-y; animation-timing-function: var(--spring); }
  .fig.is-armed [data-m="draw"] { animation-name: m-draw; animation-timing-function: var(--travel); }
  .fig.is-armed [data-m="type"] { animation-name: m-type; animation-timing-function: steps(var(--steps, 18), end); }
  .fig.is-armed [data-m="travel"] { animation-name: m-travel; animation-timing-function: var(--travel); }
  .fig.is-armed [data-m="cursor"] { animation-name: m-cursor; animation-timing-function: linear; --dur: 1500ms; }
  .fig.is-armed [data-m="ripple"] { animation-name: m-ripple; --dur: 600ms; }
  .fig.is-armed [data-m="out"] { animation-name: m-out; }
  .fig.is-armed [data-m="flash"] { animation-name: m-flash; --dur: 900ms; }
  .fig.is-armed [data-m="shift"] { animation-name: m-shift; animation-timing-function: var(--spring); }
  .fig.is-armed [data-m="press"] { animation-name: m-press; --dur: 360ms; }
  .fig.is-armed .flow > li + li::before { animation-name: m-line-y; animation-timing-function: var(--travel); }
  .fig.is-armed .flow > li + li::after { animation-name: m-dot-y; animation-timing-function: var(--travel); --dur: 640ms; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .fig.is-armed .flow--row > li + li::before { animation-name: m-line-x; }
  .fig.is-armed .flow--row > li + li::after { animation-name: m-dot-x; }
}

@keyframes m-rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
}
@keyframes m-pop {
  from { opacity: 0; transform: scale(0.86); filter: blur(5px); }
}
@keyframes m-blur {
  from { opacity: 0; filter: blur(10px); }
}
@keyframes m-fade {
  from { opacity: 0; }
}
@keyframes m-slide {
  from { opacity: 0; transform: translateX(var(--dx, -28px)); filter: blur(5px); }
}
@keyframes m-grow-x {
  from { transform: scaleX(var(--s0, 0)); }
}
@keyframes m-grow-y {
  from { transform: scaleY(var(--s0, 0)); }
}
@keyframes m-draw {
  from { stroke-dashoffset: 1; }
}
@keyframes m-type {
  from { clip-path: inset(0 100% 0 0); }
}
@keyframes m-travel {
  0% { opacity: 0; stroke-dashoffset: 0.08; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; stroke-dashoffset: -1; }
}
@keyframes m-cursor {
  0% { opacity: 0; transform: translate(var(--x0, -90px), var(--y0, 70px)); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
  12% { opacity: 1; }
  52% { transform: translate(0, 0); }
  60% { transform: translate(0, 0) scale(0.82); }
  68% { transform: translate(0, 0) scale(1); }
  88% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(6px, 10px); }
}
@keyframes m-ripple {
  0% { opacity: 0.4; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.4); }
}
@keyframes m-out {
  0% { opacity: 1; filter: blur(0); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 0; filter: blur(8px); }
}
@keyframes m-flash {
  0%, 100% { opacity: 0; }
  30%, 60% { opacity: 1; }
}
@keyframes m-shift {
  from { transform: translateY(var(--from, 0)); }
}
@keyframes m-press {
  50% { transform: scale(0.94); }
}
@keyframes m-line-y {
  from { transform: scaleY(0); }
}
@keyframes m-line-x {
  from { transform: scaleX(0); }
}
@keyframes m-dot-y {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--gap)); }
}
@keyframes m-dot-x {
  0% { opacity: 0; transform: translateX(0); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(var(--gap)); }
}

/* Cursor and tap, placed inside the element they act on */
.cursor-at {
  position: relative;
}
.m-cursor {
  position: absolute;
  top: 50%;
  left: 55%;
  z-index: 4;
  width: 20px;
  height: 22px;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.m-ripple {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--ink);
  pointer-events: none;
}

/* Desktop reading: larger type, contents rail */
@media (min-width: 1100px) {
  .case-body {
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 72px;
  }
  .case-toc {
    position: sticky;
    top: calc(var(--header) + 40px);
    align-self: start;
    max-height: calc(100vh - var(--header) - 80px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .prose {
    font-size: 19px;
    line-height: 1.74;
  }
}
@media (min-width: 640px) {
  .prose table {
    display: table;
    width: 100%;
  }
}
@media (max-width: 1099px) {
  .case-toc {
    padding: 18px 20px;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .case-toc ol {
    border-left: 0;
  }
  .case-toc a {
    padding: 6px 0;
    border-left: 0;
  }
}
@media (max-width: 599px) {
  .prose {
    font-size: 17px;
    line-height: 1.68;
  }
  .fig-stage {
    border-radius: var(--r-md);
  }
}

/* Shared small parts */
.f-arrow {
  flex: none;
  color: var(--ink-3);
}
.fig.is-armed [data-m="dim"] {
  animation-name: m-dim;
}
@keyframes m-dim {
  from { opacity: 1; }
}

/* MMK Chatbot: pipeline */
.rag > li {
  display: flex;
  flex-direction: column;
}
.rag-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}
.rag-bubble {
  align-self: flex-start;
  padding: 9px 13px;
  border-radius: 14px 14px 14px 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  line-height: 1.35;
}
.rag-bubble span {
  display: inline-block;
}
.rag-gloss {
  display: grid;
  gap: 6px;
  margin-top: auto;
}
.rag-map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.rag-lane {
  display: grid;
  gap: 5px;
}
.rag-hits {
  display: grid;
  gap: 4px;
}
.rag-hits i {
  display: block;
  width: calc(var(--v) * 100%);
  height: 6px;
  border-radius: 3px;
  background: var(--ink);
}
.rag-lane + .rag-lane .rag-hits i {
  background: color-mix(in srgb, var(--ink) 45%, transparent);
}
.rag-rrf {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.rag-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: center;
}
.rag-seg > span {
  position: relative;
  padding: 4px 0;
  color: var(--ink-3);
}
.rag-seg b {
  position: relative;
  z-index: 1;
  font-weight: 500;
}
.rag-seg .is-on {
  color: var(--paper);
}
.rag-seg-on {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--ink);
}
.rag-stack {
  display: grid;
  gap: 6px;
  margin-top: auto;
}
.rag-stack > span {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.rag-stack .skel {
  height: 5px;
}
.rag-stack .skel--ink {
  width: 55%;
}
.rag-answer {
  display: grid;
  gap: 7px;
}
.rag-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
}

/* MMK Chatbot: recall chart */
.recall {
  display: grid;
  gap: 22px;
}
.recall-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  color: var(--ink-2);
  font-size: 13px;
}
.recall-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.recall-legend i {
  width: 18px;
  height: 10px;
  border-radius: 3px;
  background: var(--ink);
}
.recall-legend i.bar--ghost {
  background: color-mix(in srgb, var(--ink) 26%, transparent);
}
.recall-legend i.is-ring {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}
.recall-rows {
  display: grid;
  gap: 18px;
}
.recall-row {
  display: grid;
  gap: 8px;
}
.recall-row dt {
  font-size: 14px;
  font-weight: 500;
}
.recall-row dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.recall-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent calc(25% - 0.5px), color-mix(in srgb, var(--ink) 10%, transparent) 0 calc(25% + 0.5px), transparent 0 calc(50% - 0.5px), color-mix(in srgb, var(--ink) 10%, transparent) 0 calc(50% + 0.5px), transparent 0 calc(75% - 0.5px), color-mix(in srgb, var(--ink) 10%, transparent) 0 calc(75% + 0.5px), transparent 0),
    color-mix(in srgb, var(--surface) 70%, transparent);
}
.recall-track .bar {
  border-radius: 7px;
}
.recall-track .bar--ghost {
  z-index: 1;
}
.recall-track .bar:not(.bar--ghost) {
  z-index: 2;
  height: 8px;
  top: 3px;
  border-radius: 4px;
}
.recall-mark {
  position: absolute;
  top: 50%;
  left: calc(var(--v) * 100%);
  z-index: 3;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}
.recall-vals {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.recall-before {
  color: var(--ink-3);
}
.recall-to {
  color: var(--ink-3);
}
.recall-vals b {
  font-weight: 500;
}
.recall-sept {
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
}
@media (min-width: 720px) {
  .recall-row {
    grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
    align-items: center;
    gap: 20px;
  }
  .recall-row dd {
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 16px;
  }
}

/* MMK Chatbot: contextual retrieval finding */
.ctx {
  display: grid;
  gap: 16px;
}
.ctx-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 20px;
}
.ctx-scale {
  --lo: 0.35;
  --span: 0.15;
  position: relative;
  height: 150px;
  margin: 4px 22px 0;
}
.ctx-axis {
  position: absolute;
  top: 74px;
  left: 0;
  right: 0;
  height: 2px;
}
.ctx-axis i {
  display: block;
  height: 100%;
  border-radius: 1px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
}
.ctx-pt {
  position: absolute;
  top: 45px;
  left: calc((var(--v) - var(--lo)) / var(--span) * 100%);
  width: 0;
}
.ctx-pt b {
  position: absolute;
  top: 0;
  left: -30px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--ink);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ctx-pt--b b {
  background: var(--ink);
  color: var(--paper);
}
.ctx-pt small {
  position: absolute;
  left: 0;
  translate: -50% 0;
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}
.ctx-pt--a small {
  top: -26px;
}
.ctx-pt--b small {
  top: 70px;
}
.ctx-pt {
  z-index: 2;
}
.ctx-link {
  position: absolute;
  z-index: 1;
  top: 73px;
  left: calc((0.4 - var(--lo)) / var(--span) * 100%);
  width: calc(0.05 / var(--span) * 100%);
  height: 4px;
}
.ctx-link i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--ink);
  transform-origin: 100% 50%;
}
.ctx-ticks {
  position: relative;
  height: 16px;
  margin: 0 22px;
}
.ctx-ticks span {
  position: absolute;
  left: calc((var(--v) - 0.35) / 0.15 * 100%);
  translate: -50% 0;
}
.ctx-toggles {
  display: grid;
  gap: 10px;
  list-style: none;
}
.ctx-toggles li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.ctx-switch {
  position: relative;
  width: 40px;
  height: 24px;
}
.ctx-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}
.ctx-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ctx-knob-on {
  background: var(--ink);
}
.ctx-knob-on::after {
  right: 3px;
}
.ctx-knob-off {
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
.ctx-knob-off::after {
  left: 3px;
}
.ctx-state {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}
@media (min-width: 720px) {
  .ctx {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

/* MMK Chatbot: corpus */
.corpus {
  display: grid;
  gap: 12px;
  align-items: stretch;
}
.corpus-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 20px;
}
.corpus-arrow {
  display: grid;
  place-items: center;
  rotate: 90deg;
}
.corpus-pages {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.corpus-page {
  aspect-ratio: 3 / 4;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 3px;
  background: var(--surface);
  background-image: linear-gradient(color-mix(in srgb, var(--ink) 30%, transparent) 0 0);
  background-size: 55% 2px;
  background-position: 30% 35%;
  background-repeat: no-repeat;
}
.corpus-page.is-out {
  opacity: 0.2;
}
.corpus-page:not(.is-out) {
  border-color: var(--ink);
  background-image: linear-gradient(var(--ink) 0 0);
}
.corpus-rules {
  display: grid;
  gap: 8px;
  list-style: none;
  font-size: 14px;
}
.corpus-rules li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.corpus-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
}
.corpus-rules .is-out {
  color: var(--ink-3);
}
.corpus-rules .is-out .corpus-check {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink-3);
}
.corpus-rules s {
  position: relative;
  text-decoration: none;
}
.corpus-rules s i {
  position: absolute;
  top: 52%;
  left: -2px;
  right: -2px;
  height: 1.5px;
  background: var(--ink-2);
}
.corpus-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.corpus-nums p {
  display: grid;
  gap: 6px;
}
.corpus-ring svg {
  flex: none;
  rotate: -90deg;
}
.corpus-ring {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.corpus-ring p {
  display: grid;
  gap: 2px;
  font-size: 14px;
}
.corpus-ring b {
  font-weight: 500;
}
@media (min-width: 900px) {
  .corpus {
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 0.9fr) 20px minmax(0, 1.15fr);
  }
  .corpus-arrow {
    rotate: 0deg;
  }
}

/* MMK Chatbot: chunking */
.chunks {
  display: grid;
  gap: 14px;
}
.chunks-doc {
  position: relative;
  height: 86px;
}
.chunks-strip {
  position: absolute;
  top: 62px;
  left: 0;
  right: 0;
  height: 18px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 22%, transparent) 0 14px, transparent 14px 18px);
}
.chunks-win {
  position: absolute;
  top: calc(var(--row) * 20px);
  left: calc(var(--l) * 100%);
  width: calc(var(--w) * 100%);
  height: calc(62px - var(--row) * 20px);
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.chunks-win b {
  position: absolute;
  top: -1px;
  left: 8px;
  padding: 0 6px;
  translate: 0 -50%;
  background: var(--tint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
}
.chunks-lap {
  position: absolute;
  top: 62px;
  left: calc(var(--l) * 100%);
  width: calc(var(--w) * 100%);
  height: 18px;
  border-radius: 3px;
  background: var(--ink);
}
.chunks-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.chunks-cards {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  list-style: none;
}
.chunks-cards .fc {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}
.chunks-ctx {
  display: grid;
  gap: 6px;
}
.chunks-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.chunks-keys i {
  width: var(--kw);
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
@media (min-width: 720px) {
  .chunks-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* BerichtsheftKI: voice to report */
.bhv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: start;
  gap: clamp(4px, 1.2vw, 14px);
}
.bhv-arrow {
  display: grid;
  place-items: center;
  margin-top: 40%;
}
.bhv-step {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  aspect-ratio: 9 / 17;
  max-width: 220px;
  width: 100%;
  margin-inline: auto;
  padding: 30px 12px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: clamp(18px, 3vw, 30px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 34%;
  height: 11px;
  border-radius: 999px;
  background: var(--ink);
  translate: -50% 0;
}
.phone .f-mono {
  text-align: center;
  font-size: clamp(10px, 1.1vw, 12px);
}
.bhv-timer {
  text-align: center;
  font-size: clamp(1.25rem, 0.9rem + 1.4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.bhv-mic {
  position: relative;
  display: grid;
  place-items: center;
  width: 62%;
  aspect-ratio: 1;
  margin: auto;
}
.bhv-ring {
  position: absolute;
  inset: 0;
  rotate: -90deg;
}
.bhv-mic-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}
.bhv-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 34px;
}
.bhv-wave i,
.bhf-audio i {
  width: 3px;
  height: calc(var(--h) * 100%);
  border-radius: 2px;
  background: var(--ink);
  transform-origin: 50% 50%;
}
.bhv-report {
  display: grid;
  gap: 12px;
}
.bhv-day {
  display: grid;
  gap: 5px;
  font-size: clamp(10.5px, 1.1vw, 12.5px);
}
.bhv-day b {
  font-weight: 500;
}
.bhv-day .skel {
  height: 5px;
}
.phone--pdf {
  justify-content: flex-end;
  background: color-mix(in srgb, var(--surface) 70%, var(--tint));
}
.bhv-sheet {
  display: grid;
  gap: 7px;
  margin-bottom: auto;
  padding: 12px 10px;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}
.bhv-sheet .f-mono {
  text-align: left;
  font-size: clamp(9px, 0.9vw, 11px);
}
.bhv-sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.bhv-sheet-grid i {
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.bhv-sign {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.bhv-sign i {
  flex: 1;
  height: 1px;
  background: var(--ink-3);
}
.bhv-export {
  display: block;
  padding: 9px 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(10.5px, 1.1vw, 13px);
  font-weight: 500;
  text-align: center;
}
.bhv-label {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
}
@media (max-width: 639px) {
  .bhv {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  .bhv-arrow {
    display: none;
  }
  .bhv-label {
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
  }
  .phone {
    padding: 24px 8px 10px;
    gap: 6px;
  }
}

/* BerichtsheftKI: templates */
.tpl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.4vw, 28px);
}
.tpl-item {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.tpl-sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  aspect-ratio: 1 / 1.414;
  padding: clamp(10px, 1.6vw, 18px);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.tpl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.tpl-head .f-mono {
  font-size: clamp(8.5px, 0.9vw, 11px);
}
.tpl-block {
  display: grid;
  gap: 5px;
}
.tpl-block .skel,
.tpl-table .skel,
.tpl-map .skel {
  height: 5px;
}
.tpl-table {
  display: grid;
  border-top: 1px solid var(--line-strong);
}
.tpl-table p {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  padding: clamp(5px, 0.9vw, 10px) 0;
  border-bottom: 1px solid var(--line-strong);
}
.tpl-table .f-mono {
  font-size: clamp(8.5px, 0.9vw, 11px);
}
.tpl-map {
  display: grid;
  gap: clamp(6px, 1vw, 12px);
}
.tpl-map p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px auto;
  align-items: center;
  gap: 4px;
}
.tpl-map svg {
  width: 100%;
  height: 12px;
  color: var(--ink-3);
}
.tpl-goal {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(8px, 0.85vw, 10.5px);
  white-space: nowrap;
}
.tpl-sign {
  display: flex;
  gap: 12px;
  margin-top: auto;
}
.tpl-sign i {
  flex: 1;
  height: 1px;
  background: var(--ink-3);
}
.tpl-label {
  display: grid;
  gap: 2px;
  font-size: 13.5px;
  text-align: center;
}
.tpl-label b {
  font-weight: 500;
}

/* BerichtsheftKI: express mode */
.xp {
  display: grid;
  gap: 20px;
}
.xp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.xp-btn {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
}
.xp-grid {
  display: grid;
  grid-template-columns: repeat(26, minmax(0, 1fr));
  gap: clamp(3px, 0.5vw, 6px);
}
.xp-grid i {
  aspect-ratio: 1;
  border-radius: clamp(2px, 0.4vw, 4px);
}
.xp-grid .is-done {
  background: color-mix(in srgb, var(--ink) 30%, transparent);
}
.xp-grid .is-new {
  background: var(--ink);
}
.xp-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
@media (max-width: 639px) {
  .xp-grid {
    grid-template-columns: repeat(13, minmax(0, 1fr));
  }
}

/* BerichtsheftKI: data flow */
.bhf .fc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}
.bhf > li {
  display: flex;
  flex-direction: column;
}
.bhf > li > .fc {
  flex: 1;
}
.bhf-audio {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  margin-top: auto;
}
.bhf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.bhf-check .corpus-check {
  width: 18px;
  height: 18px;
  flex: none;
}
.bhf-swap {
  display: grid;
  margin-top: 4px;
}
.bhf-swap > * {
  grid-area: 1 / 1;
}
.bhf-lines {
  display: grid;
  align-content: center;
  gap: 6px;
}
.bhf-lines .skel {
  height: 5px;
}
.bhf-deleted {
  align-self: flex-start;
  margin-top: auto;
  border-style: dashed;
}
.fig .bhv-wave i,
.fig .bhf-audio i {
  transform-origin: 50% 50%;
}

/* Flow cards that fill their column */
.blj > li,
.ytb > li {
  display: flex;
  flex-direction: column;
}
.blj .fc,
.ytb .fc {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

/* BLUNATECH: journey */
.blj-chapters {
  display: grid;
  gap: 3px;
  margin-top: auto;
}
.blj-chapters i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
}
.blj-steps {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  margin-top: auto;
}
.blj-steps i {
  height: 8px;
  border-radius: 2px;
  background: var(--ink);
}
.blj-profile {
  align-self: flex-start;
  white-space: normal;
}
.blj-cal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: auto;
}
.blj-cal span {
  display: grid;
  place-items: center;
  aspect-ratio: 1.3;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.blj-cal i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.blj-variants {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: auto;
}
.blj-variants span {
  display: grid;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.blj-variants b {
  height: 14px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}
.blj-variants i {
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
}
.blj-qr {
  width: 52px;
  height: 52px;
  margin-top: auto;
}

/* BLUNATECH: scoring */
.score {
  display: grid;
  gap: 14px;
}
.score .fc {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 20px;
}
.score-factors ul {
  display: grid;
  gap: 12px;
  list-style: none;
}
.score-factors li {
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.score-knob {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.score-knob i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  border-radius: 3px;
  background: var(--ink);
}
.score-knob i::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--ink);
}
.score-list ol {
  display: grid;
  list-style: none;
}
.score-body {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}
.score-ranks {
  display: grid;
  grid-auto-rows: var(--row);
  align-items: center;
}
.score-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 28%);
  align-items: center;
  gap: 10px;
  height: var(--row);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}
.score-list li:first-child .score-name {
  font-weight: 500;
}
.score-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.score-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.score-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  border-radius: 3px;
  background: var(--ink);
}
@media (min-width: 720px) {
  .score {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  }
}

/* BLUNATECH: fast lane */
.fast {
  display: grid;
  gap: 16px;
}
.fast-prompt {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}
.fast-input {
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 15px;
}
.fast-input span {
  display: inline-block;
}
.fast-btn {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
}
.fast-variants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 14px);
}
.fast-card {
  display: grid;
  gap: 7px;
  padding: 12px;
}
.fast-card.is-picked {
  box-shadow: 0 0 0 2px var(--ink), var(--shadow-lg);
}
.fast-hero {
  height: 54px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--tint) 80%, var(--ink) 8%);
}
.fast-hero--1 {
  background: color-mix(in srgb, var(--ink) 85%, transparent);
}
.fast-hero--2 {
  height: 40px;
}
.fast-card .skel {
  height: 5px;
}
.fast-cta {
  width: 46%;
  height: 16px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--ink);
}
@media (min-width: 900px) {
  .fast {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
    align-items: center;
  }
}

/* Architecture stack */
.stack {
  display: grid;
  justify-items: center;
}
.stack .fc {
  padding: 14px 18px;
}
.stack-client,
.stack-hub {
  display: grid;
  gap: 4px;
  min-width: min(100%, 280px);
  text-align: center;
}
.stack-hub {
  box-shadow: 0 0 0 2px var(--ink), var(--shadow-lg);
}
.stack-link {
  position: relative;
  display: block;
  width: 2px;
  height: 28px;
}
.stack-link i {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
  transform-origin: 50% 0;
}
.stack-link b {
  position: absolute;
  bottom: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
.fig [data-m="grow-y"].stack-link i,
.stack-link i[data-m="grow-y"] {
  transform-origin: 50% 0;
}
.stack-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
  list-style: none;
}
.stack-services li {
  display: grid;
  justify-items: center;
}
.stack-services .fc {
  display: grid;
  gap: 4px;
  width: 100%;
  height: 100%;
}

/* YouTube: thumbnails */
.thumbs {
  list-style: none;
}
.thumbs a {
  display: grid;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.thumbs img {
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.thumbs a:hover img {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.thumb-meta {
  display: grid;
  justify-items: start;
  gap: 6px;
}
.thumb-title {
  font-size: 13.5px;
  line-height: 1.35;
  text-wrap: pretty;
}
.thumbs a:hover .thumb-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.thumbs a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 10px;
}

/* YouTube: growth */
.grow {
  display: grid;
  gap: 22px;
}
.grow-row {
  display: grid;
  gap: 8px;
}
.grow-label {
  font-size: 14px;
  font-weight: 500;
}
.grow-track {
  position: relative;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.grow-track .bar {
  border-radius: 8px;
}
.grow-track .grow-was {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  background: color-mix(in srgb, var(--ink) 36%, var(--surface));
  border-radius: 8px 0 0 8px;
  color: var(--ink);
  font-size: 11.5px;
  white-space: nowrap;
}
.grow-now {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.grow-now b {
  font-weight: 500;
}
@media (min-width: 720px) {
  .grow-row {
    grid-template-columns: 150px minmax(0, 1fr) 210px;
    align-items: center;
    gap: 18px;
  }
}

/* YouTube: workbench */
.bench {
  display: grid;
  gap: 12px;
  list-style: none;
}
.bench > li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.bench-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
}
.bench-head b {
  font-weight: 500;
}
.bench-term {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
}
.bench-term span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
}
.bench-term .is-err {
  color: #f0a39a;
}
.bench-prompt {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
}
.bench-prompt span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bench-prompt i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--paper);
}
.bench-prompt .skel {
  height: 5px;
  background: color-mix(in srgb, var(--paper) 40%, transparent);
}
.bench-prompt .skel--ink {
  background: var(--paper);
}
.bench-tracks {
  display: grid;
  gap: 6px;
}
.bench-tracks p {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.bench-clip {
  height: 20px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
}
.bench-voice {
  height: 20px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px) center / 100% 60% no-repeat, color-mix(in srgb, var(--ink) 12%, transparent);
}
.bench-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bench-words span {
  display: grid;
  gap: 1px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 13px;
}
.bench-words small {
  font-size: 10.5px;
}
.bench-anim {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 44px;
}
.bench-anim i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--ink);
}
.bench-a1 { height: 40%; }
.bench-a2 { height: 70%; opacity: 0.8; }
.bench-a3 { height: 55%; opacity: 0.6; }
.bench-a4 { height: 95%; }
.bench-meter {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 10%, transparent), color-mix(in srgb, var(--ink) 16%, transparent));
}
.bench-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 72%;
  border-radius: 6px;
  background: var(--ink);
}
.bench-target {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 72%;
  width: 2px;
  background: var(--ink);
}
.bench-lufs {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.bench-lufs b {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
}
.bench .f-sub {
  margin-top: auto;
}
@media (min-width: 640px) {
  .bench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .bench {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* YouTube: benchmark */
.ytb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
}
.ytb-list .chip {
  white-space: normal;
}
.ytb-tasks {
  display: grid;
  gap: 5px;
  list-style: none;
  font-size: 13px;
}
.ytb-tasks li {
  padding-left: 12px;
  border-left: 2px solid var(--ink);
}
.ytb-note {
  margin-top: auto;
}
.ytb-dist {
  width: 100%;
  height: auto;
  margin-top: 6px;
}

/* Narrow flow cards: long German compounds break instead of overflowing */
.flow .f-title,
.flow .f-sub,
.flow .f-mono,
.flow .chip {
  overflow-wrap: break-word;
  hyphens: auto;
  white-space: normal;
}
.bench-term span {
  white-space: normal;
}
.bhv-sheet {
  flex: 1;
  margin-bottom: 10px;
}
.bhv-sheet-grid {
  flex: 1;
}

/* Architecture stack: a bus line joins the hub to every service */
.stack-drop {
  display: block;
  width: 2px;
  height: 22px;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
  transform-origin: 50% 0;
}
@media (min-width: 720px) {
  .stack-services {
    position: relative;
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  }
  .stack-services::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(50% / var(--n));
    right: calc(50% / var(--n));
    height: 2px;
    background: color-mix(in srgb, var(--ink) 35%, transparent);
  }
}
@media (max-width: 719px) {
  .stack-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }
  .stack-services .stack-link,
  .stack-drop {
    display: none;
  }
}
.grow-was b {
  font-weight: 400;
}
@media (prefers-color-scheme: dark) {
  .bench-term .is-err {
    color: #a3281d;
  }
}
@media (max-width: 639px) {
  .score-list li {
    font-size: 13px;
  }
  .score-name {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }
}
@media (max-width: 599px) {
  .case-meta {
    flex-direction: column;
    gap: 2px;
  }
  .case-meta span + span::before {
    display: none;
  }
}

/* Sharehood: flow */
.shf > li,
.cno > li {
  display: flex;
  flex-direction: column;
}
.shf .fc,
.cno .fc {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}
.shf-map {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 47%, color-mix(in srgb, var(--ink) 9%, transparent) 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, color-mix(in srgb, var(--ink) 9%, transparent) 47% 53%, transparent 53%),
    color-mix(in srgb, var(--ink) 5%, transparent);
}
.shf-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  aspect-ratio: 1;
  border: 1.5px dashed var(--ink);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  translate: -50% -50%;
}
.shf-pin {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 14px;
  height: 14px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: var(--shadow-sm);
}
.shf-me {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  translate: -50% -50%;
}
.shf-field {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 14px;
}
.shf-field span {
  display: inline-block;
}
.shf-send {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
}
.shf-wave {
  position: absolute;
  inset: -6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  pointer-events: none;
}
.shf-bubble {
  align-self: flex-start;
  max-width: 90%;
  padding: 7px 11px;
  border-radius: 12px 12px 12px 4px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  font-size: 13px;
  line-height: 1.35;
}
.shf-bubble.is-me {
  align-self: flex-end;
  border-radius: 12px 12px 4px 12px;
  background: var(--ink);
  color: var(--paper);
}
.shf-loan {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 13px;
  font-weight: 500;
}
.shf-loan .corpus-check {
  width: 18px;
  height: 18px;
}

/* Karla: routing */
.kar {
  display: grid;
  gap: 14px;
  align-items: stretch;
}
.kar > .fc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
}
.kar-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 13px;
}
.kar-lanes {
  display: grid;
  gap: 10px;
  list-style: none;
}
.kar-lane {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  opacity: 0.55;
}
.kar-lane.is-on {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--ink), var(--shadow-sm);
}
.kar-lane span:last-of-type {
  display: grid;
  gap: 2px;
}
.kar-lane b {
  font-size: 14px;
  font-weight: 500;
}
.kar-lane small {
  color: var(--ink-3);
  font-size: 12px;
}
.kar-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.kar-lane.is-on .kar-dot {
  background: var(--ink);
}
.kar-pick {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--ink);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/svg%3E");
}
.kar-pick::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  width: 5px;
  height: 9px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}
@media (min-width: 900px) {
  .kar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

/* CLEW Agent: pipeline */
.cap {
  display: grid;
  gap: 22px;
}
.cap-track {
  position: relative;
}
.cap-rail {
  position: absolute;
  top: 19px;
  left: 7%;
  right: 7%;
  height: 2px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.cap-rail i {
  display: block;
  height: 100%;
  background: var(--ink);
}
.cap-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
}
.cap-step {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.cap-node {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11.5px;
}
.cap-step.is-ai .cap-node {
  background: var(--ink);
  color: var(--paper);
}
.cap-name {
  font-size: 12.5px;
  line-height: 1.25;
  hyphens: auto;
  overflow-wrap: break-word;
}
.cap-out {
  display: grid;
  gap: 12px;
  align-items: center;
}
.cap-note {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-style: dashed;
  border-color: var(--ink);
}
.cap-lock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.cap-lock span {
  display: grid;
  gap: 2px;
  font-size: 14px;
}
.cap-lock b {
  font-weight: 500;
}
.cap-lock small {
  color: var(--ink-3);
  font-size: 12px;
}
.cap-max {
  justify-self: start;
}
@media (min-width: 720px) {
  .cap-out {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  }
}
@media (max-width: 639px) {
  .cap-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 16px;
  }
  .cap-rail {
    display: none;
  }
}

/* CLEW NFC: order */
.cno-rows {
  display: grid;
  gap: 6px;
}
.cno-rows i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--ink);
}
.cno-rows i + i {
  background: color-mix(in srgb, var(--ink) 30%, transparent);
}
.cno-chip {
  position: relative;
  display: grid;
  place-items: center;
  height: 70px;
}
.cno-tag {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: var(--ink);
  box-shadow: inset 0 0 0 9px var(--ink), inset 0 0 0 10.5px var(--surface);
}
.cno-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.cno-sync {
  display: grid;
  min-height: 34px;
}
.cno-sync > * {
  grid-area: 1 / 1;
  justify-self: start;
  align-self: center;
}
.cno-offline {
  border-style: dashed;
}

/* Narrow screenshot, a chat widget */
.narrow-shot {
  width: min(400px, 100%);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.narrow-shot img {
  display: block;
  width: 100%;
  height: auto;
}
