:root {
  color-scheme: light dark;
  --brand-green: #2f5b4f;
  --brand-green-dark: #1c3f36;
  --brand-green-soft: #e6eee8;
  --brand-teal-deep: #1c1a17;
  --brand-teal-mid: #2f5b4f;
  --accent-purple: #6e5a8a;
  --accent-orange: #c0512f;
  --accent-pink: #b16c58;
  --accent-blue: #34515f;
  --ink: #1c1a17;
  --slate: #3f3a34;
  --steel: #665d55;
  --stone: #8a817a;
  --hairline: #e6ded2;
  --hairline-strong: #d4c4af;
  --surface-feature: #f3eadf;
  --on-primary: #fff7ed;
  --on-dark: #fff7ed;
  --bg: #faf7f2;
  --surface: #fffaf3;
  --surface-soft: #f3eadf;
  --line: #e5d8c7;
  --line-strong: #cbb89f;
  --text: #1c1a17;
  --muted: #665d55;
  --faint: #9a8f84;
  --blue: #34515f;
  --blue-dark: #1f333d;
  --blue-soft: #e8eef0;
  --teal: #2f5b4f;
  --teal-soft: #e6eee8;
  --coral: #c0512f;
  --coral-soft: #f6e3d6;
  --green: #2f5b4f;
  --green-bg: #e6eee8;
  --amber: #9a4f16;
  --amber-bg: #f7ead7;
  --danger: #b03a2d;
  --shadow-sm: 0 1px 2px 0 rgb(61 45 28 / 0.05);
  --shadow: 0 14px 34px rgb(61 45 28 / 0.08), 0 2px 8px rgb(61 45 28 / 0.05);
  --shadow-lg: 0 24px 60px rgb(61 45 28 / 0.11), 0 8px 18px rgb(61 45 28 / 0.06);
  --shadow-xl: 0 32px 80px rgb(61 45 28 / 0.16);
  --radius: 12px;
  --font-body: "Avenir Next", "Sohne", "Geist", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "New York", "Iowan Old Style", "Editorial New", Georgia, "Times New Roman", serif;
  --glass: rgba(255, 250, 243, 0.78);
  --glass-border: rgba(229, 216, 199, 0.74);
}

/* Final interaction polish: keep the editor static, readable, and clearly conversational. */
html body[data-has-docs="true"] .app-shell,
html body[data-has-docs="true"] .workspace,
html body[data-has-docs="true"] .preview-shell,
html body[data-has-docs="true"] .preview-stage,
html body[data-has-docs="true"] .inspector,
html body[data-has-docs="true"] .agent-panel,
html body[data-has-docs="true"] .workspace-actions,
html body[data-has-docs="true"] .editor-tools,
html body[data-has-docs="true"] .preview-toolbar {
  transition: none !important;
  animation: none !important;
}

html body[data-has-docs="true"] .sidebar-resizer {
  width: 2px !important;
  background: rgba(216, 183, 122, 0.32) !important;
  box-shadow: none !important;
  opacity: 0.72 !important;
}

html body[data-has-docs="true"] .sidebar-resizer::after {
  display: none !important;
}

html body[data-has-docs="true"] .agent-session {
  gap: 14px !important;
}

html body[data-has-docs="true"] .agent-message {
  margin: 0 22px 14px 0 !important;
  padding: 14px 15px !important;
  border-radius: 12px !important;
  background: #201812 !important;
  border: 1px solid #4a3827 !important;
  border-left: 3px solid #d8b77a !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .agent-message.user {
  margin: 0 0 14px 34px !important;
  background: #efbd6b !important;
  border-color: #efbd6b !important;
  border-left-color: #101827 !important;
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-message > span {
  display: inline-flex !important;
  width: auto !important;
  min-height: 24px !important;
  padding: 3px 8px !important;
  margin-bottom: 8px !important;
  border-radius: 999px !important;
  background: rgba(216, 183, 122, 0.14) !important;
  color: #f5ad6b !important;
  letter-spacing: 0.04em !important;
}

html body[data-has-docs="true"] .agent-message.user > span {
  background: rgba(16, 24, 39, 0.14) !important;
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-message strong,
html body[data-has-docs="true"] .agent-message p {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-message.user strong,
html body[data-has-docs="true"] .agent-message.user p {
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-runtime-strip {
  gap: 8px !important;
}

html body[data-has-docs="true"] .agent-runtime-strip span {
  min-width: 0 !important;
  border-radius: 10px !important;
  background: #201812 !important;
  border-color: #4a3827 !important;
}

html body[data-has-docs="true"] .agent-runtime-strip em {
  max-width: 9ch !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"] .agent-message {
    margin-right: 8px !important;
  }

  html body[data-has-docs="true"] .agent-message.user {
    margin-left: 18px !important;
  }
}

/* True final BitePDF editor logo crop guard. */
html body .brand-logo-full {
  display: block !important;
  width: 138px !important;
  height: 46px !important;
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0 !important;
}

@media (max-width: 760px) {
  html body .brand-logo-full {
    width: 132px !important;
    height: 44px !important;
  }
}

/* Final rail/chat layout override. Keep this last so older theme layers cannot reintroduce spacing. */
:root {
  --agent-rail-width: clamp(410px, 30vw, 560px);
}

@media (min-width: 981px) {
  body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(0, 1fr) 8px var(--agent-rail-width) !important;
  }

  body[data-has-docs="true"] .sidebar-resizer {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 8px !important;
    min-width: 8px !important;
    cursor: col-resize !important;
    background: rgba(216, 183, 122, 0.16) !important;
    border-left: 1px solid rgba(216, 183, 122, 0.26) !important;
    border-right: 1px solid rgba(216, 183, 122, 0.26) !important;
    z-index: 35 !important;
  }

  body[data-has-docs="true"] .sidebar-resizer::after {
    content: "";
    position: sticky;
    top: 50%;
    display: block;
    width: 3px;
    height: 46px;
    margin: calc(50vh - 80px) auto 0;
    border-radius: 999px;
    background: rgba(216, 183, 122, 0.78);
  }

  body[data-has-docs="true"] .inspector {
    grid-column: 3 !important;
    width: var(--agent-rail-width) !important;
    min-width: 360px !important;
    max-width: 760px !important;
  }
}

@media (max-width: 980px) {
  body[data-has-docs="true"] .sidebar-resizer {
    display: none !important;
  }
}

body[data-has-docs="true"] .top-actions .recompress-action {
  display: none !important;
}

body[data-has-docs="true"] .top-actions .subscribe-action {
  display: inline-flex !important;
}

body[data-has-docs="true"] .agent-session {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding-bottom: 0 !important;
}

body[data-has-docs="true"] .agent-ai-box {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 18 !important;
  margin-top: 8px !important;
  padding: 12px !important;
  border-radius: 18px !important;
  background: #1a130e !important;
  border-color: #5b452d !important;
  box-shadow: 0 -18px 34px rgba(12, 10, 8, 0.72) !important;
}

body[data-has-docs="true"] .agent-ai-box textarea {
  min-height: 88px !important;
  max-height: 132px !important;
  resize: vertical !important;
}

body[data-has-docs="true"] .agent-composer-actions {
  gap: 8px !important;
  margin-top: 8px !important;
}

body[data-has-docs="true"] .agent-screenshot-state {
  margin: 6px 0 0 !important;
  font-size: 0.86rem !important;
}

body[data-has-docs="true"] .agent-support-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(216, 183, 122, 0.22) !important;
  font-size: 0.88rem !important;
}

body[data-has-docs="true"] .agent-support-strip button {
  padding: 6px 10px !important;
  border-radius: 10px !important;
  background: #fffaf2 !important;
  color: #101827 !important;
}

body[data-has-docs="true"] .workspace,
body[data-has-docs="true"] .preview-stage,
body[data-has-docs="true"] .preview-shell {
  background-color: #2a2118 !important;
}

body[data-has-docs="true"] .preview-shell {
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

/* Final restored-export cascade guard. This must remain after older theme layers. */
html body[data-has-result="true"][data-has-source-docs="false"] {
  color: #fff7ed !important;
  background: #0f0c09 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .topbar,
html body[data-has-result="true"][data-has-source-docs="false"] .workspace,
html body[data-has-result="true"][data-has-source-docs="false"] .preview-toolbar,
html body[data-has-result="true"][data-has-source-docs="false"] .workspace-actions,
html body[data-has-result="true"][data-has-source-docs="false"] .status-strip,
html body[data-has-result="true"][data-has-source-docs="false"] .inspector {
  color: #fff7ed !important;
  background: #0f0c09 !important;
  border-color: #4a3827 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .brand,
html body[data-has-result="true"][data-has-source-docs="false"] .brand span {
  color: #fff7ed !important;
  opacity: 1 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .brand strong {
  color: #efbd6b !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .brand-mark {
  background: #fff7ed !important;
  border-color: rgba(239, 189, 107, 0.56) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .preview-stage,
html body[data-has-result="true"][data-has-source-docs="false"] .preview-shell {
  background-color: #211912 !important;
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-panel {
  color: #fff7ed !important;
  background:
    linear-gradient(135deg, rgba(168, 238, 224, 0.1), transparent 36%),
    #19130e !important;
  border-color: #4a3827 !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34) !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-panel h2,
html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats b {
  color: #fff7ed !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-copy,
html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats small {
  color: #d9c8b4 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-filename,
html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats span {
  color: #a8eee0 !important;
  background: rgba(168, 238, 224, 0.08) !important;
  border-color: rgba(168, 238, 224, 0.28) !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-icon,
html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-actions .secondary-action {
  color: #fff7ed !important;
  background: #241b13 !important;
  border-color: #4a3827 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-actions .primary-action {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
  box-shadow: none !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-panel,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-message,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-work-card,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-thinking,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-memory,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-ai-box,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-ai-result,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-runtime-strip span {
  color: #fff7ed !important;
  background: #19130e !important;
  border-color: #4a3827 !important;
  box-shadow: none !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-panel p,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-message p,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-work-card > p,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-screenshot-state,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-support-strip,
html body[data-has-result="true"][data-has-source-docs="false"] .hint {
  color: #d9c8b4 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-panel strong,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-work-head strong,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-ai-head strong,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-runtime-strip em,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-head strong {
  color: #fff7ed !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-message > span,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-work-head > span,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-runtime-strip b,
html body[data-has-result="true"][data-has-source-docs="false"] .eyebrow {
  color: #efbd6b !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-ai-box textarea,
html body[data-has-result="true"][data-has-source-docs="false"] textarea,
html body[data-has-result="true"][data-has-source-docs="false"] input,
html body[data-has-result="true"][data-has-source-docs="false"] select {
  color: #fff7ed !important;
  background: #0f0c09 !important;
  border-color: #4a3827 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-composer-actions button,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-support-strip button {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
}

/* BitePDF cohesion repair: keep pricing and restored-export screens in the same dark product system. */
:root {
  --bite-bg: #0f0c09;
  --bite-panel: #19130e;
  --bite-panel-2: #241b13;
  --bite-line: #4a3827;
  --bite-line-soft: rgba(216, 183, 122, 0.24);
  --bite-text: #fff7ed;
  --bite-muted: #d9c8b4;
  --bite-faint: #a99a87;
  --bite-gold: #d8b77a;
  --bite-gold-strong: #efbd6b;
  --bite-teal: #a8eee0;
  --bite-ink: #11100e;
}

.pricing-page {
  color-scheme: dark;
  min-height: 100vh;
  color: var(--bite-text);
  background:
    radial-gradient(circle at 78% 8%, rgba(168, 238, 224, 0.12), transparent 28rem),
    linear-gradient(rgba(216, 183, 122, 0.07) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(216, 183, 122, 0.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, #110d0a 0%, #18120e 54%, #0f0c09 100%) !important;
}

.pricing-header {
  color: var(--bite-text) !important;
  background: rgba(15, 12, 9, 0.92) !important;
  border-bottom: 1px solid var(--bite-line) !important;
  backdrop-filter: blur(18px);
}

.pricing-header .seo-brand,
.pricing-header .seo-brand strong,
.pricing-header .seo-brand span,
.pricing-header .seo-nav,
.pricing-header .seo-nav a {
  color: var(--bite-text) !important;
  opacity: 1 !important;
}

.pricing-header .seo-brand strong {
  color: var(--bite-gold-strong) !important;
}

.pricing-header .seo-brand-mark,
.seo-brand-mark,
.brand-mark {
  background: #fff7ed !important;
  border: 1px solid rgba(239, 189, 107, 0.56) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
  opacity: 1 !important;
}

.pricing-header .seo-brand-mark img,
.seo-brand-mark img,
.brand-mark img {
  opacity: 1 !important;
  filter: none !important;
}

.pricing-header .seo-login,
.pricing-page .seo-login {
  color: var(--bite-ink) !important;
  background: var(--bite-gold) !important;
  border-color: var(--bite-gold-strong) !important;
  box-shadow: none !important;
}

.pricing-page .seo-section-kicker {
  color: var(--bite-gold-strong) !important;
}

.pricing-hero {
  max-width: 1120px !important;
  padding: clamp(42px, 7vw, 88px) 0 30px !important;
}

.pricing-hero h1 {
  max-width: 820px !important;
  color: var(--bite-text) !important;
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 78px) !important;
  font-weight: 700 !important;
  line-height: 0.96 !important;
}

.pricing-hero p,
.pricing-preview-card p,
.pricing-launch-offer p:not(.seo-section-kicker),
.pricing-plan p,
.pricing-advisor-grid small,
.pricing-faq p {
  color: var(--bite-muted) !important;
}

.pricing-preview-card,
.pricing-launch-offer,
.pricing-plan,
.pricing-advisor-grid a,
.pricing-faq article {
  color: var(--bite-text) !important;
  background:
    linear-gradient(135deg, rgba(216, 183, 122, 0.1), transparent 38%),
    var(--bite-panel) !important;
  border: 1px solid var(--bite-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2) !important;
}

.pricing-preview-card {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.56fr) auto !important;
  padding: clamp(20px, 3vw, 30px) !important;
}

.pricing-card-label,
.pricing-plan-head span,
.pricing-plan-head small,
.pricing-advisor-grid span {
  color: var(--bite-gold-strong) !important;
}

.pricing-preview-card h2,
.pricing-launch-offer h2,
.pricing-plan-head strong,
.pricing-advisor-grid strong,
.pricing-section-title h2,
.pricing-faq h3 {
  color: var(--bite-text) !important;
}

.pricing-preview-card ul,
.pricing-plan ul {
  gap: 8px !important;
}

.pricing-preview-card li,
.pricing-plan li {
  display: block !important;
  padding-left: 0 !important;
  color: var(--bite-text) !important;
}

.pricing-preview-card li::before,
.pricing-plan li::before,
.pricing-plan-card li::before,
.pricing-choice-card li::before {
  display: none !important;
}

.pricing-preview-card a,
.pricing-launch-offer a,
.pricing-plan a,
.pricing-checkout-button {
  color: var(--bite-ink) !important;
  background: var(--bite-gold) !important;
  border: 1px solid var(--bite-gold-strong) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

.pricing-paid-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  padding: 18px 0 44px !important;
}

.pricing-plan {
  min-height: 0 !important;
}

.pricing-plan.featured {
  border-color: rgba(168, 238, 224, 0.66) !important;
  box-shadow:
    0 0 0 1px rgba(168, 238, 224, 0.28),
    0 28px 80px rgba(0, 0, 0, 0.28) !important;
}

.pricing-plan-head b,
.pricing-plan-promo {
  color: var(--bite-teal) !important;
  background: rgba(168, 238, 224, 0.09) !important;
  border-color: rgba(168, 238, 224, 0.28) !important;
}

.pricing-compare,
.pricing-faq {
  color: var(--bite-text) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.pricing-advisor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.pricing-faq-list {
  gap: 14px !important;
}

.pricing-choice,
.pricing-launch-offer,
.pricing-paid-grid,
.pricing-compare,
.pricing-faq {
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

body[data-has-result="true"][data-has-source-docs="false"] {
  color: var(--bite-text) !important;
  background: var(--bite-bg) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .topbar,
body[data-has-result="true"][data-has-source-docs="false"] .workspace,
body[data-has-result="true"][data-has-source-docs="false"] .preview-toolbar,
body[data-has-result="true"][data-has-source-docs="false"] .workspace-actions,
body[data-has-result="true"][data-has-source-docs="false"] .status-strip,
body[data-has-result="true"][data-has-source-docs="false"] .inspector {
  color: var(--bite-text) !important;
  background: var(--bite-bg) !important;
  border-color: var(--bite-line) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .brand,
body[data-has-result="true"][data-has-source-docs="false"] .brand span {
  color: var(--bite-text) !important;
  opacity: 1 !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .brand strong {
  color: var(--bite-gold-strong) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .preview-stage,
body[data-has-result="true"][data-has-source-docs="false"] .preview-shell {
  background-color: #211912 !important;
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .restored-export-panel {
  color: var(--bite-text) !important;
  background:
    linear-gradient(135deg, rgba(168, 238, 224, 0.1), transparent 36%),
    var(--bite-panel) !important;
  border-color: var(--bite-line) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .restored-export-panel h2,
body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats b {
  color: var(--bite-text) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .restored-export-copy,
body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats small {
  color: var(--bite-muted) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .restored-export-filename,
body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats span {
  color: var(--bite-teal) !important;
  background: rgba(168, 238, 224, 0.08) !important;
  border-color: rgba(168, 238, 224, 0.28) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .restored-export-icon,
body[data-has-result="true"][data-has-source-docs="false"] .restored-export-actions .secondary-action {
  color: var(--bite-text) !important;
  background: var(--bite-panel-2) !important;
  border-color: var(--bite-line) !important;
}

body[data-has-result="true"][data-has-source-docs="false"] .restored-export-actions .primary-action {
  color: var(--bite-ink) !important;
  background: var(--bite-gold) !important;
  border-color: var(--bite-gold-strong) !important;
  box-shadow: none !important;
}

@media (max-width: 980px) {
  .pricing-preview-card,
  .pricing-paid-grid,
  .pricing-advisor-grid,
  .pricing-faq-list {
    grid-template-columns: 1fr !important;
  }

  .pricing-preview-card a,
  .pricing-launch-offer a {
    justify-self: start !important;
  }
}

@media (max-width: 680px) {
  .pricing-header {
    grid-template-columns: 1fr auto !important;
  }

  .pricing-hero h1 {
    font-size: clamp(38px, 12vw, 58px) !important;
  }
}

/* EOF mobile uploaded-state override. Must stay last: phones default to readable light after upload. */
@media (max-width: 760px) {
  body[data-has-docs="true"] .topbar,
  body[data-has-docs="true"] .workspace,
  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .preview-stage,
  body[data-has-docs="true"] .preview-shell,
  body[data-has-docs="true"] .status-strip {
    color: #111827 !important;
    background-color: #fffaf2 !important;
    background-image:
      linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px) !important;
    border-color: #dfd0b9 !important;
  }

  body[data-has-docs="true"] .workspace {
    padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions {
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  body[data-has-docs="true"] .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    overflow: visible !important;
  }

  body[data-has-docs="true"] .workspace-actions > button:nth-of-type(n + 5) {
    display: none !important;
  }

  body[data-has-docs="true"] .workspace-actions button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 46px !important;
    padding: 0 4px !important;
    overflow: hidden !important;
    color: #111827 !important;
    background: #fffdfa !important;
    border-color: #d9c8ac !important;
    font-size: 0 !important;
    white-space: nowrap !important;
  }

  body[data-has-docs="true"] .workspace-actions button::after {
    content: attr(data-short-label) !important;
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #111827 !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  body[data-has-docs="true"] .workspace-actions button.active::after {
    color: #fffaf2 !important;
  }

  body[data-has-docs="true"] .workspace-more {
    display: block !important;
    grid-column: span 4 !important;
  }

  body[data-has-docs="true"] .workspace-more summary {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    color: #111827 !important;
    background: #f4ead9 !important;
    border-color: #d9c8ac !important;
    font-size: 13px !important;
  }

  body[data-has-docs="true"] .multi-doc-card {
    color: #111827 !important;
    background: #fffdfa !important;
    border-color: #d9c8ac !important;
  }
}
*** End of File

/* EOF mobile uploaded-state override. Must stay last: phones default to readable light after upload. */
@media (max-width: 760px) {
  body[data-has-docs="true"] .topbar,
  body[data-has-docs="true"] .workspace,
  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .preview-stage,
  body[data-has-docs="true"] .preview-shell,
  body[data-has-docs="true"] .status-strip {
    color: #111827 !important;
    background-color: #fffaf2 !important;
    background-image:
      linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px) !important;
    border-color: #dfd0b9 !important;
  }

  body[data-has-docs="true"] .workspace {
    padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions {
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  body[data-has-docs="true"] .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    overflow: visible !important;
  }

  body[data-has-docs="true"] .workspace-actions > button:nth-of-type(n + 5) {
    display: none !important;
  }

  body[data-has-docs="true"] .workspace-actions button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 46px !important;
    padding: 0 4px !important;
    overflow: hidden !important;
    color: #111827 !important;
    background: #fffdfa !important;
    border-color: #d9c8ac !important;
    font-size: 0 !important;
    white-space: nowrap !important;
  }

  body[data-has-docs="true"] .workspace-actions button::after {
    content: attr(data-short-label) !important;
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #111827 !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  body[data-has-docs="true"] .workspace-actions button.active::after {
    color: #fffaf2 !important;
  }

  body[data-has-docs="true"] .workspace-more {
    display: block !important;
    grid-column: span 4 !important;
  }

  body[data-has-docs="true"] .workspace-more summary {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    color: #111827 !important;
    background: #f4ead9 !important;
    border-color: #d9c8ac !important;
    font-size: 13px !important;
  }

  body[data-has-docs="true"] .multi-doc-card {
    color: #111827 !important;
    background: #fffdfa !important;
    border-color: #d9c8ac !important;
  }
}

/* Absolute final mobile readability guard: mobile starts light, uploaded preview stays spacious, labels never collide. */
@media (max-width: 760px) {
  body[data-has-docs="true"] .topbar,
  body[data-has-docs="true"] .workspace,
  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .preview-stage,
  body[data-has-docs="true"] .preview-shell,
  body[data-has-docs="true"] .status-strip {
    color: #111827 !important;
    background-color: #fffaf2 !important;
    background-image:
      linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px) !important;
    border-color: #dfd0b9 !important;
  }

  body[data-has-docs="true"] .workspace {
    padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions {
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  body[data-has-docs="true"] .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    overflow: visible !important;
  }

  body[data-has-docs="true"] .workspace-actions > button:nth-of-type(n + 5) {
    display: none !important;
  }

  body[data-has-docs="true"] .workspace-actions button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 46px !important;
    padding: 0 4px !important;
    overflow: hidden !important;
    color: #111827 !important;
    background: #fffdfa !important;
    border-color: #d9c8ac !important;
    font-size: 0 !important;
    white-space: nowrap !important;
  }

  body[data-has-docs="true"] .workspace-actions button::after {
    content: attr(data-short-label) !important;
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #111827 !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  body[data-has-docs="true"] .workspace-actions button.active::after {
    color: #fffaf2 !important;
  }

  body[data-has-docs="true"] .workspace-more {
    display: block !important;
    grid-column: span 4 !important;
  }

  body[data-has-docs="true"] .workspace-more summary {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    color: #111827 !important;
    background: #f4ead9 !important;
    border-color: #d9c8ac !important;
    font-size: 13px !important;
  }

  body[data-has-docs="true"] .multi-doc-card {
    color: #111827 !important;
    background: #fffdfa !important;
    border-color: #d9c8ac !important;
  }
}

/* Mobile runtime hardening: default to readable light app surfaces, compact actions, stable processing card. */
@media (max-width: 760px) {
  body:not([data-has-docs="true"]) .inspector {
    display: none !important;
  }

  body:not([data-has-docs="true"]) .drop-panel {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
  }

  body:not([data-has-docs="true"]) .drop-panel h2,
  body:not([data-has-docs="true"]) .drop-panel p,
  body:not([data-has-docs="true"]) .mobile-promise {
    color: #101827 !important;
  }

  body:not([data-has-docs="true"]) .drop-panel p,
  body:not([data-has-docs="true"]) .mobile-promise {
    opacity: 0.78 !important;
  }

  body:not([data-has-docs="true"]) .quick-action-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:not([data-has-docs="true"]) .quick-action-strip span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-has-docs="true"] {
    color: #101827 !important;
    background: #f8f2e8 !important;
  }

  body[data-has-docs="true"] .topbar,
  body[data-has-docs="true"] .workspace,
  body[data-has-docs="true"] .preview-shell,
  body[data-has-docs="true"] .preview-stage {
    color: #101827 !important;
    background-color: #f8f2e8 !important;
  }

  body[data-has-docs="true"] .preview-shell {
    background-image:
      linear-gradient(rgba(124, 139, 161, 0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(124, 139, 161, 0.12) 1px, transparent 1px) !important;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .status-strip,
  body[data-has-docs="true"] .multi-doc-card {
    color: #101827 !important;
    background: rgba(255, 250, 242, 0.96) !important;
    border-color: #d8c7aa !important;
  }

  body[data-has-docs="true"] .preview-toolbar p,
  body[data-has-docs="true"] .status-strip,
  body[data-has-docs="true"] .multi-doc-select small {
    color: #5f6b7a !important;
  }

  body[data-has-docs="true"] .preview-toolbar strong,
  body[data-has-docs="true"] .multi-doc-select strong {
    color: #101827 !important;
  }

  body[data-has-docs="true"] .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
    overflow: visible !important;
    max-height: none !important;
  }

  body[data-has-docs="true"] .workspace-actions > button:nth-of-type(n + 5) {
    display: none !important;
  }

  body[data-has-docs="true"] .workspace-more {
    display: block !important;
    grid-column: 1 / -1 !important;
  }

  body[data-has-docs="true"] .workspace-actions button,
  body[data-has-docs="true"] .workspace-more summary {
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    justify-content: center !important;
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body[data-has-docs="true"] .workspace-actions button::after {
    content: none !important;
  }

  body[data-has-docs="true"] .workspace-more summary {
    width: 100% !important;
  }

  body[data-has-docs="true"] .workspace-actions button.active,
  body[data-has-docs="true"] .workspace-more[open] summary {
    color: #fffaf2 !important;
    background: #101827 !important;
    border-color: #101827 !important;
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .multi-doc-strip {
    display: none !important;
  }

  body[data-has-docs="true"] .preview-toolbar {
    gap: 8px !important;
    padding: 10px !important;
  }

  body[data-has-docs="true"] .zoom-controls {
    gap: 6px !important;
    justify-content: end !important;
  }

  body[data-has-docs="true"] .zoom-controls button,
  body[data-has-docs="true"] .zoom-reset-button,
  body[data-has-docs="true"] .text-tool-button {
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 10px !important;
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
  }

  .mobile-processing-overlay {
    z-index: 2200 !important;
    padding: 22px !important;
    background: rgba(15, 18, 25, 0.44) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
  }

  .mobile-processing-card {
    width: min(360px, calc(100vw - 44px)) !important;
    min-height: 0 !important;
    gap: 18px !important;
    padding: 30px 24px !important;
    border-radius: 26px !important;
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
  }

  .mobile-processing-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px 14px !important;
  }

  .mobile-processing-copy strong {
    color: #101827 !important;
    font-size: 20px !important;
  }

  .mobile-processing-copy span {
    color: #315bf5 !important;
    font-size: 30px !important;
  }

  .mobile-processing-card p {
    max-width: 28ch !important;
    color: #5f6b7a !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
}

/* Absolute final light-mode contrast guard.
   Earlier document-loaded layers intentionally darken the workspace; in light mode,
   the agent composer and export modal must remain high-contrast and readable. */
@media (prefers-color-scheme: light) {
  html body[data-has-docs="true"] {
    color: #101827 !important;
    background: #f8f2e8 !important;
  }

  html body[data-has-docs="true"] .topbar,
  html body[data-has-docs="true"] .top-actions,
  html body[data-has-docs="true"] .workspace-toolbar,
  html body[data-has-docs="true"] .preview-header,
  html body[data-has-docs="true"] .workspace-actions,
  html body[data-has-docs="true"] .inspector,
  html body[data-has-docs="true"] .agent-panel {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d7c2a1 !important;
  }

  html body[data-has-docs="true"] .brand,
  html body[data-has-docs="true"] .brand span,
  html body[data-has-docs="true"] .top-actions button,
  html body[data-has-docs="true"] .workspace-actions button,
  html body[data-has-docs="true"] .workspace-more summary,
  html body[data-has-docs="true"] .icon-button,
  html body[data-has-docs="true"] .zoom-reset-button,
  html body[data-has-docs="true"] .text-tool-button,
  html body[data-has-docs="true"] .agent-panel button,
  html body[data-has-docs="true"] .agent-panel label,
  html body[data-has-docs="true"] .agent-panel p,
  html body[data-has-docs="true"] .agent-panel span {
    color: #101827 !important;
  }

  html body[data-has-docs="true"] .workspace-actions button,
  html body[data-has-docs="true"] .workspace-more summary,
  html body[data-has-docs="true"] .top-actions button,
  html body[data-has-docs="true"] .agent-panel button {
    background: #fffdf8 !important;
    border-color: #bba47d !important;
  }

  html body[data-has-docs="true"] .workspace-actions button.active,
  html body[data-has-docs="true"] .workspace-actions button:hover,
  html body[data-has-docs="true"] .top-actions .download-action,
  html body[data-has-docs="true"] .agent-panel button.active,
  html body[data-has-docs="true"] .agent-panel button:hover {
    color: #fffaf2 !important;
    background: #101827 !important;
    border-color: #101827 !important;
  }

  html body[data-has-docs="true"] .agent-message,
  html body[data-has-docs="true"] .agent-work-card,
  html body[data-has-docs="true"] .agent-thinking,
  html body[data-has-docs="true"] .agent-memory,
  html body[data-has-docs="true"] .agent-ai-result,
  html body[data-has-docs="true"] .agent-ai-box,
  html body[data-has-docs="true"] .setting-block {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d7c2a1 !important;
    box-shadow: 0 12px 28px rgba(54, 38, 18, 0.1) !important;
  }

  html body[data-has-docs="true"] .agent-message.user {
    color: #101827 !important;
    background: #f0b86f !important;
    border-color: #d59650 !important;
  }

  html body[data-has-docs="true"] .agent-message strong,
  html body[data-has-docs="true"] .agent-work-head strong,
  html body[data-has-docs="true"] .agent-ai-box strong,
  html body[data-has-docs="true"] .setting-block strong {
    color: #101827 !important;
  }

  html body[data-has-docs="true"] .agent-message p,
  html body[data-has-docs="true"] .agent-work-card > p,
  html body[data-has-docs="true"] .agent-ai-box p,
  html body[data-has-docs="true"] .agent-ai-box label,
  html body[data-has-docs="true"] .agent-support-strip,
  html body[data-has-docs="true"] .agent-screenshot-state,
  html body[data-has-docs="true"] .setting-help {
    color: #4b5563 !important;
  }

  html body[data-has-docs="true"] textarea,
  html body[data-has-docs="true"] input,
  html body[data-has-docs="true"] select,
  html body[data-has-docs="true"] .agent-ai-box textarea,
  html body[data-has-docs="true"] #agentGoalInput {
    color: #101827 !important;
    background: #ffffff !important;
    border-color: #9b8a72 !important;
  }

  html body[data-has-docs="true"] textarea::placeholder,
  html body[data-has-docs="true"] input::placeholder,
  html body[data-has-docs="true"] #agentGoalInput::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
  }
}

/* BitePDF contrast contract: final layer so light and dark modes never inherit pale-on-pale UI. */
@media (prefers-color-scheme: light) {
  body,
  body[data-has-docs="true"] {
    --text: #101827;
    --muted: #4b5563;
    --faint: #667085;
    --surface: #fffaf2;
    --surface-soft: #f4ecdf;
    --line: #d9c8ae;
    color: #101827 !important;
    background: #f7f0e5 !important;
  }

  body[data-has-docs="true"] .topbar,
  body[data-has-docs="true"] .toolbar,
  body[data-has-docs="true"] .top-actions {
    color: #101827 !important;
    background: rgba(255, 250, 242, 0.96) !important;
    border-color: #cdb894 !important;
  }

  body[data-has-docs="true"] .brand,
  body[data-has-docs="true"] .brand span,
  body[data-has-docs="true"] .brand-word,
  body[data-has-docs="true"] .preview-title strong,
  body[data-has-docs="true"] .preview-title span {
    color: #101827 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .brand .brand-accent,
  body[data-has-docs="true"] .brand strong:first-of-type {
    color: #b06b2f !important;
  }

  body[data-has-docs="true"] .tool-button,
  body[data-has-docs="true"] .tool-button.ghost,
  body[data-has-docs="true"] .icon-button,
  body[data-has-docs="true"] .zoom-reset-button,
  body[data-has-docs="true"] .text-tool-button,
  body[data-has-docs="true"] .workspace-actions button,
  body[data-has-docs="true"] .workspace-more summary,
  body[data-has-docs="true"] .workspace-more-menu button,
  body[data-has-docs="true"] .agent-composer-actions button {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #bfa77f !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .tool-button:disabled,
  body[data-has-docs="true"] .icon-button:disabled,
  body[data-has-docs="true"] .workspace-actions button:disabled {
    color: #5b6472 !important;
    background: #eee5d7 !important;
    border-color: #cfbea4 !important;
    opacity: 0.86 !important;
  }

  body[data-has-docs="true"] .workspace-actions button:hover,
  body[data-has-docs="true"] .workspace-actions button.active,
  body[data-has-docs="true"] .workspace-more[open] summary,
  body[data-has-docs="true"] .tool-button.active,
  body[data-has-docs="true"] #agentAiButton,
  body[data-has-docs="true"] .primary-action,
  body[data-has-docs="true"] .download-button {
    color: #fffaf2 !important;
    background: #101827 !important;
    border-color: #101827 !important;
  }

  body[data-has-docs="true"] .workspace,
  body[data-has-docs="true"] .preview-stage,
  body[data-has-docs="true"] .preview-shell {
    color: #101827 !important;
    background-color: #edf2f4 !important;
    background-image:
      linear-gradient(rgba(47, 91, 79, 0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(47, 91, 79, 0.08) 1px, transparent 1px) !important;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .restored-export-card,
  body[data-has-docs="true"] .status-strip,
  body[data-has-docs="true"] .multi-doc-card {
    color: #101827 !important;
    background: rgba(255, 250, 242, 0.98) !important;
    border-color: #cdb894 !important;
  }

  body[data-has-docs="true"] .restored-export-card p,
  body[data-has-docs="true"] .status-strip,
  body[data-has-docs="true"] .preview-toolbar p,
  body[data-has-docs="true"] .multi-doc-select small {
    color: #4b5563 !important;
  }

  body[data-has-docs="true"] .inspector {
    color: #101827 !important;
    background: #f3eadf !important;
    border-color: #cdb894 !important;
  }

  body[data-has-docs="true"] .agent-panel,
  body[data-has-docs="true"] .agent-message,
  body[data-has-docs="true"] .agent-work-card,
  body[data-has-docs="true"] .agent-thinking,
  body[data-has-docs="true"] .agent-memory,
  body[data-has-docs="true"] .agent-ai-result,
  body[data-has-docs="true"] .setting-block {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #cdb894 !important;
  }

  body[data-has-docs="true"] .agent-message.user {
    color: #101827 !important;
    background: #efb267 !important;
    border-color: #d9913f !important;
  }

  body[data-has-docs="true"] .agent-message strong,
  body[data-has-docs="true"] .agent-work-head strong,
  body[data-has-docs="true"] .agent-ai-head strong,
  body[data-has-docs="true"] .agent-head strong,
  body[data-has-docs="true"] .setting-label,
  body[data-has-docs="true"] .tool-readout {
    color: #101827 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .agent-message p,
  body[data-has-docs="true"] .agent-work-card > p,
  body[data-has-docs="true"] .agent-ai-box p,
  body[data-has-docs="true"] .agent-screenshot-state,
  body[data-has-docs="true"] .agent-support-strip,
  body[data-has-docs="true"] .hint {
    color: #4b5563 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .agent-message > span,
  body[data-has-docs="true"] .agent-work-head > span,
  body[data-has-docs="true"] .eyebrow {
    color: #9a4f16 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .agent-ai-box {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #bfa77f !important;
    box-shadow: 0 -16px 34px rgba(54, 38, 18, 0.12) !important;
  }

  body[data-has-docs="true"] textarea,
  body[data-has-docs="true"] input,
  body[data-has-docs="true"] select,
  body[data-has-docs="true"] .agent-ai-box textarea {
    color: #101827 !important;
    background: #ffffff !important;
    border-color: #9b8a72 !important;
  }

  body[data-has-docs="true"] textarea::placeholder,
  body[data-has-docs="true"] input::placeholder {
    color: #667085 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] #agentSignal,
  body[data-has-docs="true"] #agentTierLabel {
    color: #101827 !important;
    background: #e7c57f !important;
    border-color: #bfa77f !important;
  }
}

@media (prefers-color-scheme: dark) {
  body[data-has-docs="true"] .brand,
  body[data-has-docs="true"] .brand span,
  body[data-has-docs="true"] .preview-title strong,
  body[data-has-docs="true"] .agent-message strong,
  body[data-has-docs="true"] .agent-work-head strong,
  body[data-has-docs="true"] .agent-ai-head strong,
  body[data-has-docs="true"] .agent-head strong,
  body[data-has-docs="true"] .tool-readout,
  body[data-has-docs="true"] .setting-label {
    color: #fff7ed !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .agent-message p,
  body[data-has-docs="true"] .agent-work-card > p,
  body[data-has-docs="true"] .agent-ai-box p,
  body[data-has-docs="true"] .agent-screenshot-state,
  body[data-has-docs="true"] .agent-support-strip,
  body[data-has-docs="true"] .hint {
    color: #d7cab7 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .agent-message > span,
  body[data-has-docs="true"] .agent-work-head > span,
  body[data-has-docs="true"] .eyebrow {
    color: #f2a568 !important;
    opacity: 1 !important;
  }

  body[data-has-docs="true"] .tool-button,
  body[data-has-docs="true"] .tool-button.ghost,
  body[data-has-docs="true"] .icon-button,
  body[data-has-docs="true"] .zoom-reset-button,
  body[data-has-docs="true"] .text-tool-button,
  body[data-has-docs="true"] .workspace-actions button,
  body[data-has-docs="true"] .workspace-more summary {
    color: #fff7ed !important;
    background: #17130f !important;
    border-color: #5b452d !important;
    opacity: 1 !important;
  }
}

@media (max-width: 760px) {
  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace-actions {
    max-height: 62px !important;
    overflow: hidden !important;
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace-actions > *:nth-child(n + 5) {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-support-strip {
    display: flex !important;
    justify-content: center !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
    font-size: 12px !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-support-strip span {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-support-strip button {
    display: inline-flex !important;
    width: 100% !important;
    min-height: 40px !important;
    justify-content: center !important;
  }
}

/* Final mobile polish: keep Preview simple and leave full editing controls to Agent/Edit context. */
@media (max-width: 760px) {
  body[data-has-docs="true"][data-mobile-mode="preview"] .viewport-edit-tools {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace-actions button:nth-of-type(n + 5),
  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace-more {
    display: none !important;
  }

  body[data-has-docs="true"] .agent-ai-box {
    padding: 10px !important;
    border-radius: 16px !important;
  }

  body[data-has-docs="true"] .agent-composer-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-has-docs="true"] .agent-screenshot-state {
    display: none !important;
  }

  body[data-has-docs="true"] .agent-support-strip {
    margin-top: 6px !important;
    padding-top: 6px !important;
    font-size: 12px !important;
  }

  body[data-has-docs="true"] .agent-support-strip span {
    display: none !important;
  }

  body[data-has-docs="true"] .agent-support-strip button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Pricing and checkout readability lock: keep warm branding without pale text on pale cards. */
:root {
  --bite-ink: #101827;
  --bite-cream: #fff7ea;
  --bite-paper: #fffaf2;
  --bite-gold: #d8b56f;
  --bite-gold-strong: #a76b2d;
  --bite-night: #17120d;
  --bite-night-2: #21170f;
  --bite-muted: #5d5144;
}

.pricing-page {
  color: var(--bite-ink) !important;
  background:
    linear-gradient(90deg, rgba(216, 183, 122, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(216, 183, 122, 0.08) 1px, transparent 1px),
    #fffaf2 !important;
}

.pricing-page h1,
.pricing-page h2,
.pricing-page h3,
.pricing-page strong,
.pricing-page th,
.pricing-page td,
.pricing-page p,
.pricing-page li,
.pricing-page a,
.pricing-page span,
.pricing-page small {
  color: inherit;
}

.pricing-page p,
.pricing-page small,
.pricing-page td {
  color: #4b5563 !important;
}

.pricing-page h1,
.pricing-page h2,
.pricing-page h3,
.pricing-page strong,
.pricing-page th,
.pricing-plan-head strong {
  color: #101827 !important;
}

.pricing-plan,
.pricing-preview-card,
.pricing-launch-offer,
.pricing-advisor-grid a,
.pricing-faq article,
.pricing-ai,
.pricing-table-wrap {
  background: rgba(255, 250, 242, 0.94) !important;
  border-color: #d8c7aa !important;
  box-shadow: 0 18px 44px rgba(64, 43, 22, 0.08) !important;
}

.pricing-plan.featured {
  border-color: #bd8c43 !important;
  box-shadow: 0 0 0 2px rgba(216, 183, 122, 0.28), 0 22px 54px rgba(64, 43, 22, 0.12) !important;
}

.pricing-checkout-button,
.pricing-plan a,
.pricing-launch-offer a {
  background: #101827 !important;
  color: #fffaf2 !important;
  border-color: #101827 !important;
}

.modal-backdrop .modal {
  background: #fffaf2 !important;
  border: 1px solid #5b452d !important;
  color: #101827 !important;
  box-shadow: 0 34px 120px rgba(9, 7, 5, 0.54) !important;
}

.modal-backdrop .modal-close {
  color: #fffaf2 !important;
  background: #21170f !important;
  border: 1px solid #d8b56f !important;
  box-shadow: 0 14px 30px rgba(23, 18, 13, 0.32) !important;
}

.modal-backdrop .modal-auth {
  color: #fffaf2 !important;
  background: linear-gradient(180deg, #17120d, #1d1510) !important;
  border-color: #5b452d !important;
}

.modal-backdrop .modal-auth h2,
.modal-backdrop .modal-auth strong,
.modal-backdrop .modal-auth label {
  color: #fffaf2 !important;
}

.modal-backdrop .modal-auth p,
.modal-backdrop .modal-auth small {
  color: #d8c9b6 !important;
}

.modal-backdrop .modal-auth input,
.modal-backdrop .modal-auth textarea {
  color: #101827 !important;
  background: #fffaf2 !important;
  border-color: #d8b56f !important;
}

.modal-backdrop .unlock-result,
.modal-backdrop .checkout-stage {
  color: #101827 !important;
  background: #fffaf2 !important;
  border-color: #d8b56f !important;
}

.modal-backdrop .unlock-result span,
.modal-backdrop .unlock-result p,
.modal-backdrop .checkout-stage p {
  color: #3f4b5d !important;
}

.modal-backdrop .unlock-result strong,
.modal-backdrop .checkout-stage strong {
  color: #101827 !important;
}

.modal-backdrop .unlock-result strong.positive {
  color: #0f766e !important;
}

.modal-backdrop .unlock-result strong.negative {
  color: #9a3412 !important;
}

.modal-backdrop .modal-plans {
  color: #101827 !important;
  background: #fffaf2 !important;
}

.modal-backdrop .local-pricing-note,
.modal-backdrop .launch-promo-note,
.modal-backdrop .public-service-note,
.modal-backdrop .plan-button {
  color: #101827 !important;
  background: #fffaf7 !important;
  border-color: #d8c7aa !important;
}

.modal-backdrop .launch-promo-note span,
.modal-backdrop .public-service-note span,
.modal-backdrop .public-service-note a,
.modal-backdrop .plan-button span {
  color: #7c4a16 !important;
}

.modal-backdrop .launch-promo-note strong,
.modal-backdrop .public-service-note strong,
.modal-backdrop .plan-button strong {
  color: #101827 !important;
}

.modal-backdrop .launch-promo-note code,
.modal-backdrop .plan-button strong {
  color: #a76b2d !important;
}

.modal-backdrop .launch-promo-note small,
.modal-backdrop .public-service-note small,
.modal-backdrop .plan-button small {
  color: #4b5563 !important;
}

.modal-backdrop .plan-button.recommended,
.modal-backdrop .plan-button.context-best {
  background: #fff1d5 !important;
  border-color: #bd8c43 !important;
  box-shadow: 0 0 0 3px rgba(216, 183, 122, 0.22) !important;
}

.modal-backdrop .plan-button.is-loading {
  background: #101827 !important;
  border-color: #101827 !important;
}

.modal-backdrop .plan-button.is-loading span,
.modal-backdrop .plan-button.is-loading strong,
.modal-backdrop .plan-button.is-loading small {
  color: #fffaf2 !important;
}

.modal-backdrop .modal-plan-trust span {
  color: #075e50 !important;
  background: #effaf6 !important;
  border-color: #b9e3d9 !important;
}

.modal-backdrop .modal-note {
  color: #5f3b09 !important;
  background: #fff1d5 !important;
  border-color: #d8b56f !important;
}

/* Agent chat cleanup: editor tools live with the PDF, the rail stays conversational. */
body[data-has-docs="true"] .viewport-edit-tools {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 0 0 10px !important;
  padding: 10px !important;
  border: 1px solid rgba(216, 183, 122, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(26, 19, 14, 0.72) !important;
}

body[data-has-docs="true"] .viewport-edit-tools .tool-button {
  min-height: 42px !important;
  padding: 9px 14px !important;
  border-radius: 14px !important;
  color: #17120d !important;
  background: #fff9ef !important;
  border: 1px solid #c8a46c !important;
  box-shadow: none !important;
}

body[data-has-docs="true"] .viewport-edit-tools .tool-button svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

body[data-has-docs="true"] .viewport-edit-tools .tool-button.active {
  color: #fff9ef !important;
  background: #0f1b2f !important;
  border-color: #0f1b2f !important;
}

body[data-has-docs="true"] .agent-panel > .agent-tools:not(.viewport-edit-tools) {
  display: none !important;
}

body[data-has-docs="true"] .agent-session {
  padding: 12px 12px 0 !important;
  scroll-behavior: smooth !important;
}

body[data-has-docs="true"] .agent-message {
  margin-bottom: 10px !important;
}

body[data-has-docs="true"] .agent-ai-box {
  padding: 10px !important;
  border-radius: 16px !important;
}

body[data-has-docs="true"] .agent-ai-head {
  margin-bottom: 6px !important;
}

body[data-has-docs="true"] .agent-ai-box textarea {
  min-height: 46px !important;
  max-height: 78px !important;
  line-height: 1.35 !important;
}

body[data-has-docs="true"] .agent-mobile-controls,
body[data-has-docs="true"] .agent-surface-bar,
body[data-has-docs="true"] .agent-surface-suggestions {
  display: none !important;
}

body[data-has-docs="true"] .agent-composer-actions {
  display: grid !important;
  grid-template-columns: minmax(70px, 0.8fr) minmax(86px, 0.9fr) minmax(120px, 1.4fr) !important;
  gap: 8px !important;
}

body[data-has-docs="true"] #agentScreenshotButton,
body[data-has-docs="true"] #agentNewSessionButton,
body[data-has-docs="true"] #agentAiButton {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
}

body[data-has-docs="true"] #agentNewSessionButton {
  background: #fff9ef !important;
  color: #101827 !important;
  border: 1px solid #d6b46f !important;
}

body[data-has-docs="true"] .agent-screenshot-state {
  display: none !important;
}

body[data-has-docs="true"] .agent-support-strip {
  margin-top: 5px !important;
  padding-top: 5px !important;
  font-size: 0.76rem !important;
  opacity: 0.9 !important;
}

body[data-has-docs="true"] .agent-support-strip > span {
  display: none !important;
}

body[data-has-docs="true"] .agent-support-strip button {
  margin-left: auto !important;
  padding: 4px 8px !important;
  font-size: 0.76rem !important;
}

@media (max-width: 760px) {
  body[data-has-docs="true"] .viewport-edit-tools {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    margin-bottom: 8px !important;
    padding: 8px !important;
    scrollbar-width: none !important;
  }

  body[data-has-docs="true"] .viewport-edit-tools::-webkit-scrollbar {
    display: none !important;
  }

  body[data-has-docs="true"] .viewport-edit-tools .tool-button {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 8px 11px !important;
  }

  body[data-has-docs="true"] .agent-ai-box {
    padding: 9px !important;
  }

  body[data-has-docs="true"] .agent-ai-box textarea {
    min-height: 58px !important;
    max-height: 84px !important;
  }

  body[data-has-docs="true"] .agent-composer-actions {
    grid-template-columns: 0.8fr 0.9fr 1.2fr !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-green: #d8b77a;
    --brand-green-dark: #f2d29a;
    --brand-green-soft: #2a241d;
    --brand-teal-deep: #0c0a09;
    --brand-teal-mid: #d8b77a;
    --accent-orange: #f2c37a;
    --accent-blue: #b9c0b6;
    --ink: #fff7ed;
    --slate: #d8d0c2;
    --steel: #b1a698;
    --stone: #8f8578;
    --hairline: #352d25;
    --hairline-strong: #554737;
    --surface-feature: #1f1a15;
    --on-primary: #0c0a09;
    --on-dark: #fff7ed;
    --bg: #0c0a09;
    --surface: #1c1917;
    --surface-soft: #24201b;
    --line: #352d25;
    --line-strong: #554737;
    --text: #fff7ed;
    --muted: #c6baaa;
    --faint: #8f8578;
    --blue: #d8b77a;
    --blue-dark: #f2d29a;
    --blue-soft: #2a241d;
    --teal: #d8b77a;
    --teal-soft: #2a241d;
    --coral: #f2a568;
    --coral-soft: #332217;
    --green: #d8b77a;
    --green-bg: #2a241d;
    --amber: #f2c37a;
    --amber-bg: #302419;
    --danger: #f08b75;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.2);
    --shadow: 0 18px 44px rgb(0 0 0 / 0.34);
    --shadow-lg: 0 28px 70px rgb(0 0 0 / 0.46);
    --shadow-xl: 0 40px 110px rgb(0 0 0 / 0.55);
    --glass: rgba(28, 25, 23, 0.78);
    --glass-border: rgba(85, 71, 55, 0.74);
  }
}

/* Production readability and agent-rail comfort pass. */
@media (min-width: 1181px) {
  .app-shell {
    grid-template-columns: minmax(228px, 278px) minmax(420px, 1fr) minmax(372px, 430px);
  }
}

.inspector {
  min-width: min(430px, 100%);
}

.agent-panel {
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
}

.agent-session {
  min-height: clamp(280px, calc(100vh - 240px), 760px);
  max-height: none;
  gap: 10px;
}

.agent-message {
  padding: 12px;
  border-radius: 12px;
}

.agent-message strong {
  font-size: 13px;
}

.agent-message p,
#agentText,
.agent-ai-result p,
.agent-ai-result li span,
.agent-ai-warn {
  font-size: 12px;
  line-height: 1.45;
}

.agent-ai-box textarea {
  min-height: 92px;
  padding: 12px;
  font-size: 13px;
}

.agent-runtime-strip {
  gap: 8px;
}

.agent-runtime-strip span {
  min-height: 50px;
}

.agent-surface-bar {
  gap: 8px;
}

.agent-surface-bar button {
  min-height: 34px;
}

.agent-mobile-controls {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .app-shell,
  .topbar,
  .left-rail,
  .inspector,
  .workspace {
    color: #fff7ed;
    background: #0c0a09;
  }

  .topbar,
  .left-rail,
  .inspector {
    border-color: #352d25;
  }

  .toolbar,
  .preview-toolbar,
  .workspace-actions,
  .status-bar,
  .queue-summary,
  .document-panel-head button,
  .setting-block,
  .size-panel,
  .notice,
  .sidebar-insight,
  .rail-disclosure.page-cutter,
  .rail-disclosure.sidebar-tools,
  .rail-disclosure.job-panel,
  .rail-disclosure.memory-panel,
  .agent-panel,
  .agent-thinking,
  .agent-memory,
  .agent-ai-result {
    color: #fff7ed;
    background: #191511;
    border-color: #46392c;
  }

  .agent-panel {
    background:
      linear-gradient(135deg, rgba(242, 165, 104, 0.1), transparent 32%),
      #191511;
  }

  .agent-message,
  .agent-local-plan,
  .agent-trace li,
  .agent-thinking-list li,
  .agent-memory-item {
    color: #fff7ed;
    background: #211c17;
    border-color: #46392c;
  }

  .agent-message.user {
    color: #191511;
    background: #f2a568;
    border-color: #f2a568;
  }

  .agent-message.user strong,
  .agent-message.user p,
  .agent-message.user span {
    color: #191511;
  }

  .agent-head strong,
  .agent-message strong,
  .agent-thinking summary strong,
  .agent-memory-item strong,
  .rail-disclosure summary b,
  .sidebar-insight strong,
  .sidebar-tools-head strong,
  .queue-summary strong,
  .workspace-actions button,
  .preview-title strong {
    color: #fff7ed;
  }

  .agent-message p,
  #agentText,
  .agent-ai-result p,
  .agent-ai-result li span,
  .agent-ai-warn,
  .agent-trace li,
  .agent-thinking-list li p,
  .agent-memory-item p,
  .agent-screenshot-state,
  .queue-summary span,
  .sidebar-insight span,
  .preview-title span,
  .status-bar {
    color: #d7cab7;
  }

  .agent-message span,
  .agent-local-plan span,
  .agent-thinking summary span,
  .agent-memory-head span,
  .agent-thinking-list li span,
  .agent-memory-item span,
  .agent-memory-empty,
  .eyebrow {
    color: #f2a568;
  }

  .agent-ai-box {
    background:
      linear-gradient(180deg, rgba(12, 10, 9, 0), #191511 24%),
      #191511;
    border-color: #46392c;
    box-shadow: 0 -18px 34px rgba(12, 10, 9, 0.86);
  }

  .agent-ai-box textarea,
  .page-cutter input,
  .support-form input,
  .support-form select,
  .support-form textarea,
  .modal input {
    color: #1c1a17;
    background: #fffaf3;
    border-color: #d9c8ae;
  }

  .agent-ai-box textarea::placeholder,
  .page-cutter input::placeholder {
    color: #766858;
    opacity: 1;
  }

  .agent-command-grid button,
  .agent-composer-actions button,
  .agent-panel .agent-apply-button,
  .agent-memory-head button,
  .agent-surface-bar button,
  .sidebar-tool-grid button,
  .tool-button,
  .icon-button,
  .primary-drop-button {
    color: #1c1a17;
    background: #fff7ed;
    border-color: #d9c8ae;
  }

  .agent-surface-bar button.active,
  .agent-session-reset,
  #agentActionButton,
  #agentAiButton,
  .tool-button.editor-tool.active {
    color: #fff7ed;
    background: #0c0a09;
    border-color: #f2a568;
  }

  #agentSignal,
  #agentTierLabel,
  .agent-ai-meta span,
  .count-badge {
    color: #0c0a09;
    background: #f2c37a;
    border-color: #f2c37a;
  }

  .agent-runtime-strip span {
    color: #fff7ed;
    background: #211c17;
    border-color: #46392c;
  }

  .agent-runtime-strip b {
    color: #f2a568;
  }

  .agent-runtime-strip em {
    color: #fff7ed;
  }

  .file-card,
  .page-card,
  .workspace-file-card,
  .output-card {
    color: #fff7ed;
    background: #191511;
    border-color: #46392c;
  }
}

@media (max-width: 760px) {
  .agent-panel {
    padding: 14px;
  }

  .agent-session {
    min-height: 300px;
  }

  .agent-ai-box textarea {
    min-height: 104px;
  }
}

/* Agent rail polish: keep dark mode readable and make chat the primary surface. */
body[data-has-docs="true"] .back-to-agent-button {
  min-height: 42px;
  width: 100%;
  margin: 0 0 10px;
  color: #fff7ed;
  background: #0f172a;
  border: 1px solid #3d3327;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

body[data-has-docs="true"] .agent-panel {
  min-height: 0;
}

body[data-has-docs="true"] .agent-session {
  flex: 1 1 auto;
  min-height: 260px;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
  scroll-behavior: smooth;
}

body[data-has-docs="true"] .agent-ai-box {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: auto;
}

body[data-has-docs="true"] .agent-surface-bar,
body[data-has-docs="true"] .agent-surface-suggestions,
body[data-has-docs="true"] .agent-command-grid {
  display: none !important;
}

body[data-has-docs="true"] .agent-support-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #c8bba8;
  font-size: 12px;
  line-height: 1.3;
}

body[data-has-docs="true"] .agent-support-strip button {
  min-height: 28px;
  padding: 0 8px;
  color: #101827;
  background: #fff7ed;
  border: 1px solid #d8b77a;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

body[data-has-docs="true"] .agent-tools .tool-button {
  color: #1c1a17 !important;
  background: #fffaf2 !important;
  border-color: #d8c7aa !important;
}

body[data-has-docs="true"] .agent-tools .tool-button svg {
  stroke: currentColor;
}

body[data-has-docs="true"] .agent-tools .tool-button.active {
  color: #fff7ed !important;
  background: #0f172a !important;
  border-color: #0f172a !important;
}

body[data-has-docs="true"] .inspector .setting-block {
  color: #fff7ed !important;
  background: #17130f !important;
  border-color: #46392c !important;
}

body[data-has-docs="true"] .inspector .setting-label,
body[data-has-docs="true"] .inspector .range-row label,
body[data-has-docs="true"] .inspector .eyebrow {
  color: #f0b06c !important;
}

body[data-has-docs="true"] .inspector .tool-readout,
body[data-has-docs="true"] .inspector label,
body[data-has-docs="true"] .inspector output,
body[data-has-docs="true"] .inspector .check-row span,
body[data-has-docs="true"] .inspector .hint {
  color: #f8efe4 !important;
}

body[data-has-docs="true"] .inspector textarea,
body[data-has-docs="true"] .inspector input,
body[data-has-docs="true"] .inspector select {
  color: #fff7ed !important;
  background: #0f0d0b !important;
  border-color: #6b5844 !important;
}

body[data-has-docs="true"] .inspector textarea::placeholder,
body[data-has-docs="true"] .inspector input::placeholder {
  color: #b8aa96 !important;
}

body[data-has-docs="true"] .stamp-grid button,
body[data-has-docs="true"] .wide-button,
body[data-has-docs="true"] .agent-memory-head button,
body[data-has-docs="true"] .agent-composer-actions button,
body[data-has-docs="true"] .agent-panel .agent-apply-button,
body[data-has-docs="true"] .agent-refine-button {
  color: #101827 !important;
  background: #fffaf2 !important;
  border-color: #d8c7aa !important;
}

body[data-has-docs="true"] .stamp-grid button.active,
body[data-has-docs="true"] #agentAiButton,
body[data-has-docs="true"] .agent-panel .agent-apply-button.primary {
  color: #fff7ed !important;
  background: #0f172a !important;
  border-color: #0f172a !important;
}

body[data-has-docs="true"] .account-menu {
  color: #101827 !important;
  background: #fffaf2 !important;
  border-color: #d8c7aa !important;
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.32);
}

body[data-has-docs="true"] .account-menu strong,
body[data-has-docs="true"] .account-menu button {
  color: #101827 !important;
}

/* Editor hardening pass: make the right rail tool-specific and keep chat conversational. */
body[data-has-docs="true"] #editPanel .setting-block[hidden] {
  display: none !important;
}

body[data-has-docs="true"] #editPanel {
  display: grid;
  align-content: start;
  gap: 12px;
}

body[data-has-docs="true"] #editPanel .setting-block {
  margin: 0 !important;
}

body[data-has-docs="true"] #toolHint,
body[data-has-docs="true"] #redactSearchStatus {
  color: #d8c9b6 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body[data-has-docs="true"] #redactSearchInput {
  min-height: 42px !important;
  width: 100% !important;
  margin: 8px 0 10px !important;
  padding: 0 12px !important;
}

body[data-has-docs="true"] #applyRedactSearchButton,
body[data-has-docs="true"] #toolAssetPickButton {
  width: 100% !important;
  min-height: 42px !important;
}

body[data-has-docs="true"] .agent-thinking,
body[data-has-docs="true"] .agent-memory,
body[data-has-docs="true"] .agent-local-plan {
  display: none !important;
}

body[data-has-docs="true"] .agent-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
}

body[data-has-docs="true"] .agent-message.tool-select,
body[data-has-docs="true"] .agent-message.tool-text,
body[data-has-docs="true"] .agent-message.tool-image,
body[data-has-docs="true"] .agent-message.tool-redact,
body[data-has-docs="true"] .agent-message.tool-signature,
body[data-has-docs="true"] .agent-message.tool-stamp {
  display: none !important;
}

body[data-has-docs="true"] .agent-work-card.complete {
  display: none !important;
}

body[data-has-docs="true"] .agent-runtime-strip span em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-has-docs="true"] .account-menu button:hover {
  color: #101827 !important;
  background: #f0dfc3 !important;
}

body[data-has-docs="true"] .modal-close,
body[data-has-docs="true"] .quick-view-modal .modal-close,
body[data-has-docs="true"] .signature-modal .modal-close,
body[data-has-docs="true"] .agent-settings-modal .modal-close {
  display: grid;
  place-items: center;
  color: #fffaf2 !important;
  background: #1c1a17 !important;
  border: 1px solid #4b3d2f !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

@media (max-width: 760px) {
  body[data-has-docs="true"] .agent-session {
    min-height: 0;
  }

  body[data-has-docs="true"] .inspector .setting-block,
  body[data-has-docs="true"] .inspector .agent-ai-box,
  body[data-has-docs="true"] .inspector .agent-message,
  body[data-has-docs="true"] .inspector .agent-work-card {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
  }

  body[data-has-docs="true"] .inspector .setting-label,
  body[data-has-docs="true"] .inspector .range-row label,
  body[data-has-docs="true"] .inspector .eyebrow,
body[data-has-docs="true"] .inspector .agent-message > span,
body[data-has-docs="true"] .inspector .agent-work-head > span {
  color: #9a3412 !important;
}

  body[data-has-docs="true"] .inspector .tool-readout,
  body[data-has-docs="true"] .inspector .agent-message strong,
  body[data-has-docs="true"] .inspector .agent-work-head strong,
  body[data-has-docs="true"] .inspector .agent-message p,
  body[data-has-docs="true"] .inspector .agent-work-card > p,
  body[data-has-docs="true"] .inspector label,
  body[data-has-docs="true"] .inspector output,
  body[data-has-docs="true"] .inspector .hint {
    color: #101827 !important;
  }

  body[data-has-docs="true"] .inspector textarea,
  body[data-has-docs="true"] .inspector input,
  body[data-has-docs="true"] .inspector select {
    color: #101827 !important;
    background: #ffffff !important;
    border-color: #9b8a72 !important;
  }

  body[data-has-docs="true"] .agent-support-strip {
    display: none !important;
  }
}

/* Agent chat simplification: one response, fixed composer, resizable rail. */
:root {
  --agent-rail-width: clamp(410px, 30vw, 560px);
}

@media (min-width: 981px) {
  body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(0, 1fr) 8px var(--agent-rail-width) !important;
  }

  body[data-has-docs="true"] .sidebar-resizer {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 8px !important;
    min-width: 8px !important;
    cursor: col-resize !important;
    background: linear-gradient(180deg, rgba(216, 183, 122, 0.08), rgba(216, 183, 122, 0.24), rgba(216, 183, 122, 0.08)) !important;
    border-left: 1px solid rgba(216, 183, 122, 0.28) !important;
    border-right: 1px solid rgba(216, 183, 122, 0.28) !important;
    z-index: 35 !important;
  }

  body[data-has-docs="true"] .sidebar-resizer::after {
    content: "";
    position: sticky;
    top: 50%;
    display: block;
    width: 3px;
    height: 46px;
    margin: calc(50vh - 80px) auto 0;
    border-radius: 999px;
    background: rgba(216, 183, 122, 0.75);
  }

  body[data-has-docs="true"] .sidebar-resizer.resizing,
  body[data-has-docs="true"] .sidebar-resizer:hover {
    background: rgba(216, 183, 122, 0.26) !important;
  }

  body[data-has-docs="true"] .inspector {
    grid-column: 3 !important;
    width: var(--agent-rail-width) !important;
    min-width: 360px !important;
    max-width: 760px !important;
  }
}

@media (min-width: 981px) and (max-width: 1220px) {
  body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(0, 1fr) 8px var(--agent-rail-width) !important;
  }
}

@media (max-width: 980px) {
  body[data-has-docs="true"] .sidebar-resizer {
    display: none !important;
  }
}

.top-actions .recompress-action {
  display: none !important;
}

.top-actions .subscribe-action {
  display: inline-flex !important;
}

body[data-has-docs="true"] .agent-panel {
  min-height: 100%;
}

body[data-has-docs="true"] .agent-session {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding-bottom: 0 !important;
}

body[data-has-docs="true"] .agent-ai-box {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 18 !important;
  margin-top: 8px !important;
  padding: 12px !important;
  border-radius: 18px !important;
  background: #1a130e !important;
  border-color: #5b452d !important;
  box-shadow: 0 -18px 34px rgba(12, 10, 8, 0.72) !important;
}

body[data-has-docs="true"] .agent-ai-head {
  margin-bottom: 8px !important;
}

body[data-has-docs="true"] .agent-ai-box textarea {
  min-height: 88px !important;
  max-height: 132px !important;
  resize: vertical !important;
}

body[data-has-docs="true"] .agent-composer-actions {
  gap: 8px !important;
  margin-top: 8px !important;
}

body[data-has-docs="true"] .agent-screenshot-state {
  margin: 6px 0 0 !important;
  font-size: 0.86rem !important;
}

body[data-has-docs="true"] .agent-support-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(216, 183, 122, 0.22) !important;
  font-size: 0.88rem !important;
}

body[data-has-docs="true"] .agent-support-strip button {
  padding: 6px 10px !important;
  border-radius: 10px !important;
  background: #fffaf2 !important;
  color: #101827 !important;
}

body[data-has-docs="true"] .workspace,
body[data-has-docs="true"] .preview-stage,
body[data-has-docs="true"] .preview-shell {
  background-color: #2a2118 !important;
}

body[data-has-docs="true"] .preview-shell {
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(49, 92, 246, 0.22);
  outline-offset: 2px;
}

.next-editor-host {
  position: relative;
  width: 100%;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.next-editor-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.landing-editor-host {
  background: #fff;
}

.checkout-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: #fff;
}

.landing-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  background: #fff;
}

.landing-editor-overlay .next-editor-frame {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 180ms ease;
}

.landing-editor-overlay.ready .next-editor-frame {
  opacity: 1;
}

.landing-editor-loading {
  grid-area: 1 / 1;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 100vh;
  padding: 24px;
  color: #0f172a;
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(255, 255, 255, 0.98)),
    var(--surface);
  text-align: center;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.landing-editor-overlay.ready .landing-editor-loading {
  visibility: hidden;
  opacity: 0;
}

.landing-editor-loading strong {
  font-size: 20px;
  font-weight: 860;
}

.landing-editor-loading small {
  max-width: 320px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.agent-work-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid #dbeafe;
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: agentWorkSpin 820ms linear infinite;
}

@keyframes agentWorkSpin {
  to { transform: rotate(360deg); }
}

.checkout-return-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  width: min(620px, calc(100% - 28px));
  padding: 12px 14px;
  color: #0f2d29;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #bfe2dc;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.16);
  transform: translateX(-50%);
  pointer-events: none;
  animation: checkoutReturnBanner 7.5s ease forwards;
}

.checkout-return-banner::before {
  content: "OK";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid #b9e7de;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.checkout-return-banner.cancelled::before {
  color: #7a4e05;
  background: var(--amber-bg);
  border-color: #f0d394;
}

.checkout-return-copy {
  grid-column: 2 !important;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.checkout-return-banner strong {
  grid-column: auto;
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.checkout-return-banner span {
  grid-column: auto;
  color: #526579;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.seo-page {
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: 
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(13, 148, 136, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(244, 63, 94, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
    var(--bg);
}

.seo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-height: 72px;
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

.seo-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 21px;
  font-weight: 860;
  text-decoration: none;
}

.seo-brand strong,
.brand strong {
  color: var(--teal);
  font-weight: 900;
}

.seo-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: transparent;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
}

.seo-brand-mark img,
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.seo-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 0;
  color: #536276;
  font-size: 14px;
  font-weight: 760;
}

.seo-nav a {
  position: relative;
}

.seo-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(2px) scaleX(0.8);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.seo-nav a:hover {
  color: var(--blue);
}

.seo-nav a:focus-visible {
  color: var(--blue);
  outline: none;
}

.seo-nav a:hover::after {
  opacity: 1;
  transform: translateY(0) scaleX(1);
}

.seo-login {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 20px;
  color: #111827;
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  font-size: 14px;
  font-weight: 820;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.seo-login:hover,
.seo-login:focus-visible {
  border-color: #b9c8da;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  transform: translateY(-1px);
}

.seo-account {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  max-width: 270px;
  min-height: 44px;
  gap: 12px;
  padding: 6px 6px 6px 14px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.seo-account:hover {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.seo-account span {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

.seo-account span small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-account strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(390px, 1fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  width: calc(100% - 48px);
  max-width: 1180px;
  min-height: min(660px, calc(100vh - 104px));
  margin: 0 auto;
  padding: clamp(36px, 6vh, 70px) 0 64px;
}

.seo-copy h1 {
  max-width: 650px;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(42px, 6.5vw, 74px);
  line-height: 1.05;
  font-weight: 800;
  overflow-wrap: break-word;
  text-wrap: balance;
  letter-spacing: 0;
}

.seo-rotating-outcome {
  display: inline-block;
  min-width: min(7.6em, 100%);
  color: #0b6f61;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.seo-rotating-outcome.is-swapping {
  opacity: 0;
  transform: translateY(8px);
}

.seo-copy p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #536276;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.48;
}

.seo-bite-meter {
  display: inline-grid;
  grid-template-columns: auto 52px auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.seo-bite-meter span {
  display: grid;
  gap: 2px;
  min-width: 110px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-bite-meter strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.seo-bite-meter i {
  position: relative;
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 999px;
  animation: biteMeterPulse 2s infinite ease-in-out;
}

@keyframes biteMeterPulse {
  0%, 100% { opacity: 1; transform: scaleX(1); }
  50% { opacity: 0.8; transform: scaleX(1.05); }
}

.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.seo-agent-outcome {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  color: #16362f;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.seo-agent-outcome span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.seo-agent-outcome strong {
  min-width: 16ch;
  color: #0b6f61;
  font-size: 16px;
  line-height: 1.25;
}

.seo-bite-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
}

.seo-bite-meter span {
  font-size: 14px;
  color: var(--muted);
}

.seo-bite-meter span strong {
  color: var(--text);
  font-weight: 700;
}

.seo-bite-meter i {
  width: 24px;
  height: 2px;
  background: var(--teal);
  position: relative;
}

.seo-bite-meter i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--teal);
}

.seo-bite-meter b {
  font-size: 12px;
  padding: 2px 8px;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 999px;
  font-weight: 700;
}

.seo-launch-offer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.seo-launch-offer strong {
  color: var(--amber);
  font-weight: 700;
}

.seo-launch-offer code {
  padding: 2px 6px;
  background: var(--amber-bg);
  color: #92400e;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
}

.seo-product-hunt-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 7px 10px;
  color: #5c3311;
  background: #fff8ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.seo-product-hunt-badge:hover {
  border-color: #fb923c;
  opacity: 1;
}

.seo-product-hunt-badge span {
  color: #9a3412;
}

.seo-product-hunt-badge strong {
  color: #431407;
  font-weight: 860;
}

.seo-proof-list {
  display: grid;
  gap: 15px;
  max-width: 650px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.seo-proof-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 13px;
  min-width: 0;
  color: #243044;
  font-size: 17px;
  line-height: 1.38;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.seo-proof-list li::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-top: 1px;
  background:
    linear-gradient(135deg, transparent 51%, #ffffff 51% 66%, transparent 66%),
    linear-gradient(135deg, var(--teal), #23c7aa);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 95, 0.18);
}

.fullscreen-drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 159, 135, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: overlayFadeIn 0.3s ease-out forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-content {
  text-align: center;
  color: var(--teal);
  animation: contentSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes contentSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.overlay-content h2 {
  font-size: 32px;
  margin: 20px 0 10px;
  font-weight: 800;
}

.overlay-content p {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.8;
}

.seo-hero {
  transition: background-color 0.4s ease, transform 0.4s ease;
}

.seo-hero.global-dragging {
  background-color: var(--surface-soft);
  transform: scale(0.98);
}

.seo-chat-dropzone {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.seo-chat-dropzone.dragging {
  border-color: var(--blue);
  box-shadow: 0 0 0 6px var(--blue-soft), var(--shadow-xl);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: chatSlideUp 0.4s ease-out forwards;
}

@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.agent {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message .avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.chat-message .avatar img {
  display: block;
  width: 100%;
  height: 100%;
}

.chat-message .bubble {
  max-width: 80%;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.agent .bubble {
  background: var(--surface-soft);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-message.user .bubble {
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message .bubble p {
  margin: 0;
}

.chat-message .bubble p + p {
  margin-top: 8px;
}

.chat-message .bubble p[data-landing-demo-prompt] {
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.chat-message .bubble p[data-landing-demo-prompt].is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.landing-agent-demo {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(13, 159, 135, 0.1), rgba(47, 93, 245, 0.08)),
    #f8fcfb;
  border: 1px solid #cfe3dd;
  border-radius: 14px;
}

.landing-agent-demo span {
  color: #0b6f61;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-agent-demo strong {
  min-height: 42px;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.landing-agent-demo strong.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-input-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.landing-agent-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  gap: 8px;
  padding: 6px;
  background: #f7fafc;
  border: 1px solid #d8e5ef;
  border-radius: 14px;
}

.landing-agent-input {
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  color: #111827;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.landing-agent-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.landing-agent-submit {
  min-height: 42px;
  padding: 0 13px;
  color: #fff;
  background: #111827;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.landing-prompt-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  width: 100%;
}

.landing-prompt-examples button {
  min-height: 30px;
  padding: 0 9px;
  color: #1837b7;
  background: #f6f8ff;
  border: 1px solid #d9e2ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.landing-prompt-examples button:hover {
  border-color: #9db3ff;
  background: #eef3ff;
}

.chat-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  min-height: 44px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-upload-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -8px rgba(37, 99, 235, 0.4);
}

.chat-input-area small {
  color: var(--faint);
  font-size: 13px;
}

.seo-steps {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 0 96px;
  border-top: 1px solid #e4ebf4;
}

.seo-steps h2 {
  margin: 0 0 28px;
  color: #111827;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.05;
  text-align: center;
}

.seo-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.seo-step-grid article {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.seo-step-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-soft);
}

.seo-step-grid span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0d705f;
  background: #e5f7f3;
  border-radius: 8px;
  font-weight: 900;
}

.seo-step-grid h3 {
  margin: 18px 0 8px;
  color: #111827;
  font-size: 20px;
}

.seo-step-grid p {
  margin: 0;
  color: #607084;
  font-size: 15px;
  line-height: 1.52;
}

.seo-answer-strip,
.seo-media-proof,
.seo-competitor-brief {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: -34px auto 70px;
  padding: 38px 0 0;
  border-top: 1px solid #e4ebf4;
}

.seo-answer-strip h2,
.seo-media-proof h2,
.seo-competitor-brief h2 {
  max-width: 560px;
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.06;
  text-wrap: balance;
}

.seo-media-proof > div:first-child > p:last-child,
.seo-competitor-brief > div:first-child > p:last-child {
  margin: 16px 0 0;
  color: #536276;
  font-size: 17px;
  line-height: 1.55;
}

.seo-answer-strip > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seo-answer-strip article {
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.052);
}

.seo-answer-strip h3 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 18px;
  line-height: 1.18;
}

.seo-answer-strip p {
  margin: 0;
  color: #607084;
  font-size: 14.5px;
  line-height: 1.48;
}

.seo-media-proof > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.seo-media-proof figure {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.seo-media-proof img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #edf2f7;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.052);
}

.seo-media-proof figcaption {
  display: grid;
  gap: 4px;
  color: #607084;
  font-size: 13.5px;
  line-height: 1.42;
}

.seo-media-proof figcaption strong {
  color: #111827;
  font-size: 15px;
}

.seo-competitor-brief ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #dce7f0;
}

.seo-competitor-brief li {
  display: grid;
  grid-template-columns: minmax(130px, 0.36fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #dce7f0;
}

.seo-competitor-brief strong {
  color: #111827;
  font-size: 17px;
}

.seo-competitor-brief span {
  color: #607084;
  font-size: 16px;
  line-height: 1.5;
}

.seo-intent-links {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: -34px auto 70px;
  padding: 38px 0 0;
  border-top: 1px solid #e4ebf4;
}

.seo-intent-links h2 {
  max-width: 540px;
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.06;
  text-wrap: balance;
}

.seo-intent-links > div:first-child > p:last-child {
  margin: 16px 0 0;
  color: #536276;
  font-size: 17px;
  line-height: 1.55;
}

.seo-intent-links > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seo-intent-links a {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.seo-intent-links a:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px) scale(1.02);
}

.seo-intent-links strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.14;
}

.seo-intent-links span {
  color: #607084;
  font-size: 14.5px;
  line-height: 1.42;
}

.seo-difference {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: -34px auto 78px;
  padding: 38px 0 0;
  border-top: 1px solid #e4ebf4;
}

.seo-section-kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-difference h2 {
  max-width: 520px;
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  text-wrap: balance;
}

.seo-difference ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #dce7f0;
}

.seo-difference li {
  display: grid;
  grid-template-columns: minmax(130px, 0.36fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #dce7f0;
}

.seo-difference strong {
  color: #111827;
  font-size: 17px;
}

.seo-difference span {
  color: #607084;
  font-size: 16px;
  line-height: 1.5;
}

.seo-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: -38px auto 58px;
  padding: 18px 0 0;
  color: #607084;
  border-top: 1px solid #e4ebf4;
  font-size: 14px;
  line-height: 1.45;
}

.seo-trust p {
  max-width: 720px;
  margin: 0;
}

.seo-trust div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  font-weight: 820;
}

.seo-trust a {
  color: #1837b7;
  text-decoration: none;
}

.seo-tool-actions {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 0 72px;
}

.seo-tool-actions h2,
.intent-action-hub h2,
.tools-group h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.06;
}

.seo-tool-actions > div:first-child > p:last-child,
.tools-group > div:first-child p {
  margin: 16px 0 0;
  color: #536276;
  font-size: 17px;
  line-height: 1.55;
}

.tool-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.tool-action-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  min-height: 178px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.052);
  -webkit-tap-highlight-color: rgba(47, 93, 245, 0.12);
  touch-action: manipulation;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tool-action-icon {
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #0c6b5e;
  background: #edf8f5;
  border: 1px solid #c5e7df;
  border-radius: 8px;
}

.tool-action-icon svg {
  width: 21px;
  height: 21px;
}

.tool-action-card:hover {
  border-color: #9bd9ce;
  box-shadow:
    0 16px 40px rgba(13, 159, 135, 0.08),
    0 0 0 3px rgba(13, 159, 135, 0.08);
  transform: translateY(-2px);
}

.tool-action-card span {
  grid-column: 2;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-action-card strong {
  grid-column: 2;
  color: #111827;
  font-size: 21px;
  line-height: 1.14;
}

.tool-action-card p {
  grid-column: 2;
  margin: 0;
  color: #607084;
  font-size: 15px;
  line-height: 1.45;
}

.tool-action-card b {
  grid-column: 2;
  align-self: end;
  color: #1837b7;
  font-size: 14px;
}

.intent-page,
.blog-page {
  min-height: 100vh;
  color: #172033;
  background:
    linear-gradient(135deg, rgba(255, 107, 74, 0.075) 0 9%, transparent 9% 100%),
    radial-gradient(circle at 86% 10%, rgba(13, 159, 135, 0.12), transparent 28rem),
    linear-gradient(180deg, #f6fbfa 0%, #ffffff 46%, #f2f7fb 100%);
}

.intent-hero,
.intent-grid,
.intent-scenarios,
.intent-faq,
.intent-related,
.blog-hero,
.blog-story-strip,
.blog-grid,
.blog-tools,
.article-wrap {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.intent-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(330px, 0.58fr);
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
  padding: clamp(52px, 8vh, 92px) 0 56px;
}

.intent-hero h1,
.blog-hero h1,
.article-wrap h1 {
  max-width: 850px;
  margin: 0;
  color: #0d1321;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  text-wrap: balance;
}

.intent-hero p,
.blog-hero p,
.article-wrap header p {
  max-width: 760px;
  margin: 22px 0 0;
  color: #536276;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
}

.intent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.intent-primary,
.intent-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 860;
  text-decoration: none;
}

.intent-primary {
  color: #fff;
  background: #2f5df5;
  box-shadow: 0 16px 34px rgba(47, 93, 245, 0.22);
}

.intent-secondary {
  color: #111827;
  background: #fff;
  border: 1px solid #d7e7e2;
}

.intent-result-card {
  display: grid;
  gap: 18px;
  padding: 26px;
  background: #fff;
  border: 1px solid #cfe3dd;
  border-radius: 8px;
  box-shadow:
    0 24px 64px rgba(17, 24, 39, 0.1),
    10px 10px 0 rgba(13, 159, 135, 0.08);
}

.intent-result-card > span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intent-result-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.intent-result-card strong {
  min-width: 0;
  padding: 16px;
  color: #111827;
  background: #f5faf8;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.intent-result-card i {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  border-radius: 999px;
}

.intent-result-card i::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  transform: translateY(-50%) rotate(45deg);
}

.intent-result-card b {
  justify-self: start;
  padding: 10px 13px;
  color: #075e50;
  background: var(--teal-soft);
  border-radius: 8px;
  font-size: 18px;
}

.intent-result-card p {
  margin: 0;
  color: #607084;
  font-size: 15px;
  line-height: 1.5;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 0 64px;
}

.intent-panel {
  padding: 28px;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.055);
}

.intent-panel h2,
.intent-faq h2,
.intent-related h2,
.blog-tools h2,
.article-wrap h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.intent-panel ul,
.intent-panel ol {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding-left: 22px;
  color: #536276;
  font-size: 16px;
  line-height: 1.5;
}

.intent-panel li::marker {
  color: var(--teal);
  font-weight: 900;
}

.intent-scenarios {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 60px);
  padding: 40px 0;
  border-top: 1px solid #e4ebf4;
  border-bottom: 1px solid #e4ebf4;
}

.intent-scenarios h2 {
  max-width: 470px;
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.intent-scenarios ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intent-scenarios li {
  padding: 16px;
  color: #243044;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-weight: 820;
}

.intent-action-hub {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 0 28px;
}

.intent-faq {
  padding: 58px 0 40px;
}

.intent-faq > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.intent-faq article,
.intent-related a,
.blog-card {
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.05);
}

.intent-faq article {
  padding: 22px;
}

.intent-faq h3 {
  margin: 0;
  color: #111827;
  font-size: 19px;
}

.intent-faq p {
  margin: 10px 0 0;
  color: #607084;
  font-size: 15px;
  line-height: 1.52;
}

.intent-related {
  padding: 18px 0 70px;
}

.intent-related > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.intent-related a {
  display: grid;
  gap: 7px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.intent-related a:hover,
.blog-card:hover,
.blog-tools a:hover {
  border-color: #9bd9ce;
  box-shadow:
    0 16px 40px rgba(13, 159, 135, 0.08),
    0 0 0 3px rgba(13, 159, 135, 0.08);
}

.intent-related span,
.blog-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-card span {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.intent-related strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.18;
}

.intent-related p {
  margin: 2px 0 0;
  color: #607084;
  font-size: 14px;
  line-height: 1.42;
}

.blog-hero {
  padding: 62px 0 34px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 0 66px;
}

.blog-story-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
  padding: 10px 0 38px;
}

.blog-story-strip h2 {
  max-width: 520px;
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.04;
}

.blog-story-strip p:not(.seo-section-kicker) {
  max-width: 520px;
  margin: 14px 0 0;
  color: #607084;
  font-size: 16px;
  line-height: 1.5;
}

.blog-story-strip > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.blog-story-strip a {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.07), transparent 48%),
    #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.blog-story-strip a:hover {
  border-color: #9bd9ce;
  box-shadow: 0 18px 42px rgba(13, 159, 135, 0.1);
  transform: translateY(-1px);
}

.blog-story-strip a span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-story-strip a strong {
  color: #111827;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.12;
}

.blog-story-strip a small {
  color: #8291a5;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.blog-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 13px;
  min-height: 230px;
  padding: 26px;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.blog-card:first-child {
  grid-column: span 2;
  min-height: 210px;
}

.blog-card h2 {
  max-width: 780px;
  margin: 0;
  color: #111827;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.12;
  text-wrap: balance;
}

.blog-card p {
  max-width: 68ch;
  margin: 0;
  color: #607084;
  font-size: 16px;
  line-height: 1.55;
}

.blog-card small,
.article-wrap small {
  color: #8291a5;
  font-size: 12.5px;
  font-weight: 820;
  text-transform: uppercase;
}

.blog-tools {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 60px);
  padding: 40px 0 74px;
  border-top: 1px solid #e4ebf4;
}

.blog-tools > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.blog-tools a {
  padding: 11px 13px;
  color: #1837b7;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 820;
  text-decoration: none;
}

.tools-group-list {
  display: grid;
  gap: 22px;
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 0 76px;
}

.tools-group {
  display: grid;
  grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 52px);
  padding: 28px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #d7e7e2;
  border-radius: 8px;
}

.tools-group > div:first-child span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools-page {
  background:
    linear-gradient(180deg, #f6f7f8 0%, #f4f9f8 48%, #eef5f7 100%);
}

.tools-app-shell {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  width: calc(100% - 48px);
  max-width: 1280px;
  margin: 0 auto 72px;
}

.tools-rail {
  position: sticky;
  top: 18px;
  display: grid;
  align-self: start;
  align-content: space-between;
  min-height: min(720px, calc(100vh - 36px));
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #d9e5e3;
  border-radius: 8px;
}

.tools-rail-brand,
.tools-rail-user,
.tools-rail nav a {
  display: grid;
  place-items: center;
  color: #172033;
  text-decoration: none;
}

.tools-rail-brand img {
  width: 38px;
  height: 38px;
}

.tools-rail nav {
  display: grid;
  gap: 12px;
}

.tools-rail nav a {
  gap: 6px;
  min-height: 66px;
  padding: 8px 4px;
  border-radius: 8px;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tools-rail nav a:hover,
.tools-rail nav a:focus-visible {
  background: #edf5f2;
  box-shadow: inset 0 0 0 1px #d1e7e1;
  outline: none;
  transform: translateY(-1px);
}

.tools-rail nav span,
.tools-rail-user span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #0c6b5e;
  background: #e7f6f2;
  border: 1px solid #c5e7df;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.tools-rail svg,
.tools-file-shortcuts svg,
.tools-icon svg,
.tools-ai-strip a svg {
  width: 20px;
  height: 20px;
}

.tools-rail nav b {
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

.tools-rail-user {
  width: 42px;
  height: 42px;
  justify-self: center;
  border-radius: 8px;
}

.tools-workspace {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe7e4;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.07);
}

.tools-hero-panel,
.tools-section-title,
.tools-ai-strip {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.tools-hero-panel h1,
.tools-section-title h2,
.tools-ai-strip h2 {
  max-width: 780px;
  margin: 0;
  color: #111827;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
}

.tools-section-title h2,
.tools-ai-strip h2 {
  font-size: clamp(26px, 3.4vw, 42px);
}

.tools-hero-panel p:not(.seo-section-kicker) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #536276;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.tools-hero-actions {
  display: grid;
  min-width: min(420px, 100%);
  gap: 12px;
}

.tools-hero-actions label {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tools-hero-actions label:focus-within {
  border-color: #9bd9ce;
  box-shadow: 0 0 0 4px rgba(13, 159, 135, 0.1);
}

.tools-hero-actions label span {
  color: #607084;
  font-size: 12px;
  font-weight: 900;
}

.tools-hero-actions input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
  font-size: 15px;
  font-weight: 720;
}

.tools-hero-actions a,
.tools-section-title > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: #2f5df5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 860;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(47, 93, 245, 0.18);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tools-hero-actions a:hover,
.tools-section-title > a:hover,
.tools-hero-actions a:focus-visible,
.tools-section-title > a:focus-visible {
  background: #254ce0;
  box-shadow: 0 18px 44px rgba(47, 93, 245, 0.26);
  transform: translateY(-1px);
}

.tools-file-shortcuts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 32px;
}

.tools-file-shortcuts a {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d9e6e2;
  border-radius: 8px;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(47, 93, 245, 0.12);
  touch-action: manipulation;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tools-file-shortcuts a:hover {
  border-color: #a8dcd2;
  box-shadow: 0 10px 26px rgba(13, 159, 135, 0.08);
  transform: translateY(-2px);
}

.tools-file-shortcuts span,
.tools-icon,
.tools-ai-strip a span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #0c6b5e;
  background: #edf8f5;
  border: 1px solid #c5e7df;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.tools-file-shortcuts strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.2;
}

.tools-suggested {
  padding: 4px 0 22px;
}

.tools-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.tools-feature-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  min-height: 160px;
  padding: 14px;
  color: #172033;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(47, 93, 245, 0.12);
  touch-action: manipulation;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tools-feature-card:hover {
  border-color: #a8dcd2;
  box-shadow: 0 16px 36px rgba(13, 159, 135, 0.08);
  transform: translateY(-2px);
}

.tools-feature-card .tools-icon {
  width: 100%;
  height: 100%;
  min-height: 132px;
  color: #1837b7;
  background:
    linear-gradient(135deg, rgba(47, 93, 245, 0.12), transparent 60%),
    #f5f8ff;
  border-color: #d7e0ff;
  font-size: 16px;
}

.tools-feature-card .tools-icon svg {
  width: 30px;
  height: 30px;
}

.tools-feature-card div {
  display: grid;
  gap: 7px;
  align-content: center;
  min-width: 0;
}

.tools-feature-card div span {
  color: #0c6b5e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools-feature-card strong {
  color: #111827;
  font-size: 22px;
  line-height: 1.08;
}

.tools-feature-card p {
  margin: 0;
  color: #607084;
  font-size: 14px;
  line-height: 1.4;
}

.tools-feature-card b {
  grid-column: 2;
  align-self: end;
  color: #1837b7;
  font-size: 13px;
}

.tools-page .tools-group-list {
  width: auto;
  max-width: none;
  padding: 18px 0 26px;
}

.tools-page .tools-group {
  background: #fff;
}

.tools-ai-strip {
  padding: 26px 0 0;
  border-top: 1px solid #e1ebe8;
}

.tools-ai-strip > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: min(620px, 100%);
}

.tools-ai-strip a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  color: #172033;
  background: #f9fbff;
  border: 1px solid #d7e0ff;
  border-radius: 8px;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(47, 93, 245, 0.12);
  touch-action: manipulation;
}

.tools-ai-strip a strong,
.tools-ai-strip a small {
  grid-column: 2;
  min-width: 0;
}

.tools-ai-strip a span {
  grid-row: 1 / span 2;
}

.tools-ai-strip a strong {
  color: #111827;
  font-size: 14px;
}

.tools-ai-strip a small {
  color: #607084;
  font-size: 12px;
  line-height: 1.35;
}

.article-wrap {
  max-width: 900px;
  padding: 58px 0 34px;
}

.article-wrap header {
  padding-bottom: 34px;
  border-bottom: 1px solid #e4ebf4;
}

.article-wrap section {
  padding: 34px 0;
  border-bottom: 1px solid #e4ebf4;
}

.article-wrap section p {
  margin: 18px 0 0;
  color: #536276;
  font-size: 18px;
  line-height: 1.65;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.article-links a {
  padding: 10px 12px;
  color: #1837b7;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 820;
  text-decoration: none;
}

.article-related {
  max-width: 900px;
}

.pricing-page {
  min-height: 100vh;
  color: #172033;
  background:
    linear-gradient(135deg, rgba(255, 107, 74, 0.08) 0 10%, transparent 10% 100%),
    repeating-linear-gradient(90deg, transparent 0 32px, rgba(17, 24, 39, 0.025) 32px 33px),
    linear-gradient(180deg, #f6fbfa 0%, #ffffff 46%, #f3f7fb 100%);
}

.pricing-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(112px, 1fr);
  align-items: center;
  gap: 22px;
  width: calc(100% - 48px);
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
}

.pricing-hero,
.pricing-choice,
.pricing-launch-offer,
.pricing-paid-grid,
.pricing-grid,
.pricing-advisor,
.pricing-compare,
.pricing-ai,
.pricing-faq {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.pricing-hero {
  padding: 70px 0 34px;
}

.pricing-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #0d1321;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  text-wrap: balance;
}

.pricing-hero p {
  max-width: 780px;
  margin: 22px 0 0;
  color: #536276;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.48;
}

.pricing-choice {
  padding: 8px 0 14px;
}

.pricing-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.58fr) auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  padding: 22px 24px;
  background:
    linear-gradient(135deg, rgba(15, 159, 136, 0.08), transparent 38%),
    #ffffff;
  border: 1px solid #cfe5df;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.06);
}

.pricing-card-label {
  display: block;
  margin-bottom: 9px;
  color: #607084;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-preview-card h2 {
  margin: 0;
  color: #0d1321;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.02;
  text-wrap: balance;
}

.pricing-preview-card p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #536276;
  font-size: 16px;
  line-height: 1.48;
}

.pricing-preview-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-preview-card li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  color: #243044;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 760;
}

.pricing-preview-card li::before,
.pricing-plan li::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background:
    linear-gradient(135deg, transparent 51%, #ffffff 51% 66%, transparent 66%),
    linear-gradient(135deg, var(--teal), #23c7aa);
  border-radius: 5px;
}

.pricing-preview-card a {
  display: grid;
  place-items: center;
  min-width: 130px;
  min-height: 46px;
  padding: 0 18px;
  color: #111827;
  background: #f5faf8;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.pricing-launch-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 12px;
  margin-bottom: 8px;
  padding: 22px 24px;
  background: #fffaf0;
  border: 1px solid #f1d99d;
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(146, 94, 12, 0.07);
}

.pricing-launch-offer h2 {
  margin: 0;
  color: #0d1321;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.pricing-launch-offer p:not(.seo-section-kicker) {
  max-width: 760px;
  margin: 9px 0 0;
  color: #536276;
  font-size: 16px;
  line-height: 1.45;
}

.pricing-launch-offer a {
  display: grid;
  place-items: center;
  min-width: 148px;
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 860;
  text-decoration: none;
}

.pricing-paid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
  padding: 18px 0 42px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  padding: 18px 0 58px;
}

.pricing-plan {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.06);
}

.pricing-plan-promo {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 8px 10px;
  color: #6c4d09;
  background: #fff8e8;
  border: 1px solid #f1d99d;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 820;
}

.pricing-plan.featured {
  border-color: #2f5df5;
  box-shadow:
    0 0 0 4px rgba(47, 93, 245, 0.09),
    0 18px 48px rgba(47, 93, 245, 0.14);
}

.pricing-plan-head {
  display: grid;
  gap: 9px;
}

.pricing-plan-head div {
  min-width: 0;
}

.pricing-plan-head span,
.pricing-plan-head small {
  display: block;
  color: #607084;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.pricing-plan-head strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}

.pricing-plan-head b {
  justify-self: start;
  order: -1;
  padding: 6px 8px;
  color: #075e50;
  background: #dcf8ef;
  border: 1px solid #ace2d7;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.pricing-plan p {
  margin: 0;
  color: #536276;
  font-size: 15px;
  line-height: 1.45;
}

.pricing-plan ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-plan li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  color: #243044;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 720;
}

.pricing-plan a {
  display: grid;
  place-items: center;
  margin-top: auto;
  min-height: 44px;
  color: #fff;
  background: #2f5df5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.pricing-plan:not(.featured) a {
  color: #111827;
  background: #f5faf8;
  border: 1px solid #d7e7e2;
}

.pricing-advisor {
  padding: 0 0 54px;
}

.pricing-advisor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pricing-advisor-grid a {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  color: #172033;
  background:
    linear-gradient(135deg, rgba(15, 159, 136, 0.05), transparent 42%),
    #ffffff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.pricing-advisor-grid a:hover {
  border-color: #9bd9cc;
  box-shadow: 0 16px 38px rgba(15, 159, 136, 0.1);
}

.pricing-advisor-grid span {
  color: #607084;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-advisor-grid strong {
  color: #0d1321;
  font-size: 22px;
  line-height: 1.1;
}

.pricing-advisor-grid small {
  color: #536276;
  font-size: 13px;
  line-height: 1.45;
}

.pricing-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.pricing-section-title h2,
.pricing-ai h2 {
  max-width: 720px;
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.pricing-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.06);
}

.pricing-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  text-align: left;
}

.pricing-table th,
.pricing-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #e3eeeb;
  color: #243044;
  font-size: 13px;
  vertical-align: middle;
}

.pricing-table thead th {
  color: #111827;
  background: #f5faf8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-table tbody th {
  width: 32%;
  color: #111827;
  font-weight: 790;
}

.pricing-check {
  color: #138a5d;
  font-weight: 850;
}

.pricing-muted {
  color: #9aa7b7;
}

.pricing-ai {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  padding: 64px 0 84px;
}

.pricing-ai ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #dce7f0;
}

.pricing-ai li {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #dce7f0;
}

.pricing-ai strong {
  color: #111827;
}

.pricing-ai span {
  color: #607084;
  line-height: 1.5;
}

.pricing-faq {
  padding: 0 0 88px;
}

.pricing-faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pricing-faq article {
  padding: 22px;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.pricing-faq h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
}

.pricing-faq p {
  margin: 10px 0 0;
  color: #536276;
  font-size: 15px;
  line-height: 1.5;
}

.share-page {
  min-height: 100vh;
  color: #172033;
  background:
    radial-gradient(circle at 86% 8%, rgba(13, 159, 135, 0.12), transparent 24rem),
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(17, 24, 39, 0.022) 40px 41px),
    linear-gradient(180deg, #f7fbfa 0%, #ffffff 46%, #f4f8fb 100%);
}

.share-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 22px;
  width: calc(100% - 48px);
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
}

.share-pending-shell,
.share-pending-formats {
  width: calc(100% - 48px);
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.share-pending-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  min-height: auto;
  padding: 104px 0 118px;
}

.share-pending-copy h1 {
  max-width: 760px;
  margin: 0;
  color: #0d1321;
  font-size: clamp(42px, 5.4vw, 70px);
  line-height: 0.98;
  font-weight: 900;
  text-wrap: balance;
}

.share-pending-copy p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #536276;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}

.share-pending-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
}

.share-pending-card > span {
  color: #8493a5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.share-pending-card strong {
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

.share-pending-card p {
  margin: 0;
  color: #607084;
  font-size: 14px;
  line-height: 1.45;
}

.share-pending-steps {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #dce9e6;
}

.share-pending-steps span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #536276;
  font-size: 13px;
  font-weight: 820;
}

.share-pending-steps span::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #d7e7e2;
  border-radius: 999px;
}

.share-pending-steps span.done::before {
  background: var(--teal);
}

.share-pending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.share-pending-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: #1837b7;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.share-pending-actions .share-primary-link {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(47, 93, 245, 0.2);
}

.share-pending-formats {
  padding: 0 0 80px;
}

.share-pending-formats h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 22px;
}

.share-pending-formats div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-pending-formats span {
  padding: 9px 11px;
  color: #075e50;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #ccece5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.share-hero,
.share-workspace {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.share-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: end;
  gap: 24px;
  padding: 24px 0 12px;
}

.share-copy h1 {
  max-width: 720px;
  margin: 0;
  color: #0d1321;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
  font-weight: 900;
  text-wrap: balance;
}

.share-copy p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #536276;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.45;
}

.share-route-strip {
  display: inline-grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d6e8e2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.share-route-strip span,
.share-route-strip i {
  padding: 10px 12px;
  background: #f5faf8;
  border-radius: 7px;
  color: #243044;
  font-size: 13px;
  font-weight: 850;
  font-style: normal;
}

.share-route-strip b {
  color: var(--teal);
  font-size: 22px;
}

.share-route-strip i {
  color: #075e50;
  background: var(--teal-soft);
}

.share-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.share-stepper span {
  position: relative;
  padding: 8px 10px;
  color: #2d465f;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #d6e8e2;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 820;
}

.share-stepper span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  width: 8px;
  height: 1px;
  background: #b9d8d1;
}

.share-hero-status {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.share-hero-status span {
  color: #8493a5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.share-hero-status strong {
  color: #111827;
  font-size: 24px;
  line-height: 1;
}

.share-hero-status p,
.share-hero-status small {
  margin: 0;
  color: #607084;
  font-size: 14px;
  line-height: 1.45;
}

.share-hero-status small {
  padding: 9px 10px;
  color: #7a4e05;
  background: var(--amber-bg);
  border: 1px solid #f0d394;
  border-radius: 8px;
  font-weight: 760;
}

.share-status-note {
  padding: 9px 10px;
  color: #7a4e05 !important;
  background: var(--amber-bg);
  border: 1px solid #f0d394;
  border-radius: 8px;
  font-weight: 760;
}

.share-hero-status a {
  justify-self: start;
  margin-top: 6px;
  color: #1837b7;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.share-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 18px;
  align-items: start;
  padding: 10px 0 76px;
}

.share-main-panel,
.share-side-stack,
.share-list-panel,
.share-history-panel {
  min-width: 0;
}

.share-main-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.share-side-stack {
  display: grid;
  gap: 16px;
}

.share-dropzone,
.share-format-panel,
.share-list-panel,
.share-history-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.06);
}

.share-dropzone {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 252px;
  padding: 22px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.99)),
    repeating-linear-gradient(90deg, rgba(13, 159, 135, 0.08) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(47, 93, 245, 0.06) 0 1px, transparent 1px 34px);
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.share-dropzone.dragging {
  border-color: #20ad91;
  transform: translateY(-2px);
}

.share-upload-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid #ace2d7;
  border-radius: 8px;
  font-size: 32px;
  line-height: 1;
  font-weight: 520;
}

.share-dropzone h2,
.share-format-panel h2,
.share-list-head h2,
.share-history-panel h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.08;
}

.share-dropzone p,
.share-history-panel p {
  margin: 0;
  color: #607084;
  font-size: 14px;
  line-height: 1.48;
}

.share-dropzone button,
.share-action-bar button:first-child {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: #2f5df5;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(47, 93, 245, 0.22);
  font-size: 15px;
  font-weight: 850;
}

.share-action-bar button:first-child:disabled {
  color: #745119;
  background: var(--amber-bg);
  border: 1px solid #f0d394;
  box-shadow: none;
  opacity: 1;
}

.share-format-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.share-format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-format-tags span {
  padding: 8px 10px;
  color: #075e50;
  background: #f2fbf8;
  border: 1px solid #ccece5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.share-workflow-cards {
  display: grid;
  gap: 10px;
}

.share-workflow-cards article {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: #fbfdfc;
  border: 1px solid #dce9e6;
  border-radius: 8px;
}

.share-workflow-cards strong {
  color: #111827;
  font-size: 14px;
}

.share-workflow-cards p {
  margin: 0;
  color: #607084;
  font-size: 12px;
  line-height: 1.45;
}

.share-workflow-cards div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.share-workflow-cards span {
  padding: 5px 7px;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid #ccece5;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.share-list-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-list-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dce7f0;
}

.share-list-head span {
  color: #8493a5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.share-list-head strong {
  display: block;
  color: #111827;
  font-size: 22px;
  line-height: 1.1;
  text-align: right;
}

.share-message {
  margin: 0;
  padding: 12px;
  color: #7a4e05;
  background: var(--amber-bg);
  border: 1px solid #f0d394;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 720;
}

.share-storage-pending {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  color: #243044;
  background: linear-gradient(135deg, #f4fbff, #f7fbfa);
  border: 1px solid #c9dde9;
  border-radius: 8px;
}

.share-storage-pending strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.share-storage-pending span {
  color: #526579;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.share-file-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.share-empty {
  display: grid;
  gap: 7px;
  min-height: 158px;
  place-content: center;
  padding: 22px;
  color: #607084;
  background: #f6faf9;
  border: 1px dashed #b8d7cf;
  border-radius: 8px;
  text-align: center;
}

.share-empty strong {
  color: #111827;
  font-size: 20px;
}

.share-file-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: #f8fbfa;
  border: 1px solid #dce9e6;
  border-radius: 8px;
}

.share-file-kind {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 34px;
  margin: 0 !important;
  color: #075e50 !important;
  background: var(--teal-soft);
  border: 1px solid #ccece5;
  border-radius: 8px;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.share-file-main {
  min-width: 0;
}

.share-file-row.done {
  border-color: #b8e4d9;
  background: #f2fbf8;
}

.share-file-row.error {
  border-color: #ffd1c5;
  background: #fff7f4;
}

.share-file-row strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-file-row span {
  display: block;
  margin-top: 3px;
  color: #607084;
  font-size: 12px;
  font-weight: 720;
}

.share-progress {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  background: #dbe9ff;
  border-radius: 999px;
}

.share-progress span {
  display: block;
  height: 100%;
  margin: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: inherit;
  transition: width 140ms ease;
}

.share-link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.share-link-actions button,
.share-link-actions a,
.share-remove,
.share-action-bar button:last-child,
.share-history-list button {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: #111827;
  background: #fff;
  border: 1px solid #d7e7e2;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.share-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.share-history-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-history-list {
  display: grid;
  gap: 10px;
  max-height: 570px;
  overflow: auto;
}

.share-history-list > span {
  color: #607084;
  font-size: 13px;
}

.share-history-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid #dce9e6;
  border-radius: 8px;
}

.share-history-list strong {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-history-list span {
  color: #607084;
  font-size: 12px;
}

.share-history-list button {
  grid-row: span 2;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: minmax(228px, 278px) minmax(460px, 1fr) minmax(300px, 350px);
  grid-template-rows: 56px minmax(0, 1fr);
  height: 100vh;
  min-height: 680px;
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background:
    linear-gradient(90deg, rgba(220, 248, 239, 0.42), transparent 34%),
    rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.brand,
.toolbar,
.top-actions,
.zoom-tools {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  min-width: 0;
  color: inherit;
  font-size: 17px;
  font-weight: 820;
  text-decoration: none;
  border-radius: 10px;
  transition: transform 150ms ease, opacity 150ms ease;
}

.brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.brand:focus-visible {
  outline: 3px solid rgba(47, 93, 245, 0.25);
  outline-offset: 4px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.12);
}

.mobile-menu-button {
  display: none;
}

.mobile-mode-tabs {
  display: none;
}

.mobile-drawer[hidden] {
  display: none !important;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  align-items: end;
  padding: 16px;
  background: rgba(15, 23, 42, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mobile-drawer-sheet {
  width: min(460px, 100%);
  max-height: min(76vh, 680px);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  overflow: auto;
  padding: 18px;
  color: #1c1a17;
  background: #fffaf2;
  border: 1px solid #dbc9ad;
  border-radius: 24px 24px 18px 18px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.28);
}

.mobile-drawer-head,
.mobile-drawer-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-drawer-head span,
.mobile-drawer-nav button {
  color: #8c4a19;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mobile-drawer-head strong {
  display: block;
  margin-top: 2px;
  font-family: var(--display-font);
  font-size: 26px;
  line-height: 1;
}

.mobile-drawer-head button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #1c1a17;
  background: #ffffff;
  border: 1px solid #dbc9ad;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

.mobile-drawer-account {
  padding: 12px;
  color: #4f463d;
  background: #f7efe2;
  border: 1px solid #e4d4bc;
  border-radius: 16px;
}

.mobile-drawer-account span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-drawer-account button,
.mobile-drawer-pricing button {
  min-height: 42px;
  padding: 0 14px;
  color: #fffaf2;
  background: #1c1a17;
  border: 1px solid #1c1a17;
  border-radius: 13px;
  font-weight: 900;
}

.mobile-drawer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-drawer-nav button {
  min-height: 86px;
  padding: 14px;
  color: #1c1a17;
  background: #ffffff;
  border: 1px solid #e4d4bc;
  border-radius: 16px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.mobile-drawer-pricing {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #1c1a17;
  border-radius: 18px;
  color: #fffaf2;
}

.mobile-drawer-pricing strong {
  font-size: 16px;
}

.mobile-drawer-pricing p {
  margin: 0;
  color: #d7cab7;
  font-size: 13px;
  line-height: 1.45;
}

svg {
  width: 18px;
  height: 18px;
}

svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg .bite-mark-cut {
  stroke: var(--coral);
  stroke-width: 2.35;
}

.toolbar {
  gap: 6px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  justify-self: center;
  padding: 4px;
  overflow: visible;
  background: #f5faf8;
  border: 1px solid #dcece7;
  border-radius: var(--radius);
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: var(--line);
}

.top-actions {
  position: relative;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#accountButton {
  max-width: 150px;
}

.support-action {
  color: #315c52;
}

.recompress-action {
  color: var(--blue-dark);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 76px;
  z-index: 25;
  display: grid;
  gap: 4px;
  width: min(260px, calc(100vw - 28px));
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.18);
}

.account-menu strong {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu button {
  min-height: 34px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 760;
}

.account-menu button:hover {
  color: var(--text);
  background: var(--surface-soft);
}

#accountLabel {
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-button,
.icon-button,
.primary-drop-button {
  min-height: 34px;
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, color 150ms ease;
}

.tool-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tool-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.primary-drop-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.tool-button.primary,
.primary-drop-button {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%),
    var(--blue);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(49, 92, 246, 0.2);
}

.tool-button.primary:hover:not(:disabled),
.primary-drop-button:hover:not(:disabled) {
  background: var(--blue-dark);
}

.tool-button.is-working {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.tool-button.success {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    var(--teal);
  border-color: var(--teal);
  box-shadow: 0 8px 18px rgba(15, 159, 136, 0.18);
}

.tool-button.ghost {
  background: #fff;
}

.tool-button.danger-soft {
  color: #8f2f2f;
}

.tool-button.danger-soft:hover:not(:disabled) {
  color: #b42318;
  background: #fff4f1;
  border-color: #ffcabc;
  box-shadow: 0 8px 20px rgba(201, 61, 61, 0.1);
}

.tool-button.editor-tool.active {
  color: #fff;
  background: #111827;
  border-color: #111827;
  box-shadow:
    0 8px 18px rgba(17, 24, 39, 0.14),
    4px 4px 0 rgba(255, 107, 74, 0.18);
}

.top-actions .tool-button.ghost:not(#accountButton) {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.top-actions .tool-button.ghost:not(#accountButton) span {
  display: none;
}

.tool-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 40;
  width: max-content;
  max-width: 160px;
  padding: 6px 8px;
  color: #fff;
  background: #111827;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 760;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.tool-button[data-tooltip]:hover::after,
.tool-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toolbar .editor-tool span,
#selectAllButton span,
#invertButton span {
  display: none;
}

.toolbar .editor-tool,
#selectAllButton,
#invertButton {
  width: 34px;
  padding: 0;
}

.left-rail,
.inspector {
  min-height: 0;
  background: var(--surface);
}

.left-rail {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.rail-heading,
.inspector-heading,
.range-row,
.job-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rail-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.rail-icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid #ace2d7;
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(13, 159, 135, 0.08);
}

.rail-icon-button:hover {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-size: 17px;
  line-height: 1.18;
}

.count-badge {
  min-width: 34px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-bg);
  text-align: center;
  font-size: 13px;
  font-weight: 780;
}

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: #fbfcfe;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.file-drop.compact {
  min-height: 42px;
  font-size: 13px;
  font-weight: 700;
}

.left-rail.has-docs .file-drop.compact {
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.file-drop.dragging,
.drop-panel.dragging {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue);
}

.document-panel {
  display: grid;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.document-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.document-panel-head strong {
  display: block;
  font-size: 13px;
}

.document-panel-head button {
  min-height: 28px;
  padding: 0 8px;
  color: var(--blue-dark);
  background: #eef4ff;
  border: 1px solid #cbdcff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.file-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.empty-file-state {
  padding: 10px;
  color: var(--muted);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
}

.queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.queue-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.queue-summary div:last-child {
  border-right: 0;
}

.queue-summary span,
.sidebar-insight span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.queue-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-insight,
.sidebar-tools,
.page-cutter {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.2);
  border-radius: var(--radius);
}

.page-cutter {
  background: #fbfcfe;
  border-color: var(--line);
}

.range-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.page-jump {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.page-cutter input {
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 720;
}

.page-cutter button {
  min-height: 34px;
  padding: 0 9px;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid #ace2d7;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
}

.page-cutter button:hover {
  border-color: var(--teal);
}

.page-cutter button:disabled,
.page-cutter input:disabled {
  opacity: 0.48;
}

.sidebar-insight {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.sidebar-insight strong,
.sidebar-tools-head strong {
  display: block;
  font-size: 13px;
}

.sidebar-insight button {
  min-height: 32px;
  padding: 0 10px;
  color: #fff;
  background: var(--teal);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.rail-disclosure.page-cutter,
.rail-disclosure.sidebar-tools,
.rail-disclosure.job-panel,
.rail-disclosure.memory-panel {
  display: block;
  gap: 0;
  padding: 0;
  overflow: visible;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rail-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

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

.rail-disclosure summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.rail-disclosure[open] summary::after {
  transform: rotate(225deg);
}

.rail-disclosure summary b,
.rail-disclosure summary small {
  display: block;
}

.rail-disclosure summary b {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.rail-disclosure summary small {
  margin-top: 1px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rail-disclosure > :not(summary) {
  margin: 0 10px 10px;
}

.rail-disclosure .lane-badge {
  margin-left: auto;
}

.rail-disclosure summary #clearHistoryButton {
  margin-left: auto;
}

.rail-disclosure.memory-panel summary::after,
.rail-disclosure.job-panel summary::after {
  flex: 0 0 auto;
}

.agent-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  max-height: calc(100vh - 118px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0;
  background:
    linear-gradient(135deg, rgba(13, 159, 135, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f6fbfa);
  border: 1px solid rgba(13, 159, 135, 0.25);
  border-radius: 12px;
}

.agent-head,
.agent-ai-head,
.agent-ai-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-head strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

#agentSignal,
#agentTierLabel,
.agent-ai-meta span {
  max-width: 120px;
  padding: 5px 8px;
  overflow: hidden;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid #b9eadf;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-session {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  gap: 6px;
  max-height: 150px;
  min-height: 76px;
  overflow: auto;
  padding-right: 2px;
}

.agent-message {
  display: grid;
  gap: 4px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 159, 136, 0.16);
  border-radius: 8px;
}

.agent-message.user {
  margin-left: 18px;
  background: #f1f6ff;
  border-color: #ccd9ff;
}

.agent-message.compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.agent-message span,
.agent-local-plan span,
.agent-screenshot-state {
  color: #8493a5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.agent-message strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.agent-message p,
#agentText,
.agent-ai-result p,
.agent-ai-result li span,
.agent-ai-warn {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.38;
}

.agent-work-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  color: var(--text);
  background: rgba(247, 251, 250, 0.94);
  border: 1px solid rgba(15, 159, 136, 0.18);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
}

.agent-work-card.running {
  background:
    radial-gradient(circle at 14% 10%, rgba(226, 189, 115, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(247, 251, 250, 0.96));
}

.agent-work-card.complete {
  background: linear-gradient(135deg, rgba(220, 248, 239, 0.62), rgba(255, 255, 255, 0.96));
  border-color: #9fe0d3;
}

.agent-work-card.warning {
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.92), rgba(255, 255, 255, 0.96));
  border-color: #e6c177;
}

.agent-work-card.error {
  border-color: #f0a7a7;
}

.agent-work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.agent-work-head span {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: #075e50;
  background: #dcf8ef;
  border: 1px solid #ace2d7;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-work-card.warning .agent-work-head span {
  color: #8c4a19;
  background: #fff3dc;
  border-color: #e6c177;
}

.agent-work-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.18;
}

.agent-work-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.agent-work-orbit {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 6px;
  width: max-content;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 189, 115, 0.42);
  border-radius: 999px;
}

.agent-work-orbit i {
  width: 8px;
  height: 8px;
  background: #d7b56f;
  border-radius: 999px;
  animation: agentWorkOrbit 1.05s ease-in-out infinite;
}

.agent-work-orbit i:nth-child(2) {
  animation-delay: 0.14s;
}

.agent-work-orbit i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes agentWorkOrbit {
  0%, 80%, 100% {
    opacity: 0.42;
    transform: translateY(0) scale(0.82);
  }
  38% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
}

.agent-work-meter {
  height: 8px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.08);
  border-radius: 999px;
}

.agent-work-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #111827, var(--blue), var(--teal));
  border-radius: inherit;
}

.agent-work-card.warning .agent-work-meter span {
  background: linear-gradient(90deg, #8c4a19, #e2bd73);
}

.agent-work-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.agent-work-stats div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(214, 232, 226, 0.88);
  border-radius: 8px;
}

.agent-work-stats span {
  overflow: hidden;
  color: #718096;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.agent-work-stats strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-work-decision {
  color: var(--text) !important;
  font-weight: 820;
}

.agent-work-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-work-steps span {
  min-height: 26px;
  padding: 6px 10px;
  color: #075e50;
  background: rgba(220, 248, 239, 0.66);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-work-steps span.active {
  color: #0f2d29;
  background: #c9eee7;
}

.agent-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.agent-command-grid button,
.agent-composer-actions button,
.agent-panel .agent-apply-button,
#agentActionButton {
  min-height: 34px;
  padding: 0 10px;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d6e8e2;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.agent-command-grid button:hover:not(:disabled),
.agent-composer-actions button:hover:not(:disabled),
#agentActionButton:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.1);
}

.agent-local-plan {
  display: grid;
  gap: 7px;
  padding: 9px;
  background: rgba(246, 251, 250, 0.86);
  border: 1px solid rgba(15, 159, 136, 0.13);
  border-radius: 8px;
}

.agent-trace {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-trace li {
  position: relative;
  min-height: 24px;
  padding: 5px 7px 5px 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(15, 159, 136, 0.12);
  border-radius: 7px;
  font-size: 10.5px;
  line-height: 1.28;
}

.agent-trace li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 9px;
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 999px;
  transform: translateY(-50%);
}

.agent-thinking,
.agent-memory {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 159, 136, 0.16);
  border-radius: 8px;
}

.agent-thinking summary,
.agent-memory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  cursor: pointer;
}

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

.agent-thinking summary span,
.agent-memory-head span,
.agent-thinking-list li span,
.agent-memory-item span,
.agent-memory-empty {
  color: #8493a5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.agent-thinking summary strong {
  color: var(--text);
  font-size: 11px;
}

.agent-thinking-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 9px 9px;
  list-style: none;
}

.agent-thinking-list li {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 6px 7px 6px 26px;
  background: rgba(246, 251, 250, 0.92);
  border: 1px solid rgba(15, 159, 136, 0.12);
  border-radius: 7px;
}

.agent-thinking-list li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 10px;
  width: 8px;
  height: 8px;
  background: #c9d7d4;
  border-radius: 999px;
}

.agent-thinking-list li.done::before {
  background: var(--teal);
}

.agent-thinking-list li.active::before {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(53, 91, 239, 0.12);
}

.agent-thinking-list li.blocked::before {
  background: #c77900;
}

.agent-thinking-list li strong,
.agent-memory-item strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.25;
}

.agent-thinking-list li p,
.agent-memory-item p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.32;
}

.agent-memory {
  display: grid;
}

.agent-memory-head button {
  min-height: 26px;
  padding: 0 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #d6e8e2;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.agent-memory-list {
  display: grid;
  gap: 6px;
  max-height: 92px;
  overflow: auto;
  padding: 0 9px 9px;
}

.agent-memory-item {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  background: rgba(246, 251, 250, 0.8);
  border: 1px solid rgba(15, 159, 136, 0.11);
  border-radius: 7px;
}

.agent-memory-empty {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

#agentActionButton,
#agentAiButton {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.agent-panel button:disabled {
  color: var(--faint);
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.agent-ai-box {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: auto -3px -3px;
  padding: 10px 3px 3px;
  border-top: 1px solid rgba(15, 159, 136, 0.16);
  background:
    linear-gradient(180deg, rgba(247, 251, 250, 0), #f7fbfa 22%),
    #f7fbfa;
  box-shadow: 0 -16px 28px rgba(247, 251, 250, 0.92);
}

.agent-ai-head strong {
  font-size: 12px;
}

.agent-ai-box textarea {
  min-height: 72px;
  margin: 0;
  padding: 10px;
  font-size: 12px;
  line-height: 1.36;
  border-radius: 8px;
}

.agent-composer-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
}

#agentScreenshotButton.active {
  color: #075e50;
  background: var(--teal-soft);
  border-color: #ace2d7;
}

.agent-screenshot-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.agent-ai-result {
  display: grid;
  gap: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 159, 136, 0.16);
  border-radius: 8px;
}

.agent-ai-result strong {
  font-size: 12px;
}

.agent-ai-result ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 16px;
}

.agent-ai-result li b {
  display: block;
  color: var(--text);
  font-size: 11px;
}

.agent-ai-thinking {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.agent-ai-thinking p {
  margin: 0;
}

.agent-ai-warn {
  padding: 7px;
  color: #875000;
  background: var(--amber-bg);
  border: 1px solid #efd08b;
  border-radius: 6px;
}

.agent-panel .agent-apply-button {
  color: #075e50;
  background: var(--teal-soft);
  border-color: #ace2d7;
}

.agent-panel.busy {
  border-color: #cbdcff;
}

.agent-panel.busy #agentSignal {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #cbdcff;
}

.agent-panel.revenue {
  border-color: #f3d390;
  background:
    linear-gradient(135deg, rgba(255, 245, 223, 0.88), rgba(255, 255, 255, 0.9)),
    #fff;
}

.agent-panel.revenue #agentSignal {
  color: #875000;
  background: var(--amber-bg);
  border-color: #efd08b;
}

.agent-panel.ready {
  border-color: #b9eadf;
}

.sidebar-tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.sidebar-tool-grid button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-tool-grid button::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 8;
  width: max-content;
  max-width: 170px;
  padding: 6px 8px;
  color: #fff;
  background: #111827;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
  font-size: 10px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.sidebar-tool-grid button:hover::after,
.sidebar-tool-grid button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sidebar-tool-grid button:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 14px rgba(49, 92, 246, 0.08);
}

.job-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.memory-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.memory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.memory-head strong {
  display: block;
  font-size: 13px;
}

.memory-head button {
  min-height: 26px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 760;
}

.memory-list {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.memory-item {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #fbfcfe;
  border: 1px solid #e7edf5;
  border-radius: 6px;
}

.memory-item strong,
.memory-item span,
.memory-item b,
.memory-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-item strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.memory-item span,
.memory-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.memory-item b {
  display: block;
  color: var(--teal);
  font-size: 12px;
}

.legal-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-panel a,
.legal-panel button {
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.legal-panel button {
  color: var(--blue);
}

.rail-disclosure.page-cutter,
.rail-disclosure.sidebar-tools,
.rail-disclosure.job-panel,
.rail-disclosure.memory-panel {
  display: block;
  gap: 0;
  padding: 0;
}

.plan-router .as-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.job-panel-head strong {
  display: block;
  font-size: 13px;
}

.lane-badge {
  padding: 5px 8px;
  color: var(--blue-dark);
  background: #eef4ff;
  border: 1px solid #cbdcff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.job-list {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.job-row {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.job-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-row span {
  color: var(--muted);
}

.job-meter {
  height: 5px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.job-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.file-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 30px;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.file-chip.active {
  background: #f2fbf8;
  border-color: #bce9df;
  box-shadow: inset 3px 0 0 var(--teal);
}

.file-chip-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.file-chip-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 6px;
}

.file-chip-action:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.file-chip-action.danger:hover {
  color: #b42318;
  background: #fff0ed;
}

.file-chip-action svg,
.multi-doc-remove svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 42px;
  overflow: hidden;
  color: #075e50;
  background: #eef7f4;
  border: 1px solid #cfe3dd;
  border-radius: 6px;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumb-label {
  color: var(--teal);
  font-size: 9px;
  font-weight: 900;
}

.file-chip strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-copy {
  min-width: 0;
}

.file-chip small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0 2px 18px 0;
  overflow: auto;
  list-style: none;
}

.page-list:empty {
  display: none;
}

.page-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.page-row.active {
  background: #eef4ff;
  border-color: #cbdcff;
}

.page-row.skipped {
  opacity: 0.56;
}

.thumb-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  color: var(--faint);
  background: #f9fbfd;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  width: 18px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

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

.page-meta strong,
.page-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-meta strong {
  font-size: 13px;
}

.page-meta span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.mini-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
}

.mini-action:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.page-actions {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 4px;
}

.include-box {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.include-box input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(90deg, rgba(28, 38, 53, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 38, 53, 0.04) 1px, transparent 1px),
    #f3f6fa;
  background-size: 30px 30px;
}

.drop-screen,
.editor {
  width: 100%;
  height: 100%;
}

.drop-screen {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
}

.entry-hero {
  display: grid;
  justify-items: center;
  width: min(740px, 100%);
  text-align: center;
}

.entry-hero h2 {
  margin: 6px 0 0;
  font-size: 56px;
  line-height: 0.96;
  letter-spacing: 0;
}

.entry-hero > p:not(.eyebrow) {
  max-width: 590px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.entry-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.entry-proof span {
  padding: 6px 9px;
  color: #315c52;
  background: rgba(229, 247, 243, 0.82);
  border: 1px solid rgba(15, 159, 136, 0.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.drop-panel {
  display: grid;
  justify-items: center;
  width: min(430px, 100%);
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(184, 197, 214, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: 1px dashed rgba(96, 112, 132, 0.34);
  outline-offset: -8px;
}

.drop-panel svg {
  width: 34px;
  height: 34px;
  padding: 9px;
  color: var(--blue);
  margin-bottom: 14px;
  background: var(--blue-soft);
  border: 1px solid #cdd9ff;
  border-radius: var(--radius);
  box-sizing: content-box;
}

.drop-panel h2 {
  max-width: 360px;
  font-size: 22px;
  line-height: 1.15;
}

.drop-panel p {
  max-width: 320px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.drop-capabilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 13px;
}

.drop-capabilities span {
  min-height: 24px;
  padding: 4px 8px;
  color: #0f513f;
  background: var(--teal-soft);
  border: 1px solid rgba(15, 159, 136, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.primary-drop-button {
  margin-top: 16px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 760;
}

.editor {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  padding: 10px 12px 12px;
  gap: 7px;
}

.preview-toolbar,
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-toolbar {
  position: relative;
  min-height: 48px;
}

.result-dock {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(250px, auto) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(213, 248, 240, 0.68), rgba(255, 255, 255, 0.96) 42%),
    #ffffff;
  border: 1px solid rgba(15, 159, 136, 0.26);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
}

.result-dock h3 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.result-dock p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
}

.result-stats span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.16);
  border-radius: 6px;
}

.result-stats b {
  color: var(--text);
  font-size: 18px;
}

.result-stats b.positive {
  color: var(--teal);
}

.result-stats b.negative {
  color: var(--amber);
}

.result-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.preview-toolbar p {
  max-width: min(32vw, 340px);
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-toolbar strong {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  line-height: 1.1;
}

.processing-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  min-height: 30px;
  padding: 0 10px;
  gap: 7px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cbdcff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.processing-pill[hidden] {
  display: inline-flex !important;
  visibility: hidden;
  pointer-events: none;
}

.compression-viz {
  display: none !important;
  grid-template-columns: 16px 16px 16px minmax(120px, auto);
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 11px;
  color: #075e50;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.66), transparent 38%, rgba(255, 255, 255, 0.46)),
    #f0fbf8;
  background-size: 220% 100%;
  border: 1px solid #bce9df;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  animation: confidenceSweep 1800ms ease-in-out infinite;
}

.compression-viz span {
  display: block;
  width: 16px;
  height: 8px;
  background: var(--teal);
  border-radius: 999px;
  animation: bitePulse 780ms ease-in-out infinite;
}

.multi-doc-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 260px);
  gap: 10px;
  overflow-x: auto;
  padding: 3px;
}

.multi-doc-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.multi-doc-select {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.multi-doc-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid transparent;
  border-radius: 6px;
}

.multi-doc-remove:hover {
  color: #b42318;
  background: #fff0ed;
  border-color: #ffd2cc;
}

.multi-doc-card.active {
  background: #f1fbf8;
  border-color: #aee1d7;
  box-shadow: inset 3px 0 0 var(--teal);
}

.multi-doc-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 40px;
  overflow: hidden;
  color: var(--teal);
  background: #eef7f4;
  border: 1px solid #cfe3dd;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 900;
}

.multi-doc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.multi-doc-select span:last-child {
  min-width: 0;
}

.multi-doc-select strong,
.multi-doc-select small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-doc-select strong {
  font-size: 12px;
}

.multi-doc-select small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.compression-viz span:nth-child(2) {
  animation-delay: 120ms;
}

.compression-viz span:nth-child(3) {
  animation-delay: 240ms;
}

.compression-viz strong {
  overflow: hidden;
  max-width: 260px;
  font-size: 11px;
  text-overflow: ellipsis;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(36, 107, 254, 0.22);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 680ms linear infinite;
}

.zoom-tools {
  gap: 6px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.zoom-reset-button {
  min-width: 46px;
  height: 34px;
  padding: 0 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
}

.page-nav-button {
  color: #075e50;
  background: var(--teal-soft);
  border-color: #b9eadf;
}

.workspace-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 46px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 159, 136, 0.18);
  border-radius: var(--radius);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.workspace-actions::-webkit-scrollbar {
  display: none;
}

.workspace-actions button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  color: #152033;
  background: #f8fbfa;
  border: 1px solid #d7e7e2;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.workspace-actions button:hover {
  color: #075e50;
  border-color: #aee1d7;
  background: var(--teal-soft);
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 8px 10px 48px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 16%, rgba(47, 93, 245, 0.055), transparent 22rem),
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    rgba(233, 238, 245, 0.66);
  background-size: auto, 30px 30px, 30px 30px, auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-frame {
  position: relative;
  display: grid;
  place-items: center;
}

#previewCanvas {
  position: relative;
  z-index: 0;
  max-width: 100%;
  max-height: 100%;
  cursor: zoom-in;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 22px 70px rgba(25, 36, 54, 0.2);
}

.preview-frame.is-zoomed #previewCanvas {
  max-width: none;
  max-height: none;
  cursor: grab;
}

.preview-stage.panning,
.preview-stage.panning #previewCanvas {
  cursor: grabbing;
  user-select: none;
}

.restored-export-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  width: min(760px, calc(100% - 28px));
  padding: clamp(22px, 3.2vw, 34px);
  overflow: hidden;
  color: #111827;
  background:
    linear-gradient(135deg, rgba(220, 248, 239, 0.92), rgba(255, 255, 255, 0.96) 42%, rgba(235, 242, 255, 0.9)),
    #fff;
  border: 1px solid #bce9df;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
}

.restored-export-panel[hidden] {
  display: none;
}

.restored-export-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #0d9f87;
  background: #ffffff;
  border: 1px solid #cdeee6;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(13, 159, 135, 0.16);
}

.restored-export-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.restored-export-panel h2 {
  margin: 3px 0 0;
  max-width: 14ch;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.restored-export-copy {
  max-width: 52ch;
  margin: 10px 0 0;
  color: #526579;
  font-size: 15px;
  line-height: 1.45;
}

.restored-export-filename {
  display: inline-flex;
  max-width: min(100%, 680px);
  margin: 12px 0 0;
  padding: 8px 12px;
  overflow: hidden;
  color: #0f3f38;
  background: rgba(231, 250, 245, 0.94);
  border: 1px solid #bce9df;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 880;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restored-export-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.restored-export-stats span {
  min-width: 0;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #cdeee6;
  border-radius: 10px;
}

.restored-export-stats b,
.restored-export-stats small {
  display: block;
}

.restored-export-stats b {
  overflow: hidden;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restored-export-stats small {
  margin-top: 2px;
  color: #526579;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.restored-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.restored-export-actions button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 900;
}

.restored-export-actions .primary-action {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 14px 30px rgba(47, 93, 245, 0.2);
}

.restored-export-actions .secondary-action {
  color: #0f172a;
  background: #fff;
  border: 1px solid #cdeee6;
}

.page-dock {
  position: sticky;
  bottom: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  align-self: end;
  gap: 10px;
  max-width: min(92%, 720px);
  min-height: 44px;
  margin-top: 12px;
  padding: 6px 8px;
  color: #172033;
  background:
    linear-gradient(135deg, rgba(220, 248, 239, 0.9), rgba(255, 255, 255, 0.96)),
    #fff;
  border: 1px solid #bce9df;
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.page-dock-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #075e50;
  background: #fff;
  border: 1px solid #ccece5;
  border-radius: 999px;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.page-dock-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--teal-soft);
  border-color: #9bd9ce;
}

.page-dock.single-page {
  min-height: 36px;
  padding: 5px 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(220, 248, 239, 0.7)),
    #fff;
}

.page-dock.single-page .page-dock-button,
.page-dock.single-page .page-dots {
  display: none;
}

.page-dock.single-page span:last-child {
  min-width: 0;
  color: #075e50;
  font-size: 12px;
}

.page-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.page-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: #aebdcb;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    width 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.page-dot:hover {
  transform: scale(1.28);
  background: #6e8094;
}

.page-dot.active {
  width: 32px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: 0 0 0 5px rgba(13, 159, 135, 0.12);
  animation: pageDotBreathe 1500ms ease-in-out infinite;
}

.page-dot.skipped {
  background: #e3a18f;
}

.page-dot.active.skipped {
  background: linear-gradient(90deg, var(--amber), var(--coral));
}

.page-dot-gap {
  color: #8291a5;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.page-dock span:last-child {
  min-width: 76px;
  color: #526579;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.pdf-text-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
  user-select: text;
}

.pdf-text-layer span {
  position: absolute;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: transparent;
  line-height: 1;
  white-space: pre;
  cursor: text;
  transform-origin: 0 0;
}

.pdf-text-layer span::selection {
  color: transparent;
  background: rgba(47, 93, 245, 0.32);
}

.pdf-entity-highlight {
  position: absolute;
  z-index: 0;
  box-sizing: border-box;
  border: 1px solid rgba(245, 158, 11, 0.72);
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.12);
  pointer-events: none;
}

.pdf-entity-highlight[data-entity-kind="email"] {
  border-color: rgba(13, 159, 135, 0.72);
  background: rgba(13, 159, 135, 0.12);
}

.pdf-entity-highlight[data-entity-kind="date"] {
  border-color: rgba(47, 93, 245, 0.72);
  background: rgba(47, 93, 245, 0.12);
}

.annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.annotation {
  position: absolute;
  display: grid;
  align-items: center;
  min-width: 28px;
  min-height: 18px;
  padding: 2px 4px;
  overflow: hidden;
  color: #111827;
  border: 1px solid rgba(36, 107, 254, 0.5);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.annotation:active {
  cursor: grabbing;
}

.annotation.selected {
  z-index: 5;
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.annotation.redact-white {
  border-color: rgba(17, 24, 39, 0.28);
  background: #fff;
}

.annotation.redact-black {
  border-color: #111827;
  background: #111827;
}

.annotation.signature {
  padding: 0;
  border-color: rgba(19, 138, 93, 0.55);
  background: rgba(255, 255, 255, 0.3);
}

.annotation.signature img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.annotation.stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  color: #138a5d;
  background: rgba(232, 247, 240, 0.9);
  border: 2px solid currentColor;
  border-radius: 4px;
  font-size: clamp(10px, 1.5vw, 18px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.annotation.stamp[data-tone="blue"] {
  color: #2444d8;
  background: rgba(47, 93, 245, 0.08);
}

.annotation.stamp[data-tone="teal"] {
  color: #0d7f70;
  background: rgba(220, 248, 239, 0.9);
}

.annotation.stamp[data-tone="amber"] {
  color: #9a5a00;
  background: rgba(255, 245, 223, 0.88);
}

.annotation.stamp[data-tone="danger"] {
  color: #b42318;
  background: rgba(255, 241, 241, 0.9);
}

.annotation.text,
.annotation.stamp {
  overflow: visible;
}

.annotation-resize {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: var(--blue);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
  cursor: nwse-resize;
}

.render-state {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.status-strip {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 13px;
}

.compression-evaluating .status-strip {
  background:
    linear-gradient(90deg, rgba(220, 248, 239, 0.86), rgba(255, 255, 255, 0.96) 52%, rgba(233, 238, 255, 0.86)),
    #fff;
  border-color: #bce9df;
}

.compression-evaluating #statusText {
  color: #0f3f38;
  font-weight: 780;
}

.status-strip > div:first-child {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.busy {
  background: var(--blue);
}

.status-dot.warn {
  background: var(--amber);
}

.status-dot.error {
  background: var(--danger);
}

#statusText {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  width: 180px;
  height: 8px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 180ms ease;
}

.progress-track span.busy {
  background-image: linear-gradient(90deg, var(--blue), var(--teal), var(--blue));
  background-size: 180% 100%;
  animation: shimmer 900ms ease-in-out infinite;
}

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

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 180% 50%;
  }
}

@keyframes bitePulse {
  0%,
  100% {
    opacity: 0.32;
    transform: scaleX(0.56);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes confidenceSweep {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

@keyframes pageDotBreathe {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.86);
  }
}

@keyframes checkoutReturnBanner {
  0% {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  10%,
  82% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}

.inspector {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-left: 1px solid var(--line);
  overflow: auto;
}

.setting-block,
.size-panel,
.notice {
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.inspector-tabs button {
  min-height: 32px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 780;
}

.inspector-tabs button.active {
  color: #fff;
  background: var(--text);
}

.inspector-panel {
  display: contents;
}

#accessPanel > .setting-block {
  display: none;
}

.setting-label,
.range-row label {
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.tool-readout {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
}

textarea,
.support-form input,
.support-form select,
.modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  margin-top: 10px;
  padding: 10px;
  resize: vertical;
}

textarea:focus,
.support-form input:focus,
.support-form select:focus,
.modal input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(36, 107, 254, 0.16);
}

.clerk-auth-mount {
  margin-top: 14px;
}

.wide-button {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 760;
}

.wide-button.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.wide-button.subtle {
  color: var(--muted);
  background: transparent;
}

.signature-controls {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.swatch-row {
  display: flex;
  gap: 8px;
}

.swatch-row button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--swatch, #111827);
}

.swatch-row button[data-sign-color="#111827"] {
  --swatch: #111827;
}

.swatch-row button[data-sign-color="#0d9f87"] {
  --swatch: #0d9f87;
}

.swatch-row button[data-sign-color="#2f5df5"] {
  --swatch: #2f5df5;
}

.swatch-row button.active {
  box-shadow: 0 0 0 3px rgba(47, 93, 245, 0.2);
}

.compact-range {
  margin-top: 0;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stamp-grid button {
  min-height: 36px;
  padding: 0 8px;
  color: #315c52;
  background: #f5faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.stamp-grid button.active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.check-row.compact {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 650;
}

.annotation-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.annotation-item {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.annotation-item.selected {
  background: #eef4ff;
  border-color: rgba(36, 107, 254, 0.45);
}

.annotation-item button {
  width: 28px;
  height: 28px;
  color: var(--danger);
  background: transparent;
  border-radius: 6px;
}

.access-status strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 18px;
}

.pricing-stack {
  display: grid;
  gap: 10px;
}

.price-card {
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.price-card:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 10px 26px rgba(49, 92, 246, 0.1);
}

.price-card.highlighted {
  border-color: #bcd0ff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.08);
}

.price-card span,
.price-card p {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.price-card strong {
  display: block;
  margin: 4px 0;
  font-size: 21px;
}

.support-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.segmented button {
  min-height: 32px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 760;
}

.segmented button.active {
  color: #fff;
  background: var(--text);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.16);
}

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

.quick-tools,
.capability-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

#compressPanel .quick-tools-block,
#compressPanel .size-panel {
  display: none;
}

.quick-tools button,
.capability-grid span {
  min-height: 32px;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 760;
}

.quick-tools button {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.quick-tools button:hover {
  border-color: var(--blue);
}

.capability-grid span {
  display: flex;
  align-items: center;
  color: var(--blue-dark);
  background: #eef4ff;
  border: 1px solid #cbdcff;
}

.range-row output {
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
}

.target-control {
  background: linear-gradient(180deg, #ffffff, #f2fbf8);
  border-color: #bce9df;
}

.target-control output {
  color: #075e50;
}

input[type="range"] {
  width: 100%;
  margin: 12px 0 7px;
  accent-color: var(--blue);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.checks {
  display: grid;
  gap: 12px;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.check-row input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.size-panel {
  display: grid;
  gap: 8px;
}

.size-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.size-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.size-panel strong {
  font-size: 18px;
}

#savedPercent.positive {
  color: var(--green);
}

#savedPercent.negative {
  color: var(--danger);
}

.notice {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  color: var(--amber);
  background: var(--amber-bg);
  border-color: #f1d59a;
}

.notice p {
  color: #745119;
  font-size: 12px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.48);
}

.checkout-reward {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 60;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100% - 28px));
  padding: 12px 14px;
  color: #111827;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #bfe2dc;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
  opacity: 0;
  transform: translate(-50%, -16px) scale(0.98);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.checkout-reward.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.checkout-reward-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #075e50;
  background: linear-gradient(135deg, #dcf8ef, #eef9f6);
  border: 1px solid #aee3d8;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.checkout-reward strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.checkout-reward p {
  margin: 2px 0 0;
  color: #526579;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 720;
}

.modal,
.signature-modal,
.quick-view-modal,
.support-modal,
.form-library-modal {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(17, 24, 39, 0.28);
}

.modal {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: var(--radius);
  font-size: 24px;
  line-height: 1;
}

.modal-auth,
.modal-plans,
.signature-modal,
.quick-view-modal,
.support-modal,
.form-library-modal,
.level-modal {
  padding: 26px;
}

.modal-auth {
  border-right: 1px solid var(--line);
}

.modal-auth h2,
.signature-modal h2,
.quick-view-modal h2,
.support-modal h2,
.level-modal h2 {
  font-size: 26px;
  line-height: 1.15;
}

.level-modal {
  position: relative;
  width: min(1040px, 100%);
  background:
    linear-gradient(135deg, rgba(15, 159, 136, 0.08), transparent 42%),
    #ffffff;
  border: 1px solid #cfe5df;
  border-radius: 14px;
  box-shadow: var(--shadow-strong);
}

.level-modal-head {
  max-width: 760px;
}

.level-modal-head p:not(.eyebrow),
.level-footnote {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.level-file-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.level-file-summary span {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.2);
  border-radius: var(--radius);
}

.level-file-summary b {
  color: var(--text);
  font-size: 18px;
}

.level-file-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.level-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.level-options button {
  display: grid;
  gap: 7px;
  min-height: 188px;
  padding: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.level-options button:hover,
.level-options button.active {
  border-color: var(--teal);
  box-shadow:
    0 0 0 3px rgba(15, 159, 136, 0.12),
    0 18px 38px rgba(15, 23, 42, 0.08);
}

.level-options button.recommended {
  border-color: var(--blue);
}

.level-options span {
  width: fit-content;
  padding: 5px 8px;
  color: #075e50;
  background: var(--teal-soft);
  border: 1px solid rgba(15, 159, 136, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.level-options strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.12;
}

.level-options small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.level-estimate {
  display: grid;
  gap: 2px;
  align-self: end;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  color: #075e50;
  background: #f2fbf8;
  border: 1px solid rgba(15, 159, 136, 0.2);
  border-radius: 8px;
}

.level-estimate b {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.level-estimate em {
  color: var(--teal);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.modal-auth p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.unlock-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(82px, 0.72fr);
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.24);
  border-radius: var(--radius);
}

.unlock-result div {
  display: grid;
  gap: 3px;
}

.unlock-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.unlock-result strong {
  color: var(--text);
  font-size: 18px;
}

.size-arrow {
  color: var(--teal);
  font-size: 20px;
  font-weight: 900;
}

.unlock-result strong.positive {
  color: var(--teal);
}

.unlock-result strong.negative {
  color: var(--amber);
}

.unlock-result p {
  grid-column: 1 / -1;
  margin-top: 0;
  color: #315c52;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.modal-auth label {
  display: block;
  margin-top: 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.modal-auth input {
  min-height: 42px;
  margin-top: 8px;
  padding: 0 12px;
}

.modal-note {
  margin-top: 12px;
  padding: 10px;
  color: #745119;
  background: var(--amber-bg);
  border: 1px solid #f1d59a;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.4;
}

.checkout-stage {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 12px;
  color: #0c6d5f;
  background: linear-gradient(135deg, #eef9f6, #f3f6ff);
  border: 1px solid #bfe2dc;
  border-radius: var(--radius);
}

.checkout-stage strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.checkout-stage p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.modal-plans {
  display: grid;
  align-content: start;
  gap: 12px;
  background: #fbfdfc;
}

.local-pricing-note {
  padding: 10px 12px;
  color: #3f5369;
  background: #ffffff;
  border: 1px solid #d7e7e2;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 820;
}

.launch-promo-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 11px 12px;
  color: #243044;
  background: #fffaf0;
  border: 1px solid #f1d99d;
  border-radius: var(--radius);
}

.public-service-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: #243044;
  background: #f7fbff;
  border: 1px solid #bfd7f8;
  border-radius: var(--radius);
}

.public-service-note span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-service-note strong {
  color: #111827;
  font-size: 13px;
}

.public-service-note small {
  color: #536276;
  font-size: 11px;
  line-height: 1.35;
}

.public-service-note a {
  width: fit-content;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.launch-promo-note span {
  color: #8a610b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.launch-promo-note strong {
  color: #111827;
  font-size: 13px;
}

.launch-promo-note small {
  grid-column: 1 / -1;
  color: #536276;
  font-size: 11px;
  line-height: 1.35;
}

.modal-plan-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.modal-plan-trust span {
  padding: 6px 8px;
  color: #075e50;
  background: #eaf8f4;
  border: 1px solid #c4e8df;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.plan-button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 14px;
  min-width: 0;
  min-height: 78px;
  padding: 14px 16px;
  overflow: hidden;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan-button.recommended {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.1);
}

.plan-button.context-best {
  background:
    linear-gradient(135deg, rgba(36, 107, 254, 0.06), rgba(15, 159, 136, 0.06)),
    #fff;
}

.plan-button.context-upgrade {
  border-color: #bfe4da;
}

.plan-button.upsell-pulse {
  border-color: var(--blue);
  box-shadow:
    0 0 0 3px rgba(36, 107, 254, 0.12),
    0 14px 30px rgba(36, 107, 254, 0.12);
  transform: none;
}

.plan-button.is-loading {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.modal-plans .plan-button:disabled:not(.is-loading) {
  opacity: 1;
}

.plan-button.is-loading strong,
.plan-button.is-loading small,
.plan-button.is-loading span {
  color: #fff;
}

.plan-button.is-loading::after {
  content: "Preparing";
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
}

.plan-button span {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}

.plan-button strong {
  color: var(--blue);
  font-size: 22px;
  white-space: nowrap;
}

.plan-button small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.signature-modal {
  width: min(720px, 100%);
}

.support-modal {
  width: min(620px, 100%);
}

.quick-view-modal {
  width: min(980px, 100%);
}

.quick-view-body {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(260px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.quick-preview {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    #f3f6fa;
  background-size: 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick-preview img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.18);
}

.form-library-modal {
  width: min(780px, 100%);
  padding: 26px;
}

.form-library-modal h2 {
  margin-top: 4px;
  font-size: 26px;
}

.form-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.form-library-grid button {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 58px;
  padding: 0 14px;
  color: var(--text);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  font-size: 15px;
  font-weight: 820;
}

.form-library-grid button small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.form-library-grid button:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(13, 159, 135, 0.08);
}

.asset-tray {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 18;
}

.asset-tray-toggle {
  display: grid;
  grid-template-columns: 20px auto;
  place-items: center;
  gap: 7px;
  min-width: 58px;
  height: 42px;
  padding: 0 10px;
  color: #075e50;
  background: #ffffff;
  border: 1px solid #bce9df;
  border-radius: 999px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
}

.asset-tray-toggle span {
  min-width: 18px;
  padding: 2px 6px;
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.asset-tray-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 10px;
  width: min(330px, calc(100vw - 36px));
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.asset-tray-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.asset-tray-head strong {
  display: block;
  font-size: 14px;
}

.asset-tray-head button {
  min-height: 28px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.asset-drop-zone {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f7fbfa;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.asset-drop-zone.dragging {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue);
}

.asset-drop-zone button {
  min-height: 32px;
  color: #fff;
  background: var(--teal);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.asset-list {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow: auto;
  color: var(--muted);
  font-size: 12px;
}

.asset-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.asset-item strong,
.asset-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-item strong {
  color: var(--text);
  font-size: 12px;
}

.asset-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.asset-item button {
  width: 28px;
  height: 28px;
  color: var(--danger);
  background: transparent;
  border-radius: 6px;
  font-size: 20px;
}

.quick-preview-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-view-details dl {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.quick-view-details div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.quick-view-details dt {
  color: var(--faint);
  font-size: 12px;
  font-weight: 820;
}

.quick-view-details dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-modal label {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.optional-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 760;
}

.support-modal input,
.support-modal textarea {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
}

.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#signatureCanvas {
  width: 100%;
  height: 220px;
  margin-top: 18px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  touch-action: none;
}

.signature-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 42px auto;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.legal-page h1 {
  margin: 14px 0 4px;
  font-size: 38px;
  line-height: 1.05;
}

.legal-page h2 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.65;
}

.legal-page ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.legal-page li::marker {
  color: var(--teal);
}

.legal-page a {
  color: var(--blue);
  font-weight: 760;
  text-decoration: none;
}

.legal-back {
  display: inline-flex;
  margin-bottom: 8px;
}

.support-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 20px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.support-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
}

.support-form label span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 760;
}

.support-form input,
.support-form select {
  min-height: 42px;
  padding: 0 12px;
  background: #fff;
}

.support-form textarea {
  margin-top: 0;
}

.support-form button {
  min-height: 46px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 850;
}

.support-form-note {
  margin: 0;
  font-size: 13px;
}

.support-form-note.sent {
  color: var(--green);
}

.support-form-note.error {
  color: var(--danger);
}

@media (max-width: 1480px) {
  .toolbar .editor-tool span,
  #selectAllButton span,
  #invertButton span {
    display: none;
  }

  .toolbar .tool-button {
    width: 38px;
    padding: 0;
  }

  .toolbar #openButton {
    width: auto;
    padding: 0 12px;
  }
}

@media (max-width: 1180px) {
  .seo-header,
  .pricing-header,
  .share-header {
    grid-template-columns: 1fr auto;
  }

  .seo-nav {
    display: none;
  }

  .pricing-preview-card {
    grid-template-columns: 1fr;
  }

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

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

  .share-hero,
  .share-workspace,
  .share-pending-shell {
    grid-template-columns: 1fr;
  }

  .share-side-stack {
    order: 3;
  }

  .share-main-panel {
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  }

  .seo-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .seo-copy {
    text-align: center;
  }

  .seo-copy h1,
  .seo-copy p,
  .seo-proof-list {
    margin-right: auto;
    margin-left: auto;
  }

  .seo-agent-outcome,
  .seo-bite-meter {
    margin-right: auto;
    margin-left: auto;
  }

  .app-shell {
    grid-template-columns: minmax(220px, 270px) minmax(380px, 1fr);
    grid-template-rows: 64px minmax(0, 1fr) auto;
    min-height: 820px;
  }

  .topbar {
    grid-template-columns: minmax(190px, 250px) minmax(220px, 1fr) auto;
  }

  .inspector {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    align-items: start;
    max-height: 300px;
  }

  .inspector-heading {
    grid-column: 1 / -1;
  }

  .inspector-tabs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .seo-header,
  .pricing-header,
  .seo-hero,
  .seo-steps,
  .seo-answer-strip,
  .seo-media-proof,
  .seo-competitor-brief,
  .seo-intent-links,
  .seo-difference,
  .pricing-hero,
  .pricing-choice,
  .pricing-paid-grid,
  .pricing-grid,
  .pricing-advisor,
  .pricing-compare,
  .pricing-ai,
  .pricing-faq {
    width: calc(100% - 32px);
  }

  .share-header,
  .share-hero,
  .share-workspace,
  .share-pending-shell,
  .share-pending-formats {
    width: calc(100% - 32px);
  }

  .seo-hero {
    gap: 30px;
    padding-top: 32px;
  }

  .seo-copy h1 {
    max-width: 520px;
    font-size: clamp(36px, 7vw, 52px);
  }

  .seo-bite-meter {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 390px;
  }

  .seo-bite-meter i {
    width: 100%;
  }

  .seo-chat-dropzone {
    min-height: 500px;
    border-radius: 16px;
  }

  .chat-messages {
    padding: 16px;
  }

  .chat-message {
    max-width: 94%;
  }

  .chat-message .bubble {
    max-width: 100%;
  }

  .landing-agent-form {
    grid-template-columns: 1fr;
  }

  .landing-agent-submit {
    width: 100%;
  }

  .landing-prompt-examples button {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 94px;
  }

  .seo-intent-links {
    grid-template-columns: 1fr;
  }

  .seo-answer-strip,
  .seo-media-proof,
  .seo-competitor-brief {
    grid-template-columns: 1fr;
  }

  .seo-answer-strip > div:last-child,
  .seo-media-proof > div:last-child {
    grid-template-columns: 1fr;
  }

  .seo-intent-links > div:last-child {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .seo-header,
  .pricing-header,
  .share-header {
    width: calc(100% - 28px);
    min-height: 62px;
  }

  .seo-brand {
    font-size: 18px;
  }

  .seo-brand-mark {
    width: 34px;
    height: 34px;
  }

  .seo-login {
    min-height: 38px;
    padding: 0 14px;
  }

  .seo-account {
    max-width: 150px;
    min-height: 38px;
    padding: 5px 6px 5px 10px;
  }

  .seo-account span {
    display: none;
  }

  .seo-hero,
  .seo-steps,
  .seo-answer-strip,
  .seo-media-proof,
  .seo-competitor-brief,
  .seo-intent-links,
  .seo-difference,
  .seo-trust,
  .pricing-hero,
  .pricing-choice,
  .pricing-paid-grid,
  .pricing-grid,
  .pricing-advisor,
  .pricing-compare,
  .pricing-ai,
  .pricing-faq {
    width: calc(100% - 28px);
  }

  .share-header,
  .share-hero,
  .share-workspace,
  .share-pending-shell,
  .share-pending-formats {
    width: calc(100% - 28px);
  }

  .share-pending-shell {
    min-height: auto;
    padding-top: 30px;
  }

  .share-pending-copy h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .share-pending-copy p {
    font-size: 16px;
  }

  .share-hero {
    gap: 18px;
    padding-top: 26px;
  }

  .share-copy h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .share-copy p {
    font-size: 16px;
  }

  .share-route-strip {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .share-route-strip b {
    display: none;
  }

  .share-workspace {
    padding-bottom: 48px;
  }

  .share-main-panel {
    grid-template-columns: 1fr;
  }

  .share-list-head,
  .share-file-row,
  .share-action-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .share-list-head strong {
    text-align: left;
  }

  .share-link-actions {
    justify-content: stretch;
  }

  .pricing-hero {
    padding-top: 36px;
  }

  .pricing-paid-grid,
  .pricing-advisor-grid,
  .pricing-faq-list,
  .pricing-grid,
  .pricing-ai {
    grid-template-columns: 1fr;
  }

  .pricing-preview-card {
    padding: 18px;
  }

  .pricing-section-title,
  .pricing-ai li {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .seo-hero {
    gap: 28px;
    padding: 28px 0 52px;
  }

  .seo-copy h1 {
    max-width: 300px;
    font-size: clamp(29px, 8vw, 36px);
    line-height: 1.04;
  }

  .seo-copy p {
    max-width: 310px;
    margin-top: 16px;
    font-size: 15.5px;
    line-height: 1.45;
  }

  .seo-bite-meter {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 340px;
  }

  .seo-agent-outcome {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 340px;
    text-align: left;
  }

  .seo-bite-meter i {
    width: 100%;
  }

  .seo-proof-list {
    display: none;
    width: 100%;
    max-width: 340px;
    gap: 12px;
    text-align: left;
  }

  .seo-launch-offer,
  .seo-product-hunt-badge {
    display: none;
  }

  .seo-proof-list li {
    font-size: 15px;
  }

  .seo-dropzone {
    min-height: 390px;
    padding: 34px 22px;
  }

  .seo-drop-label {
    justify-self: center;
    margin: -12px 0 0;
  }

  .seo-dropzone::before {
    inset: 14px;
  }

  .seo-step-grid {
    grid-template-columns: 1fr;
  }

  .seo-difference {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .seo-competitor-brief {
    margin-top: -28px;
  }

  .seo-difference li,
  .seo-competitor-brief li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .seo-trust {
    display: grid;
    margin-top: -28px;
    text-align: center;
  }

  .seo-trust div {
    justify-content: center;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    height: auto;
    padding: 12px;
  }

  .brand {
    width: 100%;
  }

  .toolbar,
  .top-actions {
    flex: 1 1 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .tool-button {
    flex: 1 1 30%;
    padding: 0 10px;
  }

  .toolbar-divider {
    display: none;
  }

  .left-rail,
  .inspector,
  .workspace {
    width: 100%;
    min-height: auto;
    border: 0;
  }

  .left-rail {
    max-height: 420px;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    min-height: 560px;
  }

  .inspector {
    display: flex;
    max-height: none;
  }

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

  .level-file-summary,
  .level-options {
    grid-template-columns: 1fr;
  }

  .level-options button {
    min-height: auto;
  }

  .quick-view-body {
    grid-template-columns: 1fr;
  }

  .quick-preview {
    min-height: 220px;
  }

  .entry-hero h2 {
    font-size: 34px;
  }

  .result-dock {
    grid-template-columns: 1fr;
  }

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

  .modal-auth {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .drop-screen {
    padding: 18px;
  }

  .drop-panel {
    padding: 28px 20px;
  }

  .editor {
    padding: 12px;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    overflow-x: hidden;
  }

  .preview-toolbar {
    flex-wrap: wrap;
  }

  .processing-pill,
  .compression-viz {
    order: 3;
    width: auto;
  }

  .preview-stage {
    padding: 14px 14px 58px;
  }

  .progress-track {
    width: 110px;
  }
}

/* Mobile polish: settings belongs to the top drawer, composer docks above tabs. */
.mobile-drawer-account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.mobile-drawer-account-actions button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"] .mobile-menu-button {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
  }

  html body[data-has-docs="true"] .mobile-menu-button span {
    width: 20px !important;
    height: 2px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-head {
    display: none !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .inspector {
    padding-bottom: calc(332px + 66px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: auto !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-panel {
    padding-bottom: calc(332px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session {
    padding-bottom: 18px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box:hover,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box:focus-within {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1240 !important;
    max-height: min(330px, calc(100dvh - 220px)) !important;
    margin: 0 !important;
    overflow: auto !important;
    border-radius: 18px !important;
    box-shadow: 0 -8px 34px rgba(0, 0, 0, 0.45) !important;
  }

  html body[data-has-docs="true"] .mobile-mode-tabs {
    z-index: 1250 !important;
  }

  html body[data-has-docs="true"] .modal-backdrop,
  html body[data-has-docs="true"] #agentMobileSettingsModal {
    z-index: 2000 !important;
  }

  html body[data-has-docs="true"] .agent-settings-modal {
    margin-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 980px) {
  .intent-hero,
  .intent-grid,
  .intent-scenarios,
  .intent-action-hub,
  .seo-tool-actions,
  .blog-grid,
  .blog-story-strip,
  .blog-tools,
  .tools-group {
    grid-template-columns: 1fr;
  }

  .tools-app-shell {
    grid-template-columns: 1fr;
  }

  .tools-rail {
    position: static;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 0;
  }

  .tools-rail nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tools-rail nav a {
    min-height: 52px;
  }

  .tools-rail nav b {
    font-size: 10px;
  }

  .tools-hero-panel,
  .tools-section-title,
  .tools-ai-strip {
    display: grid;
  }

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

  .intent-result-card {
    max-width: 640px;
  }

  .blog-card:first-child {
    grid-column: auto;
  }

  .intent-related > div,
  .intent-faq > div,
  .tool-action-grid,
  .tool-action-grid.compact,
  .tools-card-grid,
  .tools-ai-strip > div:last-child {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .intent-hero,
  .intent-grid,
  .intent-scenarios,
  .intent-action-hub,
  .intent-faq,
  .intent-related,
  .seo-tool-actions,
  .blog-hero,
    .blog-story-strip,
    .blog-grid,
    .blog-tools,
    .tools-group-list,
    .tools-app-shell,
    .article-wrap {
    width: calc(100% - 32px);
  }

  .intent-hero,
  .blog-hero,
  .article-wrap {
    padding-top: 34px;
  }

  .intent-hero h1,
  .blog-hero h1,
  .article-wrap h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .intent-hero p,
  .blog-hero p,
  .article-wrap header p {
    font-size: 17px;
  }

  .intent-actions {
    display: grid;
  }

  .intent-result-card {
    padding: 20px;
  }

  .intent-result-card div {
    grid-template-columns: 1fr;
  }

  .intent-result-card i {
    width: 100%;
  }

  .intent-scenarios ul {
    grid-template-columns: 1fr;
  }

  .intent-panel,
  .blog-card,
  .tools-group {
    padding: 20px;
  }

  .tools-workspace {
    padding: 16px;
  }

  .tools-file-shortcuts {
    grid-template-columns: 1fr 1fr;
  }

  .tools-file-shortcuts a {
    min-height: 66px;
  }

  .tool-action-card {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
  }

  .tool-action-icon {
    width: 34px;
    height: 34px;
  }

  .tool-action-icon svg {
    width: 19px;
    height: 19px;
  }

  .tools-feature-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .tools-feature-card .tools-icon {
    min-height: 52px;
  }

  .tools-feature-card b {
    grid-column: 1 / -1;
  }

  .blog-card {
    min-height: auto;
  }

  .article-wrap section p {
    font-size: 16px;
  }
}

.seo-faq {
  padding: 80px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-top: 12px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-accordion details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-accordion details[open] {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.faq-accordion summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

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

.faq-accordion summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.faq-accordion details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  color: var(--blue);
}

.faq-content {
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.faq-content p {
  margin: 0;
}

.tool-registry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.tool-registry .tool-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}

.tool-registry .tool-tile:hover:not(:disabled) {
  border-color: var(--brand-green);
  transform: translateY(-1px);
}

.tool-registry .tool-tile:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tool-registry .tool-tile .tool-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 4px;
}

.tool-registry .tool-tile[data-tag="compress"] .tool-tag { background: var(--brand-green); color: var(--on-primary); }
.tool-registry .tool-tile[data-tag="merge"] .tool-tag { background: var(--accent-purple); }
.tool-registry .tool-tile[data-tag="extract"] .tool-tag { background: var(--accent-orange); }
.tool-registry .tool-tile[data-tag="sign"] .tool-tag { background: var(--brand-teal-mid); }
.tool-registry .tool-tile[data-tag="link"] .tool-tag { background: var(--accent-blue); }
.tool-registry .tool-tile[data-tag="redact"] .tool-tag { background: var(--brand-teal-deep); }
.tool-registry .tool-tile[data-tag="protect"] .tool-tag { background: var(--ink); }
.tool-registry .tool-tile[data-tag="ocr"] .tool-tag { background: var(--accent-pink); }

.tool-registry .tool-tile strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.tool-registry .tool-tile small {
  font-size: 12px;
  color: var(--steel);
  line-height: 1.4;
}

.agent-suggestion {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-feature);
  border: 2px solid var(--brand-green);
}

.agent-suggestion .suggestion-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-green-dark);
  margin-bottom: 4px;
}

.agent-suggestion strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}

.agent-suggestion p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.45;
}

.agent-suggestion .suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-suggestion .suggestion-actions button {
  border: 1px solid var(--brand-green);
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 120ms ease;
}

.agent-suggestion .suggestion-actions button:hover {
  background: var(--brand-green);
  color: var(--on-primary);
}

/* === Dragon agent indicator === */
.dragon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  position: relative;
}

.dragon svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.dragon .dragon-aura {
  fill: var(--brand-green);
  opacity: 0;
  transform-origin: 32px 32px;
}

.dragon .dragon-body {
  transform-origin: 32px 36px;
  transition: transform 220ms ease;
  filter: drop-shadow(0 4px 8px rgba(0, 30, 43, 0.18));
  animation: dragonBreathe 3.6s ease-in-out infinite;
}

.dragon .dragon-wing {
  transform-origin: 32px 28px;
  animation: dragonWingIdle 4.2s ease-in-out infinite;
}

.dragon .dragon-eye-glow {
  opacity: 0;
  filter: blur(1px);
}

.dragon[data-state="thinking"] .dragon-eye-glow {
  animation: dragonEyePulse 1.1s ease-in-out infinite;
}

.dragon[data-state="thinking"] .dragon-aura {
  opacity: 0.15;
  animation: dragonAura 1.6s ease-in-out infinite;
}

.dragon[data-state="working"] .dragon-aura {
  opacity: 0.25;
  fill: var(--accent-orange);
  animation: dragonAura 0.9s ease-in-out infinite;
}

.dragon[data-state="working"] .dragon-wing {
  animation: dragonWingFlap 0.45s ease-in-out infinite;
}

.dragon[data-state="working"] .dragon-eye-glow {
  opacity: 1;
  fill: var(--accent-orange);
}

.dragon[data-state="success"] .dragon-flame {
  animation: dragonFlame 1.1s ease-out;
}

.dragon[data-state="success"] .dragon-aura {
  opacity: 0.3;
  animation: dragonAuraOnce 1.1s ease-out;
}

@keyframes dragonBreathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.04) translateY(-1px); }
}

@keyframes dragonWingIdle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-4deg); }
}

@keyframes dragonWingFlap {
  0%, 100% { transform: rotate(0deg) scaleY(1); }
  50% { transform: rotate(-18deg) scaleY(1.1); }
}

@keyframes dragonEyePulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.6); }
}

@keyframes dragonAura {
  0%, 100% { transform: scale(0.85); opacity: 0.1; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

@keyframes dragonAuraOnce {
  0% { transform: scale(0.85); opacity: 0.35; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes dragonFlame {
  0% { opacity: 0; transform: translateX(0) scale(0.8); }
  30% { opacity: 1; transform: translateX(4px) scale(1.2); }
  100% { opacity: 0; transform: translateX(10px) scale(1.4); }
}

.agent-head {
  align-items: center;
  gap: 10px;
}

.agent-head-text {
  flex: 1;
  min-width: 0;
}

/* Kill the legacy compression viz dot-blob so it can't show */
.compression-viz { display: none !important; }

/* Unify processing pill: no spinner, no layout shift */
.processing-pill.unified {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--surface-feature);
  color: var(--brand-green-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.processing-pill.unified[hidden] {
  display: none;
}

/* Working-state progress bar uses brand green */
.progress-track span.busy {
  background-image: linear-gradient(90deg, var(--brand-green), var(--brand-teal-mid), var(--brand-green)) !important;
}

/* === Proactive stat card (vidIQ-style) === */
.agent-statcard {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--brand-teal-deep), var(--brand-teal-mid));
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}

.agent-statcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(0, 237, 100, 0.18), transparent 60%);
  pointer-events: none;
}

.agent-statcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.agent-statcard-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--brand-green);
}

.agent-statcard-context {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.agent-statcard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 8px;
  position: relative;
}

.agent-statcard-stats > div {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.agent-statcard-stats strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
}

.agent-statcard-stats small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

.agent-statcard-line {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.agent-actionchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
}

.agent-actionchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.agent-actionchip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.agent-actionchip .chip-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 9999px;
  color: var(--on-primary);
  background: var(--brand-green);
}

.agent-actionchip[data-tag="redact"] .chip-tag { background: var(--brand-teal-deep); color: var(--brand-green); }
.agent-actionchip[data-tag="sign"] .chip-tag { background: var(--brand-teal-mid); color: #ffffff; }
.agent-actionchip[data-tag="extract"] .chip-tag { background: var(--accent-orange); color: #ffffff; }
.agent-actionchip[data-tag="link"] .chip-tag { background: var(--accent-blue); color: #ffffff; }
.agent-actionchip[data-tag="merge"] .chip-tag { background: var(--accent-purple); color: #ffffff; }
.agent-actionchip[data-tag="ocr"] .chip-tag { background: var(--accent-pink); color: #ffffff; }

/* Live "Agent working" pulse */
.agent-working {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-feature);
  border: 1px solid var(--brand-green);
}

.agent-working-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 0 rgba(0, 237, 100, 0.6);
  animation: agentWorkingPulse 1.2s ease-out infinite;
  flex-shrink: 0;
}

.agent-working strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.agent-working p {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--slate);
}

@keyframes agentWorkingPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 237, 100, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(0, 237, 100, 0); }
}

/* 2026-05-24 landing, share, and pricing polish */
.seo-page {
  background:
    radial-gradient(circle at 76% 18%, rgba(15, 118, 110, 0.1), transparent 30rem),
    linear-gradient(180deg, #f7fbfb 0%, #ffffff 44%, #f5f8fb 100%);
}

.seo-hero {
  grid-template-columns: minmax(320px, 0.75fr) minmax(500px, 1.15fr);
  align-items: center;
  gap: clamp(28px, 5vw, 74px);
  min-height: min(690px, calc(100vh - 92px));
  padding-top: clamp(24px, 5vh, 54px);
}

.seo-copy h1 {
  max-width: 580px;
  font-size: clamp(42px, 5.7vw, 70px);
  line-height: 1.01;
}

.seo-copy > p:not(.seo-section-kicker) {
  max-width: 530px;
  margin-top: 18px;
  font-size: clamp(17px, 1.8vw, 21px);
}

.hero-stack {
  gap: 16px;
  margin-top: 24px;
}

.seo-proof-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 18px;
  max-width: 610px;
  margin-top: 28px;
}

.seo-proof-list li {
  grid-template-columns: 22px 1fr;
  font-size: 15px;
  line-height: 1.28;
}

.seo-proof-list li::before,
.pricing-preview-card li::before,
.pricing-plan li::before {
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, transparent 48%, #ffffff 48% 62%, transparent 62%),
    linear-gradient(135deg, #0f766e, #2563eb);
}

.seo-chat-dropzone {
  min-height: 610px;
  border: 0;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 251, 0.96)),
    radial-gradient(circle at 20% 8%, rgba(37, 99, 235, 0.08), transparent 18rem);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.12);
}

.landing-upload-focus {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 18px 18px 0;
  padding: 20px;
  color: #0f172a;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(37, 99, 235, 0.08)),
    #ffffff;
  border: 1px solid #cfe5df;
  border-radius: 18px;
}

.landing-upload-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #b8e4d9;
  border-radius: 18px;
}

.landing-upload-focus strong {
  display: block;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.02;
}

.landing-upload-focus span:not(.landing-upload-icon) {
  display: block;
  margin-top: 6px;
  color: #536276;
  font-size: 15px;
  line-height: 1.35;
}

.chat-messages {
  padding: 18px 22px;
}

.chat-input-area {
  padding: 18px;
}

.chat-upload-button {
  min-height: 68px;
  border-radius: 16px;
  font-size: 17px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.landing-agent-form {
  border-radius: 16px;
}

.landing-prompt-examples button,
.seo-login,
.seo-nav a,
.pricing-plan a,
.pricing-checkout-button,
.share-dropzone button,
.share-action-bar button:first-child {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.landing-prompt-examples button:hover,
.seo-login:hover,
.seo-nav a:hover,
.pricing-plan a:hover,
.pricing-checkout-button:hover,
.share-dropzone button:hover,
.share-action-bar button:first-child:hover {
  transform: translateY(-1px);
}

.pricing-checkout-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  color: #fff;
  background: #2f5df5;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
}

.pricing-plan:not(.featured) .pricing-checkout-button {
  color: #111827;
  background: #f5faf8;
  border: 1px solid #d7e7e2;
}

.pricing-page {
  background:
    radial-gradient(circle at 70% 8%, rgba(15, 118, 110, 0.08), transparent 28rem),
    linear-gradient(180deg, #f8fbfa 0%, #ffffff 42%, #f5f8fb 100%);
}

.pricing-hero {
  display: grid;
  gap: 14px;
  max-width: 980px;
  padding: 46px 0 24px;
}

.pricing-hero h1 {
  max-width: 720px;
  font-size: clamp(40px, 5.1vw, 64px);
}

.pricing-paid-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 20px;
}

.pricing-plan {
  min-height: 390px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.055);
}

.pricing-plan-head strong {
  font-size: clamp(28px, 3vw, 36px);
}

.pricing-plan-promo {
  font-size: 11px;
}

.share-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: center;
  padding-top: 34px;
}

.share-copy h1 {
  font-size: clamp(42px, 5.3vw, 66px);
}

.share-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

.share-main-panel {
  grid-template-columns: minmax(300px, 0.44fr) minmax(0, 1fr);
}

.share-dropzone {
  min-height: 420px;
  border-style: dashed;
  border-width: 2px;
  box-shadow: 0 20px 52px rgba(17, 24, 39, 0.08);
}

.share-upload-icon {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  font-size: 42px;
}

.share-dropzone h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.share-side-stack:not(.is-visible) {
  display: none;
}

.share-hero:not(.has-files) {
  display: block;
  max-width: 1180px;
}

.share-hero:not(.has-files) .share-copy p {
  max-width: 650px;
}

.seo-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: clamp(28px, 5vw, 70px);
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 0 48px;
  border-top: 1px solid #dce7f0;
}

.seo-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #536276;
  line-height: 1.5;
}

.seo-footer nav {
  display: grid;
  gap: 10px;
  align-content: start;
}

.seo-footer a {
  color: #1837b7;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
}

@media (max-width: 980px) {
  .seo-hero,
  .share-workspace,
  .share-main-panel {
    grid-template-columns: 1fr;
  }

  .seo-chat-dropzone {
    min-height: 540px;
  }

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

  .seo-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .seo-hero {
    gap: 22px;
    width: calc(100% - 32px);
    padding-top: 20px;
  }

  .seo-proof-list,
  .pricing-paid-grid,
  .seo-footer {
    grid-template-columns: 1fr;
  }

  .landing-upload-focus {
    grid-template-columns: 54px minmax(0, 1fr);
    margin: 12px 12px 0;
    padding: 14px;
  }

  .landing-upload-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .landing-upload-focus strong {
    font-size: 22px;
  }

  .chat-upload-button {
    min-height: 60px;
  }

  .share-workspace,
  .share-hero,
  .pricing-hero,
  .pricing-choice,
  .pricing-launch-offer,
  .pricing-paid-grid {
    width: calc(100% - 32px);
  }
}

/* BitePDF selected-style system: warm letterpress light, ElevenLabs night dark. */
.bitepdf-premium-page,
.pricing-page,
.tools-page,
.intent-page,
.blog-page {
  color: var(--text);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--surface-soft) 74%, var(--bg)) 100%);
}

.bitepdf-premium-page {
  position: relative;
}

.bitepdf-premium-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--coral) 9%, transparent) 0 14%, transparent 14% 100%),
    linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--surface-soft) 42%, transparent) 100%);
}

.seo-header,
.pricing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 0 max(22px, calc((100% - 1220px) / 2));
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.seo-brand,
.tools-rail-brand,
.pricing-header .seo-brand {
  color: var(--text);
  font-family: var(--font-body);
}

.seo-brand strong,
.brand strong {
  color: var(--teal);
}

.seo-brand-mark {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 10%, transparent);
}

.seo-nav {
  color: var(--muted);
}

.seo-nav a,
.seo-trust a,
.blog-tools a,
.article-links a {
  color: inherit;
  text-decoration: none;
}

.seo-nav a::after {
  background: var(--coral);
}

.seo-nav a:hover,
.seo-nav a:focus-visible {
  color: var(--coral);
}

.seo-login,
.intent-secondary,
.article-links a,
.blog-tools a {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

.seo-login:hover,
.seo-login:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--text) 8%, transparent);
}

.landing-premium-hero {
  width: min(1220px, calc(100% - 48px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(34px, 5.2vh, 64px) 0 clamp(44px, 7vh, 84px);
}

.landing-hero-title {
  display: grid;
  justify-items: center;
  text-align: center;
}

.landing-hero-title h1,
.journey-intro h2,
.journey-panel h3,
.seo-answer-strip h2,
.seo-media-proof h2,
.seo-intent-links h2,
.seo-competitor-brief h2,
.seo-tool-actions h2,
.seo-difference h2,
.seo-faq h2,
.pricing-hero h1,
.tools-hero-panel h1,
.blog-hero h1,
.article-wrap h1 {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}

.landing-hero-title h1 {
  max-width: 1180px;
  margin: 0;
  font-size: clamp(52px, 7.2vw, 88px);
  line-height: 0.93;
  text-wrap: balance;
}

.landing-hero-title p:last-child {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.75vw, 21px);
  line-height: 1.45;
  text-wrap: balance;
}

.landing-hero-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 880px;
  margin: clamp(22px, 3.8vh, 42px) auto 0;
}

.landing-hero-workbench .seo-chat-dropzone {
  min-height: clamp(360px, 50vh, 540px);
}

.landing-proof-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto)) 1fr repeat(2, minmax(0, auto)) auto;
  align-items: center;
  gap: 10px 14px;
  width: min(100%, 690px);
  margin: 0 auto;
  padding: 12px 16px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.landing-proof-ledger span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-proof-ledger strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.landing-proof-ledger i {
  height: 1px;
  background: var(--line-strong);
}

.landing-proof-ledger b {
  padding: 7px 9px;
  color: var(--on-primary);
  background: var(--coral);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.landing-hero-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.seo-section-kicker,
.tool-action-card span,
.tools-group > div:first-child span,
.blog-story-strip a span,
.intent-related span {
  color: var(--coral);
  font-family: var(--font-body);
  letter-spacing: 0.12em;
}

.seo-launch-offer,
.seo-product-hunt-badge {
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.seo-launch-offer {
  padding: 8px 10px;
}

.seo-launch-offer strong,
.seo-product-hunt-badge span,
.seo-product-hunt-badge strong {
  color: var(--coral);
}

.seo-launch-offer code {
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.seo-chat-dropzone {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-color: var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 80px color-mix(in srgb, var(--text) 13%, transparent);
  backdrop-filter: blur(14px);
}

.seo-chat-dropzone::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px dashed color-mix(in srgb, var(--line-strong) 70%, transparent);
  border-radius: 12px;
  pointer-events: none;
}

.seo-chat-dropzone > * {
  position: relative;
  z-index: 1;
}

.landing-upload-focus {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 22px 22px 10px;
  margin: 10px 10px 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.landing-upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--coral);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.landing-upload-focus strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
}

.landing-upload-focus span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.chat-message .bubble,
.landing-agent-demo,
.landing-agent-form {
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.chat-message.agent .bubble,
.landing-agent-demo strong,
.landing-agent-input,
.tool-action-card strong,
.seo-answer-strip h3,
.seo-intent-links strong,
.seo-difference strong,
.seo-competitor-brief strong {
  color: var(--text);
}

.landing-agent-demo {
  border-radius: 12px;
}

.landing-agent-demo span {
  color: var(--coral);
}

.landing-agent-submit,
.chat-upload-button,
.intent-primary,
.tools-hero-actions a,
.tools-section-title > a {
  color: var(--on-primary);
  background: var(--text);
  border: 1px solid var(--text);
  box-shadow: none;
}

.chat-upload-button:hover,
.landing-agent-submit:hover,
.intent-primary:hover,
.tools-hero-actions a:hover {
  color: var(--on-primary);
  background: var(--coral);
  border-color: var(--coral);
  transform: translateY(-1px);
}

.landing-prompt-examples button,
.tool-action-icon,
.tools-file-shortcuts span,
.tools-icon,
.tools-ai-strip a span {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: var(--line);
}

.landing-prompt-examples button:hover {
  color: var(--coral);
  background: var(--coral-soft);
  border-color: var(--coral);
}

.landing-scroll-story {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(44px, 8vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.journey-intro {
  max-width: 780px;
  margin-bottom: clamp(34px, 6vw, 72px);
}

.journey-intro h2 {
  margin: 0;
  font-size: clamp(40px, 6.7vw, 86px);
  line-height: 0.95;
  text-wrap: balance;
}

.journey-intro p {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.56;
}

.journey-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
  min-height: min(720px, 82vh);
  padding: clamp(34px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}

.journey-panel > div:first-child {
  display: grid;
  align-content: center;
}

.journey-step {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 9px;
  color: var(--coral);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.journey-panel h3 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(34px, 5.2vw, 72px);
  line-height: 0.96;
  text-wrap: balance;
}

.journey-panel p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.58;
}

.journey-artifact {
  min-height: 300px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--text) 10%, transparent);
}

.journey-compression-card,
.journey-agent-card,
.journey-output-card {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 42px);
}

.journey-artifact span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-artifact strong {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.95;
}

.journey-compression-card div {
  height: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.journey-compression-card i {
  display: block;
  height: 100%;
  background: var(--coral);
  border-radius: inherit;
}

.journey-compression-card small {
  color: var(--muted);
  font-size: 15px;
}

.journey-agent-card {
  grid-template-columns: repeat(2, auto) 1fr;
}

.journey-agent-card span,
.journey-agent-card strong {
  grid-column: 1 / -1;
}

.journey-agent-card button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.journey-agent-card button:first-of-type {
  color: var(--on-primary);
  background: var(--text);
  border-color: var(--text);
}

.journey-split-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(170px, 0.48fr);
  gap: 14px;
  padding: 18px;
}

.journey-split-card div,
.journey-split-card aside {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 18px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 850;
  text-align: center;
}

.journey-split-card div:nth-child(2) {
  color: var(--text);
  border-color: var(--coral);
}

.journey-split-card aside {
  place-items: start;
  min-height: auto;
  color: var(--text);
  text-align: left;
}

.journey-output-card nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.journey-output-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.journey-output-card a:first-child {
  color: var(--on-primary);
  background: var(--coral);
  border-color: var(--coral);
}

.landing-editorial-band {
  border-top-color: var(--line);
}

.seo-answer-strip article,
.seo-intent-links a,
.tool-action-card,
.seo-media-proof img,
.intent-result-card,
.intent-panel,
.intent-faq article,
.intent-related a,
.blog-card,
.blog-story-strip a,
.tools-group,
.tools-workspace,
.tools-file-shortcuts a,
.tools-feature-card,
.tools-ai-strip a,
.pricing-choice-card,
.pricing-plan-card,
.pricing-launch-offer,
.pricing-compare,
.pricing-faq details {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

.seo-answer-strip p,
.seo-media-proof > div:first-child > p:last-child,
.seo-competitor-brief span,
.seo-intent-links span,
.seo-difference span,
.tool-action-card p,
.tools-feature-card p,
.pricing-hero p,
.blog-card p,
.article-wrap section p {
  color: var(--muted);
}

.tool-action-card:hover,
.seo-intent-links a:hover,
.tools-feature-card:hover,
.blog-card:hover {
  border-color: var(--coral);
  box-shadow: 0 16px 44px color-mix(in srgb, var(--coral) 12%, transparent);
  transform: translateY(-2px);
}

@supports (animation-timeline: view()) {
  .journey-panel,
  .landing-editorial-band {
    animation: bitepdfReveal both;
    animation-timeline: view();
    animation-range: entry 10% cover 38%;
  }

  .journey-artifact {
    animation: bitepdfArtifactLift both;
    animation-timeline: view();
    animation-range: entry 14% cover 42%;
  }
}

@keyframes bitepdfReveal {
  from {
    opacity: 0.25;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bitepdfArtifactLift {
  from {
    opacity: 0.5;
    transform: translateY(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-color-scheme: dark) {
  body,
  .bitepdf-premium-page,
  .pricing-page,
  .tools-page,
  .intent-page,
  .blog-page {
    background-color: var(--bg);
  }

  .bitepdf-premium-page,
  .pricing-page,
  .tools-page,
  .intent-page,
  .blog-page {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--line) 36%, transparent) 1px, transparent 1px) 0 0 / 36px 36px,
      linear-gradient(180deg, var(--bg) 0%, #15110e 100%);
  }

  .seo-header,
  .pricing-header {
    background: color-mix(in srgb, var(--bg) 86%, transparent);
  }

  .seo-chat-dropzone,
  .journey-artifact,
  .seo-answer-strip article,
  .seo-intent-links a,
  .tool-action-card,
  .intent-result-card,
  .intent-panel,
  .blog-card,
  .tools-workspace {
    box-shadow: 0 28px 90px rgb(0 0 0 / 0.28);
  }

  .landing-agent-submit,
  .chat-upload-button,
  .journey-agent-card button:first-of-type {
    color: var(--on-primary);
    background: var(--coral);
    border-color: var(--coral);
  }
}

@media (max-width: 900px) {
  .landing-premium-hero {
    width: min(100% - 28px, 760px);
    padding-top: 44px;
  }

  .landing-hero-title h1 {
    font-size: clamp(48px, 15vw, 78px);
  }

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

  .landing-proof-ledger i {
    display: none;
  }

  .landing-proof-ledger b {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .landing-scroll-story,
  .landing-editorial-band {
    width: min(100% - 28px, 760px);
  }

  .journey-panel,
  .seo-answer-strip,
  .seo-media-proof,
  .seo-intent-links,
  .seo-competitor-brief,
  .seo-tool-actions,
  .seo-difference {
    grid-template-columns: 1fr;
  }

  .journey-panel {
    min-height: auto;
  }

  .journey-split-card {
    grid-template-columns: 1fr;
  }

  .journey-split-card div,
  .journey-split-card aside {
    min-height: 150px;
  }
}

@media (max-width: 640px) {
  .seo-header,
  .pricing-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding: 0 14px;
  }

  .seo-header .seo-nav,
  .pricing-header .seo-nav {
    display: none;
  }

  .seo-brand {
    font-size: 18px;
  }

  .seo-brand-mark {
    width: 36px;
    height: 36px;
  }

  .seo-login {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }

  .landing-premium-hero {
    width: calc(100% - 24px);
    min-height: auto;
    padding: 36px 0 48px;
  }

  .landing-hero-title {
    justify-items: start;
    text-align: left;
  }

  .landing-hero-title h1 {
    font-size: clamp(44px, 17vw, 68px);
  }

  .landing-hero-title p:last-child {
    margin-top: 20px;
    font-size: 17px;
  }

  .landing-hero-workbench {
    margin-top: 28px;
  }

  .landing-hero-workbench .seo-chat-dropzone {
    min-height: 500px;
  }

  .landing-upload-focus {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 18px 18px 8px;
  }

  .landing-upload-icon {
    width: 40px;
    height: 40px;
  }

  .landing-scroll-story {
    width: calc(100% - 24px);
    padding: 42px 0;
  }

  .journey-intro h2,
  .journey-panel h3 {
    font-size: clamp(36px, 13vw, 58px);
  }

  .journey-artifact strong {
    font-size: clamp(30px, 10vw, 48px);
  }

  .seo-answer-strip > div:last-child,
  .seo-media-proof > div:last-child,
  .seo-intent-links > div:last-child,
  .tool-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-panel,
  .journey-artifact,
  .landing-editorial-band {
    animation: none !important;
    transform: none !important;
  }
}

/* 2026 landing simplification: upload first, fewer text walls, stronger scroll reveal. */
.landing-hero-workbench .seo-chat-dropzone {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: auto;
  padding: clamp(18px, 3vw, 28px);
}

.landing-hero-workbench .seo-chat-dropzone::before {
  inset: 8px;
}

.landing-upload-focus {
  margin: 0;
  padding: 14px;
}

.landing-hero-workbench .chat-upload-button {
  justify-self: center;
  order: 1;
  width: min(420px, 100%);
  min-height: 64px;
  margin: 2px 0 0;
  font-size: 20px;
}

.landing-drop-hint {
  order: 2;
  justify-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.landing-hero-workbench .chat-messages {
  order: 3;
  margin-top: 4px;
}

.landing-hero-workbench .chat-input-area {
  order: 4;
}

.landing-hero-workbench .landing-agent-form {
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
}

.landing-title-mobile,
.landing-copy-mobile,
.landing-mobile-security,
.mobile-landing-info,
.mobile-landing-footer {
  display: none;
}

.landing-prompt-examples {
  justify-content: center;
}

.compact-landing-tools,
.compact-intent-links,
.seo-faq,
.seo-trust,
.seo-footer {
  position: relative;
  width: min(1220px, calc(100% - 48px));
}

.compact-landing-tools {
  padding-top: clamp(42px, 7vw, 86px);
}

.compact-landing-tools .tool-action-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-landing-tools .tool-action-card {
  min-height: 138px;
  padding: 16px;
}

.compact-intent-links {
  margin-top: 0;
}

.compact-intent-links > div:last-child {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-intent-links a {
  min-height: 96px;
  padding: 15px;
}

.compact-intent-links span {
  font-size: 13px;
}

.journey-panel {
  transform-origin: 50% 80%;
}

@supports (animation-timeline: view()) {
  .journey-panel,
  .landing-editorial-band {
    animation-range: entry 0% cover 34%;
  }

  .journey-artifact {
    animation-range: entry 0% cover 38%;
  }
}

@media (max-width: 900px) {
  .compact-landing-tools,
  .compact-intent-links,
  .seo-faq,
  .seo-trust,
  .seo-footer {
    width: min(100% - 28px, 760px);
  }

  .compact-landing-tools .tool-action-grid.compact,
  .compact-intent-links > div:last-child {
    grid-template-columns: 1fr;
  }
}

/* Mobile landing is upload-first: no long story scroll, no catalog wall. */
@media (max-width: 640px) {
  .bitepdf-premium-page {
    min-height: 100svh;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% -12%, color-mix(in srgb, var(--coral) 12%, transparent), transparent 18rem),
      linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--surface-soft) 72%, var(--bg))) !important;
  }

  .bitepdf-premium-page::before {
    display: none;
  }

  .bitepdf-premium-page .seo-header {
    position: relative;
    min-height: 48px;
    padding: 8px 18px 0;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
  }

  .bitepdf-premium-page .seo-login {
    display: none;
  }

  .landing-premium-hero {
    display: grid;
    align-content: start;
    width: min(100% - 32px, 430px);
    min-height: 0;
    padding: 4px 0 8px;
  }

  .landing-hero-title {
    justify-items: center;
    text-align: center;
  }

  .landing-hero-title .seo-section-kicker,
  .landing-title-desktop,
  .landing-copy-desktop,
  .landing-proof-ledger,
  .landing-hero-footnote,
  .landing-scroll-story,
  .compact-landing-tools,
  .compact-intent-links,
  .seo-faq,
  .seo-trust,
  .seo-footer {
    display: none !important;
  }

  .mobile-landing-info,
  .mobile-landing-footer {
    display: grid;
    width: min(100% - 32px, 430px);
    margin: 0 auto;
    color: var(--text);
  }

  .mobile-landing-info {
    gap: 6px;
    padding: 0 0 8px;
  }

  .mobile-landing-info > div {
    display: grid;
    gap: 3px;
    text-align: left;
  }

  .mobile-landing-info h2 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(18px, 5.4vw, 22px);
    line-height: 1.05;
    letter-spacing: 0;
  }

  .mobile-landing-info p {
    display: none;
  }

  .mobile-landing-info ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-landing-info li {
    display: grid;
    gap: 2px;
    align-items: start;
    padding: 7px 9px;
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .mobile-landing-info li strong {
    color: var(--text);
    font-size: 12px;
    line-height: 1.1;
  }

  .mobile-landing-info li span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 680;
    line-height: 1.15;
  }

  .mobile-landing-footer {
    gap: 3px;
    padding: 5px 0 8px;
    border-top: 1px solid var(--line);
  }

  .mobile-landing-footer strong {
    font-size: 13px;
  }

  .mobile-landing-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.18;
  }

  .mobile-landing-footer a {
    color: var(--text);
    font-weight: 850;
  }

  .mobile-landing-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1px;
  }

  .mobile-landing-footer nav a {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    font-size: 11px;
  }

  .landing-title-mobile,
  .landing-copy-mobile {
    display: inline;
  }

  .landing-hero-title h1 {
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(28px, 8vw, 35px);
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .landing-hero-title p:last-child {
    max-width: 320px;
    margin-top: 4px;
    color: var(--muted);
    font-size: clamp(12px, 3.4vw, 14px);
    font-weight: 780;
    line-height: 1.18;
  }

  .landing-hero-workbench {
    width: 100%;
    max-width: 390px;
    margin-top: 7px;
  }

  .landing-hero-workbench .seo-chat-dropzone {
    display: grid;
    min-height: 0;
    padding: 7px;
    gap: 5px;
    overflow: visible;
    background: var(--surface);
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 36px color-mix(in srgb, var(--text) 12%, transparent);
    backdrop-filter: none;
  }

  .landing-hero-workbench .seo-chat-dropzone::before {
    inset: 8px;
    border: 2px dashed color-mix(in srgb, var(--line-strong) 70%, transparent);
    border-radius: 16px;
  }

  .landing-upload-focus,
  .landing-hero-workbench .chat-messages,
  .landing-prompt-examples,
  .landing-drop-hint {
    display: none !important;
  }

  .landing-hero-workbench .chat-upload-button {
    display: grid;
    order: 1;
    justify-items: center;
    align-content: center;
    gap: 7px;
    width: 100%;
    min-height: clamp(278px, 33svh, 300px);
    margin: 0;
    padding: 18px 16px;
    color: var(--on-primary);
    background: var(--coral);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--coral) 22%, transparent);
    font-size: 18px;
    font-weight: 860;
    line-height: 1.1;
  }

  .landing-hero-workbench .chat-upload-button svg {
    width: 64px;
    height: 64px;
    padding: 14px;
    color: var(--coral);
    background: var(--surface);
    border-radius: 999px;
    stroke-width: 2.3;
    box-shadow: 0 14px 36px color-mix(in srgb, var(--text) 14%, transparent);
  }

  .landing-mobile-security {
    display: block;
    order: 2;
    justify-self: center;
    max-width: 310px;
    margin: 1px 0 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
  }

  .landing-hero-workbench .chat-input-area {
    display: none;
  }

  .landing-hero-workbench .landing-agent-form {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .workspace-capability-strip {
    padding-top: 22px;
    padding-bottom: 12px;
  }

  .workspace-capability-head {
    margin-bottom: 14px;
  }

  .workspace-capability-head h2 {
    font-size: clamp(30px, 9vw, 40px);
    line-height: 0.98;
  }

  .workspace-capability-head p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.42;
  }

  .workspace-capability-grid {
    gap: 10px;
  }

  .workspace-capability-grid article {
    min-height: 0;
    padding: 18px;
  }

  .workspace-capability-grid h3 {
    font-size: 20px;
    line-height: 1.12;
  }

  .workspace-capability-grid p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.38;
  }

  .landing-agent-input {
    height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: color-mix(in srgb, var(--surface-soft) 74%, var(--surface));
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 760;
  }

  .landing-agent-input::placeholder {
    color: var(--faint);
  }

  .landing-agent-submit {
    min-height: 46px;
    color: var(--on-primary);
    background: var(--text);
    border-color: var(--text);
    border-radius: 14px;
  }
}

/* Readability hardening after the premium theme pass. */
.seo-brand-mark,
.tools-rail-brand {
  overflow: hidden;
}

.seo-brand-mark img,
.tools-rail-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  font-size: 0;
}

.legal-page {
  color: #1c1a17;
  background: #fffaf3;
  border-color: #d9c8ae;
}

.legal-page h1,
.legal-page h2,
.support-form label {
  color: #1c1a17;
}

.legal-page p,
.legal-page ul,
.support-form-note {
  color: #5f554c;
}

.legal-page a {
  color: #8c4a19;
}

.support-form {
  background: #fffdf8;
  border-color: #d9c8ae;
}

.support-form input,
.support-form select,
.support-form textarea {
  color: #1c1a17;
  background: #fff;
  border: 1px solid #b8a892;
}

.support-form input::placeholder,
.support-form textarea::placeholder {
  color: #74685c;
  opacity: 1;
}

.support-form button {
  color: #fff7ed;
  background: #1c1a17;
  border: 1px solid #1c1a17;
}

.support-form button:hover,
.support-form button:focus-visible {
  background: #c0512f;
  border-color: #c0512f;
}

.seo-intent-links strong,
.compact-intent-links strong,
.compact-landing-tools .tool-action-card strong,
.blog-story-strip a strong,
.tools-group h2,
.tools-file-shortcuts strong,
.tools-ai-strip a strong {
  color: var(--text);
}

.tools-page .tools-hero-actions label span svg {
  width: 18px;
  height: 18px;
}

@media (prefers-color-scheme: dark) {
  .tools-page .tools-workspace,
  .tools-page .tools-group,
  .tools-page .tools-file-shortcuts a,
  .tools-page .tools-feature-card,
  .tools-page .tools-ai-strip a {
    color: #fff7ed;
    background: #191511;
    border-color: #46392c;
  }

  .tools-page .tools-hero-panel h1,
  .tools-page .tools-section-title h2,
  .tools-page .tools-ai-strip h2,
  .tools-page .tools-group h2,
  .tools-page .tools-file-shortcuts strong,
  .tools-page .tools-feature-card strong,
  .tools-page .tools-ai-strip a strong {
    color: #fff7ed;
  }

  .tools-page .tools-hero-panel p:not(.seo-section-kicker),
  .tools-page .tools-group > div:first-child p,
  .tools-page .tools-feature-card p,
  .tools-page .tools-ai-strip a small {
    color: #d7cab7;
  }

  .tools-page .tools-feature-card b,
  .tools-page .tool-action-card b {
    color: #f2c37a;
  }

  .tools-page .tools-feature-card div span,
  .tools-page .tools-group > div:first-child span {
    color: #f2a568;
  }

  .tools-page .tools-feature-card .tools-icon,
  .tools-page .tools-file-shortcuts span,
  .tools-page .tools-ai-strip a span {
    color: #f2c37a;
    background: #2a241d;
    border-color: #554737;
  }

  .tools-page .tools-hero-actions label {
    color: #1c1a17;
    background: #fffaf3;
    border-color: #d9c8ae;
  }

  .tools-page .tools-hero-actions label span {
    color: #8c4a19;
  }

  .tools-page .tools-hero-actions input {
    color: #1c1a17;
  }

  .tools-page .tools-hero-actions input::placeholder {
    color: #6f655a;
    opacity: 1;
  }

  .tools-page .tools-rail {
    color: #1c1a17;
    background: #fffaf3;
    border-color: #d9c8ae;
    box-shadow: 0 22px 60px rgb(0 0 0 / 0.22);
  }

  .tools-page .tools-rail-brand,
  .tools-page .tools-rail-user,
  .tools-page .tools-rail nav a {
    color: #1c1a17;
  }

  .tools-page .tools-rail nav span,
  .tools-page .tools-rail-user span {
    color: #2f5b4f;
    background: #e6eee8;
    border-color: #c9d8d0;
  }

  .tools-page .tools-rail nav a:hover,
  .tools-page .tools-rail nav a:focus-visible {
    color: #1c1a17;
    background: #f3eadf;
    box-shadow: inset 0 0 0 1px #d9c8ae;
  }

  .tools-page .tools-hero-actions a,
  .tools-page .tools-section-title > a {
    color: #0c0a09;
    background: #f2c37a;
    border-color: #f2c37a;
  }

  .seo-intent-links strong,
  .compact-intent-links strong,
  .compact-landing-tools .tool-action-card strong,
  .blog-story-strip a strong {
    color: #fff7ed;
  }

  .blog-story-strip a p,
  .compact-intent-links a span {
    color: #d7cab7;
  }
}

/* Final production comfort override: keep the document agent large, readable, and chat-first. */
@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(372px, 430px) !important;
  }

  .inspector {
    grid-column: 3 !important;
    grid-row: 2 !important;
    display: flex !important;
    min-width: 372px !important;
    max-height: none !important;
  }
}

.agent-panel {
  gap: 12px !important;
  padding: 16px !important;
  border-radius: 16px !important;
}

.agent-session {
  flex: 1 0 auto !important;
  min-height: calc(100vh - 132px) !important;
  max-height: none !important;
  gap: 10px !important;
}

.agent-message {
  gap: 6px !important;
  padding: 12px !important;
  border-radius: 12px !important;
}

.agent-message p,
.agent-ai-result p,
.agent-ai-result li span,
.agent-ai-warn {
  line-height: 1.48 !important;
}

.agent-ai-box textarea {
  min-height: 96px !important;
  padding: 12px !important;
}

@media (max-width: 760px) {
  .agent-session {
    min-height: 320px !important;
  }

  .agent-ai-box textarea {
    min-height: 108px !important;
  }
}

/* Empty-state polish: disabled controls should read as unavailable, not broken or faded away. */
.app-shell button:disabled,
.app-shell input:disabled,
.app-shell textarea:disabled {
  opacity: 0.72 !important;
}

.app-shell button:disabled {
  color: #6f655a !important;
  background: #f5efe6 !important;
  border-color: #d8c9b6 !important;
}

.agent-panel button:disabled {
  color: #5f554c !important;
  background: #f3eadf !important;
  border-color: #d9c8ae !important;
}

.agent-panel label,
.agent-panel small,
.agent-ai-box label,
.agent-memory-empty,
.empty-file-state {
  color: #5f554c !important;
}

@media (prefers-color-scheme: dark) {
  .app-shell button:disabled {
    color: #d7cab7 !important;
    background: #2a241d !important;
    border-color: #554737 !important;
  }

  .agent-panel button:disabled {
    color: #d7cab7 !important;
    background: #2a241d !important;
    border-color: #554737 !important;
  }

  .agent-panel label,
  .agent-panel small,
  .agent-ai-box label,
  .agent-memory-empty,
  .empty-file-state {
    color: #d7cab7 !important;
  }
}

.agent-runtime-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

@media (min-width: 1280px) {
  .agent-runtime-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

.agent-runtime-strip span {
  display: grid !important;
  gap: 2px !important;
  min-height: 54px !important;
  padding: 9px 10px !important;
  overflow: hidden !important;
  background: rgba(255, 250, 243, 0.92) !important;
  border: 1px solid #d9c8ae !important;
  border-radius: 10px !important;
}

.agent-runtime-strip b {
  color: #8c4a19 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.agent-runtime-strip em {
  overflow: hidden !important;
  color: #1c1a17 !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 850 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.agent-head strong {
  font-size: 15px !important;
}

.agent-message strong {
  font-size: 13px !important;
}

.agent-message p,
#agentText,
.agent-ai-result p,
.agent-ai-result li span,
.agent-ai-warn {
  font-size: 13px !important;
}

@media (prefers-color-scheme: dark) {
  .agent-work-card.running {
    background:
      radial-gradient(circle at 16% 12%, rgba(242, 165, 104, 0.2), transparent 34%),
      linear-gradient(135deg, #211c17, #17120f);
    border-color: #564433;
  }

  .agent-work-orbit {
    background: rgba(255, 247, 237, 0.08);
    border-color: rgba(242, 165, 104, 0.32);
  }

  .agent-work-orbit i {
    background: #f2a568;
  }

  .agent-runtime-strip span {
    background: #211c17 !important;
    border-color: #46392c !important;
  }

  .agent-runtime-strip b {
    color: #f2a568 !important;
  }

  .agent-runtime-strip em {
    color: #fff7ed !important;
  }
}

.landing-editor-overlay.ready .landing-editor-loading {
  display: none !important;
}

/* Continuation polish: first-use editor should feel intentional, not like a disabled app. */
@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(432px, 520px) !important;
  }

  .inspector {
    min-width: 432px !important;
  }

  body[data-has-docs="false"] .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(432px, 520px) !important;
  }

  body[data-has-docs="false"] .left-rail {
    display: none !important;
  }

  body[data-has-docs="false"] .workspace {
    grid-column: 1 !important;
  }

  body[data-has-docs="false"] .inspector {
    grid-column: 2 !important;
  }
}

body[data-has-docs="false"] #selectAllButton,
body[data-has-docs="false"] #invertButton,
body[data-has-docs="false"] #printButton,
body[data-has-docs="false"] #topClearButton,
body[data-has-docs="false"] #compressButton,
body[data-has-docs="false"] #downloadButton {
  display: none !important;
}

body[data-has-docs="false"] .toolbar {
  padding: 3px;
  background: rgba(255, 250, 243, 0.8);
}

body[data-has-docs="false"] .drop-screen {
  align-content: center;
  gap: 18px;
  padding: clamp(18px, 4vw, 42px);
}

body[data-has-docs="false"] .entry-hero {
  width: min(780px, 100%);
}

body[data-has-docs="false"] .entry-hero h2 {
  max-width: 720px;
  font-size: clamp(44px, 7.2vw, 84px);
  line-height: 0.94;
}

body[data-has-docs="false"] .entry-hero > p:not(.eyebrow) {
  max-width: 680px;
  color: #4f463d;
  font-size: clamp(15px, 1.5vw, 19px);
}

body[data-has-docs="false"] .drop-panel {
  width: min(520px, 100%);
  gap: 10px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 243, 0.95)),
    var(--surface);
  outline: 0;
}

body[data-has-docs="false"] .drop-panel svg {
  margin-bottom: 0;
}

body[data-has-docs="false"] .drop-panel h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

body[data-has-docs="false"] .drop-panel p {
  max-width: 420px;
  margin-top: 0;
}

body[data-has-docs="false"] .primary-drop-button {
  order: -1;
  width: min(440px, 100%);
  min-height: 58px;
  margin-top: 0;
  font-size: 18px;
  font-weight: 900;
}

body[data-has-docs="false"] .drop-capabilities {
  margin-top: 2px;
}

body[data-has-docs="false"] .mobile-drop-promise {
  max-width: 420px;
  color: #5f554c;
  line-height: 1.45;
}

body[data-has-docs="false"] .agent-tools,
body[data-has-docs="false"] .agent-ai-diagnostics,
body[data-has-docs="false"] .agent-memory-panel {
  display: none !important;
}

body[data-has-docs="false"] .agent-panel {
  justify-content: start;
}

body[data-has-docs="false"] .agent-head {
  padding: 4px 0;
}

body[data-has-docs="false"] .agent-session {
  min-height: min(760px, calc(100vh - 150px)) !important;
}

body[data-has-docs="false"] .agent-message.assistant:first-child p {
  color: #40382f;
}

@media (prefers-color-scheme: dark) {
  body[data-has-docs="false"] .toolbar {
    background: #1c1917;
    border-color: #46392c;
  }

  body[data-has-docs="false"] .entry-hero > p:not(.eyebrow),
  body[data-has-docs="false"] .mobile-drop-promise,
  body[data-has-docs="false"] .agent-message.assistant:first-child p {
    color: #d7cab7;
  }

  body[data-has-docs="false"] .drop-panel {
    background:
      linear-gradient(135deg, rgba(42, 36, 29, 0.9), rgba(28, 25, 23, 0.96)),
      var(--surface);
    border-color: #554737;
  }
}

@media (max-width: 760px) {
  body[data-has-docs="false"] .left-rail {
    display: none !important;
  }

  body[data-has-docs="false"] .topbar {
    gap: 8px;
  }

  body[data-has-docs="false"] .toolbar,
  body[data-has-docs="false"] .top-actions {
    flex: 0 1 auto;
  }

  body[data-has-docs="false"] .workspace {
    min-height: auto;
  }

  body[data-has-docs="false"] .drop-screen {
    align-content: start;
    gap: 14px;
    min-height: auto;
    padding: 16px;
  }

  body[data-has-docs="false"] .entry-hero {
    justify-items: start;
    text-align: left;
  }

  body[data-has-docs="false"] .entry-hero h2 {
    font-size: clamp(42px, 13vw, 58px);
  }

  body[data-has-docs="false"] .entry-hero > p:not(.eyebrow) {
    margin-top: 10px;
    font-size: 15px;
  }

  body[data-has-docs="false"] .entry-proof {
    justify-content: flex-start;
    gap: 6px;
    margin-top: 12px;
  }

  body[data-has-docs="false"] .drop-panel {
    width: 100%;
    padding: 16px;
  }

  body[data-has-docs="false"] .primary-drop-button {
    min-height: 62px;
  }

  body[data-has-docs="false"] .drop-capabilities {
    display: none;
  }

  body[data-has-docs="false"] .mobile-start-panel {
    gap: 8px;
  }

  body[data-has-docs="false"] .inspector {
    padding-top: 8px;
  }

  body[data-has-docs="false"] .agent-session {
    min-height: 260px !important;
  }
}

/* Mobile upload and tap polish: make file handoff feel like a native step, not a stuck page. */
button,
a,
input,
select,
textarea,
[role="button"],
.tool-button,
.agent-surface-bar button,
.mobile-start-panel button,
.mobile-drawer button {
  touch-action: manipulation;
}

.mobile-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(21, 27, 37, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.mobile-processing-overlay[hidden] {
  display: none !important;
}

.mobile-processing-card {
  width: min(352px, calc(100vw - 42px));
  min-height: 278px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  padding: 30px 24px 28px;
  border: 1px solid rgba(214, 225, 238, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(18, 28, 45, 0.24);
  color: #101827;
  text-align: center;
}

.mobile-processing-icon {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f5f7fb);
  box-shadow: inset 0 0 0 1px rgba(224, 231, 241, 0.95), 0 18px 42px rgba(35, 83, 214, 0.12);
}

.mobile-processing-icon svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: #2f5df5;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-processing-copy {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-weight: 900;
  letter-spacing: 0;
}

.mobile-processing-copy strong {
  min-width: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
}

.mobile-processing-copy span {
  color: #2f5df5;
  font-size: 24px;
  line-height: 1;
}

.mobile-processing-bar {
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.mobile-processing-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #315bf5, #2f6bff);
  transition: width 180ms ease;
}

.mobile-processing-card p {
  margin: 0;
  color: #5f6b7a;
  font-size: 14px;
  line-height: 1.35;
}

body.mobile-processing-active {
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  html,
  body {
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-button {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    justify-self: end;
    gap: 5px;
    padding: 11px;
    color: #1c1a17;
    background: #fffaf2;
    border: 1px solid #d8c7aa;
    border-radius: 15px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
  }

  .mobile-menu-button span {
    width: 22px;
    height: 2px;
    display: block;
    background: currentColor;
    border-radius: 999px;
  }

  .mobile-menu-button[aria-expanded="true"] {
    color: #fffaf2;
    background: #1c1a17;
    border-color: #1c1a17;
  }

  body[data-has-docs="true"] .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
    gap: 8px;
    align-items: center;
    padding: 9px 12px 10px;
  }

  body[data-has-docs="true"] .brand {
    grid-column: 1 / 3;
    width: auto !important;
    min-height: 48px;
  }

  body[data-has-docs="true"] .mobile-menu-button {
    grid-column: 3;
  }

  body[data-has-docs="true"] .toolbar,
  body[data-has-docs="true"] .top-actions {
    flex: none !important;
    display: grid !important;
    gap: 0;
    min-width: 0;
  }

  body[data-has-docs="true"] .toolbar {
    grid-column: 1;
    grid-row: 2;
  }

  body[data-has-docs="true"] .top-actions {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  body[data-has-docs="true"] #selectAllButton,
  body[data-has-docs="true"] #invertButton,
  body[data-has-docs="true"] #supportButton,
  body[data-has-docs="true"] #accountButton,
  body[data-has-docs="true"] #printButton,
  body[data-has-docs="true"] #topClearButton,
  body[data-has-docs="true"] #compressButton {
    display: none !important;
  }

  body[data-has-docs="true"] #openButton,
  body[data-has-docs="true"] #downloadButton {
    width: 100%;
    min-height: 50px;
    justify-content: center;
    padding: 0 12px;
    border-radius: 15px;
  }

  body[data-has-docs="true"] #openButton span,
  body[data-has-docs="true"] #downloadButton span {
    display: inline !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-mode-tabs {
    position: sticky;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
    background: #fffaf2;
    border-bottom: 1px solid #e4d4bc;
  }

  .mobile-mode-tabs button {
    min-height: 48px;
    color: #4f463d;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 16px;
    font-weight: 850;
  }

  .mobile-mode-tabs button.active {
    color: #fffaf2;
    background: #1c1a17;
  }

  body[data-has-docs="true"] .mobile-mode-tabs {
    top: 0;
    border-top: 1px solid var(--line);
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .left-rail,
  body[data-has-docs="true"][data-mobile-mode="preview"] .inspector,
  body[data-has-docs="true"][data-mobile-mode="agent"] .left-rail,
  body[data-has-docs="true"][data-mobile-mode="agent"] .workspace,
  body[data-has-docs="true"][data-mobile-mode="files"] .workspace,
  body[data-has-docs="true"][data-mobile-mode="files"] .inspector,
  body[data-has-docs="true"][data-mobile-mode="split"] .left-rail {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .inspector {
    display: flex !important;
    height: calc(100vh - 172px);
    min-height: 0;
    overflow: hidden;
    padding: 12px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-tools,
  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-surface-bar,
  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-surface-suggestions {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-panel {
    gap: 12px;
    min-height: 0;
    max-height: none !important;
    overflow: hidden !important;
    padding: 14px !important;
    border-radius: 18px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-runtime-strip {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session {
    gap: 10px;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    padding-right: 0;
    overscroll-behavior: contain;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session > .agent-message.assistant:first-child {
    display: none;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message {
    gap: 7px;
    padding: 14px;
    border-radius: 16px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.user {
    margin-left: 0;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message strong {
    font-size: 18px;
    line-height: 1.22;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message p {
    font-size: 16px;
    line-height: 1.45;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.user p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-card {
    gap: 9px;
    padding: 12px;
    border-radius: 16px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-card > p {
    font-size: 15px;
    line-height: 1.35;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-head strong {
    font-size: 18px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-stats strong {
    font-size: 15px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-steps {
    display: none;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 45;
    margin: 0;
    max-height: min(43vh, 330px);
    overflow: auto;
    padding: 12px;
    background: #fffaf2;
    border: 1px solid #dcc9ad;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box textarea {
    min-height: 74px;
    max-height: 108px;
    padding: 12px;
    font-size: 16px;
    line-height: 1.45;
    border-radius: 14px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-composer-actions {
    display: grid !important;
    grid-template-columns: 0.9fr 1fr 1.15fr;
    gap: 8px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-composer-actions button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 14px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-panel {
    padding-bottom: min(48vh, 380px) !important;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-screenshot-state,
  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-support-strip,
  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-thinking,
  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-memory {
    display: none !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-mobile-controls,
  .agent-mobile-controls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
  }

  .agent-mobile-controls label {
    display: grid;
    gap: 5px;
    color: #4f463d;
    font-size: 12px;
    font-weight: 900;
  }

  .agent-mobile-controls label span {
    color: #8c4a19;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .agent-mobile-controls select,
  .agent-mobile-controls button {
    min-height: 46px;
    padding: 0 14px;
    color: #1c1a17;
    background: #fffaf2;
    border: 1px solid #d8c7aa;
    border-radius: 14px;
    font-weight: 900;
  }

  .agent-mobile-controls button {
    min-width: 108px;
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace,
  body[data-has-docs="true"][data-mobile-mode="split"] .workspace,
  body[data-has-docs="true"][data-mobile-mode="files"] .left-rail {
    display: flex !important;
    min-height: calc(100vh - 186px);
    min-width: 0;
    overflow-x: hidden;
  }

  body[data-has-docs="true"] .editor {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .preview-stage,
  body[data-has-docs="true"] .status-strip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body[data-has-docs="true"] .preview-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
    min-height: 0;
    padding: 7px;
  }

  body[data-has-docs="true"] .preview-toolbar > div {
    min-width: 0;
  }

  body[data-has-docs="true"] .preview-toolbar > div:first-child {
    display: none;
  }

  body[data-has-docs="true"] .zoom-tools {
    display: grid;
    grid-template-columns: 40px minmax(46px, 1fr) repeat(5, 40px);
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  body[data-has-docs="true"] .zoom-tools .icon-button,
  body[data-has-docs="true"] .zoom-tools .zoom-reset-button,
  body[data-has-docs="true"] .zoom-tools .text-tool-button {
    width: 100%;
    min-width: 0;
  }

  body[data-has-docs="true"] .workspace-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body[data-has-docs="true"] .workspace-actions::-webkit-scrollbar {
    display: none;
  }

  body[data-has-docs="true"] .workspace-actions button {
    flex: 0 0 auto;
    min-width: auto;
    padding: 0 10px;
    font-size: 0;
    white-space: nowrap;
  }

  body[data-has-docs="true"] .workspace-actions button::after {
    content: attr(data-short-label);
    font-size: 12px;
    line-height: 1;
  }

  body[data-has-docs="true"] .preview-stage {
    justify-items: center;
    align-items: start;
    overflow-x: hidden;
  }

  body[data-has-docs="true"] .asset-tray {
    display: none !important;
  }

  body[data-has-docs="true"] .preview-frame {
    max-width: 100%;
    margin-inline: auto;
  }

  body[data-has-docs="true"][data-mobile-mode="split"] .inspector {
    display: flex !important;
    min-height: 420px;
  }

  body[data-has-docs="true"] .left-rail {
    max-height: none;
  }

  button,
  .toolbar button,
  .agent-surface-bar button,
  .workspace-actions button,
  .mobile-start-panel button,
  .mobile-drawer button {
    min-height: 44px;
  }

  .primary-drop-button {
    min-height: 62px;
  }
}

@media (prefers-color-scheme: dark) {
  .mobile-processing-overlay {
    background: rgba(8, 7, 6, 0.58);
  }

  .mobile-processing-card {
    border-color: rgba(105, 87, 65, 0.9);
    background: #fffaf2;
    color: #15110d;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  }

  .mobile-processing-copy strong {
    color: #15110d;
  }

  .mobile-menu-button {
    color: #fff7ed;
    background: #221d18;
    border-color: #554737;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  }

  .mobile-menu-button[aria-expanded="true"] {
    color: #15110d;
    background: #d8b77a;
    border-color: #d8b77a;
  }

  .mobile-drawer {
    background: rgba(8, 7, 6, 0.62);
  }

  .mobile-drawer-sheet {
    color: #fff7ed;
    background: #17130f;
    border-color: #554737;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  }

  .mobile-drawer-head span,
  .mobile-drawer-nav button {
    color: #f2a568;
  }

  .mobile-drawer-head button,
  .mobile-drawer-nav button {
    color: #fff7ed;
    background: #221d18;
    border-color: #554737;
  }

  .mobile-drawer-account {
    color: #d7cab7;
    background: #211c17;
    border-color: #554737;
  }

  .mobile-drawer-account button,
  .mobile-drawer-pricing button {
    color: #15110d;
    background: #d8b77a;
    border-color: #d8b77a;
  }

  .mobile-drawer-pricing {
    background: #241c13;
    border: 1px solid #554737;
  }

  .agent-mobile-controls label {
    color: #d7cab7;
  }

  .agent-mobile-controls label span {
    color: #f2a568;
  }

  .agent-mobile-controls select,
  .agent-mobile-controls button {
    color: #fff7ed;
    background: #221d18;
    border-color: #554737;
  }

  .mobile-mode-tabs {
    background: #15110d;
    border-color: #46392c;
  }

  .mobile-mode-tabs button {
    color: #d7cab7;
  }

  .mobile-mode-tabs button.active {
    color: #15110d;
    background: #d8b77a;
  }
}

/* Guard no-file editor readability when the OS prefers dark but the upload canvas is light. */
body[data-has-docs="false"] .entry-hero h2,
body[data-has-docs="false"] .drop-screen h1,
body[data-has-docs="false"] .drop-screen h2 {
  color: #101827 !important;
  text-shadow: none !important;
}

body[data-has-docs="false"] .entry-hero .eyebrow,
body[data-has-docs="false"] .drop-panel .eyebrow {
  color: #a8612a !important;
}

body[data-has-docs="false"] .entry-hero > p:not(.eyebrow),
body[data-has-docs="false"] .mobile-drop-promise,
body[data-has-docs="false"] .drop-panel p,
body[data-has-docs="false"] .agent-message p,
body[data-has-docs="false"] .agent-screenshot-state {
  color: #435066 !important;
}

body[data-has-docs="false"] .entry-proof span,
body[data-has-docs="false"] .drop-capabilities span {
  color: #0f5f54 !important;
  background: #effbf7 !important;
  border-color: #bfeee0 !important;
}

body[data-has-docs="false"] .agent-message.assistant h3,
body[data-has-docs="false"] .agent-panel label,
body[data-has-docs="false"] .agent-composer textarea {
  color: #141b2b !important;
}

body[data-has-docs="false"] .drop-panel h2 {
  color: #fff7ed !important;
}

body[data-has-docs="false"] .drop-panel p,
body[data-has-docs="false"] .drop-panel .mobile-drop-promise {
  color: #d7cab7 !important;
}

/* Loaded-document workbench: keep the PDF and agent rail dominant. */
@media (min-width: 981px) {
  body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(410px, 30vw) !important;
  }

  body[data-has-docs="true"] .left-rail,
  body[data-has-docs="true"] .sidebar-resizer {
    display: none !important;
  }

  body[data-has-docs="true"] .workspace {
    grid-column: 1 !important;
  }

  body[data-has-docs="true"] .inspector {
    grid-column: 2 !important;
    min-width: min(500px, 30vw) !important;
  }
}

@media (min-width: 981px) and (max-width: 1220px) {
  body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 390px) !important;
  }

  body[data-has-docs="true"] .inspector {
    min-width: 360px !important;
  }
}

body[data-has-docs="true"] .preview-toolbar,
body[data-has-docs="true"] .workspace-actions,
body[data-has-docs="true"] .status-strip {
  box-shadow: 0 8px 24px rgba(61, 45, 28, 0.05);
}

body[data-has-docs="true"] .workspace-actions {
  gap: 7px;
  min-height: 42px;
  padding: 5px 7px;
  overflow: visible;
}

body[data-has-docs="true"] .workspace-actions button,
body[data-has-docs="true"] .workspace-more summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px 0 8px;
  color: #152033;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
  background: #f8fbfa;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

body[data-has-docs="true"] .workspace-more summary {
  padding: 0 14px;
  list-style: none;
}

body[data-has-docs="true"] .workspace-more summary::-webkit-details-marker {
  display: none;
}

body[data-has-docs="true"] .workspace-actions button::before,
body[data-has-docs="true"] .workspace-more summary::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background: currentColor;
  opacity: 0.76;
  -webkit-mask: var(--workspace-action-icon) center / contain no-repeat;
  mask: var(--workspace-action-icon) center / contain no-repeat;
}

body[data-has-docs="true"] .workspace-more {
  position: relative;
  flex: 0 0 auto;
}

body[data-has-docs="true"] .workspace-more summary {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-more-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid #d8c9b4;
  border-radius: 12px;
  background: #fffaf2;
  box-shadow: 0 18px 48px rgba(61, 45, 28, 0.16);
}

body[data-has-docs="true"] .workspace-more:not([open]) .workspace-more-menu {
  display: none;
}

body[data-has-docs="true"] .workspace-more-menu button {
  width: 100%;
  justify-content: flex-start;
}

body[data-has-docs="true"] .workspace-actions button:hover,
body[data-has-docs="true"] .workspace-more summary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(61, 45, 28, 0.08);
}

body[data-has-docs="true"] .workspace-actions button.active,
body[data-has-docs="true"] .workspace-more[open] summary {
  color: #1c3f36;
  background: #eaf4ef;
  border-color: #9dcabc;
  box-shadow: inset 0 0 0 1px rgba(47, 91, 79, 0.16);
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="compress"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 15h6'/%3E%3Cpath d='m12 11 3 3-3 3'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="merge"],
body[data-has-docs="true"] .workspace-actions button[data-workspace-action="batch_zip"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7h8'/%3E%3Cpath d='M8 17h8'/%3E%3Cpath d='m14 4 4 3-4 3'/%3E%3Cpath d='m10 14-4 3 4 3'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="extract"],
body[data-has-docs="true"] .workspace-actions button[data-workspace-action="range"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18H6z'/%3E%3Cpath d='M9 8h6'/%3E%3Cpath d='M9 12h4'/%3E%3Cpath d='M9 16h6'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="humanize"],
body[data-has-docs="true"] .workspace-actions button[data-workspace-action="rewrite"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'/%3E%3Cpath d='M5 19h14'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="slides"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v12H4z'/%3E%3Cpath d='M9 21h6'/%3E%3Cpath d='M12 17v4'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="image_slots"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4z'/%3E%3Cpath d='m4 15 4-4 4 4 3-3 5 5'/%3E%3Cpath d='M15 8h.01'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="compare"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h6v16H5z'/%3E%3Cpath d='M13 4h6v16h-6z'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="grid"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v6H4z'/%3E%3Cpath d='M14 4h6v6h-6z'/%3E%3Cpath d='M4 14h6v6H4z'/%3E%3Cpath d='M14 14h6v6h-6z'/%3E%3C/svg%3E");
}

body[data-has-docs="true"] .workspace-actions button[data-workspace-action="export_json"],
body[data-has-docs="true"] .workspace-actions button[data-workspace-action="export_md"] {
  --workspace-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8 4 12l4 4'/%3E%3Cpath d='m16 8 4 4-4 4'/%3E%3Cpath d='m14 4-4 16'/%3E%3C/svg%3E");
}

@media (max-width: 760px) {
  body[data-has-docs="true"] {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  body[data-has-docs="true"] .mobile-mode-tabs {
    position: fixed !important;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    top: auto !important;
    z-index: 1250;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    overflow: hidden;
    background: rgba(255, 250, 242, 0.96);
    border: 1px solid #dcc9ad;
    border-radius: 20px;
    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.18);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body[data-has-docs="true"] .mobile-mode-tabs button {
    min-height: 46px;
    color: #2b241d;
    background: transparent;
    border: 0;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 900;
  }

  body[data-has-docs="true"] .mobile-mode-tabs button.active {
    color: #fffaf2;
    background: #101827;
  }

  body[data-has-docs="true"][data-mobile-mode="preview"] .workspace,
  body[data-has-docs="true"][data-mobile-mode="split"] .workspace,
  body[data-has-docs="true"][data-mobile-mode="files"] .left-rail {
    min-height: calc(100vh - 158px);
    padding-bottom: 74px;
  }

  body[data-has-docs="true"][data-mobile-mode="files"] .left-rail {
    gap: 12px;
  }

  body[data-has-docs="true"][data-mobile-mode="files"] .queue-summary,
  body[data-has-docs="true"][data-mobile-mode="files"] .file-drop,
  body[data-has-docs="true"][data-mobile-mode="files"] .sidebar-insight,
  body[data-has-docs="true"][data-mobile-mode="files"] .sidebar-tools,
  body[data-has-docs="true"][data-mobile-mode="files"] .job-panel,
  body[data-has-docs="true"][data-mobile-mode="files"] .memory-panel,
  body[data-has-docs="true"][data-mobile-mode="files"] .legal-panel {
    display: none !important;
  }

  body[data-has-docs="true"][data-mobile-mode="files"] .rail-heading,
  body[data-has-docs="true"][data-mobile-mode="files"] .document-panel,
  body[data-has-docs="true"][data-mobile-mode="files"] .page-cutter,
  body[data-has-docs="true"][data-mobile-mode="files"] .page-list {
    color: #101827;
    background: #fffaf2;
    border-color: #dcc9ad;
  }

  body[data-has-docs="true"][data-mobile-mode="files"] .rail-heading h1,
  body[data-has-docs="true"][data-mobile-mode="files"] .document-panel strong,
  body[data-has-docs="true"][data-mobile-mode="files"] .page-row strong {
    color: #101827;
  }

  body[data-has-docs="true"][data-mobile-mode="files"] .page-row,
  body[data-has-docs="true"][data-mobile-mode="files"] .file-card {
    color: #101827;
    background: #ffffff;
    border-color: #e3d6c0;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .inspector,
  body[data-has-docs="true"][data-mobile-mode="split"] .inspector {
    padding-bottom: 80px;
  }

  body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box {
    bottom: 70px;
  }

  body[data-has-docs="true"] .inspector .setting-block,
  body[data-has-docs="true"] .inspector .agent-ai-box,
  body[data-has-docs="true"] .inspector .agent-message,
  body[data-has-docs="true"] .inspector .agent-work-card {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
  }

  body[data-has-docs="true"] .inspector .setting-label,
  body[data-has-docs="true"] .inspector .eyebrow,
  body[data-has-docs="true"] .inspector .agent-message span,
  body[data-has-docs="true"] .inspector .agent-work-head span {
    color: #9a3412 !important;
  }

  body[data-has-docs="true"] .inspector .tool-readout,
  body[data-has-docs="true"] .inspector .agent-message strong,
  body[data-has-docs="true"] .inspector .agent-work-head strong,
  body[data-has-docs="true"] .inspector .agent-message p,
  body[data-has-docs="true"] .inspector .agent-work-card > p,
  body[data-has-docs="true"] .inspector label,
  body[data-has-docs="true"] .inspector output {
    color: #101827 !important;
  }

  body[data-has-docs="true"] .inspector .hint,
  body[data-has-docs="true"] .inspector .agent-work-decision {
    color: #4b5563 !important;
  }

  body[data-has-docs="true"] .inspector textarea,
  body[data-has-docs="true"] .inspector input,
  body[data-has-docs="true"] .inspector select {
    color: #101827 !important;
    background: #ffffff !important;
    border-color: #b9a88d !important;
  }

  body[data-has-docs="true"] .inspector textarea::placeholder,
  body[data-has-docs="true"] .inspector input::placeholder {
    color: #6b7280 !important;
  }

  body[data-has-docs="true"] .workspace-actions {
    gap: 6px;
    padding: 6px;
  }

  body[data-has-docs="true"] .workspace-actions button,
  body[data-has-docs="true"] .workspace-more summary {
    min-height: 42px;
    padding-inline: 10px;
  }

  body[data-has-docs="true"] .workspace-actions button::after {
    font-size: 12px;
  }
}

@media (prefers-color-scheme: dark) {
  body[data-has-docs="true"] .topbar {
    color: #fff7ed;
    background:
      linear-gradient(90deg, rgba(216, 183, 122, 0.08), transparent 40%),
      rgba(12, 10, 9, 0.96);
    border-color: #352d25;
  }

  body[data-has-docs="true"] .workspace {
    background:
      linear-gradient(90deg, rgba(242, 195, 122, 0.08) 1px, transparent 1px),
      linear-gradient(180deg, rgba(242, 195, 122, 0.07) 1px, transparent 1px),
      #0f0d0b;
    background-size: 30px 30px;
  }

  body[data-has-docs="true"] .preview-toolbar,
  body[data-has-docs="true"] .workspace-actions,
  body[data-has-docs="true"] .status-strip,
  body[data-has-docs="true"] .multi-doc-card {
    color: #fff7ed;
    background: rgba(28, 25, 23, 0.94);
    border-color: #3f3328;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  }

  body[data-has-docs="true"] .preview-toolbar p,
  body[data-has-docs="true"] .status-strip,
  body[data-has-docs="true"] .multi-doc-select small {
    color: #cfc2af;
  }

  body[data-has-docs="true"] .preview-toolbar strong,
  body[data-has-docs="true"] .multi-doc-select strong {
    color: #fff7ed;
  }

  body[data-has-docs="true"] .workspace-actions button,
  body[data-has-docs="true"] .workspace-more summary,
  body[data-has-docs="true"] .workspace-more-menu,
  body[data-has-docs="true"] .workspace-more-menu button,
  body[data-has-docs="true"] .agent-command-grid button,
  body[data-has-docs="true"] .agent-surface-bar button,
  body[data-has-docs="true"] .agent-surface-suggestions button,
  body[data-has-docs="true"] .icon-button,
  body[data-has-docs="true"] .zoom-reset-button,
  body[data-has-docs="true"] .text-tool-button,
  body[data-has-docs="true"] .tool-button.ghost {
    color: #fff7ed !important;
    background: #17130f !important;
    border-color: #4b3d2f !important;
  }

  body[data-has-docs="true"] .workspace-actions button:hover,
  body[data-has-docs="true"] .workspace-actions button.active,
  body[data-has-docs="true"] .workspace-more summary:hover,
  body[data-has-docs="true"] .workspace-more[open] summary,
  body[data-has-docs="true"] .agent-command-grid button:hover,
  body[data-has-docs="true"] .agent-command-grid button.active,
  body[data-has-docs="true"] .agent-surface-bar button:hover,
  body[data-has-docs="true"] .agent-surface-bar button.active,
  body[data-has-docs="true"] .agent-surface-suggestions button:hover {
    color: #15110d !important;
    background: #d8b77a !important;
    border-color: #f2c37a !important;
  }

  body[data-has-docs="true"] .inspector {
    color: #fff7ed;
    background: #100e0c;
    border-color: #352d25;
  }

  body[data-has-docs="true"] .agent-panel {
    color: #fff7ed;
    background:
      linear-gradient(135deg, rgba(216, 183, 122, 0.12), transparent 36%),
      #17130f;
    border-color: #46392c;
  }

  body[data-has-docs="true"] .agent-message,
  body[data-has-docs="true"] .agent-work-card,
  body[data-has-docs="true"] .agent-thinking,
  body[data-has-docs="true"] .agent-memory,
  body[data-has-docs="true"] .agent-ai-result {
    color: #fff7ed;
    background: #201b16;
    border-color: #46392c;
  }

  body[data-has-docs="true"] .agent-message.user {
    color: #15110d;
    background: #ebb06e;
    border-color: #f2c37a;
  }

  body[data-has-docs="true"] .agent-message strong,
  body[data-has-docs="true"] .agent-work-head strong,
  body[data-has-docs="true"] .agent-thinking summary strong,
  body[data-has-docs="true"] .agent-thinking-list li strong,
  body[data-has-docs="true"] .agent-memory-item strong {
    color: #fff7ed;
  }

  body[data-has-docs="true"] .agent-message.user strong,
  body[data-has-docs="true"] .agent-message.user p,
  body[data-has-docs="true"] .agent-message.user span {
    color: #15110d;
  }

  body[data-has-docs="true"] .agent-message p,
  body[data-has-docs="true"] .agent-work-card > p,
  body[data-has-docs="true"] .agent-thinking-list li p,
  body[data-has-docs="true"] .agent-memory-item p,
  body[data-has-docs="true"] .agent-ai-result p {
    color: #d7cab7;
  }

  body[data-has-docs="true"] .agent-ai-box {
    background:
      linear-gradient(180deg, rgba(23, 19, 15, 0), #17130f 22%),
      #17130f;
    border-color: #46392c;
    box-shadow: 0 -18px 30px rgba(12, 10, 9, 0.76);
  }

  body[data-has-docs="true"] textarea,
  body[data-has-docs="true"] .agent-ai-box textarea {
    color: #fff7ed;
    background: #100d0a;
    border-color: #554737;
  }

  body[data-has-docs="true"] textarea::placeholder {
    color: #a99d8d;
    opacity: 1;
  }

  body[data-has-docs="true"] .agent-command-grid,
  body[data-has-docs="true"] .agent-surface-bar,
  body[data-has-docs="true"] .agent-surface-suggestions {
    background: transparent;
  }
}

/* Final mobile safety layer: bottom nav and readable editor cards win over theme variants. */
@media (max-width: 760px) {
  body[data-has-docs="true"] .mobile-mode-tabs {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1250 !important;
    display: grid !important;
    background: rgba(255, 250, 242, 0.97) !important;
    border-color: #d8c7aa !important;
  }

  body[data-has-docs="true"] .mobile-mode-tabs button {
    color: #1c1a17 !important;
    background: transparent !important;
  }

  body[data-has-docs="true"] .mobile-mode-tabs button.active {
    color: #fffaf2 !important;
    background: #101827 !important;
  }

  body[data-has-docs="true"] .inspector .setting-block,
  body[data-has-docs="true"] .inspector .agent-ai-box,
  body[data-has-docs="true"] .inspector .agent-message,
  body[data-has-docs="true"] .inspector .agent-work-card {
    color: #101827 !important;
    background: #fffaf2 !important;
    border-color: #d8c7aa !important;
  }

  body[data-has-docs="true"] .inspector .setting-block *,
  body[data-has-docs="true"] .inspector .agent-ai-box *,
  body[data-has-docs="true"] .inspector .agent-message *,
  body[data-has-docs="true"] .inspector .agent-work-card * {
    color: inherit;
  }

  body[data-has-docs="true"] .inspector .setting-label,
  body[data-has-docs="true"] .inspector .eyebrow,
  body[data-has-docs="true"] .inspector .agent-message > span,
  body[data-has-docs="true"] .inspector .agent-work-head > span {
    color: #9a3412 !important;
  }

  body[data-has-docs="true"] .inspector textarea,
  body[data-has-docs="true"] .inspector input,
  body[data-has-docs="true"] .inspector select {
    color: #101827 !important;
    background: #ffffff !important;
    border-color: #9b8a72 !important;
  }
}

/* Final rail/chat layout override. Keep this last so older theme layers cannot reintroduce spacing. */
:root {
  --agent-rail-width: clamp(410px, 30vw, 560px);
}

@media (min-width: 981px) {
  body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(0, 1fr) 8px var(--agent-rail-width) !important;
  }

  body[data-has-docs="true"] .sidebar-resizer {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 8px !important;
    min-width: 8px !important;
    cursor: col-resize !important;
    background: rgba(216, 183, 122, 0.16) !important;
    border-left: 1px solid rgba(216, 183, 122, 0.26) !important;
    border-right: 1px solid rgba(216, 183, 122, 0.26) !important;
    z-index: 35 !important;
  }

  body[data-has-docs="true"] .sidebar-resizer::after {
    content: "";
    position: sticky;
    top: 50%;
    display: block;
    width: 3px;
    height: 46px;
    margin: calc(50vh - 80px) auto 0;
    border-radius: 999px;
    background: rgba(216, 183, 122, 0.78);
  }

  body[data-has-docs="true"] .inspector {
    grid-column: 3 !important;
    width: var(--agent-rail-width) !important;
    min-width: 360px !important;
    max-width: 760px !important;
  }
}

@media (max-width: 980px) {
  body[data-has-docs="true"] .sidebar-resizer {
    display: none !important;
  }
}

body[data-has-docs="true"] .top-actions .recompress-action {
  display: none !important;
}

body[data-has-docs="true"] .top-actions .subscribe-action {
  display: inline-flex !important;
}

body[data-has-docs="true"] .agent-session {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding-bottom: 0 !important;
}

body[data-has-docs="true"] .agent-ai-box {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 18 !important;
  margin-top: 8px !important;
  padding: 12px !important;
  border-radius: 18px !important;
  background: #1a130e !important;
  border-color: #5b452d !important;
  box-shadow: 0 -18px 34px rgba(12, 10, 8, 0.72) !important;
}

body[data-has-docs="true"] .agent-ai-box textarea {
  min-height: 88px !important;
  max-height: 132px !important;
  resize: vertical !important;
}

body[data-has-docs="true"] .agent-composer-actions {
  gap: 8px !important;
  margin-top: 8px !important;
}

body[data-has-docs="true"] .agent-screenshot-state {
  margin: 6px 0 0 !important;
  font-size: 0.86rem !important;
}

body[data-has-docs="true"] .agent-support-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(216, 183, 122, 0.22) !important;
  font-size: 0.88rem !important;
}

body[data-has-docs="true"] .agent-support-strip button {
  padding: 6px 10px !important;
  border-radius: 10px !important;
  background: #fffaf2 !important;
  color: #101827 !important;
}

body[data-has-docs="true"] .workspace,
body[data-has-docs="true"] .preview-stage,
body[data-has-docs="true"] .preview-shell {
  background-color: #2a2118 !important;
}

body[data-has-docs="true"] .preview-shell {
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

/* Final restored-export cascade guard, appended after every legacy theme layer. */
html body[data-has-result="true"][data-has-source-docs="false"] {
  color: #fff7ed !important;
  background: #0f0c09 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .topbar,
html body[data-has-result="true"][data-has-source-docs="false"] .workspace,
html body[data-has-result="true"][data-has-source-docs="false"] .preview-toolbar,
html body[data-has-result="true"][data-has-source-docs="false"] .workspace-actions,
html body[data-has-result="true"][data-has-source-docs="false"] .status-strip,
html body[data-has-result="true"][data-has-source-docs="false"] .inspector,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-panel,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-message,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-work-card,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-thinking,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-memory,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-ai-box,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-ai-result,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-runtime-strip span {
  color: #fff7ed !important;
  background: #19130e !important;
  border-color: #4a3827 !important;
  box-shadow: none !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .preview-stage,
html body[data-has-result="true"][data-has-source-docs="false"] .preview-shell {
  background-color: #211912 !important;
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-panel {
  color: #fff7ed !important;
  background:
    linear-gradient(135deg, rgba(168, 238, 224, 0.1), transparent 36%),
    #19130e !important;
  border-color: #4a3827 !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34) !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-panel h2,
html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats b,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-panel strong,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-runtime-strip em {
  color: #fff7ed !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-copy,
html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-stats small,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-panel p,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-message p,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-support-strip {
  color: #d9c8b4 !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .agent-runtime-strip b,
html body[data-has-result="true"][data-has-source-docs="false"] .eyebrow {
  color: #efbd6b !important;
}

html body[data-has-result="true"][data-has-source-docs="false"] .restored-export-actions .primary-action,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-composer-actions button,
html body[data-has-result="true"][data-has-source-docs="false"] .agent-support-strip button {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
  box-shadow: none !important;
}

/* Final loaded-document dark cascade guard. */
html body[data-has-docs="true"] {
  color: #fff7ed !important;
  background: #0f0c09 !important;
}

html body[data-has-docs="true"] .topbar,
html body[data-has-docs="true"] .workspace,
html body[data-has-docs="true"] .preview-toolbar,
html body[data-has-docs="true"] .workspace-actions,
html body[data-has-docs="true"] .edit-toolbar,
html body[data-has-docs="true"] .status-strip,
html body[data-has-docs="true"] .inspector,
html body[data-has-docs="true"] .agent-panel,
html body[data-has-docs="true"] .agent-message,
html body[data-has-docs="true"] .agent-work-card,
html body[data-has-docs="true"] .agent-thinking,
html body[data-has-docs="true"] .agent-memory,
html body[data-has-docs="true"] .agent-ai-box,
html body[data-has-docs="true"] .agent-ai-result,
html body[data-has-docs="true"] .agent-runtime-strip span,
html body[data-has-docs="true"] .edit-panel,
html body[data-has-docs="true"] .tool-options,
html body[data-has-docs="true"] .tool-card {
  color: #fff7ed !important;
  background: #19130e !important;
  border-color: #4a3827 !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .preview-stage,
html body[data-has-docs="true"] .preview-shell {
  background-color: #211912 !important;
  background-image:
    linear-gradient(rgba(216, 183, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 183, 122, 0.1) 1px, transparent 1px) !important;
}

html body[data-has-docs="true"] .agent-panel h2,
html body[data-has-docs="true"] .agent-panel h3,
html body[data-has-docs="true"] .agent-panel strong,
html body[data-has-docs="true"] .edit-panel strong,
html body[data-has-docs="true"] .tool-options strong,
html body[data-has-docs="true"] .agent-runtime-strip em {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-panel p,
html body[data-has-docs="true"] .agent-message p,
html body[data-has-docs="true"] .edit-panel p,
html body[data-has-docs="true"] .tool-options p,
html body[data-has-docs="true"] #statusText,
html body[data-has-docs="true"] .status-text,
html body[data-has-docs="true"] .agent-support-strip {
  color: #d9c8b4 !important;
}

html body[data-has-docs="true"] .agent-runtime-strip b,
html body[data-has-docs="true"] .eyebrow,
html body[data-has-docs="true"] .panel-kicker,
html body[data-has-docs="true"] .active-tool-label {
  color: #efbd6b !important;
}

html body[data-has-docs="true"] .agent-composer-actions button,
html body[data-has-docs="true"] .agent-support-strip button,
html body[data-has-docs="true"] .primary-action {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .brand,
html body[data-has-docs="true"] .brand span {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .brand strong {
  color: #efbd6b !important;
}

/* Final checkout modal dark guard: vendor auth widgets must not reintroduce a light card. */
html body #accessModal .modal {
  color: #fff7ed !important;
  background: #15100c !important;
  border-color: #5b452d !important;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.62) !important;
}

html body #accessModal .modal-auth,
html body #accessModal .modal-plans,
html body #accessModal .unlock-result,
html body #accessModal .checkout-stage,
html body #accessModal .local-pricing-note,
html body #accessModal .launch-promo-note,
html body #accessModal .public-service-note,
html body #accessModal .modal-note {
  color: #fff7ed !important;
  background: #1b140f !important;
  border-color: #4a3827 !important;
}

html body #accessModal .modal-auth h2,
html body #accessModal .modal-auth strong,
html body #accessModal .modal-auth label,
html body #accessModal .modal-plans strong,
html body #accessModal .unlock-result strong,
html body #accessModal .checkout-stage strong {
  color: #fff7ed !important;
}

html body #accessModal .modal-auth p,
html body #accessModal .modal-auth small,
html body #accessModal .modal-plans,
html body #accessModal .launch-promo-note small,
html body #accessModal .public-service-note small,
html body #accessModal .plan-button small,
html body #accessModal .unlock-result p,
html body #accessModal .checkout-stage p {
  color: #d9c8b4 !important;
}

html body #accessModal .plan-button {
  color: #fff7ed !important;
  background: #211912 !important;
  border-color: #5b452d !important;
}

html body #accessModal .plan-button span,
html body #accessModal .launch-promo-note span,
html body #accessModal .launch-promo-note code,
html body #accessModal .public-service-note span,
html body #accessModal .public-service-note a {
  color: #efbd6b !important;
}

html body #accessModal .plan-button strong {
  color: #fff7ed !important;
}

html body #accessModal .plan-button.recommended,
html body #accessModal .plan-button.context-best {
  background: #2b2116 !important;
  border-color: #d8b77a !important;
  box-shadow: 0 0 0 3px rgba(216, 183, 122, 0.2) !important;
}

html body #accessModal #clerkSignInButton {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
}

html body #accessModal .modal-plan-trust span {
  color: #b7fff2 !important;
  background: rgba(56, 189, 171, 0.12) !important;
  border-color: rgba(183, 255, 242, 0.36) !important;
}

html body #accessModal input,
html body #accessModal textarea,
html body #accessModal .clerk-auth-mount input {
  color: #fff7ed !important;
  background: #0f0c09 !important;
  border-color: #5b452d !important;
}

html body #accessModal input::placeholder,
html body #accessModal textarea::placeholder,
html body #accessModal .clerk-auth-mount input::placeholder {
  color: #9b8b79 !important;
}

html body #accessModal .clerk-auth-mount,
html body #accessModal .clerk-auth-mount :where(.cl-rootBox, .cl-card, .cl-cardBox, .cl-main, .cl-header, .cl-footer, .cl-form, .cl-formField, .cl-formFieldInput, .cl-socialButtons, .cl-dividerRow, .cl-identityPreview, .cl-alternativeMethods, .cl-footerAction, .cl-internal-b3fm6y) {
  color: #fff7ed !important;
  background: #1b140f !important;
  border-color: #4a3827 !important;
  box-shadow: none !important;
}

html body #accessModal .clerk-auth-mount :where(h1, h2, h3, p, label, span, small, strong, button, a, div) {
  color: #fff7ed !important;
}

html body #accessModal .clerk-auth-mount :where(.cl-headerSubtitle, .cl-footerActionText, .cl-formFieldHintText, .cl-dividerText) {
  color: #d9c8b4 !important;
}

html body #accessModal .clerk-auth-mount :where(.cl-socialButtonsBlockButton, .cl-formButtonPrimary, button) {
  color: #fff7ed !important;
  background: #211912 !important;
  border: 1px solid #5b452d !important;
  box-shadow: none !important;
}

html body #accessModal .clerk-auth-mount :where(.cl-formButtonPrimary) {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
}

/* Final checkout divider guard: keep the modal visually single-surface. */
html body[data-modal-open="access"] .sidebar-resizer,
html body[data-modal-open="access"] .sidebar-resizer::after {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body #accessModal .modal-auth {
  border-right: 0 !important;
}

html body #accessModal .modal-plans {
  border-left: 0 !important;
}

/* 2026-06 editor mobile and brand consistency guard. Keep this last. */
html body .brand-mark,
html body .seo-brand-mark,
html body .tools-rail-brand {
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}

html body .brand-mark .bitepdf-mark-svg,
html body .seo-brand-mark .bitepdf-mark-svg,
html body .tools-rail-brand .bitepdf-mark-svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

html body[data-modal-open="access"] .sidebar-resizer,
html body[data-modal-open="access"] .sidebar-resizer::after {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body #accessModal .modal-auth,
html body #accessModal .modal-plans {
  border-left: 0 !important;
  border-right: 0 !important;
}

@media (max-width: 760px) {
  html body {
    overflow-x: hidden !important;
  }

  html body .topbar {
    grid-template-columns: auto 1fr auto !important;
    min-width: 0 !important;
  }

  html body .brand {
    min-width: 0 !important;
    max-width: 44vw !important;
  }

  html body .brand span:last-child {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body .workspace-actions,
  html body .viewport-edit-tools {
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  html body .workspace-actions::-webkit-scrollbar,
  html body .viewport-edit-tools::-webkit-scrollbar {
    display: none;
  }

  html body[data-has-docs="true"] .preview-stage {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body[data-has-docs="true"] .mobile-mode-tabs {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 5px !important;
  }

  html body[data-has-docs="true"] .mobile-mode-tabs button {
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  html body #accessModal .modal-card {
    width: min(100vw - 18px, 520px) !important;
    max-height: calc(100svh - 18px) !important;
    overflow: auto !important;
  }

  html body #accessModal .modal-grid {
    grid-template-columns: 1fr !important;
  }
}

/* True final mobile editor guard: compact controls and dark inspector. */
@media (max-width: 760px) {
  html body[data-has-docs="true"] .topbar {
    grid-template-columns: minmax(0, 1fr) 52px !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: #0f0c09 !important;
    border-bottom: 1px solid #4a3827 !important;
  }

  html body[data-has-docs="true"] .brand {
    grid-column: 1 !important;
    min-height: 44px !important;
    max-width: 100% !important;
  }

  html body[data-has-docs="true"] .mobile-menu-button {
    grid-column: 2 !important;
    width: 48px !important;
    height: 48px !important;
    color: #11100e !important;
    background: #fff7ed !important;
    border-color: #d8b77a !important;
  }

  html body[data-has-docs="true"] .toolbar,
  html body[data-has-docs="true"] .top-actions {
    grid-row: 2 !important;
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body[data-has-docs="true"] .toolbar {
    grid-column: 1 !important;
  }

  html body[data-has-docs="true"] .top-actions {
    grid-column: 2 / 3 !important;
    justify-content: end !important;
  }

  html body[data-has-docs="true"] #openButton,
  html body[data-has-docs="true"] #downloadButton {
    min-height: 40px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 11px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }

  html body[data-has-docs="true"] #downloadButton span {
    display: none !important;
  }

  html body[data-has-docs="true"] #openButton svg,
  html body[data-has-docs="true"] #downloadButton svg {
    width: 17px !important;
    height: 17px !important;
  }

  html body[data-has-docs="true"] .workspace-actions,
  html body[data-has-docs="true"] .viewport-edit-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    min-height: 0 !important;
    padding: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    background: #19130e !important;
    border: 1px solid #4a3827 !important;
    border-radius: 14px !important;
  }

  html body[data-has-docs="true"] .workspace-actions > button:nth-of-type(n),
  html body[data-has-docs="true"] .viewport-edit-tools .tool-button {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 88px !important;
    max-width: 132px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    color: #fff7ed !important;
    background: #211912 !important;
    border-color: #5b452d !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body[data-has-docs="true"] .workspace-actions button::after {
    content: none !important;
    display: none !important;
  }

  html body[data-has-docs="true"] .workspace-actions button.active,
  html body[data-has-docs="true"] .viewport-edit-tools .tool-button.active {
    color: #11100e !important;
    background: #efbd6b !important;
    border-color: #efbd6b !important;
  }

  html body[data-has-docs="true"] .inspector,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .inspector,
  html body[data-has-docs="true"][data-mobile-mode="split"] .inspector {
    color: #fff7ed !important;
    background: #0f0c09 !important;
  }

  html body[data-has-docs="true"] .inspector .setting-block,
  html body[data-has-docs="true"] .inspector .agent-ai-box,
  html body[data-has-docs="true"] .inspector .agent-message,
  html body[data-has-docs="true"] .inspector .agent-work-card {
    color: #fff7ed !important;
    background: #19130e !important;
    border-color: #4a3827 !important;
  }

  html body[data-has-docs="true"] .inspector .setting-label,
  html body[data-has-docs="true"] .inspector .eyebrow,
  html body[data-has-docs="true"] .inspector .agent-message > span,
  html body[data-has-docs="true"] .inspector .agent-work-head > span,
  html body[data-has-docs="true"] .inspector .setting-block strong {
    color: #efbd6b !important;
  }

  html body[data-has-docs="true"] .inspector p,
  html body[data-has-docs="true"] .inspector small,
  html body[data-has-docs="true"] .inspector label {
    color: #d9c8b4 !important;
  }

  html body[data-has-docs="true"] .inspector textarea,
  html body[data-has-docs="true"] .inspector input,
  html body[data-has-docs="true"] .inspector select {
    color: #fff7ed !important;
    background: #0f0c09 !important;
    border-color: #5b452d !important;
  }

  html body[data-has-docs="true"] .mobile-mode-tabs {
    color: #fff7ed !important;
    background: rgba(25, 19, 14, 0.98) !important;
    border-color: #4a3827 !important;
  }

  html body[data-has-docs="true"] .mobile-mode-tabs button {
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"] .mobile-mode-tabs button.active {
    color: #11100e !important;
    background: #efbd6b !important;
  }
}

/* Final mobile landing guard: no opacity phasing, no clipped one-screen trap. */
@media (max-width: 760px) {
  html body .bitepdf-premium-page {
    min-height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    color: #fff7ed !important;
    background:
      radial-gradient(circle at 78% 10%, rgba(239, 189, 107, 0.12), transparent 18rem),
      linear-gradient(rgba(216, 183, 122, 0.07) 1px, transparent 1px) 0 0 / 36px 36px,
      linear-gradient(90deg, rgba(216, 183, 122, 0.06) 1px, transparent 1px) 0 0 / 36px 36px,
      #100c09 !important;
  }

  html body .bitepdf-premium-page::before {
    display: none !important;
  }

  html body .bitepdf-premium-page :where(
    .landing-premium-hero,
    .landing-hero-title,
    .landing-hero-workbench,
    .mobile-landing-info,
    .mobile-landing-footer,
    .journey-panel,
    .journey-artifact,
    .landing-editorial-band
  ) {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  html body .bitepdf-premium-page .landing-premium-hero {
    width: min(100%, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 24px 0 18px !important;
    overflow: visible !important;
    display: grid !important;
    gap: 14px !important;
  }

  html body .bitepdf-premium-page .landing-hero-title {
    width: 100% !important;
    padding: 0 !important;
    text-align: center !important;
  }

  html body .bitepdf-premium-page .landing-hero-title h1 {
    max-width: 100% !important;
    font-size: clamp(42px, 13vw, 58px) !important;
    line-height: 0.98 !important;
    overflow: visible !important;
  }

  html body .bitepdf-premium-page .landing-hero-title p:last-child {
    width: min(100%, 350px) !important;
    max-width: 350px !important;
    margin: 12px auto 0 !important;
    color: #d7cab7 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  html body .bitepdf-premium-page .landing-hero-workbench {
    width: min(100%, 390px) !important;
    max-width: 390px !important;
    margin: 0 auto !important;
  }

  html body .bitepdf-premium-page .mobile-landing-info,
  html body .bitepdf-premium-page .mobile-landing-footer {
    position: relative !important;
    z-index: 1 !important;
    width: min(100% - 28px, 430px) !important;
    margin: 14px auto 0 !important;
    padding: 17px !important;
    display: grid !important;
    gap: 12px !important;
    color: #fff7ed !important;
    background: linear-gradient(135deg, rgba(216, 183, 122, 0.1), transparent 46%), #19130e !important;
    border: 1px solid #4a3827 !important;
    border-radius: 20px !important;
    box-shadow: none !important;
  }

  html body .bitepdf-premium-page .mobile-landing-footer {
    margin-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body .bitepdf-premium-page .mobile-landing-info h2,
  html body .bitepdf-premium-page .mobile-landing-footer strong {
    color: #fff7ed !important;
  }

  html body .bitepdf-premium-page .mobile-landing-info p,
  html body .bitepdf-premium-page .mobile-landing-footer p,
  html body .bitepdf-premium-page .mobile-landing-info li {
    color: #d7cab7 !important;
  }

  html body .bitepdf-premium-page .mobile-landing-footer nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  html body .bitepdf-premium-page .mobile-landing-footer nav a {
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 13px !important;
    color: #fff7ed !important;
    background: #241b14 !important;
    border: 1px solid #5a4431 !important;
    border-radius: 999px !important;
  }
}

/* Final editor interaction guard. Keep this last. */
html body .brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
}

html body .brand-logo-full {
  display: block !important;
  width: clamp(112px, 10vw, 156px) !important;
  height: 50px !important;
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0 !important;
}

html body .bitepdf-icon-img,
html body .avatar .bitepdf-mark-svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body .legal-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

html body .legal-back .legal-brand-logo {
  display: inline-flex !important;
  width: 118px !important;
  height: 40px !important;
  overflow: hidden !important;
  background: transparent !important;
}

html:has(body .share-page),
html:has(body .legal-page),
body:has(.share-page),
body:has(.legal-page) {
  background: #0f0c09 !important;
  color: #fff7ed !important;
}

html body {
  background: #0f0c09 !important;
}

html body .seo-brand-mark,
html body .pricing-header .seo-brand-mark,
html body .brand-mark,
html body .legal-back .legal-brand-logo {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html body .seo-brand-wordmark,
html body .legal-back .legal-brand-logo {
  width: 142px !important;
  height: 48px !important;
  border-radius: 0 !important;
}

html body .share-page {
  color: #fff7ed !important;
  background:
    linear-gradient(rgba(217, 183, 122, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 183, 122, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 84% 12%, rgba(20, 166, 145, 0.1), transparent 22rem),
    linear-gradient(180deg, #0f0c09 0%, #17100b 100%) !important;
  background-size: 48px 48px, 48px 48px, auto, auto !important;
}

html body .share-page :where(h1, h2, strong, b),
html body .legal-page :where(h1, h2, strong, label) {
  color: #fff7ed !important;
}

html body .share-page :where(p, small, span:not(.share-upload-icon):not(.share-file-kind)),
html body .legal-page :where(p, ul, li, .support-form-note) {
  color: #d7cab7 !important;
}

html body .share-page :where(.share-hero-status, .share-dropzone, .share-format-panel, .share-list-panel, .share-history-panel, .share-file-row, .share-empty, .share-workflow-cards article),
html body .legal-page,
html body .support-form {
  background: #17110c !important;
  border-color: #4a3827 !important;
  box-shadow: none !important;
}

html body .share-page :where(.share-route-strip, .share-route-strip span, .share-route-strip i, .share-stepper span, .share-proof-grid span, .share-history-list article),
html body .share-page .share-storage-pending {
  color: #fff7ed !important;
  background: #201812 !important;
  border-color: #5a4431 !important;
}

html body .share-page :where(a, .seo-nav a),
html body .legal-page a {
  color: #f0c878 !important;
}

html body .share-page :where(button, .seo-login),
html body .support-form button {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
}

html body .share-page :where(button:disabled, .share-action-bar button:disabled) {
  color: #17110c !important;
  background: #8a744f !important;
  border-color: #8a744f !important;
  opacity: 0.72 !important;
}

html body .support-form input,
html body .support-form select,
html body .support-form textarea {
  color: #fff7ed !important;
  background: #0a0806 !important;
  border-color: #5a4431 !important;
}

html body .support-form input::placeholder,
html body .support-form textarea::placeholder {
  color: #9b8f80 !important;
}

/* Final tiny-detail QA guard: keep editor, modal, and rails inside the viewport. */
html,
body {
  max-width: 100% !important;
  overflow-x: clip !important;
}

html body #accessModal:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  place-items: center !important;
  padding: clamp(12px, 3vw, 28px) !important;
  background: rgba(8, 6, 4, 0.76) !important;
  backdrop-filter: blur(6px) !important;
  pointer-events: auto !important;
}

html body #accessModal:not([hidden]) .modal {
  position: relative !important;
  z-index: 10001 !important;
  width: min(860px, calc(100vw - 24px)) !important;
  max-height: calc(100svh - 24px) !important;
  overflow: auto !important;
}

html body .result-dock {
  grid-template-columns: minmax(0, 1fr) minmax(230px, auto) auto !important;
  color: #fff7ed !important;
  background: linear-gradient(135deg, rgba(37, 28, 20, 0.98), rgba(22, 16, 11, 0.98)) !important;
  border: 1px solid #5a4431 !important;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.32) !important;
}

html body .result-dock h3,
html body .result-dock strong,
html body .result-dock b {
  color: #fff7ed !important;
}

html body .result-dock p:not(.eyebrow),
html body .result-stats small {
  color: #d7cab7 !important;
}

html body .result-stats span {
  background: #120d09 !important;
  border-color: #4a3827 !important;
}

html body .result-dock .primary-action {
  color: #11100e !important;
  background: #d8b77a !important;
  border-color: #efbd6b !important;
}

html body[data-has-docs="true"] .app-shell,
html body[data-has-docs="true"] .workspace,
html body[data-has-docs="true"] .preview-shell,
html body[data-has-docs="true"] .preview-stage,
html body[data-has-docs="true"] .inspector,
html body #accessModal .modal-card,
html body #accessModal .modal-grid,
html body #accessModal .modal-auth,
html body #accessModal .modal-plans,
html body .restored-export-panel {
  min-width: 0 !important;
  max-width: 100% !important;
}

html body[data-has-docs="true"] :where(.agent-message, .agent-work-card, .setting-block, .workspace-actions button, .tool-button),
html body #accessModal :where(.modal-auth, .modal-plans, .plan-button, .checkout-stage, .unlock-result) {
  overflow-wrap: anywhere !important;
}

html body .share-page .share-storage-pending {
  color: #fff7ed !important;
  background: #201812 !important;
  border-color: #5a4431 !important;
}

html body .share-page .share-storage-pending strong {
  color: #fff7ed !important;
}

html body .share-page .share-storage-pending span {
  color: #d7cab7 !important;
}

@media (max-width: 760px) {
  html body .result-dock {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  html body .result-dock h3 {
    font-size: 22px !important;
  }

  html body .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body .result-stats span {
    min-width: 0 !important;
    padding: 8px !important;
  }

  html body .result-stats b {
    font-size: 15px !important;
  }
}

/* 2026-06-04 focused editor QA guard: long PDFs use a compact mobile pager. */
html body .page-dock.long-document {
  gap: 8px !important;
  max-width: min(94vw, 420px) !important;
  padding: 7px 9px !important;
}

html body .page-dock.long-document .page-dots {
  width: clamp(104px, 34vw, 170px) !important;
}

html body .page-range {
  width: 100% !important;
  min-width: 96px !important;
  accent-color: #0d9f87 !important;
}

html body .page-dock.long-document span:last-child {
  min-width: 86px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"] .page-dock.long-document {
    position: sticky !important;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 14 !important;
    margin-bottom: 10px !important;
  }
}

html body[data-has-docs="true"] .app-shell,
html body[data-has-docs="true"] .workspace,
html body[data-has-docs="true"] .preview-shell,
html body[data-has-docs="true"] .preview-stage,
html body[data-has-docs="true"] .inspector,
html body[data-has-docs="true"] .agent-panel,
html body[data-has-docs="true"] .workspace-actions,
html body[data-has-docs="true"] .editor-tools,
html body[data-has-docs="true"] .preview-toolbar {
  transition: none !important;
  animation: none !important;
}

html body[data-has-docs="true"] .sidebar-resizer {
  width: 2px !important;
  background: rgba(216, 183, 122, 0.32) !important;
  box-shadow: none !important;
  opacity: 0.72 !important;
}

html body[data-has-docs="true"] .sidebar-resizer::after {
  display: none !important;
}

html body[data-has-docs="true"] .agent-session {
  gap: 14px !important;
}

html body[data-has-docs="true"] .agent-message {
  margin: 0 22px 14px 0 !important;
  padding: 14px 15px !important;
  border-radius: 12px !important;
  background: #201812 !important;
  border: 1px solid #4a3827 !important;
  border-left: 3px solid #d8b77a !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .agent-message.user {
  margin: 0 0 14px 34px !important;
  background: #efbd6b !important;
  border-color: #efbd6b !important;
  border-left-color: #101827 !important;
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-message > span {
  display: inline-flex !important;
  width: auto !important;
  min-height: 24px !important;
  padding: 3px 8px !important;
  margin-bottom: 8px !important;
  border-radius: 999px !important;
  background: rgba(216, 183, 122, 0.14) !important;
  color: #f5ad6b !important;
  letter-spacing: 0.04em !important;
}

html body[data-has-docs="true"] .agent-message.user > span {
  background: rgba(16, 24, 39, 0.14) !important;
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-message strong,
html body[data-has-docs="true"] .agent-message p {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-message.user strong,
html body[data-has-docs="true"] .agent-message.user p {
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-runtime-strip {
  gap: 8px !important;
}

html body[data-has-docs="true"] .agent-runtime-strip span {
  min-width: 0 !important;
  border-radius: 10px !important;
  background: #201812 !important;
  border-color: #4a3827 !important;
}

html body[data-has-docs="true"] .agent-runtime-strip em {
  max-width: 9ch !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  html body .brand-logo-full {
    width: 118px !important;
  }

  html body[data-has-docs="true"] .agent-message {
    margin-right: 8px !important;
  }

  html body[data-has-docs="true"] .agent-message.user {
    margin-left: 18px !important;
  }
}

/* Final agent transcript rigor pass: make it feel like a real operator chat. */
html body[data-has-docs="true"] .agent-session {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding-bottom: 16px !important;
  scroll-padding-bottom: 16px !important;
}

html body[data-has-docs="true"] .agent-panel {
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html body[data-has-docs="true"] .agent-head,
html body[data-has-docs="true"] .agent-local-plan {
  display: none !important;
}

html body[data-has-docs="true"] .agent-ai-box {
  position: static !important;
  flex: 0 0 auto !important;
  margin-top: 10px !important;
}

@media (min-width: 981px) {
  html body[data-has-docs="true"] .inspector {
    height: calc(100dvh - 64px) !important;
    overflow: hidden !important;
  }

  html body[data-has-docs="true"] .agent-panel {
    height: 100% !important;
  }
}

html body[data-has-docs="true"] .agent-message {
  width: min(100%, 560px) !important;
  margin: 0 18px 0 0 !important;
  padding: 16px !important;
  align-self: flex-start !important;
  border-radius: 14px !important;
  border: 1px solid #5a432b !important;
  border-left: 4px solid #d8b77a !important;
  background: linear-gradient(180deg, #221912, #17110d) !important;
}

html body[data-has-docs="true"] .agent-message.user {
  width: min(88%, 500px) !important;
  margin: 0 0 0 30px !important;
  align-self: flex-end !important;
  border-color: #d8b77a !important;
  border-left: 1px solid #d8b77a !important;
  border-right: 4px solid #101827 !important;
  background: #efbd6b !important;
  color: #101827 !important;
}

html body[data-has-docs="true"] .agent-message > span {
  margin-bottom: 10px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
}

html body[data-has-docs="true"] .agent-message.assistant > span {
  color: #ffd18a !important;
  background: rgba(216, 183, 122, 0.16) !important;
}

html body[data-has-docs="true"] .agent-message.user > span {
  color: #101827 !important;
  background: rgba(16, 24, 39, 0.12) !important;
}

html body[data-has-docs="true"] .agent-message strong {
  display: block !important;
  margin-bottom: 6px !important;
  color: #fff7ed !important;
  font-size: 1rem !important;
  line-height: 1.25 !important;
}

html body[data-has-docs="true"] .agent-message p {
  margin: 0 !important;
  color: #e4d5c5 !important;
  font-size: 0.98rem !important;
  line-height: 1.48 !important;
}

html body[data-has-docs="true"] .agent-message.user strong,
html body[data-has-docs="true"] .agent-message.user p {
  color: #101827 !important;
}

html body .agent-rigor-block {
  display: grid !important;
  gap: 8px !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(216, 183, 122, 0.28) !important;
}

html body .agent-rigor-block div {
  display: grid !important;
  grid-template-columns: 78px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

html body .agent-rigor-block b {
  color: #ffd18a !important;
  font-size: 0.76rem !important;
  line-height: 1.3 !important;
}

html body .agent-rigor-block span {
  color: #e4d5c5 !important;
  font-size: 0.88rem !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  overflow-wrap: anywhere !important;
}

html body .agent-rigor-block ol {
  display: grid !important;
  gap: 6px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

html body .agent-rigor-block li {
  display: grid !important;
  gap: 2px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  background: rgba(255, 247, 237, 0.045) !important;
  border: 1px solid rgba(216, 183, 122, 0.16) !important;
}

html body .agent-rigor-block li b {
  color: #fff7ed !important;
  font-size: 0.84rem !important;
}

html body .agent-rigor-block li span {
  color: #cdbda9 !important;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"] .agent-message,
  html body[data-has-docs="true"] .agent-message.user {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body[data-has-docs="true"] .agent-session {
    padding-bottom: 16px !important;
    scroll-padding-bottom: 16px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-work-card.warning {
    display: none !important;
  }

  html body .agent-rigor-block div {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

html body[data-has-docs="true"] .agent-message .agent-rigor-block b,
html body[data-has-docs="true"] .agent-message .agent-rigor-block span {
  display: inline !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .agent-message .agent-rigor-block b {
  color: #ffd18a !important;
}

html body[data-has-docs="true"] .agent-message .agent-rigor-block span {
  color: #e4d5c5 !important;
}

html body[data-has-docs="true"] .agent-message .agent-rigor-block li b {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-message .agent-rigor-block li span {
  color: #cdbda9 !important;
}

html body[data-has-docs="true"] .agent-message.assistant strong {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-message.assistant p {
  color: #e4d5c5 !important;
}

html body[data-has-docs="true"] .agent-message.assistant .agent-rigor-block span {
  color: #e4d5c5 !important;
}

/* 2026-06-04 agent contrast hardening: stop inherited dark-blue text on dark cards. */
html body[data-has-docs="true"] .inspector {
  background: #100b08 !important;
  border-left: 1px solid #5a432b !important;
  color: #e4d5c5 !important;
}

html body[data-has-docs="true"] .agent-panel {
  background: #100b08 !important;
  color: #e4d5c5 !important;
}

html body[data-has-docs="true"] .agent-message.assistant,
html body[data-has-docs="true"] .agent-message.assistant:hover,
html body[data-has-docs="true"] .agent-message.assistant:focus,
html body[data-has-docs="true"] .agent-message.assistant:focus-within,
html body[data-has-docs="true"] .agent-message.assistant.status,
html body[data-has-docs="true"] .agent-message.assistant.status:hover,
html body[data-has-docs="true"] .agent-message.assistant[class*="tool-"],
html body[data-has-docs="true"] .agent-message.assistant[class*="tool-"]:hover {
  background: linear-gradient(180deg, #221912 0%, #17110d 100%) !important;
  border-color: #5a432b !important;
  border-left-color: #d8b77a !important;
  color: #e4d5c5 !important;
  filter: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .agent-message.assistant *,
html body[data-has-docs="true"] .agent-message.assistant:hover *,
html body[data-has-docs="true"] .agent-message.assistant:focus *,
html body[data-has-docs="true"] .agent-message.assistant:focus-within * {
  color: inherit !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html body[data-has-docs="true"] .agent-message.assistant > span,
html body[data-has-docs="true"] .agent-message.assistant:hover > span,
html body[data-has-docs="true"] .agent-message.assistant:focus-within > span {
  background: rgba(216, 183, 122, 0.16) !important;
  color: #ffd18a !important;
}

html body[data-has-docs="true"] .agent-message.assistant strong,
html body[data-has-docs="true"] .agent-message.assistant:hover strong,
html body[data-has-docs="true"] .agent-message.assistant:focus-within strong {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-message.assistant p,
html body[data-has-docs="true"] .agent-message.assistant:hover p,
html body[data-has-docs="true"] .agent-message.assistant:focus-within p,
html body[data-has-docs="true"] .agent-message.assistant .agent-rigor-block span,
html body[data-has-docs="true"] .agent-message.assistant:hover .agent-rigor-block span,
html body[data-has-docs="true"] .agent-message.assistant:focus-within .agent-rigor-block span {
  color: #e4d5c5 !important;
  font-weight: 500 !important;
}

html body[data-has-docs="true"] .agent-message.assistant .agent-rigor-block b,
html body[data-has-docs="true"] .agent-message.assistant:hover .agent-rigor-block b,
html body[data-has-docs="true"] .agent-message.assistant:focus-within .agent-rigor-block b {
  color: #ffd18a !important;
}

html body[data-has-docs="true"] .agent-message.user,
html body[data-has-docs="true"] .agent-message.user:hover,
html body[data-has-docs="true"] .agent-message.user:focus-within {
  background: #efbd6b !important;
  border-color: #d8b77a !important;
  border-right-color: #101827 !important;
  color: #101827 !important;
  filter: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html body[data-has-docs="true"] .agent-message.user *,
html body[data-has-docs="true"] .agent-message.user:hover *,
html body[data-has-docs="true"] .agent-message.user:focus-within * {
  color: #101827 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html body[data-has-docs="true"] .agent-runtime-strip span,
html body[data-has-docs="true"] .agent-runtime-strip span:hover,
html body[data-has-docs="true"] .agent-runtime-strip span:focus-within {
  background: #201812 !important;
  border-color: #5a432b !important;
  color: #fff7ed !important;
  box-shadow: none !important;
  filter: none !important;
}

html body[data-has-docs="true"] .agent-runtime-strip b,
html body[data-has-docs="true"] .agent-runtime-strip span:hover b,
html body[data-has-docs="true"] .agent-runtime-strip span:focus-within b {
  color: #ffd18a !important;
}

html body[data-has-docs="true"] .agent-runtime-strip em,
html body[data-has-docs="true"] .agent-runtime-strip span:hover em,
html body[data-has-docs="true"] .agent-runtime-strip span:focus-within em {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-ai-box,
html body[data-has-docs="true"] .agent-ai-box:hover,
html body[data-has-docs="true"] .agent-ai-box:focus-within {
  background: #120c08 !important;
  border-color: #5a432b !important;
  color: #fff7ed !important;
  box-shadow: none !important;
  filter: none !important;
}

html body[data-has-docs="true"] .agent-ai-box label,
html body[data-has-docs="true"] .agent-ai-box strong {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-ai-box textarea,
html body[data-has-docs="true"] .agent-ai-box textarea:hover,
html body[data-has-docs="true"] .agent-ai-box textarea:focus {
  background: #080604 !important;
  border-color: #6b5034 !important;
  color: #fff7ed !important;
  outline-color: #d8b77a !important;
}

html body[data-has-docs="true"] .agent-ai-box textarea::placeholder {
  color: #b9a999 !important;
}

html body[data-has-docs="true"] :where(.workspace-actions button, .editor-tools button, .preview-toolbar button, .agent-apply-button, .agent-refine-button, .agent-ai-box button):hover,
html body[data-has-docs="true"] :where(.workspace-actions button, .editor-tools button, .preview-toolbar button, .agent-apply-button, .agent-refine-button, .agent-ai-box button):focus-visible {
  filter: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
  box-shadow: inset 0 0 0 1px rgba(255, 209, 138, 0.45) !important;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"] .agent-session {
    background: #100b08 !important;
    padding-bottom: clamp(300px, 42vh, 380px) !important;
    scroll-padding-bottom: clamp(300px, 42vh, 380px) !important;
  }

  html body[data-has-docs="true"] .agent-message.assistant,
  html body[data-has-docs="true"] .agent-message.assistant:hover,
  html body[data-has-docs="true"] .agent-message.assistant:focus-within,
  html body[data-has-docs="true"] .agent-message.user,
  html body[data-has-docs="true"] .agent-message.user:hover,
  html body[data-has-docs="true"] .agent-message.user:focus-within {
    width: 100% !important;
    max-width: 100% !important;
  }

  html body[data-has-docs="true"] .agent-rigor-block div {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  html body[data-has-docs="true"] .agent-message.assistant strong {
    font-size: 1.04rem !important;
    line-height: 1.2 !important;
  }

  html body[data-has-docs="true"] .agent-message.assistant p {
    font-size: 0.95rem !important;
    line-height: 1.42 !important;
  }

  html body[data-has-docs="true"] .agent-message.assistant .agent-rigor-block b {
    font-size: 0.74rem !important;
    line-height: 1.2 !important;
  }

  html body[data-has-docs="true"] .agent-message.assistant .agent-rigor-block span {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
  }
}

/* Mobile agent composer must stay reachable above the mode tabs. */
@media (max-width: 760px) {
  html body[data-has-docs="true"][data-mobile-mode="agent"] .inspector {
    overflow: auto !important;
    padding-bottom: calc(330px + env(safe-area-inset-bottom)) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-panel {
    overflow: visible !important;
    padding-bottom: clamp(300px, 45vh, 390px) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session {
    max-height: calc(100dvh - 430px) !important;
    min-height: 120px !important;
    padding-bottom: 12px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box {
    position: fixed !important;
    left: 18px !important;
    right: 18px !important;
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    z-index: 90 !important;
    max-height: min(42vh, 330px) !important;
    overflow: auto !important;
    padding: 12px !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box textarea {
    min-height: 72px !important;
    max-height: 104px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-composer-actions {
    display: grid !important;
    grid-template-columns: 0.9fr 1fr 1.15fr !important;
    gap: 8px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-composer-actions button {
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:hover,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:focus-within {
    background: #fffaf2 !important;
    border: 1px solid #dcc9ad !important;
    border-left: 4px solid #efbd6b !important;
    color: #171923 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant *,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:hover *,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:focus-within * {
    color: #171923 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant > span {
    color: #6f4518 !important;
    background: #f4d18c !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant p {
    color: #3a332c !important;
    font-weight: 500 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-approval-row {
    display: grid !important;
    grid-template-columns: 1fr 0.75fr !important;
    gap: 8px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] :where(.agent-apply-button, .agent-refine-button) {
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .back-to-agent-button {
    position: sticky !important;
    top: 0 !important;
    z-index: 6 !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .setting-block {
    background: #fffaf2 !important;
    border: 1px solid #dcc9ad !important;
    color: #171923 !important;
    box-shadow: 0 10px 24px rgba(20, 14, 6, 0.18) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(.setting-label, .range-row label, .check-row span) {
    color: #704817 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(.tool-readout, .hint, .range-row output) {
    color: #171923 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(textarea, input, select) {
    background: #ffffff !important;
    border-color: #cdb893 !important;
    color: #111827 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(textarea, input, select)::placeholder {
    color: #7a7f8c !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item {
    background: #ffffff !important;
    border-color: #d7c29e !important;
    color: #111827 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item.selected {
    background: #eaf2ff !important;
    border-color: #3973d8 !important;
    color: #111827 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item * {
    color: #111827 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item button {
    color: #b42318 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureModal .signature-modal {
    background: #fffaf2 !important;
    border: 1px solid #dcc9ad !important;
    color: #171923 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureModal .signature-modal h2 {
    color: #171923 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureCanvas {
    background: #ffffff !important;
    border-color: #cdb893 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureModal .modal-close {
    background: #17110b !important;
    border-color: #5d4528 !important;
    color: #ffffff !important;
  }
}

/* Final mobile agent theme guard: editor stays dark; support/help pages stay light elsewhere. */
@media (max-width: 760px) {
  html body[data-has-docs="true"][data-mobile-mode="agent"] :where(.top-actions .tool-button, #openButton, #downloadButton) {
    background: #15110d !important;
    border-color: #6a4c28 !important;
    color: #fff7ed !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] :where(.top-actions .tool-button svg, #openButton svg, #downloadButton svg) {
    color: #f7c66f !important;
    stroke: currentColor !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box:hover,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box:focus-within {
    background: #120d09 !important;
    border: 1px solid #6a4c28 !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box :where(label, strong) {
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box textarea,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box textarea:hover,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box textarea:focus {
    background: #20160f !important;
    border-color: #8a683a !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box textarea::placeholder {
    color: #c9bba6 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:hover,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:focus-within {
    background: #1a140f !important;
    border: 1px solid #6a4c28 !important;
    border-left: 4px solid #f0bd64 !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant *,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:hover *,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant:focus-within * {
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-message.assistant > span {
    background: #473119 !important;
    color: #ffd98a !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .setting-block,
  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureModal .signature-modal {
    background: #1a140f !important;
    border-color: #6a4c28 !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(.setting-label, .range-row label, .check-row span),
  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(.tool-readout, .hint, .range-row output),
  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureModal .signature-modal h2 {
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel :where(textarea, input, select),
  html body[data-has-docs="true"][data-mobile-mode="agent"] #signatureCanvas {
    background: #20160f !important;
    border-color: #8a683a !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item,
  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item.selected {
    background: #20160f !important;
    border-color: #8a683a !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #editPanel .annotation-item * {
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentGoalInput,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-ai-box #agentGoalInput,
  html body[data-has-docs="true"][data-mobile-mode="agent"] textarea#agentGoalInput {
    background: #20160f !important;
    border-color: #8a683a !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentGoalInput::placeholder {
    color: #c9bba6 !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message.assistant p,
  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message.assistant strong,
  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message.assistant :where(p, strong, span:not(.agent-rigor-block span)) {
    color: #fff7ed !important;
    opacity: 1 !important;
  }

  html body[data-has-docs="true"] :where(.top-actions .tool-button, #openButton, #downloadButton) {
    background: #15110d !important;
    border-color: #6a4c28 !important;
    color: #fff7ed !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  }

  html body[data-has-docs="true"] :where(.top-actions .tool-button svg, #openButton svg, #downloadButton svg) {
    color: #f7c66f !important;
    stroke: currentColor !important;
  }

  html body[data-has-docs="true"] .agent-refine-button {
    background: #20160f !important;
    border-color: #8a683a !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"] #openButton,
  html body[data-has-docs="true"] #downloadButton,
  html body[data-has-docs="true"] .top-actions .tool-button {
    background: #15110d !important;
    border-color: #6a4c28 !important;
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"] #openButton span,
  html body[data-has-docs="true"] #downloadButton span {
    color: #fff7ed !important;
  }

  html body[data-has-docs="true"] .agent-panel .agent-refine-button,
  html body[data-has-docs="true"] #agentTranscript .agent-refine-button {
    background: #20160f !important;
    border-color: #8a683a !important;
    color: #fff7ed !important;
  }
}

/* Final chat readability pass: separate user and agent bubbles on desktop and mobile. */
html body[data-has-docs="true"] #agentTranscript.agent-session,
html body[data-has-docs="true"] .agent-session {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 16px !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-message,
html body[data-has-docs="true"] .agent-session > .agent-message {
  width: fit-content !important;
  min-width: min(220px, 72%) !important;
  max-width: min(680px, 88%) !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-message.assistant,
html body[data-has-docs="true"] .agent-session > .agent-message.assistant {
  align-self: flex-start !important;
  border-top-left-radius: 7px !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-message.user,
html body[data-has-docs="true"] .agent-session > .agent-message.user {
  align-self: flex-end !important;
  min-width: min(180px, 58%) !important;
  max-width: min(560px, 78%) !important;
  border-top-right-radius: 7px !important;
  background: #f0bd64 !important;
  border-color: #d79b39 !important;
  color: #101827 !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-message.user :where(span, strong, p),
html body[data-has-docs="true"] .agent-session > .agent-message.user :where(span, strong, p) {
  color: #101827 !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-message > span {
  display: inline-flex !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 8px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-approval-row {
  margin-top: 12px !important;
}

html body[data-has-docs="true"] #agentTranscript .agent-message.trial-offer {
  border-left-color: #f7c66f !important;
  box-shadow: 0 0 0 1px rgba(247, 198, 111, 0.16), 0 16px 34px rgba(0, 0, 0, 0.2) !important;
}

html body[data-has-docs="true"] :where(#agentTranscript, .agent-panel) .agent-approval-row .agent-refine-button {
  color: #fff7ed !important;
  background: #20160f !important;
  border-color: #8a683a !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html body[data-has-docs="true"] :where(#agentTranscript, .agent-panel) .agent-approval-row .agent-refine-button:disabled {
  color: #d9c8b4 !important;
  background: #1a130e !important;
  border-color: #5b452d !important;
  opacity: 1 !important;
}

/* Empty editor guard: keep the no-document entry state in one light theme. */
html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) {
  color: #101827 !important;
  background: #f6f8fb !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.app-shell, .topbar, .workspace, .preview-shell, .preview-stage, .inspector) {
  color: #101827 !important;
  background-color: #f6f8fb !important;
  border-color: #d8c7aa !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.agent-panel, .agent-session, .agent-message, .agent-ai-box, .agent-ai-result, .agent-runtime-strip span) {
  color: #101827 !important;
  background: #fffaf2 !important;
  border-color: #d8c7aa !important;
  box-shadow: none !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.agent-panel p, .agent-message p, .agent-support-strip, .hint, textarea, input, select) {
  color: #4b5563 !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.agent-panel strong, .agent-runtime-strip em, .agent-message strong) {
  color: #101827 !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.agent-runtime-strip b, .eyebrow, .panel-kicker) {
  color: #9a4f16 !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(#agentGoalInput, .agent-ai-box textarea) {
  color: #101827 !important;
  background: #ffffff !important;
  border-color: #d8c7aa !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.topbar .tool-button, #openButton, #downloadButton, .mobile-menu-button) {
  color: #101827 !important;
  background: #fffaf2 !important;
  border-color: #d8c7aa !important;
  box-shadow: none !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.topbar .tool-button span, #openButton span, #downloadButton span) {
  color: #101827 !important;
}

html body:has(.app-shell):not([data-has-docs="true"]):not([data-has-result="true"]) :where(.topbar .tool-button svg, #openButton svg, #downloadButton svg) {
  color: #101827 !important;
  stroke: currentColor !important;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript.agent-session,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session {
    gap: 12px !important;
    padding: 14px 14px 18px !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    height: min(440px, calc(100dvh - 360px)) !important;
    min-height: min(360px, calc(100dvh - 420px)) !important;
    max-height: min(440px, calc(100dvh - 360px)) !important;
    overflow: auto !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session > .agent-message {
    display: grid !important;
    width: fit-content !important;
    min-width: 0 !important;
    max-width: 88% !important;
    padding: 13px 14px !important;
    border-radius: 15px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message.assistant,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session > .agent-message.assistant {
    display: grid !important;
    align-self: flex-start !important;
    border-top-left-radius: 6px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session > .agent-message.assistant:first-child,
  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message.assistant:first-child {
    display: grid !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-message.user,
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-session > .agent-message.user {
    align-self: flex-end !important;
    max-width: 80% !important;
    border-top-right-radius: 6px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] #agentTranscript .agent-approval-row {
    grid-template-columns: 1fr !important;
  }
}

/* Agent settings clarity: one compact top entry plus explicit auto-accept state. */
.agent-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.agent-settings-button {
  min-height: 30px;
  padding: 0 10px;
  color: #075e50;
  background: #f7fffd;
  border: 1px solid #b9eadf;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.agent-auto-status {
  display: grid;
  gap: 4px;
  min-height: 46px;
  min-width: 116px;
  padding: 8px 12px;
  color: #1c1a17;
  background: #fffaf2;
  border: 1px solid #d8c7aa;
  border-radius: 14px;
}

.agent-auto-status span {
  color: #8c4a19;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-auto-status strong {
  color: #1c1a17;
  font-size: 14px;
  line-height: 1;
}

.agent-auto-status[data-state="on"] {
  background: #ecfdf5;
  border-color: #86efac;
}

.agent-auto-status[data-state="on"] span,
.agent-auto-status[data-state="on"] strong {
  color: #14532d;
}

.agent-settings-modal {
  display: grid;
  gap: 14px;
  width: min(560px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 22px;
  overflow: auto;
  color: #171923;
  background: #fffaf2;
  border: 1px solid #d8c7aa;
  border-radius: 12px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.agent-settings-modal h2,
.agent-settings-modal p {
  margin: 0;
}

.agent-settings-summary {
  padding: 10px 12px;
  color: #3a332c;
  background: #ffffff;
  border: 1px solid #e2d2b8;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.agent-settings-modal label {
  display: grid;
  gap: 7px;
  color: #3a332c;
  font-size: 13px;
  font-weight: 800;
}

.agent-settings-modal label > span {
  display: grid;
  gap: 4px;
}

.agent-settings-modal label small {
  color: #6f655a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.agent-settings-modal select,
.agent-settings-modal textarea {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  color: #171923;
  background: #ffffff;
  border: 1px solid #d8c7aa;
  border-radius: 8px;
  font: inherit;
}

.agent-settings-modal textarea {
  min-height: 96px;
  resize: vertical;
}

.agent-settings-modal textarea::placeholder {
  color: #6f655a;
  opacity: 1;
}

.agent-settings-billing {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2d2b8;
  border-radius: 8px;
}

.agent-settings-billing strong {
  color: #171923;
}

.agent-settings-billing button {
  min-height: 38px;
  color: #101827;
  background: #fffaf2;
  border: 1px solid #d8c7aa;
  border-radius: 8px;
  font-weight: 850;
}

.settings-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.settings-toggle input {
  width: 42px;
  height: 24px;
  accent-color: #0f766e;
}

.settings-toggle-strong {
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2d2b8;
  border-radius: 8px;
}

html body[data-has-docs="true"] .agent-settings-button,
html body[data-has-docs="true"] .agent-settings-button:hover,
html body[data-has-docs="true"] .agent-settings-button:focus-visible {
  color: #fff7ed !important;
  background: #20160f !important;
  border-color: #8a683a !important;
  box-shadow: none !important;
}

html body[data-has-docs="true"] .agent-auto-status {
  color: #fff7ed !important;
  background: #20160f !important;
  border-color: #8a683a !important;
}

html body[data-has-docs="true"] .agent-auto-status span {
  color: #ffd18a !important;
}

html body[data-has-docs="true"] .agent-auto-status strong {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-auto-status[data-state="on"] {
  background: #10251b !important;
  border-color: #2f9e62 !important;
}

html body[data-has-docs="true"] .agent-auto-status[data-state="on"] span,
html body[data-has-docs="true"] .agent-auto-status[data-state="on"] strong {
  color: #b8f7ce !important;
}

html body[data-has-docs="true"] .agent-settings-modal {
  color: #fff7ed !important;
  background: #15100c !important;
  border-color: #6a4c28 !important;
}

html body[data-has-docs="true"] .agent-settings-modal :where(h2, label, label span, label b) {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-settings-modal :where(.agent-settings-summary, .settings-toggle-strong) {
  color: #e8d8c3 !important;
  background: #20160f !important;
  border-color: #8a683a !important;
}

html body[data-has-docs="true"] .agent-settings-billing {
  background: #20160f !important;
  border-color: #8a683a !important;
}

html body[data-has-docs="true"] .agent-settings-billing strong {
  color: #fff7ed !important;
}

html body[data-has-docs="true"] .agent-settings-billing button {
  color: #fff7ed !important;
  background: #0d0906 !important;
  border-color: #8a683a !important;
}

html body[data-has-docs="true"] .agent-settings-modal :where(label small, p) {
  color: #cbbba5 !important;
}

html body[data-has-docs="true"] .agent-settings-modal :where(select, textarea) {
  color: #fff7ed !important;
  background: #0d0906 !important;
  border-color: #8a683a !important;
}

html body[data-has-docs="true"] .agent-settings-modal textarea::placeholder {
  color: #c9bba6 !important;
}

html body[data-has-docs="true"] .agent-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 38px !important;
  padding: 0 2px !important;
}

html body[data-has-docs="true"] .agent-head .eyebrow {
  margin: 0 0 2px !important;
  color: #ffd18a !important;
}

html body[data-has-docs="true"] .agent-head strong {
  color: #fff7ed !important;
}

@media (max-width: 760px) {
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-head {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 3;
    background: #0d0906;
    border-bottom: 1px solid #3f2d18;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-head-actions {
    gap: 6px;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-settings-button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 11px;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-mobile-controls {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-auto-status {
    min-width: 104px;
    min-height: 46px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-settings-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 28px);
    padding: 18px;
    border-radius: 12px;
  }
}

@media (min-width: 761px) {
  html body[data-has-docs="true"] .agent-surface-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

@media (max-width: 760px) {
  html body[data-has-docs="true"][data-mobile-mode="agent"] .agent-mobile-controls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: end !important;
  }
}

@media (max-width: 640px) {
  .bitepdf-premium-page .workspace-capability-strip {
    padding-top: 16px !important;
    padding-bottom: 8px !important;
  }

  .bitepdf-premium-page .workspace-capability-head {
    margin-bottom: 10px !important;
  }

  .bitepdf-premium-page .workspace-capability-head h2 {
    max-width: 330px;
    font-size: clamp(26px, 8vw, 34px) !important;
    line-height: 0.98 !important;
  }

  .bitepdf-premium-page .workspace-capability-head > p:not(.seo-section-kicker) {
    margin-top: 8px !important;
    font-size: 13px !important;
    line-height: 1.32 !important;
  }

  .bitepdf-premium-page .workspace-capability-grid {
    gap: 8px !important;
  }

  .bitepdf-premium-page .workspace-capability-grid > article {
    min-height: 0 !important;
    padding: 14px 16px !important;
  }

  .bitepdf-premium-page .workspace-capability-grid h3 {
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  .bitepdf-premium-page .workspace-capability-grid p {
    margin-top: 8px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
  }
}

/* AI workspace rail: a visible session layer above PDFs, separate from adding files. */
.workspace-switcher {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 86%, var(--brand-green-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workspace-switcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workspace-switcher-head strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.workspace-orbit {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.workspace-dot {
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  place-items: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.workspace-dot.active {
  color: #fffaf3;
  background: #0f172a;
  border-color: #8be0ce;
  box-shadow: 0 0 0 2px rgba(139, 224, 206, 0.18);
}

.workspace-dot.add {
  color: #0f766e;
  background: #17110c;
  border-color: #8be0ce;
  font-size: 22px;
  line-height: 1;
}

.workspace-chip {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  text-align: left;
}

.workspace-chip span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workspace-chip strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
}

html[data-bitepdf-theme="dark"] body .workspace-chip,
html[data-bitepdf-theme="dark"] body .workspace-dot {
  color: #fff8ee !important;
  background: #211812 !important;
  border-color: #5a432a !important;
}

html[data-bitepdf-theme="dark"] body .workspace-dot.active {
  color: #061713 !important;
  background: #8be0ce !important;
  border-color: #bef8ec !important;
}

html[data-bitepdf-theme="dark"] body .workspace-dot.add {
  color: #8be0ce !important;
  background: #17100a !important;
}

.workspace-chip.active {
  border-color: #91d9cd;
  box-shadow: inset 3px 0 0 var(--teal);
}

/* Explicit light mode must win over legacy loaded-document dark guards. */
html[data-bitepdf-theme="light"] {
  color-scheme: light;
}

html[data-bitepdf-theme="light"] body,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] {
  color: #1c1a17 !important;
  background: #faf7f2 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  .app-shell,
  .topbar,
  .left-rail,
  .workspace,
  .editor,
  .inspector,
  .preview-shell,
  .preview-toolbar,
  .workspace-actions,
  .editor-tools,
  .agent-panel,
  .agent-session,
  .agent-local-plan,
  .agent-memory,
  .agent-ai-box,
  .tool-panel,
  .queue-summary,
  .document-panel,
  .sidebar-insight,
  .page-cutter,
  .sidebar-tools,
  .workspace-switcher,
  .modal,
  .modal-auth,
  .modal-plans,
  .level-modal,
  .account-menu
) {
  color: #1c1a17 !important;
  background: #fffaf3 !important;
  border-color: #e5d8c7 !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  .preview-stage,
  .pdf-page-frame,
  .agent-message,
  .agent-runtime-strip span,
  .agent-surface-suggestions,
  .checkout-stage,
  .unlock-result,
  .plan-button,
  .local-pricing-note,
  .launch-promo-note,
  .public-service-note,
  .modal-plan-trust span,
  .workspace-chip,
  .file-chip,
  .empty-file-state,
  .file-drop,
  .range-command,
  .page-jump,
  .agent-settings-modal,
  .agent-settings-summary,
  .settings-toggle-strong
) {
  color: #1c1a17 !important;
  background: #ffffff !important;
  border-color: #e2d2b8 !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  h1,
  h2,
  h3,
  strong,
  label,
  label span,
  .agent-head strong,
  .agent-message strong,
  .agent-message p,
  .agent-runtime-strip em,
  .queue-summary strong,
  .workspace-chip strong,
  .modal-auth h2,
  .modal-auth strong,
  .modal-auth label,
  .plan-button strong,
  .account-menu strong,
  .account-menu button
) {
  color: #1c1a17 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  p,
  small,
  .hint,
  .agent-memory-empty,
  .agent-runtime-strip b,
  .queue-summary span,
  .workspace-chip small,
  .modal-auth p,
  .modal-auth small
) {
  color: #665d55 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  input,
  textarea,
  select,
  #agentGoalInput,
  #annotationText,
  #pageRangeInput,
  #jumpPageInput,
  .modal-auth input,
  .agent-settings-modal textarea,
  .agent-settings-modal select
) {
  color: #1c1a17 !important;
  background: #ffffff !important;
  border-color: #d8c7aa !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(input, textarea)::placeholder {
  color: #8a817a !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  .tool-button,
  .icon-button,
  .text-tool-button,
  .workspace-actions button,
  .editor-tools .tool-button,
  .agent-ai-box button,
  .sidebar-tool-grid button,
  .agent-surface-bar button,
  .agent-command-grid button,
  .modal-close
) {
  color: #1c1a17 !important;
  background: #fffaf3 !important;
  border-color: #d8c7aa !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] :where(
  .tool-button.active,
  .workspace-actions button.active,
  .agent-surface-bar button.active,
  .plan-button.recommended,
  .plan-button:hover,
  #downloadButton,
  .wide-button.primary
) {
  color: #101827 !important;
  background: #e5c47c !important;
  border-color: #b98a38 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-message.user {
  color: #101827 !important;
  background: #e6eee8 !important;
  border-color: #ace2d7 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .modal-backdrop {
  background: rgba(28, 26, 23, 0.28) !important;
  backdrop-filter: blur(8px) !important;
}

@media (max-width: 760px) {
  html[data-bitepdf-theme="light"] body[data-has-docs="true"][data-mobile-mode="agent"] :where(.agent-head, .agent-panel, .agent-ai-box) {
    color: #1c1a17 !important;
    background: #fffaf3 !important;
    border-color: #e5d8c7 !important;
  }
}

@media (min-width: 1280px) {
  html body[data-has-docs="true"] .app-shell {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(410px, 30vw) !important;
  }

  html body[data-has-docs="true"] .left-rail {
    display: flex !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    max-height: none !important;
  }

  html body[data-has-docs="true"] .workspace {
    grid-column: 2 !important;
  }

  html body[data-has-docs="true"] .inspector {
    grid-column: 3 !important;
    min-width: min(500px, 30vw) !important;
  }
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .result-dock,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .size-panel,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .notice,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .tool-panel,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-runtime-strip span,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-message,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-work-card,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-thinking,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-ai-result {
  color: #1c1a17 !important;
  background: #fffaf3 !important;
  border-color: #e5d8c7 !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .result-stats span,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .size-panel div,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-runtime-strip span {
  color: #1c1a17 !important;
  background: #ffffff !important;
  border-color: #e2d2b8 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .result-dock h3,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .result-stats b,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .size-panel strong,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-runtime-strip em,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-message strong {
  color: #1c1a17 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .result-dock p,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .result-stats small,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .size-panel span,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-runtime-strip b,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-message p {
  color: #665d55 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .editor-tools,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-tools,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .workspace-actions,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .status-strip,
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .preview-toolbar {
  color: #1c1a17 !important;
  background: #fffaf3 !important;
  border-color: #e5d8c7 !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .status-strip :where(span, p, strong) {
  color: #665d55 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="true"] .editor-tools .tool-button:not(.active),
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .agent-tools .tool-button:not(.active),
html[data-bitepdf-theme="light"] body[data-has-docs="true"] .workspace-actions button:not(.active) {
  color: #1c1a17 !important;
  background: #fffdf8 !important;
  border-color: #d8c7aa !important;
}

/* Final theme authority for the static editor. Keep this last. */
html[data-bitepdf-theme="light"] body .brand-logo-full {
  content: url("./brand/bitepdf-logo-tight-transparent.png") !important;
}

html[data-bitepdf-theme="dark"] body .brand-logo-full {
  content: url("./brand/bitepdf-logo-dark-transparent.png") !important;
}

html[data-bitepdf-theme="dark"] body .app-shell,
html[data-bitepdf-theme="dark"] body #accessModal .modal {
  color: #fff8ee !important;
  background: #0e0905 !important;
}

html[data-bitepdf-theme="dark"] body :where(
  .topbar,
  .workspace,
  .editor,
  .inspector,
  .left-rail,
  .preview-shell,
  .preview-toolbar,
  .workspace-actions,
  .editor-tools,
  .agent-panel,
  .agent-ai-box,
  .agent-session,
  .agent-local-plan,
  .tool-panel,
  .drop-card,
  .empty-state-card,
  .result-dock,
  .size-panel,
  .modal-auth,
  .modal-plans,
  .account-menu,
  .mobile-drawer-sheet
) {
  color: #fff8ee !important;
  background: linear-gradient(135deg, #18110b, #100b07) !important;
  border-color: #5a432a !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="dark"] body :where(
  .surface-card,
  .tool-button,
  .icon-button,
  .text-tool-button,
  .agent-command-grid button,
  .sidebar-tool-grid button,
  .agent-surface-bar button,
  .agent-runtime-strip span,
  .agent-message,
  .workspace-chip,
  .file-chip,
  .plan-button,
  .checkout-stage,
  .unlock-result,
  .launch-promo-note,
  .local-pricing-note,
  .public-service-note,
  .modal-plan-trust span,
  .mobile-action-tabs button,
  .status-strip,
  .bottom-tool-rail button
) {
  color: #fff8ee !important;
  background: #17100a !important;
  border-color: #5a432a !important;
}

html[data-bitepdf-theme="dark"] body :where(
  h1,
  h2,
  h3,
  strong,
  label,
  .hero-title,
  .workspace-title,
  .preview-title strong,
  .agent-head strong,
  .modal-auth h2,
  .modal-auth strong,
  .plan-button strong,
  .tool-button span,
  .account-menu button
) {
  color: #fff8ee !important;
}

html[data-bitepdf-theme="dark"] body :where(
  p,
  small,
  .hint,
  .preview-title span,
  .agent-message p,
  .agent-runtime-strip b,
  .workspace-chip small,
  .modal-auth p,
  .modal-auth small,
  .plan-button small,
  .status-strip span
) {
  color: #d8c9b7 !important;
}

html[data-bitepdf-theme="dark"] body :where(input, textarea, select, #agentGoalInput, #annotationText) {
  color: #fff8ee !important;
  background: #0b0704 !important;
  border-color: #6b4d2d !important;
}

html[data-bitepdf-theme="dark"] body :where(input, textarea)::placeholder {
  color: #a79583 !important;
}

html[data-bitepdf-theme="dark"] body :where(
  .tool-button.active,
  .workspace-actions button.active,
  .agent-surface-bar button.active,
  .plan-button.recommended,
  .plan-button.context-best,
  .wide-button.primary,
  #downloadButton,
  .primary-action,
  .pricing-checkout-button
) {
  color: #100b07 !important;
  background: #e2c27c !important;
  border-color: #f1c66c !important;
}

html[data-bitepdf-theme="light"] body .app-shell {
  color: #121826 !important;
  background: #f8fafc !important;
}

html[data-bitepdf-theme="light"] body :where(
  .topbar,
  .workspace,
  .editor,
  .inspector,
  .preview-shell,
  .preview-toolbar,
  .workspace-actions,
  .editor-tools,
  .agent-panel,
  .agent-ai-box,
  .agent-session,
  .tool-panel,
  .account-menu
) {
  color: #121826 !important;
  background: #fffaf3 !important;
  border-color: #dac8a8 !important;
}

html[data-bitepdf-theme="light"] body :where(.app-shell h1, .app-shell h2, .app-shell h3, .app-shell strong, .app-shell label, .app-shell .tool-button span) {
  color: #121826 !important;
}

html[data-bitepdf-theme="light"] body :where(.app-shell p, .app-shell small, .app-shell .hint, .app-shell .preview-title span) {
  color: #61594f !important;
}

html[data-bitepdf-theme="light"] body :where(.bottom-tool-rail button, .mobile-action-tabs button) {
  color: #121826 !important;
  background: rgba(255, 250, 243, 0.94) !important;
  border-color: #dac8a8 !important;
}

html[data-bitepdf-theme="dark"] body,
html[data-bitepdf-theme="dark"] body .app-shell {
  color: #fff8ee !important;
  background-color: #0e0905 !important;
  background-image: none !important;
  border-color: #5a432a !important;
}

html[data-bitepdf-theme="dark"] body .topbar,
html[data-bitepdf-theme="dark"] body .workspace,
html[data-bitepdf-theme="dark"] body .editor,
html[data-bitepdf-theme="dark"] body .inspector,
html[data-bitepdf-theme="dark"] body .left-rail,
html[data-bitepdf-theme="dark"] body .preview-shell,
html[data-bitepdf-theme="dark"] body .preview-toolbar,
html[data-bitepdf-theme="dark"] body .workspace-actions,
html[data-bitepdf-theme="dark"] body .editor-tools,
html[data-bitepdf-theme="dark"] body .agent-panel,
html[data-bitepdf-theme="dark"] body .agent-ai-box,
html[data-bitepdf-theme="dark"] body .agent-session,
html[data-bitepdf-theme="dark"] body .agent-local-plan,
html[data-bitepdf-theme="dark"] body .tool-panel,
html[data-bitepdf-theme="dark"] body .status-strip,
html[data-bitepdf-theme="dark"] body .account-menu {
  color: #fff8ee !important;
  background-color: #17100a !important;
  background-image: none !important;
  border-color: #5a432a !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="dark"] body .app-shell h1,
html[data-bitepdf-theme="dark"] body .app-shell h2,
html[data-bitepdf-theme="dark"] body .app-shell h3,
html[data-bitepdf-theme="dark"] body .app-shell strong,
html[data-bitepdf-theme="dark"] body .app-shell label,
html[data-bitepdf-theme="dark"] body .app-shell .tool-button span,
html[data-bitepdf-theme="dark"] body .app-shell .preview-title strong,
html[data-bitepdf-theme="dark"] body .app-shell .agent-head strong {
  color: #fff8ee !important;
}

html[data-bitepdf-theme="dark"] body .app-shell p,
html[data-bitepdf-theme="dark"] body .app-shell small,
html[data-bitepdf-theme="dark"] body .app-shell .hint,
html[data-bitepdf-theme="dark"] body .app-shell .preview-title span,
html[data-bitepdf-theme="dark"] body .app-shell .agent-message p,
html[data-bitepdf-theme="dark"] body .app-shell .agent-runtime-strip b {
  color: #d8c9b7 !important;
}

html[data-bitepdf-theme="dark"] body .app-shell button:not(.primary-action):not(.wide-button):not(.pricing-checkout-button),
html[data-bitepdf-theme="dark"] body .app-shell .tool-button,
html[data-bitepdf-theme="dark"] body .app-shell .icon-button,
html[data-bitepdf-theme="dark"] body .app-shell .text-tool-button,
html[data-bitepdf-theme="dark"] body .app-shell .agent-command-grid button {
  color: #fff8ee !important;
  background-color: #17100a !important;
  background-image: none !important;
  border-color: #5a432a !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) {
  color: #fff8ee !important;
  background-color: #0e0905 !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .app-shell,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .topbar,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .workspace,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .editor,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .inspector,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .preview-shell,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .preview-stage,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-panel,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-session,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-local-plan {
  color: #fff8ee !important;
  background-color: #17100a !important;
  background-image: none !important;
  border-color: #5a432a !important;
  box-shadow: none !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .drop-panel,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box textarea,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box select,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box input {
  color: #fff8ee !important;
  background-color: #110b07 !important;
  background-image: none !important;
  border-color: #5a432a !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .drop-panel svg {
  color: #e2c27c !important;
  background-color: #20160e !important;
  border-color: #6b4d2d !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box strong,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box label,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box .agent-ai-head strong {
  color: #fff8ee !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-ai-box textarea::placeholder {
  color: #b9aa98 !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-runtime-strip span,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-message.assistant,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-message.workspace-guide {
  color: #fff8ee !important;
  background-color: #17100a !important;
  background-image: none !important;
  border-color: #5a432a !important;
}

html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-runtime-strip span *,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-message.assistant *,
html[data-bitepdf-theme="dark"] body:has(.app-shell):not([data-force-light]) .agent-message.workspace-guide * {
  color: inherit !important;
}

/* Final theme authority: explicit BitePDF theme wins over OS/mobile upload guards. */
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .entry-hero h2,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-screen h1,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-screen h2,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-panel h2,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .mobile-start-panel button strong {
  color: #fff8ee !important;
  text-shadow: none !important;
}

html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-screen::before {
  color: #fff8ee !important;
  text-shadow: none !important;
}

html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .entry-hero > p:not(.eyebrow),
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-panel p,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .mobile-drop-promise,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .mobile-start-panel button > span:last-child,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .agent-message p {
  color: #d8cbbb !important;
}

html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .mobile-start-panel button,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-panel {
  background: #17100a !important;
  border-color: #6a4f32 !important;
}

html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .entry-proof span,
html[data-bitepdf-theme="dark"] body[data-has-docs="false"] .drop-capabilities span {
  color: #083b34 !important;
  background: #bff4e9 !important;
  border-color: #4db6a9 !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="false"] .entry-hero h2,
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .drop-screen h1,
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .drop-screen h2,
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .drop-panel h2,
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .mobile-start-panel button strong {
  color: #101827 !important;
  text-shadow: none !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="false"] .drop-screen::before {
  color: #101827 !important;
  text-shadow: none !important;
}

html[data-bitepdf-theme="light"] body[data-has-docs="false"] .entry-hero > p:not(.eyebrow),
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .drop-panel p,
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .mobile-drop-promise,
html[data-bitepdf-theme="light"] body[data-has-docs="false"] .mobile-start-panel button > span:last-child {
  color: #4b5563 !important;
}

html[data-bitepdf-theme="light"] body #accessModal:not([hidden]) .modal-plan-trust span,
html[data-bitepdf-theme="light"] body #accessModal:not([hidden]) .launch-promo-note span,
html[data-bitepdf-theme="light"] body #accessModal:not([hidden]) .public-service-note span,
html[data-bitepdf-theme="light"] body #accessModal:not([hidden]) .public-service-note a {
  color: #064e3b !important;
  background: #e8fff8 !important;
  border-color: #8dd8ca !important;
}

html[data-bitepdf-theme="dark"] body #accessModal:not([hidden]) .modal-plan-trust span,
html[data-bitepdf-theme="dark"] body #accessModal:not([hidden]) .launch-promo-note span,
html[data-bitepdf-theme="dark"] body #accessModal:not([hidden]) .public-service-note span,
html[data-bitepdf-theme="dark"] body #accessModal:not([hidden]) .public-service-note a {
  color: #bdf8ef !important;
  background: #10251f !important;
  border-color: #4f8f80 !important;
}

/* 2026-06-18 focused UX authority: light pricing, compact runtime, simple workspace rail. */
html body main.pricing-page,
html[data-bitepdf-theme="dark"] body main.pricing-page,
html[data-bitepdf-theme="light"] body main.pricing-page {
  color-scheme: light !important;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --line: #e3e8ee;
  --line-strong: #cdd7e1;
  --text: #0d253d;
  --muted: #526174;
  --faint: #6f7f91;
  --teal: #1f766e;
  --coral: #ff6b57;
  min-height: 100vh !important;
  color: #0d253d !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(31, 118, 110, 0.08), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #f6f9fc 52%, #ffffff 100%) !important;
}

html body main.pricing-page :where(.pricing-header, .pricing-plan, .pricing-preview-card, .pricing-launch-offer, .pricing-access-review, .pricing-compare, .pricing-faq article) {
  color: #0d253d !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: #e3e8ee !important;
  box-shadow: 0 18px 50px rgba(13, 37, 61, 0.07) !important;
}

html body main.pricing-page :where(.pricing-hero h1, .pricing-plan-head strong, .pricing-preview-card h2, .pricing-launch-offer h2, .pricing-access-review h2, .pricing-section-title h2, .pricing-faq h3, .pricing-plan-head span, .pricing-plan li, .pricing-plan p, .pricing-checkout-note) {
  color: #0d253d !important;
}

html body main.pricing-page :where(.pricing-hero p, .pricing-preview-card p, .pricing-launch-offer p, .pricing-access-review p, .pricing-faq p, .pricing-plan small, .pricing-plan > p) {
  color: #526174 !important;
}

html body main.pricing-page .seo-section-kicker,
html body main.pricing-page .pricing-card-label,
html body main.pricing-page .pricing-plan-head b {
  color: #1f766e !important;
  background: #e7f7f3 !important;
  border-color: #bfe8df !important;
}

html body main.pricing-page .pricing-hero {
  padding-top: clamp(42px, 6vw, 82px) !important;
  padding-bottom: 12px !important;
}

html body main.pricing-page .pricing-hero h1 {
  max-width: 820px !important;
  font-family: "Sohne", "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: clamp(44px, 6.4vw, 82px) !important;
  line-height: 0.98 !important;
}

html body main.pricing-page .pricing-choice {
  padding-top: 14px !important;
}

html body main.pricing-page .pricing-paid-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

html body main.pricing-page .pricing-plan {
  min-height: 0 !important;
  padding: 24px !important;
  border-radius: 18px !important;
}

html body main.pricing-page .pricing-plan.featured {
  background: #0d253d !important;
  border-color: #0d253d !important;
}

html body main.pricing-page .pricing-plan.featured :where(span, strong, small, p, li, .pricing-checkout-note) {
  color: #ffffff !important;
}

html body main.pricing-page .pricing-checkout-button {
  min-height: 48px !important;
  color: #ffffff !important;
  background: #0d253d !important;
  border: 0 !important;
  border-radius: 10px !important;
}

html body main.pricing-page .pricing-plan.featured .pricing-checkout-button {
  color: #0d253d !important;
  background: #ffffff !important;
}

html body main.pricing-page .pricing-preview-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr) auto !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 24px !important;
  border-radius: 18px !important;
}

html body main.pricing-page .pricing-preview-card a,
html body main.pricing-page .pricing-launch-offer a,
html body main.pricing-page .pricing-access-review a {
  color: #ffffff !important;
  background: #0d253d !important;
  border-color: #0d253d !important;
  border-radius: 10px !important;
}

@media (max-width: 900px) {
  html body main.pricing-page .pricing-paid-grid,
  html body main.pricing-page .pricing-preview-card {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 1180px) {
  html body:has(.app-shell) .app-shell {
    grid-template-columns: 72px minmax(0, 1fr) minmax(340px, 380px) !important;
  }

  html body:has(.app-shell) .left-rail {
    display: flex !important;
    width: 72px !important;
    min-width: 72px !important;
    padding: 10px 8px !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  html body:has(.app-shell) .left-rail :where(.rail-heading > div, .rail-heading-actions, .queue-summary, .workspace-switcher-head, .workspace-chip, .workspace-switcher .hint, .document-panel-head, .empty-file-state, .file-chip strong, .file-chip small, .file-drop, .sidebar-insight, .page-cutter, .sidebar-tools, .job-panel, .memory-panel) {
    display: none !important;
  }

  html body:has(.app-shell) .workspace-switcher {
    display: grid !important;
    width: 52px !important;
    padding: 6px 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body:has(.app-shell) .workspace-orbit {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 9px !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  html body:has(.app-shell) .workspace-dot {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    box-shadow: none !important;
  }

  html body:has(.app-shell) .workspace-dot.add {
    order: -1 !important;
    font-size: 24px !important;
  }

  html body:has(.app-shell) .document-panel {
    display: grid !important;
    width: 52px !important;
    padding: 0 !important;
    gap: 8px !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body:has(.app-shell) #fileList {
    display: grid !important;
    gap: 8px !important;
  }

  html body:has(.app-shell) .file-chip {
    width: 48px !important;
    min-height: 48px !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }

  html body:has(.app-shell) .file-thumb {
    width: 38px !important;
    height: 38px !important;
  }

  html body:has(.app-shell) .file-chip button {
    display: none !important;
  }
}

html body:has(.app-shell) .inspector {
  overflow: hidden !important;
}

html body:has(.app-shell) .agent-panel {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  gap: 10px !important;
  padding: 14px !important;
}

html body:has(.app-shell) .agent-runtime-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html body:has(.app-shell) .agent-runtime-strip span {
  min-height: 42px !important;
  padding: 8px 10px !important;
}

html body:has(.app-shell) .agent-head {
  margin-bottom: 0 !important;
}

html body:has(.app-shell) .agent-session {
  flex: 1 1 auto !important;
  min-height: 128px !important;
  max-height: clamp(160px, 32vh, 360px) !important;
  overflow-y: auto !important;
  padding: 10px !important;
  border-radius: 14px !important;
}

html body:has(.app-shell) .agent-message,
html body:has(.app-shell) .agent-work-card {
  padding: 11px 12px !important;
  border-radius: 12px !important;
}

html body:has(.app-shell) .agent-memory {
  display: block !important;
  flex: 0 0 auto !important;
  max-height: 112px !important;
  overflow: hidden !important;
  padding: 10px !important;
}

html body:has(.app-shell) .agent-memory-list {
  max-height: 64px !important;
  overflow-y: auto !important;
}

html body:has(.app-shell) .agent-memory-head button {
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

html body:has(.app-shell) .agent-ai-box {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  padding: 10px !important;
  gap: 8px !important;
  border-radius: 14px !important;
}

html body:has(.app-shell) .agent-ai-box textarea,
html body:has(.app-shell) textarea#agentGoalInput {
  min-height: 52px !important;
  max-height: 76px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

html body:has(.app-shell) .agent-surface-bar,
html body:has(.app-shell) .agent-surface-suggestions {
  display: none !important;
}

html body:has(.app-shell) .agent-surface-bar button,
html body:has(.app-shell) .agent-surface-suggestions button {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

html body:has(.app-shell) .agent-composer-actions {
  display: grid !important;
  grid-template-columns: auto auto minmax(112px, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

html body:has(.app-shell) .agent-composer-actions #agentAiButton {
  grid-column: auto !important;
}

html body:has(.app-shell) .agent-composer-actions button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

html body:has(.app-shell) #agentScreenshotButton {
  min-width: 72px !important;
}

html body:has(.app-shell) #agentNewSessionButton {
  min-width: 56px !important;
}

html body:has(.app-shell) .agent-screenshot-state {
  margin: -2px 0 0 !important;
  font-size: 11px !important;
}

html body:has(.app-shell) .agent-integrations {
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent) !important;
  margin-top: 2px !important;
  padding-top: 6px !important;
}

html body:has(.app-shell) .agent-integrations summary {
  cursor: pointer !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
}

html body:has(.app-shell) .agent-integrations div {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding-top: 6px !important;
}

html body:has(.app-shell) .agent-integrations button {
  min-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

html body:has(.app-shell) .agent-support-strip {
  margin-top: 6px !important;
  padding-top: 6px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  html body:has(.app-shell) .agent-ai-box {
    max-height: min(34vh, 260px) !important;
  }

  html body:has(.app-shell) .agent-ai-box textarea,
  html body:has(.app-shell) textarea#agentGoalInput {
    min-height: 50px !important;
    max-height: 68px !important;
  }

  html body:has(.app-shell) .agent-surface-bar,
  html body:has(.app-shell) .agent-surface-suggestions {
    display: none !important;
  }
}

html body:has(.app-shell) .modal .launch-promo-note small,
html body:has(.app-shell) .modal .public-service-note small,
html body:has(.app-shell) .modal .checkout-stage p,
html body:has(.app-shell) .modal .modal-note {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

html body:has(.app-shell) .modal .launch-promo-note span,
html body:has(.app-shell) .modal .public-service-note span,
html body:has(.app-shell) .modal .public-service-note a,
html body:has(.app-shell) .modal-plan-trust span {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)) !important;
  color: var(--accent-strong) !important;
  text-decoration: none !important;
}

html body:has(.app-shell) .modal .local-pricing-note {
  color: var(--text) !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

/* 2026-06-20 agent rail authority: compact composer, clearer attach, more room for chat history. */
html body:has(.app-shell) .agent-ai-box {
  padding: 8px !important;
  gap: 6px !important;
  border-radius: 12px !important;
}

html body:has(.app-shell) .agent-ai-head {
  min-height: 22px !important;
}

html body:has(.app-shell) .agent-ai-box textarea,
html body:has(.app-shell) textarea#agentGoalInput {
  min-height: 42px !important;
  max-height: 58px !important;
  padding: 7px 9px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  line-height: 1.32 !important;
}

html body:has(.app-shell) .agent-template-select,
html body:has(.app-shell) .agent-mobile-controls label {
  gap: 3px !important;
}

html body:has(.app-shell) .agent-template-select span,
html body:has(.app-shell) .agent-mobile-controls label span {
  font-size: 10px !important;
  letter-spacing: .06em !important;
}

html body:has(.app-shell) .agent-template-select select,
html body:has(.app-shell) .agent-mobile-controls select {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 30px 0 9px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
}

html body:has(.app-shell) .agent-composer-actions {
  grid-template-columns: auto auto minmax(92px, 1fr) !important;
  gap: 6px !important;
}

html body:has(.app-shell) .agent-composer-actions button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}

html body:has(.app-shell) #agentScreenshotButton {
  min-width: 82px !important;
}

html body:has(.app-shell) #agentNewSessionButton {
  min-width: 44px !important;
}

html body:has(.app-shell) .agent-screenshot-state {
  display: none !important;
}

html body:has(.app-shell) .agent-session {
  min-height: 170px !important;
}

html body:has(.app-shell) .agent-integrations {
  margin-top: 0 !important;
  padding-top: 4px !important;
}

html body:has(.app-shell) .agent-integrations summary {
  min-height: 22px !important;
}

/* 2026-06-20 ready-download modal authority: less visual noise and clearer plan selection. */
html body #accessModal:not([hidden]) .modal {
  width: min(1120px, calc(100vw - 42px)) !important;
  max-height: min(86vh, 820px) !important;
  padding: clamp(18px, 2.3vw, 28px) !important;
  gap: 18px !important;
}

html body #accessModal .modal-auth,
html body #accessModal .modal-plans {
  gap: 12px !important;
}

html body #accessModal .modal-auth h2 {
  font-size: clamp(30px, 4vw, 52px) !important;
  line-height: 1.02 !important;
}

html body #accessModal .unlock-result {
  grid-template-columns: 1fr auto 1fr 1fr !important;
  gap: 8px !important;
  padding: 12px !important;
}

html body #accessModal .local-pricing-note,
html body #accessModal .launch-promo-note,
html body #accessModal .public-service-note {
  padding: 12px 14px !important;
  border-radius: 12px !important;
}

html body #accessModal .public-service-note small,
html body #accessModal .launch-promo-note small {
  color: var(--text-muted) !important;
}

html body #accessModal .modal-plan-trust {
  gap: 6px !important;
}

html body #accessModal .modal-plan-trust span {
  min-height: 28px !important;
  padding: 5px 9px !important;
  font-size: 11px !important;
}

html body #accessModal .plan-button {
  min-height: 82px !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
}

html body #accessModal .plan-button small {
  margin-top: 4px !important;
  font-size: 12px !important;
}

html[data-bitepdf-theme="light"] body #accessModal:not([hidden]) .modal,
html[data-bitepdf-theme="light"] body #accessModal :where(.modal-auth, .modal-plans, .unlock-result, .checkout-stage, .local-pricing-note, .launch-promo-note, .public-service-note, .plan-button) {
  background: #fffaf3 !important;
  border-color: #dac8ad !important;
  color: #0f172a !important;
}

html[data-bitepdf-theme="light"] body #accessModal :where(.modal-auth h2, .modal-auth strong, .modal-plans strong, .plan-button strong, .unlock-result strong) {
  color: #0f172a !important;
}

html[data-bitepdf-theme="light"] body #accessModal :where(.modal-auth p, .modal-auth small, .modal-plans, .plan-button small, .unlock-result p, .checkout-stage p) {
  color: #526070 !important;
}

html[data-bitepdf-theme="light"] body #accessModal :where(.local-pricing-note, .launch-promo-note, .public-service-note, .checkout-stage, .unlock-result, .plan-button)
  :where(p, small, span) {
  color: #405168 !important;
}

html[data-bitepdf-theme="light"] body #accessModal :where(.local-pricing-note, .launch-promo-note, .public-service-note, .checkout-stage, .unlock-result, .plan-button)
  :where(strong, h3, a) {
  color: #0f172a !important;
}

html[data-bitepdf-theme="light"] body #accessModal .public-service-note a {
  color: #075e54 !important;
  text-decoration: underline !important;
}

/* Final route guard: pricing is a light marketing page even when the editor theme is dark. */
html:has(main.pricing-page),
html:has(main.pricing-page) body {
  color-scheme: light !important;
  background: #ffffff !important;
}

html:has(main.pricing-page) body::before,
html:has(main.pricing-page) body::after {
  display: none !important;
}

html:has(main.pricing-page) .pricing-page,
html[data-bitepdf-theme="dark"]:has(main.pricing-page) .pricing-page,
html[data-bitepdf-theme="light"]:has(main.pricing-page) .pricing-page {
  color-scheme: light !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(31, 118, 110, 0.08), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #f7fafc 54%, #ffffff 100%) !important;
  color: #0d253d !important;
}

html:has(main.pricing-page) .pricing-header,
html:has(main.pricing-page) .pricing-page :where(.pricing-plan, .pricing-preview-card, .pricing-launch-offer, .pricing-access-review, .pricing-compare, .pricing-faq article) {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: #e3e8ee !important;
  color: #0d253d !important;
}

html:has(main.pricing-page) .pricing-page :where(h1, h2, h3, strong, span, li, th, td, a:not(.pricing-checkout-button)) {
  color: #0d253d !important;
}

html:has(main.pricing-page) .pricing-page :where(p, small) {
  color: #526174 !important;
}

html:has(main.pricing-page) .pricing-page .pricing-plan.featured {
  background: #0d253d !important;
  border-color: #0d253d !important;
}

html:has(main.pricing-page) .pricing-page .pricing-plan.featured :where(h2, h3, strong, span, p, small, li) {
  color: #ffffff !important;
}

/* Keep the simple Codex-style workspace rail only after a file exists. */
@media (min-width: 1180px) {
  html body:not([data-has-docs="true"]):has(.app-shell) .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px) !important;
  }

  html body:not([data-has-docs="true"]):has(.app-shell) .left-rail {
    display: none !important;
  }

  html body:not([data-has-docs="true"]):has(.app-shell) .workspace {
    grid-column: 1 !important;
  }

  html body:not([data-has-docs="true"]):has(.app-shell) .inspector {
    grid-column: 2 !important;
  }
}

/* 2026-06-20 settings app: tabbed control room, not a long modal-style article. */
.settings-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  background: #f7fafc;
  color: #0d1728;
}

.settings-tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-app .settings-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: start;
  padding: 22px 18px;
  background: #ffffff;
  border-right: 1px solid #e3e8ee;
  overflow: auto;
}

.settings-app .settings-brand {
  display: block;
  margin-bottom: 22px;
}

.settings-app .settings-sidebar nav {
  display: grid;
  gap: 6px;
}

.settings-nav-label {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  color: #526174;
}

.settings-nav-label span {
  font-weight: 850;
  color: #0d1728;
}

.settings-nav-label small {
  font-size: 11px;
  line-height: 1.25;
}

#tab-account:checked ~ .settings-sidebar label[for="tab-account"],
#tab-workspaces:checked ~ .settings-sidebar label[for="tab-workspaces"],
#tab-billing:checked ~ .settings-sidebar label[for="tab-billing"],
#tab-connections:checked ~ .settings-sidebar label[for="tab-connections"],
#tab-agent:checked ~ .settings-sidebar label[for="tab-agent"],
#tab-automation:checked ~ .settings-sidebar label[for="tab-automation"],
#tab-privacy:checked ~ .settings-sidebar label[for="tab-privacy"],
#tab-support:checked ~ .settings-sidebar label[for="tab-support"] {
  background: #0d253d;
  border-color: #0d253d;
  color: #dbeafe;
}

#tab-account:checked ~ .settings-sidebar label[for="tab-account"] span,
#tab-workspaces:checked ~ .settings-sidebar label[for="tab-workspaces"] span,
#tab-billing:checked ~ .settings-sidebar label[for="tab-billing"] span,
#tab-connections:checked ~ .settings-sidebar label[for="tab-connections"] span,
#tab-agent:checked ~ .settings-sidebar label[for="tab-agent"] span,
#tab-automation:checked ~ .settings-sidebar label[for="tab-automation"] span,
#tab-privacy:checked ~ .settings-sidebar label[for="tab-privacy"] span,
#tab-support:checked ~ .settings-sidebar label[for="tab-support"] span {
  color: #ffffff;
}

.settings-app .settings-back {
  display: block;
  margin-top: 18px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #10b39f;
  color: #05201d;
  font-weight: 900;
  text-align: center;
}

.settings-app .settings-main {
  padding: clamp(22px, 4vw, 52px);
  max-width: 1240px;
}

.settings-app .settings-hero {
  margin-bottom: 22px;
}

.settings-app .settings-hero h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: .94;
  letter-spacing: 0;
}

.settings-app .settings-hero p {
  max-width: 820px;
  color: #526174;
  font-size: 16px;
}

.settings-tab-panel {
  display: none;
}

#tab-account:checked ~ .settings-main [data-panel="account"],
#tab-workspaces:checked ~ .settings-main [data-panel="workspaces"],
#tab-billing:checked ~ .settings-main [data-panel="billing"],
#tab-connections:checked ~ .settings-main [data-panel="connections"],
#tab-agent:checked ~ .settings-main [data-panel="agent"],
#tab-automation:checked ~ .settings-main [data-panel="automation"],
#tab-privacy:checked ~ .settings-main [data-panel="privacy"],
#tab-support:checked ~ .settings-main [data-panel="support"] {
  display: block;
}

.settings-app .settings-panel {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 28px;
  padding: clamp(18px, 3vw, 32px);
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .06);
}

.settings-app .settings-panel-wide {
  grid-template-columns: 1fr;
}

.settings-app .settings-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  color: #0d1728;
}

.settings-app .settings-panel p,
.settings-app .settings-list {
  color: #526174;
}

.settings-app .settings-status-grid,
.settings-app .settings-mini-grid,
.settings-app .settings-connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.settings-app :where(.settings-status-grid article, .settings-mini-grid article, .settings-workspace-stack article, .settings-connection-grid article) {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e3e8ee;
  border-radius: 14px;
}

.settings-app .settings-connection-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.settings-connection-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.settings-connection-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0d253d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.settings-connection-head small,
.settings-connection-head em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.settings-connection-action,
.settings-actions a,
.settings-workspace-stack a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: #0d253d;
  color: #ffffff;
  font-weight: 900;
}

.settings-workspace-stack {
  display: grid;
  gap: 10px;
}

.settings-workspace-stack article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.settings-workspace-stack article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dffcf7;
  color: #00796b;
  font-weight: 950;
}

.settings-workspace-stack em {
  color: #a16207;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

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

  .settings-app .settings-sidebar {
    position: static;
    height: auto;
  }

  .settings-app .settings-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-app .settings-panel {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-20 compact agent composer and connection cards. */
html body:has(.app-shell) .agent-ai-box {
  padding: 6px !important;
  gap: 5px !important;
  border-radius: 10px !important;
}

html body:has(.app-shell) textarea#agentGoalInput {
  min-height: 36px !important;
  max-height: 48px !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
}

html body:has(.app-shell) .agent-composer-actions {
  grid-template-columns: 62px 48px minmax(84px, 1fr) !important;
  gap: 5px !important;
}

html body:has(.app-shell) .agent-composer-actions button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
}

html body:has(.app-shell) #agentScreenshotButton,
html body:has(.app-shell) #agentNewSessionButton {
  min-width: 0 !important;
}

html body:has(.app-shell) .agent-mobile-controls {
  gap: 5px !important;
}

html body:has(.app-shell) .agent-mobile-controls label {
  gap: 2px !important;
}

html body:has(.app-shell) .agent-mobile-controls select {
  min-height: 26px !important;
  height: 26px !important;
  font-size: 11px !important;
}

html body:has(.app-shell) .agent-integrations:not([open]) {
  margin: 0 !important;
  padding: 0 !important;
}

html body:has(.app-shell) .agent-integrations summary {
  font-size: 10px !important;
  min-height: 20px !important;
}

.agent-connection-card {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.agent-connection-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-connection-card span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-connection-card strong {
  color: var(--text);
}

.agent-connection-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.agent-connection-card a {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--ink, #0f172a);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

/* 2026-06-20 modal readability guard: no pale text/highlight blocks in light checkout. */
html[data-bitepdf-theme="light"] body #accessModal :where(.launch-promo-note strong, .public-service-note strong, .local-pricing-note strong, .modal-plans h3, .modal-plans a) {
  color: #0f172a !important;
  background: transparent !important;
}

html[data-bitepdf-theme="light"] body #accessModal :where(.launch-promo-note p, .launch-promo-note small, .public-service-note p, .public-service-note small, .local-pricing-note p, .local-pricing-note small) {
  color: #526070 !important;
  background: transparent !important;
}

html[data-bitepdf-theme="light"] body #accessModal .modal-plan-trust span {
  color: #006b5f !important;
  background: #e8fffb !important;
  border-color: #9ee6da !important;
}
