:root {
  --plotline-bg: #f4efe6;
  --plotline-bg-warm: #fbf8f0;
  --plotline-surface: rgba(255, 252, 246, 0.94);
  --plotline-surface-elevated: #fffdf8;
  --plotline-border-soft: rgba(84, 68, 48, 0.14);
  --plotline-text: #241f1b;
  --plotline-text-muted: #74695d;
  --plotline-accent: #7a4d2c;
  --plotline-accent-dark: #59371f;
  --plotline-accent-soft: #f2e2cf;
  --plotline-secondary: #315f67;
  --plotline-secondary-soft: #dfecef;
  --plotline-danger: #963f36;
  --plotline-warning: #b8762b;
  --plotline-success: #4d7654;
  --plotline-timeline-bg: #ede2d3;
  --plotline-shadow-card: 0 14px 32px rgba(62, 45, 28, 0.08);
  --plotline-shadow-subtle: 0 8px 20px rgba(62, 45, 28, 0.06);
  --plotline-radius: 12px;
  --plotline-radius-sm: 9px;
  --plotline-ink: var(--plotline-text);
  --plotline-muted: var(--plotline-text-muted);
  --plotline-paper: var(--plotline-bg-warm);
  --plotline-panel: var(--plotline-surface);
  --plotline-line: var(--plotline-border-soft);
  --plotline-soft: var(--plotline-accent-soft);
  --app-bg: var(--plotline-bg);
  --app-surface: var(--plotline-surface);
  --app-surface-alt: var(--plotline-surface-elevated);
  --app-text: var(--plotline-text);
  --app-text-muted: var(--plotline-text-muted);
  --app-border: var(--plotline-border-soft);
  --app-link: var(--plotline-accent-dark);
  --app-input-bg: rgba(255, 253, 248, 0.9);
  --app-input-text: var(--plotline-text);
  --app-card-bg: var(--plotline-surface);
  --app-timeline-bg: var(--plotline-timeline-bg);
}

/* Public features page */
.features-page {
  scroll-behavior: smooth;
}

.features-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 7.4rem) 0 clamp(3rem, 6vw, 5.25rem);
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 165, 116, 0.2), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(95, 120, 108, 0.18), transparent 24rem),
    linear-gradient(180deg, var(--marketing-cream), var(--marketing-offwhite));
}

.features-hero__grid,
.features-word__grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(560px, 1.28fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.25rem);
}

.features-hero__copy {
  max-width: 620px;
}

.features-hero__highlights {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.features-hero__highlights article {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--marketing-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(31, 42, 68, 0.08);
}

.features-hero__highlights strong {
  color: var(--marketing-navy);
  font-size: 1rem;
}

.features-hero__highlights span,
.features-section__heading p,
.features-showcase__intro p,
.features-word p,
.features-bullet-list,
.feature-icon-card p,
.features-split__copy p,
.features-faq p {
  color: var(--marketing-muted);
}

.features-screenshot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 68, 0.14);
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdf8, #f7f0e8);
  box-shadow: var(--marketing-shadow);
}

.features-screenshot::before {
  content: "";
  display: block;
  height: 38px;
  background:
    radial-gradient(circle at 24px 50%, #d77a68 0 5px, transparent 6px),
    radial-gradient(circle at 44px 50%, #e2bc72 0 5px, transparent 6px),
    radial-gradient(circle at 64px 50%, #79a286 0 5px, transparent 6px),
    linear-gradient(90deg, #f5efe7, #fff);
}

.features-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f8f3ec;
}

.features-screenshot--hero {
  margin-right: min(-3vw, -1.5rem);
}

.features-screenshot--product,
.features-screenshot--wide {
  box-shadow: 0 28px 70px rgba(31, 42, 68, 0.14);
}

.features-screenshot--showcase {
  margin-bottom: 1.35rem;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

.features-screenshot--wide {
  max-width: 1180px;
  margin-bottom: 1.35rem;
}

.features-screenshot figcaption,
.feature-icon-card span {
  color: var(--marketing-rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.features-screenshot figcaption {
  padding: 0.8rem 1rem 1rem;
  background: #fff;
}

.features-jump {
  padding: 2rem 0;
  background: var(--marketing-offwhite);
}

.features-jump__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.features-jump__grid a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(31, 42, 68, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--marketing-navy);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(31, 42, 68, 0.07);
}

.features-jump__grid a:hover,
.features-jump__grid a:focus {
  border-color: rgba(212, 165, 116, 0.8);
  color: var(--marketing-navy);
  transform: translateY(-1px);
}

.features-section,
.features-showcase,
.features-word,
.features-faq {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.features-section--soft,
.features-word {
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.18), transparent 38%),
    var(--marketing-cream);
}

.features-section__heading,
.features-showcase__intro {
  max-width: 880px;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.features-section__heading h2,
.features-showcase__intro h2,
.features-word h2 {
  max-width: 780px;
}

.features-preview-pair,
.features-collage {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.features-preview-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

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

.features-split {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.features-split__copy {
  padding: clamp(1.4rem, 3vw, 2rem);
}

.features-split__copy h3 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

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

.features-icon-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.features-icon-grid--showcase {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.features-icon-grid--publish {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feature-icon-card {
  min-height: 100%;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(31, 42, 68, 0.09);
}

.feature-icon-card > span {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.22), rgba(95, 120, 108, 0.16)),
    #fffaf2;
  color: var(--marketing-navy);
  letter-spacing: 0;
}

.feature-icon-card--large {
  padding: clamp(1.25rem, 3vw, 1.8rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 248, 245, 0.88)),
    #fff;
}

.feature-icon-card h3 {
  margin: 0 0 0.55rem;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.18;
}

.feature-icon-card p {
  margin: 0;
}

.features-showcase {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 42, 68, 0.96), rgba(49, 66, 99, 0.96)),
    var(--marketing-navy);
}

.features-showcase .marketing-eyebrow,
.features-showcase h2,
.features-showcase h3 {
  color: #fff;
}

.features-showcase__intro p,
.features-showcase .feature-icon-card p {
  color: rgba(255, 255, 255, 0.72);
}

.features-showcase .features-showcase__intro h2,
.features-showcase .feature-icon-card h3 {
  color: #f0c995;
}

.features-showcase .feature-icon-card {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.features-showcase .feature-icon-card > span {
  background: rgba(255, 255, 255, 0.13);
  color: #f0c995;
}

.features-did-you-know {
  margin-top: 1.4rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid rgba(212, 165, 116, 0.42);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.features-did-you-know strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #f0c995;
  font-size: 1.1rem;
}

.features-did-you-know p {
  max-width: 920px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.features-word {
  border-top: 1px solid rgba(31, 42, 68, 0.08);
  border-bottom: 1px solid rgba(31, 42, 68, 0.08);
}

.features-word__grid {
  grid-template-columns: minmax(300px, 0.62fr) minmax(560px, 1.38fr);
}

.features-bullet-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.features-bullet-list li {
  position: relative;
  padding-left: 1.7rem;
}

.features-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--marketing-gold), var(--marketing-rose));
}

.features-faq {
  background: var(--marketing-offwhite);
}

.features-page .final-cta small {
  display: block;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 980px) {
  .features-hero__grid,
  .features-word__grid,
  .features-split,
  .features-preview-pair,
  .features-collage {
    grid-template-columns: 1fr;
  }

  .features-screenshot--hero {
    margin-right: 0;
  }

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

@media (max-width: 680px) {
  .features-hero {
    padding-top: 2.4rem;
  }

  .features-icon-grid,
  .features-icon-grid--three,
  .features-icon-grid--publish {
    grid-template-columns: 1fr;
  }

  .features-jump__grid a {
    width: 100%;
    justify-content: center;
  }

  .features-screenshot,
  .feature-icon-card {
    border-radius: 18px;
  }

  .features-screenshot::before {
    height: 30px;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --plotline-bg: #14110f;
  --plotline-bg-warm: #1c1714;
  --plotline-surface: rgba(35, 29, 25, 0.96);
  --plotline-surface-elevated: #2a231e;
  --plotline-border-soft: rgba(231, 214, 190, 0.16);
  --plotline-text: #f1e7d8;
  --plotline-text-muted: #b9aa99;
  --plotline-accent: #d49a62;
  --plotline-accent-dark: #f0c99d;
  --plotline-accent-soft: #3a2a20;
  --plotline-secondary: #78b9c2;
  --plotline-secondary-soft: #21383d;
  --plotline-danger: #ee8e83;
  --plotline-warning: #e0ad65;
  --plotline-success: #91c99a;
  --plotline-timeline-bg: #211b17;
  --plotline-shadow-card: 0 16px 38px rgba(0, 0, 0, 0.34);
  --plotline-shadow-subtle: 0 10px 26px rgba(0, 0, 0, 0.24);
  --plotline-ink: var(--plotline-text);
  --plotline-muted: var(--plotline-text-muted);
  --plotline-paper: var(--plotline-bg-warm);
  --plotline-panel: var(--plotline-surface);
  --plotline-line: var(--plotline-border-soft);
  --plotline-soft: var(--plotline-accent-soft);
  --app-bg: #14110f;
  --app-surface: rgba(35, 29, 25, 0.96);
  --app-surface-alt: #2a231e;
  --app-text: #f4eadc;
  --app-text-muted: #cdbba7;
  --app-border: rgba(231, 214, 190, 0.2);
  --app-link: #f1c38f;
  --app-input-bg: #211b17;
  --app-input-text: #f4eadc;
  --app-card-bg: rgba(35, 29, 25, 0.96);
  --app-timeline-bg: #211b17;
  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--app-text);
  --bs-secondary-color: var(--app-text-muted);
  --bs-tertiary-color: #a99886;
  --bs-border-color: var(--app-border);
  --bs-link-color: var(--app-link);
  --bs-link-hover-color: #ffd5a6;
  --bs-card-bg: var(--app-card-bg);
  --bs-card-color: var(--app-text);
  --bs-modal-bg: var(--app-surface-alt);
  --bs-modal-color: var(--app-text);
  --bs-dropdown-bg: var(--app-surface-alt);
  --bs-dropdown-color: var(--app-text);
  --bs-list-group-bg: var(--app-surface);
  --bs-list-group-color: var(--app-text);
  --bs-table-color: var(--app-text);
  --bs-table-bg: transparent;
}

body {
  color: var(--plotline-text);
  background:
    radial-gradient(circle at top left, rgba(185, 134, 83, 0.18), transparent 34rem),
    linear-gradient(135deg, var(--plotline-bg-warm), var(--plotline-bg) 52%, #efe6d8);
  font-family: "Segoe UI", "Aptos", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

h1,
h2,
h3,
.navbar-brand,
.context-title strong {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

a {
  color: var(--plotline-accent-dark);
  text-decoration-color: rgba(122, 77, 44, 0.28);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--plotline-secondary);
}

.plotline-nav {
  position: relative;
  z-index: 1030;
  background: rgba(255, 251, 243, 0.9) !important;
  border-bottom: 1px solid rgba(84, 68, 48, 0.13) !important;
  box-shadow: 0 8px 28px rgba(62, 45, 28, 0.06);
}

.navbar-brand {
  color: var(--plotline-accent-dark) !important;
  font-size: 1.35rem;
}

.plotline-nav .nav-link {
  border-radius: 999px;
  color: var(--plotline-text-muted) !important;
  font-weight: 650;
  padding-inline: 0.82rem;
}

.plotline-nav .nav-link:hover,
.plotline-nav .nav-link:focus {
  color: var(--plotline-accent-dark) !important;
  background: rgba(122, 77, 44, 0.1);
}

.page-heading h1,
.workspace-heading h1 {
  color: #201a16;
  text-wrap: balance;
}

.eyebrow {
  color: var(--plotline-accent);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
}

.lead-text,
.muted {
  color: var(--plotline-text-muted) !important;
}

.plain-card,
.empty-panel,
.edit-panel,
.list-section,
.story-bible-section,
.story-bible-card,
.archive-item-card,
.warning-card,
.warning-mini-card,
.scenario-chapter,
.drag-drop-panel,
.import-tree-book,
.import-confirmation,
.import-docs details {
  background: var(--plotline-surface);
  border-color: var(--plotline-border-soft);
  border-radius: var(--plotline-radius);
  box-shadow: var(--plotline-shadow-subtle);
}

.plain-card,
.story-bible-card,
.archive-item-card,
.timeline-scene-card,
.inspector-section {
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.plain-card:hover,
.story-bible-card:hover,
.archive-item-card:hover {
  border-color: rgba(122, 77, 44, 0.24);
  box-shadow: var(--plotline-shadow-card);
}

.empty-panel {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(244, 229, 209, 0.72)),
    var(--plotline-surface);
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.btn-primary {
  --bs-btn-bg: var(--plotline-accent);
  --bs-btn-border-color: var(--plotline-accent);
  --bs-btn-hover-bg: var(--plotline-accent-dark);
  --bs-btn-hover-border-color: var(--plotline-accent-dark);
  --bs-btn-active-bg: var(--plotline-accent-dark);
  --bs-btn-active-border-color: var(--plotline-accent-dark);
}

.btn-outline-primary,
.btn-outline-secondary {
  --bs-btn-color: var(--plotline-accent-dark);
  --bs-btn-border-color: rgba(122, 77, 44, 0.26);
  --bs-btn-hover-color: var(--plotline-accent-dark);
  --bs-btn-hover-bg: rgba(122, 77, 44, 0.12);
  --bs-btn-hover-border-color: rgba(122, 77, 44, 0.38);
  background: rgba(255, 252, 246, 0.72);
}

.btn-outline-danger {
  --bs-btn-color: var(--plotline-danger);
  --bs-btn-border-color: rgba(150, 63, 54, 0.34);
  --bs-btn-hover-bg: var(--plotline-danger);
  --bs-btn-hover-border-color: var(--plotline-danger);
}

.status-pill,
.purpose-chip,
.location-badge,
.archived-badge,
.severity-pill,
.overview-chip,
.story-bible-card-title span {
  border: 1px solid rgba(84, 68, 48, 0.13);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.82);
  color: var(--plotline-text-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-weight: 750;
  letter-spacing: 0.02em;
}

.status-pill {
  background: var(--plotline-secondary-soft);
  color: #284f56;
}

.purpose-chip {
  background: var(--plotline-accent-soft);
  color: var(--plotline-accent-dark);
}

.severity-pill.warning,
.warning-placeholder.active {
  background: #fbecd3;
  color: #7b4b13;
  border-color: rgba(184, 118, 43, 0.28);
}

.context-header {
  background: rgba(255, 251, 243, 0.78);
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius);
  box-shadow: var(--plotline-shadow-subtle);
}

.context-nav a {
  border-radius: 999px;
  color: var(--plotline-text-muted);
  font-weight: 700;
}

.context-nav a:hover,
.context-nav a:focus {
  background: rgba(122, 77, 44, 0.1);
  color: var(--plotline-accent-dark);
}

.pw-page-heading {
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  margin-bottom: 1rem;
}

.pw-page-heading > div:first-child {
  min-width: min(100%, 26rem);
}

.pw-page-heading .lead-text {
  max-width: 52rem;
}

.pw-project-nav {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius);
  padding: 0.7rem 0.75rem;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(242, 226, 207, 0.55)),
    var(--plotline-surface);
  box-shadow: var(--plotline-shadow-subtle);
}

.pw-project-nav__label {
  color: var(--plotline-accent);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.pw-project-nav__links,
.pw-character-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
}

.pw-project-nav__link,
.pw-character-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid rgba(84, 68, 48, 0.16);
  border-radius: 999px;
  padding: 0.32rem 0.68rem;
  color: var(--plotline-accent-dark);
  background: rgba(255, 250, 241, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 780;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.pw-project-nav__link:hover,
.pw-project-nav__link:focus,
.pw-character-nav__link:hover,
.pw-character-nav__link:focus {
  color: var(--plotline-accent-dark);
  border-color: rgba(122, 77, 44, 0.32);
  background: rgba(122, 77, 44, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 5px 12px rgba(62, 45, 28, 0.06);
}

.pw-project-nav__link.active,
.pw-character-nav__link.active {
  color: #fff8ec;
  border-color: var(--plotline-accent);
  background: linear-gradient(180deg, var(--plotline-accent), var(--plotline-accent-dark));
  box-shadow: 0 6px 14px rgba(62, 45, 28, 0.16);
}

.pw-character-nav {
  margin: 0 0 1rem;
  border-bottom: 1px solid rgba(84, 68, 48, 0.11);
  padding-bottom: 0.65rem;
}

.pw-actions {
  flex: 0 0 auto;
}

.pw-actions__toggle {
  --bs-btn-color: var(--plotline-accent-dark);
  --bs-btn-bg: rgba(255, 250, 241, 0.86);
  --bs-btn-border-color: rgba(122, 77, 44, 0.32);
  --bs-btn-hover-color: #fff8ec;
  --bs-btn-hover-bg: var(--plotline-accent);
  --bs-btn-hover-border-color: var(--plotline-accent);
  --bs-btn-active-color: #fff8ec;
  --bs-btn-active-bg: var(--plotline-accent-dark);
  --bs-btn-active-border-color: var(--plotline-accent-dark);
  min-height: 2.35rem;
  padding-inline: 1rem;
  box-shadow: var(--plotline-shadow-subtle);
}

.pw-actions .dropdown-menu {
  --bs-dropdown-bg: var(--plotline-surface-elevated);
  --bs-dropdown-color: var(--plotline-text);
  --bs-dropdown-border-color: var(--plotline-border-soft);
  --bs-dropdown-link-color: var(--plotline-text);
  --bs-dropdown-link-hover-color: var(--plotline-accent-dark);
  --bs-dropdown-link-hover-bg: rgba(122, 77, 44, 0.1);
  --bs-dropdown-divider-bg: rgba(84, 68, 48, 0.13);
  border-radius: var(--plotline-radius-sm);
  box-shadow: var(--plotline-shadow-card);
}

.pw-actions .dropdown-item {
  font-weight: 650;
}

.pw-actions .dropdown-item.text-danger {
  color: var(--plotline-danger) !important;
}

.pw-actions .dropdown-item.text-danger:hover,
.pw-actions .dropdown-item.text-danger:focus {
  color: #fff8ec !important;
  background: var(--plotline-danger);
}

.project-gallery {
  display: grid;
  gap: 1rem;
}

.project-tabs {
  gap: 0.45rem;
  padding: 0.35rem;
  border: 1px solid var(--plotline-border-soft);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  box-shadow: var(--plotline-shadow-subtle);
  width: fit-content;
  max-width: 100%;
}

.project-tabs .nav-link {
  border-radius: 999px;
  color: var(--plotline-text-muted);
  font-weight: 800;
  padding: 0.48rem 0.9rem;
}

.project-tabs .nav-link:hover,
.project-tabs .nav-link:focus {
  color: var(--plotline-accent-dark);
  background: rgba(122, 77, 44, 0.1);
}

.project-tabs .nav-link.active {
  color: #fff8ec;
  background: linear-gradient(180deg, var(--plotline-accent), var(--plotline-accent-dark));
  box-shadow: 0 8px 16px rgba(62, 45, 28, 0.14);
}

.project-tab-content {
  min-width: 0;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius);
  background: var(--plotline-surface);
  box-shadow: var(--plotline-shadow-subtle);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.project-card:hover {
  border-color: rgba(122, 77, 44, 0.24);
  box-shadow: var(--plotline-shadow-card);
  transform: translateY(-1px);
}

.project-card--archived {
  opacity: 0.88;
}

.project-card__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 11rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.64), transparent 11rem),
    linear-gradient(135deg, rgba(242, 226, 207, 0.94), rgba(223, 236, 239, 0.78));
}

.project-card--archived .project-card__visual {
  filter: saturate(0.55);
}

.project-card__body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
}

.project-card__heading {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.project-card__heading h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.project-card__heading h2 a {
  color: var(--plotline-text);
  text-decoration-color: rgba(122, 77, 44, 0.28);
}

.project-card__description {
  display: -webkit-box;
  min-height: 3.2rem;
  margin: 0;
  overflow: hidden;
  color: var(--plotline-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-card__stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  border: 1px solid rgba(84, 68, 48, 0.12);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  color: var(--plotline-text-muted);
  background: rgba(255, 250, 241, 0.74);
  font-size: 0.82rem;
  font-weight: 700;
}

.project-card__stats strong {
  color: var(--plotline-accent-dark);
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  border-top: 1px solid rgba(84, 68, 48, 0.1);
  padding: 0.85rem 1rem 1rem;
}

.project-card__actions form {
  display: inline-flex;
  margin: 0;
}

.project-cover-stack {
  position: relative;
  width: min(11.5rem, 70%);
  height: 9.4rem;
}

.project-cover-stack__cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4.65rem;
  aspect-ratio: 2 / 3;
  border: 3px solid rgba(255, 253, 248, 0.86);
  border-radius: 0.45rem;
  background: var(--plotline-soft);
  box-shadow: 0 12px 28px rgba(62, 45, 28, 0.22);
  object-fit: cover;
}

.project-cover-stack__cover--0 {
  z-index: 3;
  transform: translate(-50%, -50%) rotate(-1deg) scale(1.08);
}

.project-cover-stack__cover--1 {
  z-index: 2;
  transform: translate(-88%, -47%) rotate(-8deg) scale(0.94);
}

.project-cover-stack__cover--2 {
  z-index: 1;
  transform: translate(-12%, -47%) rotate(8deg) scale(0.94);
}

.project-cover-fallback {
  display: grid;
  place-items: center;
  width: min(9.5rem, 62%);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(84, 68, 48, 0.18);
  border-radius: 0.8rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.34), transparent 32%),
    linear-gradient(135deg, var(--plotline-accent), var(--plotline-accent-dark));
  box-shadow: 0 14px 30px rgba(62, 45, 28, 0.2);
  color: #fff8ec;
}

.project-cover-fallback span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-empty-state {
  margin: 0;
}

.character-gallery-upload {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(14rem, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius-sm);
  padding: 0.85rem;
  background: rgba(255, 250, 241, 0.56);
}

.character-relationship-editor {
  gap: 0.85rem;
}

.character-relationship-read {
  display: grid;
  gap: 0.75rem;
}

.character-relationship-edit-form {
  width: 100%;
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius-sm);
  padding: 0.85rem;
  background: rgba(255, 250, 241, 0.56);
}

.character-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.9rem;
}

.character-gallery-card {
  overflow: hidden;
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius-sm);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--plotline-shadow-subtle);
}

.character-gallery-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--plotline-soft);
  object-fit: cover;
}

.character-gallery-card__body {
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem;
}

.character-gallery-card__actions {
  border-top: 1px solid rgba(84, 68, 48, 0.1);
  padding: 0 0.75rem 0.75rem;
}

.character-avatar-crop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
  gap: 1rem;
  align-items: start;
}

.character-avatar-crop-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 24rem;
  overflow: hidden;
  border: 1px solid var(--plotline-border-soft);
  border-radius: var(--plotline-radius-sm);
  background: var(--plotline-soft);
}

.character-avatar-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  user-select: none;
}

.character-avatar-crop-box {
  position: absolute;
  cursor: move;
  touch-action: none;
  border: 2px solid #fff8ec;
  box-shadow: 0 0 0 9999px rgba(20, 17, 15, 0.42), 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.character-avatar-crop-box span {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 2px solid #fff8ec;
  border-bottom: 2px solid #fff8ec;
}

.character-avatar-crop-side {
  display: grid;
  gap: 0.75rem;
}

.character-avatar-preview {
  width: min(100%, 12rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--plotline-border-soft);
  border-radius: 999px;
  background: var(--plotline-soft);
  box-shadow: var(--plotline-shadow-subtle);
}

.character-avatar-preview img {
  display: block;
  max-width: none;
  transform-origin: top left;
}

@media (max-width: 767.98px) {
  .pw-page-heading {
    align-items: stretch;
  }

  .pw-page-heading .pw-actions,
  .pw-page-heading .pw-actions__toggle {
    width: 100%;
  }

  .pw-project-nav {
    padding: 0.65rem;
  }

  .project-tabs {
    width: 100%;
    border-radius: var(--plotline-radius);
  }

  .project-tabs .nav-item,
  .project-tabs .nav-link {
    flex: 1 1 auto;
  }

  .project-card__actions .btn,
  .project-card__actions .dropdown {
    flex: 1 1 auto;
  }

  .character-gallery-upload,
  .character-avatar-crop-layout {
    grid-template-columns: 1fr;
  }
}

.timeline-workspace {
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.84), rgba(237, 226, 211, 0.66)),
    var(--plotline-timeline-bg);
  border: 1px solid rgba(84, 68, 48, 0.16);
  border-radius: var(--plotline-radius);
  box-shadow: 0 18px 44px rgba(62, 45, 28, 0.1);
}

.timeline-chapter {
  background: rgba(255, 250, 242, 0.68);
  border-color: rgba(84, 68, 48, 0.15);
  border-radius: var(--plotline-radius);
}

.timeline-chapter-title,
.lane-board-heading,
.plot-lane-board-heading,
.lane-group-heading {
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(244, 229, 209, 0.86));
  border-color: rgba(84, 68, 48, 0.16);
  color: var(--plotline-accent-dark);
}

.timeline-scene-card {
  background: linear-gradient(180deg, #fffdf8, #fbf3e8);
  border: 1px solid rgba(84, 68, 48, 0.16);
  border-radius: var(--plotline-radius-sm);
  box-shadow: 0 10px 24px rgba(62, 45, 28, 0.08);
}

.timeline-scene-card:hover,
.timeline-scene-card.selected,
.timeline-scene-card.focus-match,
.timeline-scene-card.keyboard-focus {
  border-color: rgba(122, 77, 44, 0.42);
  box-shadow: 0 0 0 3px rgba(122, 77, 44, 0.11), 0 16px 30px rgba(62, 45, 28, 0.12);
  transform: translateY(-1px);
}

.plot-lane-label,
.asset-lane-label,
.character-lane-label,
.plot-lane-slot,
.asset-lane-slot,
.character-lane-slot {
  background: rgba(255, 251, 244, 0.74);
  border-color: rgba(84, 68, 48, 0.14);
}

.thread-marker,
.asset-marker,
.character-appearance-pill {
  box-shadow: 0 4px 12px rgba(62, 45, 28, 0.12);
}

.scene-inspector-panel {
  background: rgba(255, 251, 243, 0.72);
}

.form-control,
.form-select {
  border-color: rgba(84, 68, 48, 0.2);
  border-radius: 10px;
  background-color: rgba(255, 253, 248, 0.9);
}

.form-control:focus,
.form-select:focus,
.btn:focus-visible,
a:focus-visible {
  border-color: rgba(122, 77, 44, 0.56);
  box-shadow: 0 0 0 0.22rem rgba(122, 77, 44, 0.17);
  outline: none;
}

.auth-page-heading {
  justify-content: center;
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.auth-page-heading > div {
  width: 100%;
}

.auth-page-heading .lead-text {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.auth-card {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  border-top: 0;
  padding-top: 0;
}

.auth-form .alert {
  margin-bottom: 0;
}

.auth-field-stack {
  display: grid;
  gap: 1rem;
}

.auth-field-stack .form-label {
  font-weight: 650;
}

.auth-field-stack .form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0;
  color: var(--plotline-text-muted);
  font-weight: 650;
}

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-actions .btn {
  min-width: 8.75rem;
}

.auth-help {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
}

.auth-help a {
  font-weight: 650;
}

.two-factor-card {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.two-factor-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  border-top: 0;
  padding-top: 0;
}

.two-factor-body .alert {
  width: 100%;
  margin-bottom: 0;
}

.two-factor-code-group {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  width: 100%;
}

.two-factor-label {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--plotline-text);
}

.two-factor-inputs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.two-factor-digit {
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 760;
  line-height: 1;
  border-radius: 0.75rem;
  border-color: rgba(122, 77, 44, 0.28);
  background: var(--plotline-surface-elevated);
  color: var(--plotline-text);
}

.two-factor-digit:focus {
  border-color: var(--plotline-accent);
  box-shadow:
    0 0 0 0.22rem rgba(122, 77, 44, 0.2),
    0 10px 22px rgba(62, 45, 28, 0.1);
}

.two-factor-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.two-factor-actions .btn {
  min-width: 8.75rem;
}

.two-factor-help {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--plotline-text-muted);
}

.two-factor-help a {
  font-weight: 650;
}

.two-factor-code-group .text-danger {
  min-height: 1.4rem;
}

@media (max-width: 576px) {
  .two-factor-card {
    padding: 1.35rem;
  }

  .two-factor-inputs {
    gap: 0.4rem;
  }

  .two-factor-digit {
    width: 3rem;
    height: 3rem;
    font-size: 1.45rem;
  }

  .two-factor-actions {
    flex-direction: column;
    width: 100%;
  }

  .two-factor-actions .btn {
    width: 100%;
  }

  .auth-card {
    padding: 1.35rem;
  }

  .auth-actions {
    flex-direction: column;
    width: 100%;
  }

  .auth-actions .btn {
    width: 100%;
  }
}

.plotline-confirm-modal {
  background: #fffaf2;
  border: 1px solid rgba(84, 68, 48, 0.16);
  border-radius: var(--plotline-radius);
  box-shadow: 0 24px 60px rgba(38, 30, 22, 0.2);
}

.plotline-confirm-modal .modal-header,
.plotline-confirm-modal .modal-footer {
  border-color: rgba(84, 68, 48, 0.12);
}

.alert-info,
.alert-warning {
  border-color: rgba(84, 68, 48, 0.16);
  border-radius: var(--plotline-radius-sm);
  background: rgba(255, 250, 241, 0.92);
  color: var(--plotline-text);
}

.trial-status-panel,
.trial-dashboard-banner {
  border-color: rgba(84, 68, 48, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(242, 226, 207, 0.56)),
    var(--plotline-surface);
  box-shadow: var(--plotline-shadow-subtle);
}

.trial-status-panel--signup {
  border-color: rgba(49, 95, 103, 0.22);
  background:
    linear-gradient(135deg, rgba(223, 236, 239, 0.72), rgba(255, 253, 248, 0.92)),
    var(--plotline-surface);
}

.trial-status-panel h2,
.trial-status-panel h3,
.trial-dashboard-banner h2 {
  color: var(--plotline-text);
}

.trial-progress {
  box-shadow: inset 0 1px 2px rgba(62, 45, 28, 0.08);
}

.trial-progress__bar {
  background: linear-gradient(90deg, var(--plotline-secondary), var(--plotline-accent));
}

.trial-status--fourteen-days {
  border-color: rgba(184, 118, 43, 0.28);
}

.trial-status--seven-days,
.trial-status--three-days,
.trial-status--one-day {
  border-color: rgba(184, 118, 43, 0.38);
  background:
    linear-gradient(135deg, rgba(251, 236, 211, 0.84), rgba(255, 253, 248, 0.92)),
    var(--plotline-surface);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--plotline-text);
  --bs-table-border-color: rgba(84, 68, 48, 0.12);
}

/* Phase 1V polish: cohesive, writer-focused surfaces without changing layout contracts. */
.page-heading,
.workspace-heading {
  row-gap: 0.8rem;
}

.page-heading h1,
.workspace-heading h1 {
  color: #211915;
}

.lead-text {
  line-height: 1.55;
}

.btn-sm {
  padding: 0.28rem 0.72rem;
  font-size: 0.8rem;
}

.button-row {
  gap: 0.55rem;
}

.button-row .btn,
.story-bible-actions a,
.timeline-preset-panel .btn,
.timeline-filter-actions .btn {
  white-space: nowrap;
}

.badge,
.soft-count,
.attachment-kind,
.preset-chip,
.story-bible-meta span {
  border-radius: 999px;
  font-weight: 780;
  letter-spacing: 0.015em;
}

.badge.text-bg-light,
.story-bible-meta span,
.soft-count {
  border: 1px solid rgba(84, 68, 48, 0.13);
  background: rgba(255, 250, 241, 0.78) !important;
  color: var(--plotline-text-muted) !important;
}

.badge.text-bg-warning,
.warning-placeholder.active {
  border: 1px solid rgba(184, 118, 43, 0.28);
  background: #fbecd3 !important;
  color: #7b4b13 !important;
}

.badge.text-bg-success {
  background: rgba(77, 118, 84, 0.13) !important;
  color: #315936 !important;
}

.empty-panel,
.future-lane-placeholder,
.inspector-empty {
  position: relative;
  overflow: hidden;
}

.empty-panel::before,
.future-lane-placeholder::before,
.inspector-empty::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--plotline-accent), var(--plotline-secondary));
  opacity: 0.42;
}

.timeline-workspace {
  padding: 0.35rem;
}

.timeline-shell {
  border-color: rgba(84, 68, 48, 0.14);
  background:
    linear-gradient(90deg, rgba(84, 68, 48, 0.05) 1px, transparent 1px) 0 0 / calc(var(--timeline-scene-width) + var(--timeline-grid-gap)) 100%,
    linear-gradient(180deg, rgba(255, 252, 246, 0.94), rgba(244, 235, 221, 0.86));
}

.timeline-project-title,
.timeline-book-title {
  border: 1px solid rgba(45, 33, 23, 0.12);
  background:
    linear-gradient(135deg, rgba(49, 95, 103, 0.96), rgba(89, 55, 31, 0.94));
  box-shadow: 8px 0 24px rgba(62, 45, 28, 0.1);
}

.timeline-book {
  padding: 0.15rem;
}

.timeline-book-title {
  min-height: 58px;
  align-content: center;
}

.timeline-chapter {
  border: 1px solid rgba(84, 68, 48, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.78), rgba(242, 226, 207, 0.42));
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.timeline-chapter-title {
  min-height: 52px;
  border-bottom: 1px solid rgba(84, 68, 48, 0.13);
  border-radius: var(--plotline-radius-sm) var(--plotline-radius-sm) 0 0;
  backdrop-filter: blur(10px);
}

.timeline-chapter-title strong,
.timeline-book-title strong {
  font-size: 0.96rem;
}

.timeline-scenes {
  padding: 0.65rem;
}

.timeline-scene-card,
.timeline-empty-scene {
  border-radius: 11px;
}

.timeline-scene-card {
  position: relative;
  min-height: 176px;
  border-color: rgba(84, 68, 48, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(251, 243, 232, 0.95));
  box-shadow: 0 10px 22px rgba(62, 45, 28, 0.08);
}

.timeline-scene-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.timeline-scene-card strong {
  color: #221a15;
  font-size: 0.98rem;
  line-height: 1.2;
}

.scene-summary {
  color: var(--plotline-text-muted);
  line-height: 1.38;
}

.location-pill,
.scene-pov-label,
.metric-mini-summary,
.dependency-placeholder,
.warning-placeholder {
  border: 1px solid rgba(84, 68, 48, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.timeline-placeholder-scene,
.timeline-placeholder-cell {
  border-color: rgba(84, 68, 48, 0.18);
  color: rgba(84, 68, 48, 0.58);
  background:
    repeating-linear-gradient(-45deg, rgba(122, 77, 44, 0.06) 0 8px, rgba(255, 255, 255, 0.18) 8px 16px),
    rgba(255, 252, 246, 0.52);
}

.timeline-scene-card:hover,
.timeline-scene-card.selected,
.timeline-scene-card.focus-match,
.timeline-scene-card.keyboard-focus,
.timeline-scene-card.search-hit {
  z-index: 3;
}

.timeline-scene-card.selected::before,
.timeline-scene-card.focus-match::before,
.timeline-scene-card.keyboard-focus::before,
.timeline-scene-card.search-hit::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--plotline-accent), var(--plotline-secondary));
}

.timeline-section-header,
.lane-board-heading,
.pacing-heading {
  border: 1px solid rgba(84, 68, 48, 0.13);
  backdrop-filter: blur(10px);
}

.plot-lane-board,
.asset-lane-board,
.character-lane-board {
  border-top-color: rgba(84, 68, 48, 0.12);
}

.plot-lane-label,
.asset-lane-label,
.character-lane-label {
  border-radius: 10px;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 6px 0 18px rgba(62, 45, 28, 0.06);
}

.character-lane-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.character-lane-label > span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.character-lane-label small {
  color: var(--plotline-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.plot-lane-slot,
.asset-lane-slot,
.character-lane-slot {
  min-height: 50px;
  border-radius: 10px;
}

.thread-marker,
.asset-marker,
.character-marker,
.character-appearance-pill {
  min-height: 24px;
  font-size: 0.7rem;
}

.thread-marker {
  border-color: color-mix(in srgb, var(--plot-colour), #241f1b 18%);
}

.asset-marker {
  border-radius: 8px;
  background: #eeeaf8;
}

.character-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff4d9;
}

.drag-chip,
[draggable="true"] {
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.drag-chip.character {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.drag-chip .visual-avatar,
.character-lane-label .visual-avatar {
  flex: 0 0 auto;
}

.drag-chip:hover,
[draggable="true"]:hover {
  transform: translateY(-1px);
}

.is-dragging {
  opacity: 0.55;
  box-shadow: 0 0 0 3px rgba(49, 95, 103, 0.14);
}

.drop-target-active {
  outline-color: rgba(49, 95, 103, 0.34);
  background-color: rgba(223, 236, 239, 0.55);
}

.timeline-control-panel,
.timeline-drag-palette,
.drag-drop-panel {
  background: rgba(255, 251, 243, 0.82);
  backdrop-filter: blur(10px);
}

.timeline-filter-drawer,
.timeline-control-group {
  border-color: rgba(84, 68, 48, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.scene-inspector-panel {
  border-color: rgba(84, 68, 48, 0.14);
  box-shadow: -14px 0 36px rgba(62, 45, 28, 0.07);
}

.inspector-header {
  border-bottom: 1px solid rgba(84, 68, 48, 0.12);
  margin-bottom: 0.75rem;
  padding-bottom: 0.7rem;
}

.inspector-header h2,
.inspector-empty h2 {
  color: #211915;
}

.writer-mini-card {
  border-color: rgba(84, 68, 48, 0.13);
  background: rgba(255, 253, 248, 0.78);
}

.writer-mini-card[open] {
  box-shadow: 0 10px 24px rgba(62, 45, 28, 0.07);
}

.writer-add-form,
.writer-edit-form {
  gap: 0.5rem;
}

.attachment-card-list {
  gap: 0.65rem;
}

.attachment-summary {
  align-items: center;
}

.attachment-kind {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(49, 95, 103, 0.18);
  padding: 2px 8px;
  background: var(--plotline-secondary-soft);
  color: #284f56;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.attachment-preview-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.attachment-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(84, 68, 48, 0.14);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.88);
  text-decoration: none;
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.18s ease;
}

.attachment-thumb:hover img {
  transform: scale(1.04);
}

.attachment-thumb-fallback span {
  color: var(--plotline-text-muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.attachment-preview-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.attachment-preview-copy p {
  margin: 0;
}

.attachment-add-card summary {
  color: var(--plotline-accent-dark);
}

.story-bible-section,
.writer-dashboard-panel {
  border-color: rgba(84, 68, 48, 0.14);
  background: rgba(255, 251, 243, 0.8);
}

.writer-dashboard-panel:first-child {
  border-color: rgba(49, 95, 103, 0.22);
  background:
    linear-gradient(135deg, rgba(223, 236, 239, 0.56), rgba(255, 251, 243, 0.9));
  box-shadow: 0 18px 38px rgba(49, 95, 103, 0.09);
}

.writer-queue-list {
  display: grid;
  gap: 0.75rem;
}

.writer-queue-card {
  border-color: rgba(84, 68, 48, 0.13);
  background: rgba(255, 253, 248, 0.86);
}

.writer-dashboard-panel:first-child .writer-queue-card:first-child {
  border-left: 4px solid var(--plotline-secondary);
}

.writer-queue-card h3 {
  line-height: 1.25;
}

.story-bible-nav {
  background: rgba(255, 251, 243, 0.78);
  border: 1px solid rgba(84, 68, 48, 0.12);
  border-radius: var(--plotline-radius);
  padding: 0.45rem;
}

.story-bible-card {
  background: rgba(255, 253, 248, 0.9);
}

.story-bible-card h3 {
  color: #211915;
}

.story-bible-card-title {
  gap: 0.8rem;
}

.story-bible-facts {
  border-top: 1px solid rgba(84, 68, 48, 0.1);
  padding-top: 0.65rem;
}

.story-bible-actions a {
  border-color: rgba(122, 77, 44, 0.2);
  background: rgba(255, 250, 241, 0.75);
}

.story-bible-actions a:hover {
  background: rgba(122, 77, 44, 0.1);
}

.timeline-settings-form {
  display: grid;
  gap: 1rem;
  max-width: 1180px;
}

.timeline-settings-section {
  display: grid;
  gap: 0.85rem;
}

.timeline-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.timeline-setting-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
  min-height: 92px;
  border: 1px solid rgba(84, 68, 48, 0.13);
  border-radius: var(--plotline-radius-sm);
  padding: 0.85rem;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--plotline-shadow-subtle);
  cursor: pointer;
}

.timeline-setting-card input {
  margin-top: 0.25rem;
  accent-color: var(--plotline-secondary);
}

.timeline-setting-card strong,
.timeline-setting-card small {
  display: block;
}

.timeline-setting-card strong {
  color: #211915;
}

.timeline-setting-card small {
  margin-top: 0.25rem;
  color: var(--plotline-text-muted);
  line-height: 1.4;
}

.timeline-setting-card:has(input:checked) {
  border-color: rgba(49, 95, 103, 0.25);
  background: linear-gradient(135deg, rgba(223, 236, 239, 0.52), rgba(255, 253, 248, 0.92));
}

.plotline-confirm-modal .modal-title {
  font-family: Georgia, "Times New Roman", serif;
}

.plotline-confirm-modal .modal-body {
  color: var(--plotline-text-muted);
  line-height: 1.55;
}

.theme-switcher {
  flex: 0 0 auto;
}

.theme-switcher .btn {
  --bs-btn-color: var(--plotline-text-muted);
  --bs-btn-border-color: var(--plotline-border-soft);
  --bs-btn-hover-color: var(--plotline-accent-dark);
  --bs-btn-hover-bg: rgba(122, 77, 44, 0.1);
  --bs-btn-hover-border-color: rgba(122, 77, 44, 0.28);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: var(--plotline-accent);
  --bs-btn-active-border-color: var(--plotline-accent);
  font-weight: 700;
}

[data-theme="dark"] body {
  color: var(--app-text);
  background:
    radial-gradient(circle at top left, rgba(212, 154, 98, 0.12), transparent 34rem),
    linear-gradient(135deg, var(--plotline-bg-warm), var(--plotline-bg) 52%, #0f0d0c);
}

[data-theme="dark"] a:not(.btn) {
  color: var(--app-link);
  text-decoration-color: rgba(241, 195, 143, 0.36);
}

[data-theme="dark"] a:not(.btn):hover,
[data-theme="dark"] a:not(.btn):focus {
  color: var(--bs-link-hover-color);
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .form-text,
[data-theme="dark"] .lead-text,
[data-theme="dark"] .scene-summary,
[data-theme="dark"] .timeline-chapter-title span,
[data-theme="dark"] .timeline-book-title span,
[data-theme="dark"] .plotline-nav .nav-link,
[data-theme="dark"] .plotline-nav .navbar-text,
[data-theme="dark"] .plain-card p,
[data-theme="dark"] .inspector-empty,
[data-theme="dark"] .plotline-confirm-modal .modal-body,
[data-theme="dark"] .timeline-setting-card small {
  color: var(--app-text-muted) !important;
}

[data-theme="dark"] .plotline-nav {
  background: rgba(29, 23, 20, 0.92) !important;
  border-bottom-color: var(--plotline-border-soft) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .plotline-nav .nav-link:hover,
[data-theme="dark"] .plotline-nav .nav-link:focus,
[data-theme="dark"] .plotline-nav .nav-link.active {
  color: var(--app-link) !important;
}

[data-theme="dark"] .navbar-toggler {
  border-color: var(--plotline-border-soft);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .page-heading h1,
[data-theme="dark"] .workspace-heading h1,
[data-theme="dark"] .timeline-scene-card strong,
[data-theme="dark"] .timeline-chapter-title strong,
[data-theme="dark"] .timeline-book-title strong,
[data-theme="dark"] .plain-card h2,
[data-theme="dark"] .plain-card h3,
[data-theme="dark"] .context-title strong,
[data-theme="dark"] .asset-card h2,
[data-theme="dark"] .character-card h2,
[data-theme="dark"] .inspector-header h2,
[data-theme="dark"] .inspector-empty h2,
[data-theme="dark"] .inspector-section h3,
[data-theme="dark"] .story-bible-card h3,
[data-theme="dark"] .timeline-setting-card strong {
  color: var(--app-text);
}

[data-theme="dark"] .plain-card,
[data-theme="dark"] .card,
[data-theme="dark"] .empty-panel,
[data-theme="dark"] .edit-panel,
[data-theme="dark"] .list-section,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .asset-card,
[data-theme="dark"] .story-bible-section,
[data-theme="dark"] .story-bible-card,
[data-theme="dark"] .story-bible-nav,
[data-theme="dark"] .attention-list article,
[data-theme="dark"] .warning-filter-panel,
[data-theme="dark"] .validation-summary,
[data-theme="dark"] .analytics-section,
[data-theme="dark"] .metric-shape-chart,
[data-theme="dark"] .metric-chart-frame,
[data-theme="dark"] .analytics-list-item,
[data-theme="dark"] .analytics-count-row,
[data-theme="dark"] .purpose-stat-row,
[data-theme="dark"] .archive-item-card,
[data-theme="dark"] .warning-card,
[data-theme="dark"] .warning-mini-card,
[data-theme="dark"] .scenario-chapter,
[data-theme="dark"] .drag-drop-panel,
[data-theme="dark"] .import-tree-book,
[data-theme="dark"] .import-confirmation,
[data-theme="dark"] .import-docs details,
[data-theme="dark"] .scene-inspector-panel,
[data-theme="dark"] .pacing-panel,
[data-theme="dark"] .timeline-control-panel,
[data-theme="dark"] .timeline-drag-palette,
[data-theme="dark"] .timeline-filter-drawer,
[data-theme="dark"] .timeline-control-group,
[data-theme="dark"] .timeline-visibility-panel,
[data-theme="dark"] .timeline-jump-panel,
[data-theme="dark"] .timeline-preset-panel,
[data-theme="dark"] .attachment-card,
[data-theme="dark"] .attachment-preview-row,
[data-theme="dark"] .attachment-thumb,
[data-theme="dark"] .asset-mini-item,
[data-theme="dark"] .archive-empty,
[data-theme="dark"] .writer-dashboard-panel,
[data-theme="dark"] .writer-dashboard-panel:first-child,
[data-theme="dark"] .writer-queue-card,
[data-theme="dark"] .writer-mini-card,
[data-theme="dark"] .timeline-setting-card,
[data-theme="dark"] .timeline-setting-card:has(input:checked),
[data-theme="dark"] .thread-event-item,
[data-theme="dark"] .asset-event-item,
[data-theme="dark"] .story-asset-event-item {
  color: var(--app-text);
  background: var(--app-surface);
  border-color: var(--app-border);
  box-shadow: var(--plotline-shadow-subtle);
}

[data-theme="dark"] .asset-card {
  border-left-color: rgba(241, 195, 143, 0.42);
}

[data-theme="dark"] .asset-card h2 a,
[data-theme="dark"] .story-bible-card a,
[data-theme="dark"] .analytics-link-row,
[data-theme="dark"] .health-kpi-grid strong {
  color: #ffe2bd;
}

[data-theme="dark"] .asset-card h2 a:hover,
[data-theme="dark"] .story-bible-card a:hover,
[data-theme="dark"] .analytics-link-row:hover {
  color: #fff4e8;
}

[data-theme="dark"] .asset-card p,
[data-theme="dark"] .asset-card-footer,
[data-theme="dark"] .asset-card .muted,
[data-theme="dark"] .warning-filter-panel .form-label,
[data-theme="dark"] .warning-filter-panel .form-check-label,
[data-theme="dark"] .validation-summary,
[data-theme="dark"] .story-bible-card p,
[data-theme="dark"] .story-bible-card h4,
[data-theme="dark"] .story-bible-facts dt,
[data-theme="dark"] .story-bible-link-list span,
[data-theme="dark"] .story-bible-scene-summary span,
[data-theme="dark"] .attention-list p,
[data-theme="dark"] .analytics-section-heading span,
[data-theme="dark"] .analytics-list-item p,
[data-theme="dark"] .analytics-link-row span,
[data-theme="dark"] .analytics-count-row span,
[data-theme="dark"] .purpose-stat-row span,
[data-theme="dark"] .health-kpi-grid span {
  color: var(--app-text-muted) !important;
}

[data-theme="dark"] .asset-card-footer .btn,
[data-theme="dark"] .warning-actions .btn {
  box-shadow: none;
}

[data-theme="dark"] .story-bible-link-list li,
[data-theme="dark"] .story-bible-facts,
[data-theme="dark"] .story-bible-chapter-summary,
[data-theme="dark"] .story-bible-scene-summary,
[data-theme="dark"] .metric-raw-details,
[data-theme="dark"] .analytics-list-item,
[data-theme="dark"] .analytics-link-row,
[data-theme="dark"] .analytics-count-row,
[data-theme="dark"] .purpose-stat-row {
  border-color: rgba(241, 195, 143, 0.18);
}

[data-theme="dark"] .story-bible-actions a,
[data-theme="dark"] .story-bible-nav a {
  color: #f1dcc4;
  background: rgba(241, 195, 143, 0.1);
  border: 1px solid rgba(241, 195, 143, 0.26);
}

[data-theme="dark"] .story-bible-actions a:hover,
[data-theme="dark"] .story-bible-nav a:hover,
[data-theme="dark"] .story-bible-nav a:focus,
[data-theme="dark"] .story-bible-actions a:focus {
  color: #21160f;
  background: #f1c38f;
  border-color: #ffd5a6;
}

[data-theme="dark"] .metric-chart-frame,
[data-theme="dark"] .attention-list article {
  background: #211b17;
}

[data-theme="dark"] .purpose-stat-bar {
  background: rgba(231, 214, 190, 0.12);
}

[data-theme="dark"] .purpose-stat-bar span {
  background: var(--plotline-accent-dark);
}

[data-theme="dark"] .thread-event-item,
[data-theme="dark"] .asset-event-item,
[data-theme="dark"] .story-asset-event-item {
  color: var(--app-text);
  background: #211b17;
  border-color: rgba(241, 195, 143, 0.24);
}

[data-theme="dark"] .thread-event-item p,
[data-theme="dark"] .asset-event-item p,
[data-theme="dark"] .story-asset-event-item p,
[data-theme="dark"] .thread-event-item .muted,
[data-theme="dark"] .asset-event-item .muted,
[data-theme="dark"] .story-asset-event-item .muted {
  color: var(--app-text-muted) !important;
}

[data-theme="dark"] .thread-event-marker,
[data-theme="dark"] .asset-event-marker {
  color: #21160f;
  background: #d49a62;
  border-color: rgba(255, 213, 166, 0.72);
}

[data-theme="dark"] .timeline-workspace,
[data-theme="dark"] .timeline-shell {
  background:
    linear-gradient(180deg, rgba(42, 35, 30, 0.96), rgba(29, 24, 21, 0.96)),
    var(--app-timeline-bg);
  border-color: var(--app-border);
}

[data-theme="dark"] .timeline-section-header,
[data-theme="dark"] .metric-lane-label,
[data-theme="dark"] .metric-shape-controls,
[data-theme="dark"] .metric-chart-frame,
[data-theme="dark"] .lane-board-heading,
[data-theme="dark"] .plot-lane-board-heading,
[data-theme="dark"] .pacing-heading,
[data-theme="dark"] .lane-group-heading,
[data-theme="dark"] .timeline-chapter-title,
[data-theme="dark"] .timeline-book-title {
  color: var(--app-link);
  background: rgba(37, 31, 27, 0.96);
  border-color: var(--app-border);
}

[data-theme="dark"] .timeline-project-title {
  background: #352318;
}

[data-theme="dark"] .timeline-chapter,
[data-theme="dark"] .timeline-scene-card,
[data-theme="dark"] .timeline-empty-scene,
[data-theme="dark"] .plot-lane-label,
[data-theme="dark"] .asset-lane-label,
[data-theme="dark"] .character-lane-label,
[data-theme="dark"] .plot-lane-slot,
[data-theme="dark"] .asset-lane-slot,
[data-theme="dark"] .character-lane-slot,
[data-theme="dark"] .timeline-placeholder-scene,
[data-theme="dark"] .timeline-placeholder-cell,
[data-theme="dark"] .metric-graph-points,
[data-theme="dark"] .timeline-minimap {
  color: var(--app-text);
  background: rgba(42, 35, 30, 0.9);
  border-color: var(--app-border);
}

[data-theme="dark"] .timeline-scene-card,
[data-theme="dark"] .timeline-empty-scene {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .timeline-scene-card:hover,
[data-theme="dark"] .timeline-scene-card.selected,
[data-theme="dark"] .timeline-scene-card.focus-match,
[data-theme="dark"] .timeline-scene-card.keyboard-focus,
[data-theme="dark"] .timeline-scene-card.search-hit {
  border-color: rgba(212, 154, 98, 0.62);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .timeline-minimap button {
  color: var(--plotline-accent-dark);
  background: linear-gradient(180deg, #332920 0%, #241d18 100%);
  border-color: var(--plotline-border-soft);
}

[data-theme="dark"] .timeline-minimap button.is-active {
  color: #1c120d;
  background: linear-gradient(180deg, var(--plotline-accent-dark) 0%, var(--plotline-accent) 100%);
}

[data-theme="dark"] .drag-chip,
[data-theme="dark"] .purpose-chip,
[data-theme="dark"] .metric-mini-summary,
[data-theme="dark"] .scene-pov-label,
[data-theme="dark"] .location-pill,
[data-theme="dark"] .archive-pill,
[data-theme="dark"] .badge,
[data-theme="dark"] .badge.text-bg-light,
[data-theme="dark"] .status-pill,
[data-theme="dark"] .archived-badge,
[data-theme="dark"] .overview-chip,
[data-theme="dark"] .breadcrumb-trail a,
[data-theme="dark"] .breadcrumb-trail span,
[data-theme="dark"] .scenario-tag,
[data-theme="dark"] .plain-preview,
[data-theme="dark"] .soft-count,
[data-theme="dark"] .attachment-kind,
[data-theme="dark"] .preset-chip,
[data-theme="dark"] .story-bible-meta span {
  color: #f4eadc !important;
  background: rgba(212, 154, 98, 0.18) !important;
  border-color: rgba(241, 195, 143, 0.36) !important;
  box-shadow: none;
}

[data-theme="dark"] .badge.text-bg-light,
[data-theme="dark"] .soft-count,
[data-theme="dark"] .status-pill,
[data-theme="dark"] .archived-badge {
  color: #ead8c4 !important;
  background: rgba(205, 187, 167, 0.16) !important;
  border-color: rgba(231, 214, 190, 0.36) !important;
}

[data-theme="dark"] .badge.text-bg-warning,
[data-theme="dark"] .badge.bg-warning,
[data-theme="dark"] .warning-placeholder.active {
  color: #f6d8a6 !important;
  background: rgba(187, 126, 54, 0.24) !important;
  border-color: rgba(224, 173, 101, 0.34);
}

[data-theme="dark"] .badge.bg-secondary,
[data-theme="dark"] .badge.text-bg-secondary {
  color: #ead8c4 !important;
  background: rgba(205, 187, 167, 0.16) !important;
  border-color: rgba(231, 214, 190, 0.34);
}

[data-theme="dark"] .badge.text-bg-success {
  color: #bddfc3 !important;
  background: rgba(91, 143, 101, 0.22) !important;
  border-color: rgba(145, 201, 154, 0.3);
}

[data-theme="dark"] .badge.text-bg-danger,
[data-theme="dark"] .badge.bg-danger {
  color: #f0b8b2 !important;
  background: rgba(151, 62, 54, 0.3) !important;
  border-color: rgba(238, 142, 131, 0.35);
}

[data-theme="dark"] .badge.text-bg-info,
[data-theme="dark"] .badge.bg-info {
  color: #b8dfe5 !important;
  background: rgba(62, 125, 136, 0.28) !important;
  border-color: rgba(120, 185, 194, 0.34);
}

[data-theme="dark"] .severity-pill.info {
  color: #b8dfe5;
  background: rgba(62, 125, 136, 0.24);
  border-color: rgba(120, 185, 194, 0.34);
}

[data-theme="dark"] .severity-pill.warning {
  color: #f6d8a6;
  background: rgba(187, 126, 54, 0.24);
  border-color: rgba(224, 173, 101, 0.34);
}

[data-theme="dark"] .severity-pill.error {
  color: #f0b8b2;
  background: rgba(151, 62, 54, 0.3);
  border-color: rgba(238, 142, 131, 0.35);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea,
[data-theme="dark"] input,
[data-theme="dark"] select {
  color: var(--app-input-text);
  background-color: var(--app-input-bg);
  border-color: var(--app-border);
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder {
  color: #a99886;
  opacity: 1;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-check-input:focus {
  border-color: var(--plotline-accent);
  box-shadow: 0 0 0 0.2rem rgba(212, 154, 98, 0.2);
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled,
[data-theme="dark"] input:disabled,
[data-theme="dark"] select:disabled,
[data-theme="dark"] textarea:disabled {
  color: #a99886;
  background-color: #1b1613;
  border-color: rgba(231, 214, 190, 0.12);
  opacity: 1;
}

[data-theme="dark"] .table {
  --bs-table-color: var(--app-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--app-border);
  --bs-table-striped-color: var(--app-text);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.035);
  --bs-table-hover-color: var(--app-text);
  --bs-table-hover-bg: rgba(212, 154, 98, 0.1);
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .plotline-confirm-modal {
  color: var(--app-text);
  background: var(--app-surface-alt);
  border-color: var(--app-border);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: var(--app-border);
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(1) brightness(1.6);
}

[data-theme="dark"] .dropdown-menu {
  --bs-dropdown-color: var(--app-text);
  --bs-dropdown-bg: var(--app-surface-alt);
  --bs-dropdown-border-color: var(--app-border);
  --bs-dropdown-link-color: var(--app-text);
  --bs-dropdown-link-hover-color: var(--app-link);
  --bs-dropdown-link-hover-bg: rgba(212, 154, 98, 0.12);
  --bs-dropdown-link-active-color: #1c120d;
  --bs-dropdown-link-active-bg: var(--plotline-accent-dark);
  --bs-dropdown-link-disabled-color: #8f8172;
}

[data-theme="dark"] .btn-outline-primary,
[data-theme="dark"] .btn-outline-info {
  --bs-btn-color: #ffd5a6;
  --bs-btn-border-color: rgba(241, 195, 143, 0.58);
  --bs-btn-bg: rgba(241, 195, 143, 0.08);
  --bs-btn-hover-color: #fff4e8;
  --bs-btn-hover-bg: rgba(241, 195, 143, 0.18);
  --bs-btn-hover-border-color: rgba(255, 213, 166, 0.72);
  --bs-btn-active-color: #fff4e8;
  --bs-btn-active-bg: rgba(241, 195, 143, 0.24);
  --bs-btn-active-border-color: rgba(255, 213, 166, 0.82);
  --bs-btn-disabled-color: #9c8d7d;
  --bs-btn-disabled-border-color: rgba(231, 214, 190, 0.18);
  background-color: var(--bs-btn-bg);
}

[data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .btn-outline-dark,
[data-theme="dark"] .btn-outline-light {
  --bs-btn-color: #ead8c4;
  --bs-btn-border-color: rgba(231, 214, 190, 0.46);
  --bs-btn-bg: rgba(231, 214, 190, 0.08);
  --bs-btn-hover-color: #fff4e8;
  --bs-btn-hover-bg: rgba(231, 214, 190, 0.16);
  --bs-btn-hover-border-color: rgba(241, 220, 196, 0.68);
  --bs-btn-active-color: #fff4e8;
  --bs-btn-active-bg: rgba(231, 214, 190, 0.22);
  --bs-btn-active-border-color: rgba(241, 220, 196, 0.64);
  --bs-btn-disabled-color: #8f8172;
  --bs-btn-disabled-border-color: rgba(231, 214, 190, 0.16);
  background-color: var(--bs-btn-bg);
}

[data-theme="dark"] .btn-outline-danger {
  --bs-btn-color: #ffb2aa;
  --bs-btn-border-color: rgba(238, 142, 131, 0.5);
  --bs-btn-hover-color: #2a1210;
  --bs-btn-hover-bg: #ffb2aa;
  --bs-btn-hover-border-color: #ffb2aa;
}

[data-theme="dark"] .btn-outline-success {
  --bs-btn-color: #bddfc3;
  --bs-btn-border-color: rgba(145, 201, 154, 0.46);
  --bs-btn-bg: rgba(91, 143, 101, 0.12);
  --bs-btn-hover-color: #102016;
  --bs-btn-hover-bg: #bddfc3;
  --bs-btn-hover-border-color: #d2efd6;
  --bs-btn-active-color: #102016;
  --bs-btn-active-bg: #a8d7b0;
  --bs-btn-active-border-color: #d2efd6;
  --bs-btn-disabled-color: #8aa58e;
  --bs-btn-disabled-border-color: rgba(145, 201, 154, 0.2);
  background-color: var(--bs-btn-bg);
}

[data-theme="dark"] .nav-tabs {
  --bs-nav-tabs-border-color: var(--app-border);
  --bs-nav-tabs-link-hover-border-color: rgba(241, 195, 143, 0.28);
  --bs-nav-tabs-link-active-color: var(--app-text);
  --bs-nav-tabs-link-active-bg: var(--app-surface);
  --bs-nav-tabs-link-active-border-color: var(--app-border);
}

[data-theme="dark"] .context-header {
  color: var(--app-text);
  background: rgba(35, 29, 25, 0.94);
  border-color: rgba(241, 195, 143, 0.2);
}

[data-theme="dark"] .context-header .eyebrow {
  color: #dfc6aa;
}

[data-theme="dark"] .context-title strong,
[data-theme="dark"] .context-title strong span {
  color: #fff0df;
}

[data-theme="dark"] .context-nav a {
  color: #f1dcc4;
  background: rgba(241, 195, 143, 0.1);
  border-color: rgba(241, 195, 143, 0.28);
}

[data-theme="dark"] .context-nav a:hover,
[data-theme="dark"] .context-nav a:focus {
  color: #21160f;
  background: #f1c38f;
  border-color: #ffd5a6;
}

[data-theme="dark"] .pw-project-nav {
  color: var(--app-text);
  border-color: rgba(241, 195, 143, 0.18);
  background:
    linear-gradient(135deg, rgba(42, 35, 30, 0.96), rgba(58, 42, 32, 0.58)),
    var(--app-surface);
  box-shadow: var(--plotline-shadow-subtle);
}

[data-theme="dark"] .pw-project-nav__label {
  color: #dfc6aa;
}

[data-theme="dark"] .pw-character-nav {
  border-bottom-color: rgba(241, 195, 143, 0.16);
}

[data-theme="dark"] .pw-project-nav__link,
[data-theme="dark"] .pw-character-nav__link {
  color: #f1dcc4;
  border-color: rgba(241, 195, 143, 0.26);
  background: rgba(241, 195, 143, 0.1);
  box-shadow: none;
}

[data-theme="dark"] .pw-project-nav__link:hover,
[data-theme="dark"] .pw-project-nav__link:focus,
[data-theme="dark"] .pw-character-nav__link:hover,
[data-theme="dark"] .pw-character-nav__link:focus {
  color: #21160f;
  border-color: #ffd5a6;
  background: #f1c38f;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .pw-project-nav__link.active,
[data-theme="dark"] .pw-character-nav__link.active {
  color: #21160f;
  border-color: #ffd5a6;
  background: linear-gradient(180deg, #f1c38f, var(--plotline-accent));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .pw-actions__toggle {
  --bs-btn-color: #f1dcc4;
  --bs-btn-bg: rgba(241, 195, 143, 0.1);
  --bs-btn-border-color: rgba(241, 195, 143, 0.3);
  --bs-btn-hover-color: #21160f;
  --bs-btn-hover-bg: #f1c38f;
  --bs-btn-hover-border-color: #ffd5a6;
  --bs-btn-active-color: #21160f;
  --bs-btn-active-bg: var(--plotline-accent-dark);
  --bs-btn-active-border-color: #ffd5a6;
}

[data-theme="dark"] .pw-actions .dropdown-menu {
  --bs-dropdown-color: var(--app-text);
  --bs-dropdown-bg: var(--app-surface-alt);
  --bs-dropdown-border-color: rgba(241, 195, 143, 0.22);
  --bs-dropdown-link-color: var(--app-text);
  --bs-dropdown-link-hover-color: #21160f;
  --bs-dropdown-link-hover-bg: #f1c38f;
  --bs-dropdown-divider-bg: rgba(241, 195, 143, 0.18);
}

[data-theme="dark"] .pw-actions .dropdown-item.text-danger {
  color: #ffb2aa !important;
}

[data-theme="dark"] .project-tabs {
  border-color: rgba(241, 195, 143, 0.18);
  background: rgba(35, 29, 25, 0.88);
}

[data-theme="dark"] .project-tabs .nav-link {
  color: #ead8c4;
}

[data-theme="dark"] .project-tabs .nav-link:hover,
[data-theme="dark"] .project-tabs .nav-link:focus {
  color: #ffd5a6;
  background: rgba(241, 195, 143, 0.12);
}

[data-theme="dark"] .project-tabs .nav-link.active {
  color: #21160f;
  background: linear-gradient(180deg, #f1c38f, var(--plotline-accent));
}

[data-theme="dark"] .project-card {
  color: var(--app-text);
  border-color: var(--app-border);
  background: var(--app-surface);
}

[data-theme="dark"] .project-card:hover {
  border-color: rgba(241, 195, 143, 0.34);
}

[data-theme="dark"] .project-card__visual {
  background:
    radial-gradient(circle at 28% 24%, rgba(241, 195, 143, 0.22), transparent 11rem),
    linear-gradient(135deg, rgba(58, 42, 32, 0.96), rgba(33, 56, 61, 0.72));
}

[data-theme="dark"] .project-card__heading h2,
[data-theme="dark"] .project-card__heading h2 a {
  color: var(--app-text);
}

[data-theme="dark"] .project-card__description {
  color: var(--app-text-muted);
}

[data-theme="dark"] .project-card__stats span {
  color: #ead8c4;
  border-color: rgba(231, 214, 190, 0.2);
  background: rgba(231, 214, 190, 0.08);
}

[data-theme="dark"] .project-card__stats strong {
  color: #ffd5a6;
}

[data-theme="dark"] .project-card__actions {
  border-top-color: rgba(231, 214, 190, 0.14);
}

[data-theme="dark"] .project-cover-stack__cover {
  border-color: rgba(42, 35, 30, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .project-cover-fallback {
  color: #21160f;
  border-color: rgba(241, 195, 143, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 244, 232, 0.3), transparent 32%),
    linear-gradient(135deg, #f1c38f, var(--plotline-accent));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .character-gallery-upload,
[data-theme="dark"] .character-relationship-edit-form,
[data-theme="dark"] .character-gallery-card,
[data-theme="dark"] .character-avatar-crop-stage,
[data-theme="dark"] .character-avatar-preview {
  color: var(--app-text);
  border-color: var(--app-border);
  background: rgba(42, 35, 30, 0.9);
}

[data-theme="dark"] .character-gallery-card__actions {
  border-top-color: rgba(231, 214, 190, 0.14);
}

[data-theme="dark"] .character-gallery-card > img,
[data-theme="dark"] .character-avatar-crop-stage,
[data-theme="dark"] .character-avatar-preview {
  background: #211b17;
}

[data-theme="dark"] .timeline-filter,
[data-theme="dark"] .workspace-heading .button-row,
[data-theme="dark"] .timeline-control-panel {
  color: var(--app-text);
}

[data-theme="dark"] .timeline-filter .form-select,
[data-theme="dark"] .timeline-control-panel .form-control,
[data-theme="dark"] .timeline-control-panel .form-select,
[data-theme="dark"] .timeline-control-select .form-select {
  color: #fff0df;
  background-color: #251d18;
  border-color: rgba(241, 195, 143, 0.3);
}

[data-theme="dark"] .timeline-control-select,
[data-theme="dark"] .timeline-control-panel .form-label,
[data-theme="dark"] .timeline-filter-checks,
[data-theme="dark"] .timeline-visibility-panel label,
[data-theme="dark"] .timeline-preset-panel,
[data-theme="dark"] .preset-chip,
[data-theme="dark"] .metric-shape-intro,
[data-theme="dark"] .metric-raw-details summary {
  color: #dfc6aa;
}

[data-theme="dark"] .timeline-filter-drawer summary,
[data-theme="dark"] .timeline-control-group summary,
[data-theme="dark"] .timeline-drag-palette summary {
  color: #ffe2bd;
  background: rgba(241, 195, 143, 0.1);
}

[data-theme="dark"] .timeline-filter-drawer[open] summary,
[data-theme="dark"] .timeline-control-group[open] summary,
[data-theme="dark"] .timeline-drag-palette[open] summary {
  color: #fff4e8;
  background: rgba(241, 195, 143, 0.16);
}

[data-theme="dark"] .timeline-filter-drawer summary::after,
[data-theme="dark"] .timeline-control-group summary::after,
[data-theme="dark"] .timeline-drag-palette summary::after {
  color: #f1c38f;
}

[data-theme="dark"] .timeline-visibility-panel label,
[data-theme="dark"] .preset-chip {
  background: rgba(241, 195, 143, 0.1);
  border-color: rgba(241, 195, 143, 0.24);
}

[data-theme="dark"] .timeline-visibility-panel label:has(input:checked),
[data-theme="dark"] .preset-chip:hover {
  color: #fff0df;
  background: rgba(241, 195, 143, 0.18);
  border-color: rgba(241, 195, 143, 0.38);
}

[data-theme="dark"] .metric-toggle-pill {
  color: #f1dcc4;
  background: rgba(241, 195, 143, 0.1);
  border-color: rgba(241, 195, 143, 0.24);
}

[data-theme="dark"] .metric-toggle-pill::before {
  border: 1px solid rgba(255, 244, 232, 0.7);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .metric-toggle-pill:has(input:checked) {
  color: #fff4e8;
  background: rgba(241, 195, 143, 0.18);
  border-color: rgba(241, 195, 143, 0.42);
}

[data-theme="dark"] .metric-toggle-pill:hover,
[data-theme="dark"] .metric-toggle-pill:focus-within {
  color: #ffffff;
  border-color: rgba(255, 213, 166, 0.58);
}

[data-theme="dark"] .character-marker,
[data-theme="dark"] .character-appearance-pill {
  color: #24160d;
  background: #ffdca6;
  border-color: #fff0c9;
  box-shadow: 0 0 0 1px rgba(36, 22, 13, 0.32), 0 4px 10px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .character-marker:hover,
[data-theme="dark"] .character-appearance-pill:hover {
  color: #160d07;
  background: #fff0c9;
  border-color: #fff8df;
}

[data-theme="dark"] .alert-info {
  --bs-alert-color: #c7e5ea;
  --bs-alert-bg: #142e34;
  --bs-alert-border-color: rgba(120, 185, 194, 0.34);
  color: var(--bs-alert-color);
  background: var(--bs-alert-bg);
  border-color: var(--bs-alert-border-color);
}

[data-theme="dark"] .alert-success {
  --bs-alert-color: #c8e7ce;
  --bs-alert-bg: #1b321f;
  --bs-alert-border-color: rgba(145, 201, 154, 0.32);
  color: var(--bs-alert-color);
  background: var(--bs-alert-bg);
  border-color: var(--bs-alert-border-color);
}

[data-theme="dark"] .alert-warning,
[data-theme="dark"] .validation-summary-errors {
  --bs-alert-color: #f4d9a9;
  --bs-alert-bg: #352514;
  --bs-alert-border-color: rgba(224, 173, 101, 0.34);
  color: var(--bs-alert-color);
  background: var(--bs-alert-bg);
  border-color: var(--bs-alert-border-color);
}

[data-theme="dark"] .alert-danger {
  --bs-alert-color: #f0b8b2;
  --bs-alert-bg: #371b18;
  --bs-alert-border-color: rgba(238, 142, 131, 0.34);
  color: var(--bs-alert-color);
  background: var(--bs-alert-bg);
  border-color: var(--bs-alert-border-color);
}

[data-theme="dark"] .text-danger,
[data-theme="dark"] .field-validation-error,
[data-theme="dark"] .validation-summary-errors,
[data-theme="dark"] .validation-summary-errors li {
  color: #e7a09a !important;
}

[data-theme="dark"] .popover,
.popover[data-theme="dark"],
.popover.theme-audit-dark-popover {
  --bs-popover-bg: var(--app-surface-alt);
  --bs-popover-border-color: rgba(231, 214, 190, 0.18);
  --bs-popover-header-bg: rgba(241, 195, 143, 0.08);
  --bs-popover-header-color: #fff0df;
  --bs-popover-body-color: var(--app-text);
  color: var(--app-text);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .popover .popover-arrow::before,
.popover[data-theme="dark"] .popover-arrow::before,
.popover.theme-audit-dark-popover .popover-arrow::before {
  border-color: var(--bs-popover-border-color);
}

[data-theme="dark"] .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after,
[data-theme="dark"] .bs-popover-top > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-top > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-top > .popover-arrow::after {
  border-top-color: var(--bs-popover-bg);
}

[data-theme="dark"] .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after,
[data-theme="dark"] .bs-popover-end > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-end > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-end > .popover-arrow::after {
  border-right-color: var(--bs-popover-bg);
}

[data-theme="dark"] .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after,
[data-theme="dark"] .bs-popover-bottom > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-bottom > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-bottom > .popover-arrow::after {
  border-bottom-color: var(--bs-popover-bg);
}

[data-theme="dark"] .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after,
[data-theme="dark"] .bs-popover-start > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after,
.popover[data-theme="dark"].bs-popover-start > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after,
.popover.theme-audit-dark-popover.bs-popover-start > .popover-arrow::after {
  border-left-color: var(--bs-popover-bg);
}

[data-theme="dark"] .plotline-help-popover .popover-header,
.popover[data-theme="dark"] .popover-header,
.popover.theme-audit-dark-popover .popover-header {
  color: #fff0df;
  background: rgba(241, 195, 143, 0.08);
  border-bottom-color: rgba(231, 214, 190, 0.16);
}

[data-theme="dark"] .plotline-help-more,
.popover[data-theme="dark"] .plotline-help-more,
.popover.theme-audit-dark-popover .plotline-help-more,
[data-theme="dark"] .popover a,
.popover[data-theme="dark"] a,
.popover.theme-audit-dark-popover a {
  color: var(--app-link);
}

[data-theme="dark"] .plotline-help-more:hover,
.popover[data-theme="dark"] .plotline-help-more:hover,
.popover.theme-audit-dark-popover .plotline-help-more:hover,
[data-theme="dark"] .popover a:hover,
.popover[data-theme="dark"] a:hover,
.popover.theme-audit-dark-popover a:hover {
  color: #ffd5a6;
}

[data-theme="dark"] .accordion {
  --bs-accordion-color: var(--app-text);
  --bs-accordion-bg: var(--app-surface);
  --bs-accordion-border-color: rgba(231, 214, 190, 0.16);
  --bs-accordion-btn-color: #f1dcc4;
  --bs-accordion-btn-bg: #211b17;
  --bs-accordion-active-color: #fff0df;
  --bs-accordion-active-bg: rgba(212, 154, 98, 0.13);
  --bs-accordion-btn-focus-border-color: rgba(241, 195, 143, 0.42);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(212, 154, 98, 0.18);
  --bs-accordion-icon-color: #f1dcc4;
  --bs-accordion-icon-active-color: #fff0df;
}

[data-theme="dark"] .accordion-button::after {
  filter: invert(91%) sepia(12%) saturate(676%) hue-rotate(340deg) brightness(103%) contrast(89%);
}

[data-theme="dark"] .pagination {
  --bs-pagination-color: #f1dcc4;
  --bs-pagination-bg: #211b17;
  --bs-pagination-border-color: rgba(231, 214, 190, 0.18);
  --bs-pagination-hover-color: #ffd5a6;
  --bs-pagination-hover-bg: rgba(212, 154, 98, 0.12);
  --bs-pagination-hover-border-color: rgba(241, 195, 143, 0.34);
  --bs-pagination-focus-color: #ffd5a6;
  --bs-pagination-focus-bg: rgba(212, 154, 98, 0.14);
  --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(212, 154, 98, 0.18);
  --bs-pagination-active-color: #21160f;
  --bs-pagination-active-bg: #d49a62;
  --bs-pagination-active-border-color: #d49a62;
  --bs-pagination-disabled-color: #8f8172;
  --bs-pagination-disabled-bg: rgba(35, 29, 25, 0.72);
  --bs-pagination-disabled-border-color: rgba(231, 214, 190, 0.11);
}

.plotline-help-layout {
  --help-drawer-width: 25%;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  transition: gap 0.18s ease;
}

.plotline-help-main {
  flex: 1 1 auto;
  min-width: 0;
  transition: flex-basis 0.18s ease;
}

.plotline-help-splitter,
.plotline-help-drawer {
  display: none;
}

.plotline-help-layout.help-open .plotline-help-splitter {
  display: block;
  flex: 0 0 8px;
  cursor: col-resize;
  background: linear-gradient(90deg, transparent, rgba(107, 114, 128, 0.22), transparent);
}

.plotline-help-layout.help-open .plotline-help-drawer {
  display: block;
  flex: 0 0 clamp(20%, var(--help-drawer-width), 50%);
  min-width: 20%;
  max-width: 50%;
  border-left: 1px solid rgba(107, 114, 128, 0.22);
  background: rgba(255, 253, 248, 0.96);
  transition: flex-basis 0.18s ease;
}

.plotline-help-layout.help-collapsed .plotline-help-splitter {
  display: none;
}

.plotline-help-layout.help-collapsed .plotline-help-drawer {
  flex-basis: 2.35rem;
  min-width: 2.35rem;
  max-width: 2.35rem;
}

.plotline-help-layout.help-collapsed .plotline-help-drawer-panel {
  display: none;
}

.plotline-help-collapsed-strip {
  display: none;
}

.plotline-help-layout.help-collapsed .plotline-help-collapsed-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  min-height: calc(100vh - 5rem);
  color: #5f6875;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  cursor: pointer;
}

.plotline-help-drawer-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 1rem);
}

.plotline-help-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid rgba(107, 114, 128, 0.18);
}

.plotline-help-drawer-content {
  min-height: 12rem;
  padding: 1rem;
  overflow: auto;
}

.help-drawer-article h2 {
  margin-bottom: 0.5rem;
}

.help-markdown-body {
  display: grid;
  gap: 0.75rem;
}

.help-markdown-body h1,
.help-markdown-body h2,
.help-markdown-body h3,
.help-markdown-body h4 {
  margin: 0.5rem 0 0;
}

.help-markdown-body p,
.help-markdown-body ul {
  margin-bottom: 0;
}

.help-article-image {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(107, 114, 128, 0.18);
  border-radius: 0.45rem;
}

.help-related-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(107, 114, 128, 0.18);
}

.help-related-section button {
  padding: 0;
  color: #2f6f63;
  background: none;
  border: 0;
  font-weight: 700;
  text-align: left;
}

.help-markdown-body .help-markdown-table {
  margin-bottom: 0;
}

.help-resizing {
  cursor: col-resize;
  user-select: none;
}

.plotline-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.35rem;
  padding: 0;
  color: #5f6875;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  background: transparent;
  border: 1px solid rgba(95, 104, 117, 0.42);
  border-radius: 999px;
  vertical-align: text-top;
}

.plotline-help-icon-wrapper {
  display: inline-flex;
  vertical-align: text-top;
}

.plotline-help-icon-wrapper-inline .plotline-help-icon {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  font-size: 0.68rem;
}

.plotline-help-icon:hover,
.plotline-help-icon:focus {
  color: #2f6f63;
  border-color: #2f6f63;
  outline: none;
}

.plotline-help-popover {
  max-width: 350px;
}

.plotline-help-popover .popover-header {
  font-weight: 800;
}

.plotline-help-more {
  font-weight: 700;
  text-decoration: none;
}

[data-theme="dark"] .plotline-help-icon {
  color: #d8d0c4;
  border-color: rgba(216, 208, 196, 0.45);
}

[data-theme="dark"] .plotline-help-icon:hover,
[data-theme="dark"] .plotline-help-icon:focus {
  color: #f1c38f;
  border-color: #f1c38f;
}

[data-theme="dark"] .plotline-help-layout.help-open .plotline-help-drawer {
  border-left-color: rgba(255, 255, 255, 0.12);
  background: rgba(22, 22, 27, 0.97);
}

[data-theme="dark"] .plotline-help-drawer-header,
[data-theme="dark"] .help-related-section {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .plotline-help-collapsed-strip {
  color: #d8d0c4;
}

.relationship-map-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.relationship-map-check {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 2rem;
  margin: 0;
  white-space: nowrap;
}

.relationship-map-legend {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 0.9rem 1.2rem;
  align-items: center;
  margin: 0 0 1rem;
}

.relationship-map-legend h2 {
  margin: 0;
  font-size: 1rem;
}

.relationship-map-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: center;
}

.relationship-map-legend-item {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.28rem 0.45rem;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 650;
}

.relationship-map-legend-line {
  display: inline-block;
  width: 2.15rem;
  height: 0;
  border-top: 4px solid currentColor;
  border-radius: 999px;
}

.relationship-map-detail-badges .status-pill,
.relationship-map-list-item .status-pill {
  border: 1px solid transparent;
}

.relationship-map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: stretch;
}

.relationship-map-canvas {
  min-height: 660px;
  overflow: hidden;
}

.relationship-map-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(107, 114, 128, 0.12);
}

.relationship-map-graph {
  width: 100%;
  min-height: 620px;
  border: 1px solid rgba(107, 114, 128, 0.16);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(196, 124, 44, 0.08), transparent 28rem),
    linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(248, 250, 252, 0.86));
}

.relationship-map-details {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.relationship-map-detail-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.relationship-map-detail-heading h2 {
  margin-bottom: 0;
}

.relationship-map-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0.8rem;
}

.relationship-map-detail-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.25rem 0.75rem;
  margin: 1rem 0;
}

.relationship-map-detail-list dt {
  color: var(--muted-text, #667085);
  font-weight: 600;
}

.relationship-map-detail-list dd {
  margin: 0;
}

.relationship-map-history {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.1rem;
}

.relationship-map-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem;
}

.relationship-map-list-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  text-align: left;
  color: inherit;
  background: var(--surface, #fff);
  border: 1px solid rgba(107, 114, 128, 0.22);
  border-radius: 0.6rem;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.06);
}

.relationship-map-list-item:hover,
.relationship-map-list-item:focus,
.relationship-map-list-item.is-selected {
  border-color: #c47c2c;
  outline: none;
}

.relationship-category-family {
  color: #7c3f12;
  border-color: #d89a5e;
  background: #fff1df;
}

.relationship-category-friendship {
  color: #14532d;
  border-color: #7cc69a;
  background: #e7f8ed;
}

.relationship-category-romantic {
  color: #831843;
  border-color: #efa3c1;
  background: #fde7f0;
}

.relationship-category-hostile {
  color: #7f1d1d;
  border-color: #ee8f8f;
  background: #fee6e6;
}

.relationship-category-professional {
  color: #1e3a8a;
  border-color: #93b4ef;
  background: #e8f0ff;
}

.relationship-category-other {
  color: #374151;
  border-color: #bac2cf;
  background: #f2f4f7;
}

[data-theme="dark"] .relationship-map-list-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .relationship-map-graph {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 20% 20%, rgba(241, 195, 143, 0.08), transparent 28rem),
    linear-gradient(180deg, rgba(33, 32, 38, 0.96), rgba(22, 22, 27, 0.92));
}

[data-theme="dark"] .relationship-map-toolbar {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .relationship-category-family {
  color: #ffd2a5;
  background: rgba(184, 101, 34, 0.17);
  border-color: rgba(255, 210, 165, 0.3);
}

[data-theme="dark"] .relationship-category-friendship {
  color: #a8e8bf;
  background: rgba(47, 158, 95, 0.16);
  border-color: rgba(168, 232, 191, 0.3);
}

[data-theme="dark"] .relationship-category-romantic {
  color: #f8b5cf;
  background: rgba(217, 70, 127, 0.16);
  border-color: rgba(248, 181, 207, 0.3);
}

[data-theme="dark"] .relationship-category-hostile {
  color: #ffb4b4;
  background: rgba(220, 63, 63, 0.16);
  border-color: rgba(255, 180, 180, 0.3);
}

[data-theme="dark"] .relationship-category-professional {
  color: #b7cdf7;
  background: rgba(79, 127, 216, 0.16);
  border-color: rgba(183, 205, 247, 0.3);
}

[data-theme="dark"] .relationship-category-other {
  color: #d0d6df;
  background: rgba(122, 135, 150, 0.15);
  border-color: rgba(208, 214, 223, 0.28);
}

/* Premium marketing homepage */
.marketing-shell {
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.marketing-shell main {
  padding-bottom: 0 !important;
}

.marketing-home {
  --marketing-navy: #1f2a44;
  --marketing-gold: #d4a574;
  --marketing-cream: #faf8f5;
  --marketing-offwhite: #fcfbf9;
  --marketing-ink: #201a16;
  --marketing-muted: #6f655c;
  --marketing-rose: #9f5f55;
  --marketing-sage: #5f786c;
  --marketing-line: rgba(31, 42, 68, 0.12);
  --marketing-shadow: 0 28px 70px rgba(31, 42, 68, 0.15);
  overflow: hidden;
  margin-top: -1rem;
  color: var(--marketing-ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(212, 165, 116, 0.2), transparent 26rem),
    linear-gradient(180deg, var(--marketing-cream) 0%, var(--marketing-offwhite) 42%, #f6efe6 100%);
}

.marketing-container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.marketing-eyebrow {
  margin: 0 0 0.8rem;
  color: #8b612e;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marketing-home h1,
.marketing-home h2,
.marketing-home h3 {
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-wrap: balance;
}

.marketing-home h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.35rem);
  line-height: 0.95;
}

.marketing-home h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  line-height: 1.02;
}

.marketing-home h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.marketing-lead,
.problem-copy p,
.founder-story p,
.final-cta p,
.section-heading p {
  color: var(--marketing-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
}

.marketing-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.marketing-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 54%;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(31, 42, 68, 0.08), transparent 42%),
    radial-gradient(circle at 12% 20%, rgba(212, 165, 116, 0.22), transparent 24rem);
}

.marketing-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(440px, 1.14fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.marketing-hero__copy {
  display: grid;
  gap: 1.35rem;
  align-content: center;
}

.marketing-lead {
  max-width: 42rem;
  margin: 0;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.marketing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.marketing-btn:hover,
.marketing-btn:focus {
  transform: translateY(-1px);
}

.marketing-btn--primary {
  color: #fffaf2;
  background: linear-gradient(135deg, var(--marketing-navy), #26375e);
  box-shadow: 0 16px 32px rgba(31, 42, 68, 0.22);
}

.marketing-btn--primary:hover,
.marketing-btn--primary:focus {
  color: #fffaf2;
  box-shadow: 0 20px 42px rgba(31, 42, 68, 0.28);
}

.marketing-btn--secondary {
  color: var(--marketing-navy);
  border-color: rgba(31, 42, 68, 0.18);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.marketing-btn--secondary:hover,
.marketing-btn--secondary:focus {
  color: var(--marketing-navy);
  border-color: rgba(31, 42, 68, 0.3);
  background: #fffdf9;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
}

.hero-proof div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  max-width: 18rem;
}

.hero-proof dt {
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
}

.hero-proof dd {
  margin: 0;
  color: var(--marketing-muted);
  font-weight: 650;
  line-height: 1.25;
}

.browser-frame {
  border: 1px solid rgba(31, 42, 68, 0.13);
  border-radius: 22px;
  background: rgba(252, 251, 249, 0.72);
  box-shadow: var(--marketing-shadow);
  overflow: hidden;
}

.hero-product {
  transform: rotate(1deg);
  animation: productFloat 7s ease-in-out infinite;
}

.home-image-card {
  border: 1px solid rgba(31, 42, 68, 0.13);
  border-radius: 24px;
  background: rgba(252, 251, 249, 0.72);
  box-shadow: var(--marketing-shadow);
  overflow: hidden;
}

.home-image-card img,
.home-feature-image {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

.home-hero-image img {
  background: #f8f1e7;
}

@media (min-width: 1061px) {
  .marketing-hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 5.5rem);
    padding-top: clamp(1.5rem, 3vw, 2.75rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.75rem);
  }

  .home-hero-image {
    align-self: center;
    margin-top: clamp(-8rem, -8vw, -4rem);
  }
}

.writer-workspace {
  position: relative;
  min-height: 560px;
  border: 1px solid rgba(31, 42, 68, 0.13);
  border-radius: 24px;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.9), rgba(248, 239, 227, 0.76)),
    url("/images/home/hero-writing-workspace.webp") center / cover no-repeat,
    #f8f1e7;
  box-shadow: var(--marketing-shadow);
  overflow: hidden;
}

.writer-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(212, 165, 116, 0.2), transparent 18rem),
    radial-gradient(circle at 92% 82%, rgba(95, 120, 108, 0.18), transparent 18rem);
  pointer-events: none;
}

.workspace-manuscript,
.workspace-card,
.workspace-progress {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(31, 42, 68, 0.11);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 18px 42px rgba(31, 42, 68, 0.12);
}

.workspace-manuscript {
  left: 7%;
  top: 8%;
  width: min(68%, 460px);
  min-height: 370px;
  border-radius: 16px;
  padding: clamp(1.25rem, 2vw, 1.7rem);
}

.workspace-label,
.workspace-card span {
  margin: 0;
  color: #8b612e;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.workspace-manuscript h2 {
  margin: 0.45rem 0 1.2rem;
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
}

.workspace-manuscript p:not(.workspace-label) {
  margin: 0 0 1rem;
  color: #4f4b45;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.75;
}

.workspace-card {
  display: grid;
  gap: 0.35rem;
  width: min(45%, 260px);
  border-radius: 16px;
  padding: 1rem;
}

.workspace-card strong {
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.15;
}

.workspace-card small {
  color: var(--marketing-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.workspace-character {
  right: 6%;
  top: 13%;
  border-left: 5px solid var(--marketing-sage);
}

.workspace-thread {
  right: 11%;
  top: 40%;
  border-left: 5px solid var(--marketing-gold);
}

.workspace-warning {
  right: 5%;
  bottom: 18%;
  border-left: 5px solid var(--marketing-rose);
}

.workspace-progress {
  top: auto;
  left: 13%;
  right: 10%;
  bottom: 4%;
  display: flex;
  gap: 0.55rem;
  height: 3.75rem;
  border-radius: 999px;
  padding: 0.65rem;
}

.workspace-progress span {
  flex: 1 1 0;
  border-radius: 999px;
  padding: 0.58rem 0.7rem;
  color: #2a2119;
  background: rgba(212, 165, 116, 0.22);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

.workspace-progress span:nth-child(2) {
  background: rgba(95, 120, 108, 0.2);
}

.workspace-progress span:nth-child(3) {
  color: #fffaf2;
  background: var(--marketing-navy);
}

.browser-frame__chrome {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  height: 2.55rem;
  border-bottom: 1px solid rgba(31, 42, 68, 0.1);
  padding: 0 1rem;
  background: linear-gradient(180deg, #fffdf9, #f5efe7);
}

.browser-frame__chrome span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: #d8cabf;
}

.browser-frame__chrome span:nth-child(2) {
  background: var(--marketing-gold);
}

.browser-frame__chrome span:nth-child(3) {
  background: var(--marketing-sage);
}

.product-mockup {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 470px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(250, 248, 245, 0.92)),
    var(--marketing-offwhite);
}

.product-sidebar {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  border-right: 1px solid rgba(31, 42, 68, 0.1);
  padding: 1.1rem;
  background: rgba(31, 42, 68, 0.96);
  color: rgba(255, 250, 242, 0.72);
}

.product-sidebar strong {
  margin-bottom: 0.8rem;
  color: #fffaf2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.product-sidebar span {
  border-radius: 999px;
  padding: 0.5rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 750;
}

.product-sidebar .is-active {
  color: #241b12;
  background: var(--marketing-gold);
}

.product-main {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: clamp(1rem, 2vw, 1.45rem);
}

.product-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.product-topline small,
.mock-label {
  color: var(--marketing-muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-topline h2 {
  margin-top: 0.25rem;
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
}

.product-topline > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  color: #294a35;
  background: #e5f1e8;
  font-size: 0.78rem;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 0.85rem;
}

.product-panel {
  display: grid;
  gap: 0.75rem;
  min-height: 150px;
  border: 1px solid rgba(31, 42, 68, 0.1);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 16px 30px rgba(31, 42, 68, 0.07);
}

.product-panel--wide {
  grid-row: span 2;
}

.product-panel p {
  margin: 0;
  color: var(--marketing-muted);
}

.mock-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
  min-height: 220px;
  padding-top: 1rem;
}

.mock-chart span {
  height: var(--height);
  min-height: 2.2rem;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--marketing-gold), #8f5d3b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.thread-list {
  display: grid;
  gap: 0.55rem;
}

.thread-list span {
  border-left: 4px solid var(--marketing-gold);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  color: var(--marketing-navy);
  background: rgba(212, 165, 116, 0.13);
  font-weight: 760;
}

.problem-intro {
  padding: clamp(3rem, 7vw, 6rem) 0 1rem;
  text-align: center;
}

.problem-intro h2,
.section-heading h2 {
  max-width: 850px;
  margin-inline: auto;
}

.problem-stack {
  padding: 1rem 0 clamp(4rem, 8vw, 7rem);
}

.problem-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  min-height: 460px;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.problem-section--reverse .problem-visual {
  order: 2;
}

.problem-copy {
  display: grid;
  gap: 1rem;
}

.problem-copy p {
  max-width: 36rem;
  margin: 0;
}

.problem-visual {
  position: relative;
  min-height: 320px;
  border: 1px solid rgba(31, 42, 68, 0.11);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(242, 230, 215, 0.88)),
    var(--marketing-offwhite);
  box-shadow: 0 22px 56px rgba(31, 42, 68, 0.1);
  overflow: hidden;
}

.problem-visual--image {
  display: grid;
  align-items: center;
  min-height: 0;
  padding: 0.75rem;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(242, 230, 215, 0.88)),
    var(--marketing-offwhite);
}

.problem-visual--image::before,
.problem-visual--image::after {
  display: none;
}

.problem-visual--image .home-feature-image {
  grid-column: 1 / -1;
  justify-self: center;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(31, 42, 68, 0.12);
}

.visual-plot {
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.92), rgba(242, 232, 217, 0.82)),
    url("/images/home/plot-thread-map.webp") center / cover no-repeat,
    #f2e8d9;
}

.visual-warning {
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.94), rgba(242, 230, 215, 0.84)),
    url("/images/home/manuscript-continuity.webp") center / cover no-repeat,
    #f8f1e7;
}

.visual-relationships {
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.92), rgba(232, 238, 229, 0.82)),
    url("/images/home/character-relationship-board.webp") center / cover no-repeat,
    #eef3eb;
}

.visual-flow {
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.92), rgba(242, 230, 215, 0.82)),
    url("/images/home/story-timeline.webp") center / cover no-repeat,
    #f8f1e7;
}

.visual-series {
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.9), rgba(242, 230, 215, 0.8)),
    url("/images/home/series-dashboard.webp") center / cover no-repeat,
    #f8f1e7;
}

.visual-notes span,
.visual-docs span,
.visual-series span,
.visual-threads span,
.visual-warning span {
  position: absolute;
  border: 1px solid rgba(31, 42, 68, 0.1);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  color: var(--marketing-navy);
  background: #fffdf9;
  box-shadow: 0 14px 28px rgba(31, 42, 68, 0.08);
  font-weight: 760;
}

.visual-notes span:nth-child(1) { top: 14%; left: 12%; transform: rotate(-5deg); }
.visual-notes span:nth-child(2) { top: 28%; right: 10%; transform: rotate(4deg); }
.visual-notes span:nth-child(3) { bottom: 22%; left: 16%; transform: rotate(3deg); }
.visual-notes span:nth-child(4) { bottom: 13%; right: 18%; transform: rotate(-4deg); }

.visual-plot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  align-content: center;
  padding: 2rem;
}

.visual-plot::before {
  content: "";
  position: absolute;
  left: 11%;
  right: 11%;
  top: 50%;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(31, 42, 68, 0.16);
}

.visual-plot span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 6.5rem;
  border: 1px solid rgba(31, 42, 68, 0.1);
  border-radius: 14px;
  padding: 0.75rem;
  color: var(--marketing-navy);
  background: #fffdf9;
  box-shadow: 0 14px 28px rgba(31, 42, 68, 0.08);
  font-weight: 800;
  text-align: center;
}

.visual-plot span:nth-child(1),
.visual-threads span:nth-child(1) {
  border-top: 5px solid var(--marketing-sage);
}

.visual-plot span:nth-child(2),
.visual-threads span:nth-child(2) {
  border-top: 5px solid var(--marketing-gold);
}

.visual-plot span:nth-child(3),
.visual-threads span:nth-child(3) {
  border-top: 5px solid var(--marketing-rose);
}

.visual-plot span:nth-child(4),
.visual-threads span:nth-child(4) {
  border-top: 5px solid var(--marketing-navy);
}

.visual-warning {
  display: grid;
  gap: 0.75rem;
  align-content: center;
  padding: 2rem;
}

.visual-warning strong {
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.visual-warning span {
  position: static;
  border-left: 4px solid var(--marketing-gold);
}

.visual-next {
  display: grid;
  align-content: center;
  gap: 0.8rem;
  padding: 2rem;
}

.visual-next small {
  color: #8b612e;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.visual-next strong {
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.visual-next p {
  max-width: 22rem;
  margin: 0;
  color: var(--marketing-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.visual-next p + p {
  border-top: 1px solid rgba(31, 42, 68, 0.11);
  padding-top: 0.75rem;
}

.visual-docs span:nth-child(1) { top: 13%; left: 12%; }
.visual-docs span:nth-child(2) { top: 23%; right: 12%; }
.visual-docs span:nth-child(3) { top: 45%; left: 23%; }
.visual-docs span:nth-child(4) { bottom: 18%; left: 12%; }
.visual-docs span:nth-child(5) { bottom: 14%; right: 15%; }

.visual-relationships::before,
.visual-relationships::after {
  content: "";
  position: absolute;
  inset: 22% 18%;
  border: 2px solid rgba(31, 42, 68, 0.16);
  border-radius: 50%;
}

.visual-relationships::after {
  inset: 34% 22%;
  border-color: rgba(212, 165, 116, 0.44);
  transform: rotate(22deg);
}

.person {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border: 0.4rem solid #fffaf2;
  border-radius: 999px;
  color: #fffaf2;
  background: var(--marketing-navy);
  box-shadow: 0 16px 30px rgba(31, 42, 68, 0.18);
  font-weight: 850;
}

.person-a { top: 13%; left: 18%; }
.person-b { top: 21%; right: 18%; background: var(--marketing-rose); }
.person-c { bottom: 17%; left: 24%; background: var(--marketing-sage); }
.person-d { right: 24%; bottom: 13%; background: var(--marketing-gold); color: #2a2119; }

.relationship-label {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  color: var(--marketing-navy);
  background: #fffdf9;
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.1);
  font-size: 0.78rem;
  font-weight: 850;
}

.rel-trust { top: 23%; left: 43%; }
.rel-secret { top: 47%; right: 25%; }
.rel-threat { bottom: 33%; left: 34%; }
.rel-sister { bottom: 23%; right: 38%; }

.visual-threads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  align-content: center;
  padding: 2rem;
}

.visual-threads::before {
  content: "";
  position: absolute;
  left: 11%;
  right: 11%;
  top: 50%;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(31, 42, 68, 0.14);
}

.visual-threads span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 6.5rem;
  text-align: center;
}

.visual-series {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  align-content: center;
  padding: 2rem;
}

.visual-series span {
  position: static;
  display: grid;
  place-items: center;
  min-height: 10.5rem;
  border-radius: 12px 12px 18px 18px;
  color: #fffaf2;
  background: linear-gradient(180deg, var(--marketing-navy), #314263);
  text-align: center;
}

.visual-series span:nth-child(2) {
  background: linear-gradient(180deg, #75503a, #533424);
}

.visual-series span:nth-child(3) {
  background: linear-gradient(180deg, #5f786c, #3d564b);
}

.visual-series span:nth-child(4) {
  color: #2a2119;
  background: linear-gradient(180deg, #e1bd8e, var(--marketing-gold));
}

.visual-flow {
  display: grid;
  align-items: center;
  padding: 2rem;
}

.flow-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 8rem;
  border-bottom: 0.38rem solid var(--marketing-gold);
  border-radius: 0 0 50% 50%;
  transform: translateY(-54%);
}

.visual-flow span {
  position: absolute;
  left: var(--pos);
  bottom: 26%;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  color: var(--marketing-navy);
  background: #fffaf2;
  box-shadow: 0 12px 26px rgba(31, 42, 68, 0.1);
  font-weight: 800;
}

.social-proof {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--marketing-offwhite);
}

.section-heading {
  display: grid;
  gap: 0.7rem;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

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

.testimonial-grid figure {
  display: grid;
  align-content: space-between;
  min-height: 250px;
  margin: 0;
  border: 1px solid rgba(31, 42, 68, 0.1);
  border-radius: 18px;
  padding: clamp(1.25rem, 2.3vw, 1.75rem);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(250, 248, 245, 0.88)),
    #fff;
  box-shadow: 0 18px 42px rgba(31, 42, 68, 0.08);
}

.testimonial-grid blockquote {
  margin: 0;
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  line-height: 1.4;
}

.testimonial-grid figcaption {
  margin-top: 1.35rem;
  color: #8b612e;
  font-weight: 820;
}

.founder-story {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(212, 165, 116, 0.18), transparent 22rem),
    var(--marketing-cream);
}

.founder-story__grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.founder-mark {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 28px;
  color: #fffaf2;
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.3), transparent),
    var(--marketing-navy);
  box-shadow: var(--marketing-shadow);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6rem);
}

.founder-story h2 {
  margin-bottom: 1rem;
}

.founder-story p {
  max-width: 48rem;
  margin: 0 0 1rem;
}

.final-cta {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--marketing-navy);
}

.final-cta__inner {
  display: grid;
  justify-items: center;
  gap: 1rem;
  border: 1px solid rgba(255, 250, 242, 0.14);
  border-radius: 28px;
  padding: clamp(2.25rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 165, 116, 0.28), transparent 26rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent);
  text-align: center;
  box-shadow: 0 28px 70px rgba(10, 16, 29, 0.2);
}

.final-cta h2 {
  color: #fffaf2;
}

.final-cta p {
  max-width: 42rem;
  margin: 0 0 0.75rem;
  color: rgba(255, 250, 242, 0.78);
}

.final-cta .marketing-eyebrow {
  color: var(--marketing-gold);
}

.final-cta .marketing-btn--primary {
  color: #241b12;
  background: linear-gradient(135deg, #e3bd8e, var(--marketing-gold));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.final-cta .marketing-btn--primary:hover,
.final-cta .marketing-btn--primary:focus {
  color: #241b12;
}

.pricing-page {
  margin-top: -1rem;
}

.pricing-hero {
  padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(circle at 18% 20%, rgba(212, 165, 116, 0.2), transparent 24rem),
    linear-gradient(180deg, var(--marketing-cream), var(--marketing-offwhite));
}

.pricing-hero__inner {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  text-align: center;
}

.pricing-hero h1 {
  max-width: 12ch;
}

.pricing-hero .marketing-lead {
  max-width: 46rem;
}

.pricing-message {
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin: 1rem 0 0;
  color: var(--marketing-navy);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 14px 32px rgba(31, 42, 68, 0.08);
  font-weight: 750;
}

.pricing-plans,
.pricing-compare,
.pricing-faq {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.pricing-plans {
  background: var(--marketing-offwhite);
}

.pricing-compare {
  background:
    radial-gradient(circle at 90% 20%, rgba(95, 120, 108, 0.12), transparent 24rem),
    var(--marketing-cream);
}

.pricing-faq {
  background: var(--marketing-offwhite);
}

.pricing-empty {
  border: 1px solid rgba(31, 42, 68, 0.11);
  border-radius: 22px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 18px 42px rgba(31, 42, 68, 0.08);
  text-align: center;
}

.pricing-empty p {
  margin: 0.75rem auto 0;
  max-width: 42rem;
  color: var(--marketing-muted);
  line-height: 1.7;
}

.pricing-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: grid;
  gap: 1.25rem;
  align-content: start;
  min-height: 100%;
  border: 1px solid rgba(31, 42, 68, 0.11);
  border-radius: 22px;
  padding: clamp(1.2rem, 2.4vw, 1.65rem);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(250, 248, 245, 0.9)),
    #fff;
  box-shadow: 0 18px 42px rgba(31, 42, 68, 0.08);
}

.pricing-card::before {
  content: "";
  display: block;
  height: 1.9rem;
}

.pricing-card--featured {
  border-color: rgba(212, 165, 116, 0.7);
  box-shadow: 0 26px 58px rgba(31, 42, 68, 0.13);
}

.pricing-card--trial {
  border-color: rgba(95, 120, 108, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(235, 241, 237, 0.9)),
    #fff;
  box-shadow: 0 24px 54px rgba(31, 42, 68, 0.11);
  min-width: 0;
}

.pricing-card--trial .pricing-card__heading,
.pricing-card--trial .pricing-price,
.pricing-card--trial .pricing-feature-list,
.pricing-card--trial .pricing-card__actions {
  min-width: 0;
}

.pricing-badge {
  position: absolute;
  top: clamp(1.2rem, 2.4vw, 1.65rem);
  right: clamp(1.2rem, 2.4vw, 1.65rem);
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(212, 165, 116, 0.55);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  color: #634019;
  background: rgba(212, 165, 116, 0.22);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-badge--trial {
  border-color: rgba(95, 120, 108, 0.48);
  color: #314b42;
  background: rgba(95, 120, 108, 0.18);
}

.pricing-card__heading {
  display: grid;
  gap: 0.5rem;
  min-height: 6.85rem;
  align-content: start;
}

.pricing-card h3,
.comparison-grid h3,
.faq-grid h3 {
  margin: 0;
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.12;
}

.pricing-card__heading p {
  margin: 0;
  color: var(--marketing-muted);
  line-height: 1.55;
}

.pricing-price {
  display: grid;
  gap: 0.2rem;
  border-top: 1px solid rgba(31, 42, 68, 0.1);
  border-bottom: 1px solid rgba(31, 42, 68, 0.1);
  padding: 1rem 0;
}

.pricing-price strong {
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
  width: fit-content;
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 3rem);
  line-height: 1;
  white-space: nowrap;
}

.pricing-price span,
.pricing-price small {
  color: var(--marketing-muted);
  font-weight: 720;
}

.pricing-price small {
  font-size: 0.88rem;
}

.pricing-price strong small {
  color: var(--marketing-muted);
  font-family: "Segoe UI", "Aptos", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pricing-price .pricing-price__value {
  color: var(--marketing-navy);
  white-space: nowrap;
}

.pricing-price > small {
  white-space: nowrap;
}

.pricing-card--trial .pricing-price > small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.public-info-page {
  margin-top: -1rem;
}

.public-hero {
  padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(circle at 18% 20%, rgba(212, 165, 116, 0.2), transparent 24rem),
    linear-gradient(180deg, var(--marketing-cream), var(--marketing-offwhite));
}

.public-hero__inner {
  display: grid;
  justify-items: center;
  gap: 1.05rem;
  text-align: center;
}

.public-hero h1 {
  max-width: 13ch;
}

.public-hero .marketing-lead {
  max-width: 50rem;
}

.public-updated {
  margin: 0;
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: var(--marketing-muted);
  background: rgba(255, 253, 249, 0.78);
  font-weight: 760;
}

.public-content-section,
.public-mission {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.public-content-section {
  background: var(--marketing-offwhite);
}

.public-content-section--soft,
.public-mission {
  background:
    radial-gradient(circle at 90% 20%, rgba(95, 120, 108, 0.12), transparent 24rem),
    var(--marketing-cream);
}

.public-narrative,
.public-policy {
  max-width: 860px;
}

.public-narrative {
  display: grid;
  gap: 1rem;
}

.public-narrative p,
.public-policy p,
.public-policy li,
.public-card p {
  color: var(--marketing-muted);
  font-size: clamp(1rem, 1.45vw, 1.13rem);
  line-height: 1.75;
}

.public-narrative p {
  margin: 0;
}

.public-narrative strong {
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.15;
}

.public-feature-panel {
  border: 1px solid rgba(31, 42, 68, 0.11);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 4rem);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 22px 56px rgba(31, 42, 68, 0.1);
  text-align: center;
}

.public-feature-panel h2 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

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

.public-card {
  border: 1px solid rgba(31, 42, 68, 0.1);
  border-radius: 18px;
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(250, 248, 245, 0.88)),
    #fff;
  box-shadow: 0 16px 36px rgba(31, 42, 68, 0.07);
}

.public-card h2,
.public-policy h2 {
  margin: 0;
  color: var(--marketing-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
}

.public-card p {
  margin: 0.7rem 0 0;
}

.public-policy {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.1rem);
}

.public-policy section {
  border-bottom: 1px solid rgba(31, 42, 68, 0.1);
  padding-bottom: clamp(1.2rem, 2.6vw, 1.8rem);
}

.public-policy p {
  margin: 0.65rem 0 0;
}

.public-policy ul {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.public-policy a,
.public-card a {
  color: var(--marketing-navy);
  font-weight: 820;
}

.public-disclaimer {
  border: 1px solid rgba(212, 165, 116, 0.38);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(212, 165, 116, 0.13);
}

.public-disclaimer p {
  margin: 0;
  color: #6b4a22;
  font-size: 0.96rem;
  font-weight: 720;
}

.public-footer {
  border-top: 1px solid rgba(255, 250, 242, 0.12);
  background: #1f2a44;
}

.public-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.public-footer__brand {
  color: #fffaf2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.public-footer__brand:hover,
.public-footer__brand:focus {
  color: #d4a574;
}

.public-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1rem;
}

.public-footer__nav a {
  color: rgba(255, 250, 242, 0.76);
  font-size: 0.92rem;
  font-weight: 760;
  text-decoration: none;
}

.public-footer__nav a:hover,
.public-footer__nav a:focus {
  color: #d4a574;
}

.pricing-feature-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-feature-list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--marketing-navy);
  font-weight: 740;
  line-height: 1.35;
}

.pricing-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.44rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: var(--marketing-gold);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.18);
}

.pricing-card__actions {
  display: grid;
  gap: 0.7rem;
  margin-top: auto;
}

.pricing-card__actions .marketing-btn {
  width: 100%;
}

.pricing-card--trial .pricing-card__actions .marketing-btn {
  box-sizing: border-box;
  max-width: 100%;
  padding-inline: 0.95rem;
  text-align: center;
  white-space: normal;
}

.pricing-link {
  display: inline-flex;
  justify-content: center;
  color: var(--marketing-navy);
  font-weight: 820;
  text-decoration-color: rgba(31, 42, 68, 0.24);
}

.pricing-link:hover,
.pricing-link:focus {
  color: #8b612e;
}

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

.comparison-grid article,
.faq-grid article {
  border: 1px solid rgba(31, 42, 68, 0.1);
  border-radius: 18px;
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 16px 36px rgba(31, 42, 68, 0.07);
}

.comparison-grid p,
.faq-grid p {
  margin: 0.7rem 0 0;
  color: var(--marketing-muted);
  line-height: 1.7;
}

/* Phase 19A marketing refresh */
.marketing-home {
  --marketing-midnight: #071327;
  --marketing-navy: #101f3f;
  --marketing-indigo: #4655c7;
  --marketing-purple: #7c3aed;
  --marketing-purple-soft: #ede9ff;
  --marketing-gold: #f3b86b;
  --marketing-cream: #f7f8ff;
  --marketing-offwhite: #fffdf8;
  --marketing-ink: #111827;
  --marketing-muted: #5f6775;
  --marketing-rose: #b05f86;
  --marketing-sage: #4a8279;
  --marketing-line: rgba(16, 31, 63, 0.12);
  --marketing-shadow: 0 34px 90px rgba(16, 31, 63, 0.18);
  --marketing-card-shadow: 0 20px 52px rgba(16, 31, 63, 0.1);
  background:
    radial-gradient(circle at 84% 4%, rgba(124, 58, 237, 0.18), transparent 27rem),
    radial-gradient(circle at 8% 18%, rgba(243, 184, 107, 0.18), transparent 28rem),
    linear-gradient(180deg, #f8f9ff 0%, #fffdf8 36%, #eef1ff 100%);
}

.marketing-home::selection {
  color: #fff;
  background: var(--marketing-purple);
}

.marketing-eyebrow {
  color: var(--marketing-purple);
}

.marketing-home h1,
.marketing-home h2,
.marketing-home h3 {
  overflow-wrap: normal;
  word-break: normal;
}

.marketing-hero,
.features-hero,
.pricing-hero,
.public-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(243, 184, 107, 0.22), transparent 24rem),
    radial-gradient(circle at 86% 10%, rgba(124, 58, 237, 0.2), transparent 28rem),
    linear-gradient(180deg, #f8f9ff 0%, #fffdf8 100%);
}

.marketing-hero::after,
.features-hero::after,
.public-hero::after,
.pricing-hero::after,
.problem-stack::before,
.features-showcase::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.marketing-hero::after,
.features-hero::after,
.public-hero::after,
.pricing-hero::after {
  inset: auto 8% 2.5rem;
  height: 7rem;
  opacity: 0.45;
  background:
    radial-gradient(circle at 8% 50%, var(--marketing-purple) 0 4px, transparent 5px),
    radial-gradient(circle at 38% 38%, var(--marketing-gold) 0 4px, transparent 5px),
    radial-gradient(circle at 68% 58%, var(--marketing-indigo) 0 4px, transparent 5px),
    radial-gradient(circle at 94% 42%, var(--marketing-purple) 0 4px, transparent 5px),
    linear-gradient(100deg, transparent 7%, rgba(124, 58, 237, 0.3) 7.3% 38%, rgba(243, 184, 107, 0.28) 38.3% 68%, rgba(70, 85, 199, 0.24) 68.3% 94%, transparent 94.3%);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marketing-hero__copy,
.features-hero__copy {
  position: relative;
  z-index: 1;
}

.marketing-btn {
  min-width: 9rem;
  box-shadow: 0 10px 26px rgba(16, 31, 63, 0.08);
}

.marketing-btn--primary {
  border-color: rgba(124, 58, 237, 0.28);
  background: linear-gradient(135deg, var(--marketing-midnight), #182a58 58%, var(--marketing-purple));
}

.marketing-btn--primary:hover,
.marketing-btn--primary:focus {
  box-shadow: 0 22px 48px rgba(124, 58, 237, 0.26);
}

.marketing-btn--secondary {
  border-color: rgba(124, 58, 237, 0.22);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.hero-proof div,
.features-hero__highlights article,
.feature-icon-card,
.pricing-card,
.comparison-grid article,
.faq-grid article,
.public-card,
.testimonial-grid figure {
  border-color: rgba(16, 31, 63, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 255, 0.9)),
    #fff;
  box-shadow: var(--marketing-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.features-hero__highlights article:hover,
.feature-icon-card:hover,
.pricing-card:hover,
.comparison-grid article:hover,
.faq-grid article:hover,
.public-card:hover,
.testimonial-grid figure:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.24);
  box-shadow: 0 28px 68px rgba(16, 31, 63, 0.15);
}

.features-screenshot,
.home-image-card,
.problem-visual--image .home-feature-image {
  border-color: rgba(16, 31, 63, 0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f2f4ff);
  box-shadow: var(--marketing-shadow);
}

.features-screenshot img,
.home-image-card img,
.problem-visual--image .home-feature-image {
  filter: saturate(1.03) contrast(1.01);
}

.features-screenshot::before {
  background:
    radial-gradient(circle at 24px 50%, #ff7b72 0 5px, transparent 6px),
    radial-gradient(circle at 44px 50%, #f3b86b 0 5px, transparent 6px),
    radial-gradient(circle at 64px 50%, #7c3aed 0 5px, transparent 6px),
    linear-gradient(90deg, #f6f7ff, #fff);
}

.features-jump {
  background: #fffdf8;
}

.features-jump__grid a {
  border-color: rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

.features-jump__grid a:hover,
.features-jump__grid a:focus {
  border-color: rgba(124, 58, 237, 0.46);
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.12);
}

.features-section,
.pricing-plans,
.pricing-faq,
.social-proof,
.public-content-section {
  background: #fffdf8;
}

.features-section--soft,
.features-word,
.pricing-compare,
.public-content-section--soft,
.public-mission,
.founder-story {
  background:
    radial-gradient(circle at 8% 16%, rgba(124, 58, 237, 0.1), transparent 24rem),
    radial-gradient(circle at 92% 22%, rgba(243, 184, 107, 0.16), transparent 24rem),
    #f3f5ff;
}

.features-showcase,
.final-cta {
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 58, 237, 0.32), transparent 25rem),
    radial-gradient(circle at 88% 20%, rgba(243, 184, 107, 0.18), transparent 26rem),
    linear-gradient(135deg, var(--marketing-midnight), #111f40 56%, #241656);
}

.features-showcase .feature-icon-card,
.final-cta__inner {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.features-showcase .features-showcase__intro h2,
.features-showcase .feature-icon-card h3,
.final-cta .marketing-eyebrow {
  color: #f6c47d;
}

.feature-icon-card > span {
  width: 3.25rem;
  height: 3.25rem;
  color: #fff;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(135deg, var(--marketing-purple), var(--marketing-indigo));
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.2);
}

.pricing-card--featured {
  border-color: rgba(124, 58, 237, 0.38);
  box-shadow: 0 30px 74px rgba(124, 58, 237, 0.16);
}

.pricing-badge,
.public-updated {
  border-color: rgba(124, 58, 237, 0.24);
  color: #4c1d95;
  background: rgba(237, 233, 255, 0.82);
}

.pricing-feature-list li::before,
.features-bullet-list li::before {
  background: linear-gradient(135deg, var(--marketing-purple), var(--marketing-gold));
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.public-feature-panel {
  border-color: rgba(124, 58, 237, 0.16);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.12), transparent 24rem),
    rgba(255, 255, 255, 0.88);
}

.public-policy {
  max-width: 920px;
}

.public-policy section {
  border-bottom-color: rgba(16, 31, 63, 0.1);
}

.public-footer {
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, 0.28), transparent 24rem),
    var(--marketing-midnight, #071327);
}

.public-footer__brand:hover,
.public-footer__brand:focus,
.public-footer__nav a:hover,
.public-footer__nav a:focus {
  color: #f6c47d;
}

/* Public help centre: related to marketing, quiet enough for reading. */
.help-centre-shell {
  max-width: 1180px;
}

.help-centre-page {
  --help-brand: #101f3f;
  --help-purple: #7c3aed;
  --help-soft: #f3f5ff;
  --help-line: rgba(16, 31, 63, 0.12);
  max-width: 1120px;
  margin-inline: auto;
}

.help-centre-page .breadcrumb-trail {
  margin-top: 0.5rem;
}

.help-centre-hero {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--help-line);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  background:
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.12), transparent 18rem),
    linear-gradient(135deg, #fff, var(--help-soft));
  box-shadow: 0 18px 44px rgba(16, 31, 63, 0.08);
}

.help-centre-hero::after {
  content: "";
  position: absolute;
  right: clamp(1rem, 4vw, 2.4rem);
  bottom: 1.2rem;
  width: min(36%, 18rem);
  height: 0.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.34), rgba(243, 184, 107, 0.42));
}

.help-centre-hero h1 {
  color: var(--help-brand);
}

.help-search-card,
.help-section,
.help-article-card,
.help-centre-page .plain-card {
  border-color: var(--help-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(16, 31, 63, 0.07);
}

.help-centre-page .plain-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.help-centre-page .asset-card-grid .plain-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.22);
  box-shadow: 0 20px 44px rgba(16, 31, 63, 0.1);
}

.help-centre-page .btn-primary {
  --bs-btn-bg: #101f3f;
  --bs-btn-border-color: #101f3f;
  --bs-btn-hover-bg: #7c3aed;
  --bs-btn-hover-border-color: #7c3aed;
}

.help-centre-page a {
  color: #4c1d95;
}

.help-centre-page .status-pill,
.help-centre-page .soft-count {
  border-color: rgba(124, 58, 237, 0.18);
  color: #4c1d95;
  background: rgba(237, 233, 255, 0.82);
}

/* Phase 19A experimental launch-page reimagining */
.marketing-home {
  --launch-night: #040713;
  --launch-midnight: #070f24;
  --launch-blue: #0e2a66;
  --launch-electric: #8b5cf6;
  --launch-violet: #c084fc;
  --launch-gold: #ffcf72;
  --launch-coral: #ff7a90;
  --launch-paper: #fffaf0;
  --launch-ink: #07111f;
  --launch-muted: #667085;
  --launch-glass: rgba(255, 255, 255, 0.1);
  --launch-line: rgba(255, 255, 255, 0.18);
  --launch-shadow: 0 44px 120px rgba(3, 7, 18, 0.34);
  color: var(--launch-ink);
  background:
    radial-gradient(circle at 50% -8%, rgba(192, 132, 252, 0.42), transparent 34rem),
    radial-gradient(circle at 6% 20%, rgba(255, 207, 114, 0.18), transparent 31rem),
    radial-gradient(circle at 90% 18%, rgba(14, 42, 102, 0.34), transparent 38rem),
    linear-gradient(180deg, #040713 0%, #071225 32%, #f8f4ff 32.1%, #fffaf0 100%);
}

.marketing-home .marketing-eyebrow {
  color: var(--launch-gold);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
}

.marketing-home h1,
.marketing-home h2,
.marketing-home h3 {
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.marketing-home .marketing-lead {
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.08rem, 1.65vw, 1.32rem);
  line-height: 1.62;
}

.marketing-hero,
.features-hero,
.pricing-hero,
.public-about-page .public-hero,
.public-contact-page .public-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 5rem);
  padding: clamp(4rem, 7vw, 7rem) 0 clamp(5rem, 9vw, 8rem);
  color: #fffaf7;
  background:
    linear-gradient(115deg, rgba(4, 7, 19, 0.96), rgba(7, 15, 36, 0.86) 46%, rgba(42, 16, 83, 0.8)),
    radial-gradient(circle at 72% 22%, rgba(139, 92, 246, 0.58), transparent 25rem),
    radial-gradient(circle at 18% 74%, rgba(255, 207, 114, 0.18), transparent 24rem),
    #040713;
}

.marketing-hero::before,
.features-hero::before,
.pricing-hero::before,
.public-about-page .public-hero::before,
.public-contact-page .public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.72;
  background:
    linear-gradient(105deg, transparent 0 34%, rgba(255, 255, 255, 0.09) 34.2% 34.9%, transparent 35.2%),
    linear-gradient(72deg, transparent 0 56%, rgba(255, 207, 114, 0.12) 56.1% 56.8%, transparent 57%),
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 34%, rgba(255, 255, 255, 0.2) 0 1px, transparent 2px);
  background-size: auto, auto, 94px 94px, 132px 132px;
}

.marketing-hero::after,
.features-hero::after,
.pricing-hero::after,
.public-about-page .public-hero::after,
.public-contact-page .public-hero::after {
  content: "";
  position: absolute;
  inset: auto -8vw -6rem;
  z-index: -1;
  height: 15rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 250, 240, 0.94), rgba(255, 250, 240, 0.74) 32%, transparent 70%);
  pointer-events: none;
}

.marketing-hero__grid,
.features-hero__grid {
  grid-template-columns: minmax(0, 0.78fr) minmax(500px, 1.22fr);
  perspective: 1600px;
}

.marketing-hero__copy,
.features-hero__copy {
  align-self: start;
  z-index: 3;
  padding-top: clamp(0.5rem, 4vw, 3rem);
}

.marketing-home h1 {
  max-width: 10.5ch;
  font-size: clamp(4.1rem, 8vw, 8.8rem);
  line-height: 0.86;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
}

.marketing-home-page h1 {
  max-width: 13.5ch;
  font-size: clamp(3.45rem, 5.5vw, 6.15rem);
}

.pricing-hero h1,
.public-about-page .public-hero h1,
.public-contact-page .public-hero h1 {
  max-width: 10ch;
  color: #fffaf7;
  font-size: clamp(4.2rem, 9vw, 9.6rem);
  line-height: 0.86;
}

.features-hero h1 {
  max-width: 7.8ch;
}

.marketing-actions {
  gap: 0.9rem;
}

.marketing-btn {
  min-height: 3.35rem;
  border-radius: 999px;
  padding: 0.95rem 1.45rem;
  backdrop-filter: blur(14px);
}

.marketing-btn--primary {
  color: #07111f;
  border-color: rgba(255, 207, 114, 0.55);
  background: linear-gradient(135deg, #fff6c7, var(--launch-gold) 54%, #ff9b7e);
  box-shadow: 0 18px 48px rgba(255, 207, 114, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.marketing-btn--primary:hover,
.marketing-btn--primary:focus {
  color: #07111f;
  box-shadow: 0 26px 64px rgba(255, 207, 114, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.marketing-btn--secondary {
  color: #fffaf7;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
}

.marketing-btn--secondary:hover,
.marketing-btn--secondary:focus {
  color: #fffaf7;
  border-color: rgba(255, 207, 114, 0.48);
  background: rgba(255, 255, 255, 0.14);
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 36rem;
}

.hero-proof div {
  max-width: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.hero-proof dt {
  color: var(--launch-gold);
}

.hero-proof dd {
  color: rgba(255, 255, 255, 0.72);
}

.home-image-card,
.features-screenshot {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 237, 255, 0.86));
  box-shadow: var(--launch-shadow);
  overflow: hidden;
}

.home-hero-image,
.features-screenshot--hero {
  z-index: 1;
  transform: rotateX(9deg) rotateY(-14deg) rotateZ(2deg) translateY(1rem);
  transform-origin: 50% 50%;
  box-shadow: 0 64px 140px rgba(0, 0, 0, 0.48);
  animation: launchFloat 8s ease-in-out infinite;
}

.features-screenshot--hero {
  margin-right: min(-6vw, -3rem);
  margin-left: 0;
}

.home-image-card::after,
.features-screenshot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 30%, transparent 70%, rgba(139, 92, 246, 0.12));
  pointer-events: none;
}

.problem-intro,
.features-section__heading,
.section-heading {
  text-align: left;
}

.problem-intro {
  position: relative;
  margin-top: -3rem;
  padding: clamp(5rem, 9vw, 8rem) 0 1rem;
  color: var(--launch-ink);
}

.problem-intro .marketing-container {
  display: grid;
  gap: 1rem;
}

.problem-intro h2,
.section-heading h2 {
  margin-inline: 0;
}

.problem-section {
  position: relative;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 7vw, 7rem);
  min-height: 560px;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.problem-section--reverse {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
}

.problem-section:nth-child(even)::before,
.features-section:nth-of-type(odd)::before {
  content: "";
  position: absolute;
  inset: 7% -7vw;
  z-index: -1;
  border-radius: 44px;
  background:
    radial-gradient(circle at 78% 10%, rgba(139, 92, 246, 0.14), transparent 22rem),
    linear-gradient(135deg, rgba(7, 15, 36, 0.04), rgba(255, 207, 114, 0.08));
  transform: rotate(-1.4deg);
}

.problem-copy h3,
.features-section__heading h2,
.features-showcase__intro h2,
.features-word h2,
.founder-story h2,
.section-heading h2 {
  max-width: 12ch;
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 0.9;
}

.problem-copy p,
.features-section__heading p,
.features-showcase__intro p,
.features-word p,
.public-narrative p,
.public-card p,
.comparison-grid p,
.faq-grid p {
  max-width: 42rem;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.problem-visual {
  min-height: 420px;
  border-radius: 34px;
  box-shadow: 0 34px 90px rgba(7, 17, 31, 0.17);
}

.problem-visual--image {
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 232, 255, 0.86)),
    #fff;
}

.problem-visual--image .home-feature-image {
  border-radius: 24px;
  box-shadow: 0 30px 72px rgba(7, 17, 31, 0.2);
}

.features-jump {
  margin-top: -3.4rem;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
  background: transparent;
}

.features-jump__grid {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  padding: 0.8rem;
  background: rgba(7, 15, 36, 0.72);
  box-shadow: 0 26px 70px rgba(3, 7, 18, 0.22);
  backdrop-filter: blur(18px);
}

.features-jump__grid a {
  color: #fffaf7;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.features-jump__grid a:hover,
.features-jump__grid a:focus {
  color: #07111f;
  background: var(--launch-gold);
}

.features-section,
.features-word,
.pricing-plans,
.pricing-compare,
.pricing-faq,
.social-proof,
.public-about-page .public-content-section,
.public-contact-page .public-content-section {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--launch-paper);
}

.features-section--soft,
.features-word,
.pricing-compare,
.public-contact-page .public-content-section--soft,
.founder-story {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 207, 114, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(139, 92, 246, 0.12), transparent 30rem),
    #f4f0ff;
}

.features-showcase,
.final-cta {
  position: relative;
  overflow: hidden;
  color: #fffaf7;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 207, 114, 0.2), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(139, 92, 246, 0.38), transparent 30rem),
    linear-gradient(135deg, #040713, #071225 58%, #25104d);
}

.features-showcase h2,
.features-showcase h3,
.features-showcase .marketing-eyebrow,
.final-cta h2,
.final-cta .marketing-eyebrow {
  color: #fffaf7;
}

.features-showcase .features-showcase__intro h2,
.final-cta .marketing-eyebrow {
  color: var(--launch-gold);
}

.features-preview-pair,
.features-collage {
  gap: clamp(1.5rem, 4vw, 3rem);
}

.features-preview-pair .features-screenshot:nth-child(1),
.features-collage .features-screenshot:nth-child(1) {
  transform: rotate(-1.5deg) translateY(1.4rem);
}

.features-preview-pair .features-screenshot:nth-child(2),
.features-collage .features-screenshot:nth-child(2) {
  transform: rotate(1.5deg) translateY(-1.4rem);
}

.feature-icon-card,
.pricing-card,
.comparison-grid article,
.faq-grid article,
.public-card,
.testimonial-grid figure {
  border: 1px solid rgba(7, 17, 31, 0.12);
  border-radius: 30px;
  padding: clamp(1.35rem, 3vw, 2rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 240, 255, 0.78)),
    #fff;
  box-shadow: 0 24px 70px rgba(7, 17, 31, 0.1);
}

.feature-icon-card:hover,
.pricing-card:hover,
.comparison-grid article:hover,
.faq-grid article:hover,
.public-card:hover,
.testimonial-grid figure:hover {
  transform: translateY(-8px) rotate(-0.3deg);
  box-shadow: 0 36px 94px rgba(7, 17, 31, 0.17);
}

.feature-icon-card > span {
  width: 4.4rem;
  height: 4.4rem;
  margin-bottom: 1.25rem;
  border-radius: 24px;
  color: #fff;
  font-size: 1.02rem;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.5), transparent 36%),
    linear-gradient(135deg, var(--launch-electric), #2737d7 54%, var(--launch-coral));
  box-shadow: 0 20px 46px rgba(139, 92, 246, 0.28);
}

.features-showcase .feature-icon-card {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.pricing-card-grid {
  gap: clamp(1rem, 2.6vw, 2rem);
}

.pricing-card {
  overflow: hidden;
}

.pricing-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% 28%;
  height: 12rem;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 68%);
}

.pricing-card--featured {
  transform: translateY(-1.3rem);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 42px 110px rgba(139, 92, 246, 0.18);
}

.pricing-badge,
.pricing-badge--trial {
  color: #07111f;
  border-color: rgba(255, 207, 114, 0.5);
  background: linear-gradient(135deg, #fff4bd, var(--launch-gold));
}

.public-about-page .public-narrative {
  max-width: 1020px;
}

.public-about-page .public-narrative p {
  max-width: 52rem;
}

.public-about-page .public-narrative p:nth-child(2),
.public-about-page .public-narrative p:nth-child(4) {
  margin-left: auto;
}

.public-about-page .public-narrative strong {
  display: block;
  max-width: 12ch;
  color: var(--launch-ink);
  font-size: clamp(3.8rem, 8vw, 8rem);
  line-height: 0.9;
}

.public-about-page .public-feature-panel {
  color: #fffaf7;
  border-color: rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 207, 114, 0.2), transparent 28rem),
    linear-gradient(135deg, #040713, #20104b);
}

.public-about-page .public-feature-panel h2 {
  color: #fffaf7;
}

.public-contact-page .public-card-grid {
  align-items: stretch;
  gap: clamp(1rem, 3vw, 2rem);
}

.public-contact-page .public-card:nth-child(2) {
  transform: translateY(-2rem);
}

.public-contact-page .faq-grid article {
  background: rgba(255, 255, 255, 0.88);
}

.public-footer {
  background:
    radial-gradient(circle at 16% 0%, rgba(139, 92, 246, 0.3), transparent 22rem),
    linear-gradient(135deg, #040713, #071225);
}

/* Phase 19A readability and warmer-section correction */
.marketing-home {
  --launch-paper: #fffaf0;
  --launch-paper-warm: #f7efe2;
  --launch-paper-soft: #fff6e8;
  --launch-dark-text: #fffaf7;
  --launch-dark-muted: #d9e1f2;
  --launch-dark-subtle: #bfcbe0;
  --launch-link-bright: #ffe19a;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 207, 114, 0.2), transparent 32rem),
    radial-gradient(circle at 92% 18%, rgba(14, 42, 102, 0.3), transparent 36rem),
    linear-gradient(180deg, #040713 0%, #071225 32%, var(--launch-paper) 32.1%, var(--launch-paper) 100%);
}

.marketing-home .marketing-eyebrow,
.marketing-hero .marketing-eyebrow,
.features-hero .marketing-eyebrow,
.pricing-hero .marketing-eyebrow,
.public-about-page .public-hero .marketing-eyebrow,
.public-contact-page .public-hero .marketing-eyebrow,
.features-showcase .marketing-eyebrow,
.final-cta .marketing-eyebrow {
  color: var(--launch-link-bright);
}

.marketing-hero,
.features-hero,
.pricing-hero,
.public-about-page .public-hero,
.public-contact-page .public-hero,
.features-showcase,
.final-cta {
  color: var(--launch-dark-text);
}

.marketing-hero h1,
.features-hero h1,
.pricing-hero h1,
.public-about-page .public-hero h1,
.public-contact-page .public-hero h1,
.features-showcase h2,
.features-showcase h3,
.final-cta h2 {
  color: var(--launch-dark-text);
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
}

.marketing-hero .marketing-lead,
.features-hero .marketing-lead,
.pricing-hero .marketing-lead,
.public-about-page .public-hero .marketing-lead,
.public-contact-page .public-hero .marketing-lead,
.features-showcase__intro p,
.features-showcase .feature-icon-card p,
.features-did-you-know p,
.final-cta p,
.features-page .final-cta small {
  color: var(--launch-dark-muted);
}

.features-showcase a,
.final-cta a {
  color: var(--launch-link-bright);
}

.marketing-btn--secondary {
  color: var(--launch-dark-text);
  border-color: rgba(255, 250, 247, 0.42);
  background: rgba(255, 250, 247, 0.13);
}

.marketing-btn--secondary:hover,
.marketing-btn--secondary:focus {
  color: #07111f;
  border-color: rgba(255, 225, 154, 0.9);
  background: var(--launch-link-bright);
}

.features-showcase .feature-icon-card,
.final-cta__inner {
  border-color: rgba(255, 250, 247, 0.2);
  background: rgba(255, 250, 247, 0.11);
}

.features-showcase .feature-icon-card h3,
.features-showcase .features-showcase__intro h2 {
  color: var(--launch-dark-text);
}

.features-did-you-know {
  border-color: rgba(255, 225, 154, 0.45);
  background: rgba(255, 250, 247, 0.11);
}

.features-did-you-know strong {
  color: var(--launch-link-bright);
}

.home-image-card,
.features-screenshot {
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(247, 239, 226, 0.9));
}

.features-section,
.features-word,
.pricing-plans,
.pricing-compare,
.pricing-faq,
.social-proof,
.public-about-page .public-content-section,
.public-contact-page .public-content-section {
  background: var(--launch-paper);
}

.features-section--soft,
.features-word,
.pricing-compare,
.public-contact-page .public-content-section--soft,
.founder-story {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 207, 114, 0.15), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(7, 18, 37, 0.06), transparent 30rem),
    var(--launch-paper-warm);
}

.problem-section:nth-child(even)::before,
.features-section:nth-of-type(odd)::before {
  background:
    radial-gradient(circle at 78% 10%, rgba(255, 207, 114, 0.12), transparent 22rem),
    linear-gradient(135deg, rgba(7, 15, 36, 0.045), rgba(255, 207, 114, 0.08));
}

.problem-visual--image,
.feature-icon-card,
.pricing-card,
.comparison-grid article,
.faq-grid article,
.public-card,
.testimonial-grid figure {
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(247, 239, 226, 0.88)),
    #fffaf0;
}

.feature-icon-card p,
.pricing-card__heading p,
.pricing-price span,
.pricing-price small,
.comparison-grid p,
.faq-grid p,
.public-card p,
.public-narrative p {
  color: #53606f;
}

.features-section__heading h2,
.features-word h2,
.problem-copy h3,
.section-heading h2,
.pricing-card h3,
.comparison-grid h3,
.faq-grid h3,
.public-card h2,
.public-about-page .public-narrative strong {
  color: var(--launch-ink);
}

@keyframes launchFloat {
  0%, 100% {
    transform: rotateX(9deg) rotateY(-14deg) rotateZ(2deg) translateY(1rem);
  }

  50% {
    transform: rotateX(7deg) rotateY(-11deg) rotateZ(1deg) translateY(-0.5rem);
  }
}

.reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.marketing-hero.reveal-section,
.features-hero.reveal-section,
.pricing-hero.reveal-section,
.public-hero.reveal-section,
.help-centre-hero.reveal-section {
  opacity: 1;
  transform: none;
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes productFloat {
  0%, 100% {
    transform: rotate(1deg) translateY(0);
  }

  50% {
    transform: rotate(1deg) translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product,
  .reveal-section,
  .feature-icon-card,
  .pricing-card,
  .comparison-grid article,
  .faq-grid article,
  .public-card,
  .testimonial-grid figure,
  .help-centre-page .plain-card {
    animation: none;
    transition: none;
  }

  .reveal-section {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1060px) {
  .marketing-hero__grid,
  .features-hero__grid,
  .features-word__grid,
  .features-split,
  .features-preview-pair,
  .features-collage,
  .problem-section,
  .founder-story__grid {
    grid-template-columns: 1fr;
  }

  .marketing-home h1 {
    max-width: 13ch;
  }

  .hero-product {
    transform: none;
    animation: none;
  }

  .problem-section--reverse .problem-visual {
    order: 0;
  }

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

  .comparison-grid,
  .faq-grid,
  .public-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .marketing-container {
    width: min(100% - 24px, 1180px);
  }

  .marketing-home {
    margin-top: -0.75rem;
  }

  .marketing-hero {
    padding-top: 1.8rem;
  }

  .marketing-actions,
  .marketing-actions .marketing-btn {
    width: 100%;
  }

  .product-mockup {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .product-sidebar {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(31, 42, 68, 0.1);
  }

  .product-sidebar strong {
    flex: 0 0 auto;
    margin: 0 0.4rem 0 0;
  }

  .product-sidebar span {
    flex: 0 0 auto;
  }

  .product-topline,
  .hero-proof {
    display: grid;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .hero-proof div {
    display: block;
  }

  .hero-proof dt {
    font-size: 1.8rem;
  }

  .hero-proof dd {
    font-size: 0.86rem;
  }

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

  .writer-workspace {
    display: grid;
    gap: 0.75rem;
    min-height: 0;
    transform: none;
    animation: none;
  }

  .writer-workspace::before {
    display: none;
  }

  .workspace-manuscript,
  .workspace-card,
  .workspace-progress {
    position: relative;
    inset: auto;
    width: auto;
  }

  .workspace-manuscript {
    min-height: 0;
  }

  .workspace-progress {
    flex-direction: column;
    height: auto;
    border-radius: 18px;
  }

  .mock-chart {
    min-height: 145px;
  }

  .problem-section {
    min-height: 0;
    padding: 2.25rem 0;
  }

  .problem-visual {
    min-height: 260px;
    border-radius: 18px;
  }

  .visual-plot,
  .visual-series,
  .visual-threads {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem;
  }

  .visual-series span {
    min-height: 7.5rem;
  }

  .visual-docs span,
  .visual-notes span {
    max-width: 12rem;
    font-size: 0.88rem;
  }

  .founder-mark {
    max-width: 220px;
  }

  .pricing-hero {
    padding-top: 1.8rem;
  }

  .pricing-card-grid {
    grid-template-columns: 1fr;
  }

  .public-hero {
    padding-top: 1.8rem;
  }

  .public-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-footer__nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .marketing-home h1 {
    font-size: clamp(2.7rem, 13vw, 3.55rem);
    line-height: 1;
  }

  .browser-frame {
    border-radius: 16px;
  }

  .product-sidebar span:not(.is-active) {
    display: none;
  }

  .visual-flow span {
    font-size: 0.78rem;
  }

  .person {
    width: 4.3rem;
    height: 4.3rem;
  }
}

@media (max-width: 1200px) {
  .timeline-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .timeline-control-panel {
    align-items: stretch;
  }

  .relationship-map-controls {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .relationship-map-workspace {
    grid-template-columns: 1fr;
  }

  .relationship-map-details {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .workspace-heading,
  .page-heading,
  .context-header {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row {
    align-items: stretch;
  }

  .button-row .btn,
  .button-row form {
    width: 100%;
  }

  .attachment-preview-row {
    grid-template-columns: 1fr;
  }

  .attachment-thumb {
    width: 100%;
    max-width: 260px;
  }

}

/* Final guardrail: explicit readable text on public marketing dark sections. */
.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta),
.public-about-page .public-hero,
.public-contact-page .public-hero,
.public-footer {
  color: #fffaf7;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) :where(h1, h2, h3, h4),
.public-about-page .public-hero :where(h1, h2, h3, h4),
.public-contact-page .public-hero :where(h1, h2, h3, h4),
.public-footer :where(h1, h2, h3, h4, .public-footer__brand) {
  color: #fffaf7 !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) :where(p, li, dd),
.public-about-page .public-hero :where(p, li),
.public-contact-page .public-hero :where(p, li),
.public-footer :where(p, li, span) {
  color: rgba(255, 255, 255, 0.82) !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) :where(small, figcaption),
.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) :where(.muted, .marketing-lead),
.public-about-page .public-hero :where(.marketing-lead, small, .muted),
.public-contact-page .public-hero :where(.marketing-lead, small, .muted),
.public-footer__nav a {
  color: rgba(255, 255, 255, 0.72) !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) .marketing-eyebrow,
.public-about-page .public-hero .marketing-eyebrow,
.public-contact-page .public-hero .marketing-eyebrow {
  color: #ffe19a !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) a:not(.marketing-btn),
.public-about-page .public-hero a:not(.marketing-btn),
.public-contact-page .public-hero a:not(.marketing-btn),
.public-footer a {
  color: #ffe19a;
  text-decoration-color: rgba(255, 225, 154, 0.55);
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) a:not(.marketing-btn):hover,
.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) a:not(.marketing-btn):focus,
.public-about-page .public-hero a:not(.marketing-btn):hover,
.public-about-page .public-hero a:not(.marketing-btn):focus,
.public-contact-page .public-hero a:not(.marketing-btn):hover,
.public-contact-page .public-hero a:not(.marketing-btn):focus,
.public-footer a:hover,
.public-footer a:focus {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.72);
}

.features-showcase .feature-icon-card h3,
.features-showcase .feature-icon-card strong,
.features-showcase .features-did-you-know strong,
.final-cta__inner h2 {
  color: #fffaf7 !important;
}

.features-showcase .feature-icon-card p,
.features-showcase .feature-icon-card span,
.features-showcase .features-did-you-know p,
.final-cta__inner p,
.final-cta__inner small {
  color: rgba(255, 255, 255, 0.76) !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) .marketing-btn--secondary {
  color: #fffaf7;
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.14);
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) .marketing-btn--secondary:hover,
.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) .marketing-btn--secondary:focus {
  color: #07111f;
  border-color: #ffe19a;
  background: #ffe19a;
}

.features-hero .features-hero__highlights article {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.features-hero .features-hero__highlights article strong,
.features-hero .features-hero__highlights article h3,
.features-hero .features-hero__highlights article h4 {
  color: #ffffff !important;
}

.features-hero .features-hero__highlights article span,
.features-hero .features-hero__highlights article p,
.features-hero .features-hero__highlights article small {
  color: rgba(255, 255, 255, 0.78) !important;
}

.marketing-home-page .problem-intro,
.marketing-home-page .problem-stack,
.marketing-home-page .problem-section,
.marketing-home-page .problem-copy {
  color: #ffffff;
}

.marketing-home-page .problem-intro :where(h1, h2, h3, h4),
.marketing-home-page .problem-stack :where(h1, h2, h3, h4),
.marketing-home-page .problem-section :where(h1, h2, h3, h4),
.marketing-home-page .problem-copy :where(h1, h2, h3, h4) {
  color: #ffffff !important;
}

.marketing-home-page .problem-intro :where(p, li, span),
.marketing-home-page .problem-stack :where(p, li, span),
.marketing-home-page .problem-section :where(p, li, span),
.marketing-home-page .problem-copy :where(p, li, span),
.marketing-home-page .problem-copy p:not(.marketing-eyebrow) {
  color: rgba(255, 255, 255, 0.84) !important;
}

.marketing-home-page .problem-intro :where(small, .muted),
.marketing-home-page .problem-stack :where(small, .muted),
.marketing-home-page .problem-section :where(small, .muted),
.marketing-home-page .problem-copy :where(small, .muted) {
  color: rgba(255, 255, 255, 0.7) !important;
}

.marketing-home-page .problem-intro .marketing-eyebrow,
.marketing-home-page .problem-stack .marketing-eyebrow,
.marketing-home-page .problem-section .marketing-eyebrow,
.marketing-home-page .problem-copy .marketing-eyebrow {
  color: #ffe19a !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero) .marketing-lead,
.features-hero .features-hero__highlights article span,
.marketing-home :where(.features-showcase, .final-cta) p:not(.marketing-eyebrow),
.features-showcase .features-showcase__intro p:not(.marketing-eyebrow),
.features-showcase .feature-icon-card p,
.final-cta__inner p,
.marketing-home-page .problem-copy p:not(.marketing-eyebrow),
.marketing-home-page .problem-intro p:not(.marketing-eyebrow) {
  color: rgba(255, 255, 255, 0.84) !important;
}

.marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .features-showcase, .final-cta) small,
.features-page .final-cta small,
.final-cta__inner small {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Homepage problem journey sections sit on light/warm paper, not dark panels. */
.marketing-home-page :where(.problem-intro, .problem-stack, .problem-section, .problem-copy) {
  color: #07111f;
}

.marketing-home-page :where(.problem-intro, .problem-stack, .problem-section, .problem-copy) :where(h1, h2, h3, h4) {
  color: #07111f !important;
}

.marketing-home-page :where(.problem-intro, .problem-stack, .problem-section, .problem-copy) :where(p, li, span),
.marketing-home-page .problem-copy p:not(.marketing-eyebrow),
.marketing-home-page .problem-intro p:not(.marketing-eyebrow) {
  color: #53606f !important;
}

.marketing-home-page :where(.problem-intro, .problem-stack, .problem-section, .problem-copy) :where(small, .muted) {
  color: #667085 !important;
}

.marketing-home-page :where(.problem-intro, .problem-stack, .problem-section, .problem-copy) .marketing-eyebrow {
  color: #7b4b13 !important;
}

.marketing-home-page .problem-intro h1,
.marketing-home-page .problem-intro h2,
.marketing-home-page .problem-intro h3,
.marketing-home-page .problem-stack .problem-copy h1,
.marketing-home-page .problem-stack .problem-copy h2,
.marketing-home-page .problem-stack .problem-copy h3,
.marketing-home-page .problem-stack .problem-copy h4,
.marketing-home-page .problem-section .problem-copy h1,
.marketing-home-page .problem-section .problem-copy h2,
.marketing-home-page .problem-section .problem-copy h3,
.marketing-home-page .problem-section .problem-copy h4 {
  color: #07111f !important;
}

.marketing-home-page .problem-intro .marketing-eyebrow,
.marketing-home-page .problem-stack .problem-copy .marketing-eyebrow,
.marketing-home-page .problem-section .problem-copy .marketing-eyebrow {
  color: #7b4b13 !important;
}

/* The homepage problem journey starts on the dark hero backdrop, then moves to paper. */
.marketing-home-page .problem-intro h1,
.marketing-home-page .problem-intro h2,
.marketing-home-page .problem-intro h3,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-copy h1,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-copy h2,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-copy h3,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-copy h4 {
  color: #ffffff !important;
}

.marketing-home-page .problem-intro p:not(.marketing-eyebrow),
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-copy p:not(.marketing-eyebrow) {
  color: rgba(255, 255, 255, 0.84) !important;
}

.marketing-home-page .problem-intro .marketing-eyebrow,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-copy .marketing-eyebrow {
  color: #ffe19a !important;
}

.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-visual span,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-visual strong,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-visual p,
.marketing-home-page .problem-stack .problem-section:nth-child(-n+2) .problem-visual small {
  color: #07111f !important;
}

.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-copy h1,
.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-copy h2,
.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-copy h3,
.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-copy h4 {
  color: #07111f !important;
}

.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-copy p:not(.marketing-eyebrow) {
  color: #53606f !important;
}

.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-copy .marketing-eyebrow {
  color: #7b4b13 !important;
}

.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-visual span,
.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-visual strong,
.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-visual p,
.marketing-home-page .problem-stack .problem-section:nth-child(n+3) .problem-visual small {
  color: #07111f !important;
}

/* Public marketing light surfaces need the warmer brown eyebrow treatment. */
.marketing-home :where(
  .features-jump,
  .features-section,
  .features-word,
  .features-faq,
  .pricing-plans,
  .pricing-compare,
  .pricing-faq,
  .founder-story,
  .social-proof,
  .public-content-section,
  .public-mission
) .marketing-eyebrow {
  color: #7b4b13 !important;
}

/* Public marketing heading scale and containment. */
.marketing-home :where(h1, h2, h3) {
  max-width: 100%;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.marketing-home :where(.marketing-hero, .features-hero) h1 {
  font-size: clamp(3.25rem, 5.8vw, 5.9rem);
  line-height: 0.92;
}

.marketing-home-page .marketing-hero h1 {
  max-width: 12.5ch;
  font-size: clamp(3.1rem, 4.8vw, 5.25rem);
}

.features-hero h1 {
  max-width: 9.5ch;
}

.pricing-hero h1,
.public-hero h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 6.4vw, 6.7rem);
  line-height: 0.9;
}

.problem-intro h2,
.problem-copy h3,
.features-section__heading h2,
.features-word h2,
.section-heading h2,
.public-mission h2 {
  font-size: clamp(2.35rem, 4.3vw, 4.7rem);
  line-height: 0.94;
}

.features-split__copy h3,
.pricing-card h3,
.comparison-grid h3,
.faq-grid h3,
.public-card h2,
.public-policy h2 {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.08;
}

.marketing-home .feature-icon-card h3 {
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.16;
  overflow-wrap: anywhere;
  text-wrap: wrap;
}

@media (max-width: 1060px) {
  .marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .public-hero) h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 9vw, 5rem);
  }

  .problem-intro h2,
  .problem-copy h3,
  .features-section__heading h2,
  .features-word h2,
  .section-heading h2,
  .public-mission h2 {
    font-size: clamp(2.25rem, 7vw, 4.2rem);
  }
}

@media (max-width: 760px) {
  .marketing-home :where(.marketing-hero, .features-hero, .pricing-hero, .public-hero) h1 {
    max-width: 11ch;
    font-size: clamp(2.65rem, 12vw, 3.7rem);
    line-height: 0.96;
  }

  .problem-intro h2,
  .problem-copy h3,
  .features-section__heading h2,
  .features-word h2,
  .section-heading h2,
  .public-mission h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
    line-height: 0.98;
  }
}
