/**
 * Certifiedge Phase 14 public experience contract.
 * Contrast invariant: dark text belongs on bright surfaces; bright text belongs
 * on dark surfaces. Hover/focus states must preserve that relationship.
 */
:root {
  color-scheme: light;
  --ce14-ink: #0a1628;
  --ce14-ink-soft: #334155;
  --ce14-muted: #526174;
  --ce14-paper: #ffffff;
  --ce14-paper-soft: #f5f8fc;
  --ce14-paper-tint: #eaf2fb;
  --ce14-night: #071426;
  --ce14-night-2: #0b1d35;
  --ce14-night-3: #102949;
  --ce14-light: #f8fbff;
  --ce14-light-soft: #dbe9f7;
  --ce14-brand: #164c91;
  --ce14-brand-deep: #0d356d;
  --ce14-sky: #82e8f5;
  --ce14-sky-soft: #bdf4fa;
  --ce14-success: #166534;
  --ce14-border: #cfdae8;
  --ce14-border-dark: rgba(255,255,255,.20);
  --ce14-shadow: 0 22px 60px rgba(15, 38, 67, .12);
  --ce14-shadow-soft: 0 12px 34px rgba(15, 38, 67, .08);
  --ce14-radius: 24px;
  --ce14-radius-sm: 16px;
  --ce-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ce-font-heading: var(--ce-font);
  --ce-font-body: var(--ce-font);
}

html, body {
  background: var(--ce14-paper-soft) !important;
  color: var(--ce14-ink) !important;
  font-family: var(--ce-font-body) !important;
  text-rendering: optimizeLegibility;
}
body { font-size: 16px; line-height: 1.65; }
h1,h2,h3,h4,h5,h6 { font-family: var(--ce-font-heading) !important; letter-spacing: -.025em; text-wrap: balance; }
p,li { text-wrap: pretty; }
p { max-width: 72ch; }
a { text-underline-offset: .18em; }

/* Bright surfaces: dark typography, including nested legacy cards and links. */
.ce2-section:not(.ce2-section--dark):not(.ce2-section--trust),
.ce2-section--light,
.ce-section,
.ce-page-hero:not(.ce-page-hero--dark),
.ce-card,
.ce2-card,
.ce2-auth__form,
.ce2-callout,
.ce2-pathway-card,
.ce2-readiness-dimension,
.ce2-readiness-action,
.ce-assessment-workspace .ce-card,
.ce-readiness-workspace .ce-card {
  color: var(--ce14-ink) !important;
}
.ce2-section:not(.ce2-section--dark):not(.ce2-section--trust) :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary),
.ce2-section--light :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary),
.ce-section :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary),
.ce-card :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary),
.ce2-card :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary),
.ce2-auth__form :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary) {
  color: var(--ce14-ink) !important;
}
.ce2-section:not(.ce2-section--dark):not(.ce2-section--trust) :is(.ce2-lead,.ce2-section-head__copy,.ce2-microcopy),
.ce-section :is(.ce-lead,.ce-muted),
.ce-card p,.ce2-card p,.ce2-auth__form p { color: var(--ce14-ink-soft) !important; }

/* Dark surfaces: bright typography. */
.ce2-hero,
.ce2-page-hero,
.ce2-section--dark,
.ce2-section--trust,
.ce2-final-cta,
.ce2-auth,
.site-header,
.ce-site-header,
.site-footer,
.ce-footer,
.ce-public-page-head,
.ce-cbc-hero,
.ce-dark-surface {
  background: linear-gradient(145deg, var(--ce14-night) 0%, var(--ce14-night-2) 58%, var(--ce14-night-3) 100%) !important;
  color: var(--ce14-light) !important;
}
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.site-header,.ce-site-header,.site-footer,.ce-footer,.ce-public-page-head,.ce-cbc-hero,.ce-dark-surface) :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,label,legend,summary,span:not(.ce-status-pill)) {
  color: var(--ce14-light) !important;
}
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.site-footer,.ce-footer) :is(.ce2-lead,.ce2-microcopy,.ce2-section-head__copy,.ce-muted) {
  color: var(--ce14-light-soft) !important;
}

/* Pages should breathe and read like a premium product rather than an admin console. */
.ce2-container,.ce-container { width: min(1180px, calc(100% - 40px)) !important; margin-inline: auto; }
.ce2-hero,.ce2-page-hero,.ce-page-hero { padding-block: clamp(72px, 8vw, 132px) !important; }
.ce2-page-hero--compact { padding-block: clamp(58px, 6vw, 96px) !important; }
.ce2-section,.ce-section { padding-block: clamp(60px, 7vw, 108px); }
.ce2-section--light { background: var(--ce14-paper) !important; }
.ce2-section:not(.ce2-section--dark):not(.ce2-section--trust):not(.ce2-section--light) { background: var(--ce14-paper-soft) !important; }
.ce2-section--trust { border-block: 1px solid var(--ce14-border-dark); }
.ce2-section-head { max-width: 860px; margin-bottom: clamp(28px,4vw,52px); }
.ce2-section-head p,.ce-page-header p,.ce2-page-hero p,.ce2-hero p { font-size: clamp(1rem,1.2vw,1.18rem); line-height: 1.75; }
.ce2-hero h1,.ce2-page-hero h1,.ce-page-hero h1 { font-size: clamp(2.55rem, 5.4vw, 5.35rem) !important; line-height: .99 !important; max-width: 12.5ch; }
.ce2-page-hero--compact h1 { max-width: 16ch; }
.ce2-section h2,.ce-section h2 { font-size: clamp(1.85rem,3.1vw,3.25rem); line-height: 1.08; }
.ce2-section h3,.ce-section h3 { line-height: 1.18; }
.ce2-eyebrow,.ce-eyebrow { letter-spacing: .10em !important; text-transform: uppercase; font-size: .76rem !important; font-weight: 800 !important; }

/* Card proportion, hierarchy and controlled motion. */
.ce-card,.ce2-card,.ce2-pathway-card,.ce2-trust-grid article,.ce2-feature-rows article,.ce2-process-list article,
.ce2-passport,.ce2-lab,.ce2-org-panel,.ce2-growth-card,.ce2-callout {
  border-radius: var(--ce14-radius) !important;
  border: 1px solid var(--ce14-border) !important;
  box-shadow: var(--ce14-shadow-soft) !important;
}
.ce-card,.ce2-card,.ce2-trust-grid article,.ce2-feature-rows article,.ce2-process-list article,.ce2-callout {
  background: var(--ce14-paper) !important;
  padding: clamp(22px, 3vw, 36px) !important;
}
.ce2-pathway-card,.ce2-audience-list a { overflow: hidden; transform: translateY(0); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.ce2-pathway-card:hover,.ce2-audience-list a:hover { transform: translateY(-4px); box-shadow: var(--ce14-shadow) !important; border-color: #aec7e2 !important; }

/* Buttons preserve readable contrast in every state, including hover/focus. */
.ce-button,.ce2-button,button.ce-button,button.ce2-button,input[type="submit"] {
  min-height: 48px; border-radius: 999px !important; font-weight: 800 !important; letter-spacing: -.01em; transition: background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.ce2-button--primary,.ce-button--primary,input[type="submit"] {
  background: var(--ce14-brand) !important; color: #fff !important; border: 1px solid var(--ce14-brand) !important;
}
.ce2-button--primary:hover,.ce2-button--primary:focus-visible,.ce-button--primary:hover,.ce-button--primary:focus-visible,input[type="submit"]:hover,input[type="submit"]:focus-visible {
  background: var(--ce14-brand-deep) !important; color: #fff !important; border-color: var(--ce14-brand-deep) !important;
}
.ce2-button--secondary,.ce-button--ghost,.ce-button--secondary {
  background: #fff !important; color: var(--ce14-brand-deep) !important; border: 1px solid #8aa8c8 !important;
}
.ce2-button--secondary:hover,.ce2-button--secondary:focus-visible,.ce-button--ghost:hover,.ce-button--ghost:focus-visible,.ce-button--secondary:hover,.ce-button--secondary:focus-visible {
  background: var(--ce14-night) !important; color: #fff !important; border-color: var(--ce14-night) !important;
}
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce2-button--primary,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--primary {
  background: var(--ce14-sky) !important; color: var(--ce14-night) !important; border-color: var(--ce14-sky) !important;
}
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce2-button--primary:hover,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce2-button--primary:focus-visible,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--primary:hover,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--primary:focus-visible {
  background: var(--ce14-sky-soft) !important; color: var(--ce14-night) !important; border-color: var(--ce14-sky-soft) !important;
}
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce2-button--secondary,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--ghost,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--secondary {
  background: transparent !important; color: #fff !important; border-color: rgba(255,255,255,.62) !important;
}
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce2-button--secondary:hover,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce2-button--secondary:focus-visible,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--ghost:hover,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-final-cta,.ce2-auth,.ce-dark-surface) .ce-button--ghost:focus-visible {
  background: #fff !important; color: var(--ce14-night) !important; border-color: #fff !important;
}

.ce2-text-link,.ce-text-link { color: var(--ce14-brand-deep) !important; font-weight: 800; }
.ce2-text-link:hover,.ce2-text-link:focus-visible,.ce-text-link:hover,.ce-text-link:focus-visible { color: #092853 !important; }
.ce2-text-link--light,.ce2-section--dark .ce2-text-link,.ce2-section--trust .ce2-text-link,.ce2-final-cta .ce2-text-link { color: var(--ce14-sky) !important; }
.ce2-text-link--light:hover,.ce2-section--dark .ce2-text-link:hover,.ce2-section--trust .ce2-text-link:hover,.ce2-final-cta .ce2-text-link:hover { color: #fff !important; }

/* Forms and interactive controls. */
input:not([type="checkbox"]):not([type="radio"]),select,textarea {
  background: #fff !important; color: var(--ce14-ink) !important; border: 1px solid #aebfd2 !important; border-radius: 14px !important; min-height: 48px; padding: .8rem 1rem;
}
input::placeholder,textarea::placeholder { color: #62748a !important; opacity: 1; }
input:focus,select:focus,textarea:focus { outline: 3px solid rgba(22,76,145,.22) !important; outline-offset: 2px; border-color: var(--ce14-brand) !important; }
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-auth,.ce-dark-surface) input:not([type="checkbox"]):not([type="radio"]),
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-auth,.ce-dark-surface) select,
:is(.ce2-hero,.ce2-page-hero,.ce2-section--dark,.ce2-section--trust,.ce2-auth,.ce-dark-surface) textarea {
  background: #fff !important; color: var(--ce14-ink) !important;
}

/* Status chips use light backgrounds with dark text for predictable legibility. */
.ce-status-pill,.ce2-status,.ce-status { background: #e7f4f7 !important; color: #123a4b !important; border: 1px solid #aed7df !important; }

/* Authentic imagery: proportional, compact where secondary, full-resolution only where it earns the space. */
.ce2-authentic-image { margin: 0; border-radius: var(--ce14-radius); overflow: hidden; box-shadow: var(--ce14-shadow-soft); background: #d9e5f2; }
.ce2-authentic-image img { display:block; width:100%; height:auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ce2-authentic-image--hero { max-width: 620px; margin-inline: auto; }
.ce2-authentic-gallery { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.ce2-authentic-gallery .ce2-authentic-image { max-height: 230px; }
.ce2-authentic-gallery img { height:100%; max-height:230px; }
.ce2-audience-list--visual .ce2-authentic-image { border-radius: 16px 16px 0 0 !important; box-shadow:none; }
.ce2-audience-list--visual img { aspect-ratio: 4 / 3; }
.ce-visual-card img { width:100%; height:auto; max-height:420px; object-fit:cover; border-radius:18px; }

/* Phase 14 readiness workspace. */
.ce-readiness-workspace { display:grid; gap:28px; }
.ce-readiness-head { max-width: 850px; }
.ce-readiness-note { border-left:4px solid var(--ce14-brand); padding:14px 18px; background:#eef5fc; border-radius:0 14px 14px 0; }
.ce-readiness-state { margin-top:-8px; }
.ce-readiness-dimensions { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px; }
.ce-readiness-dimension h3 { font-size:1.05rem; margin:.7rem 0 .45rem; }
.ce-readiness-dimension p { font-size:.94rem; }
.ce-readiness-actions h3 { margin-bottom:18px; }
.ce-readiness-action-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.ce-readiness-action { display:grid; grid-template-columns:auto 1fr; gap:16px; align-items:start; }
.ce-readiness-number { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--ce14-night); color:#fff !important; font-weight:800; }
.ce-readiness-refresh { padding:24px; background:#eef5fc; border:1px solid var(--ce14-border); border-radius:var(--ce14-radius); }
.ce-readiness-refresh p { margin:.7rem 0 0; color:var(--ce14-ink-soft) !important; }

/* Reading comfort for trust/policy/legal pages. */
.ce-readable { max-width: 820px; }
.ce-readable > p,.ce-story-card > p,.ce-policy-copy p { line-height:1.78; }
.ce-trust-summary,.ce-story-card { max-width: 920px; }
.ce-product-card p,.ce-trust-grid p { line-height:1.68; }

/* Accessibility and responsive stability. */
:focus-visible { outline:3px solid #facc15 !important; outline-offset:3px !important; }
@media (max-width: 1040px) {
  .ce-readiness-dimensions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ce2-authentic-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .ce2-container,.ce-container { width:min(100% - 28px,1180px) !important; }
  .ce2-hero,.ce2-page-hero,.ce-page-hero { padding-block:64px !important; }
  .ce2-hero h1,.ce2-page-hero h1,.ce-page-hero h1 { font-size:clamp(2.3rem,12vw,3.65rem) !important; }
  .ce-readiness-dimensions,.ce-readiness-action-list,.ce2-authentic-gallery { grid-template-columns:1fr; }
  .ce2-authentic-gallery .ce2-authentic-image,.ce2-authentic-gallery img { max-height:none; }
  .ce-button,.ce2-button { width:100%; justify-content:center; text-align:center; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* Phase 14 surface-contrast closure: legacy dark shells and bright inset panels. */
.ce-header,
.ce-hero,
.ce-os-clean-hero,
.ce-dashboard-panel,
.ce-universe-shell,
.ce-certificate-premium,
.ce-study-room--dark,
.ce-demo,
.ce-demo__hero,
.ce-demo__failure {
  color: var(--ce14-light) !important;
}
:is(.ce-header,.ce-hero,.ce-os-clean-hero,.ce-dashboard-panel,.ce-universe-shell,.ce-certificate-premium,.ce-study-room--dark,.ce-demo,.ce-demo__hero,.ce-demo__failure)
:is(h1,h2,h3,h4,h5,h6,p,li,dd,dt,strong,small,label,legend,summary) {
  color: var(--ce14-light) !important;
}
:is(.ce-header,.ce-footer) a:not(.ce-button) { color: var(--ce14-light) !important; }
:is(.ce-header,.ce-footer) a:not(.ce-button):hover,
:is(.ce-header,.ce-footer) a:not(.ce-button):focus-visible { color: var(--ce14-sky) !important; }

/* A bright panel nested in a dark hero remains a bright surface: dark type wins. */
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help) {
  background: var(--ce14-paper) !important;
  color: var(--ce14-ink) !important;
  border-color: var(--ce14-border) !important;
}
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(h1,h2,h3,h4,h5,h6,p,li,dd,dt,strong,small,label,legend,summary,span) {
  color: var(--ce14-ink) !important;
}
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(.ce2-button--primary,.ce-button--primary) {
  background: var(--ce14-brand) !important;
  color: #fff !important;
  border-color: var(--ce14-brand) !important;
}
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(.ce2-button--primary,.ce-button--primary):hover,
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(.ce2-button--primary,.ce-button--primary):focus-visible {
  background: var(--ce14-brand-deep) !important;
  color: #fff !important;
  border-color: var(--ce14-brand-deep) !important;
}
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(.ce2-button--secondary,.ce-button--ghost,.ce-button--secondary) {
  background: #fff !important;
  color: var(--ce14-brand-deep) !important;
  border-color: #8aa8c8 !important;
}
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(.ce2-button--secondary,.ce-button--ghost,.ce-button--secondary):hover,
:is(.ce2-page-hero,.ce2-hero,.ce2-auth,.ce2-section--dark,.ce2-section--trust)
:is(.ce2-proof-visual,.ce2-passport,.ce2-hero-note,.ce2-growth-card,.ce2-org-panel,.ce2-mission,.ce2-rubric,.ce2-auth__form,.ce2-access-form,.ce2-empty,.ce2-workspace-summary,.ce2-workspace-help)
:is(.ce2-button--secondary,.ce-button--ghost,.ce-button--secondary):focus-visible {
  background: var(--ce14-night) !important;
  color: #fff !important;
  border-color: var(--ce14-night) !important;
}

/* Dark cards intentionally remain dark; never inherit a bright-card override. */
.ce2-lab,
.ce2-section--dark .ce-dark-surface,
.ce-study-room--dark {
  background: var(--ce14-night) !important;
  color: var(--ce14-light) !important;
}
.ce2-lab :is(h1,h2,h3,h4,h5,h6,p,li,strong,small,span) { color: var(--ce14-light) !important; }
