:root {
  /* Exact Notion Light Mode Tokens */
  --bg: #ffffff;
  --surface: #f7f6f3;
  --callout-bg: #f1f1ef;
  --hover: #f7f6f3;
  --active: rgba(55, 53, 47, 0.08);

  --ink: #37352f;
  --ink-2: #787774;
  --ink-3: #9b9a97;
  --border: #e9e9e7;
  --border-2: #d3d1cb;

  /* Exact Notion Select Tag Colors */
  --tag-gray-bg: #e3e2e0;
  --tag-gray-fg: #32302c;

  --tag-blue-bg: #d3e5ef;
  --tag-blue-fg: #183347;

  --tag-yellow-bg: #fdecc8;
  --tag-yellow-fg: #402c1b;

  --tag-green-bg: #dbeddb;
  --tag-green-fg: #1c3829;

  --tag-red-bg: #ffe2dd;
  --tag-red-fg: #5d1715;

  --tag-purple-bg: #e8deee;
  --tag-purple-fg: #412454;

  /* Authentic Brand-Matched Soft Notion Tag Tints */
  --tag-gemini-bg: #d3e5ef;
  --tag-gemini-fg: #183347;

  --tag-claude-bg: #fadec9;
  --tag-claude-fg: #49290e;

  --tag-openai-bg: #dbeddb;
  --tag-openai-fg: #1c3829;

  --tag-kimi-bg: #dfe4fb;
  --tag-kimi-fg: #232d63;

  --tag-glm-bg: #e8deee;
  --tag-glm-fg: #412454;

  --tag-devin-bg: #d4f0ee;
  --tag-devin-fg: #133f40;

  --tag-dark-bg: #37352f;
  --tag-dark-fg: #ffffff;

  --font-sans: "Inter", "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Noto Sans SC", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Topbar (Notion Breadcrumb Bar) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar-brand {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.step-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.step-tab {
  border: none;
  background: transparent;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

.step-tab:hover:not(:disabled) {
  background: var(--hover);
  color: var(--ink);
}

.step-tab.is-current {
  background: var(--active);
  color: var(--ink);
  font-weight: 500;
}

.step-tab.is-done {
  color: var(--ink-2);
}

.step-tab:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ghost-btn,
.ghost-select {
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  outline: none;
}

.ghost-btn:hover,
.ghost-select:hover {
  background: var(--hover);
  color: var(--ink);
}

/* Topbar Visible Undo / Redo Buttons with Labels */
.history-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.history-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.history-text-btn:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--border-2);
}

.history-text-btn:disabled {
  color: var(--ink-3);
  border-color: var(--border);
  opacity: 0.45;
  cursor: default;
}

/* Topbar Minimalist Language Toggle (中 / EN) */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 9px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.lang-toggle-btn:hover {
  background: var(--hover);
  border-color: var(--border-2);
}

.lang-toggle-btn .lang-opt.is-active {
  color: var(--ink);
  font-weight: 600;
}

.lang-toggle-btn .lang-sep {
  color: var(--border-2);
}

/* Notion Page Canvas — Wide & Spacious for 12-Month Tables with Zero Scrollbar */
.page {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 22px 76px 16px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Minimalist Side-Edge Navigation Zones (< / >) — Subtle, Clear, Zero Box Clutter */
.side-nav-zone {
  position: fixed;
  top: 52px;
  bottom: 0;
  width: 74px;
  border: none;
  background: transparent;
  color: rgba(55, 53, 47, 0.62);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 15;
  transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.side-nav-prev {
  left: 0;
}

.side-nav-next {
  right: 0;
}

.side-nav-zone:hover {
  background: rgba(55, 53, 47, 0.045);
  color: var(--ink);
}

/* Gentle reveal on Step 1 once the user picks a plan */
.side-nav-zone.is-emphasized {
  color: rgba(55, 53, 47, 0.82);
  animation: sideNavReveal 0.26s ease-out;
}

.side-nav-zone.is-emphasized .side-nav-tip {
  opacity: 0.92;
  color: var(--ink);
}

@keyframes sideNavReveal {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.side-nav-zone svg {
  transition: transform 0.16s ease;
}

.side-nav-prev:hover svg {
  transform: translateX(-2px);
}

.side-nav-next:hover svg {
  transform: translateX(2px);
}

.side-nav-tip {
  font-size: 11px;
  font-weight: 500;
  color: rgba(55, 53, 47, 0.6);
  opacity: 0.85;
  transition: opacity 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.side-nav-zone:hover .side-nav-tip {
  opacity: 1;
  color: var(--ink);
}

.side-nav-zone.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.export-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-step-nav {
  display: none;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.step {
  display: none;
  width: 100%;
  animation: fadeIn 0.16s ease;
}

.step.is-active {
  display: block;
}

.step-narrow {
  max-width: 820px;
}

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

.step-kicker {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.kicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.kicker-row .step-kicker {
  margin-bottom: 0;
}

.substep-crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.substep-btn {
  border: none;
  background: transparent;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.substep-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.substep-btn.is-current {
  background: var(--active);
  color: var(--ink);
  font-weight: 600;
}

.substep-sep {
  color: var(--border-2);
  user-select: none;
}

.page-title {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.page-lead {
  margin: 0 0 24px;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 780px;
}

/* Step 1 Choice Rows */
.choice-list {
  border-top: 1px solid var(--border);
}

.choice-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.choice-row:hover {
  background: var(--hover);
}

.choice-row.is-selected {
  background: var(--surface);
}

.choice-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  margin-top: 4px;
  flex-shrink: 0;
  position: relative;
}

.choice-row.is-selected .choice-radio {
  border-color: var(--ink);
}

.choice-row.is-selected .choice-radio::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: var(--ink);
}

.choice-content {
  flex: 1;
  min-width: 0;
}

.choice-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.choice-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.choice-price {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.choice-note {
  margin-top: 5px;
  font-size: 14px;
  color: var(--ink-2);
}

.step1-next-wrap {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.step1-hint {
  font-size: 13.5px;
  color: var(--ink-3);
}

.step1-next-btn {
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}

/* Authentic Notion Quote Block (Pure white canvas + 3px ink vertical bar, zero gray slab) */
.callout {
  background: transparent;
  border-left: 3px solid var(--ink);
  border-radius: 0;
  padding: 2px 0 2px 18px;
}

.callout-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.callout-text {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
}

/* Exact Notion Select Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.tag-gray { background: var(--tag-gray-bg); color: var(--tag-gray-fg); }
.tag-blue { background: var(--tag-blue-bg); color: var(--tag-blue-fg); }
.tag-yellow { background: var(--tag-yellow-bg); color: var(--tag-yellow-fg); }
.tag-amber { background: var(--tag-yellow-bg); color: var(--tag-yellow-fg); }
.tag-green { background: var(--tag-green-bg); color: var(--tag-green-fg); }
.tag-red { background: var(--tag-red-bg); color: var(--tag-red-fg); }
.tag-purple { background: var(--tag-purple-bg); color: var(--tag-purple-fg); }
.tag-gemini { background: var(--tag-gemini-bg); color: var(--tag-gemini-fg); }
.tag-claude { background: var(--tag-claude-bg); color: var(--tag-claude-fg); }
.tag-openai { background: var(--tag-openai-bg); color: var(--tag-openai-fg); }
.tag-kimi { background: var(--tag-kimi-bg); color: var(--tag-kimi-fg); }
.tag-glm { background: var(--tag-glm-bg); color: var(--tag-glm-fg); }
.tag-devin { background: var(--tag-devin-bg); color: var(--tag-devin-fg); }
.tag-dark { background: var(--tag-dark-bg); color: var(--tag-dark-fg); }

/* Text Buttons */
.text-btn {
  border: none;
  background: transparent;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.text-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.text-btn-muted {
  color: var(--ink-3);
}

/* Step 2 Hero Bar: Prominent Compare Switch + Phase Settings Trigger */
.step-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

/* Locked Immovable Black Friday Pro Pill in Step 3 (Plan B) */
.locked-bf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 3px;
  background: var(--tag-gemini-bg);
  color: var(--tag-gemini-fg);
  border: 1px solid rgba(24, 51, 71, 0.22);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  flex-shrink: 0;
}

.locked-bf-pill svg {
  opacity: 0.72;
  flex-shrink: 0;
}

.bf-row-plus {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 2px;
  user-select: none;
}

.bf-diff-stack {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.bf-diff-extra {
  color: var(--ink-2);
  font-size: 12.5px;
}

.step2-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}

.compare-segmented {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  gap: 4px;
}

.compare-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.compare-seg-btn:hover {
  color: var(--ink);
}

.compare-seg-btn.is-active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 15, 15, 0.14);
}

.compare-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-2);
  transition: background-color 0.14s ease;
}

.compare-seg-btn.is-active .compare-dot {
  background: #86efac;
}

.step2-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.phase-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 5px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.phase-settings-btn:hover,
.phase-settings-btn.is-open {
  background: var(--surface);
  border-color: var(--ink);
}

.phase-settings-meta {
  font-size: 12px;
  color: var(--ink-2);
  padding-left: 4px;
  border-left: 1px solid var(--border);
}

/* Notion Center Peek Modal (Model Lifecycle & Retention Probability) */
.center-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: rgba(15, 15, 15, 0.36);
  backdrop-filter: blur(2px);
}

.center-modal-backdrop.is-open {
  display: flex;
  animation: fadeIn 0.16s ease;
}

.center-modal {
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(15, 15, 15, 0.22);
  overflow: hidden;
  animation: centerPeekIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.center-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.center-modal-kicker {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.center-modal-body {
  padding: 26px 34px 28px;
  overflow-y: auto;
}

.center-modal-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.center-modal-lead {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}

.phase-modal-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}

.center-modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

/* Step 2: Fixed-Height Toolbar Slot + Zero-Shift Floating Selection Bar */
.db-toolbar-slot {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.db-header-line {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px;
  flex-wrap: wrap;
}

.db-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.db-view-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.db-view-hint {
  font-size: 13px;
  color: var(--ink-3);
}

.db-selection-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(15, 15, 15, 0.07);
  flex-wrap: wrap;
}

.db-count-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.db-catalog-select {
  min-width: 260px;
  max-width: 340px;
  height: 32px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border-2);
}

.btn-xs {
  height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.db-bottom-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.db-bottom-label {
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.db-bottom-custom .flat-input,
.db-bottom-custom .flat-select {
  height: 34px;
  font-size: 13.5px;
}

/* Authentic Notion Database Table (Horizontal + Vertical #E9E9E7 Gridlines) */
.notion-db-wrap {
  position: relative;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body.is-marquee-dragging {
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}

/* Authentic Notion Blue Marquee Selection Rectangle */
.db-marquee-box {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(35, 131, 226, 0.14);
  border: 1px solid rgba(35, 131, 226, 0.52);
  border-radius: 2px;
  display: none;
}

.notion-db {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.notion-db th {
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg);
}

.notion-db th:last-child,
.notion-db td:last-child {
  border-right: none;
}

.th-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.th-right {
  justify-content: flex-end;
  width: 100%;
}

.th-icon {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
}

.th-svg {
  color: var(--ink-3);
  flex-shrink: 0;
}

.notion-db td {
  padding: 7.5px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: middle;
  color: var(--ink);
  line-height: 1.45;
}

.notion-db tbody tr:last-child td {
  border-bottom: none;
}

.notion-db tbody tr.db-row {
  user-select: none;
  -webkit-user-select: none;
}

.notion-db tbody tr.db-row:hover td {
  background: var(--hover);
}

/* Single-Column Selection Highlight (Notion Cell Range Style inside .col-skip only) */
.notion-db tbody td.col-skip.is-cell-selected {
  background: rgba(35, 131, 226, 0.085) !important;
  box-shadow: inset 2px 0 0 rgba(35, 131, 226, 0.65), inset -1px 0 0 rgba(35, 131, 226, 0.25);
}

.notion-db input[type="checkbox"] {
  accent-color: var(--ink);
  width: 15px;
  height: 15px;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}

.notion-db .col-month {
  width: 224px;
  white-space: nowrap;
}

.notion-db .col-ref-a {
  width: 218px;
  background: rgba(247, 246, 243, 0.55);
  color: var(--ink-2);
}

.notion-db th.col-ref-a {
  background: var(--surface);
  color: var(--ink-3);
}

.ref-pills-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ref-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11.5px;
  line-height: 1.45;
  opacity: 0.72;
  white-space: nowrap;
}

.ref-mini-pill.is-dropped {
  opacity: 0.45;
  text-decoration: line-through;
}

.ref-empty-dash {
  font-size: 12px;
  color: var(--ink-3);
}

.th-month-head {
  width: 100%;
  justify-content: space-between;
}

.th-mini-action {
  border: none;
  background: transparent;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11.5px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.th-mini-action:hover {
  background: var(--active);
  color: var(--ink);
}

.db-month-main {
  font-weight: 500;
  color: var(--ink);
  margin-right: 8px;
}

/* Color-Coded Clickable Model Phase Badges with Non-Intrusive Hover Tooltip Cue */
.phase-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.phase-pill-cue {
  display: inline-flex;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.14s ease, width 0.14s ease;
}

.phase-pill:hover {
  filter: brightness(0.96);
  border-color: rgba(55, 53, 47, 0.28);
}

.phase-pill:hover .phase-pill-cue {
  opacity: 0.78;
  width: 11px;
}

/* Lightweight Non-Blocking Tooltip on Hover (Zero Auto-Popup Intrusion) */
.phase-pill::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(3px);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.phase-pill:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.phase-pill.phase-honeymoon {
  background: var(--tag-purple-bg);
  color: var(--tag-purple-fg);
}

.phase-pill.phase-steady {
  background: var(--tag-blue-bg);
  color: var(--tag-blue-fg);
}

.phase-pill.phase-risk {
  background: var(--tag-red-bg);
  color: var(--tag-red-fg);
}

.phase-pill.phase-next_gen {
  background: var(--tag-green-bg);
  color: var(--tag-green-fg);
}

.phase-pill.is-legend {
  cursor: default;
}

.phase-pill.is-legend::after {
  display: none;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-2);
  margin: 0 2px;
}

.notion-db .col-skip {
  min-width: 245px;
}

.notion-db .col-buy {
  min-width: 275px;
  background: rgba(247, 246, 243, 0.45);
  animation: bfColReveal 0.18s ease-out;
}

.notion-db th.col-buy {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.notion-db.is-compare-hidden .col-buy {
  display: none;
}

@keyframes bfColReveal {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.th-buy-head {
  width: 100%;
  justify-content: space-between;
}

.bf-compare-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.bf-sync-chip {
  border: none;
  background: transparent;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.bf-sync-chip:hover {
  background: var(--active);
  color: var(--ink);
}

.bf-no-extra-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--tag-green-bg);
  color: var(--tag-green-fg);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s ease;
}

.bf-no-extra-pill:hover {
  filter: brightness(0.95);
}

.bf-synced-muted {
  font-size: 12.5px;
  color: var(--ink-3);
  font-style: normal;
}

.save-val-active {
  color: var(--tag-green-fg);
  font-weight: 600;
}

.save-val-neg {
  color: var(--tag-red-fg);
  font-weight: 600;
}

.save-val-idle {
  color: var(--ink-3);
}

.notion-db .col-save {
  width: 124px;
  white-space: nowrap;
}

.notion-db .num {
  text-align: right;
}

.notion-db tfoot td {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  border-bottom: none;
  border-right: none;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bg);
}

/* Multi-Select Pill Stack inside Plan A & Plan B Cells */
.cell-skip-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cell-pills-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.pill-chip-group {
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  overflow: hidden;
  max-width: 240px;
}

.pill-chip-group .cell-pill-btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 6px;
}

.pill-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  align-self: stretch;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.58;
  transition: opacity 0.12s ease, background-color 0.12s ease;
}

.pill-chip-x:hover {
  opacity: 1;
  background: rgba(15, 15, 15, 0.09);
}

.pill-chip-group.tone-yellow { background: var(--tag-yellow-bg); color: var(--tag-yellow-fg); }
.pill-chip-group.tone-blue { background: var(--tag-blue-bg); color: var(--tag-blue-fg); }
.pill-chip-group.tone-purple { background: var(--tag-purple-bg); color: var(--tag-purple-fg); }
.pill-chip-group.tone-green { background: var(--tag-green-bg); color: var(--tag-green-fg); }
.pill-chip-group.tone-gray { background: var(--tag-gray-bg); color: var(--tag-gray-fg); }
.pill-chip-group.tone-gemini { background: var(--tag-gemini-bg); color: var(--tag-gemini-fg); }
.pill-chip-group.tone-claude { background: var(--tag-claude-bg); color: var(--tag-claude-fg); }
.pill-chip-group.tone-openai { background: var(--tag-openai-bg); color: var(--tag-openai-fg); }
.pill-chip-group.tone-kimi { background: var(--tag-kimi-bg); color: var(--tag-kimi-fg); }
.pill-chip-group.tone-glm { background: var(--tag-glm-bg); color: var(--tag-glm-fg); }
.pill-chip-group.tone-devin { background: var(--tag-devin-bg); color: var(--tag-devin-fg); }

.pill-chip-group .cell-pill-btn {
  background: transparent;
  color: inherit;
}

.cell-caret-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 5px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.cell-caret-btn:hover {
  background: var(--active);
  color: var(--ink);
}

/* Selected Multi-Select Tokens Bar Inside Top of Notion Picker */
.np-selected-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.np-selected-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.np-sel-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: border-color 0.1s ease;
}

.np-sel-pill.is-focused {
  border-color: var(--ink);
}

.np-sel-pill-btn {
  border: none;
  background: transparent;
  color: inherit;
  padding: 1px 6px 1px 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.5;
}

.np-sel-pill-x {
  border: none;
  background: transparent;
  color: inherit;
  padding: 0 5px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.np-sel-pill-x:hover {
  opacity: 1;
  background: rgba(15, 15, 15, 0.1);
}

.np-sel-qty-btn {
  border: none;
  background: rgba(15, 15, 15, 0.06);
  color: inherit;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

.np-sel-qty-btn:hover {
  background: rgba(15, 15, 15, 0.14);
}

.np-item-check {
  font-size: 11.5px;
  color: var(--tag-green-fg);
  font-weight: 600;
  margin-right: 4px;
}

.cell-chk {
  opacity: 0.35;
  transition: opacity 0.12s ease;
}

.notion-db tbody tr.db-row:hover .cell-chk,
.notion-db tbody td.col-skip.is-cell-selected .cell-chk,
.cell-chk:checked,
.cell-chk:focus {
  opacity: 1;
}

.cell-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 245px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.cell-pill-btn:hover {
  filter: brightness(0.96);
}

.cell-pill-btn.is-open {
  border-color: var(--ink);
}

.cell-pill-btn.tone-yellow { background: var(--tag-yellow-bg); color: var(--tag-yellow-fg); }
.cell-pill-btn.tone-blue { background: var(--tag-blue-bg); color: var(--tag-blue-fg); }
.cell-pill-btn.tone-purple { background: var(--tag-purple-bg); color: var(--tag-purple-fg); }
.cell-pill-btn.tone-green { background: var(--tag-green-bg); color: var(--tag-green-fg); }
.cell-pill-btn.tone-gray { background: var(--tag-gray-bg); color: var(--tag-gray-fg); }
.cell-pill-btn.tone-gemini { background: var(--tag-gemini-bg); color: var(--tag-gemini-fg); }
.cell-pill-btn.tone-claude { background: var(--tag-claude-bg); color: var(--tag-claude-fg); }
.cell-pill-btn.tone-openai { background: var(--tag-openai-bg); color: var(--tag-openai-fg); }
.cell-pill-btn.tone-kimi { background: var(--tag-kimi-bg); color: var(--tag-kimi-fg); }
.cell-pill-btn.tone-glm { background: var(--tag-glm-bg); color: var(--tag-glm-fg); }
.cell-pill-btn.tone-devin { background: var(--tag-devin-bg); color: var(--tag-devin-fg); }

/* When Compare Mode is ON and BF Pro replaces this baseline sub, cross it out gently in-place */
.cell-pill-btn.is-replaced-by-bf {
  opacity: 0.56;
}

.cell-pill-btn.is-replaced-by-bf .cell-pill-text {
  text-decoration: line-through;
}

.cell-pill-btn.is-replaced-by-bf:hover {
  opacity: 0.88;
}

.cell-pill-btn.tone-empty {
  background: transparent;
  color: var(--ink-3);
  font-weight: 400;
}

.cell-pill-btn.tone-empty:hover {
  background: var(--active);
  color: var(--ink-2);
  filter: none;
}

.cell-pill-caret {
  font-size: 10px;
  opacity: 0.55;
  flex-shrink: 0;
}

.cell-hike-dot {
  font-size: 11px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--ink-2);
  white-space: nowrap;
}

/* Authentic Notion Database Brand-Grouped Floating Select Picker */
.notion-picker {
  position: fixed;
  z-index: 70;
  display: none;
  flex-direction: column;
  width: 368px;
  max-width: calc(100vw - 24px);
  max-height: min(500px, calc(100vh - 32px));
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(15, 15, 15, 0.14), 0 1px 4px rgba(15, 15, 15, 0.06);
  overflow: hidden;
}

.notion-picker.is-open {
  display: flex;
}

.np-top {
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.np-top-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.np-top-target {
  font-weight: 600;
  color: var(--ink);
}

.np-region-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.np-region-label {
  font-size: 11.5px;
  color: var(--ink-3);
}

.np-region-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.np-region-chip {
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--ink-2);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.np-region-chip:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}

.np-region-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
  font-weight: 500;
}

.np-price-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

.np-price-inline .flat-select,
.np-price-inline .flat-input {
  height: 28px;
  font-size: 12.5px;
  padding: 0 7px;
}

.np-list {
  overflow-y: auto;
  padding: 6px 6px;
  flex: 1 1 auto;
}

.np-brand-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 7px 8px 3px;
  letter-spacing: 0.02em;
}

.np-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.1s ease;
}

.np-item-btn:hover {
  background: var(--hover);
}

.np-item-btn.is-active {
  background: var(--active);
}

.np-item-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.np-item-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

.np-custom-footer {
  border-top: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--bg);
}

.np-custom-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
}

.np-custom-toggle:hover {
  background: var(--hover);
  color: var(--ink);
}

.np-custom-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 4px;
}

.np-custom-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.np-custom-form .flat-select,
.np-custom-form .flat-input {
  height: 30px;
  font-size: 12.5px;
  padding: 0 8px;
}

/* Notion Page Properties (Steps 3, 4, 5) */
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.prop-group {
  border-top: 1px solid var(--border);
}

.prop-row {
  display: grid;
  grid-template-columns: 248px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 50px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
}

.prop-key {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.prop-val {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--ink);
}

.prop-val-slider {
  flex-wrap: nowrap;
}

.val-badge {
  min-width: 92px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* Dynamic Multi-Currency FX Rows on Step 3 */
.fx-card-block {
  padding: 6px 0 8px;
  border-bottom: 1px solid var(--border);
}

.fx-card-block .prop-row {
  border-bottom: none;
  min-height: 44px;
  padding: 6px 6px;
}

.fx-extra-toggle {
  border-bottom: 1px solid var(--border);
}

.fx-extra-toggle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  list-style: none;
}

.fx-extra-toggle summary::-webkit-details-marker {
  display: none;
}

.fx-extra-toggle summary:hover {
  background: var(--hover);
}

.fx-extra-body {
  padding: 2px 6px 10px;
}

.fx-dir-up { color: var(--tag-red-fg); }
.fx-dir-down { color: var(--tag-green-fg); }
.fx-dir-flat { color: var(--ink-2); }

.unit {
  font-size: 13.5px;
  color: var(--ink-2);
}

.muted-note {
  margin: 4px 0 8px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

.lifecycle-help-note {
  padding: 4px 4px 10px;
  min-height: 58px;
}

.flat-input,
.flat-select {
  height: 36px;
  padding: 0 11px;
  border-radius: 4px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.flat-input:hover,
.flat-select:hover {
  border-color: var(--ink-2);
}

.flat-input:focus,
.flat-select:focus {
  background: var(--bg);
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(55, 53, 47, 0.08);
}

/* Inline Notion Pill Switch */
.pill-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-opt {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}

.pill-opt:hover {
  background: var(--hover);
  color: var(--ink);
}

.pill-opt.is-active {
  background: var(--ink);
  color: #ffffff;
  font-weight: 500;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}

.check-inline input {
  accent-color: var(--ink);
  width: 15px;
  height: 15px;
}

/* Monochrome Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-2);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
}

/* Minimalist Unified Timeline Axis: Nov 2026 Dashed Lead-In + Dec 2026..Nov 2027 Repeating Cycles */
.lifecycle-bar {
  padding: 50px 18px 48px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
}

.lifecycle-line {
  position: relative;
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

.lifecycle-seg-pre {
  position: absolute;
  left: 0;
  width: 10%;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    to right,
    var(--ink-2) 0 4px,
    transparent 4px 8px
  );
  border-radius: 2px 0 0 2px;
}

.lifecycle-track-main {
  position: absolute;
  left: 10%;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 0 2px 2px 0;
}

.lifecycle-segments,
.lifecycle-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lifecycle-seg-active {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--ink);
  transition: left 0.15s ease, width 0.15s ease;
}

.lifecycle-seg-extra {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #2383e2;
  transition: left 0.15s ease, width 0.15s ease;
}

.lifecycle-seg-next {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #0f7b6c;
  transition: left 0.15s ease, width 0.15s ease;
}

.lc-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.15s ease;
  z-index: 2;
}

.lc-node-start {
  transform: translate(0, -50%);
  align-items: flex-start;
}

.lc-node-end-align {
  transform: translate(-100%, -50%);
  align-items: flex-end;
}

.lc-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--ink);
}

.lc-dot-pre {
  background: #ffffff;
  border: 2px dashed var(--ink-2);
  box-shadow: none;
}

.lc-dot-hollow {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: none;
}

.lc-dot-blue {
  background: #2383e2;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #2383e2;
}

.lc-dot-green {
  background: #0f7b6c;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #0f7b6c;
}

.lc-dot-green-hollow {
  background: #ffffff;
  border: 2px solid #0f7b6c;
  box-shadow: none;
}

.lc-month {
  position: absolute;
  bottom: 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.2;
}

.lc-month-muted {
  color: var(--ink-2);
  font-weight: 500;
}

.lc-month-blue {
  color: #2383e2;
}

.lc-month-green {
  color: #0f7b6c;
}

.lc-label {
  position: absolute;
  top: 16px;
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  line-height: 1.2;
}

.lc-label-muted {
  color: var(--ink-3);
}

.lc-label-blue {
  color: #2383e2;
  font-weight: 500;
}

.lc-label-green {
  color: #0f7b6c;
  font-weight: 500;
}

/* Anti-collision vertical stagger when two nodes sit close on the single axis */
.lc-node.is-staggered .lc-month {
  bottom: 32px;
}

.lc-node.is-staggered .lc-label {
  top: 32px;
}

/* EV Ruler */
.ev-block {
  margin-top: 32px;
}

.ev-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-2);
}

.ev-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin: 28px 0 10px;
}

.ev-threshold {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 2px;
  background: var(--ink);
}

.ev-threshold-tag {
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.ev-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: left 0.15s ease;
}

.ev-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
}

/* Step 4 Real 12-Month Ledger Replay Transition (~1.12s) */
.calc-stage {
  min-height: 54vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 8px;
  animation: fadeIn 0.16s ease;
}

.replay-card {
  width: 100%;
  max-width: 560px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 2px;
}

.replay-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.replay-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.replay-counter {
  font-size: 13px;
  color: var(--ink-2);
}

.replay-ticks {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.replay-tick {
  height: 3px;
  border-radius: 1px;
  background: var(--border);
  transition: background-color 0.08s ease;
}

.replay-tick.is-lit {
  background: var(--ink);
}

.replay-tick.is-active {
  background: var(--tag-green-fg);
}

.replay-tape {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 96px;
  font-size: 13px;
}

.replay-row {
  display: grid;
  grid-template-columns: 112px 1fr 124px;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 3px;
  color: var(--ink-2);
}

.replay-row.is-current {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
}

.replay-row .r-mid {
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-row .r-cum {
  text-align: right;
  font-weight: 500;
}

.replay-status {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-2);
  min-height: 20px;
}

/* Step 4 Institutional Financial Decision Memo */
.step5-result.is-revealing {
  animation: memoFadeIn 0.24s ease-out both;
}

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

.memo-header {
  margin-bottom: 18px;
}

.memo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.memo-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.currency-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  gap: 2px;
}

.cur-opt {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 3.5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.cur-opt:hover {
  color: var(--ink);
}

.cur-opt.is-active {
  background: var(--ink);
  color: #ffffff;
}

.memo-page-title {
  margin: 0;
}

.memo-headline {
  margin: 10px 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.memo-detail {
  margin: 0;
  font-size: 14.5px;
}

.memo-hero {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px 0 20px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--border);
}

.memo-ev-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.memo-ev-value {
  margin-top: 4px;
  font-size: 52px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.memo-ev-value .ev-sign-pos {
  color: var(--tag-green-fg);
}

.memo-ev-value .ev-sign-neg {
  color: var(--tag-red-fg);
}

.memo-ev-meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.memo-hero-conds {
  margin: 0;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.memo-cond-item dt {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.memo-cond-item dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.memo-cond-item dd strong {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.memo-cond-sub {
  font-size: 12px;
  color: var(--ink-2);
}

.memo-strip {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-2);
}

.memo-strip-sep {
  color: var(--border-2);
}

.memo-idle-details {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.memo-idle-details summary {
  cursor: pointer;
  color: var(--ink-2);
  padding: 4px 2px;
}

.memo-idle-details summary:hover {
  color: var(--ink);
}

.memo-idle-body {
  margin: 4px 0 0;
  padding: 4px 0 4px 14px;
  border-left: 2px solid var(--border);
  line-height: 1.65;
}

.memo-risk-note {
  margin-top: 16px;
}

.memo-risk-note .callout-text {
  margin: 0;
  font-size: 13.5px;
}

/* Bidirectional SVG Payoff Bar */
.payoff-wrap {
  width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.payoff-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Institutional Financial Statement Table (Horizontal Rules Only, Pure Monochrome) */
.fin-table {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.fin-table th,
.fin-table td {
  border-right: none;
}

.fin-table th {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border-2);
  padding: 8px 12px;
}

.fin-table td {
  padding: 9px 12px;
}

.fin-scen-title {
  font-weight: 500;
  color: var(--ink);
}

.fin-scen-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.fin-row-baseline td {
  border-top: 1.5px solid var(--border-2);
  background: var(--surface);
}

.fin-diff-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 66px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 13px;
}

.fin-diff-pill.is-pos {
  background: var(--tag-green-bg);
  color: var(--tag-green-fg);
}

.fin-diff-pill.is-neg {
  background: var(--tag-red-bg);
  color: var(--tag-red-fg);
}

.fin-diff-pill.is-zero {
  background: var(--tag-gray-bg);
  color: var(--tag-gray-fg);
}

.fin-footnote {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
}

.scen-head-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scen-reset-btn {
  height: 25px;
  padding: 0 9px;
  border-radius: 4px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.scen-reset-btn:hover {
  background: var(--hover);
  border-color: var(--ink);
}

.doc-block-compact {
  margin-top: 28px;
}

.block-head-compact {
  margin-bottom: 10px;
}

.block-title-sm {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.scen-pill-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.scen-pill-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.scen-pill-btn:hover {
  background: var(--hover);
  color: var(--ink);
  border-color: var(--border-2);
}

.scen-pill-btn.is-active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  font-weight: 500;
}

.fin-table-tiered tbody tr.fin-row-standard td {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border-2);
}

.fin-table-tiered tbody tr.fin-row-standard .fin-scen-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.fin-table-tiered tbody tr.fin-row-standard .fin-scen-sub {
  font-size: 11.5px;
  color: var(--ink-2);
}

.fin-table-tiered tbody tr.fin-row-standard .fin-diff-pill {
  font-size: 13.5px;
  padding: 2px 9px;
}

.fin-table-tiered tbody tr.fin-row-divider td {
  padding: 7px 12px 4px;
  font-size: 11px;
  color: var(--ink-3);
  background: transparent;
  border-bottom: none;
  cursor: default;
  user-select: none;
}

.fin-table-tiered tbody tr.fin-row-secondary td {
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.scen-cell-inline {
  align-items: center;
  gap: 8px;
}

.fin-table-tiered tbody tr.fin-row-secondary .scen-radio-dot {
  width: 11px;
  height: 11px;
  margin-top: 0;
}

.fin-scen-inline-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-left: 2px;
}

.fin-table-tiered tbody tr.fin-row-secondary .fin-scen-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.fin-table-tiered tbody tr.fin-row-secondary .fin-diff-pill {
  background: transparent;
  padding: 0;
  min-width: auto;
  font-size: 12.5px;
  font-weight: 600;
}

.fin-table-tiered tbody tr.fin-row-secondary .fin-diff-pill.is-pos {
  color: #1c5c34;
}

.fin-table-tiered tbody tr.fin-row-secondary .fin-diff-pill.is-neg {
  color: #9e2a2b;
}

.fin-table-tiered tbody tr.fin-row-secondary.fin-row-active .fin-scen-title {
  color: var(--ink);
  font-weight: 600;
}

.fin-table-tiered tbody tr.fin-row-secondary .scen-radio-dot::after {
  inset: 2px;
}

.fin-table tbody tr.fin-row-selectable {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.fin-table tbody tr.fin-row-selectable:hover td {
  background: rgba(55, 53, 47, 0.025);
}

.fin-table tbody tr.fin-row-active td {
  background: rgba(55, 53, 47, 0.032);
}

.fin-table tbody tr.fin-row-active:hover td {
  background: rgba(55, 53, 47, 0.045);
}

.scen-cell-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.scen-radio-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  margin-top: 3px;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.12s ease;
}

.fin-row-selectable:hover .scen-radio-dot {
  border-color: var(--ink-2);
}

.fin-row-active .scen-radio-dot {
  border-color: var(--ink);
}

.fin-row-active .scen-radio-dot::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--ink);
}

/* 3x3 Sensitivity Matrix */
.sens-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sens-table th,
.sens-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: right;
}

.sens-table th:first-child,
.sens-table td:first-child {
  text-align: left;
  color: var(--ink-2);
  font-weight: 500;
  background: var(--surface);
}

.sens-table th {
  color: var(--ink-2);
  font-weight: 500;
  background: var(--surface);
}

.sens-table th:last-child,
.sens-table td:last-child {
  border-right: none;
}

.sens-table tbody tr:last-child td {
  border-bottom: none;
}

.sens-cell-center {
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
  font-weight: 600;
  background: rgba(55, 53, 47, 0.03);
}

.sens-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .step5-result.is-revealing {
    animation: none !important;
  }
}

.is-pos { color: var(--tag-green-fg); }
.is-neg { color: var(--tag-red-fg); }

.doc-block {
  margin-top: 44px;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.block-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.block-note {
  font-size: 13.5px;
  color: var(--ink-3);
}

.chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Toggles */
.toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notion-toggle summary {
  cursor: pointer;
  padding: 9px 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  user-select: none;
}

.notion-toggle summary:hover {
  background: var(--hover);
}

.toggle-body {
  padding: 8px 10px 18px 22px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Buttons & Footer */
.subtle-btn,
.primary-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease;
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13.5px;
}

.subtle-btn {
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--ink);
}

.subtle-btn:hover {
  background: var(--hover);
}

.primary-btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.primary-btn:hover {
  background: #23221e;
}

.step-footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.export-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Whisper-Quiet Monochrome GitHub Attribution Footer */
.site-credit {
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  color: #b5b4b0;
}

.site-credit .github-icon {
  width: 12px;
  height: 12px;
  color: #b5b4b0;
  flex-shrink: 0;
}

.site-credit a {
  color: #a8a7a3;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.site-credit a:hover {
  color: var(--ink-2);
  border-bottom-color: var(--border-2);
}

.credit-sep {
  color: #d3d1cb;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13.5px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .side-nav-zone {
    display: none;
  }

  .mobile-step-nav {
    display: flex;
  }

  .topbar-inner {
    padding: 0 18px;
  }

  .topbar-brand {
    display: none;
  }

  .page {
    padding: 28px 18px 56px;
  }

  .page-title {
    font-size: 26px;
  }

  .prop-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 2px;
  }

  .prop-key {
    white-space: normal;
  }

  .db-catalog-select {
    min-width: 100%;
  }

  .memo-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .memo-ev-value {
    font-size: 38px;
  }

  .memo-hero-conds {
    padding: 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px 28px;
  }
}
