: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);
}

[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 {
  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);
}

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

.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,
.scene-inspector-root {
  background: rgba(255, 251, 243, 0.72);
}

.inspector-section {
  background: var(--plotline-surface-elevated);
  border-color: var(--plotline-border-soft);
  border-radius: var(--plotline-radius);
  box-shadow: var(--plotline-shadow-subtle);
}

.scene-overview-card {
  background: linear-gradient(135deg, #fffaf1, #f2e2cf);
}

.inspector-quick-nav,
.inspector-accordion-toggle {
  background: rgba(255, 251, 243, 0.88);
  border-color: rgba(84, 68, 48, 0.14);
}

.inspector-accordion-toggle {
  color: var(--plotline-accent-dark);
  border-radius: var(--plotline-radius-sm);
}

.inspector-accordion-toggle:hover {
  background: rgba(122, 77, 44, 0.08);
}

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

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

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

.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 {
  background: #fff4d9;
}

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

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

.scene-inspector-root {
  display: grid;
  gap: 0.85rem;
}

.inspector-section {
  padding: 0.95rem;
}

.inspector-section h3 {
  color: #211915;
  font-size: 1.02rem;
}

.scene-overview-card {
  border: 1px solid rgba(122, 77, 44, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(242, 226, 207, 0.82));
}

.inspector-quick-nav {
  top: 0.35rem;
  box-shadow: 0 10px 26px rgba(62, 45, 28, 0.08);
}

.inspector-nav-links {
  max-height: 6.2rem;
  overflow: auto;
}

.inspector-nav-links a {
  background: rgba(255, 253, 248, 0.84);
}

.inspector-accordion-toggle {
  min-height: 2.25rem;
  padding-inline: 0.2rem;
}

.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"] .story-bible-section,
[data-theme="dark"] .story-bible-card,
[data-theme="dark"] .story-bible-nav,
[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"] .scene-overview-card,
[data-theme="dark"] .inspector-section,
[data-theme="dark"] .inspector-quick-nav,
[data-theme="dark"] .inspector-accordion-toggle {
  color: var(--app-text);
  background: var(--app-surface);
  border-color: var(--app-border);
  box-shadow: var(--plotline-shadow-subtle);
}

[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"] .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: var(--app-text);
  background: rgba(212, 154, 98, 0.14);
  border-color: rgba(212, 154, 98, 0.24);
}

[data-theme="dark"] .badge.text-bg-warning,
[data-theme="dark"] .warning-placeholder.active {
  color: #ffe4b8 !important;
  background: rgba(224, 173, 101, 0.22) !important;
  border-color: rgba(224, 173, 101, 0.36);
}

[data-theme="dark"] .badge.text-bg-success {
  color: #c8f0ce !important;
  background: rgba(145, 201, 154, 0.16) !important;
}

[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-secondary,
[data-theme="dark"] .btn-outline-info {
  --bs-btn-color: var(--app-link);
  --bs-btn-border-color: rgba(241, 195, 143, 0.46);
  --bs-btn-hover-color: #1c120d;
  --bs-btn-hover-bg: var(--app-link);
  --bs-btn-hover-border-color: var(--app-link);
  --bs-btn-active-color: #1c120d;
  --bs-btn-active-bg: var(--app-link);
  --bs-btn-active-border-color: var(--app-link);
  --bs-btn-disabled-color: #9c8d7d;
  --bs-btn-disabled-border-color: rgba(231, 214, 190, 0.18);
}

[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"] .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"] .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: #cceaf0;
  --bs-alert-bg: #17343a;
  --bs-alert-border-color: #285c66;
}

[data-theme="dark"] .alert-warning,
[data-theme="dark"] .validation-summary-errors {
  --bs-alert-color: #ffe3ad;
  --bs-alert-bg: #3b2a16;
  --bs-alert-border-color: #705229;
}

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

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

.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 {
  background: linear-gradient(135deg, #fffdf9, #f2e8d9);
}

.plot-lane {
  position: absolute;
  left: 12%;
  right: 12%;
  height: 0.62rem;
  border-radius: 999px;
}

.lane-gold { top: 28%; background: rgba(212, 165, 116, 0.86); }
.lane-navy { top: 50%; background: rgba(31, 42, 68, 0.82); }
.lane-rose { top: 72%; background: rgba(159, 95, 85, 0.78); }

.plot-node {
  position: absolute;
  width: 4.25rem;
  height: 4.25rem;
  border: 0.55rem solid #fffaf2;
  border-radius: 999px;
  background: var(--marketing-gold);
  box-shadow: 0 15px 28px rgba(31, 42, 68, 0.16);
}

.node-one { top: 18%; left: 23%; }
.node-two { top: 40%; right: 24%; background: var(--marketing-navy); }
.node-three { bottom: 14%; left: 44%; background: var(--marketing-rose); }

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

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

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

.reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.marketing-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 {
    animation: none;
    transition: none;
  }

  .reveal-section {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1060px) {
  .marketing-hero__grid,
  .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;
  }

  .mock-chart {
    min-height: 145px;
  }

  .problem-section {
    min-height: 0;
    padding: 2.25rem 0;
  }

  .problem-visual {
    min-height: 260px;
    border-radius: 18px;
  }

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

  .inspector-nav-links {
    max-height: 8.5rem;
  }
}
