/* Fully local motion layer. Original page CSS chunks remain the base layer. */

/* Native scrollbars and form controls follow the active theme. */
html { color-scheme: dark; }
html.light { color-scheme: light; }
/* Hide the document scrollbar; wheel/touch scrolling still works. */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar { width: 0; height: 0; }
body { transition: background-color 320ms ease, color 320ms ease; }

/* Safety net: some SSR containers (e.g. the header bar) scope themselves to
   dark with their own `.dark` class, and `:where(.dark)` re-declares the dark
   palette on them even when html is light. local-effects.js keeps the class in
   sync at runtime; this rule covers the pre-JS paint with the light palette. */
html.light .dark:not(body) {
  --color-background: #fff;
  --color-background-pink: #fef5fb;
  --color-primary-2: #00000005;
  --color-primary-4: #0000000a;
  --color-primary-12: #0000001f;
  --color-primary-44: #00000070;
  --color-primary-60: #0009;
  --color-primary-80: #000c;
  --color-primary-100: #000;
  --color-primary-nav: #ffffff70;
  --color-primary-inactive: #ffffff70;
  --color-primary-solid-4: #f5f5f5;
  --color-primary-solid-12: #e0e0e0;
  --color-primary-solid-44: #8f8f8f;
  --color-primary-solid-60: #666;
  --color-primary-solid-80: #333;
  --color-primary-solid-100: #000;
  --color-primary-solid-nav: #707070;
  --color-primary-solid-inactive: #707070;
  --color-secondary-4: #ffffff0a;
  --color-secondary-12: #ffffff1f;
  --color-secondary-44: #ffffff70;
  --color-secondary-60: #fff9;
  --color-secondary-80: #fffc;
  --color-secondary-100: #fff;
  --color-secondary-solid-4: #0a0a0a;
  --color-secondary-solid-12: #1f1f1f;
  --color-secondary-solid-44: #707070;
  --color-secondary-solid-60: #999;
  --color-secondary-solid-80: #ccc;
  --color-secondary-solid-100: #fff;
  --color-tertiary-60: #f1f1f1ad;
  --color-tertiary-80: #f1f1f1cc;
  --color-tertiary-100: #f1f1f1;
  --color-tertiary-hint: #ffffff70;
  --color-tertiary-solid-60: #a4a4a4;
  --color-tertiary-solid-80: #c1c1c1;
  --color-tertiary-solid-100: #f1f1f1;
  --color-tertiary-solid-hint: #707070;
  --color-hue-red: #f53255;
  --color-hue-lime: #9dca1c;
  --color-hue-magenta: #eb56c5;
  --color-hue-blue: #29bdfd;
  --color-hue-yellow: #ffaf00;
  --color-supply-accent-color: #00f;
  --color-syntax-copy: #000;
  --color-syntax-comment: #00000070;
  --color-syntax-highlight: #0000000a;
  --color-syntax-error: #f22f4d;
  --color-gray-200: #e1e3e8;
}

/* The particle Earth is full-bleed, so the SSR reservation for the fixed
   header (112px) and the article's 40px top offset are dropped. #top now
   anchors at document y=0 and pulling up at the top reveals no empty band.
   Only padding-top is overridden so --page-top-space stays intact for other
   consumers; anchor targets keep their own --header-h clearance. */
[class~="pt-(--page-top-space)"] { padding-top: 0 !important; }
article:has(> #top) { margin-top: 0 !important; }

/* Local Geobyte wordmark replaces the source site's SVG brand mark. */
.local-geobyte-wordmark {
  color: currentColor;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.075em;
  line-height: 1;
}


.local-particle-hero {
  position: relative !important;
  overflow: hidden !important;
  background: var(--color-background, #000) !important;
  min-height: max(100svh, 640px) !important;
}

.local-particle-hero > .AstraHero-module___Ja0lG__layout {
  position: relative !important;
  isolation: isolate;
  min-height: max(100svh, 640px) !important;
  overflow: hidden;
  background: var(--color-background, #000);
  transition: background-color 320ms ease;
}

.local-particle-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  outline: none;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}
.local-particle-host.is-dragging { cursor: grabbing; }
.local-particle-host:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-color: var(--color-primary-100, rgba(255,255,255,.7)); outline-offset: -8px; }
.local-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 2;
}

/* The live GEO / BYTE chrome is rendered locally because the fallback labels
   live in noscript. */
.local-particle-hero .AstraHero-module___Ja0lG__fixedChrome { display: none !important; }
.local-hero-chrome {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  color: var(--color-primary-100, #fafafa);
}
.local-hero-label {
  position: absolute;
  top: 50%;
  margin: 0;
  color: var(--color-primary-100, #fafafa);
  font-size: clamp(3rem, 7.3vw, 8.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.055em;
  text-shadow: 0 0 1.5rem rgba(250,250,250,.08);
  user-select: none;
  transform: translateY(-50%);
  opacity: var(--astra-copy-opacity, 1);
  transition: opacity 800ms cubic-bezier(.22,1,.36,1), transform 800ms cubic-bezier(.22,1,.36,1);
}
.local-hero-label-left { left: clamp(1.25rem, 4vw, 3.5rem); }
.local-hero-label-right { right: clamp(1.25rem, 4vw, 3.5rem); }
html.light .local-hero-label { text-shadow: 0 0 1.5rem rgba(20,30,60,.10); }
.local-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  color: var(--color-primary-60, rgba(250,250,250,.58));
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  transform: translateX(-50%);
  opacity: var(--astra-copy-opacity, 1);
  animation: local-scroll-pulse 2.4s cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes local-scroll-pulse {
  0%,100% { transform: translate(-50%,0); opacity: .45; }
  50% { transform: translate(-50%,7px); opacity: .9; }
}
.local-particle-hero .AstraHero-module___Ja0lG__layout > h1,
.local-particle-hero .AstraHero-module___Ja0lG__layout > p { position: absolute; z-index: 5; }
.local-particle-hero .local-particle-host { z-index: 2; }
.local-particle-hero .local-hero-chrome { z-index: 5; }

/* The static SSR header uses the source site's drawer geometry. These local
   states make the rebranded drawer work without the removed runtime. */
#mobileNav { visibility: hidden; pointer-events: none; }
#mobileNav.open { visibility: visible; pointer-events: auto; clip-path: inset(0 0 0 0) !important; }
#mobileNav.open a { pointer-events: auto; }
.local-mobile-theme-row { padding-block: .4rem; }
.local-mobile-theme-row .local-theme-btn { margin-inline-start: -.5rem; }


/* Offline poster is used only as a very subtle fallback below the canvas. */
.local-poster-underlay { display: none !important; }

/* Native reveal rhythm used by the local fallback layer. */
.local-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms cubic-bezier(.22,1,.36,1), transform 800ms cubic-bezier(.22,1,.36,1);
}
.local-reveal.local-visible { opacity: 1; transform: none; }

/* Restored panels for the scraped pill-tab bars. */
.local-tab-panel {
  max-width: 46rem;
  margin: .4rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
  color: var(--color-primary-60, rgba(250,250,250,.6));
  font-size: .92rem;
  line-height: 1.65;
}
.local-tab-swap { animation: local-tab-fade 360ms cubic-bezier(.22,1,.36,1); }
@keyframes local-tab-fade {
  from { opacity: 0; transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .local-tab-swap { animation: none; }
}

/* Promoted section headings sit centred like the About heading. */
.local-mega-h { text-align: center; margin-inline: auto; }

/* Steadier rhythm in the content flow: the scraped 120px inter-block
   gap doubled into ~400px voids around the slim quote cards. */
main article { row-gap: clamp(3.25rem, 8vh, 5rem); }

/* Local progress indicator, intentionally quiet like the original chrome. */
.local-progress {
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  height: 2px;
  width: calc(var(--local-scroll-progress, 0) * 100%);
  background: var(--color-primary-100, rgba(255,255,255,.9));
  transform-origin: left;
  pointer-events: none;
}

/* Theme toggle: one button, two icons; the active theme hides its own icon. */
.local-theme-btn .local-theme-icon-light { display: none; }
html.light .local-theme-btn .local-theme-icon-light { display: block; }
html.light .local-theme-btn .local-theme-icon-dark { display: none; }

@media (max-width: 767px) {
  .local-particle-hero > .AstraHero-module___Ja0lG__layout,
  .local-particle-hero { min-height: 100svh !important; }
  .local-hero-label-left { top: 46%; left: 1rem; }
  .local-hero-label-right { top: 54%; right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .local-reveal { opacity: 1; transform: none; transition: none; }
  .local-particle-host { cursor: default; }
  .local-particle-canvas { opacity: .9; }
  .local-scroll-hint { animation: none; }
}

/* ---------- GEO RSI capsule ---------- */
/* Semantic colours only, so the pill is white on the dark theme and black on
   the light theme with no extra rules. */
.local-geo-rsi-cta {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3.5rem);
  bottom: 2rem;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .74rem 1.3rem;
  border-radius: 999px;
  background: var(--color-primary-100, #fff);
  color: var(--color-background, #000);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  opacity: var(--astra-copy-opacity, 1);
  transition:
    transform 260ms cubic-bezier(.22, 1, .36, 1),
    box-shadow 260ms cubic-bezier(.22, 1, .36, 1),
    background-color 320ms ease,
    color 320ms ease,
    opacity 800ms cubic-bezier(.22, 1, .36, 1);
}
.local-geo-rsi-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(0, 0, 0, .36); }
.local-geo-rsi-cta:active { transform: translateY(0); }
.local-geo-rsi-cta:focus-visible { outline: 2px solid var(--color-primary-100, #fff); outline-offset: 3px; }
.local-geo-rsi-cta.is-leaving {
  transform: scale(.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), box-shadow 180ms linear;
}
.local-geo-rsi-cta-arrow { transition: transform 260ms cubic-bezier(.22, 1, .36, 1); }
.local-geo-rsi-cta:hover .local-geo-rsi-cta-arrow { transform: translateX(3px); }

/* Full-page panel used by the capsule transition. It is always viewport sized;
   the clip-path (set from JS) is what animates, so no layout is touched. */
.local-page-cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: auto;
  overflow: hidden;
  will-change: clip-path, opacity;
}
/* Soft radial core that blooms from the capsule while the clip expands. */
.local-page-cover-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 2px;
  margin: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, .22) 0%,
    rgba(255, 255, 255, .08) 28%,
    rgba(255, 255, 255, 0) 62%
  );
  mix-blend-mode: soft-light;
  transform: translate(-50%, -50%) scale(.08);
  will-change: transform, opacity;
}

/* Destination content can ease in while the cover contracts. */
html.local-nav-arriving .harness-shell,
html.local-nav-arriving > body > *:not(.local-page-cover) {
  animation: local-nav-arrive 420ms cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes local-nav-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .local-geo-rsi-cta { transition: background-color 200ms linear, color 200ms linear; }
  .local-geo-rsi-cta.is-leaving { transform: none; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); }
  html.local-nav-arriving .harness-shell,
  html.local-nav-arriving > body > *:not(.local-page-cover) { animation: none; }
  .local-page-cover-glow { display: none; }
}

/* ---------- GEO RSI harness (chat shell) ----------
   Style: convention-mode product UI — Grok/Next density, Geobyte tokens.
   Left column is the conversation; right rail holds reserved instruments. */
.harness-shell {
  --harness-rail: 17.5rem;
  --harness-history-w: 14.5rem;
  --harness-line: var(--color-primary-12, rgba(255, 255, 255, .12));
  --harness-soft: color-mix(in srgb, var(--color-tertiary-100, #141414) 55%, transparent);
  --harness-muted: var(--color-primary-60, rgba(255, 255, 255, .6));
  --harness-dim: var(--color-primary-44, rgba(255, 255, 255, .44));
  --harness-chat-max: 44rem;
  min-height: 100svh;
  display: flex;
  background: var(--color-background, #000);
  color: var(--color-primary-100, #fff);
  font-family: var(--font-sans);
}

/* Left: conversation history */
.harness-history {
  order: 0;
  flex: 0 0 var(--harness-history-w);
  width: var(--harness-history-w);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.1rem .75rem;
  border-right: 1px solid var(--harness-line);
  background: color-mix(in srgb, var(--color-background, #000) 94%, var(--color-primary-100, #fff));
  min-height: 100svh;
  position: sticky;
  top: 0;
  max-height: 100svh;
  overflow: auto;
}
.harness-history-head {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .15rem .35rem .1rem;
}
.harness-history-label {
  margin: 0;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--harness-dim);
}
.harness-new-session {
  min-height: 2.15rem;
  border: 1px solid var(--harness-line);
  border-radius: .65rem;
  background: transparent;
  color: var(--color-primary-100);
  font: inherit;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.harness-new-session:hover {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 6%, transparent);
  border-color: var(--color-primary-44);
}
.harness-new-session:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 2px; }
.harness-history-list {
  display: grid;
  gap: .3rem;
  flex: 1 1 auto;
  align-content: start;
}
.harness-history-item {
  display: grid;
  gap: .18rem;
  padding: .62rem .65rem;
  border-radius: .7rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.harness-history-item:hover {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 5%, transparent);
  border-color: var(--harness-line);
}
.harness-history-item:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 2px; }
.harness-history-item.is-active {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 8%, transparent);
  border-color: color-mix(in srgb, var(--color-primary-100, #fff) 14%, transparent);
}
.harness-history-title {
  font-size: .8rem;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.harness-history-meta {
  font-size: .66rem;
  color: var(--harness-dim);
}
.harness-history-foot {
  margin: 0;
  padding: .2rem .35rem 0;
  font-size: .66rem;
  line-height: 1.4;
  color: var(--harness-dim);
}

/* Right rail (instrument panels) */
.harness-rail {
  order: 2;
  flex: 0 0 var(--harness-rail);
  width: var(--harness-rail);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem .9rem;
  border-left: 1px solid var(--harness-line);
  background: color-mix(in srgb, var(--color-background, #000) 92%, var(--color-primary-100, #fff));
  min-height: 100svh;
  position: sticky;
  top: 0;
  max-height: 100svh;
  overflow: auto;
}
.harness-rail-top { padding: .15rem .35rem .2rem; }
.harness-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: inherit;
  text-decoration: none;
}
.harness-brand-mark {
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #9ec5ff, #3d6fba 55%, #1a2a44);
  box-shadow: 0 0 16px rgba(120, 170, 255, .35);
  flex: none;
}
.harness-brand-text { display: grid; gap: .12rem; line-height: 1.1; }
.harness-brand-sub {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--harness-dim);
}
.harness-tagline {
  margin: .75rem 0 0;
  font-size: .72rem;
  line-height: 1.45;
  color: var(--harness-muted);
}

.harness-panels { display: grid; gap: .65rem; flex: 1 1 auto; align-content: start; }
.harness-panel {
  border: 1px solid var(--harness-line);
  border-radius: .95rem;
  background: var(--harness-soft);
  padding: .7rem .75rem .75rem;
}
.harness-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .55rem;
}
.harness-panel-head h2 {
  margin: 0;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--harness-dim);
}
.harness-panel-hint {
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--harness-dim);
  opacity: .75;
}
.harness-live {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--harness-muted);
}
.harness-live i {
  width: .4rem;
  height: .4rem;
  border-radius: 999px;
  background: #5dca7a;
  box-shadow: 0 0 8px rgba(93, 202, 122, .7);
  display: inline-block;
}
.harness-kv { margin: 0; display: grid; gap: .35rem; }
.harness-kv > div {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
}
.harness-kv dt { color: var(--harness-muted); }
.harness-kv dd {
  margin: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}
.harness-agent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.harness-agent-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
}
.harness-agent-list em {
  font-style: normal;
  font-size: .68rem;
  color: var(--harness-dim);
  text-transform: lowercase;
}
.harness-dot {
  width: .4rem;
  height: .4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--harness-dim) 50%, transparent);
}
.harness-dot.active {
  background: #8ec2ff;
  box-shadow: 0 0 8px rgba(142, 194, 255, .55);
}
.harness-band-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
  align-items: end;
  height: 4.2rem;
}
.harness-bar {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .25rem;
}
.harness-bar::before {
  content: '';
  display: block;
  height: var(--h, 40%);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary-100, #fff) 70%, transparent), color-mix(in srgb, var(--color-primary-100, #fff) 18%, transparent));
  opacity: .55;
}
.harness-bar span {
  font-size: .58rem;
  letter-spacing: .04em;
  text-align: center;
  color: var(--harness-dim);
}
.harness-panel-foot {
  margin: .55rem 0 0;
  font-size: .68rem;
  color: var(--harness-muted);
  line-height: 1.4;
}
.harness-queue {
  margin: 0;
  padding: 0 0 0 1rem;
  display: grid;
  gap: .35rem;
  font-size: .76rem;
  color: var(--harness-muted);
}
.harness-queue .is-done { color: var(--harness-dim); text-decoration: line-through; opacity: .75; }
.harness-queue .is-active { color: var(--color-primary-100); }

.harness-rail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .25rem;
}
.harness-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--harness-line);
  background: transparent;
  color: var(--harness-muted);
  cursor: pointer;
  transition: color 220ms ease, border-color 220ms ease;
}
.harness-theme:hover { color: var(--color-primary-100); border-color: var(--color-primary-44); }
.harness-theme:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 2px; }
.harness-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.25rem;
  padding: 0 .95rem;
  border-radius: 999px;
  background: var(--color-primary-100, #fff);
  color: var(--color-background, #000);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1), background-color 320ms ease, color 320ms ease;
}
.harness-back:hover { transform: translateY(-1px); }
.harness-back:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 2px; }

/* Conversation column (left) — centered in the space left of the rail */
.harness-main {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  padding: 0 clamp(1rem, 3vw, 2rem) 1rem;
}
.harness-top,
.harness-composer,
.harness-composer-hint {
  width: 100%;
  max-width: var(--harness-chat-max);
}
.harness-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0 .9rem;
  border-bottom: 1px solid var(--harness-line);
}
.harness-eyebrow {
  margin: 0 0 .25rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--harness-dim);
}
.harness-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.harness-top-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.harness-chip {
  border: 1px solid var(--harness-line);
  border-radius: 999px;
  padding: .28rem .65rem;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--harness-muted);
}
.harness-chip-accent {
  border-color: color-mix(in srgb, var(--color-primary-100, #fff) 28%, transparent);
  color: var(--color-primary-100);
}

.harness-chat {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1.25rem .15rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  scroll-behavior: smooth;
  /* Center transcript; leave room for the scrubber on the right. */
  margin-inline: auto;
  max-width: var(--harness-chat-max);
  width: 100%;
}
.harness-chat::-webkit-scrollbar { width: 0; height: 0; }

.harness-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  max-width: none;
  /* Keep scrubber pinned to the right edge of the main column (beside rail). */
  padding-right: .15rem;
}

/* Grok-style scrub ticks along the conversation edge */
.harness-scrub {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .45rem 0;
  user-select: none;
}
.harness-scrub-end {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--harness-dim);
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}
.harness-scrub-end:hover {
  color: var(--color-primary-100);
  background: color-mix(in srgb, var(--color-primary-100, #fff) 6%, transparent);
}
.harness-scrub-end:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 1px; }
.harness-scrub-track {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding-top: .35rem;
  overflow: visible;
}
.harness-scrub-tick {
  flex: 0 0 auto;
  /* Horizontal dash: width from JS by prompt length; fixed thin height. */
  width: 18px;
  height: 3px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: color-mix(in srgb, var(--harness-dim) 45%, transparent);
  cursor: pointer;
  transition: background-color 180ms ease, width 180ms ease, transform 180ms ease;
}
.harness-scrub-tick:hover {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 75%, transparent);
  transform: scaleX(1.05);
}
.harness-scrub-tick.is-active {
  background: var(--color-primary-100, #fff);
  box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary-100, #fff) 35%, transparent);
}
.harness-scrub-tick.is-hot {
  background: var(--color-primary-100, #fff);
  transform: scaleX(1.08);
  box-shadow: 0 0 10px color-mix(in srgb, var(--color-primary-100, #fff) 40%, transparent);
}
.harness-scrub-tick:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 2px; }

/* Fade-in label list to the left of the ticks (hover / focus on scrub area) */
.harness-scrub-pop {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  translate: 0 -50%;
  width: min(20rem, 52vw);
  max-height: min(70vh, 28rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: .55rem;
  border-radius: .9rem;
  border: 1px solid color-mix(in srgb, var(--color-primary-100, #fff) 10%, transparent);
  background: color-mix(in srgb, #1a1a1c 94%, #000);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  z-index: 30;
  scrollbar-width: none;
}
.harness-scrub-pop::-webkit-scrollbar { width: 0; height: 0; }
.harness-scrub.is-open .harness-scrub-pop,
.harness-scrub:hover .harness-scrub-pop,
.harness-scrub:focus-within .harness-scrub-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s;
}
.harness-scrub-pop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  width: 100%;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--harness-muted);
  font: inherit;
  font-size: .84rem;
  line-height: 1.35;
  text-align: right;
  padding: .42rem .5rem;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.harness-scrub-pop-row:hover,
.harness-scrub-pop-row:focus-visible {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 10%, transparent);
  color: var(--color-primary-100);
  outline: none;
}
.harness-scrub-pop-row.is-hot {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 14%, transparent);
  color: var(--color-primary-100);
}
.harness-scrub-pop-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.harness-scrub-pop-bar {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--harness-dim) 50%, transparent);
  flex: none;
}
.harness-scrub-pop-row.is-hot .harness-scrub-pop-bar {
  background: var(--color-primary-100, #fff);
  box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary-100, #fff) 40%, transparent);
}
.harness-scrub-pop-empty {
  margin: 0;
  padding: .5rem .6rem;
  font-size: .78rem;
  color: var(--harness-dim);
}
.harness-msg {
  display: grid;
  gap: .4rem;
  max-width: 100%;
  animation: harness-msg-in 320ms cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes harness-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.harness-msg-meta {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--harness-dim);
}
.harness-msg-role { font-weight: 700; color: var(--color-primary-60); }
.harness-msg.user .harness-msg-role { color: var(--color-primary-100); }
.harness-msg-body {
  padding: .85rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--harness-line);
  background: var(--harness-soft);
  font-size: .95rem;
  line-height: 1.6;
  color: var(--color-primary-100);
}
.harness-msg.system .harness-msg-body {
  background: transparent;
  border-style: dashed;
  color: var(--harness-muted);
}
.harness-msg.user .harness-msg-body {
  background: color-mix(in srgb, var(--color-primary-100, #fff) 8%, transparent);
  border-color: color-mix(in srgb, var(--color-primary-100, #fff) 16%, transparent);
}
.harness-msg-body > * { margin: 0 0 .65rem; }
.harness-msg-body > *:last-child { margin-bottom: 0; }
.harness-msg-body p { max-width: 62ch; }
.harness-msg-body ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: .3rem;
  color: inherit;
}
.harness-msg-body code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .88em;
  padding: .08em .35em;
  border-radius: .35em;
  background: color-mix(in srgb, var(--color-primary-100, #fff) 8%, transparent);
}
.harness-code {
  margin: 0;
  padding: .75rem .9rem;
  border-radius: .65rem;
  background: color-mix(in srgb, var(--color-primary-100, #fff) 6%, transparent);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}
.harness-muted { color: var(--harness-muted); }

.harness-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .55rem;
  padding: .55rem;
  border: 1px solid var(--harness-line);
  border-radius: 1.1rem;
  background: color-mix(in srgb, var(--color-tertiary-100, #141414) 70%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  position: sticky;
  bottom: .85rem;
  backdrop-filter: blur(10px);
}
.harness-input {
  width: 100%;
  min-height: 2.6rem;
  max-height: 9rem;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .95rem;
  line-height: 1.45;
  padding: .65rem .7rem;
}
.harness-input::placeholder { color: var(--harness-dim); }
.harness-send {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.6rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary-100, #fff);
  color: var(--color-background, #000);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}
.harness-send:hover { transform: translateY(-1px); }
.harness-send:active { transform: none; }
.harness-send:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.harness-send:focus-visible { outline: 2px solid var(--color-primary-100); outline-offset: 2px; }
.harness-composer-hint {
  margin: .45rem 0 0;
  text-align: center;
  font-size: .68rem;
  color: var(--harness-dim);
}

@media (max-width: 1100px) {
  .harness-history { --harness-history-w: 12.5rem; }
}
@media (max-width: 900px) {
  .harness-shell { flex-direction: column; }
  .harness-history {
    order: 0;
    flex: none;
    width: 100%;
    position: relative;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--harness-line);
    min-height: 0;
  }
  .harness-history-list {
    display: flex;
    overflow-x: auto;
    gap: .4rem;
    padding-bottom: .25rem;
  }
  .harness-history-item {
    flex: 0 0 auto;
    min-width: 10.5rem;
  }
  .harness-history-foot { display: none; }
  .harness-rail {
    order: 2;
    flex: none;
    width: 100%;
    position: relative;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--harness-line);
  }
  .harness-main { order: 1; min-height: auto; height: auto; max-height: none; overflow: visible; }
  .harness-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .harness-chat { min-height: 50svh; max-height: 70svh; }
}
@media (max-width: 560px) {
  .harness-panels { grid-template-columns: 1fr; }
  .harness-top { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .harness-msg { animation: none; }
  .harness-chat { scroll-behavior: auto; }
  .harness-send { transition: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
