:root {
  --bg: #f6f2eb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-dark: #161616;
  --text: #161616;
  --muted: #6d655d;
  --line: rgba(22, 22, 22, 0.08);
  --line-strong: rgba(22, 22, 22, 0.14);
  --accent: #ff8b57;
  --accent-soft: #ffe2d2;
  --accent-2: #4a67ff;
  --success: #2f9f68;
  --shadow: 0 20px 80px rgba(27, 23, 20, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 139, 87, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(74, 103, 255, 0.16), transparent 28%),
    var(--bg);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-body,
.auth-body,
.dashboard-body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.dashboard-body.app-loading .workspace-shell,
.dashboard-body.app-loading .agent-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.ambient-one {
  top: -10rem;
  left: -6rem;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 139, 87, 0.32);
}

.ambient-two {
  top: 8rem;
  right: -4rem;
  width: 18rem;
  height: 18rem;
  background: rgba(74, 103, 255, 0.22);
}

.ambient-three {
  bottom: -6rem;
  right: -5rem;
  width: 20rem;
  height: 20rem;
  background: rgba(255, 139, 87, 0.2);
}

.marketing-shell,
.auth-shell,
.dashboard-layout {
  position: relative;
  z-index: 1;
}

.marketing-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-dark), #2f2f2f);
  color: white;
  font-weight: 800;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-dark {
  background: var(--surface-dark);
  color: white;
}

.button-light {
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--line);
}

.button-full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  padding: 32px 0 72px;
}

.eyebrow,
.mini-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1,
.auth-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: inline-block;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-2);
}

.hero-text,
.feature-card p,
.cta-band p,
.auth-copy p,
.content-card p,
.stats-card p,
.deploy-card p,
.hero-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-proof span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.status-pill.success {
  color: var(--success);
}

.hero-card,
.feature-card,
.cta-band,
.auth-panel-inner,
.auth-showcase,
.stats-card,
.source-summary,
.conversation-card,
.deploy-card,
.hero-panel,
.canvas-panel,
.builder-list,
.builder-summary,
.content-card,
.source-sidebar .content-card,
.logs-list,
.playground,
.sidebar-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-card,
.feature-card,
.cta-band,
.auth-panel-inner,
.auth-showcase,
.stats-card,
.source-summary,
.conversation-card,
.deploy-card,
.hero-panel,
.canvas-panel,
.builder-list,
.builder-summary,
.content-card,
.logs-list,
.playground,
.sidebar-card {
  border-radius: var(--radius-xl);
}

.preview-window {
  overflow: hidden;
  border-radius: 28px;
  background: #fbfaf7;
  border: 1px solid var(--line);
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ddd5cc;
}

.preview-url {
  color: var(--muted);
  font-size: 0.9rem;
}

.preview-main {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 430px;
}

.preview-sidebar,
.sidebar {
  background: #141414;
  color: rgba(255, 255, 255, 0.78);
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.preview-sidebar a {
  padding: 10px 12px;
  border-radius: 12px;
}

.preview-sidebar a.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.preview-panel {
  padding: 24px;
}

.preview-banner,
.section-heading,
.dashboard-topbar,
.topbar-actions,
.auth-row,
.inline-actions,
.widget-top,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-banner h3,
.section-heading h3,
.section-heading h2,
.dashboard-topbar h1,
.auth-heading h2,
.content-card h2,
.content-card h3,
.stats-card h2,
.hero-panel h2,
.deploy-card h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.metric-grid,
.feature-list,
.stats-row,
.panel-grid,
.notion-grid {
  display: grid;
  gap: 18px;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0;
}

.metric-grid article,
.feature-list article,
.stats-row div,
.summary-box,
.widget-card,
.list-card,
.limit-card,
.log-item,
.code-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.metric-grid article,
.stats-row div,
.summary-box,
.widget-card,
.list-card,
.limit-card,
.code-card {
  padding: 18px;
}

.metric-grid strong,
.stats-row strong,
.summary-list strong,
.summary-box strong {
  display: block;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.summary-value {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.preview-chat,
.playground-thread,
.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 22px;
  line-height: 1.55;
}

.chat-bubble-dark {
  align-self: flex-end;
  background: #161616;
  color: white;
}

.chat-bubble-light {
  align-self: flex-start;
  background: rgba(18, 18, 18, 0.05);
}

.chat-bubble.large {
  max-width: 92%;
}

.feature-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding-bottom: 18px;
}

.feature-card,
.cta-band,
.auth-panel-inner,
.auth-showcase,
.stats-card,
.source-summary,
.conversation-card,
.deploy-card,
.hero-panel,
.canvas-panel,
.builder-list,
.builder-summary,
.content-card,
.logs-list,
.playground {
  padding: 28px;
}

.feature-card-accent {
  background:
    linear-gradient(135deg, rgba(255, 139, 87, 0.16), rgba(74, 103, 255, 0.08)),
    rgba(255, 255, 255, 0.72);
}

.feature-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 0 48px;
}

.feature-list article {
  padding: 24px;
}

.feature-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.cta-band,
.auth-shell {
  display: grid;
  gap: 24px;
}

.cta-band {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 32px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 40px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-shell {
  width: min(1160px, 100%);
  grid-template-columns: 1fr 460px;
}

.auth-showcase {
  background:
    linear-gradient(160deg, rgba(255, 139, 87, 0.1), rgba(74, 103, 255, 0.08)),
    rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-copy h1 {
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  margin-bottom: 18px;
}

.auth-stats {
  display: grid;
  gap: 14px;
}

.auth-stats article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.auth-heading p {
  margin-top: 8px;
}

.auth-form,
.stack-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 10px;
  font-weight: 600;
}

input,
textarea,
select,
.url-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

textarea {
  min-height: 180px;
  padding: 16px;
  resize: vertical;
}

.url-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.url-input input {
  min-height: unset;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.checkbox input {
  width: 18px;
  height: 18px;
  min-height: unset;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--muted);
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: rgba(250, 247, 241, 0.96);
}

.oauth-list {
  display: grid;
  gap: 12px;
}

.auth-note {
  color: var(--muted);
  text-align: center;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  color: white;
  margin-bottom: 28px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sidebar-card {
  margin-top: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-card span {
  display: block;
  margin: 6px 0 16px;
  color: rgba(255, 255, 255, 0.68);
}

.dashboard-main {
  padding: 22px;
}

.dashboard-topbar {
  margin-bottom: 22px;
}

.dashboard-topbar h1 {
  font-size: 2.1rem;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.panel-grid-bottom {
  margin-top: 18px;
}

.stats-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-list div,
.summary-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.widget-card {
  margin-top: 20px;
}

.widget-body {
  margin-top: 18px;
}

.two-column-hero,
.sources-builder,
.source-layout,
.chat-logs-layout {
  display: grid;
  gap: 18px;
}

.two-column-hero {
  grid-template-columns: 1fr 0.92fr;
}

.split-rule {
  position: relative;
  text-align: center;
  color: var(--muted);
}

.split-rule::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
}

.split-rule span {
  position: relative;
  padding: 0 12px;
  background: rgba(250, 247, 241, 0.9);
}

.canvas-panel {
  position: relative;
  min-height: 420px;
  background-image:
    radial-gradient(rgba(22, 22, 22, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 139, 87, 0.08), rgba(74, 103, 255, 0.04));
  background-size: 22px 22px, auto;
}

.process-card {
  position: absolute;
  top: 20%;
  left: 16%;
  width: min(320px, 80%);
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid transparent;
  background-image:
    linear-gradient(white, white),
    linear-gradient(135deg, var(--accent), #d36bff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.process-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.process-item + .process-item {
  margin-top: 14px;
}

.process-item span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.12);
}

.process-item.complete span {
  background: var(--success);
}

.process-item.active span {
  background: var(--accent-2);
}

.floating-mark {
  position: absolute;
  right: 22%;
  bottom: 12%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #111;
  color: white;
  font-weight: 800;
  font-size: 1.5rem;
}

.sources-builder {
  grid-template-columns: 1fr 0.86fr;
  margin-top: 18px;
}

.builder-list,
.builder-summary {
  align-self: start;
}

.builder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.builder-item:last-of-type {
  margin-bottom: 18px;
}

.builder-item button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.builder-item.active span {
  font-weight: 800;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.source-tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
}

.source-tab.active {
  background: #161616;
  color: white;
  border-color: #161616;
}

.source-layout {
  grid-template-columns: 1fr 310px;
}

.source-panel {
  display: none;
}

.source-panel.active {
  display: block;
}

.upload-box {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 200px;
  margin: 22px 0;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.upload-box.drag-over {
  border-color: rgba(17, 17, 17, 0.28);
  background: rgba(255, 255, 255, 0.92);
}

.list-card {
  display: grid;
  gap: 10px;
}

.section-heading-space {
  margin-bottom: 4px;
}

.source-sidebar .compact {
  position: sticky;
  top: 22px;
}

.limit-card {
  margin-top: 18px;
}

.chat-logs-layout {
  grid-template-columns: 340px 1fr;
}

.log-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px;
  margin-top: 14px;
  text-align: left;
  cursor: pointer;
}

.log-item.active {
  border-color: rgba(22, 22, 22, 0.18);
  background: white;
}

.log-item span {
  color: var(--muted);
}

.playground-thread {
  margin-top: 14px;
  min-height: 420px;
}

.code-card code {
  display: block;
  word-break: break-all;
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}

.user-meta {
  display: grid;
  gap: 2px;
}

.user-meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.workspace-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace-edit {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
}

.workspace-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  padding: 0;
}

.workspace-edit-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

.workspace-shell,
.agent-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.workspace-sidebar,
.agent-sidebar {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.workspace-main,
.agent-main {
  padding: 22px;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.workspace-nav {
  gap: 6px;
}

.workspace-sidebar .sidebar-card,
.agent-sidebar .sidebar-card {
  margin-top: auto;
}

.workspace-nav-item,
.agent-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.2;
}

.agent-nav-item {
  gap: 10px;
  padding: 9px 11px;
  font-size: 0.88rem;
}

.nav-caret {
  margin-left: auto;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: transform 180ms ease, opacity 180ms ease;
}

.agent-nav-item.expanded .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.workspace-nav-item.active,
.agent-nav-item.active,
.workspace-nav-item:hover:not(.active),
.agent-nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-subnav {
  display: grid;
  max-height: 0;
  margin: 0 0 8px 28px;
  overflow: hidden;
  opacity: 0;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition: max-height 220ms ease, opacity 180ms ease, margin 220ms ease;
}

.agent-subnav.open {
  max-height: 220px;
  margin: 2px 0 8px 28px;
  gap: 2px;
  opacity: 1;
}

.agent-subnav-item {
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  text-align: left;
  font-size: 0.84rem;
  cursor: pointer;
}

.agent-subnav-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.agent-subnav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: white;
}

.agents-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.agents-header h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.agents-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.agents-grid {
  display: grid;
  gap: 20px;
}

.agent-card {
  width: min(100%, 310px);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(24, 20, 16, 0.06);
}

.agent-card-visual {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 20px;
  background: radial-gradient(circle at top left, #5b7cff, #3158dc 70%);
}

.agent-visual-window {
  width: 84%;
  height: 138px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.agent-visual-bubble {
  height: 22px;
  border-radius: 999px;
}

.agent-visual-bubble.light {
  width: 46%;
  background: rgba(49, 88, 220, 0.12);
}

.agent-visual-bubble.dark {
  width: 52%;
  margin-top: 28px;
  margin-left: auto;
  background: #4d7bff;
}

.agent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 18px;
}

.agent-card-footer strong {
  display: block;
}

.agent-card-footer span {
  color: var(--muted);
  font-size: 0.9rem;
}

.agent-card-more {
  color: var(--muted);
  font-size: 1.1rem;
}

.agent-sidebar-top {
  margin-bottom: 18px;
}

.back-link {
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.agent-breadcrumb {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.agent-breadcrumb span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.agent-panel,
.workspace-panel {
  display: none;
}

.agent-panel.active,
.workspace-panel.active {
  display: block;
}

.agent-source-panel {
  display: none;
  margin-top: 0;
}

.agent-source-panel.active {
  display: block;
}

.empty-list-card {
  margin-top: 18px;
}

.source-page-layout,
.text-snippet-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 22px;
}

.source-page-main {
  min-width: 0;
}

.text-editor-card,
.text-detail-card {
  padding: 20px;
}

.text-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.snippet-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.source-page-sidebar,
.text-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
}

.source-page-sidebar .compact,
.text-sidebar .compact {
  position: sticky;
  top: 22px;
}

.warning-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff4de;
  color: #b96a09;
  font-size: 0.92rem;
}

.source-warning {
  margin-top: 12px;
}

.source-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.source-page-header h3 {
  margin: 0 0 4px;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.source-page-header p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.45;
}

.source-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.source-card {
  padding: 20px;
  border-radius: 20px;
  box-shadow: none;
  backdrop-filter: none;
  background: #ffffff;
  border: 1px solid rgba(22, 22, 22, 0.08);
}

.source-card + .text-sources-block,
.source-card + .content-card,
.source-page-header + .text-sources-block {
  margin-top: 22px;
}

.source-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.source-card-header strong {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.summary-stack {
  display: grid;
  gap: 12px;
}

.summary-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.summary-pill .summary-value {
  color: var(--text);
  font-weight: 600;
}

.source-summary-sidebar h4 {
  margin: 0 0 18px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.source-summary-sidebar .limit-card {
  margin-top: 16px;
}

#data-sources-panel {
  padding: 0;
  background: transparent;
}

#data-sources-panel > .content-card {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
}

#data-sources-panel .source-summary-sidebar {
  padding: 22px;
  border-radius: 22px;
  box-shadow: none;
  backdrop-filter: none;
  background: #ffffff;
  border: 1px solid rgba(22, 22, 22, 0.08);
}

#data-sources-panel .source-summary-sidebar .limit-card {
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
}

#data-sources-panel .source-warning {
  border-radius: 14px;
}

#data-sources-panel .text-sources-block {
  margin-top: 26px;
}

#data-sources-panel .text-sources-toolbar {
  margin-bottom: 14px;
}

#data-sources-panel .text-sources-toolbar h3 {
  font-size: 1.9rem;
}

#data-sources-panel .selection-row {
  margin-bottom: 14px;
}

#data-sources-panel .snippet-row {
  min-height: 68px;
  padding: 14px 0;
}

#data-sources-panel .sort-chip {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
}

#data-sources-panel .search-input {
  min-height: 40px;
  border-radius: 12px;
}

.notion-card {
  display: grid;
  gap: 16px;
}

.notion-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.details-list {
  display: grid;
  gap: 14px;
}

.details-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.details-list strong {
  color: var(--text);
}

.text-sources-block {
  margin-top: 18px;
}

.text-sources-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.text-sources-toolbar h3 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.search-input {
  min-height: 42px;
  width: 230px;
}

.text-source-list {
  display: grid;
  gap: 12px;
}

.snippet-empty {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
}

.snippet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.snippet-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.snippet-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: white;
}

.snippet-checkbox.checked {
  border-color: #111111;
  background: #111111;
  box-shadow: inset 0 0 0 4px white;
}

.snippet-row-copy {
  display: grid;
  gap: 6px;
}

.snippet-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.snippet-row-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.snippet-row-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.snippet-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e9f9e9;
  color: #2f9f68;
  font-size: 0.78rem;
  font-weight: 700;
}

.snippet-row-actions,
.text-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.snippet-arrow {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  cursor: pointer;
}

.snippet-arrow {
  font-size: 1.2rem;
}

.snippet-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  min-width: 118px;
  padding: 8px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(24, 20, 16, 0.12);
}

.snippet-menu-delete {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #d54c4c;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.snippet-menu-delete:hover {
  background: rgba(213, 76, 76, 0.08);
}

.detail-menu-wrap {
  position: relative;
}

.selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.select-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.selection-meta {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.04);
  color: var(--muted);
  font-size: 0.92rem;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin: 18px auto 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #111111;
  color: white;
}

.bulk-danger {
  border: 0;
  background: transparent;
  color: #ff8a8a;
  font-weight: 700;
  cursor: pointer;
}

.text-detail-header {
  margin-bottom: 10px;
}

.back-inline {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.text-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.text-detail-title-row h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.text-detail-body {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  white-space: pre-wrap;
  line-height: 1.65;
}

.playground-layout {
  display: grid;
  grid-template-columns: 404px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.playground-controls {
  align-self: start;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.playground-title {
  margin: 0 0 16px;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.model-picker-label {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.instructions-builder {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  position: relative;
  isolation: isolate;
}

.instructions-heading {
  font-weight: 600;
}

.instructions-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: start;
}

.prompt-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #8f8a81;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.prompt-tool-button:hover:not(:disabled) {
  background: #fff;
  color: #54514b;
  border-color: rgba(17, 17, 17, 0.12);
}

.prompt-tool-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.prompt-tool-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.instructions-builder textarea {
  min-height: 320px;
  font-family: "Manrope", sans-serif;
  line-height: 1.55;
}

.prompt-save-bar {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(24, 20, 16, 0.08);
  position: sticky;
  bottom: 0;
  z-index: 8;
  transform: translateY(0);
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease;
}

.prompt-save-bar.hidden {
  display: none;
}

.prompt-save-bar span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.prompt-save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.prompt-save-actions .button {
  min-height: 42px;
  width: 100%;
  min-width: 0;
  padding: 0 14px;
}

.prompt-preset-menu {
  left: 0;
  right: auto;
  width: 254px;
  gap: 0;
  padding: 6px 0 8px;
  max-height: 254px;
  overflow-y: auto;
  z-index: 50;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgb(255, 255, 255);
  box-shadow: 0 12px 28px rgba(24, 20, 16, 0.10);
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.18) transparent;
  backdrop-filter: none;
  filter: none;
}

.prompt-preset-menu::-webkit-scrollbar {
  width: 8px;
}

.prompt-preset-menu::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 17, 0.16);
  border-radius: 999px;
}

.prompt-preset-menu::-webkit-scrollbar-track {
  background: transparent;
}

.preset-group-label {
  padding: 6px 12px 4px;
  color: #8f8a81;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.prompt-preset-option {
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin: 0 8px;
  padding: 5px 10px;
  border-radius: 10px;
  transition: background 120ms ease, color 120ms ease;
}

.prompt-preset-option:hover:not(.active) {
  background: rgba(17, 17, 17, 0.05);
}

.prompt-preset-option .model-option-copy {
  gap: 0;
}

.prompt-preset-option .model-option-copy strong {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.prompt-check {
  opacity: 0;
  color: #999187;
  font-size: 13px;
  font-weight: 600;
  transform: none;
}

.prompt-preset-option.active .prompt-check {
  opacity: 1;
}

.prompt-preset-menu .prompt-preset-option,
.prompt-preset-menu .prompt-preset-option:hover,
.prompt-preset-menu .prompt-preset-option.active {
  border: 0;
}

.prompt-preset-menu .prompt-preset-option.active {
  background: rgba(17, 17, 17, 0.05);
}

.instructions-picker .model-picker-button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
}

.instructions-picker .model-picker-copy {
  gap: 0;
}

.instructions-picker .model-picker-copy strong {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.instructions-picker .model-picker-copy span {
  display: none;
}

.instructions-picker .model-picker-caret {
  font-size: 12px;
}

.model-picker {
  position: relative;
}

.model-picker-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.model-picker-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.model-picker-copy strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.model-picker-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.model-picker-caret {
  color: var(--muted);
  transition: transform 180ms ease;
}

.model-picker.open .model-picker-caret {
  transform: rotate(180deg);
}

.model-picker-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(24, 20, 16, 0.14);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.model-picker.open-upward .model-picker-menu {
  top: auto;
  bottom: calc(100% + 10px);
  transform: translateY(6px);
}

.model-picker.open .model-picker-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.model-option {
  display: flex;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
}

.model-option:hover,
.model-option.active {
  border-color: rgba(17, 17, 17, 0.08);
  background: rgba(17, 17, 17, 0.035);
}

.model-option-copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.model-option-copy strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.model-option-copy span {
  color: var(--muted);
  font-size: 0.87rem;
}

.status-card {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.status-card span {
  color: var(--muted);
}

.status-card-trained strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 0.96rem;
}

.status-card-trained strong::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
}

.status-card-trained span {
  font-size: 0.9rem;
}

.playground-canvas {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: calc(100vh - 36px);
  padding-top: 26px;
  border-radius: 28px;
  background:
    radial-gradient(rgba(17, 17, 17, 0.08) 1px, transparent 1px),
    white;
  background-size: 20px 20px, auto;
  border: 1px solid var(--line);
}

.playground-chat-window {
  width: min(100%, 390px);
  min-height: 472px;
  border-radius: 24px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(21, 18, 15, 0.08);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.playground-chat-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.playground-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  padding: 16px 18px;
  overflow-y: auto;
}

.playground-input-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 0 18px 18px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(247, 244, 239, 0.96);
}

.playground-input-field {
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  resize: none;
}

.playground-input-field:focus {
  outline: none;
}

.playground-send {
  min-width: 74px;
  border: 0;
  border-radius: 14px;
  background: #111111;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.playground-send[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.chat-bubble-loading {
  color: var(--muted);
}

.website-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.website-header h3 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.website-header p {
  margin: 0;
  color: var(--muted);
}

.website-builder {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
}

.website-builder-header {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.website-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.website-mode-tab {
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.website-mode-tab.active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 #111111;
}

.website-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.04);
  color: var(--muted);
  font-size: 0.92rem;
}

.website-actions {
  justify-content: space-between;
}

.file-upload-warning {
  margin-bottom: 14px;
}

.auth-body-dark {
  background:
    radial-gradient(circle at top left, rgba(255, 132, 89, 0.18), transparent 28%),
    linear-gradient(135deg, #181818, #202020 44%, #1f1f1f);
  color: #f2eee9;
  overflow: hidden;
}

.auth-shell-dark {
  height: 100vh;
  grid-template-columns: minmax(380px, 460px) 1fr;
  gap: 0;
}

.auth-stage {
  display: grid;
  place-items: center;
  padding: 20px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-stage-panel {
  width: min(100%, 390px);
}

.brand-light {
  color: white;
  margin-bottom: 16px;
}

.brand-mark-glow {
  background: linear-gradient(180deg, #ffb08e, #ff8357);
  color: #23140e;
  box-shadow: 0 10px 30px rgba(255, 131, 87, 0.28);
}

.auth-card-dark {
  padding: 20px 22px;
  border-radius: 28px;
  background: rgba(36, 36, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.auth-tabs {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-tab {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.auth-view {
  display: none;
}

.auth-view.active {
  display: block;
}

.auth-heading-dark h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  letter-spacing: -0.05em;
}

.auth-heading-dark p,
.auth-legal,
.auth-status {
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.5;
}

.auth-heading-dark p {
  margin: 0;
}

.stack-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 12px;
}

.stack-icon span {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb08e, #ff8357);
}

.stack-icon span:nth-child(1) {
  height: 22px;
}

.stack-icon span:nth-child(2) {
  height: 32px;
}

.stack-icon span:nth-child(3) {
  height: 26px;
}

.google-button-slot {
  min-height: 44px;
}

.oauth-link,
.oauth-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border-radius: 10px;
  background: #494949;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #f6f3ee;
}

.google-g {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: white;
  color: #4285f4;
  font-weight: 800;
  font-size: 0.9rem;
}

.auth-divider-dark {
  position: relative;
  margin: 18px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.38);
}

.auth-divider-dark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider-dark span {
  position: relative;
  padding: 0 12px;
  background: #242424;
}

.auth-form-dark {
  display: grid;
  gap: 12px;
}

.auth-form-dark label {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
}

.auth-form-dark input {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
}

.auth-form-dark input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.button-accent {
  background: linear-gradient(180deg, #f08d61, #df7648);
  color: white;
}

.auth-legal {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.86rem;
}

.auth-status {
  min-height: 18px;
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.82rem;
}

.auth-preview-side {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)),
    #ece8e2;
}

.auth-preview-wrap {
  position: relative;
  display: grid;
  place-items: center;
  height: 100vh;
  padding: 28px;
}

.auth-preview-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 16, 16, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 16, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.3;
}

.analytics-frame {
  position: relative;
  width: min(100%, 620px);
  min-height: 460px;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(19, 19, 19, 0.06);
  box-shadow: 0 30px 80px rgba(28, 25, 23, 0.08);
  backdrop-filter: blur(16px);
}

.analytics-header h2 {
  margin: 0;
  color: #171717;
  letter-spacing: -0.05em;
}

.dark-pill {
  background: rgba(17, 17, 17, 0.9);
  color: white;
  border-color: rgba(17, 17, 17, 0.9);
}

.analytics-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.analytics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(23, 23, 23, 0.07);
  color: #191919;
}

.analytics-row.active {
  background: rgba(232, 182, 164, 0.3);
}

.analytics-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bullet {
  display: inline-flex;
  width: 14px;
  height: 14px;
  border-radius: 5px;
}

.bullet.muted {
  background: #9db4cf;
}

.bullet.google {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.bullet.x {
  background: #111111;
}

.bullet.reddit {
  background: #ff6b35;
}

.bullet.github {
  background: #24292f;
}

.analytics-tooltip {
  position: absolute;
  top: 118px;
  left: 140px;
  width: 210px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(24, 24, 24, 0.96);
  color: white;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.analytics-tooltip strong {
  display: block;
}

.tooltip-line,
.tooltip-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.tooltip-line span,
.tooltip-meta span {
  color: rgba(255, 255, 255, 0.74);
}

.auth-preview-copy {
  position: absolute;
  right: 28px;
  bottom: 24px;
  max-width: 240px;
  color: rgba(17, 17, 17, 0.68);
  font-size: 0.96rem;
  line-height: 1.5;
}

@media (max-height: 860px) {
  .auth-stage {
    padding: 14px 18px;
  }

  .auth-stage-panel {
    width: min(100%, 372px);
  }

  .auth-card-dark {
    padding: 18px 18px 16px;
  }

  .auth-heading-dark h1 {
    font-size: 1.9rem;
  }

  .stack-icon {
    margin-bottom: 10px;
  }

  .oauth-link,
  .oauth-fallback,
  .auth-form-dark input,
  .button {
    min-height: 46px;
  }

  .analytics-frame {
    width: min(100%, 560px);
    min-height: 410px;
    padding: 20px;
  }

  .analytics-tooltip {
    top: 108px;
    left: 118px;
    width: 198px;
  }

  .auth-preview-copy {
    right: 22px;
    bottom: 18px;
    max-width: 210px;
    font-size: 0.9rem;
  }
}

.onboarding-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 139, 87, 0.12), transparent 24%),
    #f7f4ef;
  color: #171717;
}

.onboarding-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0;
}

.onboarding-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 1.1rem;
  font-weight: 800;
}

.onboarding-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 74vh;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 23, 23, 0.07);
  box-shadow: 0 20px 80px rgba(23, 19, 16, 0.08);
}

.onboarding-left,
.onboarding-right {
  padding: 48px;
}

.onboarding-left h1 {
  margin: 8px 0 26px;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.06em;
}

.onboarding-form {
  display: grid;
  gap: 24px;
  max-width: 500px;
}

.required-field {
  color: #d54c4c;
}

.required-field > .url-input,
.required-field > textarea {
  margin-top: 8px;
}

.onboarding-url-input {
  background: white;
}

.field-error {
  display: none;
  margin-top: 8px;
  color: #d54c4c;
  font-size: 0.9rem;
  font-weight: 600;
}

.input-error {
  border-color: #e06262 !important;
  box-shadow: 0 0 0 3px rgba(224, 98, 98, 0.08);
}

.goal-field {
  position: relative;
}

.goal-field textarea {
  min-height: 118px;
  padding-bottom: 56px;
  background: white;
}

.preset-wrap {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.preset-select {
  min-height: 34px;
  width: 156px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f5f2ec;
  color: #6d655d;
  font-size: 0.88rem;
}

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.progress-dots {
  display: flex;
  gap: 6px;
}

.progress-dots span {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.12);
}

.progress-dots span.active {
  background: #111111;
}

.onboarding-status {
  text-align: left;
  margin: 4px 0 0;
  color: #6d655d;
}

.onboarding-right {
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(rgba(17, 17, 17, 0.08) 1px, transparent 1px),
    #faf8f5;
  background-size: 22px 22px, auto;
}

.onboarding-grid {
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(23, 23, 23, 0.05);
}

.testimonial-card {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 34px 28px;
  border-radius: 28px;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #ee7d6a, #f6c34d) border-box;
  border: 2px solid transparent;
  text-align: center;
  box-shadow: 0 24px 60px rgba(23, 19, 16, 0.08);
}

.testimonial-logo {
  margin-bottom: 18px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #535353;
}

.testimonial-card p {
  margin: 0 0 18px;
  color: #383838;
  line-height: 1.75;
}

.testimonial-card strong {
  display: block;
  font-size: 1.2rem;
}

.testimonial-card span {
  color: #7b766f;
}

@media (max-width: 1100px) {
  .hero,
  .feature-band,
  .auth-shell,
  .panel-grid,
  .panel-grid-bottom,
  .two-column-hero,
  .sources-builder,
  .source-layout,
  .chat-logs-layout,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    min-height: unset;
  }

  .workspace-shell,
  .agent-shell,
  .playground-layout,
  .text-snippet-layout {
    grid-template-columns: 1fr;
  }

  .onboarding-card {
    grid-template-columns: 1fr;
  }

  .onboarding-right {
    min-height: 380px;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .marketing-shell {
    width: min(100% - 20px, 1180px);
  }

  .auth-shell-dark {
    grid-template-columns: 1fr;
  }

  .auth-stage {
    border-right: 0;
  }

  .auth-preview-side {
    display: none;
  }

  .onboarding-shell {
    width: min(100% - 20px, 1180px);
  }

  .onboarding-left,
  .onboarding-right {
    padding: 28px 20px;
  }

  .onboarding-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar,
  .workspace-topbar,
  .agents-header,
  .dashboard-topbar,
  .topbar-actions,
  .section-heading,
  .list-row,
  .preview-banner,
  .auth-row,
  .inline-actions,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-links,
  .hero-proof,
  .tab-bar {
    gap: 10px;
  }

  .preview-main,
  .metric-grid,
  .feature-list,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .preview-sidebar {
    display: none;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .auth-body,
  .dashboard-main {
    padding: 16px;
  }
}

/* === Final Data Sources Layout Override (Chatbase-style) === */
#data-sources-panel .agent-source-content {
  background: #ffffff;
  border: 1px solid #ececf1;
  border-radius: 14px;
  padding: 24px;
}

#data-sources-panel .text-sources-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 10px;
}

#data-sources-panel .text-sources-toolbar h3 {
  margin: 0;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #18181b;
}

#data-sources-panel .text-sources-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 430px;
  margin-left: auto;
}

#data-sources-panel .search-input {
  width: 240px;
  height: 36px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  font-size: 14px;
  color: #3f3f46;
}

#data-sources-panel .sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#data-sources-panel .sort-chip {
  height: 36px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
  color: #27272a;
  font-size: 14px;
  font-weight: 500;
  padding: 0 12px;
}

#data-sources-panel .sort-menu {
  min-width: 180px;
  margin-top: 8px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 50;
}

#data-sources-panel .sort-option {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
}

#data-sources-panel .selection-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 34px;
  margin: 8px 0 4px;
  padding: 0;
}

#data-sources-panel .select-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #18181b;
  font-weight: 500;
}

#data-sources-panel .select-all-toggle span {
  line-height: 1.2;
  white-space: nowrap;
}

#data-sources-panel .text-source-list {
  border-top: 1px solid #ececf1;
  margin-top: 6px;
}

#data-sources-panel .snippet-row {
  min-height: 66px;
  padding: 12px 4px 12px 0;
  border-bottom: 1px solid #ececf1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#data-sources-panel .snippet-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

#data-sources-panel .snippet-row-copy {
  min-width: 0;
}

#data-sources-panel .snippet-row-name {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  color: #18181b;
  margin: 0;
}

#data-sources-panel .snippet-row-meta {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.2;
  color: #71717a;
}

#data-sources-panel .snippet-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

#data-sources-panel .icon-button,
#data-sources-panel .snippet-arrow {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  color: #71717a;
}

#data-sources-panel .snippet-arrow {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 1200px) {
  #data-sources-panel .text-sources-actions {
    min-width: 0;
    flex-wrap: wrap;
  }

  #data-sources-panel .search-input {
    width: 200px;
  }
}

/* === Data Sources Shell Alignment (Chatbase-style) === */
#data-sources-panel {
  padding: 0;
  background: #ffffff;
}

#data-sources-panel .source-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

#data-sources-panel .source-page-main {
  min-width: 0;
}

#data-sources-panel .source-page-header {
  margin-bottom: 16px;
}

#data-sources-panel .source-page-header h3 {
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

#data-sources-panel .source-page-header p {
  font-size: 30px;
  line-height: 1.3;
  max-width: 980px;
}

#data-sources-panel .source-page-actions .button-light {
  height: 52px;
  border-radius: 16px;
  font-size: 28px;
  padding: 0 26px;
}

#data-sources-panel .source-card {
  border: 1px solid #e8e8ee;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
}

#data-sources-panel .source-card-header {
  margin-bottom: 12px;
}

#data-sources-panel .source-card-header strong {
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

#files-source-panel .file-upload-warning {
  margin-top: 0;
  margin-bottom: 16px;
}

#files-source-panel .upload-box {
  width: min(640px, 100%);
  min-height: 188px;
  border-radius: 16px;
  border: 1px dashed #dadbe2;
  background: #fafafd;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 26px 26px 22px;
  gap: 32px;
}

#files-source-panel .upload-box strong {
  font-size: 31px;
  line-height: 1.25;
  color: #4a4a53;
}

#files-source-panel .upload-box span {
  font-size: 30px;
  color: #6b6b74;
}

#data-sources-panel .source-page-sidebar {
  border-left: 1px solid #ececf1;
  padding-left: 22px;
}

#data-sources-panel .source-summary-sidebar {
  background: #f7f7fa;
  border: 1px solid #ececf1;
  border-radius: 18px;
  padding: 16px;
}

#data-sources-panel .source-summary-sidebar h4 {
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

#data-sources-panel .summary-pill {
  min-height: 54px;
  border-radius: 12px;
  font-size: 28px;
}

#data-sources-panel .summary-pill .summary-value {
  font-size: 28px;
}

#data-sources-panel .source-summary-sidebar .limit-card {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid #e7e7ef;
  background: #ffffff;
}

#data-sources-panel .source-summary-sidebar .limit-card strong {
  font-size: 36px;
}

#data-sources-panel .source-summary-sidebar .limit-card p {
  font-size: 30px;
}

#data-sources-panel .source-summary-sidebar .button-full {
  margin-top: 8px;
  height: 52px;
  border-radius: 14px;
  font-size: 30px;
}

#data-sources-panel .source-warning {
  border-radius: 12px;
  font-size: 28px;
}

@media (max-width: 1200px) {
  #data-sources-panel .source-page-layout {
    grid-template-columns: 1fr;
  }

  #data-sources-panel .source-page-sidebar {
    border-left: 0;
    padding-left: 0;
  }
}

/* === Data Sources Shell Typography Hotfix === */
#data-sources-panel .source-page-header h3 {
  font-size: 2.4rem;
  line-height: 1.08;
}

#data-sources-panel .source-page-header p {
  font-size: 1.5rem;
  line-height: 1.35;
  max-width: 760px;
}

#data-sources-panel .source-page-actions .button-light {
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
  padding: 0 16px;
}

#data-sources-panel .source-card-header strong {
  font-size: 2.2rem;
  line-height: 1.1;
}

#files-source-panel .upload-box strong {
  font-size: 1.35rem;
  line-height: 1.25;
}

#files-source-panel .upload-box span {
  font-size: 1rem;
}

#data-sources-panel .source-summary-sidebar h4 {
  font-size: 2.25rem;
  line-height: 1.1;
  margin: 0 0 12px;
}

#data-sources-panel .summary-pill {
  min-height: 48px;
  font-size: 1.05rem;
}

#data-sources-panel .summary-pill .summary-value {
  font-size: 1.05rem;
}

#data-sources-panel .source-summary-sidebar .limit-card strong {
  font-size: 1.3rem;
}

#data-sources-panel .source-summary-sidebar .limit-card p {
  font-size: 1rem;
}

#data-sources-panel .source-summary-sidebar .button-full {
  height: 44px;
  border-radius: 12px;
  font-size: 1rem;
}

#data-sources-panel .source-warning {
  font-size: 0.98rem;
}

/* === Data Sources Final Match Pass === */
#data-sources-panel {
  background: #ffffff;
}

#data-sources-panel .source-page-layout {
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 24px;
}

#data-sources-panel .source-page-header {
  margin-bottom: 14px;
}

#data-sources-panel .source-page-header h3 {
  margin: 0 0 6px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

#data-sources-panel .source-page-header p {
  margin: 0;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.35;
  color: #60606b;
}

#data-sources-panel .source-page-actions .button-light {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid #dfdfe6;
}

#data-sources-panel .source-card {
  border: 1px solid #e7e7ee;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

#data-sources-panel .source-card-header strong {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

#files-source-panel .file-upload-warning {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 14px;
}

#files-source-panel .upload-box {
  width: min(520px, 100%);
  min-height: 150px;
  padding: 20px;
  gap: 18px;
  border-radius: 12px;
  border: 1px dashed #d7d8e2;
  background: #fbfbfd;
}

#files-source-panel .upload-box strong {
  font-size: 17px;
  line-height: 1.35;
  color: #464650;
}

#files-source-panel .upload-box span {
  font-size: 13px;
  color: #6f6f78;
}

#data-sources-panel .source-page-sidebar {
  border-left: 1px solid #ececf1;
  padding-left: 20px;
}

#data-sources-panel .source-summary-sidebar {
  background: #f7f7fa;
  border: 1px solid #e7e7ee;
  border-radius: 16px;
  padding: 14px;
}

#data-sources-panel .source-summary-sidebar h4 {
  margin: 0 0 12px;
  font-size: 50px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}

#data-sources-panel .summary-stack {
  gap: 10px;
}

#data-sources-panel .summary-pill {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e5e5ec;
  font-size: 25px;
}

#data-sources-panel .summary-pill .summary-value {
  font-size: 25px;
  font-weight: 600;
}

#data-sources-panel .source-summary-sidebar .limit-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e6e6ef;
}

#data-sources-panel .source-summary-sidebar .limit-card strong {
  font-size: 35px;
}

#data-sources-panel .source-summary-sidebar .limit-card p {
  margin: 6px 0 10px;
  font-size: 25px;
}

#data-sources-panel .source-summary-sidebar .button-full {
  height: 42px;
  border-radius: 10px;
  font-size: 25px;
}

#data-sources-panel .source-warning {
  margin-top: 10px;
  border-radius: 10px;
  font-size: 24px;
  padding: 10px 12px;
}

@media (max-width: 1200px) {
  #data-sources-panel .source-page-layout {
    grid-template-columns: 1fr;
  }

  #data-sources-panel .source-page-sidebar {
    border-left: 0;
    padding-left: 0;
  }
}

/* === Data Sources Size Correction === */
#data-sources-panel .source-page-header h3 {
  font-size: 46px;
}

#data-sources-panel .source-page-header p {
  font-size: 24px;
  color: #666672;
}

#data-sources-panel .source-card-header strong {
  font-size: 44px;
}

#data-sources-panel .source-summary-sidebar h4 {
  font-size: 46px;
  margin-bottom: 10px;
}

#data-sources-panel .summary-pill {
  font-size: 27px;
}

#data-sources-panel .summary-pill .summary-value {
  font-size: 27px;
}

#data-sources-panel .source-summary-sidebar .limit-card strong {
  font-size: 34px;
}

#data-sources-panel .source-summary-sidebar .limit-card p {
  font-size: 26px;
}

#data-sources-panel .source-summary-sidebar .button-full {
  font-size: 27px;
}

#data-sources-panel .source-warning {
  font-size: 26px;
}

/* === Data Sources Strict Scale (Chatbase) === */
#data-sources-panel .source-page-header h3 {
  font-size: 42px;
  line-height: 1.1;
}

#data-sources-panel .source-page-header p {
  font-size: 24px;
  line-height: 1.4;
  max-width: 640px;
}

#data-sources-panel .source-card-header strong {
  font-size: 43px;
  line-height: 1.15;
}

#files-source-panel .upload-box strong {
  font-size: 30px;
}

#files-source-panel .upload-box span {
  font-size: 22px;
}

#data-sources-panel .source-summary-sidebar h4 {
  font-size: 43px;
  line-height: 1.15;
}

#data-sources-panel .summary-pill {
  min-height: 42px;
  font-size: 25px;
}

#data-sources-panel .summary-pill .summary-value {
  font-size: 25px;
}

#data-sources-panel .source-summary-sidebar .limit-card strong {
  font-size: 30px;
}

#data-sources-panel .source-summary-sidebar .limit-card p {
  font-size: 25px;
}

#data-sources-panel .source-summary-sidebar .button-full {
  font-size: 25px;
}

#data-sources-panel .source-warning {
  font-size: 22px;
}

/* === Data Sources Pixel Match Final === */
#data-sources-panel .source-page-header h3 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 6px;
}

#data-sources-panel .source-page-header p {
  font-size: 14px;
  line-height: 1.45;
  color: #6a6a74;
  max-width: 620px;
}

#data-sources-panel .source-card-header strong {
  font-size: 38px;
  line-height: 1.2;
}

#files-source-panel .upload-box {
  width: min(420px, 100%);
  min-height: 132px;
  padding: 16px;
  gap: 14px;
}

#files-source-panel .upload-box strong {
  font-size: 14px;
  line-height: 1.4;
}

#files-source-panel .upload-box span {
  font-size: 12px;
}

#data-sources-panel .source-summary-sidebar h4 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 10px;
}

#data-sources-panel .summary-pill {
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

#data-sources-panel .summary-pill .summary-value {
  font-size: 14px;
}

#data-sources-panel .source-summary-sidebar .limit-card strong {
  font-size: 31px;
}

#data-sources-panel .source-summary-sidebar .limit-card p {
  font-size: 15px;
}

#data-sources-panel .source-summary-sidebar .button-full {
  font-size: 15px;
}

#data-sources-panel .source-warning {
  font-size: 14px;
}

/* === Files Panel Mid-Section Match (Chatbase) === */
#files-source-panel .source-page-main {
  padding-right: 2px;
}

#files-source-panel .source-page-header {
  margin-bottom: 14px;
}

#files-source-panel .source-page-header h3 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 6px;
}

#files-source-panel .source-page-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #666673;
}

#files-source-panel .source-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

#files-source-panel .source-card-header {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#files-source-panel .source-card-header::after {
  content: "⌃";
  color: #8f8f98;
  font-size: 14px;
  line-height: 1;
}

#files-source-panel .source-card-header strong {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

#files-source-panel .file-upload-warning {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #f2e7c8;
  border-radius: 8px;
  background: #fbf6e6;
  color: #b8781e;
  font-size: 12px;
  line-height: 1.3;
}

#files-source-panel .file-upload-warning::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid #e0b96c;
  margin-right: 8px;
  font-size: 10px;
  font-weight: 700;
}

#files-source-panel .file-upload-form {
  margin: 0;
}

#files-source-panel .upload-box {
  width: 100%;
  min-height: 168px;
  border-radius: 8px;
  border: 1px dashed #d8d9e2;
  background: #f7f7fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
}

#files-source-panel .upload-box-icon {
  font-size: 20px;
  line-height: 1;
  color: #8a8a95;
  margin-bottom: 6px;
}

#files-source-panel .upload-box strong {
  font-size: 17px;
  line-height: 1.3;
  color: #474753;
  font-weight: 600;
}

#files-source-panel .upload-box span {
  font-size: 12px;
  color: #6f707b;
}

#files-source-panel #file-sources-block {
  margin-top: 22px;
}

#files-source-panel #file-sources-block .text-sources-toolbar h3 {
  font-size: 39px;
  line-height: 1.2;
  margin: 0;
}

#files-source-panel #file-sources-block .text-sources-actions {
  gap: 10px;
}

#files-source-panel #file-sources-block .search-input {
  height: 36px;
  border-radius: 10px;
  font-size: 14px;
}

#files-source-panel #file-sources-block .sort-chip {
  height: 36px;
  border-radius: 10px;
  font-size: 14px;
}

#files-source-panel #file-sources-block .selection-row {
  margin: 8px 0 4px;
}

#files-source-panel #file-sources-block .select-all-toggle {
  font-size: 14px;
}

/* === Files White Theme + Column Width + Button Leaning === */
#data-sources-panel,
#data-sources-panel .source-page-layout,
#data-sources-panel .source-page-main,
#data-sources-panel .source-card,
#data-sources-panel .source-summary-sidebar,
#data-sources-panel .source-summary-sidebar .limit-card,
#files-source-panel #file-sources-block,
#files-source-panel .text-source-list {
  background: #ffffff;
}

#data-sources-panel .source-page-layout {
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 22px;
}

#data-sources-panel .source-page-sidebar {
  border-left: 1px solid #ececf1;
  padding-left: 16px;
}

#files-source-panel .source-card,
#data-sources-panel .source-summary-sidebar,
#data-sources-panel .source-summary-sidebar .limit-card,
#files-source-panel .upload-box,
#files-source-panel .file-upload-warning,
#data-sources-panel .source-warning,
#data-sources-panel .summary-pill {
  border-color: #e6e6ee;
}

#files-source-panel .file-upload-warning,
#data-sources-panel .source-warning {
  background: #ffffff;
  color: #6a6a74;
}

#files-source-panel .file-upload-warning::before {
  border-color: #cfd1dc;
  color: #8a8d9a;
}

#files-source-panel .upload-box {
  width: min(560px, 100%);
  min-height: 206px;
  padding: 20px;
  border-radius: 10px;
  background: #fbfbfd;
}

#files-source-panel .upload-box strong {
  font-size: 15px;
}

#files-source-panel .upload-box span {
  font-size: 12px;
}

#data-sources-panel .source-summary-sidebar .button-full {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
  padding: 0 14px;
}

#data-sources-panel .summary-pill {
  min-height: 40px;
}

@media (max-width: 1200px) {
  #data-sources-panel .source-page-layout {
    grid-template-columns: 1fr;
  }

  #data-sources-panel .source-page-sidebar {
    border-left: 0;
    padding-left: 0;
  }
}

/* === Files Final User Fix: No Cream + Wider Sidebar + Lean Button === */
.dashboard-body,
.agent-shell,
.agent-main,
#data-sources-panel,
#data-sources-panel .source-page-layout,
#files-source-panel .source-page-main,
#files-source-panel .source-card,
#files-source-panel #file-sources-block,
#files-source-panel .text-source-list,
#files-source-panel .source-summary-sidebar,
#files-source-panel .source-summary-sidebar .limit-card,
#files-source-panel .source-warning,
#files-source-panel .file-upload-warning {
  background: #ffffff !important;
}

#data-sources-panel .source-page-layout {
  grid-template-columns: minmax(0, 1fr) 372px !important;
  gap: 20px;
}

#data-sources-panel .source-page-sidebar {
  padding-left: 18px;
}

#files-source-panel .upload-box {
  width: min(520px, 100%);
  min-height: 228px;
}

#files-source-panel .source-summary-sidebar .button-full {
  width: 100%;
  height: 34px !important;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 1200px) {
  #data-sources-panel .source-page-layout {
    grid-template-columns: 1fr !important;
  }
}

/* === Files Upload Box Centering === */
#files-source-panel .file-upload-form {
  display: flex;
  justify-content: center;
}

#files-source-panel .upload-box {
  margin-left: auto;
  margin-right: auto;
}

/* === Website Source Panel Refresh (Chatbase-like) === */
#website-source-panel .source-page-header h3 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

#website-source-panel .source-page-header p {
  margin: 0;
  font-size: 14px;
  color: #666773;
  line-height: 1.45;
}

#website-source-panel .source-card {
  border: 1px solid #e6e6ee;
  border-radius: 10px;
  background: #fff;
  padding: 16px;
}

#website-source-panel .website-builder-header {
  margin: 0 0 10px;
}

#website-source-panel .website-builder-header strong {
  font-size: 33px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

#website-source-panel .website-mode-tabs {
  gap: 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ececf1;
}

#website-source-panel .website-mode-tab {
  padding: 0 0 10px;
  color: #7a7a84;
  font-size: 14px;
  font-weight: 600;
}

#website-source-panel .website-mode-tab.active {
  color: #1f1f26;
  box-shadow: inset 0 -2px 0 #1f1f26;
}

#website-source-panel .stack-form {
  gap: 12px;
}

#website-source-panel label {
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

#website-source-panel .url-input {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #dfe1e9;
  background: #fff;
  gap: 8px;
  padding: 0 10px;
}

#website-source-panel .url-input span {
  color: #61626c;
  font-size: 14px;
}

#website-source-panel .url-input input {
  font-size: 14px;
}

#website-source-panel .website-note {
  border: 1px solid #ececf1;
  border-radius: 8px;
  background: #f7f7fa;
  padding: 10px 12px;
  font-size: 13px;
  color: #62646e;
  line-height: 1.35;
}

#website-source-panel .website-note::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 999px;
  border: 1px solid #bfc2cf;
  color: #737687;
  font-size: 10px;
  font-weight: 700;
}

#website-source-panel .website-actions {
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

#website-source-panel .website-actions .button {
  border-radius: 10px;
  min-height: 38px;
  font-size: 14px;
}

#website-source-panel .text-sources-toolbar h3 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0;
}

#website-source-panel .text-sources-actions {
  gap: 10px;
}

#website-source-panel .search-input,
#website-source-panel .sort-chip {
  min-height: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 14px;
}

#website-source-panel .selection-row {
  margin: 8px 0 4px;
}

#website-source-panel .select-all-toggle {
  font-size: 14px;
}
