/* The guided Kansenvinder shares its host card material.
   Its iframe document is one card plane; editable wells are assigned by the
   popup material consumer. Dimensions and conversation remain owned. */
@media (forced-colors: none) {
 
  :root:where([data-nexin-theme="dark"]) {
    color-scheme: dark;
    --kf-canvas:var(--nx-material-card);
    --kf-surface:var(--nx-material-card);
    --kf-elevated:var(--nx-material-card);
    --kf-text:var(--nx-material-ink);
    --kf-secondary:var(--nx-material-muted);
    --kf-accent:var(--nx-material-accent);
    --kf-line:var(--nx-material-line);
    --kf-control:var(--nx-material-line);
    --kf-error:#ffb4b8;
    --kf-rise:var(--nx-material-shadow-card);
    --kf-small:var(--nx-material-shadow-small);
    --kf-inset:var(--nx-material-shadow-inset);
    --blue:var(--kf-accent)!important;
    --ink:var(--kf-text)!important;
    --muted:var(--kf-secondary)!important;
    --line:var(--kf-line)!important;
    --mist:var(--kf-elevated)!important;
    --white:var(--kf-surface)!important;
    --neu-page:var(--kf-canvas)!important;
    --neu-surface:var(--kf-surface)!important;
    --neu-local:var(--kf-surface)!important;
    --neu-blue:var(--kf-accent)!important;
    --neu-ink:var(--kf-text)!important;
    --neu-muted:var(--kf-secondary)!important;
    --neu-line:var(--kf-line)!important;
    --fn-face:var(--kf-surface)!important;
    --fn-ink:var(--kf-text)!important;
    --fn-muted:var(--kf-secondary)!important;
    --fn-rise:var(--kf-rise)!important;
    --fn-small:var(--kf-small)!important;
    --fn-inset:var(--kf-inset)!important;
    --fn-colour:var(--kf-small)!important;
    --neu-card:var(--kf-rise)!important;
    --neu-paper:var(--kf-rise)!important;
    --neu-button:var(--kf-small)!important;
    --neu-tiny:var(--kf-small)!important;
    --neu-inset:var(--kf-inset)!important;
    --all-canvas:var(--kf-surface)!important;
    --all-clay:var(--kf-rise)!important;
    --all-paper:var(--kf-rise)!important;
    background:var(--kf-canvas)!important;
    color:var(--kf-text)!important;
    scrollbar-color:var(--kf-control) var(--kf-canvas);
  }
  :root:where([data-nexin-theme="dark"]) ::selection {background:var(--kf-accent)!important;color:var(--kf-canvas)!important}
  :root:where([data-nexin-theme="dark"]) ::placeholder {color:var(--kf-secondary)!important;opacity:1}
  :root:where([data-nexin-theme="dark"]) ::-webkit-scrollbar-track {background:var(--kf-canvas)}
  :root:where([data-nexin-theme="dark"]) ::-webkit-scrollbar-thumb {background:var(--kf-control);border-color:var(--kf-canvas)}

  /* Scope specificity also wins against later-injected light material rules. */
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] {
    background:var(--kf-canvas)!important;color:var(--kf-text)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup {
    background:var(--kf-surface)!important;color:var(--kf-text)!important;
    border-color:var(--kf-line)!important;box-shadow:var(--kf-rise)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup::backdrop {background:rgba(2,8,18,.65)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(#popup-scroll,#app,.popup-conversation,.popup-messages,.gr,.gr-main,.popup-head,.popup-foot,.popup-footer,.popup-composer) {
    background:var(--kf-surface)!important;color:var(--kf-text)!important;border-color:var(--kf-line)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(h1,h2,h3,label,.label,.request-label,#popup-title,.popup-title,.brief-opportunity h2,.rm-gain,.outcome-value,.outcome-comparison dd,.calculator-result-heading,.discovery-calc-inputs>label,.discovery-calc-field>span,.rm-entry-email>label) {
    color:var(--kf-text)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(p,.popup-reply,.popup-message-help,.popup-subtitle,.suggestion-label,.question-sub,.gr-meta,.gr-sub,.gr-back,.gr-contact-lead,.brief-extra,.discovery-scenario,.discovery-focus,.discovery-calc-estimate,.discovery-calc-assumption,.discovery-calc-footer,.discovery-calc-period,.calculator-result-heading>span,.discovery-calc-metric>span,.rm-how,.rm-change-label,.rm-calc-caption,.rm-calc-optional,.rm-calc-times,.rm-calc-scenario,.outcome-input-label,.outcome-input-more,.outcome-input-link,.outcome-input-question,.outcome-how,.outcome-time,.outcome-condition,.outcome-comparison dt,.outcome-details>summary,.outcome-detail-condition,.rm-entry-email>p,.rm-entry-email>label>span,.rm-email-info>p) {
    color:var(--kf-secondary)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.popup-question,.popup-speaker,.popup-gain,.popup-direction,.rm-card-contrast h2,.rm-choice h2,.outcome-message h2,.outcome-contact a,.discovery-calc-toggle-summary,.discovery-calc-toggle-summary strong,.calc-output strong,.rm-proposal-benefit,.entry-help-label strong) {
    color:var(--kf-accent)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(a,.small-link,.question-skip,.entry-inline-help,.choice-help>span,.entry-path-help,.conversation-contact .small-link,.discovery-calc-footer button,.calculator-mock-info button) {
    color:var(--kf-accent)!important;
  } /* Start suggestions, selected wishes and answer history share one hierarchy. */
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.choice,.rm-choice,.rm-pick,.entry-prominent,.entry-featured,.entry-path,.entry-tab,.guide-start,.secondary,.discovery-continue) {
    background:var(--kf-surface)!important;color:var(--kf-text)!important;
    border-color:var(--kf-control)!important;box-shadow:var(--kf-small)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.choice>span,.entry-help-label,.guide-start>span:not([aria-hidden])) {color:var(--kf-text)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.choice[aria-pressed="true"],.choice.active,.rm-choice[aria-pressed="true"],.rm-pick[aria-pressed="true"],.entry-tab.is-active,.picked-token,.outcome-input-chip) {
    background:var(--kf-elevated)!important;color:var(--kf-accent)!important;
    border-color:var(--kf-accent)!important;box-shadow:var(--kf-inset)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.picked-token span,.outcome-input-chip span) {color:inherit!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.entry-tabs,.popup-message.visitor,.history-answer-capsule,.history-answer-text,.rm-answer-capsule,.outcome-input,.outcome-input-full,.outcome-input-answer) {
    background:var(--kf-elevated)!important;color:var(--kf-text)!important;
    border-color:var(--kf-line)!important;box-shadow:var(--kf-inset)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.popup-message.visitor p,.history-answer-text p,.history-answer-capsule span,.rm-answer-capsule span) {color:var(--kf-text)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.history-question>p,.rm-answer-heading .outcome-input-question) {
    background:var(--kf-elevated)!important;color:var(--kf-accent)!important;border-color:var(--kf-line)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.history-question>p>span,.rm-answer-heading .outcome-input-question span) {color:inherit!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.history-response,.rm-change,.rm-answers,.rm-calc-inline,.rm-contact-inline,.outcome-contact,.outcome-input-full section,.discovery-calc-body,.discovery-calc-body .calc-output) {
    background:transparent!important;color:var(--kf-text)!important;border-color:var(--kf-line)!important;box-shadow:none!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .entry-prominent::before,
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .discovery-next-line {background:var(--kf-line)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.outcome-how>span,.outcome-chevron,.discovery-calc-separator) {color:var(--kf-secondary)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .outcome-condition {border-color:var(--kf-line)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.brief-opportunity,.example-suggestions,.popup-message.current,.rm-answers .outcome-input-full,.outcome-others,.outcome-comparison,.rm-entry-email,.discovery-calc-inputs>label,.discovery-calc-metric,.rm-proposal-benefit) {border-color:var(--kf-line)!important}

  /* A single recess contains editable text and optional selected tokens. */
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(input,textarea,select,.popup-compose-row,.rm-answer-textbox,.discovery-calc-field,.concrete-question,:where(#entry-email)) {
    background:var(--kf-canvas)!important;color:var(--kf-text)!important;
    border-color:var(--kf-control)!important;box-shadow:var(--kf-inset)!important;
    caret-color:var(--kf-accent)!important;accent-color:var(--kf-accent);
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.popup-compose-row textarea,.discovery-calc-field input,.discovery-calc-field textarea,.rm-desired-workflow) {
    background:transparent!important;color:var(--kf-text)!important;box-shadow:none!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .rm-desired-workflow {border-color:transparent!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.popup-compose-row,.discovery-calc-field):focus-within {
    border-color:var(--kf-accent)!important;outline-color:var(--kf-accent)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(input,textarea):focus {border-color:var(--kf-accent)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup input:-webkit-autofill {
    -webkit-text-fill-color:var(--kf-text)!important;caret-color:var(--kf-accent)!important;
    /* Paint the browser autofill backing without altering the native field. */
    box-shadow:0 0 0 1000px var(--kf-canvas) inset!important;
  } /* Compact header, edit and help controls keep their existing hit areas. */
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(:where(#popup-close,#popup-expand,#popup-resize),.popup-back,.popup-forward,.popup-head-contact,.question-back,.composer-other,.rm-answer-edit,.rm-inline-edit,.history-text-edit,.rm-back,.discovery-calc-info>summary,.discovery-calc-footer button,.rm-calc-tools button,.rm-calc-info>summary,.rm-request-icon>summary,.rm-email-info>summary,.popup-reason>summary,.gr-note>summary,.gr-preview>summary,.rm-request>summary) {
    background:var(--kf-surface)!important;color:var(--kf-secondary)!important;
    border-color:var(--kf-line)!important;box-shadow:var(--kf-small)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup #popup-send-nexin {
    background:var(--kf-elevated)!important;color:var(--kf-accent)!important;
    border-color:var(--kf-control)!important;box-shadow:var(--kf-small)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.choice-icon-premium,.question-icon-premium,.service-icon,.work-icon,.choice-check,.brief-icon,.rm-icon,.rm-answer-chevron,.rm-answer-capsule svg,.discovery-calc-chevron,.entry-help-arrow,.entry-path svg) {
    color:var(--kf-accent)!important;stroke:currentColor!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.primary,.popup-send.has-answer) {
    background:var(--kf-accent)!important;color:var(--kf-canvas)!important;
    border-color:var(--kf-accent)!important;box-shadow:var(--kf-small)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.primary,.popup-send.has-answer) svg {
    color:var(--kf-canvas)!important;stroke:currentColor!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .popup-send:not(.has-answer) {
    background:var(--kf-elevated)!important;color:var(--kf-secondary)!important;
    border-color:var(--kf-line)!important;box-shadow:var(--kf-inset)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .popup-send:not(.has-answer) svg {color:var(--kf-secondary)!important;stroke:currentColor!important} /* Summary, editable proposals and calculation remain distinct material levels. */
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.discovery-summary,.discovery-calculator,.discovery-ideas,.discovery-scenario,.outcome-message,.rm-card,.rm-card-contrast,.result-card,.outcome-calc,.calc,.rm-contact-concept) {
    background:var(--kf-elevated)!important;color:var(--kf-text)!important;
    border-color:var(--kf-line)!important;box-shadow:var(--kf-rise)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.discovery-summary>p,.rm-card .rm-gain,.rm-change p,.rm-proposal-support,.outcome-comparison dd,.calc-output .rm-calc-metric) {color:var(--kf-text)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .rm-change>div {
    background:var(--kf-canvas)!important;border-color:var(--kf-line)!important;box-shadow:var(--kf-inset)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .rm-change>div:last-child {
    background:var(--kf-surface)!important;border-color:var(--kf-control)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.discovery-calc-toggle,.gr-calc-toggle,.discovery-calc-field>span,.calculator-result-heading) {color:var(--kf-text)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.calculator-mock-info,.discovery-calc-info>p,.rm-calc-info>p,.action-hint) {
    background:var(--kf-elevated)!important;color:var(--kf-text)!important;
    border-color:var(--kf-control)!important;box-shadow:var(--kf-rise)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.calculator-mock-info p,.gr-note p,.gr-preview p,.rm-request p,.rm-email-info p,.discovery-calc-info p,.rm-calc-info p) {color:var(--kf-secondary)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.popup-reason,.gr-note,.gr-preview,.rm-request,.rm-email-info) {color:var(--kf-secondary)!important;border-color:var(--kf-line)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.confirmation,.rm-calc-inline .calc-output) {
    background:var(--kf-elevated)!important;color:var(--kf-text)!important;border-color:var(--kf-line)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .confirmation pre {
    background:var(--kf-canvas)!important;color:var(--kf-text)!important;
    border-color:var(--kf-line)!important;box-shadow:var(--kf-inset)!important;
  } /* The existing small workflow illustration inherits the palette, not a filter. */
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup [data-service] {--service-ink:var(--kf-accent)}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .verkenner-proposal-motion {
    --proposal-motion-blue:var(--kf-accent);--proposal-motion-ink:var(--kf-text);--proposal-motion-muted:var(--kf-secondary);
    color:var(--kf-text)!important;border-color:var(--kf-line)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .verkenner-proposal-motion__label {color:var(--kf-secondary)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.verkenner-proposal-motion__arrow,.verkenner-proposal-motion__lines,.verkenner-proposal-motion__table,.verkenner-proposal-motion__calendar,.verkenner-proposal-motion__media) {color:var(--kf-secondary)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.verkenner-proposal-motion__step--result,.verkenner-proposal-motion__step--review) .verkenner-proposal-motion__preview>span {color:var(--kf-accent)!important}

  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(button,a,input,textarea,select,summary):focus-visible {
    outline:2px solid var(--kf-accent)!important;outline-offset:3px!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup [aria-invalid="true"] {border-color:var(--kf-error)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.error,.gr-error,.rm-contact-error,#answer-error,#contact-error,#calc-error,[role="alert"]) {color:var(--kf-error)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(button:disabled,[aria-disabled="true"]) {
    background:var(--kf-surface)!important;color:#8196b1!important;
    border-color:var(--kf-line)!important;box-shadow:none!important;opacity:1;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #popup-launcher {
    background:var(--kf-surface)!important;color:var(--kf-text)!important;
    border-color:var(--kf-control)!important;box-shadow:var(--kf-rise)!important;
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #popup-launcher .launcher-icon {color:var(--kf-accent)!important;background:transparent!important;border-color:var(--kf-line)!important}

  @media (hover:hover) {
    :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.choice,.rm-choice,.rm-pick,.entry-prominent,.entry-path,.entry-tab,.guide-start,.secondary,.discovery-continue,.picked-token,.history-answer-capsule,.history-answer-text,.rm-answer-capsule,:where(#popup-close),.popup-back,.popup-forward,.question-back,.composer-other,.rm-inline-edit,.rm-answer-edit,.history-text-edit,.rm-calc-tools button,.rm-calc-info>summary,.discovery-calc-info>summary,.gr-note>summary,.gr-preview>summary,.popup-reason>summary):hover:not(:disabled) {
      background:var(--kf-elevated)!important;color:var(--kf-accent)!important;border-color:var(--kf-accent)!important;
    }
    :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.primary:not(.popup-send),.popup-send.has-answer):hover:not(:disabled) {background:#b4c3d7!important;color:var(--kf-canvas)!important;border-color:#b4c3d7!important}
    :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #popup-launcher:hover {background:var(--kf-elevated)!important;border-color:var(--kf-accent)!important}
  }
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(button,a):active:not(:disabled) {box-shadow:var(--kf-inset)!important}


  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .transcript .delete {background:transparent!important;color:var(--kf-secondary)!important;border-color:var(--kf-line)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .transcript .delete:is(:hover,:focus-visible) {color:var(--kf-accent)!important;border-color:var(--kf-accent)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup :is(.popup-back,.popup-forward):disabled {opacity:.45;box-shadow:none!important;color:#8196b1!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup #popup-send-nexin:is(:hover,:focus-visible) {background:#2a3c55!important;color:var(--kf-text)!important;border-color:var(--kf-accent)!important}
  :root:where([data-nexin-theme="dark"]) body[data-popup][data-brief][data-clean] #opportunity-popup .popup-send:not(.has-answer):hover {background:var(--kf-elevated)!important;color:var(--kf-secondary)!important;border-color:var(--kf-accent)!important}

 
}
