.grainient-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.grainient-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.logoloop {
  --logoloop-gap: 32px;
  --logoloop-logoHeight: 28px;
  --logoloop-pad: 0px;
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding-top: var(--logoloop-pad);
  padding-bottom: var(--logoloop-pad);
  -webkit-tap-highlight-color: transparent;
}

.logoloop--vertical {
  display: inline-block;
  height: 100%;
  padding: 0 var(--logoloop-pad);
}

.logoloop[data-draggable] {
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}

.logoloop--vertical[data-draggable] {
  touch-action: pan-x pinch-zoom;
}

.logoloop[data-dragging],
.logoloop[data-dragging] * {
  cursor: grabbing;
}

.logoloop__track {
  position: relative;
  z-index: 0;
  display: flex;
  width: max-content;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.logoloop--vertical .logoloop__track {
  flex-direction: column;
  width: 100%;
  height: max-content;
}

.logoloop__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logoloop--vertical .logoloop__list {
  flex-direction: column;
}

.logoloop__item {
  position: relative;
  flex: 0 0 auto;
  margin-right: var(--logoloop-gap);
  font-size: var(--logoloop-logoHeight);
  line-height: 1;
}

.logoloop--vertical .logoloop__item {
  margin-right: 0;
  margin-bottom: var(--logoloop-gap);
}

.logoloop[data-intro] .logoloop__item {
  opacity: 0;
}

.logoloop__content {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--logoloop-logoHeight) * 0.3);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    color 0.35s ease;
}

.logoloop[data-labels='below'] .logoloop__content {
  flex-direction: column;
  gap: calc(var(--logoloop-logoHeight) * 0.22);
}

.logoloop__content:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.logoloop__node {
  display: inline-flex;
  align-items: center;
}

.logoloop__item img {
  display: block;
  width: auto;
  height: var(--logoloop-logoHeight);
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  -webkit-user-drag: none;
  pointer-events: none;
}

.logoloop__node,
.logoloop__item img {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logoloop--scale-hover .logoloop__item:hover img,
.logoloop--scale-hover .logoloop__item:hover .logoloop__node {
  transform: scale(1.2);
}

.logoloop__label {
  font-size: max(12px, calc(var(--logoloop-logoHeight) * 0.5));
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logoloop[data-labels='below'] .logoloop__label {
  font-size: max(11px, calc(var(--logoloop-logoHeight) * 0.26));
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.72;
}

.logoloop__tip {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: calc(var(--logoloop-logoHeight) * 0.2);
  font-size: max(11px, calc(var(--logoloop-logoHeight) * 0.26));
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  translate: -50% 4px;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    translate 0.25s ease;
}

.logoloop--vertical .logoloop__tip {
  top: 50%;
  left: 100%;
  margin-top: 0;
  margin-left: calc(var(--logoloop-logoHeight) * 0.25);
  translate: 4px -50%;
}

.logoloop__item:hover .logoloop__tip,
.logoloop__item:focus-within .logoloop__tip,
.logoloop__item[data-active] .logoloop__tip {
  opacity: 0.8;
  translate: -50% 0;
}

.logoloop--vertical .logoloop__item:hover .logoloop__tip,
.logoloop--vertical .logoloop__item:focus-within .logoloop__tip,
.logoloop--vertical .logoloop__item[data-active] .logoloop__tip {
  translate: 0 -50%;
}

.logoloop[data-muted] .logoloop__content {
  filter: grayscale(var(--logoloop-gray, 1));
  opacity: var(--logoloop-dim, 0.5);
}

.logoloop[data-muted] .logoloop__item:hover .logoloop__content,
.logoloop[data-muted] .logoloop__item:focus-within .logoloop__content,
.logoloop[data-muted] .logoloop__item[data-active] .logoloop__content {
  filter: none;
  opacity: 1;
}

.logoloop__item[data-color]:hover .logoloop__content,
.logoloop__item[data-color]:focus-within .logoloop__content,
.logoloop__item[data-color][data-active] .logoloop__content {
  color: var(--logoloop-item-color);
}

.logoloop:not([data-muted]) .logoloop__item:not([data-color]) a.logoloop__content:hover {
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .logoloop__content,
  .logoloop__node,
  .logoloop__item img,
  .logoloop__tip {
    transition: none;
  }
}

/* hero agent flow, a transparent svg over the page grainient that rests on a framed sankey, the agent's command chip and the frame header share the top of the frame */
.af {
  --af-lime: #c2ff26;
  --af-text: #e6efe9;
  --af-muted: #9fb5ad;
  --af-bronze: 217, 146, 90;
  --af-silver: 196, 208, 204;
  --af-gold: 242, 201, 76;
  --af-flag: 242, 163, 58;
  position: relative;
  width: 100%;
  margin-top: clamp(48px, 6vw, 80px);
  text-align: center;
}

.af__cmd {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  white-space: nowrap;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(194, 255, 38, 0.28);
  border-radius: 12px;
  background: rgba(194, 255, 38, 0.06);
  color: var(--af-text);
  font-family: var(--td-mono, ui-monospace, monospace);
  font-size: 14px;
  text-align: left;
  opacity: 0;
}

.af__caret,
.af__check {
  color: var(--af-lime);
}

.af__check {
  opacity: 0;
}

/* the check only fades in, it drops out at once so it never sits next to a new command while that one types */
.af__cmd.is-done .af__check {
  opacity: 1;
  transition: opacity 0.2s;
}

.af__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* the frame and header only show around the finished sankey, the padding is always there so nothing moves when they fade in */
.af__stage {
  position: relative;
  padding: 72px 28px 28px;
  border-radius: 20px;
}

.af__stage::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.af__head {
  position: absolute;
  top: 20px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.af__title {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

/* play button, a lime pill in the eyebrow style with the play icon, its ring spreads out every few seconds while the sankey rests */
.af__play {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 16px 0 14px;
  border: 1px solid rgba(194, 255, 38, 0.45);
  border-radius: 999px;
  background: rgba(194, 255, 38, 0.12);
  box-shadow: 0 0 24px rgba(194, 255, 38, 0.18);
  color: var(--af-lime);
  font-family: var(--td-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.af__play:hover {
  border-color: var(--af-lime);
  background: rgba(194, 255, 38, 0.22);
  box-shadow: 0 0 32px rgba(194, 255, 38, 0.32);
}

.af__play:focus-visible {
  outline: 2px solid var(--af-lime);
  outline-offset: 3px;
}

.af__play svg {
  flex: none;
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.af__play-ring {
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--af-lime);
  border-radius: 999px;
  box-shadow:
    0 0 14px rgba(194, 255, 38, 0.45),
    inset 0 0 10px rgba(194, 255, 38, 0.25);
  opacity: 0;
  pointer-events: none;
}

.af.is-reduced .af__play {
  display: none;
}

/* frame and header fade out quickly when play starts and back in late in the morph */
.af.is-sankey .af__stage::before {
  opacity: 1;
  transition: opacity 0.8s ease 0.3s;
}

.af.is-sankey .af__head {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.6s ease 0.9s;
}

/* the resting sankey renders straight from the markup, the controller only takes over once play starts */
.af.is-static .af__band,
.af.is-static .af__bar,
.af.is-static .af__node,
.af.is-static .af__column {
  opacity: 1;
}

/* the finished graph shown without motion skips the fades too */
.af.is-static .af__stage::before,
.af.is-static .af__head,
.af.is-static .af__tag,
.af.is-static .af__metric {
  transition: none;
}

/* lines draw in through a dash offset, pathLength is 1 so the offset runs from 1 to 0 */
.af__line,
.af__glow,
.af__pulse,
.af__halo {
  fill: none;
}

.af__line,
.af__glow {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.af__line {
  stroke: rgba(194, 255, 38, 0.38);
  stroke-width: 1.25;
}

.af__glow {
  stroke: rgba(194, 255, 38, 0.07);
  stroke-width: 6;
}

/* the pulse is a zero length dash with round caps, parked just before the line start */
.af__pulse,
.af__halo {
  stroke-linecap: round;
  stroke-dasharray: 0.001 3;
  stroke-dashoffset: 0.05;
}

.af__pulse {
  stroke: #ecffbf;
  stroke-width: 5;
}

.af__halo {
  stroke: rgba(194, 255, 38, 0.2);
  stroke-width: 14;
}

/* the dots where a line meets a tile or card */
.af__port {
  fill: #021a16;
  stroke: rgba(194, 255, 38, 0.6);
  stroke-width: 1.25;
  opacity: 0;
}

/* sources and destinations, same tile as .td-icon-tile */
.af__node {
  opacity: 0;
}

.af__dot rect {
  fill: rgba(194, 255, 38, 0.07);
  stroke: rgba(194, 255, 38, 0.25);
  stroke-width: 1;
}

.af__icon,
.af__icon circle,
.af__icon ellipse {
  fill: none;
  stroke: var(--af-lime);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.af__burst {
  opacity: 0;
}

.af__burst line {
  stroke: var(--af-lime);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.af__ring {
  fill: none;
  stroke: var(--af-lime);
  stroke-width: 1.25;
  opacity: 0;
}

.af__label {
  fill: var(--af-muted);
  font-family: var(--td-mono, ui-monospace, monospace);
  font-size: 13px;
}

/* tables, each version is a layer, the front one is opaque so the older ones only show at the edge */
.af__layer {
  opacity: 0;
}

/* older versions behind the front card show only their outline */
.af__layer.is-back :is(.af__divider, .af__grid, .af__cells, .af__tier, .af__name, .af__ver) {
  visibility: hidden;
}

.af__card {
  fill: #0b241f;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.af__divider {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.af__grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.045);
  stroke-width: 1;
}

.af__cells {
  fill: none;
  stroke: rgba(230, 239, 233, 0.16);
  stroke-width: 2;
  stroke-linecap: round;
}

.af__tier {
  fill: rgb(var(--af-tier));
}

.af__name,
.af__ver {
  font-family: var(--td-mono, ui-monospace, monospace);
  font-size: 10.5px;
}

.af__name {
  fill: var(--af-text);
}

.af__ver {
  fill: var(--af-muted);
}

.af__table--bronze {
  --af-tier: var(--af-bronze);
}

.af__table--silver {
  --af-tier: var(--af-silver);
}

.af__table--gold {
  --af-tier: var(--af-gold);
}

/* the quality check's side table and its line are amber, like a warning */
.af__table--flag {
  --af-tier: var(--af-flag);
}

.af__table--flag .af__card {
  stroke: rgba(var(--af-flag), 0.45);
}

.af__link.is-flag .af__line {
  stroke: rgba(var(--af-flag), 0.55);
}

.af__link.is-flag .af__glow {
  stroke: rgba(var(--af-flag), 0.1);
}

.af__link.is-flag .af__pulse {
  stroke: #ffd9a3;
}

.af__link.is-flag .af__halo {
  stroke: rgba(var(--af-flag), 0.3);
}

.af__link.is-flag .af__port {
  stroke: rgba(var(--af-flag), 0.7);
}

/* bronze, silver and gold over their columns, each shows when its first table lands */
.af__column {
  font-family: var(--td-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
}

.af__column--bronze {
  fill: rgb(var(--af-bronze));
}

.af__column--silver {
  fill: rgb(var(--af-silver));
}

.af__column--gold {
  fill: rgb(var(--af-gold));
}

/* the stacked layout stays phone sized and centered on tablets */
.af--tall .af__svg {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* the stacked layout gets a smaller chip with room for two lines, so a wrapping command doesn't push the graph down */
.af--tall .af__cmd {
  min-height: 58px;
  font-size: 13px;
  padding: 8px 14px;
}

/* the finished sankey, ribbons sized by data volume and a glowing bar where each table card was */
.af__band {
  fill: rgba(194, 255, 38, 0.16);
  opacity: 0;
}

.af__link.is-flag .af__band {
  fill: rgba(var(--af-flag), 0.35);
}

.af__bar {
  opacity: 0;
}

.af__bar-core {
  fill: #f2ffd6;
}

.af__bar-glow {
  fill: rgba(194, 255, 38, 0.18);
}

/* bar names and metrics fade out at once when play starts and in late in the morph */
.af__tag,
.af__metric {
  font-family: var(--td-mono, ui-monospace, monospace);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.af__tag {
  fill: var(--af-text);
  font-size: 13px;
}

.af__metric {
  fill: var(--af-muted);
  font-size: 11.5px;
}

.af.is-sankey .af__tag,
.af.is-sankey .af__metric {
  opacity: 1;
  transition: opacity 0.6s ease 0.8s;
}

.af--tall .af__stage {
  padding: 84px 12px 18px;
}

.af--tall .af__head {
  top: 22px;
  left: 16px;
  right: 16px;
}

/* max content width so a centered chip isn't squeezed into half the frame, the max width then wraps long commands onto two lines */
.af--tall .af__cmd {
  width: max-content;
  white-space: normal;
}

/* hero execution graph, no backdrop so it floats on the grainient */
.eg {
  --eg-mono: var(--td-mono, 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace);
  --eg-lime: #c2ff26;
  --eg-amber: #f2a33a;
  position: relative;
  width: 100%;
}

.eg svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* backdrop fills its parent and its viewBox matches the measured box, so nothing scales or crops */
.eg--backdrop {
  position: absolute;
  inset: 0;
}

.eg--backdrop svg {
  height: 100%;
}

/* 1px so a snapped edge lands exactly on the 1px css grid line under it */
.eg--backdrop .eg__edge {
  stroke-width: 1;
}

.eg__head {
  font-family: var(--eg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-anchor: middle;
  fill: rgba(230, 239, 233, 0.36);
}

/* --heat (0 to 1) is eased by the graph's own 30fps loop in ExecGraph.tsx and mixes the resting colour into the lit one
   css transitions did the same fades but kept the browser drawing at the full refresh rate (120 on promotion screens) while any of them ran */
.eg__edge {
  fill: none;
  stroke: color-mix(in srgb, rgba(194, 255, 38, 0.5) calc(var(--heat, 0) * 100%), rgba(230, 239, 233, 0.14));
  stroke-width: 1.2;
}

/* source and destination stubs are dashed so they read as outside the graph */
.eg__edge--io {
  stroke-dasharray: 3 4;
}

.eg__port {
  fill: none;
  stroke: rgba(230, 239, 233, 0.3);
  stroke-width: 1.2;
}

.eg__box {
  stroke-width: 1.2;
}

.eg__halo {
  fill: none;
  stroke-width: 8;
  opacity: var(--heat, 0);
}

.eg__label {
  font-family: var(--eg-mono);
  font-size: 12px;
  fill: rgba(230, 239, 233, 0.82);
}

/* functions, publishers, transformers and subscribers share the dark green box */
.eg__node--fn .eg__box {
  fill: color-mix(in srgb, #12332a calc(var(--heat, 0) * 100%), #0d2620);
  stroke: color-mix(in srgb, rgba(194, 255, 38, 0.85) calc(var(--heat, 0) * 100%), rgba(194, 255, 38, 0.26));
}

.eg__node--fn .eg__halo {
  stroke: rgba(194, 255, 38, 0.16);
}

/* tables are amber, matching the deploy card graph */
.eg__node--table .eg__box {
  fill: color-mix(in srgb, #2a2614 calc(var(--heat, 0) * 100%), #1d2215);
  stroke: color-mix(in srgb, var(--eg-amber) calc(var(--heat, 0) * 100%), rgba(242, 163, 58, 0.55));
}

.eg__layer {
  fill: #141a12;
  stroke: rgba(242, 163, 58, 0.2);
  stroke-width: 1;
}

.eg__node--table .eg__halo {
  stroke: rgba(242, 163, 58, 0.18);
}

.eg__node--table .eg__label {
  fill: #f6c27a;
}

.eg__version {
  font-family: var(--eg-mono);
  font-size: 10px;
  text-anchor: end;
  fill: rgba(246, 194, 122, 0.55);
}

.eg__packet-core {
  fill: var(--eg-lime);
}

/* standalone wrapper used when the view is placed on its own outside the hero */
.mf-section {
  padding: clamp(48px, 7vw, 96px) 24px;
  background: #021a16;
}

.mf-section .mf {
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}

/* medallion dataflow view, tokens are redeclared so the view also renders outside a td-section */
.mf {
  --td-lime: #c2ff26;
  --td-text: #e6efe9;
  --td-muted: #9fb5ad;
  --td-line: rgba(255, 255, 255, 0.08);
  --td-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(33, 163, 0, 0.09), transparent 60%),
    #0a1411;
  color: var(--td-text, #e6efe9);
  text-align: left;
}

.mf__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.mf__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--td-lime, #c2ff26);
  font-family: var(--td-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.mf__date svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.mf__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.05rem, 0.85rem + 0.8vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.mf__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(150px, 1.3fr);
  overflow: hidden;
  border: 1px solid var(--td-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.mf__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--td-line);
}

.mf__stat-label {
  color: var(--td-muted);
  font-family: var(--td-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mf__stat-value {
  color: #fff;
  font-size: 1.12rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mf__stat-value small {
  color: var(--td-muted);
  font-size: 0.78em;
  font-weight: 400;
}

.mf__stat-note {
  color: rgba(159, 181, 173, 0.75);
  font-size: 12px;
}

.mf__stat.is-error .mf__stat-value {
  color: #ff6b6b;
}

/* committed vs error split, the error sliver keeps a minimum width so it stays visible */
.mf__progress {
  display: flex;
  align-self: center;
  height: 10px;
  margin: 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.mf__progress-ok {
  width: 98.8%;
  background: linear-gradient(90deg, #21a300, #c2ff26);
  box-shadow: 0 0 14px rgba(194, 255, 38, 0.45);
}

.mf__progress-err {
  flex: 1;
  min-width: 4px;
  background: #ff5a5a;
}

.mf__chart {
  overflow-x: auto;
  border: 1px solid var(--td-line);
  border-radius: 14px;
  background-color: rgba(0, 0, 0, 0.2);
  background-image: radial-gradient(rgba(194, 255, 38, 0.13) 1px, transparent 1.3px);
  background-size: 22px 22px;
}

.mf__chart svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

/* svg text, sizes are viewBox units */
.mf__name {
  fill: #fff;
  font-size: 16px;
  font-weight: 500;
}

.mf__meta {
  fill: var(--td-muted);
  font-family: var(--td-mono);
  font-size: 13px;
}

.mf__tier {
  fill: #fff;
  font-family: var(--td-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.mf__tier.is-bronze .mf__medal {
  fill: #d08b4f;
}

.mf__tier.is-silver .mf__medal {
  fill: #d7e1dd;
}

.mf__tier.is-gold .mf__medal {
  fill: #f0c44c;
}

.mf__label.is-unused .mf__tier {
  fill: #e8be46;
  font-size: 12.5px;
}

.mf__delta {
  fill: var(--td-lime);
  font-family: var(--td-mono);
  font-size: 12.5px;
}

.mf__error path {
  fill: rgba(255, 90, 90, 0.15);
  stroke: #ff5a5a;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.mf__error text {
  fill: #ff6b6b;
  font-family: var(--td-mono);
  font-size: 11.5px;
  text-decoration: underline;
}

.mf__bar {
  fill: #e6efe9;
}

.mf__node.is-layer .mf__bar {
  fill: #fff;
  filter: drop-shadow(0 0 6px rgba(194, 255, 38, 0.55));
}

.mf__node.is-unused .mf__bar {
  fill: #e8be46;
}

.mf__icon-bg {
  fill: #0f2a1d;
  stroke: rgba(194, 255, 38, 0.45);
  stroke-width: 1.5;
}

.mf__icon g {
  fill: none;
  stroke: var(--td-lime);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* phone version, the same sankey turned to run top to bottom, hidden until the wide one would need sideways scrolling */
.mf__vchart {
  display: none;
  border: 1px solid var(--td-line);
  border-radius: 14px;
  background-color: rgba(0, 0, 0, 0.2);
  background-image: radial-gradient(rgba(194, 255, 38, 0.13) 1px, transparent 1.3px);
  background-size: 22px 22px;
}

.mf__vchart svg {
  display: block;
  width: 100%;
  height: auto;
}

/* vertical chart text, sizes are viewBox units which land close to css pixels at phone width */
.mf__vname {
  fill: var(--td-text);
  font-size: 10.5px;
  font-weight: 600;
  text-anchor: middle;
}

.mf__vmeta,
.mf__vdelta,
.mf__verror,
.mf__vunused {
  font-family: var(--td-mono);
  font-size: 9.5px;
}

.mf__vmeta {
  fill: var(--td-muted);
}

.mf__vtier {
  font-size: 11px;
}

.mf__vdelta {
  fill: var(--td-lime);
}

.mf__verror {
  fill: #ff6b6b;
}

.mf__vunused {
  fill: #e8be46;
  text-anchor: end;
}

@media (max-width: 640px) {
  .mf__chart {
    display: none;
  }
  .mf__vchart {
    display: block;
  }
}

@media (max-width: 860px) {
  .mf__head {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .mf__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mf__stat {
    border-bottom: 1px solid var(--td-line);
  }
  .mf__progress {
    grid-column: 1 / -1;
    margin: 14px 16px;
  }
}

.floating-lines-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.floating-lines-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* design tokens for the dark-first rebuild, lime and green come from the site's brand variables */
.td-section {
  --td-bg: #021a16;
  --td-bg-2: #01332a;
  --td-green: #21a300;
  --td-lime: #c2ff26;
  --td-lime-soft: rgba(194, 255, 38, 0.12);
  --td-text: #e6efe9;
  --td-muted: #9fb5ad;
  --td-faint: rgba(230, 239, 233, 0.5);
  --td-line: rgba(255, 255, 255, 0.08);
  --td-line-strong: rgba(255, 255, 255, 0.14);
  --td-radius: 20px;
  --td-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* --td-section-bg goes transparent when a page level grainient sits behind everything */
  background: var(--td-section-bg, var(--td-bg));
  color: var(--td-text);
  font-family: inherit;
  /* every section pads both edges, so two in a row stack into double this, kept modest so the stacked gap doesn't read as dead space */
  padding: clamp(48px, 5.5vw, 80px) 0;
  -webkit-font-smoothing: antialiased;
}

.td-section *,
.td-section *::before,
.td-section *::after {
  box-sizing: border-box;
}

.td-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* absolute layer for animated backgrounds, sits under the container */
.td-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* faint lime grid that fades out from the center through a radial mask */
.td-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(194, 255, 38, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(194, 255, 38, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
}

/* top and bottom fades so neighboring sections blend into each other */
.td-fade-edges::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--td-fade-bg, var(--td-bg)) 0%, transparent 18%, transparent 82%, var(--td-fade-bg, var(--td-bg)) 100%);
}

/* section header */
.td-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 760px;
}

.td-header--center {
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.td-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid rgba(194, 255, 38, 0.25);
  border-radius: 999px;
  background: rgba(194, 255, 38, 0.06);
  color: var(--td-lime);
  font-family: var(--td-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.td-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--td-lime);
  box-shadow: 0 0 12px var(--td-lime);
}

.td-h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.td-header--center .td-h2 {
  justify-content: center;
}

.td-lead {
  margin: 0;
  color: var(--td-muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
}

.td-mono-label {
  font-family: var(--td-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--td-lime);
}

/* buttons */
.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.td-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.td-btn:hover {
  transform: translateY(-1px);
}

.td-btn--primary {
  background: var(--td-lime);
  color: #021a16;
  box-shadow:
    0 0 0 1px rgba(194, 255, 38, 0.5),
    0 10px 40px -10px rgba(194, 255, 38, 0.7);
}

.td-btn--primary:hover {
  background: #d4ff63;
  box-shadow:
    0 0 0 1px rgba(194, 255, 38, 0.7),
    0 14px 48px -10px rgba(194, 255, 38, 0.9);
}

.td-btn--ghost {
  border: 1px solid var(--td-line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.td-btn--ghost:hover {
  border-color: rgba(194, 255, 38, 0.4);
  background: rgba(194, 255, 38, 0.06);
}

.td-btn svg {
  transition: transform 0.2s ease;
}

.td-btn:hover svg {
  transform: translateX(3px);
}

/* glass card with a cursor-following spotlight, position comes from --mx and --my set by useSpotlight */
.td-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.td-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(194, 255, 38, 0.12), transparent 45%);
  transition: opacity 0.3s ease;
}

.td-card:hover {
  border-color: rgba(194, 255, 38, 0.3);
}

.td-card:hover::before {
  opacity: 1;
}

.td-card > * {
  position: relative;
  z-index: 1;
}

.td-icon-tile {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(194, 255, 38, 0.25);
  border-radius: 12px;
  background: rgba(194, 255, 38, 0.07);
  color: var(--td-lime);
}

/* sections out of view hold their looping animations (usePauseOffscreen in shared.tsx), so an offscreen spinner or pulse never keeps the page drawing frames */
.td-offscreen *,
.td-offscreen *::before,
.td-offscreen *::after {
  animation-play-state: paused !important;
}

/* rotating conic beam around a frame, done with a spinning pseudo element since @property is ignored in shadow roots */
.td-beam-frame {
  position: relative;
  padding: 1px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--td-line-strong);
}

.td-beam-frame::before {
  content: '';
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 0deg, transparent 0deg 290deg, rgba(194, 255, 38, 0.15) 310deg, var(--td-lime) 350deg, transparent 360deg);
  animation: td-spin 7s linear infinite;
}

.td-beam-frame__inner {
  position: relative;
  border-radius: 17px;
  overflow: hidden;
  background: var(--td-bg);
}

.td-beam-frame__inner img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes td-spin {
  to {
    transform: rotate(1turn);
  }
}

/* scroll reveal toggled by useReveal */
/* reveals start just before content reaches the screen, a shorter fade and stagger delays at 40% of what components pass keep the order but stop content from waiting on screen */
.td-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--td-delay, 0ms) * 0.4);
}

.td-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .td-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .td-beam-frame::before {
    animation: none;
  }
}

/* large screens step the layout up instead of leaving a small column in the middle of a wide monitor,
   text measure stays capped by the header and lead max-widths, backgrounds were already full bleed */
@media (min-width: 1680px) {
  .td-container {
    max-width: 1360px;
  }

  .td-header {
    max-width: 840px;
  }

  .td-h2 {
    font-size: 3.9rem;
  }

  .td-lead {
    font-size: 1.35rem;
  }
}

@media (min-width: 1920px) {
  .td-container {
    max-width: 1440px;
  }

  .td-h2 {
    font-size: 4.2rem;
  }
}

/* `code` inside body copy, same mono and lime edge as the code pill */
.td-inline-code {
  padding: 0.1em 0.4em;
  border: 1px solid rgba(194, 255, 38, 0.25);
  border-radius: 6px;
  background: #031410;
  color: #fff;
  font-family: var(--td-mono);
  font-size: 0.85em;
  white-space: nowrap;
}

/* ~~word~~ in a title, crossed out with a hand-drawn red marker stroke */
.td-marker-strike {
  position: relative;
  display: inline-block;
  margin-right: 0.15em;
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
}

.td-marker-strike::after {
  content: '';
  position: absolute;
  left: -6%;
  right: -6%;
  top: 44%;
  height: 0.24em;
  border-radius: 0.3em 0.12em 0.35em 0.15em;
  background: #ff2e2e;
  box-shadow: 0 0 0.12em rgba(255, 46, 46, 0.45);
  transform: rotate(-4deg);
  pointer-events: none;
}

.td-hero {
  padding-top: clamp(120px, 14vw, 180px);
  padding-bottom: clamp(56px, 6vw, 88px);
}

.td-hero__bg {
  /* with the page level grainient on, the hero's own one fades out at the bottom so it blends into the fainter page one */
  -webkit-mask-image: var(--td-own-grain-mask, none);
  mask-image: var(--td-own-grain-mask, none);
  opacity: 0.85;
}

/* darkens the edges and the bottom so the next section starts on the base color */
.td-hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, transparent 0%, rgba(2, 26, 22, 0.55) 70%, rgba(2, 26, 22, 0.9) 100%),
    linear-gradient(to bottom, transparent 55%, var(--td-fade-bg, var(--td-bg)) 100%);
  /* with the page grainient on, the dark vignette fades out toward the bottom so the hero meets the next section at the same brightness instead of a hard line */
  -webkit-mask-image: var(--td-vignette-mask, none);
  mask-image: var(--td-vignette-mask, none);
}

.td-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.td-hero__title {
  margin: 28px 0 0;
  max-width: 1000px;
  color: #fff;
  font-size: clamp(2.6rem, 1.2rem + 5.4vw, 5.75rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.td-hero__accent {
  color: var(--td-lime);
  text-shadow: 0 0 40px rgba(194, 255, 38, 0.35);
}

.td-hero__body {
  max-width: 720px;
  margin-top: 28px;
}

.td-hero__actions {
  justify-content: center;
  margin-top: 36px;
}

.td-hero__shot {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin-top: clamp(56px, 7vw, 88px);
}

/* lime bloom under the product window */
.td-hero__glow {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 8%;
  bottom: -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(194, 255, 38, 0.28), rgba(33, 163, 0, 0.12) 55%, transparent 100%);
  filter: blur(40px);
}

.td-hero__window {
  background: #0b1210;
}

/* static rim light instead of the spinning beam, the product view stays still */
.td-hero__shot .td-beam-frame::before {
  animation: none;
}

/* flat stage with depth from layered shadows and a soft floor glow under the window */
.td-hero__shot.is-tilted .td-beam-frame {
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.85),
    0 90px 140px -60px rgba(33, 163, 0, 0.35);
}

.td-hero__floor {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -46px;
  z-index: -1;
  height: 90px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(194, 255, 38, 0.18), transparent 70%),
    radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent 100%);
  filter: blur(14px);
}

.td-hero__chrome {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--td-line);
  background: rgba(255, 255, 255, 0.03);
}

.td-hero__chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

/* headline block, its own stacking context so the background graph can sit under the text but over the grainient */
.td-hero__head {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* graph mode runs the execution backdrop faintly behind the headline, from the top of the hero down to the buttons and edge to edge
   two masks are unioned, the side columns run the full height and a band runs across the top above the eyebrow, so no node lands under the text */
.td-hero__graph-bg {
  --td-graph-sides: linear-gradient(
    to right,
    transparent 0%,
    #000 6%,
    #000 19%,
    transparent 31%,
    transparent 69%,
    #000 81%,
    #000 94%,
    transparent 100%
  );
  --td-graph-top: linear-gradient(to bottom, transparent 0%, #000 11%, #000 19%, transparent 28%);
  position: absolute;
  top: calc(clamp(120px, 14vw, 180px) * -1);
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.42;
  -webkit-mask-image: var(--td-graph-sides), var(--td-graph-top);
  mask-image: var(--td-graph-sides), var(--td-graph-top);
  mask-composite: add;
  animation: td-hero-graph-in 1.6s ease 0.4s both;
}

@keyframes td-hero-graph-in {
  from {
    opacity: 0;
  }
}

/* on small screens the headline fills the width so there are no side columns to show through,
   instead the whole graph sits faintly behind the text and the band above the eyebrow shows at full strength */
@media (max-width: 860px) {
  .td-hero__graph-bg {
    --td-graph-sides: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    --td-graph-top: linear-gradient(to bottom, transparent 0%, #000 8%, #000 16%, transparent 26%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-hero__graph-bg {
    animation: none;
  }
}

.td-hero__logos {
  width: 100%;
  margin-top: clamp(56px, 6vw, 80px);
}

/* large screens, the headline, body and product window grow with the wider container */
@media (min-width: 1680px) {
  .td-hero__title {
    max-width: 1120px;
    font-size: 6.5rem;
  }

  .td-hero__body {
    max-width: 800px;
  }

  .td-hero__shot {
    max-width: 1240px;
  }
}

@media (min-width: 1920px) {
  .td-hero__title {
    font-size: 7rem;
  }

  .td-hero__shot {
    max-width: 1320px;
  }
}

