/* FreeAgentMaker brand palette: pink, orange, teal, sky, lime — applied via semantic tokens */
:root {
  color-scheme: light;
  /* Core swatches (reference) */
  --fam-pink: #e66bc9;
  --fam-orange: #f6ad55;
  --fam-teal: #6ac2ae;
  --fam-sky: #70c1e5;
  --fam-lime: #8dd24d;
  /* RGB tuples for rgba(..., alpha) */
  --accent-rgb: 230, 107, 201;
  --fam-orange-rgb: 246, 173, 85;
  --fam-teal-rgb: 106, 194, 174;
  --fam-sky-rgb: 112, 193, 229;
  --fam-lime-rgb: 141, 210, 77;

  --bg: #ffffff;
  --bg-soft: #f8fafb;
  --bee-cutout: #e8eef2;
  --card: #ffffff;
  --card-solid: #f3f6f8;
  --card-muted: #f4f7f9;
  --input-bg: #ffffff;
  --panel: #f3f6f8;
  --text: #0f1419;
  --text-soft: #1a2330;
  --muted: #4a5568;
  --muted-deep: #3d4856;
  /* Links, labels, highlights — pink */
  --accent: var(--fam-pink);
  --accent-hover: #d456b0;
  /* Primary filled buttons: deeper pink → teal for contrast with white label */
  --accent-2: #c951a8;
  --accent-3: #3d8ea3;
  --border: rgba(15, 20, 25, 0.1);
  --border-strong: rgba(15, 20, 25, 0.18);
  --border-subtle: rgba(15, 20, 25, 0.06);
  --text-muted: #64748b;
  --divider: rgba(15, 20, 25, 0.82);
  /* Hard-edge surfaces; keep pill CTAs at 999px in their rules */
  --radius-surface: 0;
  --ring: rgba(var(--accent-rgb), 0.45);
  --shadow-lg: 0 20px 50px rgba(15, 20, 25, 0.08);
  --shadow-sm: 0 6px 20px rgba(15, 20, 25, 0.06);
  --gradient-glow: rgba(var(--fam-sky-rgb), 0.1);
  --hover-surface: rgba(15, 20, 25, 0.05);
  --hover-surface-strong: rgba(15, 20, 25, 0.08);
  /* Pill CTAs — plum from pink + ink (solid fallback for older engines) */
  --cta-bg: #2a1f35;
  --cta-bg: color-mix(in srgb, var(--fam-pink) 38%, #0f172a 62%);
  --cta-text: #ffffff;
  --cta-bg-hover: #352a42;
  --cta-bg-hover: color-mix(in srgb, var(--fam-pink) 48%, #0f172a 52%);
  /* Saved-agent row accents — warm orange */
  --user-agent-accent: #e0982e;
  --user-agent-accent-hover: #c47f1c;
  --user-agent-border: rgba(var(--fam-orange-rgb), 0.5);
  /* Secondary UI hues (use in gradients, tags, states) */
  --state-success: #2f7d4a;
  --state-success-soft: rgba(var(--fam-lime-rgb), 0.2);
  --state-info-soft: rgba(var(--fam-sky-rgb), 0.18);
  --state-warm-soft: rgba(var(--fam-orange-rgb), 0.2);

  /* UI density — comfortable default; `body.ui-density-compact` tightens spacing */
  --ui-layout-padding-top: 1.15rem;
  --ui-card-padding-y: 1.1rem;
  --ui-card-padding-x: 1rem;
  --ui-channel-popups-mt: 0.55rem;
  --ui-channel-hint-mt: 0.55rem;
  --ui-channel-hint-lh: 1.4;
  --ui-field-hint-mt: 0.45rem;
  --ui-field-hint-lh: 1.35;
  --ui-form-group-heading-mt: 1.25rem;
  --ui-form-group-heading-mb: 0.5rem;
  --ui-label-mt: 0.8rem;
  --ui-label-mb: 0.35rem;
  --ui-control-pad-y: 0.7rem;
  --ui-control-pad-x: 0.75rem;
  --ui-checklist-item-py: 0.25rem;
  --ui-body-pad-bottom: 2.2rem;
}

body.ui-density-compact {
  --ui-layout-padding-top: 0.95rem;
  --ui-card-padding-y: 0.95rem;
  --ui-card-padding-x: 0.9rem;
  --ui-channel-popups-mt: 0.45rem;
  --ui-channel-hint-mt: 0.35rem;
  --ui-channel-hint-lh: 1.35;
  --ui-field-hint-mt: 0.3rem;
  --ui-field-hint-lh: 1.25;
  --ui-form-group-heading-mt: 0.95rem;
  --ui-form-group-heading-mb: 0.35rem;
  --ui-label-mt: 0.65rem;
  --ui-label-mb: 0.25rem;
  --ui-control-pad-y: 0.62rem;
  --ui-control-pad-x: 0.65rem;
  --ui-checklist-item-py: 0.18rem;
  --ui-body-pad-bottom: 1.85rem;
}

* {
  box-sizing: border-box;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0 1rem var(--ui-body-pad-bottom);
  font-family:
    "DM Sans",
    "Helvetica Neue",
    Helvetica,
    Arial,
    ui-sans-serif,
    sans-serif;
  background:
    radial-gradient(820px 400px at 88% 8%, rgba(var(--accent-rgb), 0.07), transparent 52%),
    radial-gradient(640px 360px at 6% 18%, rgba(var(--fam-sky-rgb), 0.09), transparent 50%),
    radial-gradient(520px 280px at 72% 92%, rgba(var(--fam-lime-rgb), 0.06), transparent 48%),
    radial-gradient(480px 240px at 22% 88%, rgba(var(--fam-teal-rgb), 0.05), transparent 45%),
    radial-gradient(900px 420px at 0% 0%, var(--gradient-glow), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem 0.75rem;
  max-width: 1000px;
  margin: 0 auto;
  gap: 1rem;
  border-bottom: 1px solid var(--divider);
  /* Keep auth controls on one row so elements line up horizontally. */
  flex-wrap: nowrap;
}
.top-nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  height: 32px;
}
.top-nav-logo:hover {
  color: var(--accent);
}
.top-nav-logo-mark {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  align-items: center;
}
.top-nav-logo-mark img {
  height: 28px;
  width: auto;
  max-width: min(140px, 38vw);
  object-fit: contain;
  display: block;
  /* Pull wordmark closer when the PNG has extra clear space after the bee */
  margin-right: -0.2rem;
}
.top-nav-logo:hover .top-nav-logo-mark img {
  filter: brightness(0.92);
}
.top-nav-density {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

nav.top-nav .top-nav-density-select {
  width: auto;
  min-width: 0;
  max-width: 11rem;
  margin: 0;
  padding: 0.32rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.top-nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}
.top-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  /* Solid brand accent (pink); matches --fam-pink / --accent in :root */
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 75%, var(--border-strong));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
}
.top-nav-logged-in,
.top-nav-logged-out {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 32px;
}

/* Author `display: flex` above overrides the default `[hidden]{display:none}` — restore hide behavior */
.top-nav-logged-in[hidden],
.top-nav-logged-out[hidden] {
  display: none !important;
}
.top-nav-email {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Ensure text centers with the avatar + buttons. */
  display: flex;
  align-items: center;
  height: 32px;
  line-height: 1;
}
.top-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 0.55rem;
  font-size: 0.85rem;
  line-height: 1;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-surface);
}
.top-nav-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top-nav-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  vertical-align: middle;
  margin: 0;
  padding: 0 1rem;
  background: var(--cta-bg);
  color: var(--cta-text);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.top-nav-signup:hover {
  background: var(--cta-bg-hover);
  text-decoration: none;
  color: var(--cta-text);
}
.top-nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 0.55rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-surface);
  cursor: pointer;
  box-shadow: none;
  filter: none;
  -webkit-appearance: none;
  appearance: none;
}
.top-nav-logout:hover {
  border-color: var(--muted);
  background: var(--hover-surface);
  transform: translateY(-3px);
  filter: none;
}

@media (max-width: 520px) {
  .top-nav {
    /* Allow wrapping on very small screens to avoid overflow. */
    flex-wrap: wrap;
  }
  .top-nav-auth {
    white-space: normal;
    flex-wrap: wrap;
  }
}

.hero {
  max-width: 1000px;
  margin: 1.35rem auto 0;
  padding: 0.25rem 0 1.35rem;
  border-bottom: 1px solid var(--divider);
}

.hero-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.55rem;
}
.hero-title-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
/* Beats `.hero p` for size/weight/color. */
.hero p.hero-tagline {
  margin: 0;
  max-width: 44rem;
  font-size: clamp(0.92rem, 2.15vw, 1.05rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--muted) 92%, var(--text) 8%);
}
.hero-logo {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  align-items: center;
}
.hero-logo img {
  height: min(52px, 14vw);
  width: auto;
  max-width: min(220px, 70vw);
  object-fit: contain;
  display: block;
  margin-right: -0.35rem;
}

.hero h1 {
  margin: 0;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(2rem, 4.8vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.hero-subtitle {
  margin-top: 0.6rem;
  max-width: 860px;
  font-size: 0.94rem;
  line-height: 1.28;
}

.hero-explain {
  margin-top: 0.75rem;
  max-width: 760px;
  font-size: 0.95rem;
  color: var(--muted);
}
.hero-explain strong {
  color: var(--text);
}

/* Must beat `.hero p { margin: 0 }` (higher specificity than lone `.hero-cta-row`). */
.hero p.hero-cta-row {
  /* Breathing room above CTA (was calc(2.75rem + 1.55em) — too tall once margin applied). */
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.hero-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Reduce CTA height ~30% for better hero spacing. */
  padding: 0.29rem 1.35rem;
  line-height: 1.1;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--cta-text);
  background: var(--cta-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: var(--shadow-sm);
}
.hero-primary-cta:hover {
  background: var(--cta-bg-hover);
  color: var(--cta-text);
  text-decoration: none;
}
.hero-cta-hint {
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}

.activation-autopilot-callout {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--fam-teal) 45%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 8%, var(--card-solid));
  border-radius: var(--radius-surface);
}
.activation-autopilot-heading {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.activation-autopilot-lead {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-soft);
}
.activation-autopilot-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}
.activation-autopilot-list li {
  margin: 0.35rem 0;
}
.activation-autopilot-list a {
  font-weight: 600;
  color: var(--accent);
}
.activation-autopilot-hint {
  margin: 0.65rem 0 0 !important;
  font-size: 0.82rem !important;
}

.autopilot-setup-wizard {
  margin: 0.55rem 0 0.7rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-surface);
}
.autopilot-setup-title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--text);
}
.autopilot-setup-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.autopilot-lane-btn {
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}
.autopilot-lane-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.autopilot-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.safe-go-live-panel {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}

#activation-autofix-list {
  margin-bottom: 0.5rem;
}

.founder-stack-bar {
  padding: 0.6rem 0.9rem;
  margin-top: -0.25rem;
}
.founder-stack-bar .founder-pack-copy { display: none; }
.founder-stack-bar .field-hint { margin: 0 0.5rem 0 0; }
.founder-stack-bar .founder-stack-btn { flex-shrink: 0; }

.founder-pack-banner {
  margin: 0.5rem 0 1.1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.founder-pack-copy h3 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.founder-pack-copy .field-hint {
  margin-top: 0.15rem;
}
.founder-pack-btn {
  width: auto;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--cta-bg);
  border: 1px solid var(--cta-bg);
  color: var(--cta-text);
  box-shadow: none;
}
.founder-pack-btn:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  color: var(--cta-text);
}

.founder-start-strip {
  margin: 0.5rem 0 0.9rem;
}

.returning-user-strip {
  margin: 0.35rem 0 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-surface);
  border: 1px dashed color-mix(in srgb, var(--accent) 38%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.returning-user-strip strong {
  color: var(--text);
  font-weight: 700;
}

.founder-value-strip {
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--accent) 6%, var(--surface)) 100%);
}
.founder-value-strip-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  max-width: 72ch;
}
.founder-value-strip-lead strong {
  color: var(--accent);
}

.first-ship-checklist {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-surface);
  background: var(--surface);
}
.first-ship-checklist-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.first-ship-checklist-lead {
  margin: 0 0 0.5rem !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
}
.first-ship-checklist-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.first-ship-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.4;
  cursor: pointer;
  color: var(--text);
}
.first-ship-check-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.trust-integration-copy {
  margin-top: 0.5rem !important;
  padding-top: 0.5rem;
  border-top: 1px solid var(--divider);
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
}

.first-win-tracker {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  border-left: 3px solid var(--accent);
  position: relative;
}

.first-win-tracker[hidden] {
  display: none !important;
}

.first-win-tracker.first-win-tracker--complete {
  border-left-color: #2e7d32;
}

.first-win-tracker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.first-win-tracker-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.first-win-tracker-sub {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 68ch;
}

.first-win-tracker-dismiss {
  width: auto;
  min-width: 2rem;
  margin-top: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  border-radius: 4px;
}

.first-win-tracker-dismiss:hover {
  color: var(--text);
  background: var(--panel);
}

.first-win-steps {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.first-win-steps li {
  margin-bottom: 0.25rem;
}

.first-win-step-done {
  color: var(--muted);
}

.first-win-step-todo {
  font-weight: 600;
  color: var(--text);
}

.first-win-step-todo strong {
  color: var(--accent);
}

.first-win-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.first-win-primary-cta {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  background: var(--cta-bg);
  border: 1px solid var(--cta-bg);
  color: var(--cta-text);
  cursor: pointer;
}

.first-win-primary-cta:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  color: var(--cta-text);
}

.lifecycle-rail {
  position: sticky;
  top: 0.35rem;
  z-index: 21;
  margin: 0 0 0.8rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, var(--panel));
  border-radius: var(--radius-surface);
}

.lifecycle-rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.lifecycle-mode-toggle {
  display: inline-flex;
  gap: 0.35rem;
}

.lifecycle-mode-toggle button {
  margin-top: 0;
  min-width: 5.2rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
}

.lifecycle-rail-steps {
  margin: 0.45rem 0;
  padding-left: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 1rem;
  font-size: 0.84rem;
}

.lifecycle-rail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lifecycle-rail-actions button {
  margin-top: 0;
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
}

body.ui-mode-simple [data-ui-advanced="true"],
body.ui-mode-work [data-ui-advanced="true"] {
  display: none !important;
}

body.ui-mode-work [data-ui-setup-only="true"] {
  display: none !important;
}

body.ui-mode-work .jump-to-nav a[data-ui-jump-setup="true"] {
  display: none;
}

body.ui-mode-work .jump-to-nav details.jump-to-more {
  display: inline-block;
}

body.ui-mode-setup .jump-to-nav a[data-ui-jump-work="true"],
body.ui-mode-pro .jump-to-nav a[data-ui-jump-work="true"] {
  display: none;
}

body.ui-mode-setup .jump-to-nav details.jump-to-more,
body.ui-mode-pro .jump-to-nav details.jump-to-more {
  display: none;
}

.work-mode-banner {
  position: relative;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 2.25rem 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--accent, #6d5efc) 12%, var(--panel));
}

.work-mode-banner-text {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.work-mode-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-mode-banner-dismiss {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.jump-to-more {
  display: none;
  margin-left: 0.35rem;
}

.jump-to-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.35rem;
}

.jump-to-more-links a {
  font-size: 0.85rem;
}

.activation-work-group {
  margin: 0.65rem 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--bg);
}

.activation-work-group > summary {
  cursor: pointer;
  font-weight: 600;
}

body.ui-mode-work.ui-activation-shipped .activation-work-group:not(.activation-work-group--open) {
  /* closed by default via JS removing open attr */
}

body.ui-mode-work #lifecycle-rail-cta[data-lifecycle-done="true"] {
  opacity: 0.55;
  pointer-events: none;
}

body.ui-mode-simple #advisory-council-panel,
body.ui-mode-simple #ops-diagnostics-panel,
body.ui-mode-simple #meeting-ops-panel,
body.ui-mode-simple #meeting-action-candidates-panel,
body.ui-mode-simple #waiting-on-panel,
body.ui-mode-simple #founder-outcome-feed-panel {
  display: none !important;
}

@media (max-width: 820px) {
  .lifecycle-rail-steps {
    grid-template-columns: 1fr;
  }
  .lifecycle-rail-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.section-intro {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
}
.section-intro strong {
  color: var(--text);
}

.founder-launch-path {
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  border-radius: 0;
  border-left: 3px solid var(--accent);
}

.where-to-use {
  margin-top: 0.25rem;
}
.where-to-use-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.where-to-use-link:hover {
  text-decoration: underline;
}

.form-group-heading {
  margin: var(--ui-form-group-heading-mt) 0 var(--ui-form-group-heading-mb);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.form-group-heading:first-of-type {
  margin-top: 0;
}

.custom-agent-identity {
  margin-bottom: 0.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--divider);
}

.custom-agent-identity .form-group-heading {
  margin-top: 0;
}

.account-login-block {
  font-family: inherit;
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 1.25rem 1rem;
  border-radius: 0;
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  background: var(--bg);
  box-shadow: none;
}

.account-login-heading {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.account-login-block .field-hint {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.account-login-block label {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
}

.account-login-block .auth-grid input {
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: var(--radius-surface);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.account-login-block .auth-actions {
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.account-login-block .auth-actions button {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.account-login-block .auth-actions button:hover {
  border-color: var(--border-strong);
  background: var(--card-muted);
}

.account-login-block #login-btn {
  background: var(--cta-bg);
  color: var(--cta-text);
  border-color: var(--cta-bg);
  border-radius: 999px;
  font-weight: 700;
}

.account-login-block #login-btn:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  color: var(--cta-text);
}

.account-login-block #login-btn:disabled {
  background: color-mix(in srgb, var(--cta-bg) 20%, #cbd5e1);
  border-color: color-mix(in srgb, var(--cta-bg) 20%, #cbd5e1);
  color: #475569;
}

.account-login-block #auth-status {
  margin-top: 0.6rem;
  font-size: 0.88rem;
}

.account-usage-summary {
  margin-top: 0.75rem;
  padding: 0.5rem 0;
}
.audit-log-details {
  margin-top: 0.75rem;
  padding: 0.4rem 0;
}
.audit-log-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
}

.troubleshooter-prompt {
  width: 100%;
  margin-top: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.35;
  min-height: 180px;
  resize: vertical;
}
.audit-log-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  max-height: 12rem;
  overflow-y: auto;
}
.audit-log-entry {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}
.audit-log-entry:last-child { border-bottom: none; }
.audit-log-date { color: var(--muted); margin-right: 0.5rem; }
.audit-log-action { font-weight: 500; }
.audit-log-resource { color: var(--muted); margin-left: 0.25rem; }

.account-usage-summary .form-group-heading {
  margin-bottom: 0.25rem;
}
.account-usage-alert-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.account-usage-alert-row label {
  margin: 0;
}
.account-usage-alert-row select {
  min-width: 5rem;
}
.account-usage-alert-row .field-hint {
  margin: 0;
  flex-basis: 100%;
}

.template-category-filter-row {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.template-category-filter-row label {
  margin: 0;
}
.template-category-filter-row select {
  min-width: 10rem;
}

.share-link-banner[hidden] {
  display: none !important;
}

.share-link-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  margin: 0 0 0.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  border-left: none;
  border-right: none;
  flex-wrap: wrap;
}

.share-link-banner #share-link-banner-text {
  flex: 1 1 12rem;
  min-width: 0;
}

.share-link-banner button {
  width: auto;
  max-width: none;
  margin-top: 0;
  flex: 0 0 auto;
}

.share-link-banner #share-link-clone-btn {
  margin-left: auto;
}

/* Ghost-style dismiss: not full-width primary gradient (global button rule) */
.share-link-banner .share-link-dismiss-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--panel);
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  transform: none;
  filter: none;
}

.share-link-banner .share-link-dismiss-btn:hover:not(:disabled),
.share-link-banner .share-link-dismiss-btn:focus-visible:not(:disabled) {
  background: var(--hover-surface);
  color: var(--text);
  transform: none;
  filter: none;
}

.post-signup-autopilot-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  margin: 0 0 0.5rem;
  background: color-mix(in srgb, var(--fam-teal) 10%, var(--card-solid));
  border: 1px solid color-mix(in srgb, var(--fam-teal) 40%, var(--border));
  border-radius: var(--radius-surface);
  flex-wrap: wrap;
}
.post-signup-autopilot-banner[hidden] {
  display: none !important;
}
.post-signup-autopilot-text {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-soft);
}
.post-signup-autopilot-text a {
  font-weight: 600;
  color: var(--accent);
}
.post-signup-autopilot-dismiss {
  flex-shrink: 0;
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.post-signup-autopilot-dismiss:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--fam-teal) 35%, var(--border));
}

.founder-pack-autopilot-hint {
  display: block;
  margin-top: 0.45rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  border-left: 3px solid color-mix(in srgb, var(--fam-teal) 55%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 6%, transparent);
  border-radius: 0 var(--radius-surface) var(--radius-surface) 0;
}
.founder-pack-autopilot-hint a {
  font-weight: 600;
  color: var(--accent);
}

.founder-pack-agent-autopilot-list {
  margin: 0.35rem 0 0.5rem 1rem;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}
.founder-pack-agent-autopilot-list li {
  margin: 0.25rem 0;
}
.founder-pack-agent-autopilot-list strong {
  color: var(--text-soft);
}
.founder-pack-agent-autopilot-list a {
  font-weight: 600;
  color: var(--accent);
}

.baseline-trust-nudge-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
  border: 1px solid color-mix(in srgb, var(--fam-teal) 40%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 9%, var(--card-solid));
  border-radius: var(--radius-surface);
}
.baseline-trust-nudge-banner[hidden] {
  display: none !important;
}
.baseline-trust-nudge-text {
  margin: 0;
  flex: 1;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-soft);
}
.baseline-trust-nudge-text a {
  font-weight: 600;
  color: var(--accent);
}
.baseline-trust-nudge-dismiss {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.baseline-trust-nudge-dismiss:hover {
  color: var(--text);
}

.agent-access-role-banner {
  padding: 0.6rem 0.85rem;
  margin: 0 0 0.85rem;
  border: 1px solid color-mix(in srgb, var(--fam-amber, #d97706) 45%, var(--border));
  background: color-mix(in srgb, var(--fam-amber, #d97706) 12%, var(--card-solid));
  border-radius: var(--radius-surface);
}
.agent-access-role-banner[hidden] {
  display: none !important;
}
.agent-access-role-banner-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
}
.agent-access-role-banner-text strong {
  color: var(--text);
}
.saved-item-badge-role {
  background: color-mix(in srgb, var(--fam-amber, #d97706) 22%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--fam-amber, #d97706) 35%, var(--border));
  color: var(--text);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.saved-item-badge-owner {
  background: color-mix(in srgb, var(--fam-teal) 14%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--fam-teal) 30%, var(--border));
  color: var(--text);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.agent-invite-role-matrix {
  margin-top: 0.65rem;
  max-width: 52rem;
}

.account-usage-text {
  white-space: pre-line;
}

.usage-cost-footnote {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.anchor-jump-flash {
  animation: anchorJumpFlash 0.9s ease-out;
}

@keyframes anchorJumpFlash {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--fam-teal) 42%, transparent);
  }
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}

.run-history-tools {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.2rem 0;
}

.run-history-tool-trace-details {
  margin-top: 0.25rem;
}
.run-history-tool-trace-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.8rem;
}
.run-history-tool-step {
  font-size: 0.8rem;
  margin: 0.15rem 0;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
}
.run-history-tool-name {
  font-weight: 600;
  color: var(--text-soft);
}
.run-history-tool-args {
  color: var(--muted);
  margin-left: 0.25rem;
}

.run-history-why-details {
  margin-top: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
}
.run-history-why-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}
.run-history-why-body {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.run-history-why-section {
  font-size: 0.85rem;
}
.run-history-why-section strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
}
.run-history-why-pre {
  margin: 0;
  padding: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow-y: auto;
}

.directory-featured-tag {
  display: inline-block;
  background: var(--fam-teal);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-surface);
  margin-right: 0.25rem;
}

.workspaces-details { margin-top: 1rem; }
.workspaces-create { display: flex; gap: 0.5rem; margin: 0.5rem 0; flex-wrap: wrap; }
.workspaces-create input { flex: 1; min-width: 120px; }
.workspaces-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.workspace-item { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.workspace-item:last-child { border-bottom: none; }
.workspace-invite { display: flex; gap: 0.25rem; margin-top: 0.25rem; flex-wrap: wrap; }
.workspace-invite input { flex: 1; min-width: 140px; }
.workspace-members { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.workspace-assign-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.workspace-assign-row select { min-width: 160px; }
.workspace-governance-details { margin-top: 0.75rem; }
.workspace-governance-fields { margin-top: 0.65rem; display: grid; gap: 0.5rem; max-width: 420px; }
.workspace-governance-actions { margin-top: 0.65rem; margin-bottom: 0; }

.run-debugger-shortcuts { margin: 0.35rem 0 0.65rem; }
.run-debugger-shortcuts-label { display: block; font-weight: 600; opacity: 0.92; margin-bottom: 0.35rem; }
.run-debugger-shortcuts-nav,
.trust-breakdown-shortcuts-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.run-debugger-shortcuts-hint,
.trust-breakdown-shortcuts-hint {
  margin-top: 0.45rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.run-debugger-body-pre {
  max-height: 420px;
  overflow: auto;
}
.run-debugger-footer-actions {
  margin-top: 0.65rem;
}

.trust-breakdown-panel .trust-breakdown-subheading {
  margin: 0.75rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.custom-tools-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.custom-tool-row { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.custom-tool-row:last-child { border-bottom: none; }
.custom-tool-row label { display: block; margin-top: 0.35rem; }
.custom-tool-row input[type="text"],
.custom-tool-row input[type="url"],
.custom-tool-row textarea { width: 100%; max-width: 480px; }
.custom-tool-row textarea { min-height: 60px; font-family: monospace; font-size: 0.85rem; }
.custom-tool-remove { margin-top: 0.35rem; }

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  line-height: 1;
  cursor: help;
  color: var(--muted);
}

.jump-to-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.65rem 1rem;
  margin: 0 auto;
  max-width: 1000px;
  font-size: 0.88rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: none;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  border-radius: var(--radius-surface);
  box-shadow: none;
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
.jump-to-label {
  color: var(--muted);
  margin-right: 0.25rem;
}
.jump-to-nav a {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}
/* One FAM swatch per heading (order: Account → … → Dashboard); Dashboard = orange like Build agent */
.jump-to-nav a:nth-of-type(1) {
  color: var(--fam-pink);
}
.jump-to-nav a:nth-of-type(1):hover,
.jump-to-nav a:nth-of-type(1):focus-visible {
  color: color-mix(in srgb, var(--fam-pink) 78%, #0f172a);
}
.jump-to-nav a:nth-of-type(2) {
  color: var(--fam-orange);
}
.jump-to-nav a:nth-of-type(2):hover,
.jump-to-nav a:nth-of-type(2):focus-visible {
  color: color-mix(in srgb, var(--fam-orange) 72%, #0f172a);
}
.jump-to-nav a:nth-of-type(3) {
  color: color-mix(in srgb, var(--fam-teal) 88%, #0f172a);
}
.jump-to-nav a:nth-of-type(3):hover,
.jump-to-nav a:nth-of-type(3):focus-visible {
  color: color-mix(in srgb, var(--fam-teal) 68%, #0f172a);
}
.jump-to-nav a:nth-of-type(4) {
  color: color-mix(in srgb, var(--fam-sky) 85%, #0f172a);
}
.jump-to-nav a:nth-of-type(4):hover,
.jump-to-nav a:nth-of-type(4):focus-visible {
  color: color-mix(in srgb, var(--fam-sky) 62%, #0f172a);
}
.jump-to-nav a:nth-of-type(5) {
  color: color-mix(in srgb, var(--fam-lime) 82%, #0f172a);
}
.jump-to-nav a:nth-of-type(5):hover,
.jump-to-nav a:nth-of-type(5):focus-visible {
  color: color-mix(in srgb, var(--fam-lime) 58%, #0f172a);
}
.jump-to-nav a:nth-of-type(6) {
  color: var(--fam-orange);
}
.jump-to-nav a:nth-of-type(6):hover,
.jump-to-nav a:nth-of-type(6):focus-visible {
  color: color-mix(in srgb, var(--fam-orange) 72%, #0f172a);
}
.jump-to-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jump-to-nav a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-surface);
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--cta-text);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-surface);
  font-size: 0.9rem;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.checkout-return-banner {
  width: min(100%, 1000px);
  margin: -0.2rem auto 0.9rem;
  display: none !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  background: var(--panel);
  padding: 0.62rem 0.75rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.checkout-return-banner[hidden] {
  display: none;
}

.checkout-return-banner[data-visible="1"] {
  display: flex !important;
}

.checkout-return-banner[data-variant="success"] {
  border-color: #15803d;
  background: #ecfdf5;
  color: #14532d;
}

.checkout-return-banner[data-variant="warning"] {
  border-color: color-mix(in srgb, var(--fam-orange) 65%, #ca8a04);
  background: color-mix(in srgb, var(--fam-orange) 16%, white);
  color: #713f12;
}

.checkout-return-banner button {
  width: auto;
  margin-top: 0;
  padding: 0.38rem 0.62rem;
  border-radius: 0;
  font-size: 0.82rem;
}

.opener-video-section {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 1.05rem 0 1.15rem;
  position: relative;
  border-bottom: 1px solid var(--divider);
}

.how-to-video-resources-section {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--divider);
}
.how-to-video-resources {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: center;
}
.how-to-video-resources a {
  font-weight: 600;
  color: var(--accent);
}
.how-to-video-resources-hint {
  color: var(--muted);
  font-weight: 400;
}

.how-to-video-resources-section .how-to-video-resources-second {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.opener-video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: #000;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.opener-video-fallback-image {
  width: 100%;
  height: 100%;
  display: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: #000;
  box-shadow: none;
  position: absolute;
  inset: 0;
  z-index: 2;
}

.opener-video[hidden],
.opener-video-fallback-image[hidden] {
  display: none !important;
}

.opener-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  min-width: 170px;
  padding: 0.55rem 0.9rem;
  margin-top: 0;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(6, 11, 22, 0.66);
  color: #eef5ff;
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  z-index: 3;
}

.offer-modal[hidden] {
  display: none;
}

.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.overage-modal {
  z-index: 10001;
}

.founder-command-modal {
  z-index: 10002;
}

.founder-command-panel {
  max-width: 640px;
}

#founder-command-search {
  width: 100%;
  margin: 8px 0 12px;
}

#founder-command-list .dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#founder-command-list .field-hint {
  margin: 0;
}

.overage-panel {
  max-width: 720px;
}

.overage-metrics {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.overage-metric {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 0.6rem 0.65rem;
  border-radius: var(--radius-surface);
}

.overage-metric strong {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.overage-metric span {
  display: block;
  margin-top: 0.25rem;
  font-weight: 800;
  color: var(--text);
}

.overage-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
}

.overage-actions button {
  margin-top: 0;
  flex: 1 1 0;
}

@media (max-width: 780px) {
  .overage-metrics {
    grid-template-columns: 1fr;
  }
  .overage-actions {
    flex-direction: column;
  }
}

.offer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.offer-panel {
  position: relative;
  width: min(900px, 100%);
  border: 1px solid var(--divider);
  border-radius: 0;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  padding: 2.2rem clamp(1rem, 2.5vw, 2.3rem) 1.7rem;
}

.offer-close {
  position: absolute;
  right: 1.1rem;
  top: 1.1rem;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  margin-top: 0;
  padding: 0;
  box-shadow: none;
}

.offer-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.offer-panel h2 {
  margin: 1.05rem 0 0;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.8vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.offer-copy {
  margin: 0.85rem 0 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2.7vw, 1.22rem);
  line-height: 1.45;
}

.offer-highlight {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  padding: 1.1rem 1rem;
  text-align: center;
}

.offer-highlight strong {
  display: block;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  background: linear-gradient(135deg, var(--fam-pink), var(--fam-sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.offer-highlight span {
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(1.05rem, 2.5vw, 1.65rem);
  font-weight: 700;
}

.offer-cta {
  display: block;
  margin-top: 1.2rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--cta-text);
  background: var(--cta-bg);
  border: 1px solid var(--cta-bg);
  box-shadow: var(--shadow-sm);
}

.offer-cta:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  filter: none;
}

.offer-footnote {
  margin: 0.95rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* First-visit expectation modal — above offer (z-index 30) and product tour overlays */
.trust-first-modal {
  z-index: 10000;
}

.trust-first-panel h2 {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  line-height: 1.12;
}

.trust-first-copy {
  font-size: clamp(0.98rem, 2.2vw, 1.1rem);
  line-height: 1.5;
}

.trust-first-copy strong {
  font-weight: 700;
}

.trust-first-continue {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  border-radius: 999px;
  text-align: center;
  padding: 0.85rem 1.25rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--cta-text);
  background: var(--cta-bg);
  border: 1px solid var(--cta-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.trust-first-continue:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
}

.social-proof {
  margin: 0;
  margin-top: 1.2rem;
  padding: 4rem 2rem;
  background: var(--panel);
  border-top: 1px solid var(--divider);
}

.tier-showcase {
  max-width: 1000px;
  margin: 0 auto 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--divider);
  font-family: inherit;
}

.tier-billing-row {
  margin: 0 auto 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.tier-billing-active {
  color: var(--accent);
}

.tier-toggle-track {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  width: 42px !important;
  min-width: 42px;
  max-width: 42px;
  margin-top: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.tier-toggle-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  transition: transform 0.18s ease;
}

.tier-toggle-track[aria-checked="true"] {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.tier-toggle-track[aria-checked="true"] .tier-toggle-dot {
  transform: translateX(18px);
}

.tier-save-badge {
  border-radius: 999px;
  padding: 0.13rem 0.45rem;
  font-size: 0.88rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.tier-showcase h2 {
  margin: 0;
  text-align: center;
  font-family: inherit;
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.tier-showcase > p {
  margin: 0.35rem auto 0.95rem;
  max-width: 760px;
  text-align: center;
  color: var(--muted);
  line-height: 1.4;
  font-size: 1.02rem;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.tier-card {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  padding: 1.1rem 1.05rem;
  box-shadow: none;
  position: relative;
}

.tier-card h3 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 700;
}

.tier-price {
  margin: 0.55rem 0 0;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

.tier-price-caption {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.tier-price-old {
  margin-right: 0.4rem;
  color: var(--muted-deep);
  text-decoration: line-through;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
}

.tier-note {
  margin: 0.55rem 0 0;
  color: #f5bb42;
  font-size: 0.9rem;
}

.tier-card ul {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.tier-card li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text-soft);
  line-height: 1.3;
  font-size: 1.02rem;
}

.tier-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.tier-cta {
  display: block;
  margin-top: 1rem;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--cta-text);
  background: var(--cta-bg);
  border: 1px solid var(--cta-bg);
  box-shadow: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.tier-cta:hover,
.tier-cta:focus-visible {
  transform: translateY(-1px);
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  filter: none;
}

.tier-cta-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.tier-cta-secondary:hover {
  border-color: var(--cta-bg);
  color: var(--cta-bg);
}

.featured-tier {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2) inset;
}

.tier-badge {
  position: absolute;
  right: 0.85rem;
  top: 0.8rem;
  margin: 0;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border);
}

.social-proof h2 {
  margin: 0 0 1rem;
  font-family: inherit;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  background: linear-gradient(135deg, var(--fam-pink), var(--fam-sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.social-proof > p {
  margin: 0 auto 3rem;
  max-width: 600px;
  text-align: center;
  color: var(--muted);
  line-height: 1.4;
  font-size: 1.1rem;
  font-family: inherit;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 2rem;
  backdrop-filter: none;
  transition: all 0.3s ease;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.stars {
  color: #fbbf24;
  letter-spacing: 0;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.testimonial-card p {
  margin: 0 0 1.5rem;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 1rem;
  font-style: italic;
  font-family: inherit;
}

.person {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--cta-text);
  background: var(--cta-bg);
}

.person strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  font-family: inherit;
}

.person span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-family: inherit;
}

.layout {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: var(--ui-layout-padding-top);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 1px;
  background: var(--divider);
}

.card {
  background: var(--bg);
  backdrop-filter: none;
  border: none;
  border-radius: var(--radius-surface);
  padding: var(--ui-card-padding-y) var(--ui-card-padding-x);
  box-shadow: none;
  min-width: 0;
}

.agent-builder-card {
  min-width: 0;
  position: relative;
  z-index: 2;
}

.generated-output-card {
  position: relative;
  z-index: 1;
}

.generated-output-card {
  min-width: 0;
}

.pricing-card {
  grid-column: 1 / -1;
}

.pricing-grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.6rem;
}

.plan-box {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.7rem;
  background: var(--panel);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-box:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.plan-box h3 {
  margin: 0;
}

.plan-box p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.plan-price {
  color: var(--text) !important;
  font-size: 1.1rem;
  font-weight: 700;
}

.plan-price span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.featured-plan {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.2) inset,
    0 12px 30px rgba(0, 0, 0, 0.08);
}

.pricing-actions {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.link-btn {
  text-decoration: none;
  padding: 0.58rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--cta-bg);
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.link-btn:hover,
.link-btn:focus-visible {
  transform: translateY(-1px);
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  opacity: 1;
}

h2 {
  margin-top: 0;
  letter-spacing: -0.01em;
}

label {
  display: block;
  margin-top: var(--ui-label-mt);
  margin-bottom: var(--ui-label-mb);
  font-weight: 600;
}

input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: var(--ui-control-pad-y) var(--ui-control-pad-x);
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    background-color 0.15s ease;
}

button {
  width: 100%;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: var(--ui-control-pad-y) var(--ui-control-pad-x);
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    background-color 0.15s ease;
}

input:not([type="checkbox"]):focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--ring);
  box-shadow: 0 0 0 3px var(--ring);
}

textarea {
  resize: vertical;
}

.channel-popups {
  margin-top: var(--ui-channel-popups-mt);
  display: grid;
  gap: 0.4rem;
}

.channel-hint {
  margin: var(--ui-channel-hint-mt) 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: var(--ui-channel-hint-lh);
}

.field-hint {
  margin: var(--ui-field-hint-mt) 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: var(--ui-field-hint-lh);
}

#auth-status[data-variant="success"] {
  color: #14532d;
}

#auth-status[data-variant="warning"] {
  color: #713f12;
}

#auth-status[data-variant="error"] {
  color: #881337;
}

#gmail-send-status,
#outlook-send-status,
#website-qa-status,
#website-qa-automation-status,
#security-connector-status,
#social-manager-status,
#social-channels-panel .social-publish-platform-heading {
  margin: 0.85rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-soft);
}
#social-channels-panel .social-publish-platform-heading--divider {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

#social-channel-status {
  margin: 0.5rem 0 0.2rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--input-bg);
}

#gmail-send-status[data-variant="success"],
#outlook-send-status[data-variant="success"],
#website-qa-status[data-variant="success"],
#website-qa-automation-status[data-variant="success"],
#security-connector-status[data-variant="success"],
#social-manager-status[data-variant="success"],
#social-channel-status[data-variant="success"] {
  border-color: #15803d;
  color: #14532d;
  background: #ecfdf5;
}

#gmail-send-status[data-variant="warning"],
#outlook-send-status[data-variant="warning"],
#website-qa-status[data-variant="warning"],
#website-qa-automation-status[data-variant="warning"],
#security-connector-status[data-variant="warning"],
#social-manager-status[data-variant="warning"],
#social-channel-status[data-variant="warning"] {
  border-color: color-mix(in srgb, var(--fam-orange) 65%, #ca8a04);
  color: #713f12;
  background: color-mix(in srgb, var(--fam-orange) 16%, white);
}

#gmail-send-status[data-variant="error"],
#outlook-send-status[data-variant="error"],
#website-qa-status[data-variant="error"],
#website-qa-automation-status[data-variant="error"],
#security-connector-status[data-variant="error"],
#social-manager-status[data-variant="error"],
#social-channel-status[data-variant="error"] {
  border-color: #be123c;
  color: #881337;
  background: color-mix(in srgb, var(--fam-pink) 12%, white);
}

.social-mcp-tool-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 860px) {
  .social-mcp-tool-grid {
    grid-template-columns: 1fr 1fr;
  }
  .social-mcp-tool-grid > div:last-child {
    grid-column: 1 / -1;
  }
}

.template-strip {
  margin: 0.4rem 0 0.7rem;
  padding: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.template-strip-scroll-hint {
  display: none;
  position: sticky;
  bottom: -0.72rem;
  margin: 0 -0.72rem -0.72rem;
  padding: 0.75rem 0.72rem 0.65rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--panel) 55%);
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
}

.template-strip[data-scroll-hint="1"] .template-strip-scroll-hint {
  display: block;
}
.template-strip::-webkit-scrollbar {
  width: 8px;
}
.template-strip::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-radius: var(--radius-surface);
}
.template-strip::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-surface);
}

.template-strip > div {
  min-width: 0;
}

.template-strip-intro {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 56ch;
}

.template-category-label {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.6rem 0 0.2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
}

.template-category-label:first-of-type {
  margin-top: 0.2rem;
}

.template-buttons {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(56px, auto);
  gap: 0.5rem;
  min-width: 0;
}

.template-buttons .template-category-label {
  margin-top: 0.75rem;
}

@media (min-width: 680px) {
  .template-buttons {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

.template-setup-guide-callout {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin: 0.15rem 0 0.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--fam-teal) 9%, var(--card-solid));
}

.template-setup-guide-btn {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--cta-bg);
  background: var(--cta-bg);
  color: var(--cta-text);
  cursor: pointer;
  white-space: nowrap;
}

.template-setup-guide-btn:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
}

.template-setup-guide-hint {
  flex: 1 1 220px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.template-item {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: var(--radius-surface);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  position: relative;
}

.template-item:hover {
  border-color: var(--border-strong);
  background: rgba(var(--accent-rgb), 0.06);
}

.template-item.intent-recommended {
  border-color: color-mix(in srgb, var(--fam-teal) 62%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 12%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--fam-teal) 26%, transparent);
}

.intent-lane-recommended {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--fam-teal) 26%, transparent);
  border-color: color-mix(in srgb, var(--fam-teal) 62%, var(--border)) !important;
}

.template-item .template-badge,
.template-item .template-btn,
.template-item .template-one-liner,
.template-item .template-autopilot-hint {
  flex: 1 1 100%;
  min-width: 0;
}

.template-item .template-autopilot-hint {
  margin: 0 0 0.3rem 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
  border-left: 3px solid color-mix(in srgb, var(--fam-teal) 48%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 8%, transparent);
  border-radius: 0 var(--radius-surface) var(--radius-surface) 0;
}
.template-item .template-autopilot-hint strong {
  color: var(--text-soft);
}
.template-item .template-autopilot-hint a {
  font-weight: 600;
  color: var(--accent);
}

.template-item .template-one-liner {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.2rem 0 0.4rem 0;
  line-height: 1.3;
  flex-basis: 100%;
  width: 100%;
}

.template-item .template-btn {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  min-height: 2.75em;
  margin-top: 0;
  padding: 0.58rem 0.75rem;
  font-size: 0.85rem;
  white-space: normal;
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
  text-align: left;
  box-sizing: border-box;
  background: var(--cta-bg);
  color: var(--cta-text);
  border: 1px solid var(--cta-bg);
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
}

.template-item .template-btn:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
}

.template-actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 100%;
  min-width: 0;
  margin-top: 0.2rem;
}

.template-actions-row .template-use-agent {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.template-actions-row .template-info {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.template-actions-row .info-dot {
  border-color: var(--accent);
  color: var(--accent);
}

.template-info {
  margin-top: 0;
}

.template-use-agent {
  margin-top: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  border-radius: var(--radius-surface);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}

.template-use-agent:hover {
  background: var(--hover-surface);
  border-color: var(--accent);
  color: var(--accent);
}

.try-prompt-link {
  font-size: 0.85rem;
  margin-top: 0;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  flex: 1 1 100%;
  font-weight: 600;
}

.try-prompt-link:hover {
  text-decoration: underline;
}

.template-status {
  margin: 0 0 0.65rem;
  min-height: 1.1rem;
  color: #14532d;
  font-size: 0.86rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
}

.auth-actions button {
  margin-top: 0.55rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.84rem;
}

.constraints-group {
  margin: 0.2rem 0 0;
  padding: 0;
  border: none;
}

.constraints-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.constraint-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--card-muted);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.constraint-item:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--bg);
}

.constraint-item input[type="checkbox"] {
  margin-top: 0.1rem;
  accent-color: var(--accent);
}

.constraint-item span {
  display: block;
}

.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;
}

@media (max-width: 740px) {
  .template-strip {
    grid-template-columns: 1fr;
  }

  .template-btn {
    width: 100%;
  }

  .template-buttons {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .constraints-grid {
    grid-template-columns: 1fr;
    max-height: 220px;
  }

  .chat-actions {
    grid-template-columns: 1fr;
  }

  .voice-controls {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .agent-avatar-panel {
    grid-template-columns: 1fr;
  }

  .tier-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .offer-panel {
    border-radius: var(--radius-surface);
    padding-top: 1.4rem;
  }

  .offer-close {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.6rem;
    right: 0.7rem;
    top: 0.7rem;
  }
}

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

@media (max-width: 1160px) {
  .template-buttons {
    grid-template-columns: 1fr;
  }
}

.channel-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
}

.info-dot {
  width: 1.55rem;
  height: 1.55rem;
  min-width: 1.55rem;
  padding: 0;
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 700;
  line-height: 1;
  position: relative;
  overflow: visible;
  -webkit-appearance: none;
  appearance: none;
  z-index: 6;
}

.info-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  margin-left: 8px;
  top: 50%;
  width: 260px;
  max-width: min(85vw, 320px);
  text-align: left;
  white-space: normal;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--cta-bg);
  color: var(--cta-text);
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.98);
  transform-origin: 0 50%;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 20;
  will-change: opacity, transform;
  pointer-events: none;
}

.info-dot:hover::after,
.info-dot:focus-visible::after,
.info-dot.tooltip-open::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

/* Template card info tooltip: show to the right so it stays on screen (avoids left truncation) */
.template-actions-row .info-dot::after {
  left: 100%;
  right: auto;
  margin-left: 8px;
  margin-right: 0;
  transform: translateY(-50%) scale(0.98);
  transform-origin: 0 50%;
}
.template-actions-row .info-dot:hover::after,
.template-actions-row .info-dot:focus-visible::after,
.template-actions-row .info-dot.tooltip-open::after {
  transform: translateY(-50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .info-dot::after {
    transition: none;
  }
}

@media (max-width: 820px) {
  .info-dot::after {
    left: 50%;
    margin-left: 0;
    top: auto;
    bottom: calc(100% + 8px);
    width: min(88vw, 320px);
    max-width: min(88vw, 320px);
    transform: translateX(-50%) translateY(4px) scale(0.98);
    transform-origin: 50% 100%;
  }

  .info-dot:hover::after,
  .info-dot:focus-visible::after,
  .info-dot.tooltip-open::after {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

button {
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent-2), var(--accent-3));
  color: var(--cta-text);
  border: none;
  font-weight: 700;
  margin-top: 1rem;
  box-shadow:
    0 10px 28px rgba(var(--accent-rgb), 0.22),
    0 4px 14px rgba(var(--fam-teal-rgb), 0.14);
}

button:hover:not(:disabled),
button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  filter: saturate(1.03);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Placed after global `button` rules: those use margin-top, width:100%, padding, font — this keeps nav logout aligned with Log in / Sign up */
.top-nav-auth button.top-nav-logout {
  margin: 0;
  padding: 0 0.55rem;
  padding-block: 0;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  align-self: center;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  /* Optical align with .top-nav-link text (UA button font/padding sits low) */
  transform: translateY(-3px);
  filter: none;
  -webkit-appearance: none;
  appearance: none;
}
.top-nav-auth button.top-nav-logout:hover,
.top-nav-auth button.top-nav-logout:focus-visible:not(:disabled) {
  transform: translateY(-3px);
  filter: none;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.actions button {
  margin-top: 0;
  min-width: 0;
}

#save-agent {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#save-agent:not(:disabled) {
  background: var(--cta-bg);
  color: var(--cta-text);
  border-color: var(--cta-bg);
}

#save-agent:not(:disabled):hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
}

#save-agent:disabled {
  background: var(--card);
  color: var(--muted);
  cursor: not-allowed;
  border-color: var(--border);
}

#describe-apply-btn {
  color: var(--cta-text);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.agent-soul-bundles {
  margin: 0.35rem 0 0.55rem;
}

.agent-soul-bundles-label {
  margin: 0 0 0.25rem;
}

.agent-soul-bundles-hint {
  font-weight: 500;
  color: var(--muted);
}

.agent-soul-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}

.agent-soul-chip {
  margin-top: 0;
  width: auto;
  flex: 0 1 auto;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-surface);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.agent-soul-chip:hover:not(:disabled),
.agent-soul-chip:focus-visible:not(:disabled) {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
  transform: none;
  filter: none;
}

.agent-soul-chip.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.agent-soul-actions {
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.agent-soul-actions button.secondary {
  margin-top: 0;
  width: auto;
  flex: 0 1 auto;
}

.agent-avatar-panel {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, min(280px, 46vw)) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.agent-avatar-stage {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.7rem;
  background: var(--panel);
}

.agent-avatar-heading {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.agent-avatar-disclaimer {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.agent-avatar-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: stretch;
  overflow: hidden;
}

.avatar-generate-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: inherit;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(4px);
  text-align: center;
}

.avatar-generate-overlay[hidden] {
  display: none;
}

.agent-avatar-panel.is-avatar-generating .agent-avatar-preview {
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 2px;
}

.avatar-generate-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: avatar-generate-spin 0.75s linear infinite;
}

.avatar-generate-overlay-text {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  max-width: 14ch;
}

#avatar-generate-status.is-working {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
  font-weight: 600;
}

#avatar-generate-status.is-working::before {
  content: "";
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.12rem;
  border: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: avatar-generate-spin 0.75s linear infinite;
}

.agent-avatar-panel.is-avatar-generating .avatar-generate-panel > :not(.agent-avatar-actions):not(#avatar-generate-status) {
  opacity: 0.55;
  pointer-events: none;
}

@keyframes avatar-generate-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-generate-spinner,
  #avatar-generate-status.is-working::before {
    animation: none;
    border-top-color: var(--accent);
  }
}

.agent-avatar-face {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  border-radius: inherit;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  border: none;
  background: var(--accent);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.agent-avatar-face.agent-avatar-face--image {
  border: none;
  box-shadow: none;
  border-radius: inherit;
  padding: 0;
  background: transparent;
}

.agent-avatar-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-avatar-name {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
}

.agent-avatar-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.agent-avatar-controls label {
  margin-top: 0.3rem;
}

.avatar-generate-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
}

.avatar-generate-panel > label {
  margin-top: 0;
}

.agent-avatar-controls select {
  min-width: 12rem;
  max-width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.mcp-server-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mcp-server-row select {
  flex: 1 1 auto;
  min-width: 14rem;
}

.mcp-tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.mcp-tool-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  cursor: pointer;
}

.mcp-tool-chip.is-selected {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.mcp-tool-chip code {
  font-size: 0.86rem;
}

#avatar-custom-prompt {
  min-height: 4.25rem;
  resize: vertical;
}

.agent-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.avatar-reference-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.avatar-reference-row button {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: min(100%, 9.5rem);
}

.avatar-crop-tools {
  margin-top: 0.45rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem 0.75rem;
}

#avatar-crop-preview {
  flex: 0 0 auto;
  width: 168px;
  height: 168px;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--input-bg);
  display: block;
}

.avatar-crop-controls {
  flex: 1 1 12rem;
  min-width: min(100%, 11rem);
  max-width: 22rem;
  display: grid;
  grid-template-columns: max-content minmax(5.5rem, 1fr);
  gap: 0.22rem 0.5rem;
  align-content: start;
  align-self: start;
}

.avatar-crop-controls label {
  font-size: 0.78rem;
  color: var(--muted);
  align-self: center;
  margin: 0;
}

.avatar-crop-controls input[type="range"] {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.avatar-crop-controls button {
  margin-top: 0.15rem;
}

@media (max-width: 780px) {
  .avatar-crop-tools {
    flex-direction: column;
    align-items: stretch;
  }
  #avatar-crop-preview {
    width: min(100%, 200px);
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .avatar-crop-controls {
    max-width: none;
    min-width: 0;
  }
}

.agent-avatar-actions button {
  margin-top: 0;
}

.avatar-source-tabs {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.avatar-tab {
  flex: 1 1 0;
  margin-top: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.avatar-tab.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.avatar-library-panel {
  margin-top: 0.55rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
}

.avatar-library-controls {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.avatar-library-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  max-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.avatar-library-btn {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: var(--radius-surface);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.avatar-library-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-library-btn.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.avatar-generate-panel[hidden] {
  display: none;
}

@media (max-width: 780px) {
  .avatar-library-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.avatar-candidate-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.avatar-candidate-btn {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-surface);
  overflow: hidden;
  min-height: 96px;
}

.avatar-candidate-btn img {
  width: 100%;
  height: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.avatar-candidate-btn.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}

.saved-agents {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.saved-agents h3 {
  margin: 0;
}

.saved-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#saved-agents-list.saved-list::-webkit-scrollbar,
#control-center-list.saved-list::-webkit-scrollbar {
  width: 8px;
}
#saved-agents-list.saved-list::-webkit-scrollbar-track,
#control-center-list.saved-list::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-radius: var(--radius-surface);
}
#saved-agents-list.saved-list::-webkit-scrollbar-thumb,
#control-center-list.saved-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-surface);
}

.saved-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.6rem;
  background: var(--panel);
}

.saved-item.saved-item-active {
  border-color: var(--accent);
  background: var(--bg-soft);
  box-shadow: none;
}

.saved-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.saved-item-badge {
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-surface);
  border: 1px solid;
}

.saved-item-badge.badge-draft {
  background: rgba(159, 168, 178, 0.28);
  color: var(--muted-deep);
  border-color: var(--border-strong);
}

.saved-item-badge.badge-live {
  background: rgba(22, 163, 74, 0.14);
  color: #14532d;
  border-color: rgba(22, 163, 74, 0.45);
}

.saved-item-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.28rem;
}

.saved-item-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
.saved-item-cap-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.35rem;
  border-radius: var(--radius-surface);
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.22);
}

.saved-item-actions {
  display: flex;
  gap: 0.4rem;
}

.saved-item-actions button {
  margin-top: 0;
  width: auto;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.22);
  color: #000;
  background: #fff;
  box-shadow: none;
  filter: none;
}
.saved-item-actions button:hover {
  border-color: rgba(0, 0, 0, 0.35);
  color: #000;
  background: #f0f2f4;
  filter: none;
  transform: none;
}
.saved-item-actions button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.saved-item-actions button:disabled {
  color: rgba(0, 0, 0, 0.4);
  border-color: var(--border);
  background: var(--card-muted);
  font-weight: 500;
  opacity: 1;
}

.test-agent {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.test-agent h3 {
  margin: 0;
}

/* Primary “Message” field — visual anchor in Test Your Agent */
.test-agent label[for="test-input"] {
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

#test-input {
  min-height: 5.75rem;
  padding: 0.85rem 0.95rem;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--input-bg));
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.12),
    0 8px 28px rgba(15, 20, 25, 0.07);
}

#test-input::placeholder {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
}

#test-input:hover {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
  background: color-mix(in srgb, var(--accent) 9%, var(--input-bg));
}

#test-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--ring),
    0 10px 34px rgba(var(--accent-rgb), 0.12);
}

.test-status {
  margin-top: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--muted);
  background: var(--input-bg);
}

.test-status[data-variant="success"] {
  border-color: #15803d;
  color: #14532d;
  background: #ecfdf5;
}

.test-status.test-status-flash[data-variant="success"] {
  animation: testStatusFlash 900ms ease-out;
}

@keyframes testStatusFlash {
  0% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.0);
  }
  20% {
    transform: translateY(0);
    box-shadow: 0 0 0 6px rgba(21, 128, 61, 0.12);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.0);
  }
}

.test-status[data-variant="warning"] {
  border-color: color-mix(in srgb, var(--fam-orange) 65%, #ca8a04);
  color: #713f12;
  background: color-mix(in srgb, var(--fam-orange) 16%, white);
}

.test-status[data-variant="error"] {
  border-color: #be123c;
  color: #881337;
  background: color-mix(in srgb, var(--fam-pink) 12%, white);
}

.test-status[data-variant="working"] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.voice-controls {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.6rem;
}

.voice-preview-action {
  grid-column: 1 / -1;
  margin-top: 0.1rem;
}

.auto-speak-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  color: var(--text);
  font-size: 0.9rem;
}

.voice-controls + .field-hint,
.auto-speak-row + .field-hint {
  margin-top: 0.25rem;
}

.auto-speak-row input[type="checkbox"] {
  accent-color: var(--accent);
}

.chat-log {
  margin-top: 0.6rem;
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  gap: 0.45rem;
  padding-right: 0.1rem;
}

.topic-threads-panel {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.35rem;
}

.topic-threads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.topic-threads-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topic-threads-header-actions button.secondary {
  padding: 0.34rem 0.55rem;
  font-size: 0.84rem;
}

.topic-threads-header-actions .topic-thread-delete-btn:not(:disabled) {
  border-color: color-mix(in srgb, #b91c1c 42%, var(--border-strong));
  color: var(--text-soft);
}

.topic-threads-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.32rem;
  max-height: min(9.75rem, 30vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.2rem 0.35rem 0.2rem 0;
  margin: 0 -0.15rem 0 0;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border-subtle);
  background: var(--bg-soft);
  scrollbar-gutter: stable;
}

@media (min-width: 760px) {
  .topic-threads-header-actions {
    flex-wrap: nowrap;
  }
}

.topic-thread-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  height: auto;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-thread-tab:hover {
  border-color: var(--border-strong);
  background: var(--card-muted);
}

.topic-thread-tab[data-active="true"] {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.16);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
}

.topic-threads-hint {
  margin: 0;
}

.thread-memory-panel {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.thread-memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.founder-outcome-pack-details {
  margin: 0.75rem 0 0.25rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
}

.chat-bubble {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
}

.chat-bubble.user {
  background: var(--panel);
}

.chat-bubble.assistant {
  background: var(--card-muted);
}

.chat-bubble-thinking {
  min-height: calc(0.88rem * 1.4 + 1.1rem);
  display: flex;
  align-items: center;
}

.chat-vision-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0.35rem 0 0.5rem;
}

.chat-vision-attach-btn {
  font-size: 0.88rem;
}

.chat-vision-quota-hint {
  margin: 0;
  flex: 1 1 140px;
}

.chat-vision-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

.chat-vision-preview-item {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--input-bg);
}

.chat-vision-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-vision-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 1;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  cursor: pointer;
}

.chat-vision-preview-remove:hover {
  background: var(--panel);
}

.chat-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.chat-thinking-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 55%, var(--muted) 45%);
  animation: chat-thinking-bounce 0.95s ease-in-out infinite;
}

.chat-thinking-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.chat-thinking-dot:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes chat-thinking-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  35% {
    transform: translateY(-0.28rem);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-thinking-dot {
    animation: none;
    opacity: 0.65;
  }
}

.chat-pending-approvals-nudge {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--user-agent-accent);
  border-radius: var(--radius-surface);
  padding: 0.55rem 0.65rem;
  background: var(--panel);
  color: #000;
  display: grid;
  gap: 0.45rem;
}

.chat-pending-approvals-nudge__summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 600;
  color: #000;
}

.chat-pending-approvals-nudge__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.chat-pending-approvals-nudge__approve,
.chat-pending-approvals-nudge__jump {
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.25;
  border-radius: var(--radius-surface);
  cursor: pointer;
}

.chat-pending-approvals-nudge__approve {
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: #fff;
  color: #000;
  font-weight: 600;
  box-shadow: none;
}

.chat-pending-approvals-nudge__approve:hover:not(:disabled) {
  background: #f0f2f4;
  border-color: rgba(0, 0, 0, 0.3);
  color: #000;
  filter: none;
  transform: none;
}

.chat-pending-approvals-nudge__approve:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  color: rgba(0, 0, 0, 0.45);
}

.chat-pending-approvals-nudge__jump {
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: #fff;
  color: #000;
  font-weight: 600;
  box-shadow: none;
}

.chat-pending-approvals-nudge__jump:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: #f0f2f4;
  color: #000;
  filter: none;
  transform: none;
}

.calendar-bubble {
  display: grid;
  gap: 0.5rem;
}

.calendar-bubble-heading {
  font-weight: 600;
  color: var(--accent);
}

.calendar-events-list {
  display: grid;
  gap: 0.45rem;
}

.calendar-event-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  padding: 0.5rem 0.55rem;
  display: grid;
  gap: 0.18rem;
}

.calendar-event-title {
  color: var(--text);
}

.calendar-event-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.calendar-event-link {
  justify-self: start;
  font-size: 0.8rem;
  color: #8cc6ff;
  text-decoration: underline;
}

.calendar-event-link:hover,
.calendar-event-link:focus-visible {
  color: var(--accent-hover);
}

.chat-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}

.chat-actions button {
  margin-top: 0.55rem;
  padding: 0.55rem 0.6rem;
  font-size: 0.86rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  min-height: 4.25rem;
  line-height: 1.25;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: none;
  font-weight: 600;
}

.chat-actions button:hover:not(:disabled) {
  background: #f0f2f4;
  color: #000;
  filter: none;
  transform: none;
}

#remember-this-btn {
  min-width: 9.5em;
}

.invite-panel {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.75rem;
  background: var(--card-muted);
}

.invite-panel h4 {
  margin: 0;
  font-size: 0.95rem;
}

.integration-panel {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.75rem;
  background: var(--card-muted);
}

.integration-panel h4 {
  margin: 0;
  font-size: 0.95rem;
}

.agent-activation {
  margin-top: 0.9rem;
}

.agent-activation h5 {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.trust-path-rail {
  margin: 0.65rem 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-surface, 8px);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-solid) 88%, transparent);
}
.trust-path-rail-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}
.trust-path-rail-title {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.trust-path-rail-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}
.trust-path-rail-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.trust-path-rail-steps li:not(:last-child)::after {
  content: "→";
  opacity: 0.35;
  font-size: 0.75rem;
}
.trust-path-rail-steps a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.test-run-receipt {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.1em;
}

.readiness-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.readiness-badges .badge {
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
}

.activation-long-run-posture {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.activation-long-run-posture .badge {
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
}

.badge-draft {
  background: rgba(159, 168, 178, 0.2);
  color: var(--muted);
}

.badge-live {
  background: rgba(var(--fam-lime-rgb), 0.22);
  color: color-mix(in srgb, var(--fam-lime) 55%, #14532d);
  border-color: rgba(var(--fam-lime-rgb), 0.45);
}

.badge-done {
  background: rgba(var(--fam-sky-rgb), 0.2);
  color: color-mix(in srgb, var(--fam-sky) 50%, #0c4a6e);
  border-color: rgba(var(--fam-sky-rgb), 0.4);
}

.activation-checklist {
  margin: 0.5rem 0;
}

.first-publish-coach {
  margin: 0.5rem 0 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--fam-teal) 8%, var(--surface));
}

.launch-everywhere-panel {
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--fam-sky) 32%, var(--border));
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--fam-sky) 10%, var(--surface));
}

.launch-everywhere-panel h5 {
  margin: 0 0 0.3rem;
}

.launch-everywhere-results {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.launch-everywhere-field label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.launch-everywhere-field--wide {
  grid-column: 1 / -1;
}

.launch-everywhere-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: start;
}

.launch-everywhere-row input,
.launch-everywhere-row textarea {
  width: 100%;
}

.launch-everywhere-row textarea {
  min-height: 78px;
}

.launch-everywhere-row-textarea {
  align-items: stretch;
}

.launch-everywhere-row-textarea button {
  align-self: start;
}

@media (min-width: 860px) {
  .launch-everywhere-results {
    grid-template-columns: 1fr 1fr;
  }
}

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

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: var(--ui-checklist-item-py) 0;
  font-size: 0.88rem;
}

.checklist-item .check {
  color: var(--muted);
  font-weight: bold;
}

.checklist-item.done .check {
  color: #86efac;
}

.activation-cta {
  margin-top: 0.4rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}

.activation-pending-hint {
  margin-top: 0.35rem;
}

.activation-approval-note {
  padding: 0.4rem 0.6rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: var(--radius-surface);
  border-left: 3px solid rgba(245, 158, 11, 0.6);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.agent-settings-details {
  margin-top: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-surface);
  padding: 0.5rem 0.75rem;
  background: rgba(11, 19, 37, 0.72);
}
.agent-settings-details summary {
  cursor: pointer;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}
.agent-settings-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.agent-settings-inner label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}
.agent-settings-inner .field-hint {
  color: rgba(226, 232, 240, 0.9);
  margin-top: 0.35rem;
}
.agent-settings-inner .field-hint strong {
  color: rgba(255, 255, 255, 0.95);
}
.agent-settings-inner .field-hint a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.agent-settings-inner .field-hint a:hover {
  color: #bae6fd;
}
.agent-settings-inner .field-hint code {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  padding: 0.08em 0.32em;
  border-radius: 3px;
  font-size: 0.86em;
}
.agent-settings-inner .form-group-heading {
  color: #fbcfe8;
}
.agent-settings-inner .guardrail-checkbox,
.agent-settings-inner .plan-mode-checkbox {
  color: rgba(255, 255, 255, 0.92);
}
.agent-settings-inner #agent-temperature-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}
.agent-settings-inner select,
.agent-settings-inner input[type="text"],
.agent-settings-inner input[type="url"] {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  max-width: 20rem;
}
.embed-color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.embed-color-row input[type="color"] {
  width: 2.5rem;
  height: 2rem;
  padding: 2px;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-soft);
}
.embed-color-row input[type="text"] {
  flex: 1;
  min-width: 0;
  max-width: 8rem;
}
.agent-duplicate-btn,
.agent-settings-save-btn {
  align-self: flex-start;
  padding: 0.4rem 0.75rem;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
}
.agent-duplicate-btn:hover,
.agent-settings-save-btn:hover {
  background: rgba(79, 123, 255, 0.15);
}

.quick-actions {
  margin-top: 0.75rem;
}

.quick-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.quick-actions-buttons button {
  padding: 0.35rem 0.6rem;
  font-size: 0.84rem;
}

.quick-actions-buttons .quick-action-schedule {
  background: #ff5a1f;
}

.quick-actions-buttons .quick-action-content {
  background: #e044b5;
}

.quick-actions-buttons .quick-action-webhook {
  background: #4577e8;
}

.quick-actions-buttons .quick-action-slack {
  background: #7f5ab8;
}

.quick-actions-buttons .quick-action-zoom {
  background: #4577e8;
}

.quick-actions-buttons .quick-action-whatsapp {
  background: #1bc6b3;
}

.quick-actions-buttons .quick-action-substack {
  background: #ff5a1f;
}

.quick-actions-buttons .quick-action-zapier {
  background: #e044b5;
}

.quick-actions-slack-callout {
  margin: 0.45rem 0 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--fam-teal) 35%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 10%, var(--card-muted));
  border-radius: var(--radius-surface);
}

.quick-actions-quiet-hours {
  margin: 0.35rem 0 0.2rem;
}

#quick-action-result {
  margin-top: 0.45rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

#quick-action-result code {
  font-family: inherit;
  font-size: 0.92em;
  background: color-mix(in srgb, var(--fam-sky) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--fam-sky) 24%, var(--border));
  border-radius: 0.25rem;
  padding: 0.05rem 0.22rem;
  word-break: break-word;
}
.quick-actions-quiet-hours-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.quick-actions-quiet-hours-row label {
  font-size: 0.85rem;
  color: var(--muted);
}
.quick-actions-quiet-hours-row input[type="time"] {
  height: 34px;
  padding: 0 0.55rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}

.share-invite {
  margin-top: 0.75rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.share-actions button {
  padding: 0.35rem 0.6rem;
  font-size: 0.84rem;
}

.invite-by-email {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.invite-by-email input {
  min-width: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.invite-by-email .invite-label {
  margin: 0;
}

.invite-by-email .agent-invite-role-matrix {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

.email-in-setup {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.email-in-setup h5 {
  margin: 0 0 0.35rem;
}

.email-in-setup .field-hint {
  margin-bottom: 0.5rem;
}

.email-in-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.email-in-actions button {
  padding: 0.35rem 0.6rem;
  font-size: 0.84rem;
}

.email-in-details {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.email-in-details summary {
  cursor: pointer;
  color: var(--text-muted, rgba(255, 255, 255, 0.7));
}

.email-in-steps {
  margin: 0.4rem 0 0 1rem;
  padding-left: 1rem;
}

.email-in-steps li {
  margin-bottom: 0.25rem;
}

.email-in-steps code {
  font-size: 0.8em;
  background: var(--panel);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-surface);
}

.agent-dashboard {
  margin-top: 0.9rem;
}

.agent-dashboard h4 {
  margin-bottom: 0.25rem;
}

.agent-dashboard h5 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.dashboard-actions {
  margin: 0.5rem 0 0.75rem;
}

.dashboard-actions button {
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.6rem 0.75rem;
  background: var(--panel);
}

.dashboard-panel h5 {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.trust-center-panel {
  border-left: 3px solid var(--accent);
}

.outcome-os-panel {
  border-left: 3px solid #1d4ed8;
}

.outcome-os-panel h6 {
  margin: 0.55rem 0 0.25rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.outcome-os-approve-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.outcome-os-approve-item button {
  margin-top: 0;
  flex-shrink: 0;
}

#outcome-os-bulk-status {
  margin: 0.35rem 0 0;
  min-height: 1.1rem;
}

#trust-center-score-btn {
  margin-top: 0;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  min-width: 0;
}

.trust-center-item.trust-center-severity-high {
  border-left: 3px solid #b91c1c;
  padding-left: 0.4rem;
}

.trust-center-item.trust-center-severity-medium {
  border-left: 3px solid #b45309;
  padding-left: 0.4rem;
}

.trust-center-item.trust-center-severity-low {
  border-left: 3px solid #15803d;
  padding-left: 0.4rem;
}

#trust-center-score[data-level="strong"] {
  color: #166534;
}

#trust-center-score[data-level="watch"] {
  color: #92400e;
}

#trust-center-score[data-level="risk"] {
  color: #991b1b;
}

.trust-breakdown-modal {
  z-index: 10003;
}

.trust-breakdown-panel {
  max-width: 700px;
}

.trust-breakdown-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.trust-breakdown-action-item button {
  margin-top: 0;
  flex-shrink: 0;
  padding: 0.25rem 0.55rem;
}

.run-history-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.run-history-actions button.secondary {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
}

.run-history-actions button.secondary:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
}

.dashboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.dashboard-list li {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0;
  font-size: 0.84rem;
}

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

.media-library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.media-library-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.media-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  object-fit: cover;
  flex-shrink: 0;
}

.media-meta {
  min-width: 0;
}

.media-meta .field-hint {
  margin: 0.2rem 0 0;
}

.media-library-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.run-history-item {
  display: grid;
  gap: 0.25rem;
}

.run-history-section-label {
  padding: 0.4rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.run-history-thread {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.4rem 0.55rem;
  background: rgba(10, 20, 36, 0.76);
}
.run-history-thread-details summary {
  cursor: pointer;
  color: var(--text);
}
.run-history-thread-meta {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}
.run-history-thread-list {
  list-style: none;
  padding: 0.5rem 0 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.run-history-thread-quick-actions {
  margin-top: 0.45rem;
  display: flex;
  justify-content: flex-end;
}

.run-history-thread-quick-actions button.secondary {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
}

.run-history-thread-quick-actions button.secondary:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
}

.run-history-email-edit {
  margin-top: 0.55rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.run-history-email-edit label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.run-history-email-edit-body {
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  padding: 0.45rem;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem;
}

.run-history-email-edit-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.45rem;
}

.run-history-email-edit-actions button:not(.secondary) {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
}

.run-history-email-edit-actions button:not(.secondary):hover {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: var(--accent);
}

.run-history-email-edit-actions button.secondary {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
}

.run-history-email-edit-actions button.secondary:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
}

.run-history-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.run-history-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.run-history-feedback {
  display: inline-flex;
  gap: 0.2rem;
}

.run-history-feedback button {
  padding: 0.2rem 0.35rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.run-history-feedback button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.run-history-feedback button[data-rated="positive"] {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.4);
}

.run-history-feedback button[data-rated="negative"] {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.4);
}

.run-history-snippet {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.run-history-actions {
  margin-top: 0.35rem;
}
.run-history-copy-summary {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.run-history-copy-summary:hover {
  color: var(--text);
  border-color: var(--muted);
}

.run-history-followups {
  margin-top: 0.35rem;
}
.run-history-followups-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.35rem;
}
.run-history-followup-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  justify-content: space-between;
}
.run-history-followup-text {
  color: var(--text);
  font-size: 0.86rem;
  opacity: 0.9;
  flex: 1;
}

.outreach-panel .outreach-form {
  margin-top: 0.35rem;
}

.outreach-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.outreach-toolbar select {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-surface);
  font-size: 0.85rem;
}
.outreach-item {
  display: grid;
  gap: 0.35rem;
}
.outreach-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.outreach-meta {
  color: var(--muted);
  font-size: 0.82rem;
}
.outreach-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.run-history-email-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.run-history-email-meta .pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.run-history-email-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-history-copy-reply {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.run-history-copy-reply:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.run-history-approve-send {
  margin-left: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
}

.run-history-approve-send:hover:not(:disabled) {
  filter: brightness(1.1);
}

.run-history-approve-send:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dashboard-note-form {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.dashboard-note-form input {
  flex: 1;
  min-width: 120px;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.dashboard-note-form select {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.onboarding-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.onboarding-banner strong {
  color: var(--accent);
}

.template-leaderboard {
  margin: 0.6rem 0 0.8rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--surface);
}

.intent-quickstart {
  margin: 0.6rem 0 0.8rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--surface);
}

#intent-quickstart-input {
  min-width: 320px;
  flex: 1;
}

.template-leaderboard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.template-leaderboard-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.template-leaderboard-item {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}

.template-leaderboard-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.template-leaderboard-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.template-leaderboard-rank {
  font-weight: 700;
  color: var(--accent);
}

.analytics-health {
  margin-bottom: 0.75rem;
}

.analytics-health h5 {
  margin-bottom: 0.25rem;
}

.usage-cost-panel {
  margin-bottom: 0.75rem;
}

.usage-cost-panel h5 {
  margin-bottom: 0.25rem;
}

.usage-cost-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.win-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.win-scorecard-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  padding: 0.55rem 0.65rem;
}

.win-scorecard-label {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.win-scorecard-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.win-scorecard-value.status-good {
  color: #2e7d32;
}

.win-scorecard-value.status-warn {
  color: #b26a00;
}

.win-scorecard-value.status-risk {
  color: #b00020;
}

.founder-outcome-feed-panel .dashboard-list {
  margin-top: 0.45rem;
}

.instant-roi-banner {
  margin-bottom: 0.75rem;
  border-color: color-mix(in srgb, var(--fam-lime) 40%, var(--border));
  background: color-mix(in srgb, var(--fam-lime) 10%, var(--panel));
}

.retention-nudge-banner {
  margin-bottom: 0.75rem;
  border-color: color-mix(in srgb, var(--fam-sky) 42%, var(--border));
  background: color-mix(in srgb, var(--fam-sky) 10%, var(--panel));
}

.autopilot-streak-banner {
  margin-bottom: 0.75rem;
  border-color: color-mix(in srgb, #f59e0b 42%, var(--border));
  background: color-mix(in srgb, #f59e0b 10%, var(--panel));
}

.weekly-founder-wins-card {
  margin-bottom: 0.75rem;
  border-color: color-mix(in srgb, var(--fam-teal) 42%, var(--border));
  background: color-mix(in srgb, var(--fam-teal) 10%, var(--panel));
}

.usage-cost-row {
  display: contents;
}

.usage-cost-row > * {
  padding: 0.2rem 0;
}

.usage-cost-row.usage-cost-header > * {
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.usage-cost-label {
  color: var(--text);
}

.pending-actions-panel {
  margin-bottom: 0.75rem;
}

.pending-actions-panel button {
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: none;
  margin-top: 0;
  font-weight: 600;
}

.pending-actions-panel button:hover:not(:disabled) {
  background: #f0f2f4;
  color: #000;
  filter: none;
  transform: none;
}

.pending-actions-panel button:disabled {
  color: #333;
  opacity: 1;
  background: #e4e6ea;
  border-color: rgba(0, 0, 0, 0.18);
}

.pending-actions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pending-actions-quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.4rem;
}

.pending-actions-panel.has-pending {
  border-left: 3px solid var(--user-agent-accent);
  padding-left: calc(0.75rem - 3px);
}

.pending-actions-intro {
  margin: 0.2rem 0 0.5rem;
  font-size: 0.85rem;
}

.pending-actions-count {
  font-weight: 600;
  color: var(--user-agent-accent);
}

.pending-action-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.pending-action-item:last-child {
  border-bottom: none;
}

.pending-action-tool {
  font-weight: 600;
  font-size: 0.9rem;
}

.pending-action-summary {
  font-weight: 500;
  font-size: 0.86rem;
  color: var(--text);
}

.pending-action-args {
  font-size: 0.84rem;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  word-break: break-word;
  line-height: 1.4;
}

.pending-action-preview {
  margin-top: 0.15rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--card-muted) 86%, var(--fam-sky) 14%);
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.45;
}
.pending-action-preview strong {
  color: var(--text);
  font-weight: 600;
}
.pending-action-preview-body {
  margin-top: 0.25rem;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 5.8em;
  overflow: hidden;
}

.pending-actions-panel code,
.pending-action-item code {
  font-family: inherit;
  font-size: 0.92em;
  background: color-mix(in srgb, var(--card-muted) 78%, var(--fam-sky) 22%);
  color: color-mix(in srgb, var(--text) 94%, var(--muted));
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--fam-sky) 20%);
  border-radius: 0.22rem;
  padding: 0.02rem 0.24rem;
}

.pending-action-edit {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.pending-action-edit label {
  font-size: 0.78rem;
  color: var(--muted);
}
.pending-action-edit textarea,
.pending-action-edit input[type="text"] {
  width: 100%;
  margin: 0;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: rgba(10, 20, 36, 0.7);
  color: var(--text);
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
}
.pending-action-edit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pending-action-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.pending-action-buttons button {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: #fff;
  color: #000;
  font-weight: 600;
}

.pending-action-buttons button[data-pending-action="approve"] {
  background: #ecfdf3;
  border-color: rgba(47, 125, 74, 0.45);
  color: #000;
}

.pending-action-buttons button[data-pending-action="dismiss"] {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.22);
  color: #000;
}

.crm-contact-profiles-panel {
  margin-bottom: 0.75rem;
}
.crm-contact-profiles-controls {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.crm-contact-profiles-controls label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.crm-contact-profiles-controls select {
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  color: var(--text);
}
.crm-kpi-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.55rem;
}
.crm-refresh-scan-btn {
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
}
.meeting-candidates-routing-hint {
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 52rem;
}
.ops-diagnostics-fathom-hint code {
  font-size: 0.85em;
  padding: 0.05rem 0.25rem;
  background: var(--card-muted);
  border: 1px solid var(--border-subtle);
}
.crm-kpi-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}
.crm-kpi-pill.kpi-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(239, 68, 68, 0.2);
}
.crm-kpi-pill.kpi-warning {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.18);
}
.crm-profile-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.crm-profile-item:last-child {
  border-bottom: none;
}
.crm-profile-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.crm-profile-contact {
  font-weight: 600;
}
.crm-profile-state {
  font-size: 0.78rem;
  color: var(--muted);
}
.crm-profile-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.crm-profile-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.crm-profile-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}
.meeting-ops-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ops-console-toolbar {
  flex-wrap: wrap;
  align-items: center;
}
.ops-console-toolbar label.field-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.ops-console-list .run-history-item {
  padding: 0.55rem 0;
}
.ops-console-list .run-history-tool-trace {
  max-height: 220px;
  overflow: auto;
}
.first-ship-guided-path .first-ship-guided-list {
  margin: 0.5rem 0 0.35rem;
  padding-left: 1.15rem;
}
.first-ship-guided-path .first-ship-guided-list li {
  margin: 0.25rem 0;
}
.first-ship-guided-path .preflight-jump-btn {
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
}
.meeting-event-item,
.waiting-on-item,
.meeting-action-candidate-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.meeting-event-item:last-child,
.waiting-on-item:last-child,
.meeting-action-candidate-item:last-child {
  border-bottom: none;
}
.meeting-event-title,
.waiting-on-title {
  font-weight: 600;
}
.meeting-event-meta,
.waiting-on-meta,
.meeting-action-candidate-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.meeting-event-actions,
.waiting-on-actions,
.meeting-action-candidate-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}
button.meeting-candidate-approve {
  background: var(--cta-bg);
  color: var(--cta-text);
  border-color: var(--cta-bg);
  font-weight: 600;
}
button.meeting-candidate-approve:hover {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  color: var(--cta-text);
}
button.meeting-candidate-reject.secondary {
  border-style: dashed;
}
.meeting-candidate-status-pill {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.meeting-candidate-meeting-ref {
  font-size: 0.78rem;
  color: var(--muted);
}

.your-data-details {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.5rem 1rem;
}

.your-data-details summary {
  cursor: pointer;
  font-weight: 600;
}

.your-data-inner {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}

#facts-editor textarea {
  width: 100%;
  max-width: 400px;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.audit-log-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.audit-log-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.audit-log-action {
  font-weight: 500;
}

.audit-log-resource,
.audit-log-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.wizard-steps {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.wizard-steps li {
  margin-bottom: 0.35rem;
}

.version-history-panel,
.api-keys-panel {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
}

.version-save-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.version-save-row input {
  flex: 1;
  min-width: 10rem;
}

.version-history-item,
.api-key-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.version-history-item:last-child,
.api-key-item:last-child {
  border-bottom: none;
}

.version-compare-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.version-compare-row select { min-width: 10rem; }

.version-compare-result {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--card-solid);
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
}

.version-compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.version-compare-col h6 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.version-compare-col pre { white-space: pre-wrap; word-break: break-word; font-size: 0.85rem; max-height: 200px; overflow-y: auto; }
.version-compare-col p { margin: 0.35rem 0; }

@media (max-width: 640px) {
  .version-compare-cols { grid-template-columns: 1fr; }
}

.version-history-date,
.api-key-prefix {
  color: var(--muted);
  font-size: 0.85rem;
}

.describe-one-sentence-row {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--surface, #f8f9fa);
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
}

.describe-one-sentence-inner {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.describe-one-sentence-inner input {
  flex: 1;
  min-width: 12rem;
}

.support-quick-replies-panel {
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  background: var(--panel-subtle-bg, rgba(0, 0, 0, 0.03));
}
.support-quick-replies-panel strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.support-quick-replies-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
button.support-snippet-btn {
  font-size: 0.82rem;
  padding: 0.3rem 0.55rem;
}

.knowledge-url-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.knowledge-url-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.knowledge-url-controls input[type="url"] {
  flex: 1 1 200px;
  min-width: 160px;
}
.knowledge-twitter-opts {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
.knowledge-twitter-opts label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}
.knowledge-twitter-opt-note {
  font-size: 0.8rem;
  opacity: 0.85;
  margin: -0.1rem 0 0.15rem 1.5rem;
}
.advisory-council-panel .council-run-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.advisory-council-panel .council-run-form label {
  font-size: 0.85rem;
  font-weight: 600;
}
.council-digests-heading {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.95rem;
}
.council-digest-detail {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-surface);
  background: var(--panel-subtle-bg, rgba(0, 0, 0, 0.04));
}
.council-digest-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
  max-height: 420px;
  overflow: auto;
  margin: 0.5rem 0 0.75rem;
}
.knowledge-chunk-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-surface);
  background: rgba(80, 120, 200, 0.2);
  color: inherit;
  vertical-align: middle;
}
button.council-digest-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
  border-radius: var(--radius-surface);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
button.council-digest-open:hover {
  background: var(--panel-subtle-bg, rgba(0, 0, 0, 0.04));
}
.council-digest-meta {
  font-size: 0.8rem;
  opacity: 0.75;
}
.knowledge-base-panel {
  margin-bottom: 1rem;
}

.skill-hub-panel {
  margin-bottom: 1rem;
}
.skill-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}
.skill-hub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.65rem 0.75rem;
  background: var(--panel-bg, #fff);
}
.skill-hub-card h6 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.skill-hub-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.knowledge-add-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.knowledge-add-row textarea {
  min-height: 4rem;
  resize: vertical;
}

.knowledge-import-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.knowledge-import-row .field-hint { margin: 0; }

.knowledge-chunk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.knowledge-chunk-item button {
  flex-shrink: 0;
}

.knowledge-chunk-preview {
  flex: 1;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.stream-toggle-label input {
  flex-shrink: 0;
}

.structured-context-label {
  margin-top: 0.5rem;
  display: block;
}

.structured-context-input {
  width: 100%;
  resize: vertical;
  min-height: 3rem;
}

.structured-data-help {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--card-solid, rgba(255, 255, 255, 0.02));
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}
.structured-data-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-soft);
  list-style-position: outside;
}
.structured-data-help-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}
.structured-data-help-list li {
  margin: 0.35rem 0;
}
.structured-data-help-tip {
  margin-top: 0.5rem !important;
}

.guardrail-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.guardrail-checkbox input {
  flex-shrink: 0;
}

.plan-mode-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.plan-mode-checkbox input {
  flex-shrink: 0;
}

.sub-agents-orchestration {
  margin-top: 0.75rem;
}

.sub-agents-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.sub-agent-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
}

.sub-agent-row .sub-agent-select {
  min-width: 0;
}

.sub-agent-row .sub-agent-role {
  min-width: 0;
}

.sub-agent-row .sub-agent-desc {
  min-width: 0;
}

@media (max-width: 640px) {
  .sub-agent-row {
    grid-template-columns: 1fr 1fr;
  }
  .sub-agent-row .sub-agent-remove {
    grid-column: span 2;
  }
}

.run-tests-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.run-tests-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.run-tests-baseline-label {
  white-space: nowrap;
}
.run-tests-live-eval-label {
  white-space: normal;
  max-width: 22rem;
}

.run-tests-results {
  margin-top: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}
.run-tests-results-header {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-soft);
}

.run-tests-baseline-diff {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-surface, 8px);
  border: 1px solid var(--border);
  background: var(--card-solid, rgba(255, 255, 255, 0.03));
  font-size: 0.8rem;
}
.run-tests-regressions {
  margin-bottom: 0.5rem;
}
.run-tests-regressions strong {
  color: var(--error, #ef4444);
}
.run-tests-improvements strong {
  color: var(--success, #22c55e);
}
.run-tests-baseline-list {
  list-style: disc;
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
  color: var(--text-soft);
}
.run-tests-baseline-list li {
  margin: 0.2rem 0;
  word-break: break-word;
}
.run-tests-baseline-idx {
  font-weight: 600;
  color: var(--muted);
}
.run-tests-baseline-same {
  margin: 0.35rem 0 0;
}

.run-tests-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.run-tests-result-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: start;
  font-size: 0.8rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.run-tests-result-item:last-child { border-bottom: none; }
.run-tests-eval-path {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  min-width: 2.25rem;
}
.run-tests-result-badge {
  font-weight: 700;
  min-width: 1.2rem;
}
.run-tests-result-item.pass .run-tests-result-badge { color: var(--success, #22c55e); }
.run-tests-result-item.fail .run-tests-result-badge { color: var(--error, #ef4444); }
.run-tests-result-input {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.run-tests-result-meta {
  color: var(--muted);
  font-size: 0.75rem;
}
.run-tests-result-out {
  grid-column: 1 / -1;
  padding-left: 3rem;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 3rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.test-case-suite-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-surface);
  background: var(--card-solid);
  color: var(--muted);
  margin-left: 0.35rem;
}

.share-link-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin: 0.5rem 0;
}

.share-link-options label { margin-right: 0.25rem; }
.share-link-options select { min-width: 6rem; }
.share-link-options input[type="password"] { min-width: 10rem; }

.run-from-automation-heading {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.run-from-automation-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.35rem 0;
}

.run-from-automation-details {
  margin-top: 0.5rem;
}

.run-from-automation-details pre.small {
  font-size: 0.8rem;
  max-height: 12rem;
  overflow: auto;
}

.public-directory-details {
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.5rem 1rem;
}

.public-directory-details summary {
  cursor: pointer;
  font-weight: 600;
}

.directory-agent-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.directory-agent-item:last-child {
  border-bottom: none;
}

.public-directory-row {
  margin-top: 0.75rem;
}

.public-directory-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

#entities-json-input {
  width: 100%;
  max-width: 400px;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.activation-capabilities {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0;
}

.activation-capabilities strong {
  color: var(--text);
}

#activation-capabilities-list {
  color: var(--muted);
  font-weight: normal;
}

.template-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  margin-bottom: 0.25rem;
}

.template-one-liner {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.2rem 0 0.4rem 0;
  line-height: 1.3;
}

.template-item-featured {
  position: relative;
  flex-wrap: wrap;
  align-items: flex-start;
}

.template-item-featured .template-one-liner {
  flex-basis: 100%;
  width: 100%;
  margin-bottom: 0.15rem;
}

.put-on-your-site {
  margin-bottom: 0.75rem;
}

.put-on-your-site-intro {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.embed-preview-link {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.embed-preview-link:hover:not([aria-disabled="true"]) {
  text-decoration: underline;
}

.embed-preview-link[aria-disabled="true"] {
  color: var(--muted);
  pointer-events: none;
}

.invite-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.run-from-code-details {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.5rem 1rem;
}

.run-from-code-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.slack-details {
  margin-top: 0.5rem;
  padding: 0.4rem 0;
}
.slack-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}
.slack-steps {
  margin: 0.5rem 0 0 1rem;
  padding-left: 1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.slack-steps li { margin-bottom: 0.35rem; }
.slack-steps button { margin-left: 0.25rem; }

.run-from-code-inner {
  margin-top: 0.5rem;
}

.run-from-code-example {
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.remember-this-hint {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.dashboard-note-form button {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.agent-note-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.agent-note-content {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.agent-note-delete {
  flex-shrink: 0;
  padding: 0.15rem 0.35rem;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.agent-note-delete:hover {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.4);
}

.integration-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.design-visuals-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
  margin: 0.65rem 0 0.35rem;
}

.design-visual-card {
  margin: 0;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
}

.design-visual-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-surface) - 2px);
  border: 1px solid var(--border);
  margin-top: 0.35rem;
}

.design-visual-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.deliverables-dock {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
}

.deliverables-dock-header {
  margin-bottom: 0.65rem;
}

.deliverables-dock-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.deliverables-dock-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .deliverables-dock-body {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
    align-items: start;
  }
}

.deliverables-hero {
  margin: 0;
}

.deliverables-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}

.deliverables-hero-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #0a0a0c;
  cursor: zoom-in;
  overflow: hidden;
  min-height: min(52vh, 420px);
  max-height: min(70vh, 640px);
}

.deliverables-hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: min(70vh, 640px);
}

.deliverables-strip {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

@media (min-width: 900px) {
  .deliverables-strip {
    flex-direction: column;
    max-height: min(70vh, 640px);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

.deliverables-thumb {
  flex: 0 0 auto;
  width: 112px;
  padding: 0.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius-surface);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
}

.deliverables-thumb.is-selected {
  border-color: var(--accent, #6d5efc);
}

.deliverables-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-surface) - 2px);
  border: 1px solid var(--border);
}

.deliverables-thumb-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--muted);
}

.deliverables-dock-actions {
  margin-top: 0.65rem;
}

.deliverables-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.deliverables-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.deliverables-lightbox-panel {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
}

.deliverables-lightbox-panel img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 85vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-surface);
}

.deliverables-lightbox-close {
  position: absolute;
  top: -0.25rem;
  right: 0;
  z-index: 2;
  font-size: 1.75rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

.design-visual-card-head strong {
  font-size: 0.82rem;
}

.design-visual-card figcaption {
  margin: 0.35rem 0 0;
}

.social-manager-copy-actions {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.social-manager-copy-actions button.secondary {
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border-strong);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
  cursor: pointer;
}

.social-manager-copy-actions button.secondary:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
}

.social-manager-load-actions {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.social-manager-load-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
}

.social-manager-load-row select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-surface);
  font-size: 0.88rem;
}

.inbox-panel {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.75rem;
  background: var(--card-muted);
}

.email-butler-quickstart {
  margin: 0.7rem 0 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--fam-teal) 36%, var(--border));
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--fam-teal) 9%, var(--card-solid));
}

.email-butler-quickstart h5 {
  margin: 0 0 0.35rem;
}

.calendar-butler-quickstart {
  margin: 0.7rem 0 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--fam-sky) 36%, var(--border));
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--fam-sky) 9%, var(--card-solid));
}

.calendar-butler-quickstart h5 {
  margin: 0 0 0.35rem;
}

.inbox-panel h4 {
  margin: 0;
  font-size: 0.95rem;
}

.inbox-results {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.5rem;
}

.inbox-result-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--panel);
  padding: 0.55rem 0.6rem;
}

.inbox-result-item strong {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.inbox-result-item p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.4;
  white-space: pre-wrap;
}

pre {
  margin-top: 1rem;
  min-height: 420px;
  max-height: 560px;
  overflow: auto;
  background: var(--card-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.9rem;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04);
}

footer {
  max-width: 1000px;
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  /* Clear fixed .setup-helper-fab (bottom-right) so legal links stay tappable when scrolled to the end */
  padding-bottom: max(2.5rem, calc(3.85rem + env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid var(--divider);
  color: var(--muted);
}

body.app-mode footer {
  padding-bottom: 0.75rem;
}

.footer-trust {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.45rem;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Pricing / social proof layout parity — inherits DM Sans / Swiss stack */
.tier-showcase,
.tier-showcase *:not(code):not(pre),
.social-proof,
.social-proof *:not(code):not(pre) {
  font-family: inherit !important;
}

.tier-showcase {
  max-width: 1200px !important;
}

.tier-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}

.tier-card {
  border-radius: 0 !important;
  border: 1px solid var(--border) !important;
  background: var(--bg) !important;
  padding: 1.2rem 1rem !important;
}

.tier-card h3 {
  font-size: 2.1rem !important;
  line-height: 1.05 !important;
}

.tier-price {
  font-size: 2.3rem !important;
}

.tier-price-old {
  opacity: 0.8 !important;
}

.tier-card ul {
  list-style: none !important;
  margin: 1.1rem 0 0 !important;
  padding: 0 !important;
}

.tier-card li {
  padding-left: 1.45rem !important;
  margin-bottom: 0.45rem !important;
}

.social-proof {
  margin-top: 1.5rem !important;
  padding: 3.6rem 2rem !important;
}

.social-proof h2 {
  font-size: 2.95rem !important;
  margin-bottom: 0.7rem !important;
}

.social-proof > p {
  max-width: 690px !important;
  margin-bottom: 2.25rem !important;
}

.social-proof .testimonial-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.45rem !important;
  max-width: 1200px !important;
}

.social-proof .testimonial-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 250px !important;
  border-radius: 0 !important;
  border: 1px solid var(--border) !important;
  background: var(--bg) !important;
  padding: 1.65rem !important;
}

.social-proof .stars {
  font-size: 1.32rem !important;
  margin-bottom: 0.8rem !important;
}

.social-proof .testimonial-card p {
  margin: 0 0 1.25rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  font-style: italic !important;
}

.social-proof .person {
  margin-top: auto !important;
  gap: 0.75rem !important;
}

.social-proof .avatar {
  width: 46px !important;
  height: 46px !important;
  border-radius: 999px !important;
  font-size: 1.05rem !important;
}

.social-proof .person strong {
  font-size: 1.1rem !important;
  line-height: 1.1 !important;
}

.social-proof .person span {
  font-size: 0.92rem !important;
  opacity: 0.92 !important;
}

.faq-section {
  max-width: 1200px;
  margin: 0 auto 1rem;
  padding: 1.5rem 0.2rem 0;
  border-top: 1px solid var(--divider);
}

.faq-section h2 {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.faq-section > p {
  margin: 0 auto 1rem;
  max-width: 760px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  padding: 0.75rem 0.85rem;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.48;
}

@media (max-width: 980px) {
  .tier-grid,
  .social-proof .testimonial-grid {
    grid-template-columns: 1fr !important;
  }

  .faq-section {
    padding: 0;
  }
}

/* App mode: minimal chat UI when ?app=<agentId> */
body.app-mode .top-nav,
body.app-mode .hero,
body.app-mode .opener-video-section,
body.app-mode .how-to-video-resources-section,
body.app-mode .jump-to-nav {
  display: none !important;
}

body.app-mode main.layout > section:not(#test-agent) {
  display: none !important;
}

body.app-mode #activation,
body.app-mode #agent-dashboard {
  display: none !important;
}

body.app-mode .layout {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Same horizontal column as app-mode main layout (was flush left vs centered content). */
body.app-mode .app-mode-header {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.app-mode-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
}

/* Author `display: flex` above overrides UA `[hidden]` — keep bar off the default builder page until ?app= */
.app-mode-header[hidden] {
  display: none !important;
}

.app-mode-logo-link {
  line-height: 0;
  flex-shrink: 0;
  opacity: 0.95;
}
.app-mode-logo-link:hover {
  opacity: 1;
}
.app-mode-logo-img {
  height: 28px;
  width: auto;
  max-width: min(130px, 36vw);
  object-fit: contain;
  display: block;
}

.app-mode-header h1.app-mode-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1 1 auto;
}

.app-mode-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.app-mode-back:hover {
  text-decoration: underline;
}

.app-mode-goal {
  width: 100%;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Activation preflight + ops dead-letter actions */
.activation-preflight-details {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--surface-elevated, var(--bg));
}
.activation-preflight-details summary {
  cursor: pointer;
  font-weight: 600;
}
.preflight-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}
.preflight-item {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}
.preflight-sev {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.35rem;
  opacity: 0.85;
}
.preflight-sev-block .preflight-sev { color: var(--danger, #f87171); }
.preflight-sev-warn .preflight-sev { color: var(--warning, #fbbf24); }
.preflight-sev-info .preflight-sev { color: var(--muted); }

.webhook-failure-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.35rem;
}
.incidents-subheading {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.integration-slo-summary {
  font-size: 0.88rem;
}

.trust-loop-baseline-status {
  border-left: 3px solid var(--accent, #38bdf8);
  padding-left: 0.65rem;
  margin-top: 0.35rem;
}
.trust-loop-doc-link a {
  font-weight: 600;
}

.run-history-failure-help {
  margin: 0.4rem 0 0.5rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  background: color-mix(in srgb, var(--danger, #b91c1c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger, #b91c1c) 35%, var(--border));
  border-radius: var(--radius-surface);
}
.run-history-item--failed .run-history-meta {
  flex-wrap: wrap;
}
.run-history-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.35rem;
}
.run-history-provider-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  border: 1px solid var(--border);
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 84%, #fff 16%);
}
.run-history-status-failed {
  background: color-mix(in srgb, var(--danger, #b91c1c) 22%, transparent);
  color: var(--text);
}

.incident-fail-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}
.incident-failed-run-item + .incident-failed-run-item {
  margin-top: 0.35rem;
}

/* Floating setup guide (email / social walkthrough) */
body.app-mode .setup-helper-fab {
  display: none;
}

.setup-helper-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 10040;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  color: #fff;
  background: color-mix(in srgb, var(--fam-pink) 55%, #0f172a 45%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(15, 20, 25, 0.18);
  cursor: pointer;
}
.setup-helper-fab:hover {
  filter: brightness(1.06);
}

.setup-helper-modal[hidden] {
  display: none;
}

.setup-helper-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: end stretch;
  padding: 0;
}

.setup-helper-backdrop {
  position: absolute;
  inset: 0;
  /* Lighter scrim + minimal blur so users can still read the page behind the panel */
  background: rgba(15, 20, 25, 0.22);
  -webkit-backdrop-filter: blur(0.6px);
  backdrop-filter: blur(0.6px);
}

.setup-helper-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 0 0 auto;
  max-height: min(92vh, 640px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-right: none;
  border-bottom: none;
  box-shadow: -12px 0 40px rgba(15, 20, 25, 0.12);
  padding: 1.15rem 1.1rem 1.25rem;
}

.setup-helper-close {
  position: absolute;
  right: 0.65rem;
  top: 0.55rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.setup-helper-title {
  margin: 0 2.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.setup-helper-subtitle {
  margin: 0.45rem 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.setup-helper-resume {
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  background: var(--card-muted);
  border-radius: 10px;
}

.setup-helper-resume-text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.setup-helper-resume-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.45rem;
}

.setup-helper-flow-pick {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.setup-helper-path-btn {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--card-solid);
  color: var(--text);
}
.setup-helper-path-btn:hover {
  background: var(--hover-surface);
}

.setup-helper-hide-btn {
  margin-top: 0.15rem;
  text-align: left;
  padding: 0.55rem 0.15rem 0.1rem;
  font-size: 0.78rem;
  color: var(--muted-deep);
  border: none;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.setup-helper-hide-btn:hover {
  color: var(--text);
}

.setup-helper-restore-row {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-surface, 10px);
  background: var(--card-muted);
}

.setup-helper-restore-hint {
  margin: 0 0 0.5rem;
}

.setup-helper-show-again-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-surface, 10px);
  border: 1px solid var(--border-strong);
  background: var(--card-solid);
  color: var(--text);
  cursor: pointer;
}

.setup-helper-show-again-btn:hover {
  background: var(--hover-surface);
}

.setup-helper-step-meta {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-deep);
  margin-bottom: 0.5rem;
}

.setup-helper-message {
  padding: 0.85rem 0.95rem;
  background: var(--card-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 12px 12px 12px 4px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

.setup-helper-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
}

.setup-helper-nav .setup-helper-back-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--card-solid);
  color: var(--text);
}

.setup-helper-nav .setup-helper-back-btn:hover:not(:disabled) {
  background: var(--hover-surface);
}

.setup-helper-nav .setup-helper-back-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.setup-helper-spotlight {
  scroll-margin-top: 1.25rem;
  outline: 3px solid color-mix(in srgb, var(--fam-pink) 65%, transparent);
  outline-offset: 3px;
  border-radius: 10px;
  transition: outline-color 0.25s ease, outline-offset 0.25s ease;
}

.setup-helper-next-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--cta-bg);
  color: var(--cta-text);
}
.setup-helper-next-btn:hover {
  background: var(--cta-bg-hover);
}

@media (max-width: 520px) {
  .setup-helper-panel {
    max-width: 100%;
    border-left: none;
  }
}
