  :root {
    --bg: #02080a;
    --surface: #0a1418;
    --surface-2: #111e24;
    --border: #1a2e36;
    --text: #f0f2f5;
    --text-dim: #6b7a82;
    --accent-green: #59e900;
    --accent-orange: #ff6b2f;
    --accent-amber: #ef9719;
    --accent-blue: #0c63ff;
    --accent-purple: #a78bfa;
    --accent-cyan: #00bda5;
    --accent-red: #ff6b2f;
    --gradient-green: linear-gradient(135deg, #59e900, #00bda5);
    --gradient-orange: linear-gradient(135deg, #ff6b2f, #ef9719);
    --gradient-blue: linear-gradient(135deg, #0c63ff, #00bda5);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* ====== Splash Overlay (page-load animation) ====== */
  .splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: rgba(2, 8, 10, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
  }
  .splash-overlay.splash-done {
    opacity: 0;
    pointer-events: none;
  }
  body.dev-mode .splash-overlay { display: none; }

  .splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: -10vh;
  }

  /* Brand stack: logo above title */
  .splash-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 80px;
  }
  .splash-logo {
    width: 160px;
    height: auto;
    opacity: 0;
    animation: splashLogoFade 0.8s ease forwards;
  }
  .splash-title {
    font-family: 'Archivo', sans-serif;
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--text);
    opacity: 0;
    animation: splashFadeIn 0.4s ease 0.15s forwards;
  }
  .splash-title .tm {
    font-size: 0.55em;
    position: relative;
    top: -0.7em;
    line-height: 0;
  }

  /* Typing terminal line – centered block, text types L→R inside */
  .splash-terminal {
    display: flex;
    align-items: center;
    min-height: 1.6em;
    opacity: 0;
    animation: splashFadeIn 0.3s ease 0.3s forwards;
  }
  .splash-typed {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.82rem;
    color: var(--accent-green);
    white-space: pre;
    transition: opacity 0.35s ease;
  }
  .splash-typed.fade-out { opacity: 0; }
  .splash-typed.fade-in  { opacity: 0; }
  .splash-typed.fade-in.visible { opacity: 1; transition: opacity 0.5s ease; }
  .splash-cursor {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.82rem;
    color: var(--accent-green);
    animation: splashBlink 0.6s step-end infinite;
    margin-left: 1px;
    transition: opacity 0.35s ease;
  }
  .splash-cursor.hidden { opacity: 0; }

  @keyframes splashBlink {
    50% { color: transparent; }
  }
  @keyframes splashLogoFade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes splashFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Progress bar – retro segmented blocks */
  .splash-progress-track {
    width: 310px;
    background: transparent;
    overflow: hidden;
    opacity: 0;
    padding: 4px;
    display: flex;
    gap: 5px;
    animation: splashFadeIn 0.3s ease 0.3s forwards;
  }
  .splash-progress-block {
    flex: 1;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.1s ease;
  }
  .splash-progress-block.lit {
    background: #59e900;
  }

  /* Mobile adjustments */
  @media (max-width: 600px) {
    .splash-title { font-size: 1.75rem; }
    .splash-logo { width: 120px; }
    .splash-progress-track { width: 240px; }
    .splash-line { font-size: 0.74rem; }
  }
  /* ====== End Splash Overlay ====== */

  /* Header */
  .header-bar {
    position: relative;
    border-bottom: 2px solid var(--accent-green);
    background: linear-gradient(135deg, rgba(6,34,55,0.25) 0%, rgba(12,99,255,0.04) 50%, rgba(6,34,55,0.25) 100%);
  }
  .devmode-active .header-bar {
    border-bottom-color: var(--accent-orange);
  }
  .header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 25px 12px 24px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
  }
  .header-left {
    justify-self: start;
  }
  .header-logo {
    display: block;
    height: 40px;
    width: auto;
  }
  .header-logo-mobile {
    display: none !important;
  }
  .header-center {
    text-align: center;
  }
  .header-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  /* Compact header (triggered by sidebar-collapsed / expand outputs) */
  .header { transition: padding 0.35s cubic-bezier(0.4,0,0.2,1); }
  .header-logo { transition: height 0.35s cubic-bezier(0.4,0,0.2,1); }
  .header-center h1 { transition: font-size 0.35s cubic-bezier(0.4,0,0.2,1); }
  .header-center p { transition: opacity 0.25s ease, max-height 0.35s ease; overflow: hidden; }
  .header-bar.compact .header { padding: 6px 25px 6px 24px; }
  .header-bar.compact .header-logo { height: 24px; }
  .header-bar.compact .header-center h1 { font-size: 1.1rem; }
  .header-bar.compact .header-center p { opacity: 0; max-height: 0; margin: 0; }

  .info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    height: 34px;
    width: 34px;
    box-sizing: border-box;
    font-family: 'Archivo', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, height 0.35s cubic-bezier(0.4,0,0.2,1), width 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.35s cubic-bezier(0.4,0,0.2,1);
    white-space: nowrap;
  }
  .info-btn.pulse-ready {
    animation: togglePulse 1.2s ease-in-out 0.3s 5;
  }
  .info-btn:hover {
    background: rgba(239,151,25,0.1);
    color: #ef9719;
    border-color: rgba(239,151,25,0.45);
    box-shadow: 0 0 8px rgba(239,151,25,0.3);
  }
  .info-btn svg {
    flex-shrink: 0;
  }

  /* ====== Auth: Account Button ====== */
  .account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    height: 34px;
    width: 34px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease, height 0.35s cubic-bezier(0.4,0,0.2,1), width 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.35s cubic-bezier(0.4,0,0.2,1);
    position: relative;
  }
  .account-btn:hover {
    background: rgba(89,233,0,0.1);
    color: var(--accent-green);
    border-color: rgba(89,233,0,0.45);
    box-shadow: 0 0 8px rgba(89,233,0,0.3);
  }
  .account-btn svg { flex-shrink: 0; }
  .account-btn.signed-in {
    background: rgba(89,233,0,0.08);
    color: var(--accent-green);
    border-color: rgba(89,233,0,0.35);
  }
  .account-btn.signed-in:hover {
    background: rgba(89,233,0,0.15);
    color: var(--accent-green);
    border-color: rgba(89,233,0,0.5);
    box-shadow: 0 0 8px rgba(89,233,0,0.3);
  }
  .account-btn.signed-in::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    border: 1.5px solid var(--surface-2);
  }
  .account-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-green);
    line-height: 1;
  }

  /* ====== Auth: Sign-In Modal ====== */
  .auth-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.80);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .auth-modal-overlay.active { opacity: 1; pointer-events: auto; }
  .auth-modal-container {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 44px 48px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    width: 400px;
    max-width: 92vw;
    text-align: center;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  }
  .auth-modal-overlay.active .auth-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .auth-modal-close:hover { color: #ffffff; background: rgba(255,255,255,0.1); }

  /* ====== Loom Video Modal ====== */
  .loom-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .loom-modal-overlay.active { opacity: 1; pointer-events: auto; }
  .loom-modal-container {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 48px 24px 24px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    width: 90vw;
    max-width: 1400px;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  }
  .loom-modal-overlay.active .loom-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .loom-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
    letter-spacing: -0.3px;
    text-align: left;
  }
  .loom-embed-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
  }
  .loom-embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
  }
  /* AI Prompts Modal */
  .ai-prompts-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .ai-prompts-overlay.active { opacity: 1; pointer-events: auto; }
  .ai-prompts-container {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 48px 32px 32px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    width: 90vw;
    max-width: 720px;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  }
  .ai-prompts-overlay.active .ai-prompts-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .ai-prompts-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
  }
  .ai-prompts-subtitle {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin: 0 0 24px;
    line-height: 1.5;
  }
  .ai-prompts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  .ai-prompt-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: default;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
  }
  .ai-prompt-card.active {
    cursor: pointer;
    border-color: rgba(155,114,203,0.5);
    background: rgba(155,114,203,0.08);
    color: var(--text);
  }
  .ai-prompt-card.active:hover {
    border-color: #9B72CB;
    background: rgba(155,114,203,0.18);
    box-shadow: 0 0 20px rgba(155,114,203,0.15);
  }
  .ai-prompt-card.active .ai-card-icon svg {
    filter: drop-shadow(0 0 6px rgba(12,99,255,0.4));
  }
  .ai-prompt-card.inactive {
    opacity: 0.35;
  }
  .ai-card-sparkle {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
  }
  .ai-prompt-card.active .ai-card-sparkle {
    opacity: 1;
  }
  .ai-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }
  .ai-card-icon.gtm { color: var(--accent-blue); }
  .ai-card-icon.gtm svg { stroke: var(--accent-blue); }
  .ai-card-icon.sales { color: var(--accent-green); }
  .ai-card-icon.sales svg { stroke: var(--accent-green); }
  .ai-card-icon.marketing { color: var(--accent-orange); }
  .ai-card-icon.marketing svg { stroke: var(--accent-orange); }
  .ai-card-icon.postsale { color: var(--accent-cyan); }
  .ai-card-icon.postsale svg { stroke: var(--accent-cyan); }
  .ai-card-label {
    line-height: 1.3;
  }
  .ai-card-badge {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 2px 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
  }
  .ai-prompt-card.copied {
    border-color: var(--accent-green);
    background: rgba(52,211,153,0.1);
  }
  .ai-prompt-card.copied .ai-card-label {
    color: var(--accent-green);
  }
  @media (max-width: 768px) {
    .ai-prompts-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .ai-prompts-container {
      padding: 40px 20px 24px;
    }
  }

  .auth-modal-icon { margin-bottom: 16px; }
  .auth-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
  }
  .auth-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0 0 20px;
    line-height: 1.5;
  }
  .auth-modal-spam-note {
    font-size: 0.78rem;
    color: var(--accent-amber);
    margin: -12px 0 20px;
  }
  .auth-email-input {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
  }
  .auth-email-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.15);
  }
  .auth-email-input::placeholder { color: var(--text-dim); }
  .auth-submit-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
    background: var(--accent-green);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
  }
  .auth-submit-btn:hover {
    background: #4dd600;
    box-shadow: 0 0 12px rgba(89,233,0,0.4);
  }
  .auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  .auth-consent {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    margin-top: 20px;
    line-height: 1.4;
    text-align: center;
  }
  .auth-consent a {
    color: var(--accent-green);
    text-decoration: underline;
  }
  .auth-consent a:hover {
    color: #7fff00;
  }
  .auth-error {
    color: #ff5555;
    font-size: 0.8rem;
    margin-top: 10px;
    min-height: 1.2em;
  }
  .auth-back-btn {
    margin-top: 16px;
    padding: 8px 16px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.82rem;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .auth-back-btn:hover {
    color: var(--text);
    border-color: var(--text-dim);
  }

  /* ====== Auth: Account Panel Slide-Out ====== */
  .account-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .account-panel-overlay.active { opacity: 1; pointer-events: auto; }
  .account-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 90vw;
    height: 100dvh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  }
  .account-panel-overlay.active .account-panel {
    transform: translateX(0);
  }
  .account-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid var(--accent-green);
    flex-shrink: 0;
  }
  .account-panel-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
  }
  .account-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .account-panel-close:hover { background: rgba(255,255,255,0.1); }
  .account-panel-content { padding: 24px; flex: 1; }
  .account-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
  }
  .account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-green);
    flex-shrink: 0;
    font-family: 'Archivo', sans-serif;
  }
  .account-email {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    word-break: break-all;
  }
  .account-uid {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 2px;
    font-family: 'Courier New', monospace;
  }
  .account-signout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ff5f2f;
    background: transparent;
    border: 1px solid rgba(255,107,47,0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .account-signout-btn:hover {
    background: rgba(255,107,47,0.1);
    border-color: rgba(255,107,47,0.5);
  }
  .account-signout-btn svg { stroke: #ff5f2f; }
  .account-panel-footer {
    padding: 16px 24px;
    font-size: 0.72rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }
  /* ====== End Auth ====== */

  .header h1 {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1;
    position: relative;
    white-space: nowrap;
  }
  .header-badges {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }
  .header-badges .version-badge {
    top: 0;
  }
  .header h1 span {
    color: var(--text);
  }
  .tm {
    font-size: 0.55em;
    position: relative;
    top: -0.7em;
    line-height: 0;
  }
  .beta-badge {
    position: relative;
    vertical-align: middle;
    margin-left: 0;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(245,166,35,0.15);
    color: #F5A623;
    border: 1px solid rgba(245,166,35,0.3);
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1.4;
  }
  .header p {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 0;
  }
  .header-cta {
    display: inline-block;
    background: var(--accent-orange);
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 11px 24px;
    text-decoration: none;
    border-radius: 0;
    letter-spacing: 0.2px;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
  }
  .header-cta:hover {
    background: #e8431f;
    transform: translateY(-1px);
  }

  /* Two-column layout */
  .page-layout {
    display: grid;
    grid-template-columns: 396px minmax(0, 1fr);
    gap: 0;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    position: relative;
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .page-layout::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(2,8,10,0.95));
    pointer-events: none;
    z-index: 50;
  }

  /* Left sidebar */
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    min-height: 52px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(2, 8, 10, 0.92);
  }
  .sidebar-header h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c8d0d6;
    position: relative;
    top: 1px;
  }
  .view-toggle-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 12px;
    margin-right: auto;
    flex-shrink: 0;
  }
  .view-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
  }
  @keyframes togglePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,151,25,0); border-color: rgba(255,255,255,0.1); }
    50% { box-shadow: 0 0 0 3px rgba(239,151,25,0.4); border-color: rgba(239,151,25,0.65); }
  }
  .view-toggle-track {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow: visible;
  }
  .pulse-ready .view-toggle-track {
    animation: togglePulse 1.2s ease-in-out 0.3s 5;
  }
  .view-toggle:hover .view-toggle-track {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
  }
  .view-toggle-thumb {
    position: absolute;
    top: 0px;
    left: -1px;
    width: 24px;
    height: 24px;
    background: var(--text-dim);
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .view-toggle.on .view-toggle-track {
    background: rgba(89,233,0,0.7);
  }
  .view-toggle.on .view-toggle-thumb {
    left: 23px;  /* 48 - 24 - 1 */
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .sidebar-header-btns {
    display: flex;
    align-items: stretch;
    gap: 8px;
  }
  .sidebar-header-btns button {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
  }
  .currency-dropdown,
  .scenario-dropdown {
    position: relative;
    top: -1px;
  }
  .sidebar-header-btns .currency-toggle,
  .sidebar-header-btns .scenario-toggle {
    height: 100%;
    padding: 5px 22px 5px 8px;
    background: var(--surface-2);
    color: var(--text-dim);
    white-space: nowrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a82' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    text-align: left;
  }
  .sidebar-header-btns .currency-toggle { color: #fff; }
  .currency-icon { color: #59e900; }
  .currency-toggle:hover {
    border-color: rgba(89,233,0,0.5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2359e900' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  .scenario-toggle:hover {
    color: var(--accent-amber);
    border-color: var(--accent-amber);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ef9719' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  .scenario-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 110px;
    white-space: nowrap;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  }
  .scenario-menu.open { display: block; }
  .scenario-dropdown .scenario-menu { min-width: 135px; }
  .currency-dropdown .scenario-menu { min-width: 80px; }
  .scenario-item {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
  }
  .scenario-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
  }
  .scenario-item.wip {
    pointer-events: none;
    opacity: 0.4;
  }
  .si-icon { vertical-align: -2px; opacity: 0.5; margin-right: 2px; }
  .si-green, .si-amber, .si-red { font-size: 0.45rem; vertical-align: middle; }
  .si-green { color: var(--accent-green); }
  .si-amber { color: var(--accent-amber); }
  .si-red   { color: var(--accent-red); }
  .btn-clear-all {
    background: var(--surface-2);
    color: var(--text-dim);
  }
  .btn-clear-all:hover {
    background: rgba(255,107,47,0.15);
    color: var(--accent-red);
    border-color: var(--accent-red);
  }

  /* Pill toggle — shared styles */
  .pill-toggle, .industry-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    background: var(--surface-2);
  }
  /* Sliding highlight indicator */
  .pill-toggle::before, .industry-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc(25% - 3px);
    border-radius: 6px;
    background: rgba(59,130,246,0.18);
    box-shadow: 0 0 12px rgba(12,99,255,0.15), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
  }
  /* 3-pill variant */
  .pill-toggle.pills-3::before {
    width: calc(33.333% - 3px);
  }
  /* Slide positions — set via data-active attribute on container */
  .pill-toggle[data-active="0"]::before, .industry-toggle[data-active="0"]::before { transform: translateX(0); }
  .pill-toggle[data-active="1"]::before, .industry-toggle[data-active="1"]::before { transform: translateX(calc(100% + 2px)); }
  .pill-toggle[data-active="2"]::before, .industry-toggle[data-active="2"]::before { transform: translateX(calc(200% + 4px)); }
  .pill-toggle[data-active="3"]::before, .industry-toggle[data-active="3"]::before { transform: translateX(calc(300% + 6px)); }

  .pill-btn, .industry-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 10px 4px;
    border: none;
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.25s ease, transform 0.15s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
  }
  .pill-btn:last-child, .industry-pill:last-child {
    border-right: none;
  }
  .pill-btn:hover:not(.active), .industry-pill:hover:not(.active) {
    color: var(--text);
  }
  .pill-btn:active, .industry-pill:active {
    transform: scale(0.96);
  }
  .pill-btn.active, .industry-pill.active {
    color: #fff;
  }
  .pill-btn.active svg, .industry-pill.active svg {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 3px rgba(12,99,255,0.4));
    transition: color 0.25s ease, filter 0.35s ease;
  }
  .pill-btn svg, .industry-pill svg {
    flex-shrink: 0;
    transition: color 0.25s ease, filter 0.35s ease;
  }

  /* Per-section Reset / Clear buttons */
  .section-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .section-actions button {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    line-height: 1.4;
  }
  .btn-section-reset {
    background: var(--surface-2);
    color: var(--text-dim);
  }
  .btn-section-reset:hover {
    background: var(--accent-amber);
    color: #111;
    border-color: var(--accent-amber);
  }
  .btn-section-clear {
    background: transparent;
    color: var(--text-dim);
  }
  .btn-section-clear:hover {
    background: rgba(255,107,47,0.15);
    color: var(--accent-red);
    border-color: var(--accent-red);
  }

  /* Copy Inputs button */
  .copy-inputs-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    opacity: 0.4;
    cursor: default;
    transition: all 0.2s;
    margin: 12px 0 4px;
    font-family: inherit;
  }
  .copy-inputs-btn .btn-label,
  .copy-inputs-btn .btn-restricted,
  .copy-inputs-btn .btn-missing {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
  }
  .copy-inputs-btn .btn-restricted,
  .copy-inputs-btn .btn-missing {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
  }
  .copy-inputs-btn .btn-missing {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
  }
  .copy-inputs-btn:not(.active):hover {
    opacity: 0.6;
  }
  .copy-inputs-btn:not(.active):hover .btn-label { opacity: 0; }
  /* Logged out: show Restricted on hover */
  .copy-inputs-btn:not(.active):not(.logged-in):hover .btn-restricted { opacity: 1; }
  /* Logged in but incomplete: show Missing Field Values on hover */
  .copy-inputs-btn.logged-in:not(.active):hover .btn-missing { opacity: 1; }
  .copy-inputs-btn.active {
    opacity: 1;
    cursor: pointer;
    color: var(--text-secondary);
  }
  .copy-inputs-btn.active:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
  }
  .copy-inputs-btn.active:hover svg {
    stroke: var(--accent-green);
  }
  .copy-inputs-btn.copied {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(89,233,0,0.08);
  }
  .copy-inputs-btn.copied svg {
    stroke: var(--accent-green);
  }
  .page-layout.inputs-only-mode .copy-inputs-btn { display: none; }

  /* Verify Inputs overlay */
  .verify-inputs-msg {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 40px;
    gap: 18px;
    flex: 1;
  }
  .verify-inputs-msg.visible {
    display: flex;
  }
  .verify-inputs-msg svg {
    opacity: 0.8;
    color: #ff6b2f;
    width: 68px;
    height: 68px;
  }
  .verify-inputs-msg p {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-dim);
  }
  .verify-inputs-msg span {
    font-size: 15px;
    color: var(--text-dim);
    opacity: 0.6;
  }

  .sidebar {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0 24px 48px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    transition: opacity 0.3s ease 0.1s, padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar::-webkit-scrollbar {
    width: 6px;
  }
  .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  .sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }

  /* Right main area */
  .main-content {
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    min-width: 0;
    padding: 0 14px 24px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .main-content::-webkit-scrollbar {
    width: 6px;
  }
  .main-content::-webkit-scrollbar-track {
    background: transparent;
  }
  .main-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }

  /* Insights & Reports filter bar */
  .insights-header {
    display: flex;
    align-items: center;
    padding: 12px 0 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(2, 8, 10, 0.92);
    min-height: 52px;
  }
  #section_metrics,
  #section_charts,
  #section_calculations,
  #section_opportunities,
  #section_exitvelocity {
    scroll-margin-top: 70px;
  }
  .insights-header h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c8d0d6;
    white-space: nowrap;
    margin-right: 16px;
    position: relative;
    top: 1px;
  }
  .insights-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .insights-filter-btn {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    height: 28px;
    padding: 0 12px 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
  }
  .insights-filter-btn svg {
    position: relative;
    top: 1px;
  }
  .insights-filter-btn[data-filter="metrics"].active {
    background: rgba(12,99,255,0.12);
    color: #fff;
    border-color: rgba(12,99,255,0.45);
  }
  .insights-filter-btn[data-filter="charts"].active {
    background: rgba(89,233,0,0.12);
    color: #fff;
    border-color: rgba(89,233,0,0.45);
  }
  .insights-filter-btn[data-filter="calculations"].active {
    background: rgba(239,151,25,0.12);
    color: #fff;
    border-color: rgba(239,151,25,0.45);
  }
  .insights-filter-btn[data-filter="opportunities"].active {
    background: rgba(0,212,255,0.12);
    color: #fff;
    border-color: rgba(0,212,255,0.45);
  }
  .insights-filter-btn[data-filter="exitvelocity"].active {
    background: rgba(255,107,47,0.12);
    color: #fff;
    border-color: rgba(255,107,47,0.45);
  }
  /* Hover styles only for pointer devices — prevents ghost highlights on touch/tablet */
  @media (hover: hover) {
    .insights-filter-btn[data-filter="metrics"]:hover {
      background: rgba(12,99,255,0.12);
      color: #fff;
      border-color: rgba(12,99,255,0.45);
    }
    .insights-filter-btn[data-filter="charts"]:hover {
      background: rgba(89,233,0,0.12);
      color: #fff;
      border-color: rgba(89,233,0,0.45);
    }
    .insights-filter-btn[data-filter="calculations"]:hover {
      background: rgba(239,151,25,0.12);
      color: #fff;
      border-color: rgba(239,151,25,0.45);
    }
    .insights-filter-btn[data-filter="opportunities"]:hover {
      background: rgba(0,212,255,0.12);
      color: #fff;
      border-color: rgba(0,212,255,0.45);
    }
    .insights-filter-btn[data-filter="exitvelocity"]:hover {
      background: rgba(255,107,47,0.12);
      color: #fff;
      border-color: rgba(255,107,47,0.45);
    }
  }
  .insights-filter-dropdown {
    display: none;
    position: relative;
    top: -1px;
  }
  .insights-filter-toggle {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 0 22px 0 8px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a82' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    text-align: left;
    transition: all 0.2s;
  }
  .insights-filter-toggle:hover {
    border-color: var(--accent-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230c63ff' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  .insights-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* Collapsible Funnel Sections */
  .funnel-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.4s ease, background 1.2s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.6s ease;
    margin-bottom: 20px;
  }
  #sec_current  { background: linear-gradient(to right, rgba(12,99,255,0.09) 0%, var(--surface) 100%); }
  #sec_marketing { background: linear-gradient(to right, rgba(255,107,47,0.09) 0%, var(--surface) 100%); }
  #sec_sales     { background: linear-gradient(to right, rgba(89,233,0,0.09) 0%, var(--surface) 100%); }
  #sec_postsale  { background: linear-gradient(to right, rgba(0,189,165,0.09) 0%, var(--surface) 100%); }
  .funnel-section:last-child {
    margin-bottom: 0;
  }
  .funnel-section:hover {
    border-color: #254035;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  #sec_current:hover  { background: linear-gradient(to right, rgba(12,99,255,0.11) 0%, var(--surface) 100%); border-color: rgba(12,99,255,0.4); }
  #sec_marketing:hover { background: linear-gradient(to right, rgba(255,107,47,0.11) 0%, var(--surface) 100%); border-color: rgba(255,107,47,0.4); }
  #sec_sales:hover     { background: linear-gradient(to right, rgba(89,233,0,0.11) 0%, var(--surface) 100%); border-color: rgba(89,233,0,0.4); }
  #sec_postsale:hover  { background: linear-gradient(to right, rgba(0,189,165,0.11) 0%, var(--surface) 100%); border-color: rgba(0,189,165,0.4); }

  .section-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    position: relative;
  }
  #sec_current .section-header {
    background: linear-gradient(135deg, rgba(12,99,255,0.10) 0%, rgba(12,99,255,0.04) 100%);
  }
  #sec_current .section-header:hover {
    background: linear-gradient(135deg, rgba(12,99,255,0.12) 0%, rgba(12,99,255,0.05) 100%);
  }
  #sec_marketing .section-header {
    background: linear-gradient(135deg, rgba(255,107,47,0.10) 0%, rgba(239,151,25,0.05) 100%);
  }
  #sec_marketing .section-header:hover {
    background: linear-gradient(135deg, rgba(255,107,47,0.12) 0%, rgba(239,151,25,0.06) 100%);
  }
  #sec_sales .section-header {
    background: linear-gradient(135deg, rgba(89,233,0,0.10) 0%, rgba(0,189,165,0.05) 100%);
  }
  #sec_sales .section-header:hover {
    background: linear-gradient(135deg, rgba(89,233,0,0.12) 0%, rgba(0,189,165,0.06) 100%);
  }
  #sec_postsale .section-header {
    background: linear-gradient(135deg, rgba(0,189,165,0.10) 0%, rgba(12,99,255,0.05) 100%);
  }
  #sec_postsale .section-header:hover {
    background: linear-gradient(135deg, rgba(0,189,165,0.12) 0%, rgba(12,99,255,0.06) 100%);
  }
  .section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  .section-icon.current-biz { background: rgba(12,99,255,0.12); color: var(--accent-blue); }
  .section-icon.marketing { background: rgba(255,107,47,0.12); color: var(--accent-orange); }
  .section-icon.sales { background: rgba(89,233,0,0.12); color: var(--accent-green); }
  .section-icon.postsale { background: rgba(0,189,165,0.12); color: var(--accent-cyan); }
  .section-icon.devmode { background: rgba(255,107,53,0.12); color: #ff6b35; }

  /* Advanced / RevOps Boost section — always visible, editability gated by auth tier */
  .devmode-section { display: block; }

  /* Tier 1: logged out — entire section-body dimmed & blocked */
  .boost-locked .section-body {
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
  }
  /* Lock icon in section header — only visible when locked */
  .boost-header-lock {
    display: none;
    font-size: 0.85rem;
    margin-left: auto;
    margin-right: 28px;
    opacity: 0.5;
  }
  .boost-locked .boost-header-lock {
    display: inline;
  }
  /* Glossy blur overlay — covers section-body only, visible on hover */
  .boost-locked {
    position: relative;
  }
  .boost-locked .section-body {
    position: relative;
  }
  .boost-locked .section-body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 8, 10, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  /* Lock overlay content — hidden by default, shown on hover */
  .boost-lock-overlay {
    position: absolute;
    top: calc(50% + 16px); left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    width: max-content;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .boost-lock-overlay .lock-icon {
    font-size: 1.3rem;
    line-height: 1;
    margin-bottom: 4px;
  }
  .boost-lock-overlay .lock-title {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
  }
  .boost-lock-overlay .lock-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    white-space: nowrap;
  }
  .boost-lock-overlay .lock-signin-btn {
    margin-top: 10px;
    padding: 8px 28px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0a1a1f;
    background: var(--accent-green);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    pointer-events: auto;
    transition: box-shadow 0.2s ease;
  }
  .boost-lock-overlay .lock-signin-btn:hover {
    box-shadow: 0 0 12px rgba(89, 233, 0, 0.5), 0 0 24px rgba(89, 233, 0, 0.25);
  }
  .boost-locked:hover .section-body::before,
  .boost-locked:hover .boost-lock-overlay {
    opacity: 1;
  }
  .boost-locked.collapsed:hover .boost-lock-overlay,
  .boost-locked.simple-collapsed:hover .boost-lock-overlay {
    opacity: 0;
  }

  /* Tier 2: logged in (non-allowlist) — individual input-groups dimmed & blocked */
  .boost-tier2-locked {
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
    position: relative;
  }
  .boost-tier2-locked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 10, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .boost-tier2-locked::after {
    content: '\1F512';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .boost-tier2-locked:hover::before,
  .boost-tier2-locked:hover::after {
    opacity: 1;
  }
  .devmode-phase-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 12px 0 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }
  .phase-input-row {
    display: flex;
    gap: 12px;
  }
  .phase-input-row .input-group {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  .section-header h2 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: -2px;
  }
  .section-header .subtitle {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0px;
  }
  .missing-count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-red);
    background: rgba(255,107,47,0.12);
    border: 1px solid rgba(255,107,47,0.25);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    z-index: 2;
  }
  .missing-count.hidden {
    display: none;
  }
  .page-layout.inputs-only-mode .missing-count {
    right: 20px;
  }
  .collapse-icon {
    color: var(--text-dim);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 2;
  }
  .funnel-section.collapsed .collapse-icon {
    transform: translateY(-50%) rotate(-90deg);
  }
  .funnel-section.collapsed .section-header {
    border-bottom-color: transparent;
  }

  .section-body {
    padding: 16px 20px 20px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
    max-height: 800px;
    opacity: 1;
    overflow: hidden;
  }
  .funnel-section.collapsed .section-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
  }
  /* Per-section colored border when all inputs have been touched (no amber outlines remain) */
  .funnel-section.section-touched-gtm {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px rgba(12,99,255,0.15), 0 0 12px rgba(12,99,255,0.06);
  }
  .funnel-section.section-touched-marketing {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 1px rgba(255,107,47,0.15), 0 0 12px rgba(255,107,47,0.06);
  }
  .funnel-section.section-touched-sales {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 1px rgba(89,233,0,0.15), 0 0 12px rgba(89,233,0,0.06);
  }
  .funnel-section.section-touched-postsale {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px rgba(0,189,165,0.15), 0 0 12px rgba(0,189,165,0.06);
  }
  .funnel-section.section-touched-devmode {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 1px rgba(89,233,0,0.15), 0 0 12px rgba(89,233,0,0.06);
  }
  #sec_current.section-touched-gtm:hover {
    border-color: var(--accent-blue);
    background: linear-gradient(to right, rgba(12,99,255,0.11) 0%, var(--surface) 100%);
    box-shadow: 0 0 0 1px rgba(12,99,255,0.2), 0 4px 16px rgba(0,0,0,0.2);
  }
  #sec_marketing.section-touched-marketing:hover {
    border-color: var(--accent-orange);
    background: linear-gradient(to right, rgba(255,107,47,0.11) 0%, var(--surface) 100%);
    box-shadow: 0 0 0 1px rgba(255,107,47,0.2), 0 4px 16px rgba(0,0,0,0.2);
  }
  #sec_sales.section-touched-sales:hover {
    border-color: var(--accent-green);
    background: linear-gradient(to right, rgba(89,233,0,0.11) 0%, var(--surface) 100%);
    box-shadow: 0 0 0 1px rgba(89,233,0,0.2), 0 4px 16px rgba(0,0,0,0.2);
  }
  #sec_postsale.section-touched-postsale:hover {
    border-color: var(--accent-cyan);
    background: linear-gradient(to right, rgba(0,189,165,0.11) 0%, var(--surface) 100%);
    box-shadow: 0 0 0 1px rgba(0,189,165,0.2), 0 4px 16px rgba(0,0,0,0.2);
  }
  #sec_devmode.section-touched-devmode:hover {
    border-color: var(--accent-green);
    background: linear-gradient(to right, rgba(89,233,0,0.11) 0%, var(--surface) 100%);
    box-shadow: 0 0 0 1px rgba(89,233,0,0.2), 0 4px 16px rgba(0,0,0,0.2);
  }

  /* Default input pulsing outline */
  .input-default .input-wrap input,
  .input-default .slider-input-wrap input[type="number"],
  .input-default select {
    border-color: var(--accent-amber) !important;
    animation: pulseDefault 2.5s ease-in-out infinite;
  }
  .input-default .pill-toggle,
  .input-default .industry-toggle {
    border-color: var(--accent-amber) !important;
    animation: pulseDefault 2.5s ease-in-out infinite;
  }
  /* Slider thumb turns amber when untouched */
  .input-default .slider-wrap input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-amber) !important;
    box-shadow: 0 0 0 1px var(--accent-amber) !important;
  }
  .input-default .slider-wrap input[type="range"]::-moz-range-thumb {
    background: var(--accent-amber) !important;
    box-shadow: 0 0 0 1px var(--accent-amber) !important;
  }
  /* Hide slider thumb when value is empty */
  .slider-empty .slider-wrap input[type="range"]::-webkit-slider-thumb {
    opacity: 0 !important;
    pointer-events: none;
  }
  .slider-empty .slider-wrap input[type="range"]::-moz-range-thumb {
    opacity: 0 !important;
    pointer-events: none;
  }
  @keyframes pulseDefault {
    0%, 100% { box-shadow: 0 0 0 1px rgba(239,151,25,0.3); }
    50% { box-shadow: 0 0 0 3px rgba(239,151,25,0.15), 0 0 8px rgba(239,151,25,0.1); }
  }

  /* Input validation error — red border + pulse */
  .input-error .input-wrap input {
    border-color: var(--accent-red) !important;
    animation: pulseError 2.5s ease-in-out infinite;
  }
  @keyframes pulseError {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255,107,47,0.3); }
    50% { box-shadow: 0 0 0 3px rgba(255,107,47,0.15), 0 0 8px rgba(255,107,47,0.1); }
  }

  /* Section warning icon — shown next to missing-count badge */
  .section-warning-icon {
    color: var(--accent-red);
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    z-index: 2;
  }
  .section-warning-icon.hidden {
    display: none;
  }
  /* Shift warning icon left when missing-count is also visible */
  .missing-count:not(.hidden) ~ .section-warning-icon {
    right: 80px;
  }

  /* Input Groups */
  .input-group {
    margin-bottom: 14px;
  }
  .input-group:last-child { margin-bottom: 0; }

  .input-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .input-divider::before,
  .input-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    opacity: 0.5;
  }
  .market-share-guide {
    font-size: 0.68rem;
    color: var(--text-dim);
    opacity: 0.7;
    margin-top: 2px;
    font-style: normal;
  }
  .input-warning {
    font-size: 0.68rem;
    color: var(--accent-red);
    margin-top: 4px;
    line-height: 1.3;
  }
  .input-warning.hidden {
    display: none;
  }

  .input-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 5px;
    font-weight: 500;
  }
  .input-group label .tooltip {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    vertical-align: middle;
    top: -1px;
    margin-left: 4px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .input-group label .tooltip:hover {
    box-shadow: 0 0 8px 2px rgba(239,151,25,0.45);
    border-color: rgba(239,151,25,0.6);
  }
  .tooltip-popup {
    position: fixed;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 400;
    z-index: 999999;
    white-space: normal;
    line-height: 1.4;
    pointer-events: none;
  }
  .tooltip-popup .tip-calc {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-weight: 600;
    color: var(--accent-cyan);
  }
  .tooltip-popup.tip-current .tip-calc { color: var(--accent-blue); }
  .tooltip-popup.tip-marketing .tip-calc { color: var(--accent-orange); }
  .tooltip-popup.tip-sales .tip-calc { color: var(--accent-green); }
  .tooltip-popup.tip-postsale .tip-calc { color: var(--accent-cyan); }
  .tooltip-popup.tip-orange .tip-calc { color: var(--accent-orange); }

  .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  .input-wrap .prefix,
  .input-wrap .suffix {
    position: absolute;
    color: var(--text-dim);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
  }
  .input-wrap .prefix { left: 6px; margin-top: 1px; }
  .input-wrap .suffix { right: 14px; }

  input[type="number"],
  .input-wrap input[type="text"] {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
  }
  input[type="number"]::-webkit-outer-spin-button,
  input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
  }
  input[type="number"]:focus,
  .input-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12);
  }
  input.has-prefix { padding-left: 34px; }
  input.has-suffix { padding-right: 36px; }

  /* Select dropdowns */
  .input-group select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 32px 9px 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a82' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .input-group select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12);
  }
  .input-group select:invalid {
    color: var(--text-dim);
    font-weight: 400;
  }
  .input-group select option {
    background: var(--surface);
    color: var(--text);
  }
  /* Revenue mix subtitle */
  .rev-mix-subtitle {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 4px;
    opacity: 0.7;
  }

  /* Slider inputs */
  .slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .slider-wrap input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
  }
  .slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-green);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--accent-green);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 1px var(--accent-green), 0 0 8px rgba(89,233,0,0.4);
  }
  .slider-wrap input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-green);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--accent-green);
    cursor: pointer;
  }
  .slider-wrap input[type="range"]::-moz-range-track {
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
  }
  .slider-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .slider-input-wrap input[type="number"] {
    width: 58px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 22px 5px 6px;
    font-family: inherit;
    -moz-appearance: textfield;
  }
  .slider-input-wrap input[type="number"]::-webkit-outer-spin-button,
  .slider-input-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
  }
  .slider-input-wrap input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12);
  }
  /* Per-section input colors */
  /* GTM & RevOps - blue */
  #sec_current .slider-wrap input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue);
  }
  #sec_current .slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 1px var(--accent-blue), 0 0 8px rgba(12,99,255,0.4);
  }
  #sec_current .slider-wrap input[type="range"]::-moz-range-thumb {
    background: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue);
  }
  #sec_current input[type="number"]:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(12,99,255,0.12);
  }
  #sec_current .slider-input-wrap input[type="number"]:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(12,99,255,0.12);
  }
  #sec_current .input-wrap input[type="text"]:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(12,99,255,0.12);
  }
  #sec_current .input-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(12,99,255,0.12);
  }

  /* Marketing - orange/red */
  #sec_marketing .slider-wrap input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-orange);
    box-shadow: 0 0 0 1px var(--accent-orange);
  }
  #sec_marketing .slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 1px var(--accent-orange), 0 0 8px rgba(255,107,47,0.4);
  }
  #sec_marketing .slider-wrap input[type="range"]::-moz-range-thumb {
    background: var(--accent-orange);
    box-shadow: 0 0 0 1px var(--accent-orange);
  }
  #sec_marketing input[type="number"]:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255,107,47,0.12);
  }
  #sec_marketing .slider-input-wrap input[type="number"]:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255,107,47,0.12);
  }
  #sec_marketing .input-wrap input[type="text"]:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255,107,47,0.12);
  }

  /* Sales - green */
  #sec_sales .slider-wrap input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-green);
    box-shadow: 0 0 0 1px var(--accent-green);
  }
  #sec_sales .slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 1px var(--accent-green), 0 0 8px rgba(89,233,0,0.4);
  }
  #sec_sales .slider-wrap input[type="range"]::-moz-range-thumb {
    background: var(--accent-green);
    box-shadow: 0 0 0 1px var(--accent-green);
  }
  #sec_sales input[type="number"]:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12);
  }
  #sec_sales .slider-input-wrap input[type="number"]:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12);
  }
  #sec_sales .input-wrap input[type="text"]:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12);
  }

  /* Post-Sale - cyan/blue */
  #sec_postsale .slider-wrap input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan);
  }
  #sec_postsale .slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 1px var(--accent-cyan), 0 0 8px rgba(0,189,165,0.4);
  }
  #sec_postsale .slider-wrap input[type="range"]::-moz-range-thumb {
    background: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan);
  }
  #sec_postsale input[type="number"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0,189,165,0.12);
  }
  #sec_postsale .slider-input-wrap input[type="number"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0,189,165,0.12);
  }
  #sec_postsale .input-wrap input[type="text"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0,189,165,0.12);
  }

  .slider-input-wrap .unit {
    position: absolute;
    right: 7px;
    font-size: 0.75rem;
    color: var(--text-dim);
    pointer-events: none;
  }

  /* Health status icons */
  .health-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    margin-right: 4px;
    font-size: 0.72rem;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .health-icon.good { color: var(--accent-green); }
  .health-icon.poor { color: var(--accent-red); }
  .opp-tip .opp-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    margin-right: 5px;
    font-size: 0.78rem;
    flex-shrink: 0;
    vertical-align: middle;
  }

  /* Section containers — wraps each major block */
  .dashboard-section,
  .charts-section,
  .opportunities-wrapper {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
  }
  #section_metrics { background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%); border-color: rgba(12,99,255,0.25); }
  #section_charts { background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%); border-color: rgba(89,233,0,0.25); }
  #section_calculations { background: linear-gradient(to right, rgba(239,151,25,0.07) 0%, var(--surface) 100%); border-color: rgba(239,151,25,0.25); }
  #section_opportunities { background: linear-gradient(to right, rgba(0,212,255,0.07) 0%, var(--surface) 100%); border-color: rgba(0,212,255,0.25); }
  #section_exitvelocity { background: linear-gradient(to right, rgba(255,107,47,0.07) 0%, var(--surface) 100%); border-color: rgba(255,107,47,0.25); }

  /* Output Dashboard */
  .dashboard {
    margin-top: 0;
    min-width: 0;
    overflow: hidden;
  }
  .dashboard-title {
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(to right, rgba(255,152,0,0.14) 0%, var(--surface) 100%);
    border: 3px solid rgba(255,152,0,0.65);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.92);
  }
  .dashboard-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--accent-green), var(--accent-cyan));
    border-radius: 2px;
    flex-shrink: 0;
  }
  .dashboard-title.no-bar::before { display: none; }
  /* Per-section title colors matching bookmark icons */
  #section_metrics .dashboard-title {
    border-color: rgba(12,99,255,0.5);
    background: linear-gradient(to right, rgba(12,99,255,0.14) 0%, var(--surface) 100%);
  }
  .dashboard-title.charts-title {
    border-color: rgba(89,233,0,0.5);
    background: linear-gradient(to right, rgba(89,233,0,0.14) 0%, var(--surface) 100%);
  }
  .dashboard-title > span:first-of-type { flex: none; }

  /* Show All toggle — bottom of section, matches view-toggle pattern */
  .show-all-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .show-all-toggle.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .show-all-track {
    position: relative;
    width: 32px;
    height: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow: visible;
  }
  .show-all-toggle:hover .show-all-track {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
  }
  .show-all-thumb {
    position: absolute;
    top: 0px;
    left: -1px;
    width: 16px;
    height: 16px;
    background: var(--text-dim);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .show-all-toggle.on .show-all-track {
    background: rgba(89,233,0,0.7);
  }
  .show-all-toggle.on .show-all-thumb {
    left: 15px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .show-all-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
    transition: color 0.25s ease;
  }
  .show-all-toggle.on .show-all-label {
    color: rgba(255,255,255,0.4);
  }
  /* Show All active — force all cards/rows visible */
  .show-all-active .kpi-row,
  .show-all-active .kpi-card,
  .show-all-active .chart-card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .show-all-active .kpi-grid {
    display: flex !important;
  }
  .section-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: -6px;
    margin-right: -7px;
  }
  .section-icon svg { width: 22px; height: 22px; }

  /* Section title tooltips */
  .section-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-left: 0;
    vertical-align: middle;
  }
  .section-tip svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
  }
  .section-tip:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: rgba(239,151,25,0.6);
    box-shadow: 0 0 8px 2px rgba(239,151,25,0.45);
  }
  .section-tip-popup {
    position: absolute;
    top: calc(100% + 10px);
    left: -8px;
    transform: translateY(4px);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 99999;
    transition: opacity 0.25s ease, transform 0.25s ease;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
  }
  .section-tip-popup::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 12px;
    transform: rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--surface-2);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
  }
  .section-tip:hover .section-tip-popup {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Rate-Gate Processing Badge */
  @keyframes rateBadgePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
  }
  .rate-badge {
    position: relative;
    display: none;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.10);
    border: 1px solid rgba(255, 77, 77, 0.30);
    border-radius: 6px;
    padding: 5px 10px;
    white-space: nowrap;
    cursor: pointer;
    animation: rateBadgePulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
    margin-left: 4px;
  }
  .rate-badge.active {
    display: inline-flex;
  }
  .rate-badge-dots {
    letter-spacing: 0.12em;
  }
  .rate-badge-short {
    display: none;
  }
  .rate-badge-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 99999;
    transition: opacity 0.25s ease, transform 0.25s ease;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    cursor: default;
    text-decoration: none;
  }
  .rate-badge-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--surface-2);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
  }
  .rate-badge:hover .rate-badge-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  /* Conversion Funnel Table Section */
  .funnel-table-section {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
  }
  .funnel-table-title {
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(to right, rgba(255,152,0,0.14) 0%, var(--surface) 100%);
    border: 3px solid rgba(255,152,0,0.65);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.92);
  }
  .funnel-table-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--accent-green), var(--accent-cyan));
    border-radius: 2px;
    flex-shrink: 0;
  }
  .funnel-table-title.no-bar::before { display: none; }
  .funnel-table-title > span:first-of-type { flex: none; }
  .title-mobile { display: none; }

  /* Horizontal funnel flow */
  .cf-flow {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    padding: 4px 0 8px;
  }
  .cf-row-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    color: var(--text);
    margin-bottom: 6px;
    padding-left: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .cf-row-label + .cf-flow { margin-top: 0; }
  .cf-flow + .cf-row-label { margin-top: 12px; }
  .cf-note {
    text-align: left;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin: 10px 0 0 0;
    font-style: normal;
  }
  .cf-flow + .cf-flow {
    margin-top: 10px;
  }
  .cf-stage {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 6px 10px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .cf-stage::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    transform: translateX(-100%);
    z-index: 0;
  }
  .cf-stage:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
  .cf-stage:hover {
    border-color: #254035;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .cf-stage::before {
    content: none;
  }
  .cf-stage.cf-leads, .cf-stage.cf-conv, .cf-stage.cf-pqls, .cf-stage.cf-mktsqls { border-color: rgba(255,107,47,0.35); background: linear-gradient(to right, rgba(255,107,47,0.06) 0%, rgba(255,107,47,0.02) 100%); }
  .cf-stage.cf-leads::after, .cf-stage.cf-conv::after, .cf-stage.cf-pqls::after, .cf-stage.cf-mktsqls::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,152,0,0.14) 0%, transparent 70%); }
  .cf-stage.cf-sqls, .cf-stage.cf-sqlconv, .cf-stage.cf-opps, .cf-stage.cf-winrate, .cf-stage.cf-salessqls { border-color: rgba(89,233,0,0.35); background: linear-gradient(to right, rgba(89,233,0,0.06) 0%, rgba(89,233,0,0.02) 100%); }
  .cf-stage.cf-sqls::after, .cf-stage.cf-sqlconv::after, .cf-stage.cf-salessqls::after, .cf-stage.cf-opps::after, .cf-stage.cf-winrate::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.14) 0%, transparent 70%); }
  .cf-stage.cf-deals, .cf-stage.cf-deals2, .cf-stage.cf-acv, .cf-stage.cf-revenue { border-color: rgba(12,99,255,0.35); background: linear-gradient(to right, rgba(12,99,255,0.06) 0%, rgba(12,99,255,0.02) 100%); }
  .cf-stage.cf-deals::after, .cf-stage.cf-deals2::after, .cf-stage.cf-acv::after, .cf-stage.cf-revenue::after { background: radial-gradient(ellipse at 30% 50%, rgba(12,99,255,0.14) 0%, transparent 70%); }

  /* Grouped leads container (MKT Leads + PQLs) */
  .cf-group {
    flex: 2;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .cf-group::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    transform: translateX(-100%);
    z-index: 0;
  }
  .cf-group:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
  .cf-group:hover {
    border-color: #254035;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .cf-group::before {
    content: none;
  }
  .cf-group .cf-stage {
    flex: 1;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
  }
  .cf-group .cf-stage::before {
    display: none;
  }
  .cf-group .cf-stage::after {
    display: none;
  }
  .cf-group .cf-stage:hover {
    border-color: transparent;
    transform: none;
    box-shadow: none;
  }
  .cf-group.cf-leads {
    flex: 2;
  }
  .cf-group.cf-sqlsrc-group::before {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-green));
  }
  /* Group border colors + gradients */
  .cf-group.cf-leads { border-color: rgba(255,107,47,0.35); background: linear-gradient(to right, rgba(255,107,47,0.06) 0%, rgba(255,107,47,0.02) 100%); }
  .cf-group.cf-sqlsrc-group { border-color: rgba(255,107,47,0.25); background: linear-gradient(to right, rgba(255,107,47,0.04) 0%, rgba(89,233,0,0.04) 100%); }
  .cf-group.cf-sqls-group, .cf-group.cf-opps-group { border-color: rgba(89,233,0,0.35); background: linear-gradient(to right, rgba(89,233,0,0.06) 0%, rgba(89,233,0,0.02) 100%); }
  .cf-group.cf-rev-group { border-color: rgba(89,233,0,0.35); background: linear-gradient(to right, rgba(89,233,0,0.06) 0%, rgba(89,233,0,0.02) 100%); }
  /* Group hover gradients */
  .cf-group.cf-leads::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,152,0,0.14) 0%, transparent 70%); }
  .cf-group.cf-sqlsrc-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,152,0,0.08) 0%, rgba(89,233,0,0.08) 50%, transparent 70%); }
  .cf-group.cf-sqls-group::after, .cf-group.cf-opps-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.14) 0%, transparent 70%); }
  .cf-group.cf-rev-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.14) 0%, transparent 70%); }
  .cf-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-orange);
    opacity: 0.7;
  }
  .cf-plus.cf-plus-green {
    color: var(--accent-green);
  }
  .cf-plus.cf-plus-cyan {
    color: var(--accent-cyan);
  }
  .cf-plus.cf-plus-blue {
    color: var(--accent-blue);
  }
  .cf-plus.cf-plus-grey {
    color: var(--text-dim);
  }
  .cf-group.cf-velocity-group { flex: 2; border-color: rgba(89,233,0,0.25); background: linear-gradient(to right, rgba(89,233,0,0.04) 0%, rgba(12,99,255,0.04) 100%); }
  .cf-group.cf-velocity-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.08) 0%, rgba(12,99,255,0.08) 50%, transparent 70%); }
  .cf-group.cf-cycle-group { border-color: rgba(89,233,0,0.35); background: linear-gradient(to right, rgba(89,233,0,0.06) 0%, rgba(89,233,0,0.02) 100%); }
  .cf-group.cf-cycle-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.14) 0%, transparent 70%); }
  .cf-stage.cf-cycle, .cf-stage.cf-vel-result { border-color: rgba(89,233,0,0.35); background: linear-gradient(to right, rgba(89,233,0,0.06) 0%, rgba(89,233,0,0.02) 100%); }
  .cf-stage.cf-vel-result::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.14) 0%, transparent 70%); }
  .cf-group.cf-rev-result-group { border-color: rgba(89,233,0,0.35); background: linear-gradient(to right, rgba(89,233,0,0.06) 0%, rgba(89,233,0,0.02) 100%); }
  .cf-group.cf-rev-result-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.14) 0%, transparent 70%); }
  .cf-group.cf-ltv-group { flex: 3; border-color: rgba(0,189,165,0.35); background: linear-gradient(to right, rgba(0,189,165,0.06) 0%, rgba(0,189,165,0.02) 100%); }
  .cf-group.cf-ltv-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(0,189,165,0.14) 0%, transparent 70%); }
  .cf-stage.cf-margin, .cf-stage.cf-lifetime, .cf-stage.cf-ltv, .cf-stage.cf-ltvcac { border-color: rgba(0,189,165,0.35); background: linear-gradient(to right, rgba(0,189,165,0.06) 0%, rgba(0,189,165,0.02) 100%); }
  .cf-stage.cf-margin::after, .cf-stage.cf-lifetime::after, .cf-stage.cf-ltv::after, .cf-stage.cf-ltvcac::after { background: radial-gradient(ellipse at 30% 50%, rgba(0,189,165,0.14) 0%, transparent 70%); }
  .cf-group.cf-ltvcac-group { border-color: rgba(0,189,165,0.35); background: linear-gradient(to right, rgba(0,189,165,0.06) 0%, rgba(0,189,165,0.02) 100%); }
  .cf-group.cf-ltvcac-group::after { background: radial-gradient(ellipse at 30% 50%, rgba(0,189,165,0.14) 0%, transparent 70%); }
  .cf-stage.cf-cac { border-color: rgba(0,189,165,0.35); background: linear-gradient(to right, rgba(0,189,165,0.06) 0%, rgba(0,189,165,0.02) 100%); }
  .cf-stage.cf-cac::after { background: radial-gradient(ellipse at 30% 50%, rgba(0,189,165,0.14) 0%, transparent 70%); }

  .cf-stage-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-dim);
    margin-top: 2px;
    margin-bottom: 0;
    line-height: 1.3;
    min-height: auto;
    display: flex;
    align-items: center;
    order: 2;
  }
  .cf-stage-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
  }
  .cf-stage-value.clr-orange { color: rgba(255,180,160,0.95); }
  .cf-stage-value.clr-green { color: rgba(160,245,140,0.95); }
  .cf-stage-value.clr-cyan { color: rgba(140,240,220,0.95); }
  .cf-stage-value.clr-blue { color: rgba(170,200,255,0.95); }

  /* Arrow connectors between stages */
  .cf-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    color: var(--text-dim);
    opacity: 0.4;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .chart-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
  }
  .chart-period-toggle {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .chart-period-toggle button {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    color: var(--text-dim);
    border: none;
    padding: 8px 12px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: capitalize;
    letter-spacing: 0.3px;
  }
  .chart-period-toggle button svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.6; transition: opacity 0.2s ease; }
  .toggle-label-short { display: none; }
  .toggle-label-full { display: inline; }
  .chart-period-toggle button.active {
    background: rgba(239,151,25,0.10);
    color: var(--accent-amber);
  }
  .chart-period-toggle button.active svg { opacity: 1; }
  .chart-period-toggle button:not(.active):hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
  }
  .chart-period-toggle button:not(.active):hover svg { opacity: 0.85; }
  .chart-period-toggle button + button { border-left: 1px solid rgba(255,255,255,0.15); }
  .kpi-note {
    text-align: left;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
    font-style: normal;
  }
  .kpi-note-link {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    cursor: pointer;
  }
  .kpi-note-link:hover {
    color: rgba(255,255,255,0.75);
  }
  .kpi-note-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
  }

  .share-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'Archivo', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .share-btn svg {
    color: #59e900;
  }
  .share-btn:hover {
    color: var(--text);
    border-color: var(--accent-green);
    background: rgba(89,233,0,0.2);
  }
  .share-btn.copied {
    color: var(--accent-green);
    border-color: var(--accent-green);
  }
  .ai-prompt-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'Archivo', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .ai-prompt-btn:hover {
    color: var(--text);
    border-color: #9B72CB;
    background: rgba(155,114,203,0.15);
  }
  .ai-prompt-btn.copied {
    color: #9B72CB;
    border-color: #9B72CB;
  }
  .insights-actions .ai-prompt-btn.btn-ready {
    animation: btnReveal 0.5s ease forwards;
  }
  .verify-warning {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    height: 26px;
    white-space: nowrap;
    color: #ff4d4d;
    margin-left: auto;
    background: rgba(255,77,77,0.08);
    border: 1px solid rgba(255,77,77,0.2);
    border-radius: 6px;
    padding: 0 10px;
    box-sizing: border-box;
    flex-shrink: 0;
    text-transform: uppercase;
  }
  .verify-warning svg { width: 12px; height: 12px; flex-shrink: 0; }
  .insights-actions .share-btn.btn-ready {
    animation: btnReveal 0.5s ease forwards;
  }
  @keyframes btnReveal {
    0%   { opacity: 0; transform: scale(0.92); }
    60%  { opacity: 1; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
  }

  /* KPI Cards */
  .kpi-row {
    margin-bottom: 18px;
  }
  .kpi-row:last-child {
    margin-bottom: 28px;
  }
  .kpi-row-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 8px;
    padding-left: 2px;
  }
  .kpi-row-label.gtm { color: var(--accent-blue); }
  .kpi-row-label.marketing { color: var(--accent-orange); }
  .kpi-row-label.sales { color: var(--accent-green); }
  .kpi-row-label.service { color: var(--accent-cyan); }
  .kpi-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  .kpi-card {
    flex: 0 1 calc(33.333% - 11px);
  }
  .kpi-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease, opacity 0.7s ease-in;
  }

  /* Hide cards until recalculate() runs — prevents flash of conditional/hidden cards */
  body:not(.kpi-cards-visible) .kpi-card {
    opacity: 0;
    -webkit-transform: translateZ(0);
  }
  .kpi-card::before {
    content: none;
  }
  .kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    transform: translateX(-100%);
    z-index: 0;
  }
  .kpi-card:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
  .kpi-card:hover {
    border-color: #254035;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .kpi-card.blue { border-color: rgba(89,233,0,0.5); background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%); }
  .kpi-card.blue::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.18) 0%, transparent 70%); }
  .kpi-card.gtm { border-color: rgba(12,99,255,0.5); background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%); }
  .kpi-card.gtm::after { background: radial-gradient(ellipse at 30% 50%, rgba(12,99,255,0.18) 0%, transparent 70%); }
  .kpi-card.green { border-color: rgba(0,189,165,0.5); background: linear-gradient(to right, rgba(0,189,165,0.07) 0%, var(--surface) 100%); }
  .kpi-card.green::after { background: radial-gradient(ellipse at 30% 50%, rgba(0,189,165,0.18) 0%, transparent 70%); }
  .kpi-card.sales { border-color: rgba(89,233,0,0.5); background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%); }
  .kpi-card.sales::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.18) 0%, transparent 70%); }
  .kpi-card.purple { border-color: rgba(255,107,47,0.5); background: linear-gradient(to right, rgba(255,107,47,0.07) 0%, var(--surface) 100%); }
  .kpi-card.purple::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,107,47,0.18) 0%, transparent 70%); }
  .kpi-card.marketing { border-color: rgba(255,107,47,0.5); background: linear-gradient(to right, rgba(255,107,47,0.07) 0%, var(--surface) 100%); }
  .kpi-card.marketing::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,107,47,0.18) 0%, transparent 70%); }
  .kpi-card.orange { border-color: rgba(239,151,25,0.5); background: linear-gradient(to right, rgba(239,151,25,0.07) 0%, var(--surface) 100%); }
  .kpi-card.orange::after { background: radial-gradient(ellipse at 30% 50%, rgba(239,151,25,0.18) 0%, transparent 70%); }

  .currency-label { display: contents; }

  /* Tooltip positioning — conditional then ? aligned far right */
  .kpi-label .tooltip {
    margin-left: auto;
  }
  .kpi-label .tooltip.kpi-conditional + .tooltip {
    margin-left: 0;
  }
  .kpi-label .tooltip.kpi-conditional {
    margin-left: auto;
    color: var(--accent-red);
    border-width: 2px;
    border-color: rgba(255,107,47,0.9);
    background: rgba(255,107,47,0.9);
    flex-shrink: 0;
    min-width: 16px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  }
  .kpi-label .tooltip.kpi-conditional.condition-active {
    color: var(--accent-green);
    border-width: 2px;
    border-color: rgba(89,233,0,0.9);
    background: rgba(89,233,0,0.9);
  }
  .kpi-label .kpi-conditional:hover {
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.2);
  }

  /* Conditional chart indicator — inline after tooltip in chart headers */
  .chart-card h3 .tooltip.chart-conditional {
    color: var(--accent-red);
    border-width: 2px;
    border-color: rgba(255,107,47,0.9);
    background: rgba(255,107,47,0.9);
    margin-left: 0;
    margin-right: -3px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  }
  .chart-card h3 .tooltip.chart-conditional.condition-active {
    color: var(--accent-green);
    border-width: 2px;
    border-color: rgba(89,233,0,0.9);
    background: rgba(89,233,0,0.9);
  }
  .chart-card h3 .chart-conditional:hover {
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.2);
  }

  .mini-metric-label .tooltip.mini-conditional {
    color: var(--accent-red);
    border-width: 2px;
    border-color: rgba(255,107,47,0.9);
    background: rgba(255,107,47,0.9);
    margin-left: auto;
    margin-right: 0;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  }
  .mini-metric-label .tooltip.mini-conditional.condition-active {
    color: var(--accent-green);
    border-width: 2px;
    border-color: rgba(89,233,0,0.9);
    background: rgba(89,233,0,0.9);
  }
  .mini-metric-label .mini-conditional:hover {
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.2);
  }
  .mini-metric-label .tooltip.mini-conditional + .tooltip {
    margin-left: 0;
  }

  .kpi-label, .kpi-value {
    position: relative;
    z-index: 1;
  }
  .kpi-label {
    font-size: 0.85rem;
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .kpi-label .tooltip,
  .cf-row-label .tooltip,
  .chart-card h3 .tooltip,
  .ev-desc .tooltip {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    vertical-align: middle;
    top: -1px;
    margin-left: 4px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .kpi-label .tooltip:first-of-type {
    margin-left: auto;
  }
  .kpi-label .tooltip:hover,
  .cf-row-label .tooltip:hover,
  .chart-card h3 .tooltip:hover,
  .mini-metric-label .tooltip:hover,
  .ev-desc .tooltip:hover,
  .roi-modal-container .tooltip:hover,
  .ev-slider-title-row > .tooltip:hover,
  .ev-invest-box > div > .tooltip:hover,
  .ev-slider-badge.tooltip:hover {
    box-shadow: 0 0 8px 2px rgba(239,151,25,0.45);
    border-color: rgba(239,151,25,0.6);
  }
  .ev-desc .tooltip {
    top: -1px;
  }
  .kpi-value {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.5px;
  }

  /* KPI Split Layout—Current vs Improved */
  .kpi-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    row-gap: 6px;
    position: relative;
    z-index: 1;
    margin: 2px 0 0;
  }
  .kpi-half {
    flex: 1 1 45%;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .kpi-half.current {
    padding-right: 0;
  }
  .kpi-half.improved {
    padding-left: 0;
  }
  .kpi-half-label {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1.4;
    order: 2;
    align-self: flex-start;
  }
  .kpi-half.current .kpi-half-label {
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    cursor: help;
  }
  .kpi-half.improved .kpi-half-label {
    color: var(--text-dim);
    background: rgba(89,233,0,0.08);
    border: 1px solid rgba(89,233,0,0.18);
    cursor: help;
  }
  .boost-tip {
    position: fixed;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    white-space: normal;
    width: max-content;
    max-width: 220px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
  }
  .boost-tip.visible { opacity: 1; }
  .kpi-half-value {
    font-size: clamp(0.85rem, 1.2vw + 0.3rem, 1.65rem);
    font-weight: 400;
    letter-spacing: -0.5px;
    line-height: 1.2;
    white-space: nowrap;
    order: 1;
    transition: color 0.35s ease;
  }

  /* Hide KPI values until JS shimmer completes — prevents flash of numbers before shimmer */
  body:not(.kpi-loaded) .kpi-half-value {
    color: transparent !important;
  }
  body:not(.kpi-loaded) .kpi-half-value .kpi-delta,
  body:not(.kpi-loaded) .kpi-half-value .kpi-unit {
    opacity: 0;
  }

  /* KPI Shimmer Loading */
  @keyframes kpiShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  .kpi-half-value.kpi-loading {
    position: relative;
    color: transparent !important;
    width: 90%;
    height: 1.4em;
    white-space: nowrap;
    overflow: hidden;
    background: linear-gradient(90deg,
      rgba(26,46,54,0.0) 0%,
      rgba(26,46,54,0.6) 25%,
      rgba(42,70,82,0.8) 50%,
      rgba(26,46,54,0.6) 75%,
      rgba(26,46,54,0.0) 100%
    );
    background-size: 200% 100%;
    animation: kpiShimmer 1.8s ease-in-out infinite;
    border-radius: 4px;
    pointer-events: none;
  }
  .kpi-half-value.kpi-loading .kpi-delta,
  .kpi-half-value.kpi-loading .kpi-unit {
    opacity: 0;
  }
  .kpi-unit {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.7;
  }
  .kpi-delta {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.85;
    margin-left: 2px;
    letter-spacing: 0;
  }
  .kpi-half.current .kpi-half-value {
    color: var(--text);
  }
  /* Improved side colors per card type */
  .kpi-card.blue .kpi-half.improved .kpi-half-label { color: var(--text-dim); background: rgba(89,233,0,0.08); border-color: rgba(89,233,0,0.18); }
  .kpi-card.blue .kpi-half.improved .kpi-half-value { color: rgba(160,240,160,0.95); }
  .kpi-card.orange .kpi-half.improved .kpi-half-label { color: var(--text-dim); background: rgba(239,151,25,0.08); border-color: rgba(239,151,25,0.18); }
  .kpi-card.orange .kpi-half.improved .kpi-half-value { color: rgba(255,210,150,0.95); }
  .kpi-card.green .kpi-half.improved .kpi-half-label { color: var(--text-dim); background: rgba(0,189,165,0.08); border-color: rgba(0,189,165,0.18); }
  .kpi-card.green .kpi-half.improved .kpi-half-value { color: rgba(140,240,220,0.95); }
  .kpi-card.sales .kpi-half.improved .kpi-half-label { color: var(--text-dim); background: rgba(89,233,0,0.08); border-color: rgba(89,233,0,0.18); }
  .kpi-card.sales .kpi-half.improved .kpi-half-value { color: rgba(160,245,140,0.95); }
  .kpi-card.gtm .kpi-half.improved .kpi-half-label { color: var(--text-dim); background: rgba(12,99,255,0.08); border-color: rgba(12,99,255,0.18); }
  .kpi-card.gtm .kpi-half.improved .kpi-half-value { color: rgba(170,200,255,0.95); }
  .kpi-card.marketing .kpi-half.improved .kpi-half-label { color: var(--text-dim); background: rgba(255,107,47,0.08); border-color: rgba(255,107,47,0.18); }
  .kpi-card.marketing .kpi-half.improved .kpi-half-value { color: rgba(255,180,160,0.95); }

  /* Mini metric cards — half-size summary cards at top of charts section */
  .mini-metrics-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  .mini-metric-card {
    flex: 1 1 calc(25% - 15px);
    min-width: 180px;
    border: 2px solid rgba(12,99,255,0.5);
    background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  }
  .mini-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    background: linear-gradient(to right, rgba(12,99,255,0.09) 0%, var(--surface) 100%);
    border-color: rgba(12,99,255,0.7);
  }
  .mini-metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .mini-metric-label .tooltip {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    vertical-align: middle;
    top: -1px;
    margin-left: auto;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .mini-metric-value {
    font-size: clamp(1.02rem, 1.2vw + 0.4rem, 1.65rem);
    font-weight: 400;
    letter-spacing: -0.5px;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--text);
    text-align: center;
  }
  .mini-metric-value.mini-loading {
    position: relative;
    color: transparent !important;
    background: linear-gradient(90deg,
      rgba(26,46,54,0.0) 0%,
      rgba(26,46,54,0.6) 25%,
      rgba(42,70,82,0.8) 50%,
      rgba(26,46,54,0.6) 75%,
      rgba(26,46,54,0.0) 100%
    );
    background-size: 200% 100%;
    animation: kpiShimmer 1.8s ease-in-out infinite;
    border-radius: 4px;
    pointer-events: none;
  }

  /* Charts area */
  .charts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    transition: grid-template-columns 0.3s ease;
  }
  .charts-grid.charts-grid-full {
    grid-template-columns: 1fr;
  }
  .charts-grid.charts-grid-full .chart-container {
    height: 275px;
  }
  .chart-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    min-width: 0;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.25);
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  }
  .chart-card.glow-green { border-color: rgba(89,233,0,0.5); background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%); }
  .chart-card.glow-teal { border-color: rgba(0,189,165,0.5); background: linear-gradient(to right, rgba(0,189,165,0.07) 0%, var(--surface) 100%); }
  .chart-card.glow-amber { border-color: rgba(239,151,25,0.5); background: linear-gradient(to right, rgba(239,151,25,0.07) 0%, var(--surface) 100%); }
  .chart-card.glow-orange { border-color: rgba(255,107,47,0.5); background: linear-gradient(to right, rgba(255,107,47,0.07) 0%, var(--surface) 100%); }
  .chart-card.glow-blue { border-color: rgba(12,99,255,0.5); background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%); }
  .chart-card.glow-green:hover { background: linear-gradient(to right, rgba(89,233,0,0.09) 0%, var(--surface) 100%); border-color: rgba(89,233,0,0.7); }
  .chart-card.glow-teal:hover { background: linear-gradient(to right, rgba(0,189,165,0.09) 0%, var(--surface) 100%); border-color: rgba(0,189,165,0.7); }
  .chart-card.glow-amber:hover { background: linear-gradient(to right, rgba(239,151,25,0.09) 0%, var(--surface) 100%); border-color: rgba(239,151,25,0.7); }
  .chart-card.glow-orange:hover { background: linear-gradient(to right, rgba(255,107,47,0.09) 0%, var(--surface) 100%); border-color: rgba(255,107,47,0.7); }
  .chart-card.glow-blue:hover { background: linear-gradient(to right, rgba(12,99,255,0.09) 0%, var(--surface) 100%); border-color: rgba(12,99,255,0.7); }
  .chart-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
    color: var(--text);
    gap: 5px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }
  .chart-card { container-type: inline-size; }
  .chart-card h3 > span { display: flex; align-items: center; gap: 5px; }
  .chart-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
  }
  .chart-badges:empty { display: none; }
  .chart-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    color: #ffffff;
    white-space: nowrap;
  }
  @container (max-width: 480px) {
    .chart-card h3 > span { flex: 1 1 auto; min-width: 0; }
    .chart-badges {
      flex-direction: column;
      align-items: flex-end;
      gap: 1px;
      background: var(--surface-2);
      border-radius: 6px;
      padding: 3px 8px;
    }
    .chart-badge {
      padding: 0;
      background: none;
      line-height: 1.4;
    }
  }
  .chart-badge .badge-val {
    font-weight: 700;
    color: var(--accent-green);
  }
  .glow-teal .chart-badge .badge-val { color: var(--accent-cyan); }
  .glow-amber .chart-badge .badge-val { color: var(--accent-cyan); }
  .glow-orange .chart-badge .badge-val { color: var(--accent-orange); }
  .glow-green .chart-badge .badge-val { color: var(--accent-green); }
  .glow-blue .chart-badge .badge-val { color: var(--accent-blue); }
  .chart-container {
    position: relative;
    height: 220px;
  }

  /* Chart Skeleton Shimmer Loading */
  .chart-skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.45s ease;
  }
  .chart-skeleton-overlay.skeleton-removing {
    opacity: 0;
  }
  .chart-card.chart-loading .chart-container canvas {
    opacity: 0;
  }
  .chart-card.chart-loading .chart-badges .badge-val {
    color: transparent !important;
  }
  .chart-card.chart-loading .hfunnel-flow,
  .chart-card.chart-loading .hfunnel-table,
  .chart-card.chart-loading .funnel-headers,
  .chart-card.chart-loading .funnel-bars {
    opacity: 0;
  }
  .chart-skeleton-wrap {
    position: relative;
    flex: 1;
    min-height: 180px;
  }

  /* Rate-Gate Shimmer (CSS-only chart overlay, no SVG injection) */
  .chart-card.chart-gate-loading .chart-container canvas {
    opacity: 0.15;
    transition: opacity 0.2s ease;
  }
  .chart-card.chart-gate-loading .chart-badges .badge-val {
    color: transparent !important;
  }
  .chart-card.chart-gate-loading .chart-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg,
      rgba(26,46,54,0.0) 0%,
      rgba(26,46,54,0.4) 25%,
      rgba(42,70,82,0.6) 50%,
      rgba(26,46,54,0.4) 75%,
      rgba(26,46,54,0.0) 100%
    );
    background-size: 200% 100%;
    animation: kpiShimmer 1.8s ease-in-out infinite;
    border-radius: 8px;
  }
  .chart-card.chart-gate-loading .hfunnel-flow,
  .chart-card.chart-gate-loading .hfunnel-table,
  .chart-card.chart-gate-loading .funnel-headers,
  .chart-card.chart-gate-loading .funnel-bars {
    opacity: 0.15;
    transition: opacity 0.2s ease;
  }

  /* Rate-gate clickable shimmer overrides (not active during initial page-load shimmer) */
  /* Entire cards are clickable during rate gate */
  body.rate-gate-active .kpi-card,
  body.rate-gate-active .mini-metric-card,
  body.rate-gate-active .chart-card.chart-gate-loading {
    cursor: pointer;
    position: relative;
  }
  /* Disable hover lift on cards during rate gate to prevent wobble */
  body.rate-gate-active .kpi-card:hover,
  body.rate-gate-active .mini-metric-card:hover,
  body.rate-gate-active .chart-card.chart-gate-loading:hover {
    transform: none;
  }
  /* Allow tooltip to overflow parent containers */
  body.rate-gate-active .kpi-half,
  body.rate-gate-active .kpi-card,
  body.rate-gate-active .mini-metric-value.mini-loading {
    overflow: visible;
  }
  body.rate-gate-active .chart-card.chart-gate-loading {
    position: relative;
    overflow: visible;
  }
  body.rate-gate-active .chart-card.chart-gate-loading .chart-container::after {
    pointer-events: none;
  }

  /* Shimmer tooltip (injected by rate-gate.js) */
  .shimmer-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 99999;
    transition: opacity 0.2s ease;
    will-change: opacity;
    line-height: 1.4;
  }
  .shimmer-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--surface-2);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
  }
  /* Center tooltip inside card (tooltip is now on card, not value) */
  body.rate-gate-active .kpi-card > .shimmer-tooltip,
  body.rate-gate-active .mini-metric-card > .shimmer-tooltip,
  body.rate-gate-active .chart-card.chart-gate-loading > .shimmer-tooltip {
    top: 50%;
    transform: translate(-50%, -50%);
  }
  /* Show tooltip when entire card is hovered */
  body.rate-gate-active .kpi-card:hover > .shimmer-tooltip,
  body.rate-gate-active .mini-metric-card:hover > .shimmer-tooltip,
  body.rate-gate-active .chart-card.chart-gate-loading:hover > .shimmer-tooltip {
    opacity: 1;
  }

  /* Funnel visual */
  .funnel-visual {
    padding: 20px;
  }
  .funnel-visual h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
  }
  .funnel-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .funnel-bar {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .funnel-bar-label {
    width: 80px;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-align: right;
    flex-shrink: 0;
    line-height: 1.3;
  }
  .funnel-bar-track {
    flex: 1;
    height: 28px;
    background: var(--surface-2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    min-width: 60px;
  }
  .funnel-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: fit-content;
  }
  .funnel-bar-fill.f1 { background: linear-gradient(90deg, #ff6b2f, #ef9719); }
  .funnel-bar-fill.f2 { background: linear-gradient(90deg, #ef9719, #59e900); }
  .funnel-bar-fill.f3 { background: linear-gradient(90deg, #59e900, #00bda5); }
  .funnel-bar-fill.f4 { background: linear-gradient(90deg, #00bda5, #0c63ff); }
  .funnel-bar-rate {
    font-size: 0.68rem;
    color: var(--text-dim);
    flex-shrink: 0;
    width: 52px;
    text-align: right;
    line-height: 1.3;
  }
  .funnel-bar-rate .days {
    display: block;
    font-size: 0.6rem;
    color: var(--accent-cyan);
  }
  .funnel-bar-cumulative {
    font-size: 0.68rem;
    color: var(--text);
    flex-shrink: 0;
    width: 52px;
    text-align: right;
    line-height: 1.3;
    font-weight: 600;
  }
  .funnel-bar-cumulative .days {
    display: block;
    font-size: 0.6rem;
    color: var(--accent-amber);
    font-weight: 500;
  }
  .funnel-headers {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .funnel-headers .fh-spacer { width: 80px; flex-shrink: 0; }
  .funnel-headers .fh-bar { flex: 1; min-width: 60px; }
  .funnel-headers .fh-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    text-align: right;
  }
  .funnel-headers .fh-stage { width: 52px; flex-shrink: 0; }
  .funnel-headers .fh-cumulative { width: 52px; flex-shrink: 0; }

  /* --- CSS Horizontal Trapezoid Funnel --- */
  .hfunnel-flow {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 16px 16px 20px;
    overflow-x: auto;
  }
  .hfunnel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
  }
  .hfunnel-shape {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%);
  }
  .hfunnel-stage:first-child .hfunnel-shape {
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
    border-radius: 6px 0 0 6px;
  }
  .hfunnel-shape.hs1 { background: linear-gradient(90deg, #ff6b2f, #ef9719); height: 64px; }
  .hfunnel-shape.hs2 { background: linear-gradient(90deg, #ef9719, #59e900); height: 52px; }
  .hfunnel-shape.hs3 { background: linear-gradient(90deg, #59e900, #00bda5); height: 40px; }
  .hfunnel-shape.hs4 { background: linear-gradient(90deg, #00bda5, #0c63ff); height: 28px; }
  .hfunnel-label {
    font-size: 0.62rem;
    color: var(--text-dim);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
  }
  .hfunnel-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    flex-shrink: 0;
  }
  .hfunnel-connector-rate {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
  }
  .hfunnel-connector-days {
    font-size: 0.58rem;
    color: var(--accent-cyan);
  }
  .hfunnel-connector-arrow {
    color: var(--text-dim);
    font-size: 0.7rem;
    margin: 1px 0;
  }
  .hfunnel-table {
    display: flex;
    gap: 0;
    padding: 0 20px 16px;
  }
  .hfunnel-col {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-content: start;
  }
  .hfunnel-col + .hfunnel-col {
    border-left: 1px solid var(--border);
    padding-left: 16px;
    margin-left: 16px;
  }
  .hfunnel-row {
    display: contents;
  }
  .hfunnel-t-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    line-height: 1.6;
  }
  .hfunnel-t-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text);
    text-align: right;
    line-height: 1.6;
  }
  .hfunnel-total-row > .hfunnel-t-label,
  .hfunnel-total-row > .hfunnel-t-value {
    padding-top: 1px;
  }
  .hfunnel-t-total {
    font-weight: 700 !important;
    color: var(--accent-orange) !important;
  }

  /* Improvement Opportunities */
  .opportunities-section {
    /* container styles moved to .opportunities-wrapper */
  }
  /* padding inherits 20px from shared .opportunities-wrapper rule */
  .opportunities-title {
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    margin-bottom: 10px;
    padding: 14px 20px;
    background: linear-gradient(to right, rgba(0,212,255,0.14) 0%, var(--surface) 100%);
    border: 3px solid rgba(0,212,255,0.65);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.92);
  }
  .opportunities-title::before {
    content: '';
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-orange), var(--accent-green), var(--accent-cyan), var(--accent-amber));
    flex-shrink: 0;
  }
  .opportunities-title.no-bar::before { display: none; }
  .opp-title-text {
    flex: none;
  }
  .opp-title-industry {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(239,151,25,0.10), var(--surface-2));
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
  }
  .opp-title-industry svg {
    flex-shrink: 0;
    opacity: 0.7;
  }
  .opp-title-industry span {
    color: var(--accent-amber);
    font-weight: 700;
  }
  .opp-title-gtm {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(239,151,25,0.10), var(--surface-2));
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .opp-title-gtm svg {
    flex-shrink: 0;
    opacity: 0.7;
  }
  .opp-title-gtm span {
    color: var(--accent-amber);
    font-weight: 700;
  }

  /* Revenue Potential section */
  .revenue-potential {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
  }
  .revenue-potential-title {
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(to right, rgba(255,107,47,0.14) 0%, var(--surface) 100%);
    border: 3px solid rgba(255,107,47,0.65);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.92);
  }
  .revenue-potential-title::before {
    content: '';
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
    flex-shrink: 0;
  }
  .revenue-potential-title.no-bar::before { display: none; }
  .rp-title-text { flex: none; }
  .rp-logo { height: 34px; width: auto; opacity: 0.85; flex-shrink: 0; }
  .rp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .rp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition: border-color 0.3s ease;
  }
  .rp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-blue);
    z-index: 1;
  }
  .rp-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    transform: translateX(-100%);
    background: radial-gradient(ellipse at 30% 50%, rgba(12,99,255,0.10) 0%, transparent 70%);
    z-index: 0;
  }
  .rp-card:hover::after { opacity: 1; transform: translateX(0); }
  .rp-card:hover { border-color: #254035; }
  .rp-card-label {
    font-size: 0.85rem;
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
  }
  .rp-split {
    display: flex;
    gap: 0;
    position: relative;
    z-index: 1;
    margin: 2px 0 0;
  }
  .rp-half {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .rp-half.before { padding-right: 10px; }
  .rp-half.after { padding-left: 10px; border-left: 1px solid var(--border); }
  .rp-half-label {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 4px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.4;
    order: 2;
    align-self: flex-start;
  }
  .rp-half.before .rp-half-label {
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
  }
  .rp-half.after .rp-half-label {
    color: var(--text-dim);
    background: rgba(12,99,255,0.08);
    border: 1px solid rgba(12,99,255,0.18);
  }
  .rp-half-value {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    order: 1;
    position: relative;
    z-index: 1;
  }
  .rp-half.before .rp-half-value { color: var(--text); }
  .rp-half.after .rp-half-value { color: var(--accent-blue); }
  .rp-horizon {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(89,233,0,0.08);
    border: 1px solid rgba(89,233,0,0.18);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    letter-spacing: 0.3px;
    vertical-align: middle;
  }
  .rp-delta {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(89,233,0,0.06);
    border: 1px solid rgba(89,233,0,0.12);
    color: var(--accent-green);
    text-align: center;
    position: relative;
    z-index: 1;
    letter-spacing: 0.2px;
  }
  .rp-delta:empty { display: none; }
  .rp-coming-soon {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
  }
  .ev-subtitle {
    font-size: 1.35rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 0.5px;
  }
  .ev-subtitle > span {
    font-weight: 700;
  }
  .ev-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .ev-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 22px 18px;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .ev-card::before { content: none; }
  .ev-card.ev-orange { border-color: rgba(255,152,0,0.5); background: linear-gradient(to right, rgba(255,152,0,0.07) 0%, var(--surface) 100%); }
  .ev-card.ev-red-orange { border-color: rgba(255,107,47,0.5); background: linear-gradient(to right, rgba(255,107,47,0.07) 0%, var(--surface) 100%); }
  .ev-card.ev-green { border-color: rgba(89,233,0,0.5); background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%); }
  .ev-card.ev-blue { border-color: rgba(12,99,255,0.5); background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%); }
  .ev-card.ev-cyan { border-color: rgba(0,189,165,0.5); background: linear-gradient(to right, rgba(0,189,165,0.07) 0%, var(--surface) 100%); }
  .ev-card.ev-gradient { border-color: rgba(89,233,0,0.5); background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%); }
  .ev-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    transform: translateX(-100%);
    z-index: 0;
  }
  .ev-card:hover::after { opacity: 1; transform: translateX(0); }
  .ev-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
  .ev-card.ev-orange:hover { border-color: var(--accent-amber); }
  .ev-card.ev-red-orange:hover { border-color: var(--accent-orange); }
  .ev-card.ev-green:hover { border-color: var(--accent-green); }
  .ev-card.ev-blue:hover { border-color: var(--accent-blue); }
  .ev-card.ev-cyan:hover { border-color: var(--accent-cyan); }
  .ev-card.ev-gradient:hover { border-color: var(--accent-green); }
  .ev-card.ev-orange::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,152,0,0.10) 0%, transparent 70%); }
  .ev-card.ev-red-orange::after { background: radial-gradient(ellipse at 30% 50%, rgba(255,107,47,0.10) 0%, transparent 70%); }
  .ev-card.ev-green::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.10) 0%, transparent 70%); }
  .ev-card.ev-blue::after { background: radial-gradient(ellipse at 30% 50%, rgba(12,99,255,0.10) 0%, transparent 70%); }
  .ev-card.ev-cyan::after { background: radial-gradient(ellipse at 30% 50%, rgba(0,189,165,0.10) 0%, transparent 70%); }
  .ev-card.ev-gradient::after { background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.08) 0%, transparent 70%); }
  .ev-num {
    font-weight: 400;
    color: #fff;
  }
  .ev-pct {
    color: #fff;
  }
  .ev-arrow {
    font-size: 0.64em;
    color: var(--accent-green);
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-origin: left bottom;
  }
  .ev-arrow-down {
    transform-origin: left top;
    vertical-align: top;
    margin-top: 0.15em;
  }
  .ev-card:hover .ev-arrow {
    transform: scale(1.25);
  }
  .ev-stat {
    font-size: 2.05rem;
    font-weight: 400;
    line-height: 1;
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
    text-align: center;
  }
  .ev-card.ev-orange .ev-stat { color: rgba(255,210,150,0.95); }
  .ev-card.ev-green .ev-stat { color: rgba(160,245,140,0.95); }
  .ev-card.ev-blue .ev-stat { color: rgba(170,200,255,0.95); }
  .ev-card.ev-cyan .ev-stat { color: rgba(140,240,220,0.95); }
  .ev-card.ev-red-orange .ev-stat { color: rgba(255,180,160,0.95); }
  .ev-desc {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    line-height: 1.4;
  }
  .ev-footnote {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 400;
    color: #fff;
    margin-top: 32px;
    letter-spacing: 0.5px;
  }
  .ev-footnote > span {
    font-weight: 700;
  }
  .ev-spend-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
  }
  .ev-spend-cards .ev-spend-card:first-child {
    grid-column: 2;
  }
  .ev-spend-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 22px 18px;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .ev-spend-card-green {
    border-color: rgba(89,233,0,0.5);
    background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%);
  }
  .ev-spend-card-blue {
    border-color: rgba(12,99,255,0.5);
    background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%);
  }
  .ev-spend-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  .ev-spend-card-green::after {
    background: radial-gradient(ellipse at 30% 50%, rgba(89,233,0,0.18) 0%, transparent 70%);
  }
  .ev-spend-card-blue::after {
    background: radial-gradient(ellipse at 30% 50%, rgba(12,99,255,0.18) 0%, transparent 70%);
  }
  .ev-spend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .ev-spend-card-green:hover {
    border-color: var(--accent-green);
  }
  .ev-spend-card-blue:hover {
    border-color: var(--accent-blue);
  }
  .ev-spend-card:hover::after {
    opacity: 1;
  }
  .ev-spend-stat {
    font-size: 2.05rem;
    font-weight: 400;
    line-height: 1;
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
  }
  .ev-spend-green { color: #fff; }
  .ev-spend-blue { color: #fff; }
  .ev-spend-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    line-height: 1.4;
  }
  .ev-spend-dollars {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-top: -2px;
    position: relative;
    z-index: 1;
    opacity: 0.7;
  }
  .ev-spend-card-green .ev-spend-dollars { color: var(--accent-green); }
  .ev-spend-card-blue .ev-spend-dollars { color: var(--accent-blue); }
  /* ROI projection cards */
  .ev-roi-cards {
    display: flex;
    gap: 16px;
    margin: 20px auto 0;
    max-width: 90%;
    width: 90%;
    justify-content: center;
  }
  .ev-roi-card {
    flex: 1;
    background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%);
    border: 2px solid rgba(89,233,0,0.5);
    border-radius: 14px;
    padding: 18px 18px 16px;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .ev-roi-card::before {
    content: none;
  }
  .ev-roi-card::after {
    content: none;
  }
  .ev-roi-card:hover {
    background: linear-gradient(to right, rgba(89,233,0,0.12) 0%, var(--surface) 100%);
    border-color: rgba(89,233,0,0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .ev-roi-card:hover .ev-arrow {
    transform: scale(1.5);
  }
  .ev-roi-card-label {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-green);
    background: rgba(89,233,0,0.12);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
  }
  .ev-roi-label-green {
    color: var(--accent-green);
    background: rgba(89,233,0,0.12);
  }
  .ev-roi-label-blue {
    color: var(--accent-blue);
    background: rgba(96,165,250,0.12);
  }
  .ev-roi-card-stat {
    font-size: 2.25rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
    margin-bottom: 2px;
  }
  .ev-roi-green { color: #fff; }
  .ev-roi-card-desc {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  .ev-roi-card-sub {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-amber);
    position: relative;
    z-index: 1;
  }
  .ev-roi-card-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 6px;
  }
  .ev-roi-card-profit {
    color: var(--accent-blue);
  }
  .ev-profit-pct {
    color: var(--text-dim);
    font-weight: 400;
  }
  .ev-roi-card-sub .tooltip {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    vertical-align: middle;
    top: -1px;
    margin-left: 4px;
    font-weight: 400;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .roi-modal-container > div > .tooltip.ev-tooltip {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    vertical-align: middle;
    top: -1px;
    margin-left: 6px;
    font-weight: 400;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .ev-roi-note {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-dim);
    margin-top: 16px;
    margin-bottom: 40px;
    max-width: 38%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
  }
  .ev-sliders-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px auto 48px;
    max-width: 96%;
    justify-content: center;
  }
  .ev-slider-wrap {
    flex: 1 1 0%;
    min-width: 440px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%);
    border: 2px solid rgba(12,99,255,0.5);
    border-radius: 14px;
    padding: 24px 34px;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .ev-slider-wrap:hover {
    background: linear-gradient(to right, rgba(12,99,255,0.12) 0%, var(--surface) 100%);
    border-color: rgba(12,99,255,0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .ev-invest-box {
    flex: 1 1 0%;
    min-width: 400px;
    overflow: hidden;
    background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%);
    border: 2px solid rgba(12,99,255,0.5);
    border-radius: 14px;
    padding: 24px 34px 32px;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .ev-invest-box:hover {
    background: linear-gradient(to right, rgba(12,99,255,0.12) 0%, var(--surface) 100%);
    border-color: rgba(12,99,255,0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .maturity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 16px;
  }
  .maturity-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .maturity-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .maturity-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    flex-shrink: 0;
    position: relative;
    top: -1px;
    animation: maturity-pulse 1.5s ease-in-out infinite;
  }
  @keyframes maturity-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,107,47,0.6); }
    50% { opacity: 0.85; box-shadow: 0 0 6px 3px rgba(255,107,47,0.35); }
  }
  .maturity-rating {
    display: flex;
    gap: 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
    position: relative;
  }
  .maturity-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border: none;
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.15s ease;
    position: relative;
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
  }
  .maturity-opt:last-child {
    border-right: none;
  }
  .maturity-opt:hover:not(.active) {
    color: var(--text);
  }
  .maturity-opt:active {
    transform: scale(0.96);
  }
  .maturity-opt.active[data-val="1"] {
    color: var(--accent-orange);
    background: rgba(255,107,47,0.15);
    box-shadow: 0 0 12px rgba(255,107,47,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .maturity-opt.active[data-val="2"] {
    color: var(--accent-amber);
    background: rgba(239,151,25,0.15);
    box-shadow: 0 0 12px rgba(239,151,25,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .maturity-opt.active[data-val="3"] {
    color: var(--accent-cyan);
    background: rgba(0,189,165,0.15);
    box-shadow: 0 0 12px rgba(0,189,165,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .maturity-opt.active[data-val="4"] {
    color: var(--accent-green);
    background: rgba(89,233,0,0.15);
    box-shadow: 0 0 12px rgba(89,233,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .maturity-rating.needs-selection {
    border-color: rgba(245,180,40,0.5);
    box-shadow: 0 0 8px rgba(245,180,40,0.15);
  }
  @keyframes badge-fade-in {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
  }
  .maturity-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: auto;
    white-space: nowrap;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    animation: badge-fade-in 0.4s ease both;
  }
  .maturity-badge.badge-alert { color: var(--accent-red); background: rgba(255,107,47,0.15); border: 1px solid rgba(255,107,47,0.4); }
  .maturity-badge.badge-operational { color: var(--accent-amber); background: rgba(239,151,25,0.15); border: 1px solid rgba(239,151,25,0.4); }
  .maturity-badge.badge-healthy { color: var(--accent-cyan); background: rgba(0,189,165,0.15); border: 1px solid rgba(0,189,165,0.4); }
  .maturity-badge.badge-success { color: var(--accent-green); background: rgba(89,233,0,0.15); border: 1px solid rgba(89,233,0,0.4); }
  /* RevOps Slider Investment Badge — matches .maturity-badge sizing, pushed right in title row */
  .revops-slider-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: auto;
    white-space: nowrap;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    animation: badge-fade-in 0.4s ease both;
  }
  .revops-slider-badge.slider-badge-all-systems-go { color: var(--accent-green); background: rgba(89,233,0,0.15); border: 1px solid rgba(89,233,0,0.4); }
  .revops-slider-badge.slider-badge-great { color: var(--accent-green); background: rgba(89,233,0,0.15); border: 1px solid rgba(89,233,0,0.4); }
  .revops-slider-badge.slider-badge-good { color: var(--accent-cyan); background: rgba(0,189,165,0.15); border: 1px solid rgba(0,189,165,0.4); }
  .revops-slider-badge.slider-badge-low { color: #e8751a; background: rgba(232,117,26,0.15); border: 1px solid rgba(232,117,26,0.4); }
  .revops-slider-badge.slider-badge-overkill { color: var(--accent-amber); background: rgba(239,151,25,0.15); border: 1px solid rgba(239,151,25,0.4); }
  .ev-slider-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
  }
  .ev-slider-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .ev-slider-title-row {
    display: flex;
    align-items: center;
    gap: 3px;
  }
  .ev-slider-title-row > .tooltip,
  .ev-invest-box > div > .tooltip {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    vertical-align: middle;
    top: -1px;
    margin-left: 6px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .ev-slider-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
    background: rgba(12,99,255,0.12);
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    cursor: help;
    border: 1px solid transparent;
    height: auto;
    justify-content: flex-start;
    align-items: flex-start;
    vertical-align: baseline;
    margin-left: 0;
    animation: ev-badge-pulse 3s ease-in-out infinite;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  @keyframes ev-badge-pulse {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--accent-blue); }
  }
  .ev-slider-budget {
    font-size: 2rem;
    font-weight: 400;
    color: var(--accent-blue);
    text-align: center;
    margin-top: 10px;
  }
  .ev-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .ev-slider-min, .ev-slider-max {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dim);
    min-width: 28px;
    text-align: center;
  }
  .ev-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    cursor: pointer;
  }
  .ev-slider-track-wrap {
    flex: 1;
    position: relative;
  }
  .ev-slider-track-wrap .ev-slider {
    width: 100%;
    position: relative;
    z-index: 1;
  }
  .ev-slider-wrap .ev-slider {
    height: 12px;
    border-radius: 6px;
  }
  .ev-slider-glow {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    background: transparent;
  }
  .ev-slider-glow::before,
  .ev-slider-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
  }
  .ev-slider-glow::after {
    animation-delay: 1.2s;
  }
  .ev-slider-glow-green {
    color: rgba(89,233,0,0.8);
  }
  .ev-slider-glow-green::before,
  .ev-slider-glow-green::after {
    animation: evSonarGreen 2.8s ease-out infinite;
  }
  .ev-slider-glow-blue {
    color: rgba(96,165,250,0.8);
  }
  .ev-slider-glow-blue::before,
  .ev-slider-glow-blue::after {
    animation: evSonarBlue 2.8s ease-out infinite;
  }
  @keyframes evSonarGreen {
    0% { transform: scale(1); opacity: 0.7; border-color: rgba(89,233,0,0.7); }
    70% { transform: scale(2); opacity: 0; border-color: rgba(89,233,0,0); }
    100% { transform: scale(2); opacity: 0; }
  }
  @keyframes evSonarBlue {
    0% { transform: scale(1); opacity: 0.7; border-color: rgba(96,165,250,0.7); }
    70% { transform: scale(2); opacity: 0; border-color: rgba(96,165,250,0); }
    100% { transform: scale(2); opacity: 0; }
  }
  .ev-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(12,99,255,0.3);
  }
  .ev-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(12,99,255,0.3);
  }
  .ev-slider-pct {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-top: 6px;
    opacity: 0.6;
  }
  .ev-slider-note {
    text-align: center;
    font-size: 0.78rem;
    font-style: normal;
    color: var(--text-dim);
    margin-top: 10px;
    opacity: 0.8;
  }
  .ev-bottom-logo-link {
    display: inline-block;
    transition: transform 0.25s ease;
  }
  .ev-bottom-logo-link:hover {
    transform: scale(1.04);
  }
  .ev-cta {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 400;
    color: #fff;
    margin-top: 24px;
    letter-spacing: 0.5px;
  }
  .ev-cta-subtext {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-dim);
    margin-top: 10px;
    max-width: 38%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
  }
  .ev-cta-accent {
    color: var(--accent-orange);
  }
  .ev-cta-hash {
    color: #fff;
  }
  .ev-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 28px;
  }
  .ev-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    text-decoration: none;
  }
  .ev-service img {
    width: 100%;
    max-width: 140px;
    height: auto;
    border-radius: 10px;
  }
  .ev-service span {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
  }
  .ev-roi-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    padding: 18px 56px;
    font-family: 'Archivo', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    opacity: 1;
  }
  .ev-roi-btn:hover {
    background: var(--accent-green);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(89,233,0,0.25);
  }
  .ev-roi-btn.ev-roi-btn-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: auto;
  }
  .ev-roi-btn.ev-roi-btn-disabled:hover {
    color: var(--accent-green);
    border-color: var(--accent-green);
    background: transparent;
    transform: none;
    box-shadow: none;
  }
  .ev-cta-btn-wrap {
    text-align: center;
    margin-top: 28px;
    margin-bottom: 16px;
  }
  .ev-cta-btn {
    background: var(--accent-orange);
    color: var(--text);
    border: 2px solid var(--accent-orange);
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }
  .ev-cta-btn:hover {
    background: transparent;
    color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,107,47,0.25);
  }
  .ev-cta-btn-outline {
    display: inline-flex;
    align-items: center;
    font-family: 'Archivo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    color: var(--accent-green);
    background: transparent;
    border: 2px solid var(--accent-green);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-left: 12px;
    cursor: pointer;
  }
  .ev-cta-btn-outline:hover {
    background: var(--accent-green);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(89,233,0,0.25);
  }

  .opp-row {
    padding: 10px 0;
  }
  .opp-row:first-child { padding-top: 10px; }
  .opp-row-img {
    margin-top: 14px;
    display: flex;
    justify-content: center;
  }
  .bowtie-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    opacity: 0.9;
  }
  .img-enlarge-wrap {
    position: relative;
    cursor: pointer;
    display: inline-block;
  }
  .img-enlarge-wrap:hover .bowtie-img { opacity: 1; }
  .img-enlarge-wrap:hover .img-enlarge-hint { opacity: 1; }
  .img-enlarge-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
  }
  .img-enlarge-hint svg { flex-shrink: 0; }
  .img-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.80);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .img-modal-overlay.active { opacity: 1; pointer-events: auto; }
  .img-modal-container {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 36px 64px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    width: 90vw;
    height: 90vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .img-modal-overlay.active .img-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .img-modal-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    display: block;
    object-fit: contain;
  }
  .img-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: #ffffff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
  }
  .img-modal-close:hover { color: #ffffff; background: rgba(255,255,255,0.1); }
  .img-modal-close svg { width: 20px; height: 20px; }

  /* Department image modal glows */
  .img-modal-container.dept-gtm {
    border-color: rgba(12,99,255,0.5);
    box-shadow: 0 0 60px rgba(12,99,255,0.3), 0 12px 48px rgba(0,0,0,0.5);
  }
  .img-modal-container.dept-marketing {
    border-color: rgba(255,107,47,0.5);
    box-shadow: 0 0 60px rgba(255,107,47,0.3), 0 12px 48px rgba(0,0,0,0.5);
  }
  .img-modal-container.dept-sales {
    border-color: rgba(89,233,0,0.5);
    box-shadow: 0 0 60px rgba(89,233,0,0.3), 0 12px 48px rgba(0,0,0,0.5);
  }
  .img-modal-container.dept-postsale {
    border-color: rgba(0,212,255,0.5);
    box-shadow: 0 0 60px rgba(0,212,255,0.3), 0 12px 48px rgba(0,0,0,0.5);
  }

  /* Info Panel Slide-Out */
  .info-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .info-panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  .info-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    max-width: 90vw;
    height: 100dvh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  }
  .info-panel-overlay.active .info-panel {
    transform: translateX(0);
  }
  .info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid var(--accent-green);
    flex-shrink: 0;
  }
  .info-panel-header h3 {
    font-size: 19px;
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.2px;
  }
  .info-panel-header h3 .beta-badge {
    position: relative;
    top: -1px;
    vertical-align: middle;
    margin-left: 4px;
  }
  .version-badge {
    position: relative;
    top: -1px;
    vertical-align: middle;
    margin-left: 4px;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: rgba(255,255,255,0.08);
    color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 3px 5px;
    border-radius: 4px;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
  }
  .version-badge:hover {
    color: var(--text-secondary);
    border-color: rgba(255,255,255,0.3);
  }
  .info-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .info-panel-close:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
  }
  .info-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .info-panel-content h4 {
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    margin-top: 24px;
  }
  .info-panel-content h4:first-child {
    margin-top: 0;
  }
  .info-panel-content p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 14px;
  }
  .info-panel-content ul {
    list-style: none;
    padding: 0 0 0 10px;
    margin-bottom: 14px;
  }
  .info-panel-content ul li {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.55;
    padding-left: 14px;
    position: relative;
    margin-bottom: 2px;
  }
  .info-panel-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-green);
    opacity: 0.6;
  }
  .info-panel-content strong {
    color: var(--text);
    font-weight: 600;
  }
  .info-panel-content ul li strong {
    color: #a8b4bc;
  }
  .info-panel-link {
    color: #59e900;
    text-decoration: none;
    transition: opacity 0.2s ease;
  }
  .info-panel-link:hover {
    opacity: 0.7;
  }
  .info-panel-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-family: 'Archivo', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .info-panel-video-btn:hover {
    background: rgba(89, 233, 0, 0.1);
    border-color: rgba(89, 233, 0, 0.4);
    color: #59e900;
  }
  .info-panel-video-btn svg {
    flex-shrink: 0;
    color: #59e900;
  }
  .info-panel-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 28px;
    font-size: 0.65rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }
  .info-panel-footer a {
    color: var(--accent-green);
    text-decoration: none;
  }
  .info-panel-footer a:hover {
    opacity: 0.7;
  }

  /* ── Account Panel: Modal Mode ── */
  .account-panel-overlay.account-modal-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.80);
  }
  .account-panel-overlay.account-modal-mode .account-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 400px;
    max-width: 92vw;
    height: auto;
    max-height: 85vh;
    border-radius: 14px;
    border-left: none;
    border: 2px solid var(--border);
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  }
  .account-panel-overlay.account-modal-mode.active .account-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .account-panel-overlay.account-modal-mode .account-panel-header {
    border-radius: 12px 12px 0 0;
  }
  .account-panel-overlay.account-modal-mode .account-panel-footer {
    border-radius: 0 0 12px 12px;
  }
  .account-panel-overlay.account-modal-mode .account-panel-content {
    overflow-y: auto;
  }

  .roi-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.80);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .roi-modal-overlay.active { opacity: 1; pointer-events: auto; }
  .roi-modal-container {
    position: relative;
    background: var(--surface);
    border: 2px solid rgba(255,107,47,0.5);
    border-radius: 14px;
    padding: 36px 64px;
    box-shadow: 0 0 60px rgba(255,107,47,0.3), 0 12px 48px rgba(0,0,0,0.5);
    width: 95vw;
    height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  }
  .roi-modal-overlay.active .roi-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .roi-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: #ffffff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
  }
  .roi-modal-close:hover { color: #ffffff; background: rgba(255,255,255,0.1); }

  /* ── Feedback modal ── */
  .feedback-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.80);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .feedback-modal-overlay.active { opacity: 1; pointer-events: auto; }
  .feedback-modal-container {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 44px 48px 44px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    width: 480px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .feedback-modal-overlay.active .feedback-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .feedback-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px;
    text-align: center;
  }
  .feedback-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
  }
  .feedback-modal-close:hover { color: #ffffff; background: rgba(255,255,255,0.1); }

  /* HubSpot form overrides scoped to feedback modal */
  .feedback-modal-container .hs-form fieldset { max-width: 100%; }
  .feedback-modal-container .hs-form-field { margin-bottom: 16px; }

  .feedback-modal-container .hs-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .feedback-modal-container .hs-form-required { color: var(--accent-green); margin-left: 2px; }

  .feedback-modal-container .hs-input {
    width: 100% !important;
    background: var(--surface-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 9px 14px !important;
    color: var(--text) !important;
    font-size: 0.9rem !important;
    font-family: inherit !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    outline: none !important;
    box-sizing: border-box !important;
  }
  .feedback-modal-container .hs-input:focus {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 0 3px rgba(89,233,0,0.12) !important;
  }
  .feedback-modal-container .hs-input::placeholder {
    color: var(--text-dim) !important;
  }

  .feedback-modal-container select.hs-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    padding-right: 32px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a82' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
  }
  .feedback-modal-container select.hs-input.is-placeholder {
    color: var(--text-dim) !important;
  }

  .feedback-modal-container textarea.hs-input {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
  }

  .feedback-modal-container .hs-button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green) !important;
    color: #0a1418 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 28px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    width: 100%;
  }
  .feedback-modal-container .hs-button.primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }

  .feedback-modal-container .legal-consent-container {
    margin-top: 8px;
    margin-bottom: 16px;
  }
  .feedback-modal-container .legal-consent-container .hs-richtext {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.5;
  }
  .feedback-modal-container .legal-consent-container a {
    color: var(--accent-green);
    text-decoration: none;
  }
  .feedback-modal-container .legal-consent-container a:hover {
    text-decoration: underline;
  }

  .feedback-modal-container .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
  }
  .feedback-modal-container .hs-error-msgs li label {
    color: #ff5555 !important;
    font-size: 0.75rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  .feedback-modal-container .submitted-message {
    color: var(--accent-green);
    font-size: 1rem;
    text-align: center;
    padding: 20px 0;
  }

  /* ── Payment Modal ── */
  .payment-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.80);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .payment-modal-overlay.active { opacity: 1; pointer-events: auto; }
  .payment-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    padding: 36px 16px 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    width: 520px;
    max-width: 94vw;
    height: 82vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  .payment-modal-overlay.active .payment-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .payment-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    text-align: center;
  }
  .payment-modal-subtitle {
    font-size: 0.88rem;
    color: #555;
    margin: 6px 0 0;
    text-align: center;
  }
  .payment-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: background 0.2s, color 0.2s;
  }
  .payment-modal-close:hover { color: #1a1a1a; background: #e0e0e0; }
  #payment_embed_container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .payment-modal-container .payments-iframe-container {
    width: 100%;
    height: 100%;
  }
  .payment-modal-container .payments-iframe-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
  }

  .opp-column {
    min-width: 0;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px 26px;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  }
  .opp-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .opp-column.gtm:hover {
    background: linear-gradient(to right, rgba(12,99,255,0.12) 0%, var(--surface) 100%);
    border-color: rgba(12,99,255,0.7);
  }
  .opp-column.marketing:hover {
    background: linear-gradient(to right, rgba(255,107,47,0.12) 0%, var(--surface) 100%);
    border-color: rgba(255,107,47,0.7);
  }
  .opp-column.sales:hover {
    background: linear-gradient(to right, rgba(89,233,0,0.12) 0%, var(--surface) 100%);
    border-color: rgba(89,233,0,0.7);
  }
  .opp-column.postsale:hover {
    background: linear-gradient(to right, rgba(0,189,165,0.12) 0%, var(--surface) 100%);
    border-color: rgba(0,189,165,0.7);
  }
  .opp-column.gtm {
    border-color: rgba(12,99,255,0.5);
    background: linear-gradient(to right, rgba(12,99,255,0.07) 0%, var(--surface) 100%);
  }
  .opp-column.marketing {
    border-color: rgba(255,107,47,0.5);
    background: linear-gradient(to right, rgba(255,107,47,0.07) 0%, var(--surface) 100%);
  }
  .opp-column.sales {
    border-color: rgba(89,233,0,0.5);
    background: linear-gradient(to right, rgba(89,233,0,0.07) 0%, var(--surface) 100%);
  }
  .opp-column.postsale {
    border-color: rgba(0,189,165,0.5);
    background: linear-gradient(to right, rgba(0,189,165,0.07) 0%, var(--surface) 100%);
  }
  .opp-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .opp-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .opp-icon.marketing { background: rgba(255,107,47,0.12); color: var(--accent-orange); }
  .opp-icon.sales { background: rgba(89,233,0,0.12); color: var(--accent-green); }
  .opp-icon.postsale { background: rgba(0,189,165,0.12); color: var(--accent-cyan); }
  .opp-icon.gtm { background: rgba(12,99,255,0.12); color: var(--accent-blue); }
  .opp-column.marketing .opp-column-header { color: #fff; }
  .opp-column.sales .opp-column-header { color: #fff; }
  .opp-column.postsale .opp-column-header { color: #fff; }
  .opp-column.gtm .opp-column-header { color: #fff; }
  .opp-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .opp-tip {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--text-dim);
    padding: 8px 10px;
    background: var(--surface-2);
    border-radius: 8px;
    border-left: 3px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 6px;
  }
  .opp-tip > .opp-status {
    margin-top: 1px;
    margin-right: 0;
  }
  .opp-tip-text {
    flex: 1;
    min-width: 0;
  }
  .opp-column.marketing .opp-tip { border-left-color: rgba(255,107,47,0.4); }
  .opp-column.marketing .opp-tip .opp-value { color: var(--accent-orange); }
  .opp-column.sales .opp-tip { border-left-color: rgba(89,233,0,0.4); }
  .opp-column.sales .opp-tip .opp-value { color: var(--accent-green); }
  .opp-column.postsale .opp-tip { border-left-color: rgba(0,189,165,0.4); }
  .opp-column.postsale .opp-tip .opp-value { color: var(--accent-cyan); }
  .opp-column.gtm .opp-tip { border-left-color: rgba(12,99,255,0.4); }
  .opp-column.gtm .opp-tip .opp-value { color: var(--accent-blue); }
  .opp-column.gtm .opp-bench-divider .bench-industry { color: var(--accent-blue); }
  .opp-column.gtm .opp-bench::before { background: var(--accent-blue); }
  .opp-column.marketing .opp-bench-divider .bench-industry { color: var(--accent-orange); }
  .opp-column.marketing .opp-bench::before { background: var(--accent-orange); }
  .opp-column.sales .opp-bench-divider .bench-industry { color: var(--accent-green); }
  .opp-column.sales .opp-bench::before { background: var(--accent-green); }
  .opp-column.postsale .opp-bench-divider .bench-industry { color: var(--accent-cyan); }
  .opp-column.postsale .opp-bench::before { background: var(--accent-cyan); }
  .opp-column.gtm .opp-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .opp-tip .opp-metric {
    font-weight: 700;
    color: var(--text);
  }
  .opp-tip .opp-value {
    font-weight: 700;
    color: var(--text);
  }
  .opp-tip .opp-target {
    font-weight: 600;
    color: var(--accent-green);
  }
  .opp-none {
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 8px 0;
    display: flex;
    align-items: center;
  }
  .opp-verify {
    font-size: 0.72rem;
    color: var(--accent-orange);
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
  }
  .opp-verify svg {
    flex-shrink: 0;
  }
  .opp-bench-divider {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.03em;
    color: var(--text);
    margin-top: 6px;
    padding: 0 2px;
    opacity: 0.85;
  }
  .opp-bench {
    font-size: 0.68rem;
    line-height: 1.1;
    color: var(--text-dim);
    padding: 0 2px;
    margin: -2px 0;
    background: transparent;
    border-radius: 6px;
    border-left: none;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    opacity: 0.75;
  }
  .opp-bench::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-amber);
    flex-shrink: 0;
    margin-top: 2px;
  }
  .opp-bench .opp-bench-label {
    font-weight: 600;
    color: var(--text-dim);
  }
  .opp-bench .opp-bench-val {
    font-weight: 700;
    color: var(--text);
    opacity: 0.6;
  }
  /* Recommendations section - below benchmarks */
  .opp-rec-divider {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.03em;
    color: var(--text);
    margin-top: 6px;
    margin-bottom: -2px;
    padding: 0 2px;
    opacity: 0.85;
  }
  .opp-rec {
    font-size: 0.68rem;
    line-height: 1.25;
    color: var(--text-dim);
    padding: 0 2px 0 12px;
    text-indent: -10px;
    margin: -2px 0;
    opacity: 0.75;
  }
  .opp-rec::before {
    content: "\203A\00a0\00a0";
    font-weight: 700;
    color: var(--accent-amber);
  }
  .opp-rec .opp-rec-title {
    font-weight: 600;
    color: var(--text-dim);
  }
  /* Department-specific rec divider and bullet colors */
  .opp-column.gtm .opp-rec-divider .bench-industry { color: var(--accent-blue); }
  .opp-column.gtm .opp-rec::before { color: var(--accent-blue); }
  .opp-column.marketing .opp-rec-divider .bench-industry { color: var(--accent-orange); }
  .opp-column.marketing .opp-rec::before { color: var(--accent-orange); }
  .opp-column.sales .opp-rec-divider .bench-industry { color: var(--accent-green); }
  .opp-column.sales .opp-rec::before { color: var(--accent-green); }
  .opp-column.postsale .opp-rec-divider .bench-industry { color: var(--accent-cyan); }
  .opp-column.postsale .opp-rec::before { color: var(--accent-cyan); }

  /* Opp 3-column layout */
  .opp-three-col {
    display: grid;
    grid-template-columns: 3fr 3fr 4fr;
    gap: 32px;
    margin-top: 8px;
  }
  .opp-col-image { order: 1; }
  .opp-col-inputs { order: 2; }
  .opp-col-benchmarks { order: 3; }
  .opp-col-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .opp-col-inputs {
    min-width: 0;
  }
  .opp-col-benchmarks {
    min-width: 0;
  }
  .opp-col-image {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .opp-col-image .opp-row-img {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 0;
  }
  .opp-input-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .opp-input-item {
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--text-dim);
    padding: 5px 8px;
    background: var(--surface-2);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .opp-input-item .opp-input-label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .opp-input-type-icon {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    opacity: 0.7;
  }
  .opp-input-type-icon.type-input { color: var(--accent-amber); }
  .opp-input-type-icon.type-calc { color: var(--accent-green); }
  .opp-input-item .opp-input-val {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
  }

  /* Inputs-Only Callout */
  .inputs-only-callout {
    position: absolute;
    top: 100%;
    left: -24px;
    margin-top: 8px;
    z-index: 99999;
    background: linear-gradient(rgba(239,151,25,0.08), rgba(239,151,25,0.08)), #1a1f24;
    border: 1px solid rgba(239,151,25,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease, opacity 1s ease;
  }
  .inputs-only-callout.pulse-ready {
    animation: togglePulse 1.8s ease-in-out 0.3s 2;
  }
  .inputs-only-callout.faded { opacity: 0; pointer-events: none; }
  .inputs-only-callout.faded:hover { opacity: 0; }
  .inputs-only-callout:hover {
    background: linear-gradient(rgba(239,151,25,0.14), rgba(239,151,25,0.14)), #1a1f24;
    border-color: rgba(239,151,25,0.35);
  }
  .inputs-only-callout-text {
    font-size: 0.7rem;
    color: #b0b8c0;
    white-space: nowrap;
  }
  .inputs-only-callout-btn {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-amber);
    white-space: nowrap;
  }

  /* ── Footer badge (bottom-right) ── */
  .site-footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-family: 'Archivo', sans-serif;
    z-index: 100;
    pointer-events: auto;
    background: var(--surface-2);
    border: 1px solid rgba(89,233,0,0.25);
    border-radius: 6px;
    padding: 5px 10px;
  }
  .site-footer a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
  }
  .site-footer a:hover {
    color: var(--accent-green);
  }

  /* ── ROI Drawer ── */

  /* Overlay — always rendered, non-interactive until active */
  .roi-drawer-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 380px;
    right: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    overflow: hidden;
    background: transparent;
    transition: background 0.3s ease;
  }
  .roi-drawer-overlay.active {
    pointer-events: auto;
    background: rgba(10, 20, 24, 0.7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: background 0.4s ease;
  }

  /* Panel — wraps tab + drawer, slides as one unit */
  .roi-drawer-panel {
    width: 100%;
    box-sizing: border-box;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 100%;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 1, 1);
  }
  /* Slide tab into view after page load */
  .roi-drawer-overlay.roi-entered .roi-drawer-panel {
    transform: translateY(calc(100% - 43px));
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .roi-drawer-overlay.active .roi-drawer-panel {
    transform: translateY(var(--drawer-top-offset, 0px));
    transition: transform 0.6s cubic-bezier(0.22, 1.2, 0.36, 1);
  }

  /* Tab — in flow at top of panel, always clickable */
  .roi-drawer-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    height: 43px;
    box-sizing: border-box;
    padding: 10px 24px;
    font-family: 'Archivo', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background: var(--surface);
    border: 3px solid rgba(255,107,47,0.7);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    pointer-events: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-bottom: -3px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .roi-drawer-tab:hover {
    background: #121f24;
    color: #fff;
    border-color: rgba(255,107,47,0.9);
  }
  /* Lift the entire panel (tab + drawer) on tab hover when closed */
  .roi-drawer-overlay.roi-entered:not(.active) .roi-drawer-panel:has(.roi-drawer-tab:hover) {
    transform: translateY(calc(100% - 47px));
  }
  .roi-drawer-overlay:not(.active) .roi-drawer-panel:has(.roi-drawer-tab:hover) .roi-drawer {
    background: #121f24;
    border-color: rgba(255,107,47,0.9);
  }
  .roi-drawer-tab svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: var(--accent-red);
    flex-shrink: 0;
  }

  /* Caret icon */
  .roi-drawer-tab-caret {
    width: 10px;
    height: 10px;
    stroke: var(--text-dim);
    flex-shrink: 0;
    margin-left: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Tab active state — connected to drawer */
  .roi-drawer-tab.active .roi-drawer-tab-caret {
    transform: rotate(180deg);
  }
  .roi-drawer-tab.active {
    background: var(--surface);
    border-color: var(--accent-red);
  }
  .roi-drawer-tab.active:hover {
    transform: none;
    box-shadow: none;
  }
  .roi-drawer-overlay.active .roi-drawer {
    border-color: var(--accent-red);
  }

  /* Drawer content — fills remaining panel space, scrolls */
  .roi-drawer {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 3px solid rgba(255,107,47,0.7);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 28px 28px 80px;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .roi-drawer-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 0 4px;
  }
  .roi-drawer #section_exitvelocity {
    background: none;
    border-color: transparent;
  }
  .roi-drawer-body .revenue-potential-title { margin-bottom: 0; }
  .roi-drawer-body .ev-subtitle { margin-bottom: 0; }
  .roi-drawer-body .ev-footnote { margin-top: 12px; }
  .roi-drawer-body .ev-spend-cards { margin-top: 0; grid-template-columns: repeat(2, 1fr); }
  .roi-drawer-body .ev-spend-cards .ev-spend-card:first-child { grid-column: auto; }
  .roi-drawer-body .ev-sliders-row { margin: 0; max-width: 100%; gap: 16px; }
  .roi-drawer-body .ev-sliders-row .ev-invest-box,
  .roi-drawer-body .ev-sliders-row .ev-slider-wrap { min-width: 0; flex: 1 1 calc(50% - 8px); }
  .roi-drawer-body .ev-cta-btn-wrap { margin-top: 12px; margin-bottom: 24px; }

  /* Drawer-specific responsive: content area is narrower than viewport */
  @media (max-width: 1400px) {
    /* "Companies Typically See" — 2-col so stat+arrow stay on one line */
    .roi-drawer-body .ev-cards { grid-template-columns: repeat(2, 1fr); }
    /* "How Do You Stack Up" — single column to prevent cramped layout */
    .roi-drawer-body .ev-sliders-row .ev-invest-box,
    .roi-drawer-body .ev-sliders-row .ev-slider-wrap { flex: 1 1 100%; }
  }

  /* Glow pulse when drawer is closed — fires every 7s */
  @keyframes roi-drawer-glow {
    0%   { filter: drop-shadow(0 0 0px transparent); }
    5%   { filter: drop-shadow(0 0 8px rgba(255,107,47,0.4)); }
    12%  { filter: drop-shadow(0 0 14px rgba(255,107,47,0.65)); }
    20%  { filter: drop-shadow(0 0 8px rgba(255,107,47,0.4)); }
    28%  { filter: drop-shadow(0 0 0px transparent); }
    100% { filter: drop-shadow(0 0 0px transparent); }
  }
  .roi-drawer-overlay.roi-entered:not(.active) .roi-drawer-panel {
    animation: roi-drawer-glow 6s ease-in-out infinite;
  }

  /* When drawer is open, panel fills from header to bottom of viewport */
  .roi-drawer-overlay.active {
    justify-content: stretch;
  }
  .roi-drawer-overlay.active .roi-drawer-panel {
    flex: 1 1 auto;
    height: 100%;
  }
  .roi-drawer-overlay.active .roi-drawer {
    flex: 1 1 auto;
  }

  /* Mobile / tablet: also lock background scroll */
  @media (max-width: 1024px) {
    body.roi-drawer-open {
      overflow: hidden;
      position: fixed;
      width: 100%;
    }
  }

  @media (max-width: 600px) {
    .roi-drawer-overlay { left: 0; }
    .roi-drawer-panel { padding: 0; }
    .roi-drawer { padding: 16px 16px 80px; border-radius: 0; }
    .roi-drawer-tab { padding: 8px 16px; font-size: 0.78rem; }
    .roi-drawer-body .ev-spend-cards { grid-template-columns: 1fr; }
  }

  /* Inputs-Only Mode */
  .page-layout.inputs-only-mode {
    grid-template-columns: 1fr;
  }
  .page-layout.inputs-only-mode .main-content {
    display: none;
  }
  .page-layout.inputs-only-mode .sidebar {
    max-width: 100%;
    border-right: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
    align-content: start;
    overflow-y: auto;
    min-height: 100%;
  }
  .page-layout.inputs-only-mode .sidebar-header {
    grid-column: 1 / -1;
    order: -2;
    margin-bottom: -5px;
    width: 348px;
    border-bottom: 1px solid transparent;
    position: relative;
    overflow: visible;
  }
  .page-layout.inputs-only-mode .sidebar {
    position: relative;
  }
  .page-layout.inputs-only-mode .sidebar-header::after {
    display: none;
  }
  .page-layout.inputs-only-mode .sidebar::before {
    content: '';
    position: absolute;
    top: 52px;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--border);
    z-index: 5;
  }
  .page-layout.inputs-only-mode .funnel-section {
    margin-bottom: 0;
    overflow: visible;
  }
  .page-layout.inputs-only-mode .funnel-section .section-body {
    max-height: none;
    opacity: 1;
    padding: 16px 20px 20px;
    overflow: visible;
  }
  .page-layout.inputs-only-mode .funnel-section .collapse-icon {
    display: none;
  }
  /* Boost tier locks in inputs-only mode (must override .funnel-section .section-body opacity:1) */
  .page-layout.inputs-only-mode .boost-locked .section-body {
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
  }
  .page-layout.inputs-only-mode .boost-tier2-locked {
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
  }
  /* In simple mode: show gloss/blur overlay (match hover state) always-on */
  .page-layout.inputs-only-mode .boost-locked .section-body::before {
    opacity: 1;
  }
  .page-layout.inputs-only-mode .boost-locked .boost-lock-overlay {
    top: calc(50% + 38px);
    opacity: 1;
    pointer-events: auto;
  }
  /* Hover overlays in inputs-only mode */
  .page-layout.inputs-only-mode .boost-locked:hover .section-body::before,
  .page-layout.inputs-only-mode .boost-locked:hover .boost-lock-overlay {
    opacity: 1;
  }
  .page-layout.inputs-only-mode .boost-tier2-locked:hover::before,
  .page-layout.inputs-only-mode .boost-tier2-locked:hover::after {
    opacity: 1;
  }
  .page-layout.inputs-only-mode #sec_current .section-header {
    background: linear-gradient(135deg, rgba(12,99,255,0.08) 0%, transparent 100%) !important;
  }
  .page-layout.inputs-only-mode #sec_marketing .section-header {
    background: linear-gradient(135deg, rgba(255,107,47,0.08) 0%, transparent 100%) !important;
  }
  .page-layout.inputs-only-mode #sec_sales .section-header {
    background: linear-gradient(135deg, rgba(89,233,0,0.08) 0%, transparent 100%) !important;
  }
  .page-layout.inputs-only-mode #sec_postsale .section-header {
    background: linear-gradient(135deg, rgba(0,189,165,0.08) 0%, transparent 100%) !important;
  }
  .page-layout.inputs-only-mode #sec_devmode .section-header {
    background: linear-gradient(135deg, rgba(255,140,50,0.08) 0%, transparent 100%) !important;
  }
  /* RevOps Boost: full-width row above other sections */
  .page-layout.inputs-only-mode #sec_devmode {
    grid-column: 1 / -1;
    order: -1;
  }
  .page-layout.inputs-only-mode #sec_devmode .section-body {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-left: 0;
    padding-right: 0;
  }
  .page-layout.inputs-only-mode #sec_devmode .phase-col {
    min-width: 0;
    padding: 0 20px;
    position: relative;
  }
  .page-layout.inputs-only-mode #sec_devmode .phase-col + .phase-col::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.08);
  }
  .page-layout.inputs-only-mode #sec_devmode .phase-input-row {
    flex-direction: column;
  }
  .page-layout.inputs-only-mode #sec_devmode .devmode-phase-label {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
  .section-complete-check {
    display: none;
    position: absolute;
    top: 50%;
    right: 20px;
    color: var(--accent-green);
    opacity: 0;
    flex-shrink: 0;
    background: rgba(89,233,0,0.10);
    border: 1px solid rgba(89,233,0,0.20);
    border-radius: 50%;
    padding: 6px;
    filter: drop-shadow(0 0 6px rgba(89,233,0,0.35));
    transform: translateY(-50%) scale(0.3) rotate(-10deg);
    z-index: 2;
  }
  .section-complete-check .check-stroke {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
  }
  .page-layout.inputs-only-mode .funnel-section[class*="section-touched"] .section-complete-check {
    display: flex;
    opacity: 1;
    transform: translateY(-50%) scale(1) rotate(0deg);
    animation: checkPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, checkGlow 3s ease-in-out 0.8s infinite;
  }
  .page-layout.inputs-only-mode .funnel-section[class*="section-touched"] .section-complete-check .check-stroke {
    animation: checkDraw 0.5s ease-out 0.25s forwards;
  }
  @keyframes checkPop {
    0% { transform: translateY(-50%) scale(0.3) rotate(-10deg); opacity: 0; filter: drop-shadow(0 0 0 rgba(89,233,0,0)); }
    40% { transform: translateY(-50%) scale(1.2) rotate(2deg); opacity: 1; filter: drop-shadow(0 0 16px rgba(89,233,0,0.5)); }
    60% { transform: translateY(-50%) scale(0.95) rotate(-1deg); }
    80% { transform: translateY(-50%) scale(1.05) rotate(0deg); }
    100% { transform: translateY(-50%) scale(1) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 6px rgba(89,233,0,0.3)); }
  }
  @keyframes checkDraw {
    0% { stroke-dashoffset: 30; }
    100% { stroke-dashoffset: 0; }
  }
  @keyframes checkGlow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(89,233,0,0.20)); border-color: rgba(89,233,0,0.15); }
    50% { filter: drop-shadow(0 0 12px rgba(89,233,0,0.45)); border-color: rgba(89,233,0,0.35); }
  }
  .page-layout.inputs-only-mode .funnel-section.simple-collapsed .section-header {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
  }
  .page-layout.inputs-only-mode .funnel-section.simple-collapsed .section-header:hover {
    opacity: 1;
  }
  .page-layout.inputs-only-mode .funnel-section.simple-collapsed .section-body {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
  }
  @keyframes seeResultsPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
  }
  .see-results-btn {
    display: none;
    margin-left: auto;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(239,151,25,0.4);
    background: rgba(239,151,25,0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
    opacity: 0;
    pointer-events: none;
  }
  .page-layout.inputs-only-mode .see-results-btn {
    display: inline-block;
    position: absolute;
    right: 24px;
    top: 14px;
    z-index: 20;
    padding: 7px 12px;
  }
  .see-results-btn.visible {
    opacity: 1;
    pointer-events: auto;
    animation: seeResultsPulse 2.5s ease-in-out 0.3s infinite;
  }
  .see-results-btn:hover {
    background: rgba(239,151,25,0.35);
    border-color: rgba(239,151,25,0.8);
    animation: none;
    opacity: 1;
  }

  /* =============================================
     Sidebar Collapsed Mode
     ============================================= */
  .page-layout.sidebar-collapsed {
    grid-template-columns: 0px minmax(0, 1fr);
  }
  .page-layout.sidebar-collapsed .sidebar {
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    border-right: none;
    transition: opacity 0.2s ease, padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .page-layout.sidebar-collapsed .view-toggle-wrap {
    display: none;
  }

  /* Toggle sidebar button (in Outputs header) */
  .btn-toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 5px 6px;
    height: 28px;
    box-sizing: border-box;
    margin-right: 16px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .btn-toggle-sidebar:hover {
    color: #ef9719;
    border-color: rgba(239, 151, 25, 0.5);
    background: rgba(239, 151, 25, 0.1);
  }
  .btn-toggle-sidebar .icon-expand { display: block; }
  .btn-toggle-sidebar .icon-collapse { display: none; }
  .page-layout.sidebar-collapsed .btn-toggle-sidebar .icon-expand { display: none; }
  .page-layout.sidebar-collapsed .btn-toggle-sidebar .icon-collapse { display: block; }
  .btn-toggle-sidebar.disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }

  /* Hide action button labels below 1310px — keep icons only */
  @media (max-width: 1310px) {
    .insights-actions .ai-prompt-btn,
    .insights-actions .share-btn { font-size: 0 !important; gap: 0; padding: 6px 8px; }
    .insights-actions .ai-prompt-btn svg,
    .insights-actions .share-btn svg { width: 14px; height: 14px; }
  }

  /* Responsive: tablet — swap filter buttons for dropdown */
  @media (max-width: 1250px) {
    .page-layout.inputs-only-mode .sidebar { grid-template-columns: repeat(2, 1fr); }
    .page-layout.inputs-only-mode .funnel-section .section-body {
      max-height: none;
      overflow: visible;
      transition: none;
    }
    .page-layout.inputs-only-mode #sec_devmode { grid-column: 1 / -1; order: -1; }
    .page-layout.inputs-only-mode #sec_devmode .section-body { grid-template-columns: repeat(2, 1fr); }
    .page-layout.inputs-only-mode #sec_devmode .phase-col:nth-child(odd)::before { display: none; }
    .insights-filter-btn { font-size: 10px; padding: 0 8px 0 6px; gap: 3px; height: 28px; }
    .insights-filter-btn svg { width: 10px; height: 10px; }
    .ev-roi-card-stat { font-size: 1.9rem; }
    .ev-roi-card-desc { font-size: 0.65rem; }
    .ev-roi-card-sub { font-size: 0.8rem; }
    .roi-modal-container { padding: 32px 48px; }
  }

  /* Chart toggle abbreviations for narrow viewports (accounts for rate-limit badge) */
  @media (max-width: 1310px) {
    .chart-period-toggle button { font-size: 0; gap: 2px; padding: 8px 8px; }
    .chart-period-toggle button svg { font-size: 12px; /* reset for SVG */ }
    .chart-period-toggle button::after {
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.3px;
    }
    #chart_layout_toggle button::after { content: none; }
    .chart-period-toggle button[data-period="monthly"]::after { content: 'Mo'; }
    .chart-period-toggle button[data-period="quarterly"]::after { content: 'Qtr'; }
    .chart-period-toggle button[data-horizon="1"]::after { content: 'Y1'; }
    .chart-period-toggle button[data-horizon="2"]::after { content: 'Y2'; }
    .chart-period-toggle button[data-horizon="3"]::after { content: 'Y3'; }
    /* Metrics view toggle: keep labels visible with short text */
    #metrics_view_toggle button { font-size: 0.65rem !important; }
    #metrics_view_toggle button::after { content: none !important; }
    #metrics_view_toggle .toggle-label-full { display: none; }
    #metrics_view_toggle .toggle-label-short { display: inline; }
  }

  @media (max-width: 1166px) {
    .rate-badge-full { display: none; }
    .rate-badge-short { display: inline; }
  }

  /* Responsive */
  @media (max-width: 1024px) {
    body {
      height: auto;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .page-layout {
      grid-template-columns: 1fr;
      height: auto;
    }
    .page-layout::after {
      display: none;
    }
    .sidebar {
      border-right: none;
      border-bottom: 1px solid var(--border);
      max-height: none;
      overflow-y: visible;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
      align-items: start;
    }
    .sidebar-header {
      grid-column: 1 / -1;
      order: -2;
    }
    .funnel-section {
      margin-bottom: 0;
    }
    #sec_devmode {
      grid-column: 1 / -1;
      order: -1;
    }
    .main-content {
      overflow-y: visible;
      overflow-x: clip;
      padding-bottom: max(40px, env(safe-area-inset-bottom, 40px));
    }
    .btn-toggle-sidebar {
      display: none !important;
    }
    .kpi-card {
      flex: 0 1 calc(50% - 8px);
    }
    .kpi-row { margin-bottom: 14px; }
    .kpi-card { padding: 14px 12px; }
    .kpi-label { line-height: 1.1; font-size: 0.78rem; }
    .kpi-split { row-gap: 8px; }
    .kpi-half.current { padding-right: 4px; }
    .kpi-half.improved { padding-left: 4px; }
    .charts-grid {
      grid-template-columns: 1fr;
    }
    .mini-metric-card {
      flex: 1 1 calc(50% - 10px);
    }
    .opp-three-col {
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .opp-col-image {
      grid-column: 1 / -1;
    }
    .header {
      grid-template-columns: auto 1fr auto;
      padding: 16px 24px;
    }
    .header {
      grid-template-columns: auto 1fr auto;
      gap: 10px;
    }
    .header-left { justify-self: start; }
    .header-center { text-align: left; justify-self: start; }
    .header-right { display: flex; }
    .header-logo { height: 36px; }
    .header-logo-light { display: none !important; }
    .header-logo-dark { display: none !important; }
    .header-logo-mobile { display: block !important; height: 32px; width: auto; }
    .header h1 {
      font-size: 1.5rem;
      display: inline-flex;
      align-items: center;
      gap: 2px;
    }
    .header h1 > span:first-child {
      display: inline;
      line-height: 1;
    }
    .header-badges {
      position: relative;
      top: auto;
      transform: none;
      margin-left: 6px;
    }
    .header p { display: none; }
    .ev-roi-card-stat { font-size: 1.6rem; }
    .ev-roi-card-desc { font-size: 0.6rem; }
    .ev-roi-card-sub { font-size: 0.75rem; }
    .roi-modal-container { padding: 28px 32px; }
    .rp-grid { grid-template-columns: repeat(2, 1fr); }
    .rp-half-value { font-size: 1.15rem; }
    .cf-flow { flex-wrap: wrap; gap: 8px; }
    .cf-stage { flex: 0 0 calc(33.33% - 16px); min-width: 80px; }
    .cf-arrow { width: 16px; }
    .cf-stage-value { font-size: 1rem; }
    .maturity-grid { grid-template-columns: 1fr; }
    .ev-cards { grid-template-columns: repeat(2, 1fr); }
    .ev-spend-cards { grid-template-columns: repeat(2, 1fr); }
    .ev-spend-cards .ev-spend-card:first-child { grid-column: auto; }
    .ev-invest-box { padding: 28px 24px; }
    #section_calculations { display: none; }
    .insights-filter-btn[data-filter="calculations"] { display: none; }
    .scenario-item[data-value="calculations"] { display: none; }
    .ev-sliders-row { max-width: 100%; margin-left: 0; margin-right: 0; }
    .ev-invest-box { min-width: 0; flex-basis: 100%; }
    .ev-slider-wrap { min-width: 0; flex-basis: 100%; }
  }
  @media (max-width: 600px) {
    .insights-header { align-items: center; }
    .insights-header h3 { margin-right: 6px; }
    .insights-filters { gap: 3px; flex-wrap: nowrap; flex: 1; align-items: center; }
    .insights-filter-btn { font-size: 9px; padding: 0 7px; gap: 0; height: 28px; flex: 1; justify-content: center; }
    .insights-filter-btn svg { display: none; }
    .insights-actions { align-items: center; margin-left: 10px; }
    .page-layout.inputs-only-mode .sidebar { grid-template-columns: 1fr; }
    .page-layout.inputs-only-mode #sec_devmode { grid-column: 1 / -1; order: -1; }
    .page-layout.inputs-only-mode #sec_devmode .section-body { grid-template-columns: 1fr; }
    .page-layout.inputs-only-mode #sec_devmode .phase-col { padding: 0; }
    .page-layout.inputs-only-mode #sec_devmode .phase-col::before { display: none; }
    .sidebar { grid-template-columns: 1fr; }
    .info-panel { width: 100%; max-width: 100%; }
    .info-panel-footer { flex-direction: column; align-items: flex-start; gap: 4px; }
    .account-panel { width: 100vw; max-width: 100vw; }
    .account-panel-overlay.account-modal-mode .account-panel { width: 400px; max-width: 92vw; height: auto; max-height: 85vh; }
    .rate-badge { font-size: 0.55rem; padding: 3px 7px; }
    .kpi-card { flex-basis: 100%; }
    .charts-grid { grid-template-columns: 1fr; }
    .mini-metric-card { flex: 1 1 calc(50% - 10px); }
    .opp-three-col {
      grid-template-columns: 1fr;
    }
    .header h1 { font-size: 1.1rem; letter-spacing: 0px; white-space: normal; flex-wrap: wrap; align-items: center; }
    .header h1 > span:first-child { order: 1; flex-basis: 100%; line-height: 1.2; }
    .header h1 .header-badges { order: 0; margin-left: 6px; }
    .beta-badge { font-size: 0.45rem; padding: 2px 4px; }
    .version-badge { font-size: 0.45rem; padding: 2px 4px; pointer-events: none; cursor: default; }
    .rp-grid { grid-template-columns: 1fr; }
    .rp-half-value { font-size: 1.02rem; }
    .cf-stage { flex: 0 0 calc(50% - 16px); }
    .cf-arrow { display: none; }
    .cf-stage-value { font-size: 0.95rem; }
    .cf-stage-label { font-size: 0.58rem; min-height: auto; }
    .header p { display: none; }
    .ev-roi-card-stat { font-size: 1.25rem; }
    .ev-roi-card-desc { font-size: 0.55rem; }
    .ev-roi-card-sub { font-size: 0.65rem; }
    .ev-roi-card-label { font-size: 0.6rem; }
    .roi-modal-container { padding: 24px 20px; }
    .ev-roi-cards { gap: 10px; flex-direction: column; max-width: 100%; width: 100%; }
    .page-layout { gap: 0; }
    .sidebar { padding: 16px; padding-bottom: max(40px, env(safe-area-inset-bottom, 40px)); }
    .main-content { padding: 16px; padding-bottom: max(40px, env(safe-area-inset-bottom, 40px)); }
    .kpi-card { padding: 14px 16px; }
    .kpi-label { line-height: 1.05; font-size: 0.85rem; }
    .kpi-split { row-gap: 10px; }
    .kpi-half-label { font-size: 0.52rem; }
    .header {
      grid-template-columns: auto 1fr auto;
      padding: 14px 16px;
      gap: 10px;
    }
    .header-left { justify-self: start; }
    .header-center { text-align: left; justify-self: start; }
    .header-right { display: flex; }
    .header-right .info-btn { width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0; }
    .header-logo-light { display: none !important; }
    .header-logo-dark { display: none !important; }
    .header-logo-mobile { display: block !important; height: 36px; width: auto; }
    .header-logo { height: 36px; }
    .hfunnel-shape { font-size: 0.65rem; }
    .hfunnel-shape.hs1 { height: 52px; }
    .hfunnel-shape.hs2 { height: 42px; }
    .hfunnel-shape.hs3 { height: 34px; }
    .hfunnel-shape.hs4 { height: 26px; }
    .hfunnel-connector { min-width: 28px; }
    .site-footer { display: none; }
    #metrics_view_toggle { flex-shrink: 1; }
    #metrics_view_toggle button { padding: 8px; }
    #metrics_view_toggle button svg { display: none; }
    .view-toggle-wrap { display: none; }
    .inputs-only-callout { display: none; }
    #chart_layout_toggle { display: none; }
    #chart_period_toggle { display: none; }
    .title-full { display: none; }
    .title-mobile { display: inline; }
    #calc_industry_badge { display: none; }
    #calc_gtm_badge { display: none; }
    #ev_industry_badge { display: none; }
    #ev_gtm_badge { display: none; }
    #opp_industry_badge { display: none; }
    #opp_gtm_badge { display: none; }
    #section_calculations { display: none; }
    .insights-filter-btn[data-filter="calculations"] { display: none; }
    .scenario-item[data-value="calculations"] { display: none; }
    .ev-sliders-row { max-width: 100%; margin-left: 0; margin-right: 0; }
    .ev-invest-box { min-width: 0; flex-basis: 100%; padding: 20px 16px 24px; }
    .ev-slider-wrap { min-width: 0; flex-basis: 100%; padding: 20px 16px; }
    /* ROI modal mobile fixes */
    .roi-modal-container { padding: 24px 16px; padding-top: 52px; }
    .roi-modal-container .ev-roi-card-stat { font-size: 1.85rem; }
    .roi-modal-container .ev-roi-note { max-width: 90%; }
    .roi-modal-container .ev-cta-subtext { max-width: 90%; }
  }

  /* Disable action buttons while shimmer/loading is active */
  body:not(.kpi-loaded) #download_btn,
  body:not(.kpi-loaded) #share_btn,
  body:not(.kpi-loaded) .ai-prompt-btn,
  body.rate-gate-active #download_btn,
  body.rate-gate-active #share_btn,
  body.rate-gate-active .ai-prompt-btn {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
  }

  /* Print styles */
  @media print {

    /* --- Hide non-print elements --- */
    .rate-badge, .insights-header, .inputs-only-callout, .info-panel-overlay,
    .auth-modal-overlay, .account-panel-overlay, .site-footer, .splash-overlay,
    .section-tip, .section-tip-popup, .beta-badge, .version-badge,
    .share-btn, #download_btn, .ai-prompt-btn, .header-cta, .collapse-icon,
    .tooltip-popup, .kpi-label .tooltip, .kpi-label .kpi-conditional,
    .chart-card h3 .chart-conditional, .verify-warning, .chart-toggles,
    .opp-row-img, .opp-col-image, .ev-roi-btn,
    .chart-skeleton-overlay, .shimmer-tooltip { display: none !important; }

    /* --- Kill all shimmer effects: show real numbers & charts --- */
    body:not(.kpi-loaded) .kpi-half-value { color: inherit !important; }
    body:not(.kpi-loaded) .kpi-half-value .kpi-delta,
    body:not(.kpi-loaded) .kpi-half-value .kpi-unit { opacity: 1 !important; }
    .kpi-half-value.kpi-loading {
      color: inherit !important;
      background: none !important;
      animation: none !important;
      pointer-events: auto !important;
    }
    .kpi-half-value.kpi-loading .kpi-delta,
    .kpi-half-value.kpi-loading .kpi-unit { opacity: 1 !important; }
    .mini-metric-value.mini-loading {
      color: inherit !important;
      background: none !important;
      animation: none !important;
      pointer-events: auto !important;
    }
    .chart-card.chart-gate-loading .chart-container canvas { opacity: 1 !important; }
    .chart-card.chart-gate-loading .chart-badges .badge-val { color: inherit !important; }
    .chart-card.chart-gate-loading .chart-container::after { display: none !important; }
    .chart-card.chart-gate-loading .hfunnel-flow,
    .chart-card.chart-gate-loading .hfunnel-table,
    .chart-card.chart-gate-loading .funnel-headers,
    .chart-card.chart-gate-loading .funnel-bars { opacity: 1 !important; }

    /* --- Hide Calculations section entirely --- */
    .funnel-table-section { display: none !important; }

    /* --- ROI modal: inline for print --- */
    .roi-modal-overlay {
      display: block !important;
      position: static !important;
      background: none !important;
      z-index: auto !important;
    }
    .roi-modal-container {
      position: static !important;
      width: 100% !important;
      height: auto !important;
      max-width: 100% !important;
      padding: 0 !important;
      border: none !important;
      box-shadow: none !important;
      background: transparent !important;
      overflow: visible !important;
    }
    .roi-modal-close { display: none !important; }

    /* --- Force visible sections --- */
    .dashboard-section, .charts-section, .opportunities-wrapper,
    .revenue-potential { display: block !important; }

    /* --- Override dark theme variables --- */
    :root {
      --bg: #ffffff;
      --surface: #ffffff;
      --surface-2: #f5f5f5;
      --border: #dddddd;
      --text: #111111;
      --text-dim: #555555;
    }

    /* --- Layout: hide sidebar, single column --- */
    body { background: #fff !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .page-layout { display: block !important; height: auto; overflow: visible; }
    .sidebar { display: none !important; }
    .verify-inputs-msg { display: none !important; }
    .main-content { display: flex !important; flex-direction: column; overflow: visible; height: auto; }

    /* --- Section ordering --- */
    #print-overview        { order: 1; }
    #print-inputs          { order: 2; }
    .dashboard-section     { order: 3; }
    .charts-section        { order: 4; }
    .opportunities-wrapper { order: 5; }
    .roi-modal-overlay     { order: 6; }
    .roi-drawer-overlay    { order: 7; }
    #print-url             { order: 8; }

    /* --- Page breaks before each major section --- */
    .dashboard-section     { break-before: page !important; }
    .charts-section        { break-before: page !important; }
    .opportunities-wrapper { break-before: page !important; }
    .roi-modal-overlay     { break-before: page !important; }
    .roi-drawer-overlay    { break-before: page !important; }

    /* --- Page break avoidance within sections --- */
    .kpi-card, .chart-card { break-inside: avoid; }
    .kpi-grid { break-inside: avoid; }
    .kpi-grid .kpi-card { flex-basis: calc(50% - 8px) !important; }
    .kpi-row { break-inside: avoid; }

    /* --- Background overrides (dark → white/light) --- */
    .kpi-card { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; }
    .kpi-card::after { display: none !important; }
    .chart-card { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; }
    .mini-metric-card { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; }
    .mini-metric-label .tooltip { display: none !important; }
    .mini-metric-label { color: #555 !important; }
    .dashboard-section, .charts-section, .opportunities-wrapper, .revenue-potential { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 12px !important; }
    .opportunities-section { background: transparent !important; border: none !important; box-shadow: none !important; }
    .opp-tip { background: #f5f5f5 !important; border: 1px solid #ddd !important; }

    /* --- Global text color: force all text dark for white PDF --- */
    * { color: #111 !important; }

    /* --- Dimmed text (secondary) --- */
    .header p, .dashboard-subtitle, .kpi-label, .kpi-half.current .kpi-half-label,
    .opp-tip .opp-label, .opp-col-title,
    .opp-input-item, .ev-roi-card-desc, .ev-roi-note, .ev-cta-subtext,
    .ev-slider-title, .rp-coming-soon, .rp-half-label { color: #555 !important; }

    /* --- Preserve accent colors (readable on white) --- */
    .kpi-half.improved .kpi-half-value { font-weight: 700; }
    .kpi-card.blue .kpi-half.improved .kpi-half-value { color: #16a34a !important; }
    .kpi-card.orange .kpi-half.improved .kpi-half-value { color: #d97706 !important; }
    .kpi-card.green .kpi-half.improved .kpi-half-value { color: #0891b2 !important; }
    .kpi-card.sales .kpi-half.improved .kpi-half-value { color: #16a34a !important; }
    .kpi-card.gtm .kpi-half.improved .kpi-half-value { color: #2563eb !important; }
    .kpi-card.marketing .kpi-half.improved .kpi-half-value { color: #ea580c !important; }
    .ev-roi-card-sub { color: #ea580c !important; }
    .ev-arrow { color: #16a34a !important; }
    .rp-half.after .rp-half-value { color: #2563eb !important; }
    .rp-horizon, .rp-delta { color: #2d8a2d !important; }
    .opp-icon { background: #f0f0f0 !important; }
    .opp-three-col { grid-template-columns: 1fr 1fr !important; }
    .opp-col-title { border-bottom-color: #ddd !important; }
    .opp-input-item { background: #f5f5f5 !important; }
    .chart-badge { background: #f0f0f0 !important; }

    /* --- ExitVelocity / ROI modal print overrides --- */
    .ev-card, .ev-spend-card, .ev-roi-card { background: #fff !important; border: 1px solid #ddd !important; box-shadow: none !important; }
    .ev-card::after, .ev-spend-card::after, .ev-roi-card::before, .ev-roi-card::after { display: none !important; }
    .ev-roi-card-green { border-color: #ddd !important; }
    .ev-slider-wrap, .ev-slider-wrap-blue { background: transparent !important; border: none !important; }
    .ev-slider-badge { background: #f0f0f0 !important; }
    .ev-bottom-logo-light { display: none !important; }
    .ev-bottom-logo-dark { display: inline-block !important; }
    #ev_cta_learn_more { display: none !important; }
    #ev_cta_get_started { display: inline-block !important; background: #FF512F !important; color: #fff !important; border: none !important; }

    /* --- ROI Drawer: force into document flow, hide handle --- */
    .roi-drawer-overlay {
      display: block !important;
      position: static !important;
      background: none !important;
      pointer-events: auto !important;
      z-index: auto !important;
    }
    .roi-drawer-panel {
      position: static !important;
      transform: none !important;
      width: 100% !important;
      animation: none !important;
    }
    .roi-drawer-tab { display: none !important; }
    .roi-drawer {
      position: static !important;
      overflow: visible !important;
      max-height: none !important;
      border: none !important;
      background: transparent !important;
      padding: 0 !important;
    }
    .roi-drawer-body { padding: 0 !important; }

    /* --- Banner / gradient overrides (flat for print) --- */
    .dashboard-title, .opportunities-title, .revenue-potential-title { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 0 4px !important; margin: 0 0 8px !important; font-size: 13px !important; border-bottom: 1px solid #ddd !important; }

    /* --- Header: title left, logo right --- */
    .header-bar { background: #fff !important; border-bottom: 1px solid #ddd !important; box-shadow: none !important; }
    .header { display: flex !important; flex-direction: row-reverse !important; justify-content: space-between !important; align-items: center !important; }
    .header-left { order: 2; }
    .header-center { order: 1; text-align: left !important; }
    .header-center h1 { font-size: 1.4rem !important; }
    .header-center p { display: none !important; }
    .header-right { display: none !important; }

    /* --- Logo: only show dark full logo --- */
    .header-logo-light { display: none !important; }
    .header-logo-dark { display: inline-block !important; }
    .header-logo-mobile { display: none !important; }

    /* --- Revenue Potential print overrides --- */
    .revenue-potential { break-before: page !important; }
    .rp-card { background: #fff !important; border: 1px solid #ddd !important; break-inside: avoid; }
    .rp-card::before { background: #0c63ff !important; }
    .rp-card::after { display: none !important; }
    .rp-card-label { color: #111 !important; }
    .rp-coming-soon { color: #777 !important; }
    .rp-half-label { color: #555 !important; background: #f5f5f5 !important; border: 1px solid #ddd !important; }
    .rp-half.before .rp-half-value { color: #111 !important; }
    .rp-half.after .rp-half-value { color: #0c63ff !important; }
    .rp-horizon { color: #2d8a2d !important; background: #e8f5e8 !important; border-color: #c3e6c3 !important; }
    .rp-delta { color: #2d8a2d !important; background: #f0f8f0 !important; border-color: #c3e6c3 !important; }
    .revenue-potential-title { color: #111 !important; }
    .rp-grid { break-inside: avoid; }

    /* --- Print-only sections --- */
    #print-overview { display: block !important; background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 14px 18px; margin-bottom: 16px; }
    #print-inputs { display: block !important; background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 14px 18px; margin-bottom: 16px; }
    #print-url { display: block !important; }
  }
