/* MailAgent landing — Vercel-style dark monochrome */
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700&display=swap");

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --surface: #111111;
  --surface-hover: #1a1a1a;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #ededed;
  --text-muted: #888888;
  --text-dim: #666666;
  --accent: #ededed;
  --accent-bright: #ffffff;
  --accent-soft: #888888;
  --accent-text: #000000;
  --btn-bg: #ededed;
  --btn-bg-hover: #ffffff;
  --btn-border: #ededed;
  --btn-glow: rgba(255, 255, 255, 0.08);
  --glow: rgba(255, 255, 255, 0.04);
  --glow-strong: rgba(255, 255, 255, 0.08);
  --grid-size: 64px;
  --grid-line: rgba(255, 255, 255, 0.06);
  --grid-line-strong: rgba(255, 255, 255, 0.1);
  --grid-dot: rgba(255, 255, 255, 0.12);
  --surface-dot-gap: 32px;
  --surface-dot-hover-r: 128px;
  --code-green: #7ee787;
  --code-blue: #79c0ff;
  --code-purple: #d2a8ff;
  --code-orange: #ffa657;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-btn: 999px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Syne", var(--font);
  --font-mono: "Geist Mono", "SF Mono", "Fira Code", ui-monospace, monospace;
  --max: 1160px;
  --nav-h: 68px;
  --px: 24px;
  --section-y: 96px;
  --hero-top: 72px;
  --stack-gap: 48px;
  --scrollbar-size: 8px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(255, 255, 255, 0.14);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.24);
  --divider-gradient: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--text) 6%, transparent) 12%,
    color-mix(in srgb, var(--text) 14%, transparent) 30%,
    color-mix(in srgb, var(--text) 14%, transparent) 70%,
    color-mix(in srgb, var(--text) 6%, transparent) 88%,
    transparent 100%
  );
  --heading-gradient: linear-gradient(
    165deg,
    #ffffff 0%,
    #ececec 32%,
    #b8b8b8 72%,
    #8a8a8a 100%
  );
  --heading-gradient-hero: linear-gradient(
    155deg,
    #ffffff 0%,
    #f4f4f4 18%,
    #d6d6d6 52%,
    #9a9a9a 100%
  );
  --heading-gradient-subtle: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.82) 45%,
    rgba(255, 255, 255, 0.64) 100%
  );
}

@media (min-width: 768px) {
  :root {
    --px: 32px;
    --section-y: 120px;
    --hero-top: 96px;
  }
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

/* Custom scrollbar — WebKit (Chrome, Safari, Edge) */
* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Глобальный фон страницы — без сетки */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: var(--bg);
}

/* Верхний fade под прозрачный header (только в hero-зоне) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    rgba(0, 0, 0, 0.88) 56px,
    transparent calc(var(--nav-h) + 72px)
  );
  mask-image: linear-gradient(to bottom, #000 0%, #000 720px, transparent 100%);
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

img {
  max-width: 100%;
  height: auto;
}

/* Single landing column: nav, hero, sections, footer — shared vertical rhythm */
.site-container,
main.landing .section-inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--px);
  box-sizing: border-box;
}

/* Full-width section backgrounds; content only in .site-container */
main.landing > .page-section,
main.landing > .cta-block,
main.landing > .value-block {
  width: 100%;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition:
    opacity 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.nav.is-scrolled::before,
.nav.is-open::before {
  opacity: 1;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(var(--max), calc(100% - 2 * var(--px)));
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22) 20%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.22) 80%,
    transparent
  );
  opacity: 0;
  transition: opacity 0.28s ease;
}

.nav.is-scrolled::after,
.nav.is-open::after {
  opacity: 0.65;
}

.nav-inner {
  position: relative;
  z-index: 1;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.nav-start {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, #333333 0%, #171717 100%);
  box-shadow: none;
  display: grid;
  place-items: center;
}

.logo-mark svg {
  width: 16px;
  height: 16px;
}

.nav-links {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 14px;
  color: var(--text-muted);
  min-width: 0;
}

.nav-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-github {
  display: none;
}

.nav-links > a:hover,
.nav-dropdown-trigger:hover {
  color: var(--text);
}

/* Dropdown nav */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.nav-dropdown-trigger svg {
  width: 12px;
  height: 12px;
  opacity: 0.55;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.nav-dropdown.is-open .nav-dropdown-trigger,
.nav-dropdown:hover .nav-dropdown-trigger {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-dropdown.is-open .nav-dropdown-trigger svg,
.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
  opacity: 0.9;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  gap: 2px;
  min-width: 300px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
}

/* Мост между триггером и панелью — без мерцания при hover */
.nav-dropdown-panel::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown.is-open .nav-dropdown-panel,
.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-item {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.nav-dropdown-item strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-dropdown-item span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.nav-links > a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid transparent;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.nav-links > a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-links > a[aria-current="page"] {
  color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 899px) {
  .nav-end .nav-actions {
    display: none;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

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

.btn-ghost:hover {
  color: var(--text);
}

.btn-primary {
  color: var(--accent-text);
  background: var(--btn-bg);
  border-color: var(--btn-border);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  box-shadow: none;
}

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

/* Compact nav buttons (do not duplicate hero primary) */
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.btn-nav-cta {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.btn-nav-cta:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.nav-actions .btn-sm {
  min-height: 32px;
}

.btn-nav-console {
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--surface);
}

/* —— Hero block (hero + repo + stack) —— */
/* Hero заезжает под прозрачный sticky header на лендинге */
body[data-site="marketing"] .hero-block {
  margin-top: calc(-1 * var(--nav-h));
}

body[data-site="marketing"] .hero-block .hero {
  padding-top: calc(var(--nav-h) + var(--hero-top));
}

.hero-block {
  --surface-dot-x: -999px;
  --surface-dot-y: -999px;
  position: relative;
  isolation: isolate;
  padding-bottom: 0;
  background: var(--bg);
}

/* Слой белых точек по кругу у курсора (hero + value-block) */
.dot-surface-hover {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.95) 1px, transparent 1px);
  background-size: var(--surface-dot-gap) var(--surface-dot-gap);
  background-position: 0 0;
  transition: opacity 0.2s ease;
  -webkit-mask-image: radial-gradient(
    circle var(--surface-dot-hover-r) at var(--surface-dot-x) var(--surface-dot-y),
    #000 0%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle var(--surface-dot-hover-r) at var(--surface-dot-x) var(--surface-dot-y),
    #000 0%,
    transparent 100%
  );
}

.hero-block .dot-surface-hover {
  -webkit-mask-image:
    radial-gradient(
      circle var(--surface-dot-hover-r) at var(--surface-dot-x) var(--surface-dot-y),
      #000 0%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 calc(var(--nav-h) + 32px),
      #000 36%,
      rgba(0, 0, 0, 0.85) 48%,
      rgba(0, 0, 0, 0.45) 58%,
      rgba(0, 0, 0, 0.12) 68%,
      transparent 76%
    );
  mask-image:
    radial-gradient(
      circle var(--surface-dot-hover-r) at var(--surface-dot-x) var(--surface-dot-y),
      #000 0%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 calc(var(--nav-h) + 32px),
      #000 36%,
      rgba(0, 0, 0, 0.85) 48%,
      rgba(0, 0, 0, 0.45) 58%,
      rgba(0, 0, 0, 0.12) 68%,
      transparent 76%
    );
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.is-dot-hover .dot-surface-hover {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .dot-surface-hover {
    display: none;
  }
}

.hero-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.07), transparent 42%),
    radial-gradient(circle, var(--grid-dot) 1px, transparent 1px);
  background-size:
    100% 100%,
    var(--surface-dot-gap) var(--surface-dot-gap);
  background-position: center top, 0 0;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 calc(var(--nav-h) + 32px),
    #000 36%,
    rgba(0, 0, 0, 0.85) 48%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.12) 68%,
    transparent 76%
  );
}

.hero-block::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(280px, 48vh, 480px);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.18) 22%,
    rgba(0, 0, 0, 0.52) 48%,
    rgba(0, 0, 0, 0.82) 72%,
    var(--bg) 100%
  );
}

.hero-block > *:not(.dot-surface-hover) {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--hero-top) 0 0;
}

.hero-split {
  min-height: clamp(620px, 76svh, 720px);
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: start;
}

.hero-split .hero-inner {
  width: 100%;
  align-items: center;
  grid-template-columns: minmax(0, 0.96fr) minmax(420px, 1.04fr);
  gap: clamp(40px, 5vw, 72px);
  padding-block: 74px 48px;
}

.hero-split .hero-copy {
  max-width: 620px;
}

.hero-split .hero-lead {
  max-width: 590px;
}

.hero-split .hero-ctas {
  justify-content: flex-start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.pill-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: none;
  animation: pill-pulse 2.4s ease-in-out infinite;
}

@keyframes pill-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Градиентные заголовки лендинга (один элемент — background-clip безопасен) */
main.landing .hero-copy h1,
main.landing .section-title,
main.landing .value-block-title,
main.landing .cta-inner h2 {
  background-image: var(--heading-gradient);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

main.landing .hero-copy h1 {
  background-image: var(--heading-gradient-hero);
}

main.landing .bento-copy h3,
main.landing .step h3,
main.landing .feature-card h3,
main.landing .workspace-card h3,
main.landing .qa-pain-card h3 {
  background-image: var(--heading-gradient-subtle);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  main.landing .hero-copy h1,
  main.landing .section-title,
  main.landing .value-block-title,
  main.landing .cta-inner h2,
  main.landing .bento-copy h3,
  main.landing .step h3,
  main.landing .feature-card h3,
  main.landing .workspace-card h3,
  main.landing .qa-pain-card h3 {
    color: var(--text);
    background: none;
    -webkit-text-fill-color: unset;
  }
}

.hero-lead {
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 32rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-proof {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 720px) {
  .hero-split {
    min-height: auto;
  }

  .hero-split .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 42px 28px;
  }

  .hero-code-panel .code-body {
    max-height: 270px;
  }
}

/* —— Code panel —— */
.code-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 24px 48px rgba(0, 0, 0, 0.5);
}

.code-tabs {
  display: flex;
  gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.code-tab {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.code-tab.active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

.code-body {
  position: relative;
  --code-copy-inset: 12px;
  --code-copy-size: 32px;
  --code-copy-gutter: calc(var(--code-copy-inset) + var(--code-copy-size) + 16px);
  padding: 20px var(--code-copy-gutter) 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.code-body pre {
  margin: 0;
  min-width: 48ch;
}

.code-copy-btn {
  position: absolute;
  top: var(--code-copy-inset);
  right: var(--code-copy-inset);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--code-copy-size);
  height: var(--code-copy-size);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.code-copy-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.code-copy-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.code-copy-btn svg {
  width: 16px;
  height: 16px;
}

.code-copy-btn .code-copy-check {
  display: none;
}

.code-copy-btn.is-copied {
  color: var(--code-green);
  border-color: rgba(126, 231, 135, 0.35);
  background: rgba(126, 231, 135, 0.08);
}

.code-copy-btn.is-copied .code-copy-icon {
  display: none;
}

.code-copy-btn.is-copied .code-copy-check {
  display: block;
}

.code-body pre code {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
}

.t-kw {
  color: var(--code-purple);
}
.t-fn {
  color: var(--code-blue);
}
.t-str {
  color: var(--code-green);
}
.t-cm {
  color: var(--text-dim);
}
.t-key {
  color: var(--code-orange);
}

/* —— Sections —— */
.page-section {
  padding-block: var(--section-y);
  border-top: none;
}

.page-section::before,
.cta-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--max), calc(100% - 2 * var(--px)));
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  background: var(--divider-gradient);
}

.value-block + .page-section::before,
#mcp.page-section::before,
#mcp + .page-section::before {
  display: none;
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* Landing: unified centered section intros */
main.landing .section-head {
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 56px;
}

main.landing .section-head .section-title {
  text-wrap: balance;
}

main.landing .section-head .section-desc {
  margin-bottom: 0;
  max-width: none;
}

.section-title {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}

.section-desc {
  margin: 0 0 56px;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
}

.section-desc:last-child {
  margin-bottom: 0;
}

/* —— Hero platform: strip + steps (Sessy-style) —— */
.hero-platform {
  position: relative;
  z-index: 1;
  background: transparent;
}

.hero-platform-strip {
  border-top: none;
  border-bottom: none;
  padding-block: 28px 36px;
}

.hero-platform-strip-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero-platform-logos {
  --hero-platform-logo-slot-h: clamp(8px, 1.375vw, 20px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-platform-logo-slot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  height: var(--hero-platform-logo-slot-h);
  margin: 0;
  padding: 0;
}

.hero-platform-logo-slot:hover .hero-platform-logo-img {
  opacity: 0.36;
}

/* Figma export frames — 20px tall (24 − 4), native aspect ratio */
.hero-platform-logo-slot--cloudflare {
  width: calc(var(--hero-platform-logo-slot-h) * 368 / 32);
}

.hero-platform-logo-slot--resend {
  width: calc(var(--hero-platform-logo-slot-h) * 151 / 32);
}

.hero-platform-logo-slot--neon {
  width: calc(var(--hero-platform-logo-slot-h) * 112 / 32);
}

.hero-platform-logo-slot--mcp {
  width: calc(var(--hero-platform-logo-slot-h) * 433 / 32);
}

.hero-platform-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.22;
  transition: opacity 0.2s ease;
}

.hero-platform-logo-img:hover {
  opacity: 0.36;
}

/* —— How (post-platform funnel) —— */
.landing-steps .step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .hero-platform-logos {
    row-gap: 12px;
  }
}

/* —— Dot surfaces: value-block, MCP section —— */
.value-block,
#mcp.page-section {
  --surface-dot-x: -999px;
  --surface-dot-y: -999px;
  isolation: isolate;
}

.value-block::after,
#mcp.page-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1px);
  background-size: var(--surface-dot-gap) var(--surface-dot-gap);
  background-position: 0 0;
}

.value-block > *:not(.dot-surface-hover),
#mcp.page-section > *:not(.dot-surface-hover) {
  position: relative;
  z-index: 1;
}

/* —— Value block (Sessy-style positioning) —— */
.value-block {
  border-top: none;
  padding-block: clamp(64px, 10vw, 96px);
  background: var(--bg);
}

.value-block-inner {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.value-block-title {
  margin: 0 0 24px;
  font-size: clamp(1.625rem, 3.6vw, 2.375rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.value-block-lead {
  margin: 0 0 40px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
}

.value-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-bottom: 28px;
}

.value-equation-term {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.value-equation-term--accent {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.value-equation-op {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dim);
}

.value-block-foot {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}

.value-block-foot code {
  font-size: 0.92em;
}

/* —— GitHub repo row (legacy class names for icon/text) —— */
.repo-bar-icon {
  display: flex;
  color: var(--text);
}

.repo-bar-icon svg {
  width: 22px;
  height: 22px;
}

.repo-bar-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
}

.repo-bar-text strong {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.repo-bar-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.repo-bar-arrow {
  color: var(--text-dim);
  font-size: 16px;
  flex-shrink: 0;
}

/* —— Stack chips —— */
.stack-label {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 639px) {
  .stack-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .stack-list::-webkit-scrollbar {
    display: none;
  }

  .stack-chip {
    flex-shrink: 0;
  }
}

@media (min-width: 900px) {
  .stack-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stack-chip {
    width: 100%;
  }
}

@media (min-width: 1100px) {
  .stack-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}

.stack-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.stack-chip-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  flex-shrink: 0;
}

.stack-chip-icon svg {
  width: 13px;
  height: 13px;
}

.stack-chip-tag {
  padding: 2px 5px;
  margin-left: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

/* —— Platform bento (thirdweb-style product blocks) —— */
.platform-section {
  padding-block: var(--section-y);
  background: var(--bg);
}

.hero-block + .platform-section::before {
  display: none;
}

/* —— AgentsOS catalog —— */
.agents-catalog-section {
  padding-block: var(--section-y);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.045), transparent 42%),
    var(--bg);
}

.agents-catalog-head {
  max-width: 720px;
}

.agent-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.agent-catalog-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition-property: transform, border-color, background-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.agent-catalog-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 56px rgba(0, 0, 0, 0.36);
}

.agent-catalog-card--live {
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.025);
}

.agent-catalog-card-top,
.agent-catalog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agent-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.agent-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding-inline: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-status--live {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.agent-catalog-copy {
  margin-block: 36px 28px;
}

.agent-kicker {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-catalog-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.agent-catalog-copy p:last-child {
  margin: 0;
  max-width: 34rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.agent-catalog-card > .agent-text-link,
.agent-catalog-actions {
  margin-top: auto;
}

.agent-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition-property: color;
  transition-duration: 150ms;
}

.agent-text-link:hover {
  color: var(--text);
}

.agent-catalog-actions .btn {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .agent-catalog-grid {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .agent-catalog-card {
    min-height: 0;
    padding: 24px;
  }

  .agent-catalog-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

.bento-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bento-card--wide {
    grid-column: span 2;
  }
}

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: transparent;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.bento-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(255, 255, 255, 0.05);
}

.bento-card::before {
  display: none;
}

.bento-illustration {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  height: 168px;
  min-height: 168px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(255, 255, 255, 0.07), transparent 65%),
    rgba(10, 10, 10, 0.75);
  overflow: hidden;
}

.bento-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 45%);
}

.bento-illustration--stack {
  height: 188px;
  min-height: 188px;
}

.bento-illustration--stack .bento-art {
  width: min(100%, 290px);
}

.bento-illustration--qa .bento-art {
  width: min(100%, 290px);
}

.bento-art {
  position: relative;
  z-index: 1;
  width: min(100%, 260px);
  height: auto;
  display: block;
}

.bento-card--wide .bento-illustration svg,
.bento-card--wide .bento-art {
  width: min(100%, 540px);
}

.bento-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bento-copy h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.bento-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.bento-link {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.bento-link:hover {
  color: var(--text);
}

/* Bento illustration animations */
@keyframes bento-flow-dash {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes bento-packet-slide {
  0%,
  18% {
    transform: translateX(12px);
  }
  50%,
  62% {
    transform: translateX(148px);
  }
  88%,
  100% {
    transform: translateX(12px);
  }
}

@keyframes bento-check-draw {
  0%,
  58% {
    stroke-dashoffset: 12;
  }
  66%,
  74% {
    stroke-dashoffset: 0;
  }
  86%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes bento-check-badge {
  0%,
  54% {
    opacity: 0;
  }
  62%,
  76% {
    opacity: 1;
  }
  86%,
  100% {
    opacity: 0;
  }
}

@keyframes bento-result-in {
  0%,
  46% {
    opacity: 0.65;
  }
  62%,
  100% {
    opacity: 1;
  }
}

@keyframes bento-hub-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
  }
}

@keyframes bento-ring-expand {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.75;
  }
}

@keyframes bento-node-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes bento-worker-active {
  0%,
  100% {
    stroke-opacity: 0.35;
    fill-opacity: 0.45;
  }
  8%,
  28% {
    stroke-opacity: 0.72;
    fill-opacity: 0.62;
  }
}

@keyframes bento-qa-otp {
  0%,
  100% {
    opacity: 0.25;
  }
  38%,
  62% {
    opacity: 1;
  }
}

@keyframes bento-qa-line-pulse {
  0%,
  100% {
    stroke-opacity: 0.2;
  }
  12%,
  32% {
    stroke-opacity: 0.45;
  }
}

@keyframes bento-qa-hub-pulse {
  0%,
  100% {
    stroke-opacity: 0.35;
  }
  12%,
  32% {
    stroke-opacity: 0.58;
  }
}

@keyframes bento-layer-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes bento-beam-dash {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes bento-dot-travel {
  0% {
    transform: translateX(0);
    opacity: 0.3;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(132px);
    opacity: 0.25;
  }
}

@keyframes bento-keys-ttl {
  0%,
  14% {
    transform: scaleX(1);
    opacity: 0.75;
  }
  72%,
  82% {
    transform: scaleX(0.2);
    opacity: 0.4;
  }
  100% {
    transform: scaleX(1);
    opacity: 0.75;
  }
}

.bento-illustration--verify .art-flow {
  animation: bento-flow-dash 2.4s linear infinite;
}

.bento-illustration--verify .art-packet {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-packet-slide 5s ease-in-out infinite;
}

.bento-illustration--verify .art-result {
  animation: bento-result-in 5s ease-in-out infinite;
}

.bento-illustration--verify .art-check-badge {
  animation: bento-check-badge 5s ease-in-out infinite;
}

.bento-illustration--verify .art-check {
  stroke-dasharray: 12;
  stroke-dashoffset: 12;
  animation: bento-check-draw 5s ease-in-out infinite;
}

.bento-illustration--mcp .art-hub {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-hub-pulse 2.8s ease-in-out infinite;
}

.bento-illustration--mcp .art-ring--1 {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-ring-expand 2.8s ease-in-out infinite;
}

.bento-illustration--mcp .art-ring--2 {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-ring-expand 2.8s ease-in-out 0.4s infinite;
}

.bento-illustration--mcp .art-node--1 {
  animation: bento-node-pulse 2.4s ease-in-out infinite;
}

.bento-illustration--mcp .art-node--2 {
  animation: bento-node-pulse 2.4s ease-in-out 0.6s infinite;
}

.bento-illustration--mcp .art-node--3 {
  animation: bento-node-pulse 2.4s ease-in-out 1.2s infinite;
}

.bento-illustration--mcp .art-node--4 {
  animation: bento-node-pulse 2.4s ease-in-out 1.8s infinite;
}

.bento-illustration--qa .art-worker--1 .art-worker-frame {
  animation: bento-worker-active 4.8s ease-in-out infinite;
}

.bento-illustration--qa .art-worker--2 .art-worker-frame {
  animation: bento-worker-active 4.8s ease-in-out 1.6s infinite;
}

.bento-illustration--qa .art-worker--3 .art-worker-frame {
  animation: bento-worker-active 4.8s ease-in-out 3.2s infinite;
}

.bento-illustration--qa .art-qa-flow--center {
  animation: bento-qa-line-pulse 4.8s ease-in-out 1.6s infinite;
}

.bento-illustration--qa .art-qa-hub-box {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-qa-hub-pulse 4.8s ease-in-out 1.6s infinite;
}

.bento-illustration--qa .art-qa-result .art-otp {
  animation: bento-qa-otp 4.8s ease-in-out 1.6s infinite;
}

.bento-illustration--stack .art-layer--1 {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-layer-float 4.2s ease-in-out infinite;
}

.bento-illustration--stack .art-layer--2 {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-layer-float 4.2s ease-in-out 0.5s infinite;
}

.bento-illustration--stack .art-layer--3 {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-layer-float 4.2s ease-in-out 1s infinite;
}

.bento-illustration--stack .art-beam {
  animation: bento-beam-dash 1.4s linear infinite;
}

.bento-illustration--stack .art-pulse-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: bento-dot-travel 3.5s ease-in-out infinite;
}

.bento-illustration--keys .art-ttl-bar {
  transform-box: fill-box;
  transform-origin: left center;
  animation: bento-keys-ttl 5s ease-in-out infinite;
}

.bento-card:hover .bento-illustration--keys .art-ttl-bar {
  animation-duration: 3.6s;
}

.bento-card:hover .bento-illustration--verify .art-packet,
.bento-card:hover .bento-illustration--verify .art-result,
.bento-card:hover .bento-illustration--verify .art-check-badge,
.bento-card:hover .bento-illustration--verify .art-check {
  animation-duration: 3.8s;
}

.bento-card:hover .bento-illustration--verify .art-flow {
  animation-duration: 1.8s;
}

.bento-card:hover .bento-illustration--mcp .art-hub,
.bento-card:hover .bento-illustration--mcp .art-ring--1,
.bento-card:hover .bento-illustration--mcp .art-ring--2 {
  animation-duration: 2s;
}

.bento-card:hover .bento-illustration--qa .art-worker-frame,
.bento-card:hover .bento-illustration--qa .art-qa-result .art-otp {
  animation-duration: 3.6s;
}

@media (prefers-reduced-motion: reduce) {
  .bento-illustration--verify .art-flow,
  .bento-illustration--verify .art-packet,
  .bento-illustration--verify .art-result,
  .bento-illustration--verify .art-check-badge,
  .bento-illustration--verify .art-check,
  .bento-illustration--mcp .art-hub,
  .bento-illustration--mcp .art-ring--1,
  .bento-illustration--mcp .art-ring--2,
  .bento-illustration--mcp .art-node--1,
  .bento-illustration--mcp .art-node--2,
  .bento-illustration--mcp .art-node--3,
  .bento-illustration--mcp .art-node--4,
  .bento-illustration--qa .art-worker-frame,
  .bento-illustration--qa .art-qa-result .art-otp,
  .bento-illustration--qa .art-qa-hub-box,
  .bento-illustration--stack .art-layer--1,
  .bento-illustration--stack .art-layer--2,
  .bento-illustration--stack .art-layer--3,
  .bento-illustration--stack .art-beam,
  .bento-illustration--stack .art-pulse-dot {
    animation: none !important;
  }

  .bento-illustration--keys .art-ttl-bar {
    animation: none !important;
    transform: scaleX(0.2);
    opacity: 0.4;
  }

  .bento-illustration--verify .art-check-badge {
    opacity: 0;
  }

  .bento-illustration--verify .art-check {
    stroke-dashoffset: 0;
  }

  .bento-illustration--qa .art-worker--2 .art-worker-frame {
    stroke-opacity: 0.72;
    fill-opacity: 0.62;
  }

  .bento-illustration--qa .art-qa-result .art-otp {
    opacity: 1;
  }

  .bento-illustration--qa .art-qa-hub-box {
    stroke-opacity: 0.58;
  }

  .bento-illustration--verify .art-packet {
    transform: translateX(148px);
    opacity: 1;
  }

  .bento-illustration--verify .art-result {
    opacity: 1;
  }
}

.workspace-section {
  background: var(--bg);
}

.workspace-grid {
  display: grid;
  min-width: 0;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.workspace-card {
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 10, 0.72);
}

.workspace-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.workspace-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.workspace-card code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workspace-code-panel {
  margin-top: 8px;
}

.trust-strip {
  margin-top: 48px;
  padding: 0;
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-logos li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.trust-logos svg {
  width: 16px;
  height: 16px;
  color: var(--text);
}

/* —— Features grid —— */
.features-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 8 cards — 4×2, no empty 9th cell with 3 columns */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  padding: 28px;
  background: var(--bg);
  transition: background 0.15s;
}

.feature-card:hover {
  background: var(--surface);
}

.feature-card:hover .feature-icon {
  border-color: var(--border-strong);
  color: var(--accent-bright);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

/* Stroke icons — Resend-style, matches logo mark */
.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* —— MCP tools table (compare-table style) —— */
.tools-table {
  min-width: 720px;
}

.tools-table .tool-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.tools-table td:not(.tool-name) {
  color: var(--text-muted);
}

.tools-table th:first-child,
.tools-table td.tool-name {
  width: 34%;
}

.tools-table th:nth-child(2),
.tools-table td:nth-child(2) {
  width: auto;
}

.tools-table th:nth-child(3),
.tools-table td:nth-child(3) {
  width: 12%;
  white-space: nowrap;
}

.tools-table td:nth-child(3).compare-yes {
  color: var(--accent-bright);
}

/* —— Steps —— */
.steps {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.step p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* —— Compare —— */
.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: var(--surface);
  font-weight: 500;
  color: var(--text-muted);
}

.compare-table td {
  background: var(--bg-elevated);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-yes {
  color: var(--accent-bright);
}

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

.table-scroll {
  margin: 0;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* —— CTA —— */
.cta-block {
  text-align: center;
  padding-block: var(--section-y);
  border-top: none;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.cta-block > .site-container {
  position: relative;
  z-index: 1;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, var(--glow-strong) 0%, transparent 68%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 55%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  max-width: 32rem;
  margin: 0 auto;
}

.cta-inner h2 {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0;
}

.cta-inner p {
  margin: 0 0 28px;
  color: var(--text-muted);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* —— Footer (Navorina-inspired legal bar + wordmark) —— */
.footer {
  --footer-link: color-mix(in srgb, var(--text) 52%, transparent);
  --footer-link-hover: var(--text);
  --footer-meta: color-mix(in srgb, var(--text) 36%, transparent);
  --footer-wordmark-gradient: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.06) 22%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.06) 78%,
    rgba(255, 255, 255, 0.03) 100%
  );
  --footer-wordmark-gradient-inview: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.1) 22%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.1) 78%,
    rgba(255, 255, 255, 0.06) 100%
  );
  --footer-wordmark-gradient-hover: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.14) 22%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.14) 78%,
    rgba(255, 255, 255, 0.08) 100%
  );

  position: relative;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 3.75rem);
  border-top: none;
  overflow-x: clip;
  overflow-y: visible;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--max), calc(100% - 2 * var(--px)));
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  background: var(--divider-gradient);
}

.footer > .site-container {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 48px;
  }
}

@media (min-width: 900px) {
  .footer-inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-bright);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 4px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 14px;
  color: var(--text-dim);
}

.footer-col a:hover {
  color: var(--accent-bright);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding-block-start: clamp(1.75rem, 3.5vw, 2.5rem);
  position: relative;
}

.footer-legal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  background: var(--divider-gradient);
}

@media (min-width: 768px) {
  .footer-legal {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }
}

.footer-legal-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--footer-meta);
}

.footer-legal-copy a {
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-legal-copy a:hover,
.footer-legal-copy a:focus-visible {
  color: var(--footer-link-hover);
}

.footer-heart {
  color: color-mix(in srgb, var(--text) 45%, transparent);
  font-size: 0.92em;
}

.footer-wordmark-link {
  display: block;
  width: 100%;
  max-width: none;
  margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
  padding-bottom: 0.28em;
  overflow: visible;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  outline-offset: 4px;
  opacity: 0.62;
  transition: opacity 0.35s ease;
}

.footer-wordmark-link:hover,
.footer-wordmark-link:focus-visible {
  opacity: 0.78;
}

.footer-wordmark {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding-inline: 0;
  padding-bottom: 0.14em;
  box-sizing: border-box;
  line-height: 1.12;
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.045em;
  text-transform: none;
  font-size: clamp(2.75rem, 9.5vw, 6.25rem);
  user-select: none;
  overflow: visible;
  transform: translate3d(0, 0, 0);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-wordmark-char {
  --char-i: 0;
  --char-count: 9;
  --footer-wordmark-lift: 0.04em;
  flex: 0 0 auto;
  text-align: center;
  display: inline-block;
  line-height: inherit;
  color: rgba(255, 255, 255, 0.09);
  transform: translate3d(0, var(--footer-wordmark-lift), 0);
  transition:
    color 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--char-i) * 0.032s);
}

.footer-wordmark.is-inview .footer-wordmark-char {
  color: rgba(255, 255, 255, 0.15);
  transform: translate3d(0, 0, 0);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .footer-wordmark-link:hover .footer-wordmark,
  .footer-wordmark-link:focus-visible .footer-wordmark {
    transform: translate3d(0, -0.01em, 0) scale(1.004);
  }

  .footer-wordmark-link:hover .footer-wordmark-char,
  .footer-wordmark-link:focus-visible .footer-wordmark-char {
    color: rgba(255, 255, 255, 0.2);
    transform: translate3d(0, -0.03em, 0);
    transition-delay: calc(var(--char-i) * 0.04s);
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-wordmark,
  .footer-wordmark-char {
    transition: none !important;
  }

  .footer-wordmark-char {
    color: rgba(255, 255, 255, 0.15);
    transform: none !important;
  }
}

/* —— QA section —— */
.qa-section {
  background: var(--bg);
}

.qa-pain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .qa-pain-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.qa-pain-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.qa-pain-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.qa-pain-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.qa-code-panel {
  margin-bottom: 20px;
}

.qa-docs-link {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}

.qa-docs-link a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compare-table th:nth-child(3),
.compare-table td:nth-child(3) {
  color: var(--text-muted);
}

/* —— Docs pages —— */
.doc-page .doc-main {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) var(--px) var(--section-y);
}

.doc-page h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-lead {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 40px;
}

.doc-page h2,
.doc-content h2 {
  margin: 40px 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
}

.doc-page p,
.doc-content p {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.doc-content ol:not(.doc-list),
.doc-content ul:not(.doc-list):not(.app-list) {
  color: var(--text-muted);
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

@media (min-width: 960px) {
  .doc-layout:has(.doc-content--wide) {
    grid-template-columns: 220px minmax(0, 840px);
  }
}

.doc-pre {
  margin: 0 0 20px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.doc-pre code {
  color: var(--text);
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 24px;
}

.doc-table th,
.doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.doc-table th {
  color: var(--text-dim);
  font-weight: 500;
}

.doc-list {
  color: var(--text-muted);
  padding-left: 1.25rem;
}

.doc-list a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-note {
  margin-top: 48px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-dim);
}

/* —— Open source —— */
.oss-section {
  padding-block: 74px;
  background: var(--bg-elevated);
}

.oss-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.oss-copy {
  display: flex;
  justify-content: center;
}

.oss-desc {
  margin-bottom: 28px;
  max-width: 34rem;
}

.oss-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 22px 60px rgba(0, 0, 0, 0.32);
}

.oss-panel-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 6px 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.oss-panel-row:last-child {
  border-bottom: 0;
}

.oss-panel-label {
  grid-row: span 2;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.oss-panel-row strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
}

.oss-panel-row span:last-child {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.oss-ctas {
  justify-content: center;
}

@media (max-width: 820px) {
  .oss-section {
    padding-block: 56px;
  }

  .oss-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .oss-panel-row {
    grid-template-columns: 1fr;
  }

  .oss-panel-label {
    grid-row: auto;
  }
}

/* —— Shared shell: mobile nav, docs sidebar, app tools —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 14px;
  border: 2px solid var(--text);
  border-radius: 10px;
  color: var(--bg);
  background: var(--text);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(calc(-100% - 24px));
}

.skip-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  transform: translateY(0);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.nav-toggle:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle svg {
  transition: transform 0.22s ease;
}

.nav.is-open .nav-toggle svg {
  transform: rotate(90deg);
}

/* Mobile drawer */
@media (max-width: 899px) {
  .nav.is-open {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    grid-column: 1 / -1;
    order: 2;
    width: 100%;
    max-height: min(60dvh, 420px);
    overflow-y: auto;
    padding: 8px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav.is-open .nav-links {
    display: flex;
  }

  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-h);
    padding-block: 10px;
  }

  .nav-start {
    order: 1;
  }

  .nav-end {
    order: 1;
    margin-left: auto;
  }

  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    border-radius: 10px;
  }

  .nav-dropdown-panel {
    position: static;
    min-width: 0;
    margin-top: 4px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-panel {
    display: grid;
  }

  .nav-links > a {
    display: block;
    width: 100%;
    border-radius: 10px;
  }

  .nav-mobile-actions {
    display: none;
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
    padding: 4px 0 6px;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav.is-open .nav-mobile-actions {
    display: flex;
  }
}

.nav-mobile-actions {
  display: none;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
  }

  .nav-github {
    display: inline-flex;
  }
}

/* —— Docs layout (Resend-style sidebar) —— */
.doc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--px);
  padding-block: calc(var(--nav-h) + 32px) var(--section-y);
}

@media (min-width: 960px) {
  .doc-layout {
    grid-template-columns: 220px minmax(0, 720px);
    gap: 48px;
    align-items: start;
  }
}

.doc-sidebar {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 960px) {
  .doc-sidebar {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    max-height: calc(100vh - var(--nav-h) - 48px);
    overflow-y: auto;
  }
}

.doc-sidebar-group {
  margin-bottom: 24px;
}

.doc-sidebar-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.doc-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-sidebar li {
  margin-bottom: 4px;
}

.doc-sidebar a {
  display: block;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}

.doc-sidebar a:hover {
  color: var(--text);
  background: var(--surface);
}

.doc-sidebar a.is-active {
  color: var(--text);
  background: var(--surface);
  font-weight: 500;
}

.doc-content h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-page .doc-main {
  padding: 0;
  max-width: none;
  margin: 0;
}

.doc-mobile-toc {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 960px) {
  .doc-mobile-toc {
    display: none;
  }
}

.doc-mobile-toc summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
}

.doc-mobile-toc summary::-webkit-details-marker {
  display: none;
}

.doc-mobile-toc .doc-sidebar {
  display: block;
  margin-top: 16px;
}

/* —— Console forms inside doc-content —— */
.doc-content .app-lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.app-lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.app-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 16px 0 6px;
}

.app-form label:first-of-type {
  margin-top: 0;
}

.app-form input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}

.app-form input:focus {
  border-color: var(--border-strong);
}

.app-form button,
.app-btn {
  margin-top: 20px;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.app-form button:hover,
.app-btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  box-shadow: none;
}

.app-btn--ghost {
  margin-top: 12px;
  margin-left: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
}

.app-card {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  font-size: 14px;
  line-height: 1.55;
}

.app-card h2,
.app-card h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.app-card h2:first-child,
.app-card h3:first-child {
  margin-top: 0;
}

.app-card pre {
  margin: 12px 0 0;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.app-card pre code {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
}

.app-card ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.app-card a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-err {
  margin-top: 16px;
  color: #f87171;
  font-size: 14px;
}

.app-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.app-list li {
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.app-list li:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.app-list .mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.run-card {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.run-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.run-card .meta {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.run-card ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 14px;
  color: var(--text-muted);
}

.run-card h4 {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.timeline-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.timeline-list li {
  padding-left: 2px;
}

.timeline-list strong {
  color: var(--text);
  font-weight: 600;
}

.doc-page .footer,
.app-page .footer {
  margin-top: 0;
}

/* —— App dashboard (Resend / Vercel — Mobbin refs) —— */
body.app-page {
  background: var(--bg);
  overflow: hidden;
}

body.app-page [hidden] {
  display: none !important;
}

.dash-app {
  position: fixed;
  inset: 16px;
  display: flex;
  min-height: 0;
  height: auto;
  width: auto;
  gap: 16px;
}

.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  border: none;
  background: transparent;
}

.dash-sidebar__nav-island {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  border-radius: 16px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.dash-sidebar__brand {
  padding: 18px 16px 12px;
}

.dash-sidebar__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.dash-sidebar__logo .logo-mark {
  width: 28px;
  height: 28px;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  flex: 1;
}

.dash-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.dash-nav__link:hover {
  color: var(--text);
  background: var(--surface);
}

.dash-nav__link.is-active {
  color: var(--text);
  background: var(--surface);
}

.dash-nav__icon {
  display: flex;
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.dash-nav__link.is-active .dash-nav__icon {
  opacity: 1;
}

.dash-sidebar__foot {
  padding: 12px 14px 16px;
  border: none;
  border-radius: 16px;
  background: var(--bg-elevated);
}

.dash-sidebar__links {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
}

.dash-sidebar__links a {
  color: var(--text-dim);
  text-decoration: none;
}

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

.dash-frame {
  flex: 1;
  display: flex;
  gap: 16px;
  min-width: 0;
  min-height: 0;
}

.dash-rail {
  width: 300px;
  flex-shrink: 0;
  border: none;
  border-radius: 16px;
  background: var(--bg-elevated);
  padding: 20px 16px 32px;
  overflow-y: auto;
}

.dash-rail__hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
  text-align: center;
}

.dash-rail__meta {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.dash-rail__empty {
  margin: 0;
  padding: 12px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.dash-rail__inbox-list {
  display: grid;
  gap: 2px;
}

.dash-rail__inbox {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: none;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.dash-rail__inbox:last-child {
  border-bottom: none;
}

.dash-rail__inbox:hover {
  background: var(--surface);
}

.dash-rail__inbox-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.dash-rail__inbox-addr {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 32px 48px;
}

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-toolbar h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-toolbar__sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.dash-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dash-container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}

.dash-container--wide {
  max-width: 1280px;
}

.dash-panel {
  border: none;
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.dash-panel + .dash-panel,
.dash-panel + .dash-section {
  margin-top: 20px;
}

.dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: none;
  font-size: 14px;
  font-weight: 600;
}

.dash-panel__head a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.dash-panel__head a:hover {
  color: var(--text);
}

.dash-toolbar__sub .console-plan {
  text-transform: capitalize;
  font-weight: 500;
  color: var(--text-muted);
}

.dash-panel__body {
  padding: 0;
}

.dash-panel__body--padded {
  padding: 16px 18px;
}

.dash-section {
  margin-top: 28px;
}

.dash-section__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.dash-metric {
  padding: 16px 18px;
  border: none;
  border-radius: 12px;
  background: var(--surface);
}

.dash-metric__label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-metric__value {
  margin-top: 8px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dash-metric__value span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
}

.dash-metric__bar {
  margin-top: 12px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.dash-metric__bar span {
  display: block;
  height: 100%;
  background: var(--text-muted);
  border-radius: 999px;
}

.dash-onboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  padding-top: 8px;
}

@media (min-width: 960px) {
  .dash-onboard {
    max-width: 420px;
    padding-top: 0;
  }
}

.dash-onboard__left {
  display: grid;
  gap: 20px;
}

.dash-onboard__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-onboard__hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.dash-onboard__hero h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-onboard__hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 38ch;
}

.dash-onboard__steps {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.dash-onboard__steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.dash-onboard__step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

.dash-onboard__steps a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-onboard__card {
  padding: 22px;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.dash-onboard__advanced {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.dash-onboard__advanced summary {
  cursor: pointer;
  margin-bottom: 8px;
  list-style: none;
}

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

.dash-onboard__advanced input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.dash-onboard__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: none;
  font-size: 13px;
}

.dash-onboard__links a {
  color: var(--text-muted);
  text-decoration: none;
}

.dash-onboard__links a:hover {
  color: var(--text);
}

.dash-onboard__preview {
  display: none;
}

.dash-preview {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(165deg, var(--surface) 0%, var(--bg-elevated) 100%);
  opacity: 0.92;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.dash-preview--rail {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  transform: none;
  box-shadow: none;
}

.dash-preview--rail .dash-preview__metrics {
  grid-template-columns: 1fr;
}

.dash-preview--rail .dash-preview__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-preview--rail .dash-preview__panel-head a {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.dash-preview--rail .dash-preview__panel-head a:hover {
  color: var(--text);
}

.dash-preview__pill--ghost {
  opacity: 0.5;
}

#dash-insights.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 1000px) {
  .dash-rail {
    display: none;
  }
}

.dash-preview__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dash-preview__title {
  font-size: 14px;
  font-weight: 600;
}

.dash-preview__toolbar-skeleton {
  display: block;
  width: 48px;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
}

.dash-preview__pill {
  padding: 3px 8px;
  border-radius: 999px;
  border: none;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: capitalize;
}

.dash-preview__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.dash-preview__metric {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--bg);
}

.dash-preview__metric span {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-preview__metric .dash-preview__metric-skeleton {
  width: 56%;
  height: 8px;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--border);
}

.dash-preview__metric strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 600;
}

.dash-preview__metric strong em {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
}

.dash-preview__metric i {
  display: block;
  margin-top: 10px;
  height: 3px;
  width: 55%;
  border-radius: 999px;
  background: var(--text-muted);
  opacity: 0.35;
}

.dash-preview__panel {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.dash-preview__panel-head {
  padding: 10px 12px;
  border-bottom: none;
  font-size: 12px;
  font-weight: 600;
}

.dash-preview__row {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: none;
}

.dash-preview__row:last-child {
  border-bottom: none;
}

.dash-preview__row span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
}

.dash-preview__row span:last-child {
  width: 60%;
  justify-self: end;
}

body.dash-gate-active .dash-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg);
}

body.dash-gate-active [data-gate-hide] {
  display: none !important;
}

.dash-gate {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.dash-gate__card {
  padding: 24px;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.dash-gate__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.dash-gate__desc {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.dash-gate__card label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.dash-gate__card input[type="password"],
.dash-gate__card input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.dash-gate__card input:focus {
  outline: none;
  border-color: var(--text-muted);
}

/* Workspace — OAuth setup when API key connected but no Gmail */
.ws-setup {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 24px 0;
}

.ws-setup__card {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.ws-setup__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ws-setup__desc {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.ws-setup__card .dash-btn + .dash-btn {
  margin-top: 8px;
}

.workspace-msg-body {
  white-space: pre-wrap;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
}

.dash-overview-meta {
  margin: 0 0 20px;
}

body.dash-onboard-active .dash-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg);
}

body.dash-onboard-active .dash-container {
  max-width: none;
}

.dash-session__idle-row {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface);
}

.dash-session__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #666;
  box-shadow: none;
}

.dash-session__idle-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

.dash-onboard__card label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.dash-onboard__card input[type="password"],
.dash-onboard__card input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.dash-onboard__card input:focus {
  outline: none;
  border-color: var(--text-muted);
}

.dash-onboard__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.dash-session {
  display: grid;
  gap: 8px;
}

.dash-session__connect:not([hidden]) {
  display: grid;
  gap: 8px;
}

.dash-session__card--connected {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--bg);
}

.dash-session__who {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.dash-session__who code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}

.dash-session__link {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-session__link:hover {
  color: var(--text-muted);
}

.dash-session__connected:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-session__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-session__input {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.dash-session__input:focus {
  outline: none;
  border-color: var(--text-muted);
}

.dash-session__badge {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-session__gear,
.dash-session__clear {
  padding: 4px 6px;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.dash-session__gear:hover,
.dash-session__clear:hover {
  color: var(--text);
  background: var(--surface);
}

.dash-session__base-inline {
  font-size: 11px;
  color: var(--text-dim);
}

.dash-session__base-inline summary {
  cursor: pointer;
  list-style: none;
}

.dash-session__base-inline summary::-webkit-details-marker {
  display: none;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.dash-btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.dash-btn--primary:hover {
  opacity: 0.92;
}

.dash-btn--sm {
  width: auto;
  padding: 7px 12px;
}

.app-page h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.app-page .console-head {
  display: none;
}

.app-page .console-grid {
  display: contents;
}

.app-page .console-metric {
  padding: 16px 18px;
  border: none;
  border-radius: 12px;
  background: var(--surface);
}

.app-page .console-table {
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.app-page .console-table th {
  background: transparent;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.app-page .console-table td {
  font-size: 13px;
}

.app-page .dash-section .console-key-form,
.app-page .dash-panel__body--padded .console-key-form {
  margin: 0;
}

.app-page .console-banner,
.app-page .console-key-once {
  border-radius: 12px;
  margin-bottom: 16px;
}

/* Audit logs — terminal view */
.log-terminal {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  background: #080808;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.log-terminal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #121212;
  border-bottom: 1px solid #2a2a2a;
}

.log-terminal__dots {
  display: inline-flex;
  gap: 6px;
}

.log-terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.log-terminal__dot--red {
  background: #ff5f57;
}

.log-terminal__dot--yellow {
  background: #febc2e;
}

.log-terminal__dot--green {
  background: #28c840;
}

.log-terminal__title {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
}

.log-terminal__meta {
  margin-left: auto;
  font-size: 11px;
  color: #666;
}

.log-terminal__body {
  padding: 14px 16px 16px;
  min-height: 360px;
  max-height: calc(100vh - 200px);
  overflow: auto;
  color: #c9d1d9;
}

.log-terminal__foot {
  padding: 10px 14px;
  border-top: 1px solid #2a2a2a;
  background: #0e0e0e;
}

.log-terminal__more {
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: #8b949e;
  background: none;
  border: none;
  cursor: pointer;
}

.log-terminal__more:hover {
  color: #c9d1d9;
}

.log-terminal__more:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.log-terminal__prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em;
  margin-bottom: 12px;
  color: #8b949e;
}

.log-prompt {
  color: #7ee787;
  font-weight: 600;
}

.log-muted {
  color: #8b949e;
}

.log-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #7ee787;
  animation: log-blink 1s step-end infinite;
}

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

.log-empty {
  margin: 0;
  padding-left: 1.2em;
  color: #6e7681;
}

.log-err {
  margin: 0;
  color: #ff7b72;
}

.log-line {
  display: grid;
  grid-template-columns: 132px minmax(100px, 0.9fr) minmax(80px, 1fr) 72px minmax(0, 1.2fr);
  gap: 10px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.log-line:last-child {
  border-bottom: none;
}

.log-ts {
  color: #6e7681;
  font-variant-numeric: tabular-nums;
}

.log-action {
  color: #7ee787;
  word-break: break-word;
}

.log-resource {
  color: #d2a8ff;
  word-break: break-all;
}

.log-key {
  color: #79c0ff;
}

.log-meta {
  color: #8b949e;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .log-line {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }
}

.app-empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  body.app-page {
    overflow: auto;
  }

  .dash-app {
    position: static;
    inset: auto;
    flex-direction: column;
    min-height: calc(100dvh - 32px);
    margin: 16px;
  }

  .dash-sidebar {
    width: 100%;
    border: none;
  }

  .dash-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .dash-nav__link span:last-child {
    display: none;
  }

  .dash-main {
    padding: 20px var(--px) 40px;
  }
}

/* Hosted console (dashboard.html) */
.console-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.console-plan {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.console-team {
  margin-left: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.console-actions .app-btn {
  margin: 0;
}

.console-scope,
.console-meta,
.console-empty,
.console-links {
  font-size: 14px;
  color: var(--text-muted);
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.console-metric {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.console-metric__label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.console-metric__value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
}

.console-metric__value span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
}

.console-meter {
  margin-top: 10px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.console-meter__fill {
  height: 100%;
  background: var(--accent-soft);
  border-radius: 999px;
}

.console-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.console-table th,
.console-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.console-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 500;
}

.console-table code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.console-keys {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  font-size: 14px;
  color: var(--text-muted);
}

.console-compose {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.console-compose label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin: 12px 0 4px;
}

.console-compose label:first-child {
  margin-top: 0;
}

.console-compose input,
.console-compose textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.console-compose textarea {
  min-height: 88px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
}

.console-compose .app-btn {
  margin-top: 12px;
}

.console-reply-btn {
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  color: var(--text-muted);
}

.console-reply-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.console-banner {
  margin: 12px 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.console-key-form {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.console-key-form label {
  font-size: 12px;
  color: var(--text-muted);
}

.console-key-form input[type="text"],
.console-key-form select {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.console-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.console-revoke-btn {
  font: inherit;
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.console-revoke-btn:hover {
  color: var(--text);
}

.console-key-once {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.console-key-once input {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 8px 10px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

/* Dashboard islands — one spacing and form system */
body[data-doc="dashboard"] .dash-toolbar {
  margin-bottom: 20px;
}

body[data-doc="dashboard"] .dash-toolbar__sub {
  margin-top: 6px;
}

body[data-doc="dashboard"] .console-plan {
  padding: 4px 10px;
  border: none;
  background: var(--surface);
}

body[data-doc="dashboard"] .dash-overview-meta {
  margin: 0 0 28px;
  line-height: 1.5;
}

body[data-doc="dashboard"] .dash-section {
  margin-top: 32px;
}

body[data-doc="dashboard"] .dash-section:first-of-type {
  margin-top: 0;
}

body[data-doc="dashboard"] .dash-section__title {
  margin-bottom: 10px;
  font-size: 15px;
}

body[data-doc="dashboard"] .dash-panel {
  border-radius: 16px;
  background: var(--surface);
}

body[data-doc="dashboard"] .dash-panel__body,
body[data-doc="dashboard"] .dash-panel__body--padded {
  padding: 24px;
}

body[data-doc="dashboard"] .dash-panel__head {
  margin-bottom: 16px;
  padding: 0;
}

body[data-doc="dashboard"] .dash-panel .app-empty-state {
  display: grid;
  min-height: 80px;
  place-items: center;
  padding: 0;
}

body[data-doc="dashboard"] .console-key-form {
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: 0;
  gap: 10px;
  border: none;
  border-radius: 0;
  background: transparent;
}

body[data-doc="dashboard"] .console-key-form label {
  margin-top: 4px;
  font-size: 12px;
}

body[data-doc="dashboard"] .console-key-form label:first-child {
  margin-top: 0;
}

body[data-doc="dashboard"] .console-key-form input:not([type="checkbox"]),
body[data-doc="dashboard"] .console-key-form select {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
}

body[data-doc="dashboard"] .console-key-form .app-btn {
  min-height: 42px;
  margin-top: 6px;
}

body[data-doc="dashboard"] .console-key-form + .console-empty,
body[data-doc="dashboard"] .console-key-form + .console-table {
  margin-top: 24px;
}

body[data-doc="dashboard"] .console-empty,
body[data-doc="dashboard"] .console-meta {
  margin: 16px 0 0;
  line-height: 1.55;
}

body[data-doc="dashboard"] .dash-panel__body > .console-empty:first-child,
body[data-doc="dashboard"] .dash-panel__body > .console-meta:first-child {
  margin-top: 0;
}

body[data-doc="dashboard"] .console-table {
  margin-top: 0;
}

body[data-doc="dashboard"] .console-links {
  margin: 32px 0 0;
  padding-bottom: 8px;
}

/* App material hierarchy: canvas → island → raised block → control */
body.app-page {
  --app-canvas: #050505;
  --app-island: #0d0d0d;
  --app-raised: #151515;
  --app-raised-hover: #1c1c1c;
  --app-action: #222222;
  --app-control: #080808;
  --app-highlight: rgba(255, 255, 255, 0.045);
  --app-island-shadow: 0 1px 0 var(--app-highlight) inset,
    0 18px 48px rgba(0, 0, 0, 0.18);
  --app-raised-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 8px 24px rgba(0, 0, 0, 0.14);
  --text-muted: #929292;
  --text-dim: #686868;
  background: var(--app-canvas);
}

body.app-page .dash-sidebar__nav-island,
body.app-page .dash-sidebar__foot,
body.app-page .dash-rail,
body.app-page .dash-panel,
body.app-page .dash-onboard__card,
body.app-page .dash-gate__card,
body.app-page .ws-setup__card {
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body.app-page .dash-nav__link:hover,
body.app-page .dash-nav__link.is-active {
  background: var(--app-raised);
}

body.app-page .dash-preview__metric,
body.app-page .dash-preview__panel,
body.app-page .dash-session__idle-row,
body.app-page .dash-session__card--connected,
body.app-page .console-metric,
body.app-page .console-plan {
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow);
}

body.app-page.dash-onboard-active .dash-main,
body.app-page.dash-gate-active .dash-main {
  background-color: var(--app-canvas);
}

body[data-doc="dashboard"] .console-key-form {
  padding: 18px;
  border-radius: 12px;
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow);
}

body.app-page .app-form input,
body.app-page .dash-onboard__card input[type="password"],
body.app-page .dash-onboard__card input[type="url"],
body.app-page .dash-gate__card input[type="password"],
body.app-page .dash-gate__card input[type="url"],
body.app-page .dash-session__input,
body.app-page .console-key-form input:not([type="checkbox"]),
body.app-page .console-key-form select,
body.app-page .console-compose input,
body.app-page .console-compose textarea {
  background: var(--app-control);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
}

body.app-page .app-btn--ghost,
body.app-page .dash-btn:not(.dash-btn--primary) {
  border-color: transparent;
  background: var(--app-action);
}

body.app-page .app-btn--ghost:hover,
body.app-page .dash-btn:not(.dash-btn--primary):hover {
  border-color: transparent;
  background: var(--app-raised-hover);
}

/* Modal, toast, sync badges (console-ui.js) */
body.ma-modal-open {
  overflow: hidden;
}

.ma-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.ma-modal-root.is-open {
  pointer-events: auto;
}

.ma-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.ma-modal {
  width: min(100%, 440px);
  padding: 22px 22px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  outline: none;
}

.ma-modal__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

.ma-modal__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.ma-modal__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.ma-modal__input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}

.ma-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.ma-modal__actions .app-btn {
  margin-top: 0;
}

.app-btn--danger {
  color: #fecaca;
  border-color: #7f1d1d;
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
}

.ma-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

.ma-toast {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s, transform 0.2s;
}

.ma-toast.is-out {
  opacity: 0;
  transform: translateY(6px);
}

.ma-toast--ok {
  border-color: rgba(255, 255, 255, 0.35);
}

.ma-toast--fail {
  border-color: rgba(248, 113, 113, 0.35);
}

.sync-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  vertical-align: middle;
}

.sync-badge--ok {
  color: #d4d4d4;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.sync-badge--fail {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.sync-badge--warn {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.sync-badge--neutral {
  color: var(--text-muted);
}

/* Inbox split-pane (Slack-style list + detail) */
.inbox-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
  margin-top: 16px;
  min-height: 320px;
}

@media (max-width: 860px) {
  .inbox-split {
    grid-template-columns: 1fr;
  }
}

.inbox-split__list,
.inbox-split__detail {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.inbox-split__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.inbox-msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}

.inbox-msg-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.inbox-msg-item:hover,
.inbox-msg-item.is-active {
  background: var(--bg-elevated);
}

.inbox-msg-item__from {
  font-weight: 600;
  margin-bottom: 2px;
}

.inbox-msg-item__subject {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-msg-item__meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.inbox-detail {
  padding: 16px;
  font-size: 14px;
  line-height: 1.55;
}

.inbox-detail__empty {
  color: var(--text-muted);
  font-size: 13px;
}

.inbox-detail dl {
  margin: 0 0 16px;
}

.inbox-detail dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 10px;
}

.inbox-detail dd {
  margin: 4px 0 0;
}

.inbox-load-more {
  display: block;
  width: 100%;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.inbox-load-more:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.search-suggest {
  position: relative;
}

.search-suggest__list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  max-height: 200px;
  overflow-y: auto;
}

.search-suggest__list li button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
}

.search-suggest__list li button:hover,
.search-suggest__list li button:focus {
  background: var(--surface);
}

/* Workspace console split-pane */
.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 960px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

.workspace-pane {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.workspace-pane__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.workspace-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 480px;
  overflow-y: auto;
}

.workspace-thread-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: inherit;
}

.workspace-thread-item:hover,
.workspace-thread-item.is-active {
  background: var(--bg-elevated);
}

.workspace-thread-item__snippet {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-main {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
}

.workspace-draft {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}

.workspace-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-actions-row .app-btn {
  margin-top: 0;
}

.workspace-reminder-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.workspace-reminder-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.workspace-banner {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.workspace-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.workspace-toolbar label {
  font-size: 13px;
  color: var(--text-muted);
}

.workspace-toolbar select {
  min-width: 180px;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.workspace-tab {
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.workspace-tab:hover,
.workspace-tab.is-active {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

.workspace-tab.is-active {
  font-weight: 600;
}

.workspace-triage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .workspace-triage-grid {
    grid-template-columns: 1fr;
  }
}

.workspace-triage-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.workspace-triage-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.workspace-triage-meta {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.workspace-digest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workspace-digest-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px;
}

.workspace-digest-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.workspace-digest-item__subject {
  font-size: 14px;
  font-weight: 600;
}

.workspace-digest-item__summary {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.workspace-digest-item__actions {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.workspace-suggest-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.workspace-suggest-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.workspace-suggest-list li:last-child {
  border-bottom: none;
}

.workspace-suggest-list__meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.workspace-empty-panel {
  padding: 24px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.workspace-panel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px;
  margin-bottom: 14px;
}

.workspace-panel-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.workspace-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}

.workspace-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.workspace-form-grid input,
.workspace-form-grid select {
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.workspace-rule-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 8px 0 12px;
  font-size: 13px;
}

.workspace-rule-kinds label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workspace-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.workspace-data-table th,
.workspace-data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.workspace-data-table th {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.workspace-data-table tr:last-child td {
  border-bottom: none;
}

.workspace-monitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 960px) {
  .workspace-monitor-layout {
    grid-template-columns: 1fr;
  }
}

.workspace-hit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workspace-hit-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.workspace-hit-list li:last-child {
  border-bottom: none;
}

.timeline-list .sync-badge {
  margin-left: 6px;
}

/* —— App component states —— */
body.app-page {
  --control-height: 44px;
  --control-radius: 10px;
  --control-border: rgba(255, 255, 255, 0.09);
  --control-border-hover: rgba(255, 255, 255, 0.17);
  --control-border-focus: rgba(255, 255, 255, 0.38);
  --focus-ring: 0 0 0 3px rgba(255, 255, 255, 0.11);
  --danger: #f87171;
  --danger-surface: rgba(248, 113, 113, 0.12);
  color-scheme: dark;
}

body.app-page :is(input, select, textarea, button, summary, a) {
  -webkit-tap-highlight-color: transparent;
}

body.app-page :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]),
  select,
  textarea
) {
  width: 100%;
  min-height: var(--control-height);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  caret-color: var(--text);
  background-color: var(--app-control);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  outline: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, opacity 140ms ease;
}

body.app-page :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]),
  select,
  textarea
):hover:not(:disabled):not([readonly]) {
  border-color: var(--control-border-hover);
  background-color: #0a0a0a;
}

body.app-page :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]),
  select,
  textarea
):focus-visible {
  border-color: var(--control-border-focus);
  background-color: #0c0c0c;
  box-shadow: var(--focus-ring);
}

body.app-page :is(input, textarea)::placeholder {
  color: #606060;
  opacity: 1;
}

body.app-page input:-webkit-autofill,
body.app-page input:-webkit-autofill:hover,
body.app-page input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--app-control) inset, var(--focus-ring);
  transition: background-color 9999s ease-out;
}

body.app-page :is(input, select, textarea):disabled,
body.app-page :is(input, textarea)[readonly] {
  cursor: not-allowed;
  opacity: 0.5;
  background-color: rgba(255, 255, 255, 0.025);
}

body.app-page :is(input, textarea):invalid:not(:placeholder-shown) {
  border-color: rgba(248, 113, 113, 0.55);
}

body.app-page textarea {
  min-height: 112px;
  resize: vertical;
}

body.app-page select {
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23929292' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

body.app-page select:disabled {
  cursor: not-allowed;
}

body.app-page select option {
  color: var(--text);
  background: var(--app-island);
}

body.app-page :is(input[type="checkbox"], input[type="radio"]) {
  appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--control-border-hover);
  background-color: var(--app-control);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, transform 100ms ease;
}

body.app-page input[type="checkbox"] {
  border-radius: 5px;
}

body.app-page input[type="radio"] {
  border-radius: 999px;
}

body.app-page :is(input[type="checkbox"], input[type="radio"]):hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.34);
  background-color: var(--app-raised-hover);
}

body.app-page input[type="checkbox"]:checked {
  border-color: var(--text);
  background-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23050505' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

body.app-page input[type="radio"]:checked {
  border: 5px solid var(--text);
  background-color: var(--app-control);
}

body.app-page :is(input[type="checkbox"], input[type="radio"]):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

body.app-page :is(input[type="checkbox"], input[type="radio"]):active:not(:disabled) {
  transform: scale(0.9);
}

body.app-page :is(input[type="checkbox"], input[type="radio"]):disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.app-page :is(.app-form label, .console-key-form label, .workspace-form-grid label, .ma-modal__label) {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

body.app-page :is(.app-btn, .dash-btn, .app-form button, .debug-actions button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  user-select: none;
  transition: color 140ms ease, background-color 140ms ease,
    border-color 140ms ease, box-shadow 140ms ease, transform 100ms ease,
    opacity 140ms ease;
}

body.app-page :is(.app-btn, .app-form button):not(.app-btn--ghost):not(.app-btn--danger),
body.app-page .dash-btn--primary {
  color: #090909;
  border-color: transparent;
  background: #ededed;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 6px 16px rgba(0, 0, 0, 0.16);
}

body.app-page :is(.app-btn, .app-form button):not(.app-btn--ghost):not(.app-btn--danger):hover:not(:disabled),
body.app-page .dash-btn--primary:hover:not(:disabled) {
  color: #000;
  background: #fff;
  transform: translateY(-1px);
}

body.app-page :is(.app-btn--ghost, .dash-btn:not(.dash-btn--primary)) {
  color: var(--text);
  border-color: transparent;
  background: var(--app-action);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.045) inset;
}

body.app-page :is(.app-btn--ghost, .dash-btn:not(.dash-btn--primary)):hover:not(:disabled) {
  color: #fff;
  background: #292929;
  transform: translateY(-1px);
}

body.app-page .app-btn--danger {
  color: #fecaca;
  border-color: transparent;
  background: var(--danger-surface);
  box-shadow: none;
}

body.app-page .app-btn--danger:hover:not(:disabled) {
  color: #fff;
  background: rgba(248, 113, 113, 0.2);
  transform: translateY(-1px);
}

body.app-page :is(.app-btn, .dash-btn, .app-form button):active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

body.app-page :is(.app-btn, .dash-btn, .app-form button):focus-visible,
body.app-page :is(.console-revoke-btn, .console-reply-btn, .workspace-tab):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

body.app-page :is(.app-btn, .dash-btn, .app-form button):disabled,
body.app-page :is(.app-btn, .dash-btn, .app-form button)[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

body.app-page :is(.app-btn, .dash-btn, .app-form button, .debug-actions button)[aria-busy="true"] {
  cursor: progress;
  opacity: 0.65;
  pointer-events: none;
}

body.app-page .debug-actions button {
  color: var(--text);
  border: none;
  background: var(--app-action);
}

body.app-page .debug-actions button:hover {
  background: var(--app-raised-hover);
  transform: translateY(-1px);
}

body.app-page .console-revoke-btn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease,
    transform 100ms ease;
}

body.app-page .console-revoke-btn:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-surface);
}

body.app-page .console-revoke-btn:active:not(:disabled) {
  transform: scale(0.97);
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline) > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 0;
  border-radius: 6px;
  color: var(--text-dim);
  transition: color 140ms ease;
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline) > summary::after {
  content: "⌄";
  display: inline-block;
  font-size: 12px;
  transition: transform 140ms ease;
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline) > summary:hover {
  color: var(--text);
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline)[open] > summary::after {
  transform: rotate(180deg);
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline) > summary:focus-visible,
body.app-page a:focus-visible,
body.app-page button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

body.app-page :is(.workspace-tab, .search-suggest__list button) {
  border-color: transparent;
  background: var(--app-raised);
  transition: color 140ms ease, background-color 140ms ease,
    box-shadow 140ms ease, transform 100ms ease;
}

body.app-page :is(.workspace-tab, .search-suggest__list button):hover {
  color: var(--text);
  border-color: transparent;
  background: var(--app-raised-hover);
}

body.app-page .workspace-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--app-action);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

body.app-page :is(.workspace-tab, .search-suggest__list button):active {
  transform: scale(0.98);
}

body.app-page .search-suggest__list {
  margin-top: 6px;
  padding: 6px;
  border: none;
  border-radius: 12px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body.app-page :is(.inbox-msg-item, .workspace-thread-item) {
  border-bottom-color: rgba(255, 255, 255, 0.055);
  transition: color 140ms ease, background-color 140ms ease;
}

body.app-page :is(.inbox-msg-item, .workspace-thread-item):hover {
  background: var(--app-raised);
}

body.app-page :is(.inbox-msg-item, .workspace-thread-item).is-active {
  background: var(--app-action);
  box-shadow: 3px 0 0 var(--text) inset;
}

body.app-page :is(.inbox-load-more, .log-terminal__more) {
  color: var(--text-muted);
  transition: color 140ms ease, background-color 140ms ease;
}

body.app-page :is(.inbox-load-more, .log-terminal__more):hover:not(:disabled) {
  color: var(--text);
  background: var(--app-raised);
}

body.app-page :is(.inbox-load-more, .log-terminal__more):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring) inset;
}

body.app-page :is(.inbox-load-more, .log-terminal__more):disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

body.app-page :is(.console-table, .workspace-data-table) tbody tr {
  transition: background-color 140ms ease;
}

body.app-page :is(.console-table, .workspace-data-table) tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* —— Workspace workbench —— */
body[data-doc="workspace"] .dash-toolbar {
  align-items: center;
  margin-bottom: 18px;
}

body[data-doc="workspace"] .dash-toolbar h1 {
  font-size: 1.5rem;
}

body[data-doc="workspace"] .workspace-banner {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 7px 11px;
  border: none;
  border-radius: 999px;
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow);
}

body[data-doc="workspace"] .workspace-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  margin: 0 0 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body[data-doc="workspace"] .workspace-toolbar__field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

body[data-doc="workspace"] .workspace-toolbar__field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

body[data-doc="workspace"] .workspace-field-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--app-raised);
  font-size: 9px;
  letter-spacing: 0.025em;
  text-transform: none;
  vertical-align: middle;
}

body[data-doc="workspace"] .workspace-toolbar select {
  min-width: 0;
}

body[data-doc="workspace"] .workspace-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-content: flex-start;
  gap: 8px;
}

body[data-doc="workspace"] .workspace-toolbar__actions .app-btn {
  min-height: var(--control-height);
  margin: 0;
  white-space: nowrap;
}

body[data-doc="workspace"] .workspace-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  margin: 0 0 16px;
  padding: 5px;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body[data-doc="workspace"] .workspace-tab {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: none;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

body[data-doc="workspace"] .workspace-tab:hover {
  background: var(--app-raised);
}

body[data-doc="workspace"] .workspace-tab.is-active {
  background: var(--app-action);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.055) inset;
}

body[data-doc="workspace"] .workspace-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.45fr);
  gap: 16px;
  height: clamp(540px, calc(100dvh - 310px), 780px);
  margin-top: 0;
}

body[data-doc="workspace"] .workspace-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: none;
  border-radius: 16px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body[data-doc="workspace"] .workspace-pane__head {
  flex: 0 0 auto;
  padding: 16px 18px 12px;
  border-bottom: none;
  font-size: 12px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body[data-doc="workspace"] .workspace-thread-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 4px 6px 8px;
}

body[data-doc="workspace"] .workspace-thread-list li + li {
  margin-top: 3px;
}

body[data-doc="workspace"] .workspace-thread-item {
  padding: 12px;
  border: none;
  border-radius: 10px;
  line-height: 1.4;
}

body[data-doc="workspace"] .workspace-thread-item > div:first-child {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 500;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-doc="workspace"] .workspace-thread-item__snippet {
  margin-top: 5px;
  font-size: 11px;
}

body[data-doc="workspace"] .workspace-thread-item.is-active {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

body[data-doc="workspace"] .workspace-main {
  flex: 1;
  min-height: 0;
  gap: 18px;
  padding: 18px;
  overflow-y: auto;
}

body[data-doc="workspace"] .workspace-message {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow);
}

body[data-doc="workspace"] .workspace-message + .workspace-message {
  margin-top: 12px;
}

body[data-doc="workspace"] .workspace-message--loading {
  display: grid;
  gap: 12px;
  min-height: 172px;
  align-content: center;
}

body[data-doc="workspace"] .workspace-loading-line {
  display: block;
  width: 92%;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.055) 20%,
    rgba(255, 255, 255, 0.11) 45%,
    rgba(255, 255, 255, 0.055) 70%
  );
  background-size: 220% 100%;
  animation: workspace-loading 1.4s ease-in-out infinite;
}

body[data-doc="workspace"] .workspace-loading-line--short {
  width: 34%;
}

body[data-doc="workspace"] .workspace-loading-line--medium {
  width: 68%;
}

body[data-doc="workspace"] .workspace-thread-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 20px;
  border-radius: 12px;
  color: var(--text-muted);
  background: var(--app-raised);
  text-align: center;
}

body[data-doc="workspace"] .workspace-thread-state--error {
  color: #fca5a5;
  background: var(--danger-surface);
}

@keyframes workspace-loading {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -120% 0;
  }
}

body[data-doc="workspace"] .workspace-message__meta {
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

body[data-doc="workspace"] .workspace-message__subject {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

body[data-doc="workspace"] .workspace-msg-body {
  max-height: none;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--app-control);
  font-size: 12px;
  line-height: 1.55;
  overflow: visible;
}

body[data-doc="workspace"] .workspace-main > label[for="draft-body"] {
  margin-bottom: -10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

body[data-doc="workspace"] .workspace-draft {
  min-height: 120px;
}

body[data-doc="workspace"] .workspace-actions-row {
  gap: 8px;
}

body[data-doc="workspace"] .workspace-actions-row .app-btn {
  min-height: 38px;
  padding-inline: 13px;
}

body[data-doc="workspace"] .workspace-actions-row--external {
  margin-top: -10px;
}

body[data-doc="workspace"] .workspace-actions-row--external .app-btn {
  min-height: 34px;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
}

body[data-doc="workspace"] .workspace-actions-row--external .app-btn:hover {
  color: var(--text);
  background: var(--app-raised);
}

body[data-doc="workspace"] .workspace-subsection {
  padding: 15px 16px;
  border-radius: 12px;
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow);
}

body[data-doc="workspace"] .workspace-subsection h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

body[data-doc="workspace"] .workspace-subsection .console-empty {
  margin: 0;
}

body[data-doc="workspace"] .workspace-reminder-list li {
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

body[data-doc="workspace"] :is(.workspace-triage-col, .workspace-panel-card) {
  border: none;
  border-radius: 16px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body[data-doc="workspace"] :is(.workspace-triage-col__head, .workspace-panel-card h3) {
  border-bottom: none;
}

body[data-doc="workspace"] :is(.workspace-digest-item, .workspace-suggest-list li) {
  border-color: transparent;
  border-radius: 10px;
  background: var(--app-raised);
}

@media (max-width: 1180px) {
  body[data-doc="workspace"] .workspace-toolbar__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  body[data-doc="workspace"] .workspace-toolbar {
    grid-template-columns: 1fr;
  }

  body[data-doc="workspace"] .workspace-toolbar__actions {
    grid-column: auto;
  }

  body[data-doc="workspace"] .workspace-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  body[data-doc="workspace"] .workspace-pane {
    min-height: 420px;
    max-height: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-doc="workspace"] .workspace-loading-line {
    animation: none;
  }
}

body.app-page .sync-badge {
  border: none;
  background: var(--app-action);
}

body.app-page .sync-badge--ok {
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.09);
}

body.app-page .sync-badge--fail {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.13);
}

body.app-page .sync-badge--warn {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
}

/* —— Component completion pass —— */
body.app-page select:is(:focus-visible, :open) {
  border-color: var(--control-border-focus);
  background-color: #0c0c0c;
  box-shadow: var(--focus-ring);
}

body.app-page select optgroup {
  color: var(--text-muted);
  background: var(--app-island);
  font-weight: 600;
}

body.app-page select option:checked {
  color: #fff;
  background: var(--app-action);
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline)[open] {
  padding-bottom: 4px;
}

body.app-page :is(.dash-onboard__advanced, .dash-session__base-inline)[open] > summary {
  color: var(--text);
}

body.app-page .search-suggest__list {
  padding: 6px;
  border: none;
  border-radius: 12px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body.app-page .search-suggest__list li + li {
  margin-top: 2px;
}

body.app-page .search-suggest__list li button {
  min-height: 36px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  text-align: left;
}

body.app-page .search-suggest__list li button:is(:hover, :focus-visible) {
  outline: none;
  color: var(--text);
  background: var(--app-raised);
  box-shadow: none;
}

body.app-page .ma-modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

body.app-page .ma-modal {
  padding: 24px;
  border: none;
  border-radius: 16px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow), 0 32px 96px rgba(0, 0, 0, 0.5);
}

body.app-page .ma-modal__title {
  margin-bottom: 10px;
}

body.app-page .ma-modal__actions {
  gap: 8px;
  margin-top: 20px;
}

body.app-page .ma-toast {
  border: none;
  border-radius: 12px;
  color: var(--text);
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow), 0 16px 48px rgba(0, 0, 0, 0.32);
}

body.app-page .ma-toast--ok {
  background: #1a1a1a;
}

body.app-page .ma-toast--fail {
  color: #fecaca;
  background: #251313;
}

body.app-page .inbox-split__list,
body.app-page .inbox-split__detail {
  border: none;
  border-radius: 16px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body.app-page .inbox-split__head {
  padding: 15px 16px 10px;
  border-bottom: none;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

body.app-page .inbox-msg-list {
  padding: 4px 6px 8px;
}

body.app-page .inbox-msg-item {
  margin-top: 2px;
  border: none;
  border-radius: 10px;
}

body.app-page .inbox-msg-item.is-active {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

body.app-page .inbox-load-more {
  margin: 4px 6px 8px;
  width: calc(100% - 12px);
  border: none;
  border-radius: 9px;
}

body.app-page :is(.dash-session__gear, .dash-session__clear) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  color: var(--text-dim);
  background: transparent;
  transition: color 140ms ease, background-color 140ms ease, transform 100ms ease;
}

body.app-page :is(.dash-session__gear, .dash-session__clear):hover {
  color: var(--text);
  background: var(--app-raised);
}

body.app-page :is(.dash-session__gear, .dash-session__clear):active {
  transform: scale(0.94);
}

body.app-page :is(.dash-session__gear, .dash-session__clear):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

body.app-page .dash-session__badge {
  border: none;
  background: var(--app-raised);
}

body.app-page :is(.console-banner, .workspace-banner) {
  border: none;
  background: var(--app-raised);
  box-shadow: var(--app-raised-shadow);
}

/* —— Workspace Today queue —— */
body[data-doc="workspace"] .workspace-today {
  display: grid;
  gap: 16px;
}

body[data-doc="workspace"] .workspace-today__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px;
}

body[data-doc="workspace"] .workspace-today__head h2,
body[data-doc="workspace"] .workspace-today__head p {
  margin: 0;
}

body[data-doc="workspace"] .workspace-today__head p {
  margin-top: 6px;
}

body[data-doc="workspace"] .workspace-today__filter {
  width: min(180px, 100%);
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-doc="workspace"] .workspace-today__filter select {
  margin-top: 7px;
}

body[data-doc="workspace"] .workspace-today-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-doc="workspace"] .workspace-today-item {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 20px;
  border: none;
  border-radius: 16px;
  background: var(--app-island);
  box-shadow: var(--app-island-shadow);
}

body[data-doc="workspace"] .workspace-today-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-doc="workspace"] .workspace-today-item__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-doc="workspace"] .workspace-today-item time,
body[data-doc="workspace"] .workspace-today-item__source {
  color: var(--text-dim);
  font-size: 12px;
}

body[data-doc="workspace"] .workspace-today-item h3 {
  margin: 18px 0 5px;
  font-size: 17px;
  line-height: 1.35;
}

body[data-doc="workspace"] .workspace-today-item__source,
body[data-doc="workspace"] .workspace-today-item__summary,
body[data-doc="workspace"] .workspace-today-item__proposal p {
  margin: 0;
}

body[data-doc="workspace"] .workspace-today-item__summary {
  display: -webkit-box;
  margin-top: 14px;
  overflow: hidden;
  color: var(--text-muted);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body[data-doc="workspace"] .workspace-today-item__proposal {
  margin: 18px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--app-raised);
}

body[data-doc="workspace"] .workspace-today-item__proposal span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-doc="workspace"] .workspace-today-item__proposal p {
  color: var(--text-muted);
  line-height: 1.45;
}

body[data-doc="workspace"] .workspace-today-item > .workspace-actions-row {
  margin-top: auto;
}

@media (max-width: 900px) {
  body[data-doc="workspace"] .workspace-today-list {
    grid-template-columns: 1fr;
  }

  body[data-doc="workspace"] .workspace-today__head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* —— AgentsOS platform home —— */
.agentsos-home .hero-split {
  min-height: clamp(650px, 82svh, 790px);
}

.agentsos-home .hero-split .hero-inner {
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
}

.agentsos-home .hero-copy h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 5.7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.agent-map {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(10, 10, 10, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 38px 100px rgba(0, 0, 0, 0.72);
}

.agent-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: radial-gradient(var(--grid-dot) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 72%);
  opacity: 0.42;
}

.agent-map > * {
  position: relative;
  z-index: 1;
}

.agent-map-head,
.agent-map-task,
.agent-map-output {
  display: flex;
  align-items: center;
}

.agent-map-head {
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.agent-map-state {
  color: var(--text-dim);
}

.agent-map-task {
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0 18px;
}

.agent-map-prompt {
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
}

.agent-map-arrow {
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.agent-map-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.agent-map-grid > div {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  column-gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.agent-map-grid > div:nth-child(4) {
  grid-column: 2 / span 2;
}

.agent-map-grid > div:nth-child(5) {
  grid-column: 4 / span 2;
}

.agent-map-grid span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.agent-map-grid strong,
.agent-map-grid small,
.agent-map-output strong,
.agent-map-output small {
  display: block;
  min-width: 0;
}

.agent-map-grid strong {
  font-size: 12px;
}

.agent-map-grid small {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-map-output {
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.agent-map-output strong {
  font-size: 13px;
}

.agent-map-output small {
  color: var(--text-dim);
  font-size: 10px;
}

.agent-map-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--accent-text);
  background: var(--accent-bright);
  font-size: 13px;
  font-weight: 700;
}

.platform-role-strip {
  position: relative;
  z-index: 2;
  border-block: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.72);
}

.platform-role-strip-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.platform-role-strip span {
  padding: 17px 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.platform-role-strip span + span {
  border-left: 1px solid var(--border);
}

.agent-catalog-card--featured {
  grid-column: 1 / -1;
  min-height: 280px;
}

.agent-catalog-card--featured .agent-catalog-copy {
  max-width: 760px;
}

.agentsos-workflow,
.mail-spotlight,
.agentsos-faq {
  padding-block: var(--section-y);
}

.agentsos-workflow .steps {
  margin-top: 48px;
}

.agentsos-workflow .step {
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.018);
}

.agentsos-workflow .step-num {
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.agentsos-principle .value-block-inner {
  max-width: 900px;
}

.agentsos-principle .section-label {
  margin-bottom: 22px;
}

.principle-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.principle-equation span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.principle-equation span:nth-child(odd) {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
}

.agentsos-proof-grid {
  margin-top: 48px;
}

.agentsos-proof-grid .feature-icon {
  font-family: var(--font-mono);
  font-size: 15px;
}

.mail-spotlight {
  background:
    radial-gradient(circle at 16% 50%, rgba(255, 255, 255, 0.055), transparent 34%),
    var(--bg);
}

.mail-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: clamp(40px, 7vw, 88px);
}

.mail-spotlight .section-desc {
  margin-bottom: 30px;
}

.mail-spotlight-code {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 78px rgba(0, 0, 0, 0.56);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: clamp(48px, 8vw, 112px);
}

.faq-list {
  border-top: 1px solid var(--border);
}

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

.faq-list summary {
  position: relative;
  padding: 22px 44px 22px 0;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
}

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

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 20px;
  right: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 4px;
}

.faq-list p {
  max-width: 620px;
  margin: -4px 44px 22px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.agentsos-final-cta {
  max-width: 44rem;
}

.agentsos-final-cta .section-label {
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .agentsos-home .hero-split .hero-inner,
  .mail-spotlight-grid,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .agentsos-home .hero-copy h1 {
    max-width: 14ch;
  }

  .agent-map,
  .mail-spotlight-code {
    width: 100%;
    min-width: 0;
  }

  .faq-layout {
    gap: 36px;
  }
}

@media (max-width: 640px) {
  .agentsos-home .hero-copy h1 {
    font-size: clamp(2.5rem, 13vw, 3.6rem);
  }

  .agent-map-grid {
    grid-template-columns: 1fr;
  }

  .agent-map-grid > div,
  .agent-map-grid > div:nth-child(4),
  .agent-map-grid > div:nth-child(5) {
    grid-column: auto;
  }

  .platform-role-strip-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-role-strip span {
    border-bottom: 1px solid var(--border);
  }

  .platform-role-strip span + span {
    border-left: none;
  }

  .platform-role-strip span:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .platform-role-strip span:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}

/* Soft monochrome illustration language — AgentsOS */
.agentsos-home .agent-map {
  border-color: rgba(255, 255, 255, 0.075);
  background:
    radial-gradient(circle at 52% 18%, rgba(255, 255, 255, 0.055), transparent 34%),
    radial-gradient(circle at 18% 84%, rgba(255, 255, 255, 0.025), transparent 30%),
    rgba(9, 9, 9, 0.88);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 32px 96px rgba(0, 0, 0, 0.58),
    0 0 72px rgba(255, 255, 255, 0.018);
}

.agentsos-home .agent-map::before {
  opacity: 0.16;
  filter: blur(0.25px);
}

.agentsos-home .agent-map-grid > div {
  border-color: rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008)),
    rgba(255, 255, 255, 0.008);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.agentsos-home .agent-map-output {
  border-color: rgba(255, 255, 255, 0.075);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.047), rgba(255, 255, 255, 0.018));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 18px 44px rgba(0, 0, 0, 0.22);
}

.agent-catalog-card {
  min-height: 520px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.024), transparent 34%),
    rgba(255, 255, 255, 0.009);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.028) inset,
    0 22px 70px rgba(0, 0, 0, 0.16);
}

.agent-catalog-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.105);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.034), transparent 36%),
    rgba(255, 255, 255, 0.014);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 34px 90px rgba(0, 0, 0, 0.3),
    0 0 46px rgba(255, 255, 255, 0.012);
}

.agent-catalog-card--live {
  background:
    radial-gradient(circle at 78% 10%, rgba(255, 255, 255, 0.042), transparent 35%),
    rgba(255, 255, 255, 0.012);
}

.agent-catalog-card--featured {
  min-height: 500px;
}

.agent-glyph {
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.026);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.agent-status {
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.014);
}

.agent-status--live {
  border-color: rgba(255, 255, 255, 0.085);
  color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.025);
}

.agent-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 190px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.052);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.045), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.004));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.022) inset,
    0 26px 60px rgba(0, 0, 0, 0.14);
}

.agent-visual::before,
.agent-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(30px);
}

.agent-visual::before {
  top: -48px;
  left: 24%;
  width: 52%;
  height: 90px;
  background: rgba(255, 255, 255, 0.045);
}

.agent-visual::after {
  right: -40px;
  bottom: -48px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.018);
}

.agent-visual svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.agent-visual-halo,
.agent-visual-orbit {
  stroke: rgba(255, 255, 255, 0.075);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}

.agent-visual-halo--inner,
.agent-visual-orbit--inner {
  stroke: rgba(255, 255, 255, 0.105);
  stroke-dasharray: none;
}

.agent-visual-line,
.agent-visual-mail-line,
.agent-visual-flow,
.agent-visual-result-check,
.agent-visual-lock-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-visual-line--soft,
.agent-visual-line--primary {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.4;
}

.agent-visual-line--ghost {
  stroke: rgba(255, 255, 255, 0.055);
}

.agent-visual-node rect,
.agent-visual-frame,
.agent-visual-shield,
.agent-visual-lock,
.agent-visual-result-ring {
  fill: rgba(255, 255, 255, 0.012);
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.agent-visual-node circle,
.agent-visual-point,
.agent-visual-orbit-dot {
  fill: rgba(255, 255, 255, 0.42);
}

.agent-visual-node--focus rect {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.13);
}

.agent-visual-node--focus circle,
.agent-visual-point {
  fill: rgba(255, 255, 255, 0.68);
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.2));
}

.agent-visual-frame--back {
  stroke: rgba(255, 255, 255, 0.035);
}

.agent-visual-pill {
  fill: rgba(255, 255, 255, 0.115);
}

.agent-visual-pill--dim {
  fill: rgba(255, 255, 255, 0.055);
}

.agent-visual-pill--faint {
  fill: rgba(255, 255, 255, 0.028);
}

.agent-visual-area {
  fill: rgba(255, 255, 255, 0.018);
}

.agent-visual-axis {
  stroke: rgba(255, 255, 255, 0.045);
  stroke-width: 1;
}

.agent-visual-point--small,
.agent-visual-orbit-dot--dim {
  fill: rgba(255, 255, 255, 0.22);
  filter: none;
}

.agent-visual-orbit--outer {
  stroke: rgba(255, 255, 255, 0.04);
}

.agent-visual-shield {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(255, 255, 255, 0.17);
}

.agent-visual-lock {
  stroke: rgba(255, 255, 255, 0.2);
}

.agent-visual-flow {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-dasharray: 3 8;
}

.agent-visual-flow-dot {
  fill: rgba(255, 255, 255, 0.045);
  stroke: rgba(255, 255, 255, 0.11);
}

.agent-visual-flow-mark {
  fill: rgba(255, 255, 255, 0.68);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
}

.agent-visual-result-ring {
  fill: rgba(255, 255, 255, 0.018);
  stroke: rgba(255, 255, 255, 0.13);
}

.agent-visual-result-check {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1.4;
}

.agent-catalog-copy {
  margin-block: 28px 24px;
}

.agentsos-proof-grid {
  gap: 14px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.agentsos-proof-grid .feature-card {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.035), transparent 36%),
    rgba(255, 255, 255, 0.009);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.025) inset,
    0 24px 70px rgba(0, 0, 0, 0.14);
  transition-property: transform, border-color, background-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.agentsos-proof-grid .feature-card::before,
.agentsos-proof-grid .feature-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.agentsos-proof-grid .feature-card::before {
  top: 26px;
  left: 50%;
  width: 116px;
  height: 116px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.038);
  box-shadow:
    0 0 0 22px rgba(255, 255, 255, 0.012),
    0 0 0 44px rgba(255, 255, 255, 0.006);
}

.agentsos-proof-grid .feature-card::after {
  top: -30px;
  left: 25%;
  width: 50%;
  height: 110px;
  background: rgba(255, 255, 255, 0.028);
  filter: blur(34px);
}

.agentsos-proof-grid .feature-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.047), transparent 38%),
    rgba(255, 255, 255, 0.013);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 32px 84px rgba(0, 0, 0, 0.24);
}

.agentsos-proof-grid .feature-icon {
  position: relative;
  z-index: 1;
  margin: 64px auto 38px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.025);
}

.agentsos-proof-grid .feature-card h3,
.agentsos-proof-grid .feature-card p {
  position: relative;
  z-index: 1;
}

.mail-spotlight-code {
  border-color: rgba(255, 255, 255, 0.065);
  border-radius: 24px;
  background:
    radial-gradient(circle at 60% 0%, rgba(255, 255, 255, 0.035), transparent 34%),
    rgba(8, 8, 8, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 34px 92px rgba(0, 0, 0, 0.42),
    0 0 56px rgba(255, 255, 255, 0.012);
}

@media (max-width: 760px) {
  .agent-catalog-card,
  .agent-catalog-card--featured {
    min-height: 0;
    border-radius: 22px;
  }

  .agent-visual {
    height: 172px;
    border-radius: 17px;
  }

  .agent-visual--mail svg {
    width: 170%;
    max-width: none;
  }

  .agentsos-proof-grid .feature-card {
    min-height: 270px;
  }
}

/* Atmospheric agent scenes */
.agent-catalog-card {
  min-height: 560px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.052);
  background:
    radial-gradient(ellipse at 50% 17%, rgba(255, 255, 255, 0.026), transparent 40%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.009), rgba(255, 255, 255, 0.002));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.022),
    0 32px 90px rgba(0, 0, 0, 0.2);
}

.agent-catalog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.078);
  background:
    radial-gradient(ellipse at 50% 17%, rgba(255, 255, 255, 0.034), transparent 42%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.003));
}

.agent-visual {
  height: 238px;
  margin: 10px -12px 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 47%, rgba(255, 255, 255, 0.032), transparent 53%);
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.agent-visual::before {
  top: 12%;
  left: 20%;
  width: 60%;
  height: 66%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.026);
  filter: blur(42px);
}

.agent-visual::after {
  inset: auto 8% 14%;
  width: auto;
  height: 1px;
  border-radius: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.055), transparent);
  filter: none;
}

.agent-visual svg {
  width: 100%;
  height: 100%;
  transition-property: transform, opacity;
  transition-duration: 260ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.agent-catalog-card:hover .agent-visual svg {
  transform: translateY(-2px) scale(1.008);
}

.agent-visual::before,
.agent-visual::after {
  display: none;
}

.agent-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.78;
  filter: contrast(0.92) brightness(0.82);
  transform: scale(1.035);
  transition-property: transform, opacity, filter;
  transition-duration: 420ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.agent-catalog-card:hover .agent-visual img {
  opacity: 0.9;
  filter: contrast(0.96) brightness(0.9);
  transform: scale(1.055);
}

.agent-visual--design img { object-position: center 56%; }
.agent-visual--marketing img { object-position: center 58%; }
.agent-visual--mail img { object-position: center 52%; }

.agent-visual-whisper,
.agent-policy-link {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
  stroke-linecap: round;
}

.agent-visual-orbit {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.agent-visual-orbit--wide {
  stroke: rgba(255, 255, 255, 0.052);
}

.agent-glass-node rect,
.agent-policy-chip rect,
.agent-metric-card rect {
  fill: rgba(255, 255, 255, 0.075);
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
}

.agent-glass-node circle,
.agent-policy-chip circle {
  fill: rgba(255, 255, 255, 0.72);
}

.agent-glass-node path,
.agent-policy-chip path,
.agent-metric-card path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  stroke-linecap: round;
}

.agent-glass-node text,
.agent-policy-chip text,
.agent-metric-card text,
.agent-panel-title,
.agent-panel-caption,
.agent-mail-heading,
.agent-mail-caption,
.agent-mail-status-text {
  fill: rgba(255, 255, 255, 0.56);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.agent-panel-title {
  fill: rgba(0, 0, 0, 0.76);
  font-size: 8px;
  font-weight: 650;
}

.agent-panel-caption {
  fill: rgba(255, 255, 255, 0.46);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.agent-core-orb > circle:first-child {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.09));
}

.agent-core-orb > circle:nth-child(2) {
  fill: rgba(255, 255, 255, 0.74);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.34));
}

.agent-core-orb path {
  stroke: rgba(255, 255, 255, 0.19);
  stroke-width: 1;
  stroke-linecap: round;
}

.agent-layer {
  fill: rgba(255, 255, 255, 0.065);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.28));
}

.agent-layer--back {
  fill: rgba(255, 255, 255, 0.028);
  stroke: rgba(255, 255, 255, 0.1);
}

.agent-panel-rule,
.agent-design-guide {
  stroke: rgba(255, 255, 255, 0.105);
  stroke-width: 1;
}

.agent-panel-dot { fill: rgba(255, 255, 255, 0.5); }
.agent-panel-dot--dim { fill: rgba(255, 255, 255, 0.28); }
.agent-panel-dot--faint { fill: rgba(255, 255, 255, 0.14); }
.agent-soft-chip { fill: rgba(255, 255, 255, 0.2); }
.agent-soft-chip--dim { fill: rgba(255, 255, 255, 0.1); }
.agent-soft-chip--faint { fill: rgba(255, 255, 255, 0.055); }

.agent-design-curve {
  fill: none;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1.35;
  stroke-linecap: round;
}

.agent-design-handle {
  fill: rgba(255, 255, 255, 0.75);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.27));
}

.agent-contour {
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
}

.agent-contour--one { stroke: rgba(255, 255, 255, 0.3); }
.agent-contour--two { stroke: rgba(255, 255, 255, 0.13); }
.agent-contour--three { stroke: rgba(255, 255, 255, 0.07); }
.agent-growth-area { opacity: 0.7; }

.agent-growth-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.agent-metric-card {
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.2));
}

.agent-metric-card circle {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(255, 255, 255, 0.18);
}

.agent-metric-card--right { opacity: 0.62; }
.agent-metric-card text { fill: rgba(255, 255, 255, 0.68); font-size: 8px; }
.agent-metric-card .agent-metric-value { fill: rgba(255, 255, 255, 0.9); font-size: 9px; font-weight: 650; }
.agent-growth-point { fill: rgba(255, 255, 255, 0.72); filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
.agent-growth-point--small { fill: rgba(255, 255, 255, 0.35); filter: none; }

.agent-security-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.105);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.agent-security-ring--outer { stroke: rgba(255, 255, 255, 0.05); }
.agent-security-ring--inner { stroke: rgba(255, 255, 255, 0.18); stroke-dasharray: none; }

.agent-security-shield {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.08));
}

.agent-security-lock {
  fill: none;
  stroke: rgba(255, 255, 255, 0.33);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-policy-link { stroke: rgba(255, 255, 255, 0.09); }

.agent-visual--mail {
  height: 246px;
  margin-inline: -6px;
}

.agent-mail-panel rect:first-child {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.24));
}

.agent-mail-panel > circle:first-of-type { fill: rgba(255, 255, 255, 0.5); }
.agent-mail-panel > path:not(.agent-mail-envelope):not(.agent-mail-check) { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1; stroke-linecap: round; }
.agent-mail-heading { fill: rgba(255, 255, 255, 0.86); font-size: 11px; font-weight: 600; }
.agent-mail-caption { fill: rgba(255, 255, 255, 0.52); font-size: 9px; }
.agent-mail-caption--dim { fill: rgba(255, 255, 255, 0.34); }

.agent-mail-envelope {
  fill: rgba(255, 255, 255, 0.014);
  stroke: rgba(255, 255, 255, 0.21);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-mail-route {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 3 8;
}

.agent-mail-route--ghost { stroke: rgba(255, 255, 255, 0.07); }
.agent-mail-pulse { fill: rgba(255, 255, 255, 0.27); }
.agent-mail-pulse--two { fill: rgba(255, 255, 255, 0.72); filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3)); }

.agent-mail-token circle {
  fill: rgba(255, 255, 255, 0.028);
  stroke: rgba(255, 255, 255, 0.13);
}

.agent-mail-token text {
  fill: rgba(255, 255, 255, 0.74);
  font: 16px Georgia, "Times New Roman", serif;
}

.agent-mail-panel .agent-mail-check-ring { fill: rgba(255, 255, 255, 0.07); stroke: rgba(255, 255, 255, 0.24); }
.agent-mail-check { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.agent-mail-copy { fill: rgba(255, 255, 255, 0.19); }
.agent-mail-copy--dim { fill: rgba(255, 255, 255, 0.1); }
.agent-mail-copy--faint { fill: rgba(255, 255, 255, 0.055); }
.agent-mail-status { fill: rgba(255, 255, 255, 0.022); stroke: rgba(255, 255, 255, 0.07); }
.agent-mail-status-text { fill: rgba(255, 255, 255, 0.5); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; }

.agent-catalog-copy {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .agent-catalog-card,
  .agent-catalog-card--featured {
    min-height: 0;
  }

  .agent-visual,
  .agent-visual--mail {
    height: 212px;
    margin-inline: -18px;
  }

  .agent-visual--mail img {
    width: 100%;
  }
}

/* Workflow steps — explicit hierarchy, no decorative overlap */
.agentsos-workflow .landing-steps {
  gap: 16px;
}

.agentsos-workflow .step {
  display: flex;
  min-height: 250px;
  padding: 30px;
  flex-direction: column;
  border-color: rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.025), transparent 32%),
    rgba(255, 255, 255, 0.009);
}

.landing-steps .step-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.landing-steps .step-meta::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-inline-start: 4px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.085), transparent);
}

.landing-steps .step-num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.024);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.landing-steps .step-label {
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.agentsos-workflow .step h3 {
  margin: 0 0 12px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.agentsos-workflow .step p {
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

@media (max-width: 980px) {
  .agentsos-workflow .landing-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .agentsos-workflow .step {
    min-height: 0;
  }
}

/* Editorial responsibility map — one surface, no dashboard tiles */
.agentsos-home .agent-map {
  padding: clamp(24px, 3vw, 36px);
  border-color: rgba(255, 255, 255, 0.065);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 4%, rgba(255, 255, 255, 0.04), transparent 36%),
    rgba(8, 8, 8, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.028),
    0 36px 100px rgba(0, 0, 0, 0.34);
}

.agentsos-home .agent-map::before {
  display: none;
}

.agentsos-home .agent-map-head {
  padding: 0 0 28px;
  border: 0;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.agentsos-home .agent-map-state {
  color: rgba(255, 255, 255, 0.26);
}

.agentsos-home .agent-map-task {
  display: block;
  padding: 0 0 30px;
}

.agent-map-kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agentsos-home .agent-map-prompt {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.agent-map-list {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.agent-map-list > div {
  display: grid;
  grid-template-columns: 30px minmax(90px, 0.62fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  padding-block: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.agent-map-list span {
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.agent-map-list strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
}

.agent-map-list small {
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  line-height: 1.45;
}

.agentsos-home .agent-map-output {
  justify-content: flex-start;
  gap: 14px;
  margin-top: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.agentsos-home .agent-map-check {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  font-weight: 400;
}

.agentsos-home .agent-map-output small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agentsos-home .agent-map-output strong {
  color: rgba(255, 255, 255, 0.69);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

/* Proof ledger — concrete signals, not decorative feature cards */
.agentsos-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(36px, 6vw, 88px);
  row-gap: 0;
  margin-top: clamp(52px, 7vw, 84px);
}

.agentsos-proof-grid .feature-card {
  display: grid;
  grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
  min-height: 0;
  padding: 30px 0 40px;
  overflow: visible;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.agentsos-proof-grid .feature-card::before,
.agentsos-proof-grid .feature-card::after {
  display: none;
}

.agentsos-proof-grid .feature-card:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.085);
  background: transparent;
  box-shadow: none;
}

.proof-card-meta {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
}

.proof-card-meta span {
  color: rgba(255, 255, 255, 0.24);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.proof-card-meta strong {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.proof-card-copy h3 {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.proof-card-copy p {
  max-width: 39ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.43);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .agentsos-home .agent-map {
    padding: 22px;
    border-radius: 22px;
  }

  .agent-map-list > div {
    grid-template-columns: 24px minmax(78px, 0.6fr) minmax(0, 1fr);
    gap: 10px;
  }

  .agentsos-proof-grid {
    grid-template-columns: 1fr;
  }

  .agentsos-proof-grid .feature-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 20px;
    padding-block: 26px 32px;
  }
}

/* Agent workspaces — product interface expressed as inspectable code */
.agent-visual,
.agent-visual--mail {
  display: grid;
  place-items: center;
  height: 244px;
  margin: 10px -4px 0;
  padding: 14px;
  overflow: visible;
  border: 0;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255, 255, 255, 0.035), transparent 62%);
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.agent-workspace {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.6);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
    rgba(7, 7, 7, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 24px 64px rgba(0, 0, 0, 0.32);
  transform: translateY(0);
  transition-property: transform, border-color, box-shadow;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.agent-catalog-card:hover .agent-workspace {
  border-color: rgba(255, 255, 255, 0.125);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 30px 72px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.agent-workspace-bar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 35px;
  padding-inline: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(255, 255, 255, 0.018);
}

.agent-workspace-bar code,
.workspace-state,
.workspace-code code,
.workspace-command code,
.workspace-result,
.workspace-checks,
.workspace-score,
.workspace-gate,
.workspace-mail-result {
  font-family: var(--font-mono);
}

.agent-workspace-bar code {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.47);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-dots {
  display: flex;
  gap: 5px;
}

.workspace-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.workspace-dots i:nth-child(2) { opacity: 0.68; }
.workspace-dots i:nth-child(3) { opacity: 0.38; }

.workspace-state {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.018);
  font-size: 7px;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.agent-workspace-body {
  position: relative;
  min-height: 166px;
  padding: 18px 18px 16px;
}

.workspace-code {
  display: grid;
  gap: 6px;
}

.workspace-code p {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  line-height: 1.25;
}

.workspace-code p > span {
  color: rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.workspace-code code {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.51);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-code code b {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.workspace-code code em {
  color: rgba(255, 255, 255, 0.66);
  font-style: normal;
}

.workspace-code .code-removed code {
  color: rgba(255, 255, 255, 0.28);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.16);
}

.workspace-code .code-added code {
  color: rgba(255, 255, 255, 0.78);
}

.workspace-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 8px;
}

.workspace-result span {
  color: rgba(255, 255, 255, 0.3);
}

.workspace-result strong {
  color: rgba(255, 255, 255, 0.64);
  font-weight: 500;
}

.workspace-split,
.workspace-policy {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(90px, 0.92fr);
  gap: 18px;
}

.workspace-preview {
  position: relative;
  min-width: 0;
  height: 116px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
}

.workspace-preview::before {
  content: "preview";
  display: block;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.24);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-preview span {
  display: block;
  width: 74%;
  height: 5px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.workspace-preview span:nth-of-type(2) { width: 52%; opacity: 0.65; }
.workspace-preview span:nth-of-type(3) { width: 64%; opacity: 0.36; }

.workspace-preview i {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 28px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.workspace-command {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.3);
  font-size: 9px;
}

.workspace-command code {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-checks {
  display: grid;
  gap: 7px;
  padding-block: 12px;
}

.workspace-checks p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
}

.workspace-checks b {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 500;
}

.workspace-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.workspace-score span {
  color: rgba(255, 255, 255, 0.28);
  font-size: 8px;
  text-transform: uppercase;
}

.workspace-score strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
}

.workspace-gate {
  align-self: stretch;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
  text-align: center;
}

.workspace-gate span {
  color: rgba(255, 255, 255, 0.27);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-gate strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 500;
}

.workspace-gate i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  font-style: normal;
}

.workspace-mail-result {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
}

.mail-result-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.workspace-mail-result small,
.workspace-mail-result strong {
  display: block;
}

.workspace-mail-result small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.27);
  font-size: 7px;
  text-transform: uppercase;
}

.workspace-mail-result strong {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 500;
}

.workspace-mail-result > b {
  color: rgba(255, 255, 255, 0.35);
  font-size: 8px;
  font-weight: 400;
}

@media (max-width: 760px) {
  .agent-visual,
  .agent-visual--mail {
    height: 226px;
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .agent-workspace-body {
    min-height: 150px;
    padding: 15px;
  }
}

/* Runtime UI refinement — editor canvas instead of inline-code pills */
.agent-catalog-card {
  min-height: 530px;
  padding: 26px;
}

.agent-visual,
.agent-visual--mail {
  height: 226px;
  margin-top: 14px;
  padding: 10px 12px;
}

.agent-workspace {
  width: min(100%, 510px);
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004)),
    rgba(6, 6, 6, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 26px 70px rgba(0, 0, 0, 0.3);
}

.agent-workspace code,
.agent-workspace :not(pre) > code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.agent-workspace-bar {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 32px;
  padding-inline: 11px;
  background: rgba(255, 255, 255, 0.012);
}

.agent-workspace-bar code {
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
  letter-spacing: 0.01em;
}

.workspace-dots {
  gap: 4px;
}

.workspace-dots i {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
}

.workspace-state {
  padding: 3px 6px;
  border-color: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.3);
  background: transparent;
  font-size: 6px;
}

.agent-workspace-body {
  min-height: 156px;
  padding: 17px 17px 15px 50px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.01), transparent 38%),
    rgba(0, 0, 0, 0.04);
}

.agent-workspace-body::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(255, 255, 255, 0.008);
}

.agent-workspace-body::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 11px;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    0 27px 0 -1px rgba(6, 6, 6, 1),
    0 27px 0 0 rgba(255, 255, 255, 0.065),
    0 54px 0 -1px rgba(6, 6, 6, 1),
    0 54px 0 0 rgba(255, 255, 255, 0.04);
}

.workspace-code {
  gap: 7px;
}

.workspace-code p {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.workspace-code p > span {
  color: rgba(255, 255, 255, 0.14);
  font-size: 7px;
}

.workspace-code code {
  color: rgba(255, 255, 255, 0.46);
  font-size: 8px;
  line-height: 1.3;
}

.workspace-code code b {
  color: rgba(255, 255, 255, 0.72);
}

.workspace-code code em {
  color: rgba(255, 255, 255, 0.58);
}

.workspace-code .code-removed {
  opacity: 0.52;
}

.workspace-code .code-added {
  position: relative;
}

.workspace-code .code-added::before {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: -8px;
  width: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
}

.workspace-result {
  margin-top: 14px;
  padding-top: 11px;
  font-size: 7px;
}

.workspace-preview,
.workspace-gate,
.workspace-mail-result {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.008);
}

.workspace-preview {
  height: 112px;
  border-radius: 10px;
}

.workspace-command {
  padding: 0 0 12px;
  border-bottom-color: rgba(255, 255, 255, 0.045);
  font-size: 8px;
}

.workspace-checks {
  gap: 8px;
  padding-block: 11px;
}

.workspace-checks p,
.workspace-score span,
.workspace-mail-result > b {
  font-size: 7px;
}

.workspace-score strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.workspace-gate {
  border-radius: 10px;
}

.workspace-mail-result {
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
}

.agent-catalog-copy {
  margin-block: 22px 24px;
}

.agent-catalog-copy h3 {
  font-size: clamp(1.5rem, 2.15vw, 1.85rem);
  text-wrap: balance;
}

.agent-catalog-copy p:last-child {
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  line-height: 1.62;
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .agent-catalog-card {
    min-height: 0;
    padding: 22px;
  }

  .agent-visual,
  .agent-visual--mail {
    height: 214px;
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .agent-workspace-body {
    min-height: 148px;
    padding: 14px 14px 14px 45px;
  }

  .workspace-split,
  .workspace-policy {
    grid-template-columns: minmax(0, 1.1fr) minmax(78px, 0.9fr);
    gap: 12px;
  }
}

/* Terminal-first agent scenes — no browser or editor chrome */
.agent-workspace {
  border-radius: 13px;
  background:
    radial-gradient(circle at 84% 0%, rgba(255, 255, 255, 0.022), transparent 34%),
    rgba(5, 5, 5, 0.97);
}

.agent-workspace-bar {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 34px;
  border-bottom-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.008);
}

.workspace-dots {
  display: block;
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
}

.workspace-dots::before {
  content: ">_";
}

.workspace-dots i {
  display: none;
}

.agent-workspace-bar code {
  color: rgba(255, 255, 255, 0.48);
  font-size: 8px;
}

.agent-workspace-body {
  min-height: 156px;
  padding: 18px;
  background: transparent;
}

.agent-workspace-body::before,
.agent-workspace-body::after {
  display: none;
}

.workspace-code p {
  display: block;
}

.workspace-code p > span {
  display: none;
}

.workspace-code code {
  display: block;
  font-size: 8px;
  line-height: 1.35;
}

.workspace-code .code-added::before {
  left: -10px;
}

.workspace-preview::before {
  content: "output";
}

.workspace-preview,
.workspace-gate {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.006);
}

.workspace-command {
  color: rgba(255, 255, 255, 0.22);
}

.workspace-command code {
  color: rgba(255, 255, 255, 0.52);
}

.workspace-result,
.workspace-score,
.workspace-mail-result {
  border-top-color: rgba(255, 255, 255, 0.045);
}

.workspace-mail-result {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.006);
}

/* Recognizable UI patterns inside the terminal runtime */
.tui-query {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding-inline: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  font-family: var(--font-mono);
}

.tui-query > span { color: rgba(255, 255, 255, 0.3); font-size: 9px; }
.tui-query strong { overflow: hidden; color: rgba(255, 255, 255, 0.58); font-size: 8px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.tui-query kbd { color: rgba(255, 255, 255, 0.24); font: 7px var(--font-mono); }

.tui-options {
  display: grid;
  gap: 3px;
  margin-top: 7px;
}

.tui-options p {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin: 0;
  padding-inline: 9px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-mono);
}

.tui-options p.is-selected {
  color: rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.055);
}

.tui-options span { color: rgba(255, 255, 255, 0.19); font-size: 7px; }
.tui-options strong { font-size: 8px; font-weight: 400; }
.tui-options em { font-size: 7px; font-style: normal; font-variant-numeric: tabular-nums; }

.tui-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.24);
  font: 7px var(--font-mono);
}

.tui-footer strong { color: rgba(255, 255, 255, 0.48); font-weight: 400; }

.workspace-inspector {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.006);
  font-family: var(--font-mono);
}

.workspace-inspector small {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-inspector p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding-block: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.3);
  font-size: 7px;
}

.workspace-inspector b { color: rgba(255, 255, 255, 0.58); font-weight: 400; }

.tui-bento {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  grid-template-rows: 68px 42px;
  gap: 7px;
  height: 117px;
  font-family: var(--font-mono);
}

.tui-bento > div {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.008);
}

.tui-bento span { display: block; color: rgba(255, 255, 255, 0.24); font-size: 6px; text-transform: uppercase; }
.tui-bento strong { display: block; margin-top: 8px; color: rgba(255, 255, 255, 0.66); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tui-bento-main { grid-row: span 2; }
.tui-bento-main strong { font-size: 18px; }
.agent-visual .tui-sparkline {
  position: static;
  display: block;
  width: 100%;
  height: 32px;
  margin-top: 8px;
  overflow: hidden;
}

.tui-sparkline-area {
  fill: rgba(255, 255, 255, 0.035);
}

.tui-sparkline-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.44);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.tui-sparkline circle {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(5, 5, 5, 0.96);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.tui-bento-wide { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tui-bento-wide strong { margin: 0; font-size: 9px; }

.tui-steps {
  display: grid;
  gap: 5px;
}

.tui-steps p {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font-mono);
}

.tui-steps p.is-current { border-color: rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.018); }
.tui-steps i { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 50%; font-size: 7px; font-style: normal; }
.tui-steps span strong, .tui-steps span small { display: block; }
.tui-steps span strong { color: rgba(255, 255, 255, 0.56); font-size: 8px; font-weight: 400; }
.tui-steps span small { margin-top: 2px; color: rgba(255, 255, 255, 0.22); font-size: 6px; }
.tui-steps > p > b { color: rgba(255, 255, 255, 0.42); font-size: 6px; font-weight: 400; text-transform: uppercase; }

/* Hero runtime — same terminal/TUI language as the agent scenes */
.agentsos-home .agent-map {
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background:
    radial-gradient(circle at 84% 0%, rgba(255, 255, 255, 0.025), transparent 34%),
    rgba(5, 5, 5, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.028),
    0 36px 100px rgba(0, 0, 0, 0.4);
}

.agentsos-home .agent-map-head {
  min-height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.008);
  letter-spacing: 0;
  text-transform: none;
}

.hero-terminal-command {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hero-terminal-command i {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-style: normal;
}

.hero-terminal-command code,
.agent-map-output code {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 9px;
}

.agentsos-home .agent-map-state {
  color: rgba(255, 255, 255, 0.25);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agentsos-home .agent-map-task {
  padding: 24px 24px 20px;
}

.agent-map-kicker {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.24);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.agentsos-home .agent-map-prompt {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.8vw, 21px);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.agent-map-list {
  margin-inline: 24px;
  border-top-color: rgba(255, 255, 255, 0.055);
}

.agent-map-list > div {
  grid-template-columns: 24px minmax(76px, 0.55fr) minmax(0, 1fr) auto;
  gap: 10px;
  padding-block: 10px;
  border-bottom-color: rgba(255, 255, 255, 0.045);
  font-family: var(--font-mono);
}

.agent-map-list span { font-size: 7px; }
.agent-map-list strong { color: rgba(255, 255, 255, 0.56); font-size: 9px; font-weight: 400; }
.agent-map-list small { color: rgba(255, 255, 255, 0.28); font-size: 8px; }

.agent-map-list b {
  color: rgba(255, 255, 255, 0.4);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agentsos-home .agent-map-output {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  margin: 20px 0 0;
  padding: 15px 24px 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.008);
}

.agentsos-home .agent-map-check {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 9px;
}

.agentsos-home .agent-map-output small {
  font-size: 7px;
}

.agentsos-home .agent-map-output strong {
  font-family: var(--font-mono);
  font-size: 8px;
}

.agentsos-home .agent-map-output code {
  align-self: center;
  color: rgba(255, 255, 255, 0.24);
  font-size: 7px;
}

@media (max-width: 760px) {
  .agentsos-home .agent-map {
    padding: 0;
    border-radius: 14px;
  }

  .agentsos-home .agent-map-task {
    padding: 20px 18px 16px;
  }

  .agent-map-list {
    margin-inline: 18px;
  }

  .agent-map-list > div {
    grid-template-columns: 20px minmax(70px, 0.65fr) minmax(0, 1fr);
  }

  .agent-map-list b {
    display: none;
  }

  .agentsos-home .agent-map-output {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-inline: 18px;
  }

  .agentsos-home .agent-map-output code {
    display: none;
  }
}

/* Hero code tabs — real launch commands, not a simulated workflow */
.agentsos-home .hero-code-demo {
  --hero-code-inset: 28px;
  min-height: 370px;
  padding: 0;
}

.hero-code-tabs {
  display: flex;
  align-items: stretch;
  min-height: 44px;
  padding-inline: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.008);
}

.hero-code-tabs button {
  position: relative;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  color: rgba(255, 255, 255, 0.3);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition-property: color, background-color;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}

.hero-code-tabs button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 1px;
  background: transparent;
}

.hero-code-tabs button[aria-selected="true"] {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.018);
}

.hero-code-tabs button[aria-selected="true"]::after {
  background: rgba(255, 255, 255, 0.58);
}

.hero-code-tabs button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: -4px;
  border-radius: 7px;
}

.hero-code-panels {
  min-height: 278px;
  padding: 30px var(--hero-code-inset) 24px;
}

.hero-code-panel {
  width: 100%;
  min-width: 0;
  opacity: 0;
  transform: translateY(3px);
  transition-property: opacity, transform;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

.hero-code-panel.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero-code-label {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-code-panel pre {
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  white-space: pre-wrap;
}

.hero-code-panel pre code,
.hero-code-panel :not(pre) > code {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vw, 13px);
  line-height: 1.85;
}

.hero-code-panel code em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.code-prompt {
  color: rgba(255, 255, 255, 0.3);
}

.code-ok {
  color: rgba(255, 255, 255, 0.78);
}

.hero-code-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding-inline: var(--hero-code-inset);
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.006);
  font-family: var(--font-mono);
  font-size: 7px;
}

.hero-code-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-inline-start: auto;
  color: rgba(255, 255, 255, 0.48);
  transition-property: color;
  transition-duration: 140ms;
}

.hero-code-foot a:hover {
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 760px) {
  .agentsos-home .hero-code-demo {
    --hero-code-inset: 20px;
    min-height: 340px;
  }

  .hero-code-tabs button {
    flex: 1;
    padding-inline: 6px;
    font-size: 7px;
  }

  .hero-code-panels {
    min-height: 250px;
    padding-block: 24px 20px;
  }

  .hero-code-panel pre code {
    font-size: 9px;
    line-height: 1.75;
  }

  .hero-code-foot span:nth-child(2) {
    display: none;
  }
}

/* AgentsOS responsive stabilization — content-driven breakpoints */
.agentsos-home :is(.section-title, .value-block-title)[id] {
  scroll-margin-top: calc(var(--nav-h) + 72px);
}

@media (min-width: 961px) and (max-width: 1120px) {
  .agentsos-home .hero-split .hero-inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
    gap: 32px;
  }

  .agentsos-home .hero-copy h1 {
    font-size: clamp(3rem, 5.1vw, 3.65rem);
  }
}

@media (max-width: 960px) {
  .agentsos-home {
    --hero-top: 0px;
    --section-y: 88px;
  }

  .agentsos-home .hero {
    padding-top: 0;
  }

  .agentsos-home .hero-split {
    min-height: 0;
  }

  .agentsos-home .hero-split .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 48px 40px;
  }

  .agentsos-home .hero-copy,
  .agentsos-home .hero-split .hero-lead {
    max-width: 40rem;
  }

  .agentsos-home .hero-copy h1 {
    max-width: 13ch;
    font-size: clamp(3rem, 7.5vw, 4rem);
  }

  .agentsos-home .hero-code-demo {
    width: 100%;
    max-width: none;
  }

  .agentsos-home .section-head {
    margin-bottom: 44px;
  }

  .agentsos-home .agentsos-workflow .steps,
  .agentsos-home .agentsos-proof-grid {
    margin-top: 44px;
  }

  .agentsos-home .mail-spotlight-grid,
  .agentsos-home .faq-layout {
    gap: 40px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 600px) {
  .agentsos-home {
    --px: 20px;
    --section-y: 72px;
  }

  .agentsos-home .hero-split .hero-inner {
    gap: 28px;
    padding-block: 32px 28px;
  }

  .agentsos-home .pill-badges {
    gap: 6px;
    margin-bottom: 16px;
  }

  .agentsos-home .pill-badge {
    padding: 5px 9px;
    font-size: 11px;
  }

  .agentsos-home .hero-copy h1 {
    max-width: 12ch;
    margin-bottom: 16px;
    font-size: clamp(2.35rem, 11.8vw, 3rem);
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .agentsos-home .hero-lead {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.55;
  }

  .agentsos-home .hero-ctas,
  .agentsos-home .cta-buttons {
    gap: 10px;
  }

  .agentsos-home .btn {
    min-height: 44px;
  }

  .agentsos-home .hero-proof {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.55;
  }

  .agentsos-home .hero-code-demo {
    --hero-code-inset: 18px;
    min-height: 312px;
  }

  .agentsos-home .hero-code-tabs {
    min-height: 48px;
    padding-inline: 8px;
  }

  .agentsos-home .hero-code-tabs button {
    min-height: 48px;
    font-size: 7px;
  }

  .agentsos-home .hero-code-panels {
    min-height: 216px;
    padding-block: 20px 18px;
  }

  .agentsos-home .hero-code-label {
    margin-bottom: 16px;
  }

  .agentsos-home .hero-code-panel pre {
    max-width: 100%;
    overflow-x: auto;
  }

  .agentsos-home .hero-code-panel pre code {
    font-size: 8px;
    line-height: 1.7;
  }

  .agentsos-home .hero-code-foot {
    min-height: 46px;
    gap: 10px;
  }

  .agentsos-home .platform-role-strip span {
    padding: 14px 8px;
    font-size: 8px;
  }

  .agentsos-home .section-head {
    margin-bottom: 36px;
  }

  .agentsos-home .section-label {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .agentsos-home .section-title {
    margin-bottom: 16px;
    font-size: clamp(1.75rem, 9vw, 2.1rem);
    line-height: 1.12;
  }

  .agentsos-home .section-desc {
    font-size: 15px;
    line-height: 1.55;
  }

  .agentsos-home .agent-catalog-grid {
    gap: 12px;
    margin-top: 32px;
  }

  .agentsos-home .agent-catalog-card {
    padding: 20px;
    border-radius: 22px;
  }

  .agentsos-home .agent-visual,
  .agentsos-home .agent-visual--mail {
    height: 196px;
    margin-inline: -16px;
  }

  .agentsos-home .agent-catalog-copy {
    margin-block: 16px 24px;
  }

  .agentsos-home .agent-catalog-copy h3 {
    font-size: clamp(1.45rem, 8vw, 1.8rem);
  }

  .agentsos-home .agentsos-workflow .steps,
  .agentsos-home .agentsos-proof-grid {
    margin-top: 36px;
  }

  .agentsos-home .agentsos-workflow .step {
    padding: 24px;
  }

  .agentsos-home .landing-steps .step-meta {
    margin-bottom: 24px;
  }

  .agentsos-home .value-block-title br {
    display: none;
  }

  .agentsos-home .principle-equation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
    max-width: 240px;
    margin: 28px auto 0;
  }

  .agentsos-home .principle-equation span:nth-child(odd) {
    width: 100%;
  }

  .agentsos-home .mail-spotlight-grid,
  .agentsos-home .faq-layout {
    gap: 32px;
  }

  .agentsos-home .mail-spotlight-code .code-body {
    --code-copy-gutter: 18px;
    padding: 54px 18px 18px;
    font-size: 11px;
    line-height: 1.65;
  }

  .agentsos-home .mail-spotlight-code .code-body pre {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .agentsos-home .faq-list summary {
    min-height: 48px;
    padding: 18px 40px 18px 0;
    line-height: 1.4;
  }

  .agentsos-home .faq-list summary::after {
    top: 16px;
  }

  .agentsos-home .faq-list p {
    margin-inline-end: 0;
  }
}

@media (max-width: 420px) {
  .agentsos-home .hero-ctas .btn,
  .agentsos-home .cta-buttons .btn {
    width: 100%;
  }

  .agentsos-home .agent-catalog-actions {
    width: 100%;
  }

  .agentsos-home .agent-catalog-actions .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .agentsos-home {
    --px: 16px;
  }

  .agentsos-home .pill-badges {
    align-items: flex-start;
    flex-direction: column;
  }

  .agentsos-home .agentsos-proof-grid .feature-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .agentsos-home .proof-card-meta {
    align-items: center;
    flex-direction: row;
  }
}
