/* Loaded only by unified company presentation. Authored layouts and status colours stay intact. */
html:root {
    --fenix-btn-bg: var(--fenix-ui-action);
    --fenix-btn-bg-hover: var(--fenix-ui-action-hover);
    --fenix-btn-text: var(--fenix-ui-on-action);
    --fenix-font-body: var(--fenix-ui-font-body);
    --fenix-font-heading: var(--fenix-ui-font-heading);
    --font-body: var(--fenix-ui-font-body);
    --font-heading: var(--fenix-ui-font-heading);
    --fenix-radius-btn: var(--fenix-ui-radius-button);
    --fenix-radius-input: var(--fenix-ui-radius-input);
    --fenix-radius-card: var(--fenix-ui-radius-card);
    --fenix-radius-lg: var(--fenix-ui-radius-dialog);
    --radius-btn: var(--fenix-ui-radius-button);
    --input-radius: var(--fenix-ui-radius-input);
    --radius-card: var(--fenix-ui-radius-card);
    --radius-lg: var(--fenix-ui-radius-dialog);
}
html body :is(.btn-primary, .fenix-cta-primary, .fenix-header__cta--primary, .fenix-footer__newsletter-cta, .button-1, .checkout-button, .cm-btn, .ind-cartdrawer__checkout, .gvt-auth-btn-primary, .dp-btn, .ce-btn:not(.ce-btn--ghost), .rf-btn--primary) {
    background: var(--fenix-ui-action) !important;
    border-color: var(--fenix-ui-action);
    color: var(--fenix-ui-on-action) !important;
    border-radius: var(--fenix-ui-radius-button);
}
html body :is(.btn-primary, .fenix-cta-primary, .fenix-header__cta--primary, .fenix-footer__newsletter-cta, .button-1, .checkout-button, .cm-btn, .ind-cartdrawer__checkout, .gvt-auth-btn-primary, .dp-btn, .ce-btn:not(.ce-btn--ghost), .rf-btn--primary):hover {
    background: var(--fenix-ui-action-hover) !important;
    color: var(--fenix-ui-on-action-hover) !important;
}
html body :is(.btn-primary, .fenix-cta-primary, .fenix-header__cta--primary, .fenix-footer__newsletter-cta, .button-1, .checkout-button, .cm-btn, .ind-cartdrawer__checkout, .gvt-auth-btn-primary, .dp-btn, .ce-btn:not(.ce-btn--ghost), .rf-btn--primary):focus-visible {
    outline: 2px solid var(--fenix-ui-focus);
    outline-offset: 3px;
}
/* Icons inherit the same foreground as the button in every mode and hover state. */
html body :is(.btn-primary,.fenix-cta-primary,.fenix-header__cta--primary,.fenix-footer__newsletter-cta,.button-1,.checkout-button,.cm-btn,.ind-cartdrawer__checkout,.gvt-auth-btn-primary,.dp-btn,.ce-btn:not(.ce-btn--ghost),.rf-btn--primary) :is(svg,i) { color: inherit !important; }
/* Portal filter, paging and calendar controls use the action pair, not link colours. */
html body .portal-body :is(.filter-btn--primary,.pager-btn.active,.fc-button-primary.fc-button-active) {
    background: var(--fenix-ui-action) !important; border-color: var(--fenix-ui-action) !important; color: var(--fenix-ui-on-action) !important;
}
html body .portal-body :is(.filter-btn--primary,.pager-btn.active,.fc-button-primary.fc-button-active):hover {
    background: var(--fenix-ui-action-hover) !important; border-color: var(--fenix-ui-action-hover) !important; color: var(--fenix-ui-on-action-hover) !important;
}
html body .portal-body :is(.filter-btn--primary,.pager-btn.active,.fc-button-primary.fc-button-active) :is(svg,i) { color: inherit !important; }
html .portal-body, html .portal-body[data-portal] {
    --fenix-portal-link: var(--fenix-ui-link);
    --brand: var(--fenix-ui-brand);
    --brand-hover: var(--fenix-ui-hover);
    --brand-soft: var(--fenix-ui-soft);
    --brand-soft-text: var(--fenix-ui-on-soft);
    --on-brand: var(--fenix-ui-on-brand);
    --ring: var(--fenix-ui-focus);
    --font-heading: var(--fenix-ui-font-heading);
    --font-body: var(--fenix-ui-font-body);
    --radius-btn: var(--fenix-ui-radius-button);
    --radius-card: var(--fenix-ui-radius-card);
    --input-radius: var(--fenix-ui-radius-input);
    --text-faint: var(--fenix-ui-muted);
    --portal-accent: var(--fenix-portal-link);
    --portal-link-active-bg: var(--fenix-ui-soft);
    --portal-link-active-text: var(--fenix-ui-on-soft);
    --portal-sidebar-muted: var(--fenix-ui-muted);
    font-family: var(--fenix-ui-font-body);
}
html[data-theme="dark"] .portal-body, html[data-theme="dark"] .portal-body[data-portal] {
    /* Portal slate rows are lighter than the palette's neutral dark surface. */
    --fenix-portal-link: color-mix(in srgb, var(--fenix-ui-link) 65%, white);
    --brand: var(--fenix-ui-brand);
    --brand-hover: var(--fenix-ui-hover);
    --brand-soft: var(--fenix-ui-soft);
    --brand-soft-text: var(--fenix-ui-on-soft);
    --on-brand: var(--fenix-ui-on-brand);
    --ring: var(--fenix-ui-focus);
    --text-faint: var(--fenix-ui-muted);
    --portal-accent: var(--fenix-portal-link);
    --portal-link-active-bg: var(--fenix-ui-soft);
    --portal-link-active-text: var(--fenix-portal-link);
    --portal-sidebar-muted: var(--fenix-ui-muted);
}
html .portal-body :is(h1,h2,h3,h4,h5,h6,.font-serif) { font-family: var(--fenix-ui-font-heading) !important; }
html .portal-body :is(input,select,textarea,button) { font-family: var(--fenix-ui-font-body); }
html .portal-body :is(.portal-card,.card,.ds-card,.gv-panel,.gv-stat,.gv-qa) { border-radius: var(--fenix-ui-radius-card); }
html .portal-body :is(.modal-content,.modal-panel,.portal-modal__dialog) { border-radius: var(--fenix-ui-radius-dialog); }
html .portal-body :is(.input-text,.input-select,.form-control,.ts-control) { border-radius: var(--fenix-ui-radius-input); }
html .portal-body :is(.btn,.btn-secondary,.btn-dark,.ds-btn):not(.btn-icon) { border-radius: var(--fenix-ui-radius-button); }
html .portal-body :is(.sidebar-link.active,.portal-sidebar-link.active,.t-text) { color: var(--fenix-portal-link); }
html .portal-body .gv-link-more { color: var(--fenix-portal-link); }
html .portal-body :is(.text-slate-400,.text-slate-500) { color: var(--fenix-ui-muted) !important; }
/* A public header's authored logo colours cannot be reused against the portal's dark toolbar. */
html[data-theme="dark"] .portal-body .portal-nav :is(.fenix-header__logo,.fenix-header__logo-text,.fenix-header__logo-tagline,.fenix-header__logo-svg,.fenix-header__logo-since) {
    color: var(--portal-nav-text, #f1f5f9) !important;
}
/* The rule above is (0,4,1) !important and LOST, so the wordmark rendered in the brand's own
   ink on the dark nav — Indigo measured 1.77:1.
   Why: fenix-brand-lockup.css documents an override layer,
   `.fenix-header__logo[data-logo-styled][data-logo-styled][style*="--fenix-logo-l1-color"]`,
   which is (0,5,0) AND !important. Its companion escape hatch, `.fenix-header__logo--on-dark`,
   is applied SERVER-side at render time (FenixBrandLockupStyle drops the colour knobs when
   onDark). Portal dark mode is a CLIENT-side `data-theme` toggle, so the server has already
   baked the light-chrome colour in and no amount of `!important` at lower specificity reaches it.
   Re-stating the same targets with the two attribute selectors takes this to (0,7,1), which
   clears that layer without touching the lockup file or the server-side path. */
html[data-theme="dark"] .portal-body .portal-nav .fenix-header__logo[data-logo-styled][data-logo-styled] :is(.fenix-header__logo-text,.fenix-header__logo-tagline,.fenix-header__logo-svg,.fenix-header__logo-since),
html[data-theme="dark"] .portal-body .portal-nav .fenix-header__logo[data-logo-styled][data-logo-styled] {
    color: var(--portal-nav-text, #f1f5f9) !important;
}
html[data-theme="dark"] .portal-body .portal-nav .fenix-header__logo-text em { color: var(--fenix-portal-link) !important; }
html[data-theme="dark"] .portal-body .portal-nav :is(img.fenix-header__logo-img,.fenix-header__logo-artwork) { filter: brightness(0) invert(1); }
html .portal-body :is(.t-bg-light,.t-bg-light-hover) > :is(svg,i) { color: var(--fenix-ui-on-soft); }
/* The student newsletter uses the same surfaces and contrast pairs as its portal. */
html .portal-body .newsletter-frame {
    background: var(--surface);
    color: var(--text);
    border-radius: var(--fenix-ui-radius-dialog);
    font-family: var(--fenix-ui-font-body);
}
html .portal-body .newsletter-hero {
    background: var(--fenix-ui-brand);
    color: var(--fenix-ui-on-brand);
    border-radius: var(--fenix-ui-radius-dialog) var(--fenix-ui-radius-dialog) 0 0;
}
html .portal-body .newsletter-hero :is(h2,p,span,button) { color: inherit !important; }
html .portal-body .nl-section-title { color: var(--fenix-portal-link); }
html .portal-body .nl-workshop-card { background: var(--surface-2); border-radius: var(--fenix-ui-radius-card); }
html .portal-body .newsletter-body :is(.text-slate-800,.text-slate-900) { color: var(--text) !important; }
html .portal-body .newsletter-body :is(.text-slate-400,.text-slate-500,.text-slate-600) { color: var(--fenix-ui-muted) !important; }
html .portal-body :is(.nl-workshop-date,.nl-offer-code) {
    background: var(--fenix-ui-brand);
    color: var(--fenix-ui-on-brand);
    border-radius: var(--fenix-ui-radius-input);
}
html .portal-body .nl-progress-bar { background: var(--border); }
html .portal-body .nl-progress-fill { background: var(--fenix-ui-brand); }
html .portal-body .nl-offer-box {
    background: var(--fenix-ui-soft);
    color: var(--fenix-ui-on-soft);
    border-color: var(--border);
    border-radius: var(--fenix-ui-radius-card);
}
html .portal-body .nl-offer-box > :not(.nl-offer-code) { color: var(--fenix-ui-on-soft) !important; }
html .portal-body .newsletter-body .btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
html .portal-body .gv-stat-num { font-family: var(--fenix-ui-font-heading); }
html .portal-body :is(.gv-qa-ic,.gv-stat--brand .gv-stat-icon,.gv-wk-thumb) { color: var(--fenix-ui-on-soft); }
html .portal-body :is(a,button,input,select,textarea):focus-visible { outline: 2px solid var(--fenix-ui-focus); outline-offset: 2px; }
html body :is(.gvt-auth-root,.page-body) :is(input:not([type="checkbox"]):not([type="radio"]),select) { border-radius: var(--fenix-ui-radius-input); }
/* A textarea is tall, so a pill input radius (999px on Indigo) turns it into a capsule. Cap it. */
html body :is(.gvt-auth-root,.page-body) textarea { border-radius: min(var(--fenix-ui-radius-input), 1rem); }
html body .modal-content { border-radius: var(--fenix-ui-radius-dialog); }

.fenix-company-changed { position:fixed; inset:0 0 auto; z-index:2147483647; padding:1rem; background:#fff7ed; color:#7c2d12; border-bottom:2px solid #9a3412; font:600 1rem/1.5 system-ui,sans-serif; text-align:center; }
.fenix-company-changed button { margin-left:.75rem; padding:.35rem .75rem; border:1px solid currentColor; border-radius:.25rem; background:#fff; color:#7c2d12; cursor:pointer; }

/* Native Indigo storefront and checkout use their own component vocabulary. */
html:root {
    --ind-green: var(--fenix-ui-brand);
    --ind-green-dk: var(--fenix-ui-hover);
    --ind-gold: var(--fenix-ui-link);
    --ind-on-gold: var(--fenix-ui-on-brand);
    --ind-gold-hover: var(--fenix-ui-hover);
    --ind-gold-lt: var(--fenix-ui-soft);
    --ind-cream: var(--fenix-ui-raised-surface);
    --ind-paper: var(--fenix-ui-surface);
    --ind-ink: var(--fenix-color-text, #20242b);
    --ind-body: var(--fenix-color-text, #20242b);
    --ind-muted: var(--fenix-ui-muted);
    --ind-faint: var(--fenix-ui-muted);
    --ind-line: var(--fenix-color-border, #d5d8dc);
    --ind-line-soft: var(--fenix-color-border, #d5d8dc);
    --ind-serif: var(--fenix-ui-font-heading);
    --ind-sans: var(--fenix-ui-font-body);
    --ind-r-card: var(--fenix-ui-radius-card);
    --ind-r-md: var(--fenix-ui-radius-input);
    --ind-r-sm: var(--fenix-ui-radius-input);
}
html body :is(.cm-main,.cm-summary,.cm-wrap,.page-body) :is(h1,h2,h3,h4,.cm-steptitle,.cm-name) { font-family:var(--fenix-ui-font-heading); }
html body :is(.cm-main,.cm-summary,.cm-wrap) :is(input,select,textarea,button) { font-family:var(--fenix-ui-font-body); }
html body :is(.cm-field,.cm-promo,.cm-checkoutattrs,.qc-delivery-address,.addr-form) :is(input:not([type="checkbox"]):not([type="radio"]),select) { border-radius:var(--fenix-ui-radius-input); }
html body :is(.cm-field,.cm-promo,.cm-checkoutattrs,.qc-delivery-address,.addr-form) textarea { border-radius:min(var(--fenix-ui-radius-input), 1rem); }
html body :is(.cm-step,.cm-summary,.qc-addrpicked,.address-item,.order-item) { border-radius:var(--fenix-ui-radius-card); }
html body :is(.ind-tos__panel,.ind-cartdrawer__panel) { border-radius:var(--fenix-ui-radius-dialog); }
html body :is(.cm-stepnum,.cm-sumqty,.rf-step__n) { background:var(--fenix-ui-brand); color:var(--fenix-ui-on-brand); }
html body .block-account-navigation .active a { background:var(--fenix-ui-soft); color:var(--fenix-ui-on-soft); }
html body :is(.cm-field,.cm-checkoutattrs) :is(input,select,textarea):focus { outline:2px solid var(--fenix-ui-focus); outline-offset:2px; }

/* Authentication keeps its neutral form layout and uses the same semantic foreground pair. */
html .gvt-auth-root, html .gvt-auth-root[data-theme] {
    --gvt-auth-primary:var(--fenix-ui-brand);
    --gvt-auth-primary-dark:var(--fenix-ui-hover);
    --gvt-auth-primary-soft:var(--fenix-ui-soft);
    --gvt-auth-text:var(--fenix-color-text, #20242b);
    --gvt-auth-text-muted:var(--fenix-ui-muted);
    --gvt-auth-surface:var(--fenix-ui-surface);
    --gvt-auth-bg:var(--fenix-ui-raised-surface);
    --gvt-auth-bg-subtle:var(--fenix-ui-raised-surface);
    font-family:var(--fenix-ui-font-body);
}
html[data-theme="dark"] .gvt-auth-root { --gvt-auth-text:#e8eaf0; --gvt-auth-border:#525252; }
html body .gvt-auth-card .gvt-auth-title { font-family:var(--fenix-ui-font-heading) !important; }
html .gvt-auth-root :is(input,select,textarea,button) { font-family:var(--fenix-ui-font-body); }
html .gvt-auth-root :is(.gvt-auth-altlink a,.gvt-auth-forgot) { color:var(--fenix-ui-link); }
html body .ce-btn--ghost { color:var(--fenix-ui-link); border-color:var(--fenix-ui-focus); border-radius:var(--fenix-ui-radius-button); }
html body .ce-btn--ghost:hover { background:var(--fenix-ui-soft); color:var(--fenix-ui-on-soft); }

/* Core/DefaultClean root opts in only when a frozen unified presentation exists.
   Theme-specific GV/Indigo roots do not carry this class. */
html body.fenix-native-presentation {
    --gray-color: var(--fenix-ui-muted);
    --dark-gray-color: var(--fenix-ui-muted);
    background: var(--fenix-ui-surface);
    color: var(--fenix-ui-muted);
    font-family: var(--fenix-ui-font-body);
}
html body.fenix-native-presentation :is(h1,h2,h3,h4,h5,h6,.ui-dialog-title) { color: var(--fenix-ui-muted); font-family: var(--fenix-ui-font-heading); }
html body.fenix-native-presentation :is(input,select,textarea,button,.ui-dialog) { font-family: var(--fenix-ui-font-body); }
html body.fenix-native-presentation .inputs :is(input:not([type="checkbox"]):not([type="radio"]),select) {
    background: var(--fenix-ui-surface); color: var(--fenix-ui-muted); border-radius: var(--fenix-ui-radius-input);
}
html body.fenix-native-presentation .inputs textarea { background: var(--fenix-ui-surface); color: var(--fenix-ui-muted); border-radius: min(var(--fenix-ui-radius-input), 1rem); }
html body.fenix-native-presentation :is(.button-1,.button-2) { border-radius: var(--fenix-ui-radius-button); }
html body.fenix-native-presentation .form-fields { background: var(--fenix-ui-raised-surface); color: var(--fenix-ui-muted); border-radius: var(--fenix-ui-radius-card); }
html body.fenix-native-presentation .ui-dialog { background: var(--fenix-ui-raised-surface); color: var(--fenix-ui-muted); border-radius: var(--fenix-ui-radius-dialog); }
html body.fenix-native-presentation .ui-dialog-titlebar { background: var(--fenix-ui-raised-surface); }
html body.fenix-native-presentation .ui-dialog-content { background: var(--fenix-ui-surface) !important; color: var(--fenix-ui-muted); }
html body.fenix-native-presentation :is(a,button,input,select,textarea):focus-visible { outline: 2px solid var(--fenix-ui-focus); outline-offset: 2px; }

/* Older text-white utilities hard-code white SVG strokes; use the selected action foreground. */
html body :is(.btn-primary,.fenix-cta-primary,.fenix-header__cta--primary,.fenix-footer__newsletter-cta,.button-1,.checkout-button,.cm-btn,.gvt-auth-btn-primary,.filter-btn--primary,.pager-btn.active) svg { stroke: currentColor !important; }

/* Editorial desktop CTAs remain outlines on their authored header surface. Use the
   header's contextual menu ink, not a root-mode link or pale brand swatch. */
html body .fenix-header[data-header-design="serif-editorial"] .fenix-header__slot--right .fenix-header__cta {
    background: transparent !important;
    color: var(--fenix-header-menu-link, var(--fenix-color-text-secondary, #3c5160)) !important;
    border-color: currentColor !important;
}
html body .fenix-header[data-header-design="serif-editorial"] .fenix-header__slot--right .fenix-header__cta:hover {
    background: color-mix(in srgb, var(--fenix-header-menu-link, var(--fenix-color-text-secondary, #3c5160)) 8%, transparent) !important;
    color: var(--fenix-header-menu-link, var(--fenix-color-text-secondary, #3c5160)) !important;
    border-color: currentColor !important;
}
/* The same CTA is filled in the mobile drawer; beat the profile's scoped important rules. */
html body .fenix-header-drawer[data-header-design="serif-editorial"] .fenix-header-drawer__foot .fenix-header__cta {
    background: var(--fenix-ui-action) !important;
    color: var(--fenix-ui-on-action) !important;
    border-color: var(--fenix-ui-action) !important;
}
html body .fenix-header-drawer[data-header-design="serif-editorial"] .fenix-header-drawer__foot .fenix-header__cta:hover {
    background: var(--fenix-ui-action-hover) !important;
    color: var(--fenix-ui-on-action-hover) !important;
    border-color: var(--fenix-ui-action-hover) !important;
}
