/* Local DKOU reference scene register. Scientific image pixels are untouched. */
:root{
 --space:#10090e;
 --specimen-well:#160c10; /* Matches the warm Higgsfield postproduction handoff. */
 --surface:#24181f;
 --surface-raised:#39252b;
 --field-input:#170f15;
 --text-primary:#f9efe9;
 --text-body:#e4d4ce;
 --text-muted:#c6aea8;
 --accent:#eda98f;
 --accent-hover:#f5bea6;
 --accent-soft:#f0c1ac;
 --on-accent:#160c10;
 --border-control:#a17d76;
 --border-quiet:#51343c;
 --focus:#ffd9c1;
 --error-surface:#432822;
 --error-text:#ffd2c9;
 --dark:var(--space);
 --paper:var(--text-primary);
 --green:var(--accent);
 --mint:var(--accent);
 --line:var(--border-quiet);
 --muted:var(--text-muted);
 --ink:var(--on-accent);
 color-scheme:dark;
}

/* Warm black edges and a burgundy scene; broad amber backlight, no filter on scientific evidence. */
html,body{background:var(--space);color:var(--text-primary)}
#field{background:var(--space)}
#field .atmosphere{background:radial-gradient(ellipse at 50% 42%,var(--specimen-well) 0,var(--specimen-well) 27%,#32171f 65%,var(--space) 100%)}
#field .atmosphere:after{background:linear-gradient(180deg,#10090e22,transparent 45%,#10090e80)}
#field .horizon{border-top-color:transparent;background:radial-gradient(ellipse at 50% 0,#db986d38,transparent 68%)}
#field .ambient-halo{background:radial-gradient(ellipse,#e8a17a32,transparent 68%);opacity:.8}
#field .ground{background:radial-gradient(ellipse,#00000099,transparent 67%)}
.masthead{background:linear-gradient(#10090ef5,#10090eb3,transparent);border-bottom-color:var(--border-quiet)}
.masthead .domain-nav{background:transparent}
.domain-nav button,.domain-nav small,.domain-nav>span{color:var(--text-muted)}
.domain-nav button[aria-pressed=true],.domain-nav [data-pending]{color:var(--text-primary)}
.domain-nav button:after,.domain-nav [data-pending]:after{background:var(--accent)}
.domain-nav button:hover{color:var(--accent-soft)}
#field[data-stage=journey] .specimen-stage{background:transparent;border-bottom-color:var(--border-quiet)}
#field[data-stage=opened] .specimen-stage{background:transparent;border-bottom-color:var(--border-quiet)}
#domain-title{color:var(--text-primary);text-shadow:0 5px 45px #00000026}

/* Text hierarchy. Neutral text leaves the blue/pink scientific imagery in charge. */
#field :is(.field-intro>.micro,.quality small,.anatomy-caption,.field-controls span,.field-footer,.journey-breadcrumb,.scene-copy>.micro,.route-summary>.micro,.scene-footnote,.journey-utility p,.standalone-line,.material-step small,.atlas-next,.scientific-view figcaption,.lab-view figcaption,.material-atlas figcaption,.preparation-view figcaption,.bic-view figcaption,.journey-material figcaption,.method-note,.cycle-source-note,.early-response small,.academic-names small,.study-intro,.paper-index,.clinical-paper .micro,.paper-link .micro,.authority-proof dd span){color:var(--text-muted)}
#field :is(#domain-subtitle,.scene-lead,.material-question,#atlas-question,.specimen-contact .contact-copy,.specimen-contact a,.specimen-contact button,.materials-back,.restore-button,.cycle-conversation p>span,.cycle-conversation>p:last-child,#market-context,.early-response p:not(.micro),.credential-scope,.regulatory-intro .scene-lead,.authority-role,.authority-intro,.authority-value,.authority-background p,.authority-proof dd,.clinical-paper p:not(.micro),#preparation-lead,.preparation-steps li,.paper-link>p:last-child,.bic-definition>p:not(.micro),.scientific-notes){color:var(--text-body)}
#field :is(.quality,.specimen-contact .contact-intro,.material-atlas>.micro,.early-response .micro,.preparation-view>.micro,.authority-person .micro,.affiliation-strip>.micro,.clinical-studies>.micro){color:var(--accent-soft)}
#field :is(.credential-statement,.credential-specialism,.credential-scope strong,.authority-proof dt,.academic-names>span,.partner-names>span,.paper-link a,.clinical-paper a,.authority-background a,.scientific-notes summary,.bic-definition strong){color:var(--text-primary)}
#field .credential-statement span+span{color:var(--accent-soft)}
#field .clinical-paper details p{color:var(--text-body)!important}
#field :is(.authority-background .publication-title,.credential-scope summary,.authority-background summary,.clinical-paper summary){color:var(--accent-soft)}
#field .motion-label{color:var(--text-body)}

/* Keep all role labels readable; selection also has its existing underline/state. */
#field .quick-journeys button[data-journey],#field .quick-journeys button[data-journey] span{color:var(--text-primary)}
#field .quick-journeys button[data-journey] small{color:var(--text-muted)}
#field .quick-journeys button[data-journey][aria-pressed=true] span,#field .quick-journeys button[data-journey]:hover span{color:var(--accent-soft)}
#field .quick-journeys button[data-journey][aria-pressed=true] span{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
#field .quick-journeys button[data-journey]:before{background:radial-gradient(circle closest-side,transparent 40%,#ffd1acb3 57%,#dc886b66 70%,#8d404022 86%,transparent 100%)}
#comet-orbit{stroke:#a17d7666;stroke-opacity:1}
#field :is(.material-picker button,.image-choices button,.material-gallery button,.chapter-track button,.market-options button,.market-options button span,.preparation-tabs button){color:var(--text-body)}
#field :is(.material-picker button[aria-pressed=true],.image-choices button[aria-pressed=true],.material-gallery button[aria-pressed=true],.chapter-track [aria-current=step],.market-options button[aria-pressed=true],.market-options button[aria-pressed=true] span){color:var(--text-primary);border-color:var(--accent)}
#field .material-picker button[aria-pressed=true]:after{background:var(--accent)}
#field .chapter-track [aria-current=step] span{background:var(--surface-raised);border-color:var(--accent)}
#field .preparation-tabs button[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
#field .material-gallery button img{background:var(--surface);opacity:1}

/* Warm peach actions remain distinct from the retained green BerlinAnalytix logo. */
.specimen-open,.material-peek,#field .authority-next,.lead-actions button[type=submit],.button,.button.dark,.service-dialog .button.dark,#contact-dialog .button{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.specimen-open:hover,.material-peek:hover,#field .authority-next:hover,.lead-actions button[type=submit]:hover,.button:hover,.button.dark:hover,#contact-dialog .button:hover{background:var(--accent-hover);color:var(--on-accent);border-color:var(--accent-hover)}
#field .specimen-contact .material-entry,.motion-skip{background:var(--surface);color:var(--text-primary);border-color:var(--border-control)}
#field .specimen-contact .material-entry:hover,.motion-skip:hover{background:var(--surface-raised);border-color:var(--accent-soft)}
#field :is(.text-action,.ortho-shortcuts button,.detail-actions button){color:var(--accent-soft)}
#field :is(.text-action:hover,.ortho-shortcuts button:hover,.restore-button:hover,.field-footer a:hover,.field-footer button:hover){color:var(--text-primary)}
.field-controls button,.chapter-navigation>button,.preparation-tabs button,.chapter-track span{border-color:var(--border-control);color:var(--text-primary)}
.field-controls button:hover,.chapter-navigation>button:hover{background:var(--surface-raised);border-color:var(--accent-soft)}
.person-bubble{background:var(--surface);border-color:var(--border-control);color:var(--text-primary)}
.person-bubble:hover{background:var(--surface-raised);border-color:var(--accent-soft)}
.person-bubble small{color:var(--text-muted)}
#field .specimen-contact>img{box-shadow:0 0 0 1px var(--border-control),0 18px 50px #00000055}

/* Quiet separators and neutral dark image mounts, without colouring image pixels. */
#field :is(.field-footer,.material-picker,.route-summary,.chapter-navigation,.standalone-line,.cycle-controls,.early-response,.regulatory-credentials,.credential-scope>div,.authority-proof,.affiliation-strip,.clinical-paper,.ortho-shortcuts,.preparation-steps li,.paper-link,.bic-definition,.market-options button,.cycle-conversation>p:last-child){border-color:var(--border-quiet)}
#field .market-options button[aria-pressed=true]{border-color:var(--accent)}
#field .field-footer{background:linear-gradient(transparent,var(--space))}
#field :is(.scientific-view>button,.material-atlas figure>button,.evidence-mount,.early-response>button){background:var(--surface);box-shadow:0 18px 48px #00000066}
#field .lab-view video,.service-evidence img,.image-dialog img{background:var(--field-input);box-shadow:0 18px 48px #00000055}
#field :is(.scientific-view>button:after,.material-atlas figure>button>span,.evidence-mount>span,.bic-concept>span){background:#170f15f2;color:var(--text-primary)}
#field :is(.material-atlas,.material-gallery,.specimen-contact,.cycle-map-scroll){scrollbar-color:var(--border-control) var(--space)}
#field :is(.material-atlas,.specimen-contact):focus-within{scrollbar-color:var(--accent-soft) var(--space)}
/* Original light scientific diagrams deliberately keep their own paper ground. */
.bic-concept,.bic-full-art{background:#faf7f2}

/* Sponsor/lab path: neutral nodes, one warm active trail. */
#field :is(.cycle-lane-label,.cycle-lab-labels span,.cycle-controls>span,#cycle-nodes button,#cycle-nodes button>span){color:var(--text-muted)}
#field :is(.lab-lane,.cycle-conversation>.micro,.cycle-controls button,.cycle-exchange){color:var(--accent-soft)}
#field :is(#cycle-nodes button[aria-pressed=true],#cycle-nodes button[aria-pressed=true]>span,#cycle-nodes button[aria-pressed=true]>strong,.cycle-lab-labels span.active,#cycle-feedback-status){color:var(--text-primary)}
#field #cycle-nodes button>span{background:transparent}
#field .cycle-track{stroke:var(--border-quiet)}
#field .cycle-progress,#field .cycle-loop{stroke:var(--accent)}
#field .cycle-points circle{fill:var(--border-control)}
#field .cycle-points circle:nth-child(odd){fill:var(--text-body)}
#field #cycle-current-dot{fill:var(--accent);stroke:#eda98f33}
#field .cycle-conversation .cycle-exchange{background:linear-gradient(transparent,var(--border-control),transparent)}

/* Contact and evidence sheets share the same warm dark surface, including James's card. */
dialog.contact-dialog,dialog.service-dialog,dialog.scene-dialog,dialog.image-dialog,dialog.catalogue-dialog,dialog.bic-dialog,dialog.lead-sheet{background:var(--surface);color:var(--text-primary);border-color:var(--border-control);box-shadow:0 30px 110px #00000099}
dialog::backdrop,.lead-sheet::backdrop,.contact-dialog::backdrop{background:#0d070bcc}
dialog :is(.micro,.contact-role,.contact-top .eyebrow,.service-scope,.detail-standalone,.service-evidence figcaption,.lead-person span,.contact-scope),#contact-dialog>.muted,#contact-dialog>.contact-scope{color:var(--text-muted)}
dialog :is(.service-scope,.detail-standalone),.scene-dialog details p,.catalogue-dialog>p:not(.micro),.lead-sheet>p,.lead-sheet label>span,.lead-more>p,.lead-sheet #lead-verification p{color:var(--text-body)}
dialog .text-action,.scene-dialog h3,.bic-guide-copy strong,#contact-dialog>.text-link{color:var(--accent-soft)}
#contact-dialog .contact-role,#contact-dialog .contact-top .eyebrow{color:var(--text-muted)}
#contact-dialog .contact-scope,.scene-dialog details,.service-dialog .standalone{border-color:var(--border-quiet)}
.lead-sheet label,.lead-consent a,.lead-actions #lead-skip{color:var(--text-primary)}
.lead-sheet input:not([type=checkbox]),.lead-sheet textarea{background:var(--field-input);color:var(--text-primary);border-color:var(--border-control)}
.lead-sheet input::placeholder,.lead-sheet textarea::placeholder{color:var(--text-muted);opacity:1}
.lead-sheet #lead-preview{color:var(--text-body);border-color:var(--accent)}
.lead-consent input{accent-color:var(--accent)}
#lead-error{background:var(--error-surface);color:var(--error-text)}
.contact-toast{background:var(--surface-raised);color:var(--text-primary);box-shadow:0 12px 48px #00000066,0 0 0 1px var(--border-control)}
dialog .close-dialog:hover{background:var(--surface-raised);color:var(--text-primary)}
#service-catalogue button:hover{color:var(--accent-soft)}
.skip,.noscript{background:var(--text-primary);color:var(--on-accent)}

button:focus-visible,a:focus-visible,summary:focus-visible,.lead-sheet input:focus,.lead-sheet textarea:focus{outline-color:var(--focus)}
@media(max-width:760px){
 #field:is([data-stage=journey],[data-inspection=materials]) .specimen-stage{background:var(--specimen-well);border-bottom-color:var(--border-quiet)}
 #field .specimen-contact{border-top-color:var(--border-quiet)}
}

/* Reference lighting belongs only to the illustrative specimen stage, never histology. */
#field .horizon{opacity:.85}
#field .ambient-halo{background:radial-gradient(ellipse,transparent 30%,#e8a17a1c 53%,transparent 72%);filter:blur(35px)}
#field .specimen-stage:before{content:'';position:absolute;left:var(--exhibit-x,50%);top:var(--exhibit-y);width:var(--exhibit-size);height:var(--exhibit-size);transform:translate(-50%,-50%);background:radial-gradient(ellipse at 64% 38%,#ffc59a24,transparent 35%);mix-blend-mode:screen;pointer-events:none;z-index:6}
#field .comet-texture{filter:sepia(1) saturate(.7) hue-rotate(325deg);mix-blend-mode:screen}
#field .title-window{isolation:isolate}
