/* MemU-Bench project page — light "mobile + memory timeline" look. Every class is prefixed mb-. */

:root {
  --bg: #f3f6fb;
  --bg-2: #eaf0f7;
  --surface: #ffffff;
  --ink: #1c2433;
  --ink-2: #3a4558;
  --muted: #667388;
  --line: #dfe6ef;
  --line-2: #cbd5e2;
  --teal: #11968b;
  --teal-ink: #0b6f67;
  --teal-soft: #dcf3ef;
  --violet: #7d70d8;
  --violet-ink: #5b4fb8;
  --violet-soft: #ece9fb;
  --amber-soft: #fff3d9;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 36, 51, 0.04), 0 8px 24px rgba(28, 36, 51, 0.06);
  --sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--teal-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.86em;
}

:not(pre) > code {
  background: var(--bg-2);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

.mb-skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.mb-skip:focus {
  left: 12px;
}

.mb-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.mb-small {
  font-size: 14px;
  color: var(--muted);
}

.mb-center {
  text-align: center;
}

/* ------------------------------------------------------------------ nav */
.mb-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 246, 251, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mb-nav-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.mb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.mb-nav nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.mb-nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 999px;
}
.mb-nav nav a:hover,
.mb-nav nav a.is-active {
  color: var(--ink);
  background: var(--surface);
}

.mb-nav-code {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ------------------------------------------------------------------ hero */
.mb-hero {
  padding: 64px 0 40px;
}

.mb-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
}

.mb-eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--teal-ink);
}

.mb-title {
  font-size: clamp(46px, 7vw, 76px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.mb-sub {
  margin: 14px 0 0;
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.3;
}

.mb-lede {
  margin: 22px 0 0;
  color: var(--ink-2);
  max-width: 560px;
}
.mb-lede em {
  font-style: normal;
  color: var(--violet-ink);
}

.mb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.mb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}
.mb-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.mb-btn--solid {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.mb-btn:hover {
  border-color: var(--teal);
}
.mb-btn--solid:hover {
  background: var(--teal-ink);
}

.mb-btn svg.mb-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.mb-btn--small {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
}

.mb-authors {
  margin: 18px 0 4px;
  max-width: 600px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.mb-authors sup,
.mb-affil sup {
  margin-left: 1px;
  color: var(--muted);
  font-size: 0.7em;
}
.mb-affil {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* hero visual */
.mb-hero-visual {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* hero device: a believable Android phone */
.mb-dev {
  --dev-sans: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  position: relative;
  width: 280px;
  height: 562px;
  padding: 7px;
  border-radius: 46px;
  background: linear-gradient(145deg, #3a4150 0%, #1e232d 45%, #2c323e 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08),
    0 2px 4px rgba(28, 36, 51, 0.08),
    0 24px 48px -12px rgba(28, 36, 51, 0.28);
}
/* side buttons: volume rocker and power key on the right edge */
.mb-dev::before,
.mb-dev::after {
  content: "";
  position: absolute;
  right: -2.5px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #2a303b;
}
.mb-dev::before {
  top: 118px;
  height: 62px;
}
.mb-dev::after {
  top: 200px;
  height: 36px;
}

.mb-dev-screen {
  position: relative;
  height: 100%;
  border-radius: 39px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f6f8fb;
  font-family: var(--dev-sans);
  color: #1b1f27;
}
.mb-dev-cam {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4356 0 18%, #0b0d12 40%);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.mb-dev-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 33px;
  padding: 4px 22px 0 24px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #1b1f27;
}
.mb-dev-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mb-dev-icons svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.mb-dev-pct {
  font-size: 11.5px;
  margin-left: 1px;
}
.mb-dev-icons svg.mb-dev-batt {
  width: 21px;
  height: 11px;
}

.mb-dev-appbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 10px 8px;
  background: #f6f8fb;
  border-bottom: 1px solid #e4e9f0;
}
.mb-dev-back,
.mb-dev-more {
  flex: none;
  width: 20px;
  height: 20px;
  color: #4a5262;
}
.mb-dev-back {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mb-dev-more {
  margin-left: auto;
  fill: currentColor;
}
.mb-dev-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--teal) 0%, var(--violet) 100%);
}
.mb-dev-avatar svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}
.mb-dev-who {
  display: grid;
  line-height: 1.2;
}
.mb-dev-who b {
  font-size: 15px;
  font-weight: 500;
}
.mb-dev-who small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #5f6878;
}
.mb-dev-who small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2fb36d;
}

.mb-dev-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
  overflow: hidden;
}
.mb-dev-day {
  align-self: center;
  font-size: 11px;
  font-weight: 500;
  color: #5f6878;
  background: #e9edf3;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 2px;
}
.mb-msg {
  margin: 0;
  max-width: 82%;
  padding: 8px 12px 6px;
  font-size: 13.5px;
  line-height: 1.38;
  letter-spacing: 0.005em;
}
.mb-msg time {
  display: block;
  margin-top: 2px;
  text-align: right;
  font-size: 10.5px;
  color: #6b7383;
}
.mb-msg--me {
  align-self: flex-end;
  background: var(--teal-soft);
  border-radius: 18px 18px 4px 18px;
}
.mb-msg--me + .mb-msg--me {
  border-top-right-radius: 6px;
}
.mb-msg--me mark {
  background: none;
  color: var(--violet-ink);
  border-bottom: 1.5px dashed var(--violet);
}
.mb-msg--bot {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e4e9f0;
  border-radius: 18px 18px 18px 4px;
  color: #2a3140;
}

.mb-dev-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px;
}
.mb-dev-field {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 12px 0 16px;
  border-radius: 999px;
  background: #e9edf3;
  font-size: 14px;
  color: #7a8292;
}
.mb-dev-field svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #4a5262;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.mb-dev-send {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
}
.mb-dev-send svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  margin-left: 2px;
}
.mb-dev-gesture {
  align-self: center;
  width: 104px;
  height: 4px;
  margin: 6px 0 9px;
  border-radius: 2px;
  background: #1b1f27;
  opacity: 0.75;
}

/* hero history film strip */
.mb-hfilm {
  margin-top: 22px;
  padding: 10px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 100%;
}
.mb-hfilm-head {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.mb-hfilm-head b {
  font-weight: 600;
  color: var(--ink);
}
.mb-hfilm-row {
  list-style: none;
  margin: 0;
  padding: 7px 0;
  display: flex;
  gap: 10px;
  /* sprocket holes above and below the frames */
  background:
    repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 11px) top / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 11px) bottom / 100% 3px no-repeat;
}
.mb-hfilm-row li {
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 46px;
  flex: none;
}
.mb-hfilm-row img {
  display: block;
  width: 46px;
  height: 100px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  margin-bottom: 4px;
}
.mb-hfilm-row li.is-key img {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px var(--violet-soft), 0 0 0 3px var(--violet);
}
.mb-hfilm-row span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.2;
}
.mb-hfilm-row time {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.mb-hfilm-row li.is-key span {
  color: var(--violet-ink);
}
.mb-hfilm-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.mb-hfilm-key i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 2px solid var(--violet);
}

/* facts */
.mb-facts {
  margin: 52px 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.mb-facts div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.mb-facts dt {
  font-size: 30px;
  font-weight: 600;
  color: var(--teal-ink);
  line-height: 1.1;
}
.mb-facts div:nth-child(2) dt,
.mb-facts div:nth-child(3) dt {
  color: var(--violet-ink);
}
.mb-facts dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}
.mb-facts-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ sections */
.mb-section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.mb-section--last {
  padding-bottom: 80px;
}

.mb-kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--teal-ink);
}

.mb-section h2 {
  font-size: clamp(27px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 820px;
}

.mb-intro {
  margin: 14px 0 0;
  color: var(--ink-2);
  max-width: 800px;
}

/* ------------------------------------------------------------------ task explorer */
.mb-explorer {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.mb-tasklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mb-tasklist button {
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.mb-tasklist button b {
  font-weight: 500;
  font-size: 15px;
}
.mb-tasklist button small {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.mb-tasklist button .mb-ticon {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
}
.mb-tasklist button[aria-selected="true"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.mb-tasklist button[aria-selected="true"] .mb-ticon {
  background: var(--teal);
  color: #fff;
}

.mb-taskcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}

.mb-taskmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.mb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.mb-chip--teal {
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.mb-chip--violet {
  background: var(--violet-soft);
  color: var(--violet-ink);
}

.mb-goalrow {
  display: grid;
  gap: 6px;
}
.mb-goaltag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--violet-ink);
}
.mb-goaltag--full {
  color: var(--teal-ink);
}
.mb-goal {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
}
.mb-goal--full {
  font-size: 17px;
  color: var(--ink-2);
}
.mb-goal .mb-a {
  color: var(--violet-ink);
  background: var(--violet-soft);
  border-radius: 6px;
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.mb-goal .mb-r {
  color: var(--teal-ink);
  background: var(--teal-soft);
  border-radius: 6px;
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.mb-gap {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin: 14px 0;
  align-items: stretch;
}
.mb-gap-line {
  justify-self: center;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--line-2) 0 4px, transparent 4px 8px);
  border-radius: 2px;
  min-height: 44px;
}
.mb-gap-text {
  font-size: 15px;
  color: var(--muted);
  align-self: center;
}
.mb-gap-text b {
  font-weight: 500;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ animated figure */
.mb-section--figure {
  background: linear-gradient(180deg, var(--bg) 0%, #eef3f9 100%);
}

.mb-fig {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.mb-fig-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mb-play {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mb-play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.mb-play .mb-i-play {
  display: none;
}
.mb-fig.is-paused .mb-play .mb-i-play {
  display: block;
}
.mb-fig.is-paused .mb-play .mb-i-pause {
  display: none;
}

.mb-tabs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
}
.mb-tabs button {
  position: relative;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 6px 10px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mb-tabs button span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--line-2);
  margin-right: 3px;
}
.mb-tabs button i {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
}
.mb-tabs button[aria-selected="true"] {
  background: var(--bg);
  color: var(--ink);
}
.mb-tabs button[aria-selected="true"] span {
  color: var(--teal);
}
.mb-tabs button.is-done i {
  transform: scaleX(1);
  background: var(--line-2);
}

.mb-caption {
  margin: 14px 0 18px;
  min-height: 3.1em;
  color: var(--ink-2);
  font-size: 16px;
}

.mb-stage {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "phone film film"
    "phone ret  mem"
    "phone eval eval";
  grid-template-rows: auto auto 1fr;
  gap: 18px 22px;
}

.mb-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
}
.mb-wire {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.75;
  transition: stroke-dashoffset 0.9s ease;
}
.mb-wire-dot {
  fill: var(--teal);
}

.mb-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid #e6ebf2;
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(28, 36, 51, 0.03), 0 6px 18px rgba(28, 36, 51, 0.04);
  min-width: 0;
  align-self: start;
}

.mb-panel-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 12px;
  font-size: 15px;
}
.mb-panel-head b {
  font-weight: 600;
}
.mb-tr-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.mb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.mb-dot--teal {
  background: var(--teal);
}
.mb-dot--violet {
  background: var(--violet);
}

.mb-p-film {
  grid-area: film;
}
.mb-p-phone {
  grid-area: phone;
  align-self: start;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.mb-p-mem {
  grid-area: mem;
}
.mb-p-ret {
  grid-area: ret;
}
.mb-p-eval {
  grid-area: eval;
}

/* step visibility: nothing shows before its step */
.js .mb-fig:not(.is-static) [data-step] {
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0s linear 0.45s;
}
.js .mb-fig:not(.is-static) [data-step]:not(.is-on) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
}
.js .mb-fig:not(.is-static) [data-step].is-on {
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0s;
}
.js .mb-fig:not(.is-static) .mb-frame[data-step].is-on {
  transition-delay: calc(var(--i) * 120ms);
}
.js .mb-fig:not(.is-static) .mb-window.is-on {
  transition:
    left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.45s ease,
    visibility 0s;
}
.mb-fig.is-instant *,
.mb-fig.is-instant *::before,
.mb-fig.is-instant *::after {
  transition: none !important;
  animation: none !important;
}

/* filmstrip */
.mb-film {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}
.mb-frame {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 4px;
  justify-items: start;
}
.mb-tr-shot {
  grid-column: 1 / -1;
  justify-self: center;
  display: block;
  width: 52px;
  height: 126px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 1px solid #dfe5ee;
  background: #eef2f7;
  margin-bottom: 5px;
}
.mb-tr-home {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #dff3ef 0%, #ebe7fb 60%, #f5f7fb 100%);
}
.mb-tr-home > span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px 4px;
  justify-items: center;
}
.mb-tr-home img {
  display: block;
  width: 9px;
  height: 9px;
}
.mb-tr-foot {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.mb-fapp {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
.mb-fact {
  font-size: 10.5px;
  color: var(--violet-ink);
  background: var(--violet-soft);
  border-radius: 4px;
  padding: 0 4px;
  justify-self: end;
}
.mb-ftime {
  grid-column: 1 / -1;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* thumbnails: tiny flat app screens */

.mb-window {
  position: absolute;
  border: 2px solid var(--teal);
  border-radius: 14px;
  background: rgba(17, 150, 139, 0.05);
  pointer-events: none;
  transition:
    left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.45s ease,
    visibility 0s;
}
.mb-window-tag {
  position: absolute;
  top: -11px;
  left: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 999px;
}

/* figure phone */

.mb-amb {
  color: var(--violet-ink);
  border-bottom: 1.5px dashed transparent;
  transition:
    border-color 0.4s ease,
    background 0.4s ease;
}
.js .mb-fig:not(.is-static) .mb-amb[data-step]:not(.is-on) {
  opacity: 1;
  visibility: visible;
  transform: none;
  color: inherit;
}
.mb-amb.is-on {
  border-bottom-color: var(--violet);
  background: var(--violet-soft);
}
.mb-amb.is-done {
  display: none;
}
.mb-resolved {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 500;
  line-height: 1.5;
}
.mb-resolved.is-on {
  animation: mb-pop 0.45s ease-out;
}
@keyframes mb-pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  70% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
.js .mb-fig:not(.is-static) .mb-resolved:not(.is-on) {
  display: none;
}

.mb-tap {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: rgba(125, 112, 216, 0.28);
  border: 2px solid var(--violet);
  pointer-events: none;
  opacity: 0;
  z-index: 4;
}
.mb-tap.is-tapping {
  animation: mb-tap 0.7s ease-out;
}
@keyframes mb-tap {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.mb-think {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 236px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--violet-ink);
  background: var(--violet-soft);
  border-radius: 14px;
  padding: 9px 12px;
}
.mb-q {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
}
.mb-actpill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 236px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.mb-tr-stepno {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--teal-ink);
  font-variant-numeric: tabular-nums;
}
.mb-actpill code {
  background: none !important;
  padding: 0 !important;
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* figure device: same frame as the hero phone, sized for the stage */
.mb-dev.mb-tr-dev {
  width: 232px;
  height: 548px;
  padding: 6px;
  border-radius: 40px;
}
.mb-tr-dev::before {
  top: 104px;
  height: 56px;
}
.mb-tr-dev::after {
  top: 176px;
  height: 32px;
}
.mb-tr-dev .mb-dev-screen {
  border-radius: 34px;
  background: linear-gradient(170deg, #def2ee 0%, #e9e6fa 52%, #f4f6fb 100%);
}
.mb-tr-dev .mb-dev-status {
  padding: 4px 18px 0 20px;
  font-size: 11.5px;
}
.mb-tr-dev .mb-dev-icons svg {
  width: 11px;
  height: 11px;
}
.mb-tr-dev .mb-dev-icons svg.mb-dev-batt {
  width: 19px;
  height: 10px;
}
.mb-tr-dev .mb-dev-pct {
  font-size: 10.5px;
}
.mb-tr-home-scr {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 4px;
}
.mb-tr-card {
  padding: 10px 12px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(28, 36, 51, 0.06), 0 6px 16px rgba(28, 36, 51, 0.08);
  font-size: 12px;
  line-height: 1.45;
  color: #1b1f27;
}
.mb-tr-card p {
  margin: 6px 0 0;
}
.mb-tr-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mb-tr-card-head .mb-dev-avatar {
  width: 20px;
  height: 20px;
}
.mb-tr-card-head .mb-dev-avatar svg {
  width: 12px;
  height: 12px;
}
.mb-tr-card-head b {
  font-size: 12px;
  font-weight: 500;
}
.mb-tr-card-head small {
  margin-left: auto;
  font-size: 10.5px;
  color: #6b7383;
}
.mb-tr-icons {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 4px;
}
.mb-tr-icons span {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 10px;
  color: #2a3140;
}
.mb-tr-icons img {
  display: block;
  width: 40px;
  height: 40px;
}
.mb-tr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 2px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  color: #6b7383;
}
.mb-tr-search svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #4a5262;
  stroke-width: 2;
  stroke-linecap: round;
}
.mb-tr-app {
  position: absolute;
  inset: 0;
  z-index: 7; /* above our punch-hole: the screenshot carries its own camera cut-out and status bar */
  display: none;
  background: #f6f8fb;
}
.mb-tr-app.is-shown {
  display: block;
}
.mb-tr-app img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.mb-tr-toast {
  position: absolute;
  left: 50%;
  top: 64%;
  translate: -50% 0;
  padding: 7px 14px;
  border-radius: 10px;
  background: #2b313d;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.mb-tr-dev .mb-dev-cam {
  z-index: 5;
}
.mb-tr-dev .mb-tap {
  z-index: 8;
}

/* the think bubble and the action pill share one slot */
.mb-slot {
  display: grid;
  width: 236px;
  margin-top: 4px;
}
.mb-slot > * {
  grid-area: 1 / 1;
  align-self: start;
}

/* memory cards */
.mb-mems {
  display: grid;
  gap: 10px;
}
.mb-mem {
  border: 1px solid #e9eef4;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fafbfd;
  font-size: 13.5px;
  line-height: 1.45;
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}
.mb-mem header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.mb-mem header img,
.mb-appchips img {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
}
.mb-mem p {
  margin: 0;
  color: var(--ink-2);
}
.mb-mem small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.mb-app {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.mb-state {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8a5a00;
  transition: background 0.4s ease;
}
.mb-state.is-fin {
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.mb-merged {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--violet-ink);
}
.mb-mem--key.is-picked {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

/* retrieval */
.mb-rsteps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: r;
}
.mb-rsteps li {
  counter-increment: r;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 3px 10px;
  font-size: 13.5px;
  line-height: 1.45;
}
.mb-rsteps li::before {
  content: counter(r);
  grid-row: span 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-ink);
  font-size: 11.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.mb-rname {
  font-weight: 600;
  font-size: 13.5px;
}
.mb-rbody {
  color: var(--ink-2);
}
.mb-appchips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.mb-appchips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 2px 9px 2px 3px;
  border-radius: 999px;
  background: #f0f3f7;
  color: var(--ink-2);
  transition:
    background 0.4s ease,
    color 0.4s ease;
}
.mb-appchips span.mb-keyapp.is-key {
  background: var(--teal);
  color: #fff;
}
.mb-quote {
  font-style: italic;
}
.mb-ok {
  display: inline-block;
  margin-right: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-ink);
  font-weight: 600;
  font-size: 12px;
}

/* evaluation */
.mb-evalgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.mb-evlabel {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.mb-checks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 13.5px;
}
.mb-tick {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-ink);
  font-size: 10px;
  margin-right: 4px;
}
.mb-sr,
.mb-spl {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
}
.mb-bar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 5px;
}
.mb-bar span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.mb-bar i {
  display: block;
  height: 12px;
  border-radius: 6px;
  width: calc(var(--w) / 19 * 100%);
  background: var(--line-2);
}
.mb-bar--agent i {
  background: var(--violet);
}
.mb-bar b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
}

/* ------------------------------------------------------------------ AppMem cards */
.mb-two {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.mb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}
.mb-card h3 {
  font-size: 21px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mb-card p {
  color: var(--ink-2);
  margin: 12px 0 0;
}
.mb-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-ink);
  font-size: 15px;
  display: grid;
  place-items: center;
}
.mb-ops {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.mb-ops li {
  font-size: 15.5px;
  color: var(--ink-2);
  padding-left: 14px;
  border-left: 2px solid var(--violet-soft);
}
.mb-ops b {
  color: var(--ink);
  font-weight: 500;
}
.mb-schema {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #f6f8fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mb-schema span {
  color: var(--teal-ink);
}
.mb-schema em {
  font-style: normal;
  color: var(--muted);
}
.mb-loop {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: l;
  display: grid;
  gap: 8px;
}
.mb-loop li {
  counter-increment: l;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0 10px;
  font-size: 15.5px;
}
.mb-loop li::before {
  content: counter(l);
  grid-row: span 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  color: var(--teal-ink);
  font-family: var(--mono);
  font-size: 12px;
  display: grid;
  place-items: center;
}
.mb-loop b {
  font-weight: 500;
}
.mb-loop span {
  color: var(--muted);
  font-size: 14.5px;
}

.mb-figure {
  margin: 36px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.mb-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.mb-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------------------------------------------ benchmark */
.mb-three {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.mb-mini {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.mb-mini h3 {
  font-size: 18px;
  font-weight: 600;
}
.mb-mini p {
  margin: 8px 0 0;
  font-size: 15.5px;
  color: var(--ink-2);
}
.mb-mini p.mb-small {
  font-size: 13px;
  color: var(--muted);
}
.mb-split {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}
.mb-split span {
  flex: var(--n);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-ink);
  white-space: nowrap;
}
.mb-split span + span {
  background: var(--violet-soft);
  color: var(--violet-ink);
}

.mb-apps {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.mb-apps-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}
.mb-apps-head h3 {
  font-size: 18px;
  font-weight: 600;
}
.mb-apps-head p {
  margin: 0;
}
.mb-appbars {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}
.mb-appbars li {
  break-inside: avoid;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  font-size: 14px;
}
.mb-appbars li span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mb-appbars li i {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--teal), #49b8ad);
  width: calc(var(--n) / 22 * 100%);
  min-width: 4px;
}
.mb-appbars li b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  text-align: right;
}

/* ------------------------------------------------------------------ metrics */
.mb-metrics {
  margin: 32px 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.mb-metrics article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.mb-mtag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.mb-metrics article:nth-child(2) .mb-mtag {
  background: var(--violet-soft);
  color: var(--violet-ink);
}
.mb-metrics article:nth-child(3) .mb-mtag {
  background: var(--bg-2);
  color: var(--ink-2);
}
.mb-metrics h3 {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
}
.mb-metrics p {
  margin: 8px 0 0;
  font-size: 15.5px;
  color: var(--ink-2);
}
.mb-formula {
  display: block;
  margin-top: 14px;
  padding: 8px 10px !important;
  font-size: 13px;
  border-radius: 10px !important;
}

/* ------------------------------------------------------------------ quick start */
.mb-run {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.mb-run li {
  counter-increment: s;
  position: relative;
  padding-left: 44px;
}
.mb-run li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  display: grid;
  place-items: center;
  color: var(--teal-ink);
}
.mb-run li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 34px;
  bottom: -12px;
  width: 1px;
  background: var(--line-2);
}
.mb-run h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
}
.mb-run h3 span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}
.mb-run pre,
.mb-plug pre {
  margin: 8px 0 0;
  padding: 12px 16px;
  background: #1f2737;
  color: #e5ebf5;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
}
.mb-run pre code,
.mb-plug pre code {
  font-size: inherit;
}

.mb-plug {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.mb-plug h3 {
  font-size: 19px;
  font-weight: 600;
}
.mb-plug p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
}
.mb-plug pre {
  margin: 0;
}

/* ------------------------------------------------------------------ results */
.mb-headline {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.mb-headline div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.mb-headline b {
  display: block;
  font-size: 26px;
  font-weight: 600;
  color: var(--teal-ink);
  line-height: 1.15;
}
.mb-headline div:nth-child(-n + 2) b {
  color: var(--violet-ink);
}
.mb-headline span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}

.mb-results {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 14px;
  box-shadow: var(--shadow);
}
.mb-res-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.mb-res-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  flex: 1 1 260px;
}
.mb-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.mb-seg button {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 9px;
  cursor: pointer;
}
.mb-seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 36, 51, 0.1);
}

.mb-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.mb-table th,
.mb-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.mb-table thead th {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
}
.mb-table thead th.is-ours {
  color: var(--teal-ink);
}
.mb-table tbody th {
  font-weight: 500;
}
.mb-table tr.mb-group th {
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--violet-ink);
  border-bottom: 0;
}
.mb-table td.is-ours {
  background: rgba(17, 150, 139, 0.04);
}
.mb-table--bars td {
  width: 27%;
}
.mb-cell {
  display: grid;
  grid-template-columns: auto auto minmax(40px, 1fr);
  align-items: center;
  gap: 6px;
}
.mb-cell i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line-2);
  width: calc(var(--w) * 100%);
  min-width: 2px;
}
.mb-table td.is-ours .mb-cell i {
  background: var(--teal);
}
.mb-table td:nth-child(3) .mb-cell i {
  background: var(--violet);
  opacity: 0.6;
}
.mb-v {
  font-family: var(--mono);
  font-size: 12.5px;
  min-width: 32px;
  text-align: right;
}
.mb-v.is-best,
.mb-table--full td.is-best {
  font-weight: 600;
  color: var(--ink);
}
.mb-cell small {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--teal-ink);
  min-width: 36px;
}
.mb-table--full td {
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: right;
  color: var(--ink-2);
}
.mb-table--full thead th:not(:first-child) {
  text-align: right;
}
.mb-table--full tr:not(.mb-first):not(.mb-group) th,
.mb-table--full tr:not(.mb-first):not(.mb-group) td {
  border-top: 0;
}
.mb-table--full tr.is-ours td {
  background: rgba(17, 150, 139, 0.04);
}
.mb-sub-row {
  padding-left: 14px;
  color: var(--muted);
  font-weight: 400;
}
.mb-table--full tr.is-ours .mb-sub-row {
  color: var(--teal-ink);
  font-weight: 500;
}
.mb-table--small td {
  font-family: var(--mono);
  font-size: 12.5px;
}
.mb-table--small tr.is-ours th {
  color: var(--teal-ink);
}
.mb-table--small td b {
  font-weight: 600;
}
.mb-muted {
  color: var(--muted);
  font-weight: 400;
}

.mb-findings {
  margin: 20px 0 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.mb-findings .mb-card h3 {
  font-size: 18px;
}
.mb-findings .mb-card > p {
  font-size: 15px;
}
.mb-findings .mb-tablewrap {
  margin-top: 12px;
}

.mb-cats {
  margin-top: 18px;
}
.mb-cats .mb-small {
  margin: 0 0 6px;
}
.mb-catbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mb-catbar span {
  flex: var(--n) 1 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.mb-catbar span:nth-child(2) {
  background: var(--violet-soft);
  color: var(--violet-ink);
}
.mb-catbar span:nth-child(3),
.mb-catbar span:nth-child(5) {
  background: var(--bg-2);
  color: var(--ink-2);
}
.mb-catbar span:nth-child(4) {
  background: var(--amber-soft);
  color: #8a5a00;
}
.mb-catbar b {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
}

/* ------------------------------------------------------------------ cite + footer */
.mb-cite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mb-copy {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.mb-copy:hover {
  border-color: var(--teal);
}
.mb-copy.is-done {
  border-color: var(--teal);
  color: var(--teal-ink);
}
.mb-bib {
  margin: 16px 0 0;
  padding: 16px 18px;
  background: #1f2737;
  color: #e5ebf5;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mb-bib code {
  font-size: inherit;
}

.mb-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  font-size: 14px;
  color: var(--muted);
}
.mb-footer .mb-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .mb-nav nav a:nth-child(n + 5) {
    display: none;
  }
}

@media (max-width: 980px) {
  .mb-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .mb-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mb-explorer {
    grid-template-columns: minmax(0, 1fr);
  }
  .mb-tasklist {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .mb-tasklist button {
    flex: none;
    width: 220px;
  }
  .mb-two,
  .mb-three,
  .mb-metrics,
  .mb-plug,
  .mb-findings {
    grid-template-columns: minmax(0, 1fr);
  }
  .mb-headline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mb-appbars {
    columns: 1;
  }

  /* figure: one phase at a time */
  .mb-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "film"
      "phone"
      "mem"
      "ret"
      "eval";
    grid-template-rows: auto;
  }
  .mb-fig:not(.is-static) .mb-stage[data-phase="0"] .mb-panel:not([data-show~="0"]),
  .mb-fig:not(.is-static) .mb-stage[data-phase="1"] .mb-panel:not([data-show~="1"]),
  .mb-fig:not(.is-static) .mb-stage[data-phase="2"] .mb-panel:not([data-show~="2"]),
  .mb-fig:not(.is-static) .mb-stage[data-phase="3"] .mb-panel:not([data-show~="3"]),
  .mb-fig:not(.is-static) .mb-stage[data-phase="4"] .mb-panel:not([data-show~="4"]),
  .mb-fig:not(.is-static) .mb-stage[data-phase="5"] .mb-panel:not([data-show~="5"]) {
    display: none;
  }
  .mb-film {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 16px;
  }
  .mb-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mb-tabs button {
    font-size: 13px;
  }
  .mb-evalgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mb-wires {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .mb-wrap,
  .mb-fig,
  .mb-nav-in {
    padding-left: 16px;
    padding-right: 16px;
  }
  .mb-nav nav {
    display: none;
  }
  .mb-nav-code {
    margin-left: auto;
  }
  .mb-hero {
    padding-top: 40px;
  }
  .mb-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mb-facts div:first-child {
    grid-column: 1 / -1;
  }
  .mb-section {
    padding: 52px 0;
  }
  .mb-taskcard,
  .mb-card {
    padding: 18px;
  }
  .mb-goal {
    font-size: 18px;
  }

  .mb-frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .mb-fact {
    justify-self: start;
  }
  .mb-appbars li {
    grid-template-columns: 112px minmax(0, 1fr) 24px;
  }
  .mb-fig-controls {
    align-items: flex-start;
  }
  .mb-headline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mb-results {
    padding: 14px 12px 10px;
  }
  .mb-table th,
  .mb-table td {
    padding: 6px 6px;
  }
  .mb-table--bars td {
    width: auto;
  }
  .mb-cell {
    grid-template-columns: auto auto;
    gap: 4px;
  }
  .mb-cell i {
    display: none;
  }
  .mb-table--bars tbody th {
    white-space: normal;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ------------------------------- Wordmark --------------------------------- */
.mb-wordmark {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 0 14px;
}

.mb-brand-img {
  display: block;
  width: auto;
  height: 26px;
}

/* --------------------------- Related benchmark ---------------------------- */
.mb-related {
  padding: 26px 28px;
  border: 1px solid var(--line, #dfe6ee);
  border-radius: 18px;
  background: #fff;
}
.mb-related-tag {
  margin: 0 0 6px;
  color: #129c93;
  font: 500 12px/1.4 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mb-related h2 {
  margin: 0 0 10px;
  font-size: clamp(19px, 2.2vw, 24px);
}
.mb-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 0;
  font-weight: 600;
}

/* ------------- hero visual: compact phone + overlapping history strip ------------- */
.mb-hero-visual .mb-dev {
  zoom: 0.8;
}
.mb-hero-visual .mb-hfilm {
  position: relative;
  z-index: 2;
  margin-top: -14px;
  padding: 8px 12px 10px;
}
.mb-hero-visual .mb-hfilm-row {
  gap: 8px;
}
.mb-hero-visual .mb-hfilm-row li {
  width: 40px;
}
.mb-hero-visual .mb-hfilm-row img {
  width: 40px;
  height: 86px;
}
.mb-hero-visual .mb-hfilm-row span {
  font-size: 11px;
}

/* hero visual, round 3: phone + upright history card side by side (nothing overlaps) */
@media (min-width: 981px) {
  .mb-hero-visual {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
  }
  .mb-hero-visual .mb-dev {
    zoom: 0.8;
    flex: none;
  }
  .mb-hero-visual .mb-hfilm {
    margin: 0;
    padding: 12px 12px 10px;
    width: 146px;
    flex: none;
  }
  .mb-hero-visual .mb-hfilm-head {
    display: block;
    line-height: 1.3;
  }
  .mb-hero-visual .mb-hfilm-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
    padding: 10px 0 8px;
    background: none;
    border-top: 1px dashed var(--line-2);
    border-bottom: 1px dashed var(--line-2);
    margin: 8px 0;
  }
  .mb-hero-visual .mb-hfilm-row li {
    width: auto;
  }
  .mb-hero-visual .mb-hfilm-row img {
    width: 48px;
    height: 88px;
  }
  .mb-hero-visual .mb-hfilm-key {
    line-height: 1.35;
  }
}

/* hand-off cue in the method figure (replaces connector lines) */
.mb-ping {
  animation: mb-ping 1.1s ease-out;
}
@keyframes mb-ping {
  0% { box-shadow: 0 0 0 0 rgb(18 156 147 / 0.45); }
  100% { box-shadow: 0 0 0 14px rgb(18 156 147 / 0); }
}

/* retrieval + memory cards share a row: equal heights */
.mb-p-ret,
.mb-p-mem {
  align-self: stretch;
}

/* sliding window, restyled: no outline box. A soft tint behind the frames in the
   window, frames outside it fade, and a slim labelled bar underneath. */
.mb-window {
  border: 0;
  border-radius: 12px;
  background: rgba(17, 150, 139, 0.07);
}
.mb-window::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -7px;
  height: 3px;
  border-radius: 3px;
  background: var(--teal);
}
.mb-window-tag {
  top: auto;
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 8px;
  background: var(--surface);
  color: var(--teal-ink, #0e7a72);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.mb-film.mb-has-win .mb-frame {
  transition: opacity 0.5s ease;
}
.mb-film.mb-has-win .mb-frame:not(.mb-win-in) {
  opacity: 0.38;
}

/* window label: small pill on the window's top edge (clear of the caption below) */
.mb-window-tag {
  top: -9px;
  bottom: auto;
  left: auto;
  right: 12px;
  transform: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
}

/* metric formulas typeset with MathML */
.mb-formula {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 74px;
  overflow-x: auto;
}
.mb-eq {
  margin: 0;
  font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", "Times New Roman", serif;
  font-size: 19px;
  color: var(--ink);
}

/* formulas sit on a shared baseline at the bottom of each metric card */
.mb-metrics article {
  display: flex;
  flex-direction: column;
}
.mb-metrics .mb-formula {
  margin-top: auto;
}
