/* Alternating surfaces keep the same palette while giving each step its own space. */
.block-light {
  --text: var(--light-text);
  --text-heading: var(--light-text);
  --text-soft: var(--light-muted);
  --muted: var(--light-muted);
  --placeholder: var(--light-placeholder);
  --accent: var(--light-accent);
  --accent-hover: var(--light-text);
  --accent-soft: var(--light-selected);
  --surface: var(--light-surface);
  --surface-raised: var(--light-raised);
  --surface-hover: var(--light-hover);
  --surface-selected: var(--light-selected);
  --surface-section: var(--section-light);
  --surface-tabs: var(--light-raised);
  --surface-preview: var(--light-raised);
  --line: var(--light-line);
  --line-soft: var(--light-line);
  --line-strong: var(--light-line-strong);
  --line-selected: var(--light-accent);
  --line-hover: var(--light-accent);
  --line-visual: var(--light-line-strong);
  --link-line: var(--light-accent);
  --icon: var(--light-accent);
  --primary-start: var(--light-accent);
  --primary-end: var(--light-accent);
  --primary-border: var(--light-accent);
  --primary-hover-start: var(--light-text);
  --primary-hover-end: var(--light-text);
  --on-primary: #fff;
  --title-start: var(--light-accent);
  --title-end: var(--light-text);
  color: var(--text);
  color-scheme: light;
  background: var(--section-light);
}
.block-dark {
  --text: var(--dark-text);
  --text-heading: var(--dark-text);
  --text-soft: var(--dark-muted);
  --muted: var(--dark-muted);
  --placeholder: var(--dark-placeholder);
  --accent: var(--dark-accent);
  --accent-hover: var(--dark-text);
  --accent-soft: var(--dark-selected);
  --surface: var(--dark-surface);
  --surface-raised: var(--dark-raised);
  --surface-hover: var(--dark-hover);
  --surface-selected: var(--dark-selected);
  --surface-section: var(--section-dark);
  --surface-tabs: var(--dark-surface);
  --surface-preview: var(--dark-surface);
  --line: var(--dark-line);
  --line-soft: var(--dark-line);
  --line-strong: var(--dark-line-strong);
  --line-selected: var(--dark-accent);
  --line-contact: var(--dark-line-strong);
  --line-hover: var(--dark-accent);
  --link-line: var(--dark-accent);
  --icon: var(--dark-accent);
  --primary-start: var(--dark-accent);
  --primary-end: var(--dark-accent);
  --primary-border: var(--dark-accent);
  --primary-hover-start: var(--dark-text);
  --primary-hover-end: var(--dark-text);
  --on-primary: var(--section-dark);
  --primary-shadow: transparent;
  color: var(--text);
  color-scheme: dark;
  background: var(--section-dark);
}

/* Three primary modules. Existing palettes control every surface and visual accent. */
:root,:root[data-palette="perla"] { --core-hue: 50deg; --core-saturation: .85; --core-pigment: #6545ba; --core-reflection: #c6b2ff; --core-glint: #eee8ff; }
:root[data-palette="violeta"] { --core-hue: 50deg; --core-saturation: .85; --core-pigment: #8c6aff; --core-reflection: #66dcff; --core-glint: #dcefff; }
:root[data-palette="oliva"] { --core-hue: -130deg; --core-saturation: .55; --core-pigment: #4c6039; --core-reflection: #cad598; --core-glint: #edf0d7; }
:root[data-palette="cobre"] { --core-hue: 175deg; --core-saturation: .72; --core-pigment: #b5663d; --core-reflection: #f1b685; --core-glint: #fff0df; }
:root[data-palette="cacao"] { --core-hue: 170deg; --core-saturation: .28; --core-pigment: #775237; --core-reflection: #e4c28c; --core-glint: #f6ebd7; }
:root[data-palette="azul"] { --core-hue: 0deg; --core-saturation: 1; --core-pigment: #3d5afe; --core-reflection: #9cbfff; --core-glint: #e1ecff; }
:root[data-palette="cian"] { --core-hue: -30deg; --core-saturation: .9; --core-pigment: #05c9db; --core-reflection: #8de7ff; --core-glint: #e1fbff; }
:root[data-palette="obsidiana"] { --core-pigment: #3d5afe; --core-reflection: #ff2fa3; --core-glint: #ffe0bc; }
.art-filter-defs { position: absolute; width: 0; height: 0; overflow: visible; pointer-events: none; }
.brand-symbol { display: block; flex: 0 0 auto; width: 34px; height: 34px; color: var(--accent); background: currentColor; -webkit-mask: url('assets/o3-nexus-mark.svg') center / contain no-repeat; mask: url('assets/o3-nexus-mark.svg') center / contain no-repeat; }
.appearance-panel { max-height: calc(100dvh - 112px); overflow-y: auto; overscroll-behavior: contain; }
.palette-group-label { margin: 12px 10px 6px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.module-flow { display: grid; gap: 42px; padding-block: 20px 42px; }
.experience-module { position: relative; isolation: isolate; min-width: 0; margin-block: 0; padding: 44px; border: 1px solid var(--line); border-radius: 32px; scroll-margin-top: 24px; }
.hero.experience-module { padding: 40px 44px; overflow: hidden; box-shadow: 0 18px 54px var(--shadow); }
.hero .hero-introduction { position: relative; z-index: 1; gap: 28px; }
.hero .hero-title { font-size: clamp(2.6rem,4.35vw,4rem); }
.hero .hero-intro { font-size: 1.0625rem; }
.hero .hero-art { min-height: 430px; }
.hero .hero-art img { height: 430px; filter: hue-rotate(var(--core-hue)) saturate(var(--core-saturation)); }
:root[data-core-tint-ready] .hero .hero-art img { filter: url('#core-palette-tint'); }
.hero .hero-signal > span { box-shadow: 0 8px 24px var(--primary-shadow); }
.diagnostic-section.experience-module { margin-block: 0; }
.module-diagnostic .diagnostic-layout { gap: 38px; }
.module-diagnostic .diagnostic-intro { top: 28px; }
.module-diagnostic .diagnostic-intro h2 { font-size: clamp(2rem,3.5vw,3rem); }
.module-diagnostic #diagnostic-app { padding: 26px; border-radius: 20px; box-shadow: none; }
.services.experience-module { padding-block: 42px; }
.services .section-heading { gap: 28px; }
.services .service-workbench { border-radius: 18px; box-shadow: none; }
.service-extras { margin-top: 30px; border-top: 1px solid var(--line); }
.service-more { border-bottom: 1px solid var(--line); }
.service-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding-block: 18px; color: var(--text-heading); font-size: 1rem; line-height: 1.5; font-weight: 500; cursor: pointer; list-style: none; }
.service-more > summary::-webkit-details-marker { display: none; }
.service-more > summary::marker { content: ''; }
.service-more > summary::after { flex-shrink: 0; content: '+'; color: var(--accent); font-size: 1.4rem; font-weight: 400; }
.service-more[open] > summary::after { content: '−'; }
.service-more > summary:focus-visible { outline-offset: 5px; }
.module-details-content { padding: 2px 0 26px; }
.module-details-content > h3,.profile-details h3 { margin-bottom: 18px; color: var(--text-heading); font-size: 1.2rem; line-height: 1.4; font-weight: 550; letter-spacing: -.02em; }
.module-details-content p { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.delivery-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.delivery-flow > li { padding-left: 16px; border-left: 2px solid var(--line); }
.delivery-flow h4 { margin-bottom: 8px; color: var(--accent); font-size: 1rem; line-height: 1.5; font-weight: 550; }
.services .engagements { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.services .engagement { padding: 14px 12px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; transform: none; }
.services .engagement:hover { border-color: var(--accent); background: var(--surface-selected); }
.services .engagement-description { font-size: .875rem; line-height: 1.6; }
.review-note { margin-top: 20px; }
.review-note .scope-link { margin-top: 10px; }
.profile-details { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 36px; }
.profile-details .credential-list { padding: 0; background: transparent; }
.profile-details .founder-meta { font-size: .875rem; }
.service-contact { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-top: 30px; scroll-margin-top: 28px; }
.service-contact h3 { font-size: clamp(1.3rem,2.2vw,1.7rem); line-height: 1.3; font-weight: 550; letter-spacing: -.025em; }
.service-contact p { max-width: 42ch; margin-top: 10px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.service-contact-actions { display: grid; justify-items: center; flex-shrink: 0; gap: 12px; }
.site-footer { margin-bottom: 12px; }
@media (max-width: 1100px) {
  .experience-module { padding: 32px; }
  .hero.experience-module { padding: 32px; }
  .hero .hero-title { font-size: 2.65rem; }
  .hero .hero-art,.hero .hero-art img { min-height: 350px; height: 350px; }
  .services .engagements { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .module-diagnostic .diagnostic-layout { grid-template-columns: minmax(0,1fr); gap: 26px; }
  .module-diagnostic .diagnostic-intro { position: static; }
  .service-contact { align-items: flex-start; flex-direction: column; }
  .service-contact-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
}
@media (max-width: 760px) {
  .module-flow { gap: 28px; padding-block: 16px 28px; }
  .experience-module,.hero.experience-module,.services.experience-module { padding: 26px; border-radius: 24px; }
  .hero .hero-introduction { grid-template-columns: minmax(0,1fr); }
  .hero .hero-title { max-width: 15ch; font-size: clamp(2.25rem,7vw,3.1rem); }
  .hero .hero-art { width: 100%; max-width: 420px; margin-inline: auto; }
  .hero .hero-art,.hero .hero-art img { min-height: 300px; height: 300px; }
  .module-diagnostic #diagnostic-app { padding: 22px 18px; }
  .delivery-flow,.profile-details { grid-template-columns: minmax(0,1fr); }
  .services .engagements { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-details { gap: 24px; }
}
@media (max-width: 480px) {
  .experience-module,.hero.experience-module,.services.experience-module { padding: 22px 18px; border-radius: 22px; }
  .hero .hero-title { font-size: clamp(2rem,8.5vw,2.5rem); }
  .hero .hero-art,.hero .hero-art img { min-height: 260px; height: 260px; }
  .brand-symbol { width: 28px; height: 28px; }
  .module-diagnostic #diagnostic-app { padding: 20px 14px; }
  .services .service-tabs { grid-template-columns: minmax(0,1fr); }
  .services .service-tab { min-height: 60px; align-items: center; }
  .services .service-panel { padding: 22px 16px; }
  .services .engagements { grid-template-columns: minmax(0,1fr); }
  .service-contact-actions { display: grid; justify-items: start; }
}
@media (max-width: 360px) { .site-header .brand-name > span { display: none; } }
@media print {
  .block-light,.block-dark { --text: #172027; --text-heading: #172027; --text-soft: #34434e; --muted: #34434e; --accent: #303744; --surface: #fff; --surface-raised: #fff; --surface-selected: #f4f4f4; color: var(--text); background: #fff; box-shadow: none; }
}
