@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f3f2ec;
  --surface: #fbfaf7;
  --surface-2: #edebe3;
  --surface-3: #e4e2d8;
  --border: rgba(22, 22, 15, 0.13);
  --border-strong: rgba(22, 22, 15, 0.24);
  --text: #16160f;
  --muted: rgba(22, 22, 15, 0.66);
  --subtle: rgba(22, 22, 15, 0.48);
  --accent: #b4321f;
  --accent-soft: rgba(180, 50, 31, 0.08);
  --solid: #16160f;
  --solid-text: #fbfaf7;
  --success: #2f6b47;
  --warning: #8a6410;
  --night: #111110;
  --night-2: #1a1a15;
  --night-text: #f2f0e6;
  --night-muted: rgba(242, 240, 230, 0.66);
  --night-border: rgba(242, 240, 230, 0.14);
  --night-accent: #dd5b3e;
  --sans: "Space Grotesk Variable", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --measure: 76rem;
  --header: 3.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* The app's own tokens (web/src/design/tokens.css), so the mockups below
     are set with the same values the product uses. */
  --color-bg: #f3f2ec;
  --color-surface: #fbfaf7;
  --color-surface-2: #edebe3;
  --color-surface-3: #e4e2d8;
  --color-border: rgba(22, 22, 15, 0.13);
  --color-border-strong: rgba(22, 22, 15, 0.24);
  --color-text: #16160f;
  --color-text-muted: rgba(22, 22, 15, 0.62);
  --color-text-subtle: rgba(22, 22, 15, 0.42);
  --color-accent: #b4321f;
  --color-accent-soft: rgba(180, 50, 31, 0.08);
  --color-solid: #16160f;
  --color-solid-text: #fbfaf7;
  --color-danger: #b4321f;
  --color-danger-soft: rgba(180, 50, 31, 0.09);
  --color-success: #2f6b47;
  --color-success-soft: rgba(47, 107, 71, 0.1);
  --color-warning: #8a6410;
  --color-warning-soft: rgba(138, 100, 16, 0.11);
  --radius-sm: 2px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: #fbfaf7;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 0.75rem;
  background: var(--solid);
  color: var(--solid-text);
}

.skip:focus {
  top: 0.75rem;
}

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

p,
figure {
  margin: 0;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header);
  padding: 0 var(--pad);
  /* Nearly opaque instead of a backdrop blur, which re-renders on every
     scrolled frame and is heavy on integrated GPUs. */
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: 1px solid var(--border);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 0.85rem;
  height: 1.15rem;
  flex: 0 0 auto;
  border-left: 2px solid var(--accent);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0.62rem;
  height: 2px;
  background: var(--accent);
  transition: width 400ms var(--ease);
}

.brand:hover .brand-mark::before,
.brand:hover .brand-mark::after {
  width: 0.85rem;
}

.brand-mark::before {
  top: 0;
}

.brand-mark::after {
  bottom: 0;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand-meta {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-desktop a {
  position: relative;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 160ms ease;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 300ms var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a.is-current {
  color: var(--text);
}

.nav-desktop a.is-current::after,
.nav-desktop a:hover::after {
  transform: scaleX(1);
}

.nav-drawer {
  display: none;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--solid);
  border-radius: 2px;
  background: var(--solid);
  color: var(--solid-text);
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn:hover {
  background: #2c2c20;
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--text);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.arrow-down {
  display: inline-block;
  animation: nudge 1.8s var(--ease) 3;
}

@keyframes nudge {
  50% {
    transform: translateY(3px);
  }
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 3.75rem) var(--pad) clamp(2.5rem, 5vw, 4.5rem);
}

.grid-field,
.contours {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.grid-field {
  /* The fade is painted over the lines rather than masked: a mask costs a
     separate render pass on every frame. */
  background-image:
    linear-gradient(to bottom, transparent 30%, var(--bg) 85%),
    linear-gradient(to right, rgba(22, 22, 15, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 22, 15, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 2.5rem 2.5rem, 2.5rem 2.5rem;
}

.contours {
  inset: -20% 0;
  background:
    radial-gradient(42rem 42rem at 86% 18%, transparent 34%, rgba(22, 22, 15, 0.055) 34.35%, transparent 34.7%),
    radial-gradient(42rem 42rem at 86% 18%, transparent 46%, rgba(22, 22, 15, 0.05) 46.35%, transparent 46.7%),
    radial-gradient(42rem 42rem at 86% 18%, transparent 58%, rgba(22, 22, 15, 0.045) 58.35%, transparent 58.7%),
    radial-gradient(28rem 28rem at 4% 62%, transparent 42%, rgba(180, 50, 31, 0.09) 42.4%, transparent 42.8%),
    radial-gradient(28rem 28rem at 4% 62%, transparent 56%, rgba(180, 50, 31, 0.07) 56.4%, transparent 56.8%);
}

.hero-copy {
  max-width: 64rem;
}

@media (min-width: 1100px) {
  /* Wide screens keep the copy above the window it introduces. */
  .hero-copy {
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem);
    grid-template-areas: "kicker kicker" "title side";
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: end;
    max-width: 92rem;
  }

  .hero-copy .kicker {
    grid-area: kicker;
  }

  .hero-copy h1 {
    grid-area: title;
  }

  .hero-side {
    grid-area: side;
    padding-bottom: 0.4rem;
  }

  .hero-side .hero-sub {
    margin-top: 0;
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.kicker-rule {
  width: 2.5rem;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 6.1rem);
}

.h1-line {
  display: block;
}

.rotator {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  height: 1.08em;
  overflow: hidden;
  color: var(--accent);
  transition: width 520ms var(--ease);
}

.rot-word {
  display: inline-block;
  white-space: nowrap;
  transition: transform 520ms var(--ease), opacity 360ms ease;
}

.rot-word.is-out {
  transform: translateY(-105%);
  opacity: 0;
}

.rot-word.is-in {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(105%);
  opacity: 0;
}

.hero-sub {
  margin-top: 1.25rem;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--muted);
}

.hero-sub strong {
  font-weight: 500;
  color: var(--text);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-facts li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  background: var(--accent);
}

.hero-stage {
  /* 92rem is about where the mockup reaches its largest scale, so the window
     never grows wider than the app inside it. */
  max-width: 92rem;
  margin: clamp(2.25rem, 4vw, 3.25rem) auto 0;
}

.window-hero {
  box-shadow: 0 40px 80px -40px rgba(22, 22, 15, 0.35), 0 2px 0 rgba(22, 22, 15, 0.02);
}

.demo-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.demo-steps li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--subtle);
  transition: color 300ms ease;
}

.demo-steps li::before,
.demo-steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--border);
}

.demo-steps li::after {
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--fill, 0));
}

.demo-steps li.is-done,
.demo-steps li.is-active {
  color: var(--text);
}

.demo-steps .label {
  color: inherit;
}

/* Ticker */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tick 52s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-track span {
  padding: 0.72rem 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-track span::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin: 0 1.1rem 0.05rem 1.1rem;
  background: var(--accent);
  vertical-align: middle;
}

@keyframes tick {
  to {
    transform: translateX(-50%);
  }
}

/* ── Sections ────────────────────────────────────────────────────────── */

.section {
  position: relative;
  padding: clamp(4rem, 9vw, 7.5rem) var(--pad);
}

.section-flush {
  padding-top: 0;
}

.section-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
  max-width: 56rem;
}

.index {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 0.55rem;
}

.section h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.7rem);
  max-width: 20ch;
}

.lede-sm {
  margin-top: 1rem;
  max-width: 42rem;
  color: var(--muted);
}

.lede {
  max-width: 38rem;
  margin-top: 1.5rem;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Reveal on scroll. Without JavaScript everything is simply shown. */

.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 700ms ease var(--d, 0ms), transform 900ms var(--ease) var(--d, 0ms);
}

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

/* Section headings rise word by word. app.js wraps each word. */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 900ms var(--ease) calc(var(--d, 0ms) + var(--wi, 0) * 55ms);
}

.reveal.is-in .w > span,
.no-split .w > span {
  transform: none;
}

/* ── Windows ─────────────────────────────────────────────────────────── */

.window {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
}

.window::before,
.window::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 0.8rem;
  height: 0.8rem;
  border-color: var(--accent);
  border-style: solid;
  pointer-events: none;
}

.window::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.window::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.window-dots {
  display: flex;
  gap: 0.35rem;
}

.window-dots i {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.window-url {
  flex: 1;
  max-width: 26rem;
  margin: 0 auto;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-sheet {
  white-space: nowrap;
}

.window-wide {
  max-width: 92rem;
  margin: 0 auto;
}

/* A mockup is laid out at its real size and scaled to fit, like a screenshot
   that stays sharp. app.js sets --s and the frame height. */
.fit {
  position: relative;
  overflow: hidden;
}

.screen {
  position: relative;
  width: var(--dw, 1200px);
  height: var(--dh, 700px);
  transform-origin: 0 0;
  transform: scale(var(--s, 1));
  overflow: hidden;
}

/* ── App mockup primitives ───────────────────────────────────────────── */

.app {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text);
  letter-spacing: 0;
}

.app h3,
.app h4,
.app h5 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.app p {
  margin: 0;
}

.screen.app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  background: var(--color-bg);
}

.a-muted {
  color: var(--color-text-muted);
}

/* Rail */

.a-rail {
  display: flex;
  flex-direction: column;
  width: 15rem;
  height: 100%;
  min-height: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface-2);
  overflow: hidden;
}

.a-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 3.25rem;
  flex: 0 0 auto;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.a-brandmark {
  position: relative;
  width: 0.875rem;
  height: 1.125rem;
  flex: 0 0 auto;
  border-left: 2px solid var(--color-accent);
}

.a-brandmark::before,
.a-brandmark::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0.625rem;
  height: 2px;
  background: var(--color-accent);
}

.a-brandmark::before {
  top: 0;
}

.a-brandmark::after {
  bottom: 0;
}

.a-brandname {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.a-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0.625rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.a-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.a-group + .a-group {
  padding-top: 0.625rem;
  border-top: 1px solid var(--color-border);
}

.a-entry {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 320ms var(--ease), opacity 240ms ease;
}

.a-entry > .a-entry-in {
  min-height: 0;
  overflow: hidden;
}

.a-entry.is-hidden {
  grid-template-rows: 0fr;
  opacity: 0;
}

.a-group.is-empty {
  display: none;
}

.a-navrow {
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.a-navrow > .a-item {
  flex: 1;
  min-width: 0;
}

.a-navrow.is-active {
  background: var(--color-solid);
  color: var(--color-solid-text);
  font-weight: 500;
}

.a-navrow.is-active > .a-item {
  color: inherit;
}

.a-tog {
  display: grid;
  place-items: center;
  width: 1.875rem;
  align-self: stretch;
  font-size: 14px;
}

.a-tog .i {
  transition: transform 140ms ease;
}

.a-tog.is-open .i {
  transform: rotate(90deg);
}

.a-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 2.125rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: background 200ms ease, color 200ms ease;
}

.a-item .i {
  font-size: 17px;
}

.a-kids {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms var(--ease);
}

.a-kids.is-open {
  grid-template-rows: 1fr;
}

.a-kids-in {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-left: 1rem;
}

.a-child {
  height: auto;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-left: 1px solid var(--color-border);
  margin-left: 0.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.a-child .i {
  font-size: 15px;
}

.a-child.is-active {
  background: var(--color-solid);
  color: var(--color-solid-text);
  font-weight: 500;
  border-left: 2px solid var(--color-accent);
}

.a-railfoot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--color-border);
}

.a-railfoot .a-micro {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.a-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.125rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
}

.a-select::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}

.a-role {
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

.a-who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-left: 0.125rem;
  color: var(--color-text-subtle);
}

.a-who > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.a-who b {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text);
}

.a-who small {
  font-size: 0.6875rem;
}

.a-avatar {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.a-avatar-lg {
  width: 4rem;
  height: 4rem;
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 400;
}

/* Collapsed rail: the 3.5rem icon column. */
.a-rail.is-collapsed {
  width: 3.5rem;
}

.a-rail.is-collapsed .a-brand {
  justify-content: center;
  padding: 0;
}

.a-rail.is-collapsed .a-brandname,
.a-rail.is-collapsed .a-label,
.a-rail.is-collapsed .a-tog,
.a-rail.is-collapsed .a-railfoot > :not(.a-who),
.a-rail.is-collapsed .a-who > :not(.a-signout) {
  display: none;
}

.a-rail.is-collapsed .a-item {
  justify-content: center;
  padding: 0;
}

.a-rail.is-collapsed .a-kids-in {
  padding-left: 0;
}

.a-rail.is-collapsed .a-child {
  margin-left: 0;
  border-left: 0;
  height: 2.125rem;
  border-radius: var(--radius-sm);
}

.a-rail.is-collapsed .a-child.is-active {
  border-left: 0;
}

.a-rail.is-collapsed .a-who {
  justify-content: center;
  padding: 0;
}

/* Topbar */

.a-main {
  /* Column 2 even when the rail is hidden: the empty auto column collapses,
     while landing in it would size the page to its content. */
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.a-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 3.25rem;
  flex: 0 0 auto;
  padding: 0 1rem 0 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.a-topbar .i {
  font-size: 17px;
}

.a-tenant {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.a-rolebadge {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.a-push {
  margin-left: auto;
}

.a-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
}

.a-badge {
  position: absolute;
  top: 0;
  right: -0.125rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 99px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1rem;
  text-align: center;
  transform: scale(0);
  transition: transform 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.a-badge.is-on {
  transform: scale(1);
}

.a-lang {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

/* Buttons, tags */

.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.125rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--color-solid);
  border-radius: var(--radius-sm);
  background: var(--color-solid);
  color: var(--color-solid-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
  transition: background 150ms ease, transform 120ms ease, opacity 150ms ease;
}

button.a-btn {
  cursor: pointer;
}

button.a-btn:hover:not(:disabled) {
  background: #2c2c20;
}

.a-btn .i {
  font-size: 16px;
}

.a-btn-sm {
  min-height: 1.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

.a-btn-ghost,
.a-btn-quiet {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

button.a-btn-quiet:hover:not(:disabled) {
  background: var(--color-surface-2);
}

.a-btn.is-pressed {
  transform: scale(0.96);
}

.a-tag {
  display: inline-block;
  padding: 0.0625rem 0.3125rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: 0.625rem;
  vertical-align: 0.1em;
  margin-left: 0.25rem;
}

.a-x {
  font-size: 18px;
  color: var(--color-text-muted);
}

/* Fake pointer */

.cursor {
  position: absolute;
  z-index: 50;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(calc(var(--cx, 600px) - 4px), calc(var(--cy, 600px) - 3px), 0);
  transition: transform 900ms cubic-bezier(0.65, 0, 0.35, 1), opacity 300ms ease;
}

.cursor svg {
  width: 22px;
  height: 22px;
  fill: var(--color-text);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.cursor.is-on {
  opacity: 1;
}

.cursor::after {
  content: "";
  position: absolute;
  left: -9px;
  top: -9px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
}

.cursor.is-click::after {
  animation: click 520ms ease-out;
}

@keyframes click {
  0% {
    opacity: 0.9;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

.cursor-touch {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(22, 22, 15, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cursor-touch::after {
  left: -2px;
  top: -2px;
  width: 34px;
  height: 34px;
}

/* ── Hero: agent page ────────────────────────────────────────────────── */

#hero-app {
  --dw: 1240px;
  --dh: 700px;
}

.a-agent {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.a-threads {
  padding: 0.5rem;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface-2);
  overflow: hidden;
}

.a-newchat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2rem;
  padding: 0 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 0.75rem;
  font-weight: 500;
}

.a-newchat .i {
  font-size: 14px;
}

.a-threads ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.a-threads li {
  display: flex;
  flex-direction: column;
  padding: 0.4375rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--color-text);
}

.a-threads li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a-threads li small {
  font-family: var(--mono);
  font-size: 0.5625rem;
  color: var(--color-text-subtle);
}

.a-threads li.is-active {
  background: var(--color-solid);
  color: var(--color-solid-text);
}

.a-threads li.is-active small {
  color: rgba(251, 250, 247, 0.6);
}

.a-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--color-surface);
}

.a-chathead {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3rem;
  flex: 0 0 auto;
  padding: 0 1rem 0 1.25rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.a-chathead .i {
  font-size: 15px;
}

.a-doclink {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.a-chattitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.a-transcript {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 1.5rem 1.25rem 1rem;
}

.a-transcript::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 1.25rem;
  background: linear-gradient(var(--color-surface), transparent);
  pointer-events: none;
}

.a-measure {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 45rem;
  margin: 0 auto;
  transition: transform 600ms var(--ease);
}

.a-composer {
  flex: 0 0 auto;
  width: calc(100% - 2.5rem);
  max-width: 45rem;
  margin: 0 auto 1rem;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.a-input {
  position: relative;
  min-height: 2.75rem;
  padding: 0.875rem 0.875rem 0.25rem;
  font-size: 0.875rem;
}

.a-placeholder {
  position: absolute;
  left: 0.875rem;
  top: 0.875rem;
  color: var(--color-text-subtle);
}

.a-input.has-text .a-placeholder {
  display: none;
}

.caret {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--color-text);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.a-composer-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem 0.5rem 0.875rem;
  color: var(--color-text-muted);
}

.a-composer-foot .i {
  font-size: 16px;
}

.a-hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.a-send {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-3);
  color: var(--color-text-subtle);
  transition: background 200ms ease, color 200ms ease, transform 120ms ease;
}

.a-send.is-ready {
  background: var(--color-solid);
  color: var(--color-solid-text);
}

.a-send.is-pressed {
  transform: scale(0.9);
}

/* Messages and steps, as ChatMessage.vue and ToolShell.vue draw them. */

.a-msg {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  animation: rise 420ms var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

.a-msg-user {
  align-items: flex-end;
}

.a-msg-user p {
  max-width: 85%;
  padding: 0.5625rem 0.8125rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: 0.875rem;
  line-height: 1.7;
}

.a-byline {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.a-bymark {
  position: relative;
  width: 0.4375rem;
  height: 0.75rem;
  border-left: 1.5px solid var(--color-accent);
}

.a-bymark::before,
.a-bymark::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0.3125rem;
  height: 1.5px;
  background: var(--color-accent);
}

.a-bymark::before {
  top: 0;
}

.a-bymark::after {
  bottom: 0;
}

.a-text {
  font-size: 0.875rem;
  line-height: 1.7;
  animation: rise 420ms var(--ease) both;
}

.a-text b {
  font-weight: 600;
}

.a-step,
.a-reason {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  margin-left: -0.375rem;
  padding: 0.1875rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
  animation: rise 360ms var(--ease) both;
}

.a-step code,
.a-reason .a-rlabel {
  font-family: var(--mono);
  font-size: 0.6875rem;
  white-space: nowrap;
}

.a-dot {
  align-self: center;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 99px;
  background: var(--color-accent);
  flex: 0 0 auto;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.a-step[data-tone="success"] .a-dot {
  background: var(--color-success);
  animation: none;
}

.a-step[data-tone="warning"] .a-dot {
  background: var(--color-warning);
  animation: none;
}

.a-step[data-tone="danger"] .a-dot {
  background: var(--color-danger);
  animation: none;
}

.a-sum {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.a-state {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-text-subtle);
}

.a-step[data-tone="warning"] .a-state {
  color: var(--color-warning);
}

.a-step[data-tone="danger"] .a-state {
  color: var(--color-danger);
}

.a-step[data-tone="success"] .a-state {
  display: none;
}

.a-fold {
  display: grid;
  grid-template-rows: 0fr;
  flex-basis: 100%;
  transition: grid-template-rows 260ms var(--ease);
}

.a-step.is-open .a-fold {
  grid-template-rows: 1fr;
}

.a-clip {
  min-height: 0;
  overflow: hidden;
}

.a-body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0.25rem 0 0.25rem 0.125rem;
  padding: 0.125rem 0 0.125rem 0.75rem;
  border-left: 1px solid var(--color-border);
}

.a-display {
  font-size: 0.8125rem;
  color: var(--color-text);
}

.a-pre {
  margin: 0;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-family: var(--mono);
  font-size: 0.65625rem;
  line-height: 1.45;
  color: var(--color-text);
  white-space: pre-wrap;
}

.a-toggles {
  display: flex;
  gap: 0.875rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.a-actions {
  display: flex;
  gap: 0.5rem;
}

.a-error {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--color-danger);
}

.a-reason .a-chev {
  align-self: center;
  font-size: 12px;
  color: var(--color-text-subtle);
}

.a-reason em {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.a-parts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.a-step + .a-step,
.a-reason + .a-step,
.a-step + .a-reason {
  margin-top: -0.5rem;
}

.a-chev {
  align-self: center;
  font-size: 12px;
  color: var(--color-text-subtle);
  transition: transform 180ms var(--ease);
}

.a-step.is-open > .a-chev {
  transform: rotate(90deg);
}

/* ── 01 Compare ──────────────────────────────────────────────────────── */

.compare {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-2);
  user-select: none;
  touch-action: pan-y;
}

.compare-pane {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.compare-before {
  background:
    linear-gradient(to right, rgba(22, 22, 15, 0.04) 1px, transparent 1px) 0 0 / 1.5rem 1.5rem,
    linear-gradient(to bottom, rgba(22, 22, 15, 0.04) 1px, transparent 1px) 0 0 / 1.5rem 1.5rem,
    #e8e5db;
}

.compare-after {
  position: relative;
  z-index: 1;
  clip-path: inset(0 0 0 var(--pos));
  background: var(--color-bg);
}

.compare-tag {
  position: absolute;
  bottom: 0.9rem;
  z-index: 4;
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.compare-before .compare-tag {
  left: 0.9rem;
}

.compare-after .compare-tag {
  right: 0.9rem;
  color: var(--accent);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 5;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  pointer-events: none;
}

.compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0 -1.375rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(22, 22, 15, 0.18);
}

.compare-handle span::before,
.compare-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.225rem;
  border: solid var(--accent);
  border-width: 2px 2px 0 0;
}

.compare-handle span::before {
  left: 0.6rem;
  transform: rotate(-135deg);
}

.compare-handle span::after {
  right: 0.6rem;
  transform: rotate(45deg);
}

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.compare:has(.compare-range:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The tangle */

.chaos {
  position: absolute;
  inset: 3rem 1.5rem 1.5rem;
}

.cw {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 15rem;
  background: #fff;
  border: 1px solid rgba(22, 22, 15, 0.2);
  border-radius: 6px;
  box-shadow: 0 10px 24px -8px rgba(22, 22, 15, 0.25);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  color: #333;
  transform: rotate(var(--r));
  animation: drift 7s ease-in-out infinite var(--f);
  overflow: hidden;
}

@keyframes drift {
  50% {
    transform: rotate(calc(var(--r) * -0.6)) translate(4px, -6px);
  }
}

.cw-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  background: #ececec;
  border-bottom: 1px solid #ddd;
  font-size: 0.66rem;
  color: #555;
}

.cw-bar::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #e0605a;
  box-shadow: 0.65rem 0 0 #e9b845, 1.3rem 0 0 #6cc070;
  margin-right: 1.3rem;
}

.cw-sheet table {
  width: 100%;
  border-collapse: collapse;
}

.cw-sheet th,
.cw-sheet td {
  padding: 0.2rem 0.35rem;
  border: 1px solid #e2e2e2;
  text-align: left;
  font-weight: 400;
}

.cw-sheet th {
  background: #f4f4f4;
  color: #888;
  width: 1.4rem;
}

.cw-sheet td.hl {
  background: #fff2a8;
}

.cw-mail {
  width: 16rem;
}

.cw-mail ul {
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
}

.cw-mail li {
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid #f0f0f0;
}

.cw-mail li.unread {
  font-weight: 700;
}

.cw-mail li.unread::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #2f6fde;
}

.cw-wa {
  width: 13rem;
  background: #ece5dd;
  padding-bottom: 0.5rem;
}

.cw-wa .bubble {
  margin: 0.45rem 0.6rem 0;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: #fff;
  width: fit-content;
  max-width: 85%;
}

.cw-badge {
  position: absolute;
  right: 0.5rem;
  top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #25a35a;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  animation: bump 2.4s ease-in-out infinite;
}

@keyframes bump {
  0%,
  70%,
  100% {
    transform: scale(1);
  }
  80% {
    transform: scale(1.35);
  }
}

.cw-cal {
  width: 14rem;
}

.cal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1.6rem);
  gap: 2px;
  padding: 0.4rem;
  background: repeating-linear-gradient(to bottom, transparent 0 1.6rem, #eee 1.6rem calc(1.6rem + 2px));
}

.ev {
  grid-column: var(--c);
  grid-row: var(--r0) / span var(--h);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  background: #cfe0fb;
  color: #234;
  font-size: 0.62rem;
}

.ev.clash {
  background: rgba(224, 96, 90, 0.35);
  outline: 1px dashed #c33;
}

.cw-warn {
  display: block;
  padding: 0.2rem 0.5rem 0.4rem;
  color: #c33;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cw-crm dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.6rem;
  margin: 0;
  padding: 0.5rem 0.6rem;
}

.cw-crm dt {
  color: #888;
}

.cw-crm dd {
  margin: 0;
}

.cw-crm dd.empty {
  color: #c33;
}

.cw-li {
  width: 15rem;
}

.cw-li p {
  padding: 0.5rem 0.6rem;
}

.cw-note {
  width: 9.5rem;
  padding: 0.8rem 0.7rem;
  border: 0;
  border-radius: 1px;
  background: #ffe873;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 0.85rem;
  color: #3a3000;
  box-shadow: 0 8px 14px -6px rgba(0, 0, 0, 0.3);
}

/* The dossier: the contacts page with one contact open, as the app shows it. */

.app-dossier {
  --dw: 1240px;
  --dh: 720px;
}

.c-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.c-search {
  width: 20rem;
  color: var(--color-text-subtle);
}

.c-seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.c-seg span {
  padding: 0.3rem 0.7rem;
}

.c-seg .is-on {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.c-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.8125rem;
}

.c-table th {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
}

.c-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.c-table td:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
  align-items: center;
  font-weight: 500;
}

.c-table td:first-child .a-avatar {
  grid-row: span 2;
}

.c-table td small {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.c-table u {
  text-underline-offset: 3px;
}

.a-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.a-dossier {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(22, 22, 15, 0.07);
}

.a-dossier-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.a-dossier-head > div {
  flex: 1;
}

.a-dossier-name {
  font-size: 1.125rem;
  font-weight: 500;
}

.a-dossier-head .a-muted {
  font-size: 0.75rem;
}

.a-dossier-body {
  padding: 0 1.25rem 0.5rem;
}

.a-dossier-body section {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border);
}

.a-dossier-body section:last-child {
  border-bottom: 0;
}

.a-dossier-body h4 {
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
}

.a-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.a-dossier-body p {
  font-size: 0.8125rem;
}

.a-dossier-body p + p {
  margin-top: 0.15rem;
}

.a-fu {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.a-ring {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 50%;
}

.a-fu-meta {
  margin-top: 0.15rem;
  color: var(--color-text-muted);
  font-size: 0.75rem !important;
}

.a-fu-meta .a-tag {
  margin: 0 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 0;
  color: var(--color-text-muted);
}

.a-identities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.a-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: 0.6875rem;
}

.a-identity .i {
  font-size: 14px;
}

.a-attr span {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--color-text-subtle);
  font-size: 0.6875rem;
}

/* ── 02 Playground ───────────────────────────────────────────────────── */

.playground {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.25rem;
  align-items: start;
}

.tool-list {
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
}

.tool-list li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 300ms ease;
}

.tool-list li.is-hot {
  background: var(--accent-soft);
}

.tool-list li.is-hot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.tool-list code {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.t-read,
.t-write {
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.t-read {
  color: var(--subtle);
}

.t-write {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.tool-legend {
  display: none;
}

.tool-foot {
  padding: 0.8rem 0.9rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.pg-bar {
  justify-content: space-between;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 2px;
  background: var(--surface);
}

.segmented button {
  padding: 0.3rem 0.7rem;
  border: 0;
  border-radius: 1px;
  background: transparent;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.segmented button[aria-pressed="true"] {
  background: var(--solid);
  color: var(--solid-text);
}

.pg-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.25rem 1.25rem 1.4rem;
}

.pg-body .a-msg {
  animation: none;
}

.pg-body .a-sum {
  white-space: normal;
}

.pg-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.pg-col {
  min-height: 6.5rem;
  padding: 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  transition: border-color 300ms ease;
}

.pg-col h5 {
  font-size: 0.8125rem;
  font-weight: 600;
}

.pg-col h5 span {
  margin-left: 0.4rem;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.pg-col.is-target {
  border-color: var(--color-accent);
}

.a-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.a-card-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.a-card-title .i {
  font-size: 14px;
  color: var(--color-text-muted);
}

.a-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.625rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.a-card-meta b {
  font-weight: 400;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.a-age {
  margin-left: auto;
}

.pg-card {
  position: absolute;
  left: 0.625rem;
  top: 2.25rem;
  width: calc(50% - 1.625rem);
  transition: transform 800ms var(--ease), box-shadow 300ms ease;
}

.pg-card.is-won {
  transform: translateX(calc(100% + 1.75rem));
}

.pg-card.is-lifted {
  box-shadow: 0 10px 24px -10px rgba(22, 22, 15, 0.4);
}

.pg-reset {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}

.pg-reset:hover {
  text-decoration: underline;
}

/* ── 03 Dialer ───────────────────────────────────────────────────────── */

.app-dialer {
  --dw: 1360px;
  --dh: 720px;
}

.d-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  flex: 0 0 auto;
  padding: 0 1.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.d-conn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.d-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-success);
  flex: 0 0 auto;
}

.d-dot.is-ringing {
  background: var(--color-warning);
  animation: pulse 0.9s ease-in-out infinite;
}

.d-dot.is-ended {
  background: var(--color-text-subtle);
}

.d-live {
  animation: pulse 2s ease-in-out infinite;
}

.d-tools {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.d-tools > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.d-tools .i {
  font-size: 16px;
}

.d-panes {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr) 36rem;
  flex: 1;
  min-height: 0;
}

.d-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
}

.d-list-head {
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.d-list-head .label {
  font-size: 0.5625rem;
}

.d-list-title {
  margin-top: 0.4rem !important;
  font-size: 0.9375rem;
  font-weight: 500;
}

.d-list-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem !important;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.d-bar {
  display: block;
  height: 2px;
  margin-top: 0.6rem;
  background: var(--color-border);
}

.d-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-text-muted);
  transition: width 600ms var(--ease);
}

.d-queue {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.d-queue li {
  position: relative;
  display: flex;
  gap: 1.125rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  transition: background 300ms ease;
}

.d-queue li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform 300ms var(--ease);
}

.d-n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

.d-queue p {
  font-size: 0.8125rem;
}

.d-queue small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.d-calling {
  display: none !important;
  align-items: center;
  gap: 2px;
  color: var(--color-accent) !important;
}

.d-calling i {
  display: inline-block;
  width: 2px;
  height: 0.6rem;
  background: currentColor;
  animation: eq 0.8s ease-in-out infinite;
}

.d-calling i:nth-child(2) {
  animation-delay: -0.3s;
}

.d-calling i:nth-child(3) {
  animation-delay: -0.6s;
  margin-right: 0.35rem;
}

@keyframes eq {
  50% {
    transform: scaleY(0.35);
  }
}

.d-queue li.is-current {
  background: var(--color-accent-soft);
}

.d-queue li.is-current::before {
  transform: scaleY(1);
}

.d-queue li.is-current .d-calling {
  display: flex !important;
}

.d-queue li.is-done p::after {
  content: " ✓";
  color: var(--color-success);
}

.d-queue li.is-skipped {
  color: var(--color-text-subtle);
}

.d-queue li.is-skipped p,
.d-queue li.is-skipped small {
  color: var(--color-text-subtle);
}

.d-list-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
}

.a-check {
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 2px;
}

.a-check.is-on {
  border-color: var(--color-accent);
  background: var(--color-accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4L19 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 80% no-repeat;
}

.d-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
}

.d-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.d-name {
  margin-top: 0.75rem !important;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.d-num {
  margin-top: 0.4rem !important;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.d-co {
  margin-top: 0.2rem !important;
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
}

.d-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 2rem;
  margin: 0.75rem 0 0.25rem;
  opacity: 0.25;
  transition: opacity 300ms ease;
}

.d-wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--color-text-muted);
  transform: scaleY(0.12);
  transition: transform 140ms ease;
}

.d-wave.is-live {
  opacity: 1;
}

.d-pad {
  display: grid;
  grid-template-columns: repeat(3, 3.25rem);
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.d-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--color-surface-2);
  font-size: 1.25rem;
  line-height: 1;
}

.d-key small {
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.4375rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.d-controls {
  display: flex;
  gap: 2rem;
  margin-top: 1.75rem;
}

.d-ctl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.d-round {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 20px;
  transition: transform 140ms ease;
}

.d-hang {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.d-round.is-pressed {
  transform: scale(0.92);
}

.d-rec {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem !important;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.d-recdot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.d-side {
  padding: 1.5rem 1.75rem;
  border-left: 1px solid var(--color-border);
  background: var(--color-surface);
  min-height: 0;
  overflow: hidden;
}

.d-contact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.d-cname {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.d-cname .i {
  font-size: 15px;
  color: var(--color-text-muted);
}

.d-contact .a-muted {
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.d-transcript {
  padding-top: 1.1rem;
}

.d-transcript header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.d-transcript h3 {
  font-size: 0.72rem !important;
  font-weight: 500;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.d-tstate {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--color-text-subtle);
}

.d-turns {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 25rem;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 3rem);
}

.d-turn {
  padding: 0.4rem 0;
  animation: rise 280ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.d-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
  font-size: 0.68rem;
}

.d-who {
  font-weight: 500;
}

.d-who::before {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  vertical-align: 0.08em;
  background: var(--color-accent);
}

.d-turn.operator .d-who {
  color: var(--color-text-muted);
}

.d-turn.operator .d-who::before {
  background: var(--color-border-strong);
}

.d-meta time {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
}

.d-turn p {
  font-size: 0.84rem;
  line-height: 1.55;
}

.d-turn.operator p {
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}

.d-seg {
  transition: opacity 400ms ease;
}

.d-seg.draft {
  opacity: 0.5;
}

.d-turn mark {
  background: var(--color-warning-soft);
  color: inherit;
  padding: 0 0.1rem;
  transition: background 400ms ease;
}

/* Modal + toast, shared by mockups */

.a-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.a-modal.is-open {
  opacity: 1;
}

.a-modal-card {
  width: 34rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(22, 22, 15, 0.07);
  transform: translateY(1rem) scale(0.98);
  transition: transform 420ms var(--ease);
}

.a-modal.is-open .a-modal-card {
  transform: none;
}

.a-modal-card header {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.a-modal-card header .label {
  font-size: 0.625rem;
}

.a-modal-title {
  margin-top: 0.3rem !important;
  font-size: 1.0625rem;
  font-weight: 500;
}

.a-modal-card header .a-x {
  position: absolute;
  right: 1.25rem;
  top: 1.5rem;
}

.a-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem 1.25rem 1.25rem;
}

.a-hintline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.a-quote {
  margin: 0;
  padding: 0.6rem 0.9rem;
  border-left: 2px solid var(--color-accent);
  background: var(--color-surface-2);
  font-size: 0.8125rem;
}

.a-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  text-align: center;
  color: var(--color-text-muted);
}

.a-seg span {
  padding: 0.4rem;
}

.a-seg .is-on {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.a-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
}

.a-inputbox {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 0.8125rem;
}

.a-inputbox.is-focus {
  border-color: var(--color-accent);
}

.a-inputbox.a-select {
  justify-content: space-between;
  color: var(--color-text);
}

.a-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.a-modal-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

.a-toast {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-solid);
  color: var(--color-solid-text);
  font-size: 0.8125rem;
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity 300ms ease, transform 420ms var(--ease);
}

.a-toast .i {
  font-size: 16px;
  color: #7fd19b;
}

.a-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── 04 Pipeline ─────────────────────────────────────────────────────── */

.sales-stack {
  position: relative;
  max-width: 92rem;
  margin: 0 auto;
  padding-bottom: 5rem;
}

.app-pipeline {
  --dw: 1440px;
  --dh: 620px;
}

.a-page {
  flex: 1;
  min-height: 0;
  padding: 1.5rem 1.5rem 0;
  overflow: hidden;
}

.a-pagehead {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-strong);
}

.a-pagehead::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.6rem;
  width: 0.5rem;
  height: 1.5px;
  background: var(--color-accent);
}

.a-pagehead h3 {
  font-size: 1.25rem;
}

.a-pagehead p {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.p-board {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.p-col {
  flex: 0 0 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 24rem;
  padding: 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  transition: border-color 200ms ease, background 200ms ease;
}

.p-col.is-target {
  border-color: var(--color-accent);
}

.p-col.outcome-lost {
  opacity: 0.8;
}

.p-colhead {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0 0.125rem;
}

.p-colhead h4 {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 600;
}

.p-col.outcome-won h4::after {
  content: " ✓";
  color: var(--color-text-muted);
}

.p-colhead span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.p-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-height: 1rem;
}

.p-card {
  cursor: grab;
  touch-action: none;
  transition: transform 220ms var(--ease), box-shadow 220ms ease, opacity 220ms ease;
}

.p-card:hover {
  border-color: var(--color-border-strong);
}

.p-card.is-ghost {
  opacity: 0.35;
}

.p-card.is-flying {
  position: absolute;
  z-index: 40;
  margin: 0;
  pointer-events: none;
  cursor: grabbing;
  box-shadow: 0 16px 32px -12px rgba(22, 22, 15, 0.45);
  transform: rotate(-2deg);
  transition: none;
}

.p-card.is-new {
  animation: rise 400ms var(--ease) both;
}

.p-add {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.p-add .i {
  font-size: 14px;
}

.window-kpi {
  position: absolute;
  right: clamp(0rem, 3vw, 3rem);
  bottom: 0;
  z-index: 4;
  width: min(34rem, 60%);
  box-shadow: 0 30px 60px -30px rgba(22, 22, 15, 0.4);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr);
  background: var(--color-bg);
  gap: 1px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem 0.85rem;
  background: var(--color-surface);
}

.kpi > span {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.kpi b {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi b.is-danger {
  color: var(--color-danger);
}

.kpi small {
  font-size: 0.6rem;
  color: var(--color-text-muted);
}

.kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.2rem !important;
}

.kpi-row em {
  font-style: normal;
  font-size: 0.8rem;
}

.kpi-row b {
  font-size: 1rem;
  transition: color 300ms ease;
}

.kpi-row b.is-flash,
.kpi small.is-flash {
  color: var(--color-success);
}

/* ── 05 Funnel ───────────────────────────────────────────────────────── */

.funnel-stage {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: var(--measure);
  margin: 0 auto;
}

.phone {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 0.7rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 2.2rem;
  background: var(--night);
  box-shadow: 0 40px 70px -30px rgba(22, 22, 15, 0.5), inset 0 0 0 2px #2a2a22;
}

.phone-notch {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  width: 5rem;
  height: 0.8rem;
  margin-left: -2.5rem;
  border-radius: 1rem;
  background: #000;
}

.phone-url {
  margin: 0 0.5rem 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  background: #2a2a22;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--night-muted);
  text-align: center;
}

.phone .fit {
  border-radius: 0 0 1.5rem 1.5rem;
}

.phone .cursor {
  top: 0;
  left: 0;
}

.pf {
  --dw: 390px;
  --dh: 720px;
  --pf-accent: #0f766e;
  background: var(--color-bg);
  font-family: var(--sans);
  color: var(--color-text);
}

.pf-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 500;
}

.pf-progress {
  height: 2px;
  margin: 1.5rem 1.25rem 0;
  background: var(--color-border);
}

.pf-progress span {
  display: block;
  height: 100%;
  width: 33%;
  background: var(--pf-accent);
  transition: width 600ms var(--ease);
}

.pf-steps {
  position: relative;
}

.pf-step {
  position: absolute;
  inset: 0;
  padding: 1rem 1.25rem;
  opacity: 0;
  transform: translateX(2rem);
  pointer-events: none;
  transition: opacity 200ms ease, transform 300ms var(--ease);
}

.pf-step.is-on {
  opacity: 1;
  transform: none;
  transition: opacity 360ms ease 200ms, transform 500ms var(--ease) 200ms;
}

.pf-step.is-past {
  transform: translateX(-2rem);
}

.pf-no {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--pf-accent);
}

.pf-step h4 {
  margin: 0.5rem 0 1.25rem;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pf-opt {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  text-align: left;
  transition: border-color 200ms ease, background 200ms ease;
}

.pf-opt b {
  font-weight: 500;
}

.pf-opt span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.pf-opt.is-picked {
  border-color: var(--pf-accent);
  background: rgba(15, 118, 110, 0.07);
}

.pf-cal {
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.pf-month {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

.pf-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.pf-days span {
  padding: 0.3rem 0;
  font-size: 0.72rem;
  color: var(--color-text-subtle);
}

.pf-days span.dow {
  font-family: var(--mono);
  font-size: 0.55rem;
}

.pf-days span.open {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.pf-days span.is-picked {
  border-color: var(--pf-accent);
  background: var(--pf-accent);
  color: #fff;
}

.pf-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin: 0.6rem 0 0.75rem;
}

.pf-slots span {
  padding: 0.35rem 0;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  font-size: 0.75rem;
  text-align: center;
  transition: background 200ms ease, color 200ms ease;
  animation: rise 300ms var(--ease) both;
}

.pf-slots span.is-taken {
  color: var(--color-text-subtle);
  text-decoration: line-through;
  background: var(--color-surface-2);
}

.pf-slots span.is-picked {
  border-color: var(--pf-accent);
  background: var(--pf-accent);
  color: #fff;
}

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.45rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.pf-input {
  display: block;
  min-height: 2rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  font-size: 0.8rem;
  color: var(--color-text);
}

.pf-btn {
  display: block;
  margin-top: 0.6rem;
  padding: 0.65rem;
  background: var(--pf-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  transition: transform 120ms ease, filter 200ms ease;
}

.pf-btn.is-pressed {
  transform: scale(0.97);
  filter: brightness(1.15);
}

.pf-done {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-top: 1.5rem;
  border-radius: 50%;
  background: var(--pf-accent);
  color: #fff;
  font-size: 1.6rem;
}

.pf-step.is-on .pf-done {
  animation: pop 600ms cubic-bezier(0.34, 1.56, 0.64, 1) both 150ms;
}

@keyframes pop {
  from {
    transform: scale(0);
  }
}

.pf-sub {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.funnel-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.flow-window .window-bar {
  justify-content: space-between;
}

.flow-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--success);
}

.flow {
  --dw: 660px;
  --dh: 540px;
  background-color: var(--color-bg);
  background-image: radial-gradient(rgba(22, 22, 15, 0.18) 1px, transparent 1.2px);
  background-size: 14px 14px;
}

.flow-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(22, 22, 15, 0.45);
  overflow: visible;
}

.fe {
  fill: none;
  stroke: rgba(22, 22, 15, 0.35);
  stroke-width: 1.4;
  transition: stroke 300ms ease;
}

.fe-choice {
  stroke: #8a6410;
}

.fe-wf {
  stroke: #2f6b47;
  stroke-dasharray: 2 4;
}

.fe.is-hot {
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: march 600ms linear infinite;
}

@keyframes march {
  to {
    stroke-dashoffset: -12;
  }
}

.fe-label {
  position: absolute;
  padding: 0 0.25rem;
  background: var(--color-bg);
  font-size: 0.6875rem;
}

.fn {
  position: absolute;
  width: 216px;
  min-height: 72px;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--color-border-strong);
  border-left: 3px solid var(--k, rgba(22, 22, 15, 0.45));
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: box-shadow 300ms ease, transform 300ms var(--ease), border-color 300ms ease;
}

.fn-choice {
  --k: #8a6410;
}

.fn-booking {
  --k: #b4321f;
}

.fn-form {
  --k: rgba(22, 22, 15, 0.45);
}

.fn-end {
  --k: #2f6b47;
}

.fn-wf {
  --k: #2f6b47;
  border-style: dashed;
  border-left-style: solid;
}

.fn.is-hot {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(180, 50, 31, 0.15), 0 10px 20px -10px rgba(22, 22, 15, 0.4);
}

.fn-kind {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.fn-kind b {
  padding: 0 0.3rem;
  background: var(--color-surface-2);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--color-text);
  transition: background 300ms ease;
}

.fn-kind b.is-bump {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.fn-title {
  margin-top: 0.3rem !important;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fn-sub {
  margin-top: 0.3rem !important;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funnel-events {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.funnel-events li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
  opacity: 0.35;
  transform: translateY(0.4rem);
  transition: opacity 400ms ease, transform 500ms var(--ease), border-color 400ms ease;
}

.funnel-events li .i {
  font-size: 1rem;
  margin-top: 0.1rem;
  color: var(--subtle);
}

.funnel-events b {
  display: block;
  font-weight: 500;
  color: var(--text);
}

.funnel-events li.is-on {
  opacity: 1;
  transform: none;
  border-color: var(--border-strong);
}

.funnel-events li.is-on .i {
  color: var(--success);
}

/* ── 06 Hub ──────────────────────────────────────────────────────────── */

.hub {
  position: relative;
  display: grid;
  grid-template-columns: 14rem minmax(4rem, 1fr) minmax(17rem, 22rem) minmax(16rem, 20rem);
  gap: 0 1.5rem;
  align-items: center;
}

.hub-channels {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  z-index: 2;
}

.hub-channels button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--surface);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms var(--ease);
}

.hub-channels button .i {
  font-size: 1.05rem;
  color: var(--muted);
}

.hub-channels button:hover {
  border-color: var(--text);
  transform: translateX(3px);
}

.hub-channels button[aria-selected="true"] {
  background: var(--solid);
  border-color: var(--solid);
  color: var(--solid-text);
}

.hub-channels button[aria-selected="true"] .i,
.hub-channels button[aria-selected="true"] .hub-dir {
  color: var(--solid-text);
}

.hub-dir {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--subtle);
}

.hub-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.wire {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.2;
  transition: stroke 300ms ease, stroke-width 300ms ease;
}

.wire.is-sel {
  stroke: var(--accent);
  stroke-width: 1.8;
}

.pkt {
  r: 3.5;
}

.pkt-in {
  fill: var(--accent);
}

.pkt-out {
  fill: var(--text);
}

.hub-core {
  grid-column: 3;
  z-index: 2;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: 0 30px 60px -36px rgba(22, 22, 15, 0.45);
}

.hub-core-label {
  color: var(--accent) !important;
}

.hub-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--color-border);
}

.hub-person .a-avatar {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.75rem;
}

.hub-person p {
  font-weight: 500;
}

.hub-person small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.hub-feed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 15.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.hub-feed li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 0.75rem;
  animation: feed-in 500ms var(--ease) both;
}

.hub-feed li .i {
  font-size: 0.85rem;
  align-self: center;
  color: var(--color-text-muted);
}

.hub-feed li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-feed li time {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--color-text-subtle);
}

.hub-feed li.is-out {
  border-left: 2px solid var(--color-text);
}

.hub-feed li.is-in {
  border-left: 2px solid var(--color-accent);
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(-0.6rem) scale(0.98);
  }
}

.hub-detail {
  grid-column: 4;
  z-index: 2;
  padding: 1.1rem 1.1rem 1.2rem;
  border-left: 2px solid var(--accent);
  background: var(--surface);
}

.hub-detail .label {
  color: var(--text);
  font-size: 0.75rem;
}

.hub-detail dl {
  margin: 0.4rem 0 0;
}

.hub-detail dt {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

.hub-detail dd {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.hub-detail.is-swap dd {
  animation: swap 420ms var(--ease) both;
}

@keyframes swap {
  from {
    opacity: 0;
    transform: translateX(0.5rem);
  }
}

/* ── 07 Modules ──────────────────────────────────────────────────────── */

.module-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.module-split .section-head {
  position: sticky;
  top: calc(var(--header) + 2rem);
}

.modules-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
  gap: 1rem;
  align-items: stretch;
}

.mod-settings {
  display: flex;
  flex-direction: column;
}

.mod-list {
  display: grid;
  flex: 1;
  grid-auto-rows: 1fr;
  padding: 0.25rem 1rem 0.25rem;
}

.mod-hint {
  padding: 0.6rem 1rem 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.mod-list label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.mod-list input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.mod-list label.is-flip span {
  animation: flash 700ms ease;
}

@keyframes flash {
  30% {
    color: var(--accent);
  }
}

.mod-rail-wrap {
  /* Tall enough for every module, so switching never resizes the pair. */
  height: 35rem;
}

.mod-rail-wrap .a-rail {
  width: 100%;
  border-right: 0;
}

.mod-rail-wrap .a-railfoot {
  display: none;
}

/* ── 08 Data band ────────────────────────────────────────────────────── */

.band {
  background: var(--night);
  color: var(--night-text);
  isolation: isolate;
  overflow: hidden;
}

.band .contours {
  background:
    radial-gradient(36rem 36rem at 90% 20%, transparent 40%, rgba(242, 240, 230, 0.07) 40.4%, transparent 40.8%),
    radial-gradient(36rem 36rem at 90% 20%, transparent 54%, rgba(242, 240, 230, 0.06) 54.4%, transparent 54.8%),
    radial-gradient(24rem 24rem at 8% 90%, transparent 46%, rgba(221, 91, 62, 0.18) 46.45%, transparent 46.9%);
}

.band .grid-field {
  background-image:
    linear-gradient(to right, rgba(242, 240, 230, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242, 240, 230, 0.05) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
}

.band h2 {
  color: var(--night-text);
}

.band .lede-sm {
  color: var(--night-muted);
}

.band .index {
  color: var(--night-accent);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--night-border);
  border: 1px solid var(--night-border);
}

.dtile {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.1rem 1.4rem;
  background: var(--night);
}

.dtile h3 {
  margin-top: 1.1rem;
  font-size: 1.25rem;
}

.dtile p {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--night-muted);
}

.dt-visual {
  position: relative;
  height: 10rem;
  border: 1px solid var(--night-border);
  background: var(--night-2);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--night-muted);
}

.dt-visual .label {
  color: var(--night-muted);
  font-size: 0.56rem;
}

[data-tenants] .dt-visual {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 0.6rem;
  padding: 0.7rem;
}

.tenant {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tenant .i {
  font-size: 1rem;
  color: var(--night-accent);
}

.tenant i {
  display: block;
  height: 0.55rem;
  background: rgba(242, 240, 230, 0.1);
}

.tenant i:nth-of-type(2) {
  width: 70%;
}

.tenant-wall {
  background: repeating-linear-gradient(to bottom, var(--night-accent) 0 6px, transparent 6px 10px);
}

.probe {
  position: absolute;
  top: 60%;
  left: 18%;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--night-text);
  animation: probe 3.2s var(--ease) infinite;
}

@keyframes probe {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  45% {
    transform: translateX(calc(var(--wall, 5.5rem)));
    background: var(--night-text);
  }
  52% {
    transform: translateX(calc(var(--wall, 5.5rem) - 0.4rem));
    background: var(--night-accent);
  }
  80% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.dt-audit ol {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  margin: 0;
  padding: 0.6rem 0.7rem;
  list-style: none;
  mask-image: linear-gradient(to bottom, transparent, #000 40%);
}

.dt-audit li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.75;
  animation: rise 400ms var(--ease) both;
}

.dt-audit li b {
  font-weight: 500;
  color: var(--night-text);
}

.dt-audit li em {
  font-style: normal;
  color: var(--night-accent);
}

.dt-ret {
  padding: 0.7rem;
}

.ret-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem !important;
}

.ret-state {
  color: var(--night-accent);
}

.ret-row {
  display: grid;
  grid-template-columns: 7.2rem 1fr 2.6rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ret-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ret-bar {
  height: 4px;
  background: rgba(242, 240, 230, 0.1);
}

.ret-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--night-accent);
  transition: width 1400ms var(--ease);
}

[data-retention].is-run .ret-bar i {
  width: var(--w);
}

.ret-row b {
  font-weight: 500;
  color: var(--night-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ret-foot {
  margin-top: 0.6rem !important;
  color: var(--night-muted);
}

.dt-model {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem;
}

.dtile .model-swap {
  height: 2.2rem;
  margin: 0;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 1.75rem;
  line-height: 2.2rem;
  letter-spacing: -0.02em;
  color: var(--night-text);
}

.model-swap span {
  display: inline-block;
  transition: transform 480ms var(--ease), opacity 300ms ease;
}

.model-swap span.is-out {
  transform: translateY(-100%);
  opacity: 0;
}

.model-out {
  position: relative;
  padding-top: 0.6rem !important;
  border-top: 1px dashed var(--night-border);
}

.model-pkt {
  position: absolute;
  top: -3px;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--night-accent);
  animation: leave 2.4s linear infinite;
}

@keyframes leave {
  from {
    left: 0;
    opacity: 1;
  }
  to {
    left: 100%;
    opacity: 0.2;
  }
}

/* ── 09 Timeline ─────────────────────────────────────────────────────── */

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 2rem 0 0;
  list-style: none;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}

.timeline::after {
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--tl, 0));
}

.timeline li {
  position: relative;
}

.tl-dot {
  position: absolute;
  top: -2rem;
  left: 0;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color 300ms ease, background 300ms ease;
}

.timeline li.is-reached .tl-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.timeline h3 {
  margin: 0.4rem 0 0.3rem;
  font-size: 1.45rem;
}

.timeline p {
  color: var(--muted);
  font-size: 0.95rem;
}

.fit-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.fit-chips > div {
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.fit-chips ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.fit-chips li {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--color-success);
  background: var(--color-success-soft);
  font-size: 0.85rem;
  color: var(--success);
}

.fit-chips li::before {
  content: "✓ ";
}

.fit-chips .no li {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
}

.fit-chips .no li::before {
  content: "✕ ";
}

/* ── 10 FAQ ──────────────────────────────────────────────────────────── */

.faq {
  border-top: 1px solid var(--border-strong);
  max-width: 52rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  cursor: pointer;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  list-style: none;
  transition: color 160ms ease;
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 300ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq-body {
  overflow: hidden;
}

.faq-body p {
  max-width: 42rem;
  padding: 0 0 1.2rem;
  color: var(--muted);
}

/* ── Close ───────────────────────────────────────────────────────────── */

.close {
  overflow: hidden;
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.close-inner {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
}

.close h2 {
  font-size: clamp(3rem, 8vw, 7rem);
  max-width: 12ch;
}

.close .lede {
  color: var(--night-muted);
}

.close .btn {
  background: var(--night-text);
  color: var(--night);
  border-color: var(--night-text);
}

.close .btn:hover {
  background: #fff;
}

.close .btn-ghost {
  background: transparent;
  color: var(--night-text);
  border-color: var(--night-border);
}

.close .btn-ghost:hover {
  background: rgba(242, 240, 230, 0.06);
  border-color: var(--night-text);
}

.rings {
  position: absolute;
  right: -12rem;
  top: 50%;
  z-index: -1;
  width: 44rem;
  height: 44rem;
  margin-top: -22rem;
  pointer-events: none;
}

.rings i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(242, 240, 230, 0.12);
  border-radius: 50%;
  animation: ring 8s linear infinite;
  opacity: 0;
}

.rings i:nth-child(2) {
  animation-delay: -2s;
}

.rings i:nth-child(3) {
  animation-delay: -4s;
  border-color: rgba(221, 91, 62, 0.3);
}

.rings i:nth-child(4) {
  animation-delay: -6s;
}

@keyframes ring {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem var(--pad) 1.4rem;
  border-top: 1px solid var(--night-border);
  background: var(--night);
  color: var(--night-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--night-text);
}

/* Demos pause their CSS loops while off screen. */
.is-paused,
.is-paused * {
  animation-play-state: paused !important;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .hub {
    grid-template-columns: 13rem minmax(3rem, 1fr) minmax(16rem, 20rem);
    gap: 1.25rem 1rem;
  }

  .hub-detail {
    grid-column: 1 / -1;
  }

  .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .nav-desktop {
    display: none;
  }

  .nav-drawer {
    display: block;
    position: relative;
  }

  .nav-drawer summary {
    list-style: none;
    cursor: pointer;
    min-height: 2.2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    font-size: 0.85rem;
  }

  .nav-drawer summary::-webkit-details-marker {
    display: none;
  }

  .nav-drawer nav {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 14rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 2px;
  }

  .nav-drawer a {
    text-decoration: none;
    padding: 0.35rem 0.2rem;
  }

  .brand-meta {
    display: none;
  }

  .playground,
  .funnel-stage,
  .module-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-split .section-head {
    position: static;
  }

  .funnel-stage .phone {
    width: min(21rem, 100%);
    margin: 0 auto;
  }

  .window-kpi {
    position: relative;
    right: auto;
    width: 100%;
    margin-top: 1rem;
  }

  .sales-stack {
    padding-bottom: 0;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 3rem;
  }

  .timeline::before,
  .timeline::after {
    display: none;
  }

}

@media (max-width: 760px) {
  #hero-app {
    --dw: 560px;
    --dh: 760px;
  }

  #hero-app .a-rail,
  .app-dialer .a-rail,
  .app-pipeline .a-rail {
    display: none;
  }

  #hero-app .a-threads {
    display: none;
  }

  #hero-app .a-agent {
    grid-template-columns: minmax(0, 1fr);
  }

  #hero-app .a-topbar .a-lang,
  #hero-app .a-chathead .a-doclink {
    display: none;
  }

  .window-sheet,
  .window-dots {
    display: none;
  }

  .demo-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-dialer {
    --dw: 560px;
    --dh: 900px;
  }

  .app-dialer .d-panes {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-dialer .d-list,
  .app-dialer .d-pad,
  .app-dialer .d-tools > span:last-child {
    display: none;
  }

  .app-dialer .d-center {
    padding: 1rem 0 1.5rem;
  }

  .app-dialer .d-side {
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }

  .app-dialer .d-turns {
    height: 18rem;
  }

  .app-pipeline {
    --dw: 860px;
    --dh: 640px;
  }

  .cw {
    width: 11.5rem;
    font-size: 0.62rem;
  }

  .cw-note {
    width: 7.5rem;
    font-size: 0.72rem;
  }

  .app-dossier {
    --dw: 600px;
    --dh: 760px;
  }

  .app-dossier .a-rail,
  .app-dossier .c-toolbar > :nth-child(n + 3),
  .app-dossier .c-table th:nth-child(n + 3),
  .app-dossier .c-table td:nth-child(n + 3) {
    display: none;
  }

  .app-dossier .a-dossier {
    width: 34rem;
  }

  .hub {
    grid-template-columns: minmax(0, 1fr);
  }

  .hub-channels {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .hub-channels button {
    flex: 0 0 auto;
  }

  .hub-wires {
    display: none;
  }

  .hub-core,
  .hub-detail {
    grid-column: 1;
  }

  .funnel-events {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fit-chips {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The tool list becomes chips; a legend replaces the per-row labels. */
  .tool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem 0;
  }

  .tool-list li {
    padding: 0.2rem 0.45rem;
    border: 1px solid var(--border);
  }

  .tool-list li:has(.t-write) {
    border-color: transparent;
    background: var(--color-warning-soft);
  }

  .tool-list li.is-hot {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .tool-list li.is-hot::before {
    display: none;
  }

  .tool-list code {
    font-size: 0.7rem;
  }

  .tool-list .t-read,
  .tool-list .t-write {
    display: none;
  }

  .tool-legend {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0.6rem 0.9rem 0;
  }

  .tool-legend .t-read {
    border: 1px solid var(--border);
  }

  .tool-foot {
    padding-top: 0.5rem;
    font-size: 0.8rem;
  }

  .modules-demo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  /* Narrower design sizes on phones, so the mockups stay legible. */
  #hero-app {
    --dw: 430px;
    --dh: 700px;
  }

  .app-dialer {
    --dw: 430px;
    --dh: 860px;
  }

  .app-dossier {
    --dw: 460px;
    --dh: 720px;
  }

  .app-dossier .a-dossier {
    width: 27rem;
  }
}

@media (max-width: 640px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-cta {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ticker-track {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Legal pages (/privacy, /terms) ──────────────────────────────────── */

.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad) clamp(3rem, 8vw, 6rem);
}

.legal-eyebrow {
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.legal-meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal nav.legal-toc {
  margin: 2rem 0 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  font-size: 0.92rem;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.3rem;
  columns: 2 16rem;
  column-gap: 2rem;
}

.legal-toc a {
  color: var(--muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--text);
}

.legal section {
  margin-top: 2.6rem;
  scroll-margin-top: calc(var(--header) + 1rem);
}

.legal h2 {
  margin-bottom: 0.9rem;
  font-size: 1.45rem;
  line-height: 1.15;
}

.legal h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.legal p,
.legal ul,
.legal ol {
  margin: 0 0 0.85rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li {
  margin-bottom: 0.35rem;
}

.legal a {
  color: var(--accent);
}

.legal-note {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.legal-table {
  width: 100%;
  margin: 0.4rem 0 1rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.legal-table th,
.legal-table td {
  padding: 0.55rem 0.6rem 0.55rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-back {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .legal-table thead {
    display: none;
  }

  .legal-table tr {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
  }

  .legal-table td {
    display: block;
    padding: 0.1rem 0;
    border: 0;
  }

  .legal-table td:first-child {
    font-weight: 500;
  }

  .legal-table td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--muted);
  }
}
