/* Optical depth is painted behind the real controls; text and input semantics stay native. */
:root {
  --liquid-edge: rgb(255 255 255 / 72%);
  --liquid-spark: rgb(255 255 255 / 34%);
  --liquid-black: #080b12;
  --liquid-clear-shine: rgb(255 255 255 / 16%);
  --liquid-tab-shine: rgb(255 255 255 / 16%);
}
:root[data-palette-mode="light"],.block-light { --liquid-clear-shine: rgb(255 255 255 / 58%); --liquid-tab-shine: rgb(255 255 255 / 62%); }
.block-dark { --liquid-clear-shine: rgb(255 255 255 / 16%); --liquid-tab-shine: rgb(255 255 255 / 16%); }

/* A solid fallback keeps the material legible without transparency or color-mix. */
.button.primary,.button.light {
  position: relative;
  isolation: isolate;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid #777781;
  border-radius: 999px;
  color: #fff;
  background: #14151e;
  text-shadow: 0 1px 2px rgb(0 0 0 / 55%);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 72%),inset 0 -3px 3px rgb(0 0 0 / 75%),0 3px 0 #262731,0 7px 12px rgb(0 0 0 / 24%);
}
.button.primary,.button.light {
  --liquid-primary-bg:
    radial-gradient(ellipse at var(--liquid-x,50%) var(--liquid-y,18%),rgb(255 255 255 / 13%),transparent 54%),
    radial-gradient(ellipse at 52% 118%,color-mix(in srgb,var(--accent) 72%,transparent),transparent 68%),
    linear-gradient(178deg,color-mix(in srgb,var(--accent) 17%,#30343e) 0%,#080b12 43%,#080a11 70%,color-mix(in srgb,var(--accent) 35%,#11131c) 100%);
  border-color: color-mix(in srgb,var(--accent) 58%,#b4b6c0);
  border-top-color: rgb(255 255 255 / 82%);
  background: var(--liquid-primary-bg);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 72%),
    inset 2px 0 2px rgb(255 255 255 / 17%),
    inset -2px 0 2px rgb(255 255 255 / 24%),
    inset 0 -3px 4px rgb(0 0 0 / 70%),
    0 3px 0 color-mix(in srgb,var(--accent) 22%,#22242c),
    0 6px 0 rgb(0 0 0 / 12%),
    0 9px 17px rgb(0 0 0 / 24%),
    0 14px 25px color-mix(in srgb,var(--accent) 24%,transparent);
}
.button.primary::before,.button.light::before {
  position: absolute;
  top: 2px;
  right: 7px;
  left: 7px;
  height: min(16px,25%);
  border-top: 1px solid rgb(255 255 255 / 75%);
  border-radius: 999px 999px 70% 70%;
  background: linear-gradient(180deg,rgb(255 255 255 / 26%),rgb(255 255 255 / 3%));
  pointer-events: none;
  content: '';
}
.button.primary::after,.button.light::after {
  position: absolute;
  right: 12%;
  bottom: 3px;
  left: 12%;
  height: 3px;
  border-radius: 50%;
  background: color-mix(in srgb,var(--accent) 60%,#fff);
  box-shadow: 0 -1px 8px color-mix(in srgb,var(--accent) 55%,transparent);
  opacity: .92;
  pointer-events: none;
  content: '';
}
.button.primary:hover,.button.light:hover {
  color: #fff;
  border-color: color-mix(in srgb,var(--accent) 48%,#fff);
  background: var(--liquid-primary-bg);
}

/* Clear lenses: the under-surface determines their tint in every palette. */
.button.secondary,.button.dark,.scope-link,
.appearance-toggle,.nav-toggle,.nav-links > .header-cta,
.header-controls #motion-toggle,.dialog-close,.appearance-close,
.hero .hero-signal > span {
  --liquid-clear-bg:
    radial-gradient(ellipse at var(--liquid-x,28%) var(--liquid-y,0%),var(--liquid-clear-shine),transparent 61%),
    linear-gradient(180deg,rgb(255 255 255 / 26%),transparent 48%,color-mix(in srgb,var(--accent) 10%,transparent)),
    color-mix(in srgb,var(--surface) 88%,transparent);
  border: 1px solid var(--line-strong);
  border-color: color-mix(in srgb,var(--line-strong) 64%,#fff);
  border-top-color: rgb(255 255 255 / 86%);
  border-radius: 999px;
  color: var(--text-heading);
  background: var(--surface);
  background: var(--liquid-clear-bg);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 85%),
    inset 1px 0 1px rgb(255 255 255 / 32%),
    inset -1px 0 1px rgb(255 255 255 / 52%),
    inset 0 -2px 2px color-mix(in srgb,var(--accent) 13%,transparent),
    0 3px 0 color-mix(in srgb,var(--line-strong) 46%,transparent),
    0 6px 11px rgb(0 0 0 / 11%);
}
.button.secondary:hover,.button.dark:hover,.scope-link:hover,
.appearance-toggle:hover,.nav-toggle:hover,.nav-links > .header-cta:hover,
.header-controls #motion-toggle:hover,.dialog-close:hover,.appearance-close:hover {
  border-color: color-mix(in srgb,var(--accent) 50%,#fff);
  color: var(--text-heading);
  background: var(--liquid-clear-bg);
}
.appearance-toggle[aria-expanded="true"],.header-controls #motion-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--liquid-clear-bg);
}
.scope-link {
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  line-height: 1.5;
  text-decoration: none;
  text-align: center;
}
.appearance-close { border-radius: 50%; }
.hero .hero-signal > span { box-shadow: inset 0 1px 1px #fff,inset 0 -2px 2px color-mix(in srgb,var(--accent) 15%,transparent),0 3px 0 color-mix(in srgb,var(--line-strong) 34%,transparent),0 8px 16px var(--shadow); }

/* Selected navigation has a dark optical core, with the palette visible in the rim. */
.services .service-tab,.palette-option {
  --liquid-tab-bg:
    radial-gradient(ellipse at var(--liquid-x,28%) 0%,var(--liquid-tab-shine),transparent 65%),
    linear-gradient(180deg,rgb(255 255 255 / 24%),transparent 65%),
    color-mix(in srgb,var(--surface) 84%,transparent);
  border: 1px solid color-mix(in srgb,var(--line) 68%,transparent);
  border-radius: 18px;
  background: var(--surface);
  background: var(--liquid-tab-bg);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 64%),inset 0 -1px 1px color-mix(in srgb,var(--accent) 11%,transparent),0 2px 3px rgb(0 0 0 / 5%);
}
.services .service-tab:hover,.palette-option:hover { background: var(--liquid-tab-bg); border-color: var(--line-strong); }
.services .service-tab[aria-selected="true"],.palette-option[aria-pressed="true"] {
  --liquid-selected-bg:
    radial-gradient(ellipse at var(--liquid-x,40%) 0%,rgb(255 255 255 / 27%),transparent 57%),
    radial-gradient(ellipse at 55% 118%,color-mix(in srgb,var(--accent) 68%,transparent),transparent 69%),
    linear-gradient(175deg,color-mix(in srgb,var(--accent) 16%,#30313d),#0b0d16 52%,color-mix(in srgb,var(--accent) 25%,#11141d));
  border-color: color-mix(in srgb,var(--accent) 48%,#b8bdc9);
  border-top-color: rgb(255 255 255 / 82%);
  color: #fff;
  background: #151722;
  background: var(--liquid-selected-bg);
  box-shadow: inset 0 2px 1px rgb(255 255 255 / 48%),inset 2px 0 2px rgb(255 255 255 / 18%),inset -2px 0 2px rgb(255 255 255 / 23%),inset 0 -3px 2px color-mix(in srgb,var(--accent) 58%,transparent),0 3px 0 color-mix(in srgb,var(--accent) 25%,#272a32),0 6px 11px rgb(0 0 0 / 16%);
}
.services .service-tab[aria-selected="true"] .service-name { color: #fff; text-shadow: 0 1px 1px rgb(0 0 0 / 45%); }
.services .service-tab[aria-selected="true"] .service-symbol { color: color-mix(in srgb,var(--accent) 22%,#fff); }
.palette-option[aria-pressed="true"] > span:last-child { color: #fff; }

/* A beveled lens for radio/checkbox cards; the real input retains its checked state. */
.diagnostic-option {
  --liquid-option-bg:
    radial-gradient(ellipse at var(--liquid-x,30%) 0%,rgb(255 255 255 / 10%),transparent 68%),
    linear-gradient(170deg,rgb(255 255 255 / 8%),transparent 55%),
    var(--surface);
  border-color: color-mix(in srgb,var(--line-strong) 72%,#fff);
  border-top-color: rgb(255 255 255 / 33%);
  border-radius: 18px;
  background: var(--liquid-option-bg);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 22%),inset 0 -2px 2px rgb(0 0 0 / 20%),0 3px 5px rgb(0 0 0 / 10%);
}
.diagnostic-option:hover { background: var(--liquid-option-bg); border-color: var(--accent); }
.diagnostic-option:has(:checked) {
  background:
    radial-gradient(ellipse at var(--liquid-x,30%) 0%,rgb(255 255 255 / 17%),transparent 62%),
    radial-gradient(ellipse at 50% 120%,color-mix(in srgb,var(--accent) 18%,transparent),transparent 72%),
    var(--surface-selected);
  border-color: var(--accent);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 48%),inset 0 -2px 2px color-mix(in srgb,var(--accent) 45%,transparent),0 0 0 1px color-mix(in srgb,var(--accent) 24%,transparent),0 5px 12px rgb(0 0 0 / 18%);
}

/* Fields stay native. The shine belongs to their frame rather than their text. */
.diagnostic-field select,.brief-field input,.brief-field select,.brief-field textarea,.nexus-field > input {
  border: 1px solid var(--line-strong);
  border-color: color-mix(in srgb,var(--line-strong) 73%,#fff);
  border-top-color: rgb(255 255 255 / 70%);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
  background:
    linear-gradient(180deg,rgb(255 255 255 / 12%),transparent 32%,transparent 80%,color-mix(in srgb,var(--accent) 10%,transparent)),
    var(--surface);
  box-shadow: inset 0 1px 2px rgb(255 255 255 / 38%),inset 0 3px 7px rgb(0 0 0 / 12%),inset 0 -2px 1px rgb(255 255 255 / 18%),0 3px 0 color-mix(in srgb,var(--line-strong) 22%,transparent),0 6px 10px rgb(0 0 0 / 9%);
  caret-color: var(--accent);
}
.diagnostic-field select,.brief-field select,.brief-field input,.nexus-field > input { border-radius: 999px; }
.brief-field textarea { border-radius: 18px; }
.brief-field .brief-preview { background: var(--surface-preview); }
.diagnostic-field select option,.brief-field select option { color: var(--text); background: var(--surface-raised); }
.diagnostic-field select:focus-visible,.brief-field input:focus-visible,.brief-field select:focus-visible,.brief-field textarea:focus-visible,.nexus-field > input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-color: var(--accent);
}
.diagnostic-field select[aria-invalid="true"],.nexus-field > input[aria-invalid="true"] { border-color: var(--accent); }

/* Larger surfaces have a quieter edge so that the three main modules remain clear. */
.experience-module { border-top-color: color-mix(in srgb,var(--line) 38%,#fff); }
.hero.experience-module { box-shadow: inset 0 1px 1px rgb(255 255 255 / 72%),inset 0 -1px 1px color-mix(in srgb,var(--accent) 13%,transparent),0 18px 42px var(--shadow); }
.module-diagnostic #diagnostic-app,.services .service-workbench,.nexus-close,.diagnostic-opportunity-primary,.appearance-panel,.dialog,.capability-animation {
  border-color: color-mix(in srgb,var(--line-strong) 65%,#fff);
  border-top-color: rgb(255 255 255 / 63%);
  background: var(--surface);
  background:
    radial-gradient(ellipse at 10% 0%,rgb(255 255 255 / 12%),transparent 58%),
    linear-gradient(155deg,color-mix(in srgb,var(--surface-raised) 92%,transparent),color-mix(in srgb,var(--surface) 97%,transparent));
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 44%),inset 1px 0 1px rgb(255 255 255 / 16%),inset -1px 0 1px rgb(255 255 255 / 20%),inset 0 -2px 2px color-mix(in srgb,var(--accent) 13%,transparent),0 7px 19px rgb(0 0 0 / 12%);
}
.appearance-panel,.dialog { border-radius: 24px; box-shadow: inset 0 2px 1px rgb(255 255 255 / 65%),inset 2px 0 2px rgb(255 255 255 / 24%),inset -2px 0 2px rgb(255 255 255 / 30%),0 5px 0 color-mix(in srgb,var(--line-strong) 22%,transparent),0 24px 65px var(--dialog-shadow); }
.services .service-tabs { background: color-mix(in srgb,var(--surface-tabs) 88%,transparent); }
.capability-animation { background: radial-gradient(ellipse at 50% 95%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 70%),color-mix(in srgb,var(--surface) 90%,transparent); }
.services .engagement { border: 1px solid color-mix(in srgb,var(--line) 75%,transparent); border-radius: 16px; background: linear-gradient(175deg,rgb(255 255 255 / 16%),transparent 70%),color-mix(in srgb,var(--surface) 86%,transparent); box-shadow: inset 0 1px 1px rgb(255 255 255 / 54%),0 2px 4px rgb(0 0 0 / 6%); }
.services .engagement:hover { background: linear-gradient(175deg,rgb(255 255 255 / 22%),transparent 70%),var(--surface-selected); }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .button.secondary,.button.dark,.scope-link,.appearance-toggle,.nav-toggle,.nav-links > .header-cta,.header-controls #motion-toggle,.dialog-close,.hero .hero-signal > span { -webkit-backdrop-filter: blur(12px) saturate(145%); backdrop-filter: blur(12px) saturate(145%); }
  .appearance-panel,.dialog { -webkit-backdrop-filter: blur(22px) saturate(135%); backdrop-filter: blur(22px) saturate(135%); }
}
@supports not (color: color-mix(in srgb,#000 50%,#fff)) {
  .button.primary,.button.light,.button.primary:hover,.button.light:hover { color: #fff; border-color: #8e929f; background: #14151e; box-shadow: inset 0 1px 1px rgb(255 255 255 / 72%),inset 0 -3px 3px rgb(0 0 0 / 72%),0 3px 0 #262731,0 8px 15px rgb(0 0 0 / 24%); }
  .button.primary::after,.button.light::after { background: var(--accent); box-shadow: none; }
  .button.secondary,.button.dark,.scope-link,.appearance-toggle,.nav-toggle,.nav-links > .header-cta,.header-controls #motion-toggle,.dialog-close,.appearance-close,.hero .hero-signal > span,
  .button.secondary:hover,.button.dark:hover,.scope-link:hover,.appearance-toggle:hover,.nav-toggle:hover,.nav-links > .header-cta:hover,.header-controls #motion-toggle:hover,.dialog-close:hover,.appearance-close:hover,
  .appearance-toggle[aria-expanded="true"],.header-controls #motion-toggle[aria-pressed="true"] { color: var(--text-heading); border-color: var(--line-strong); background: var(--surface); box-shadow: inset 0 1px 1px rgb(255 255 255 / 55%),inset 0 -2px 2px rgb(0 0 0 / 12%),0 3px 0 var(--line-soft),0 6px 11px rgb(0 0 0 / 11%); }
  .services .service-tab,.services .service-tab:hover,.palette-option,.palette-option:hover,.diagnostic-option,.diagnostic-option:hover { border-color: var(--line-strong); background: var(--surface); box-shadow: inset 0 1px 1px rgb(255 255 255 / 34%),0 3px 5px rgb(0 0 0 / 10%); }
  .services .service-tab[aria-selected="true"],.palette-option[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: #151722; box-shadow: inset 0 1px 1px rgb(255 255 255 / 48%),inset 0 -2px 1px var(--accent),0 3px 0 #272a32; }
  .services .service-tab[aria-selected="true"] .service-symbol { color: #fff; }
  .diagnostic-option:has(:checked) { border-color: var(--accent); background: var(--surface-selected); box-shadow: inset 0 1px 1px rgb(255 255 255 / 38%),inset 0 -2px 1px var(--accent); }
  .diagnostic-field select,.brief-field input,.brief-field select,.brief-field textarea,.nexus-field > input { color: var(--text); border-color: var(--line-strong); background: var(--surface); box-shadow: inset 0 1px 1px rgb(255 255 255 / 30%),inset 0 3px 6px rgb(0 0 0 / 12%),0 3px 0 var(--line-soft); }
  .module-diagnostic #diagnostic-app,.services .service-workbench,.nexus-close,.diagnostic-opportunity-primary,.appearance-panel,.dialog,.capability-animation,.services .service-tabs,.services .engagement,.services .engagement:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface); box-shadow: inset 0 1px 1px rgb(255 255 255 / 40%),0 7px 19px rgb(0 0 0 / 12%); }
  .experience-module { border-top-color: var(--line-strong); }
  .hero.experience-module { box-shadow: inset 0 1px 1px rgb(255 255 255 / 72%),0 18px 42px var(--shadow); }
}

/* Disabled controls keep their label visible and cannot impersonate an active lens. */
.button:disabled,.button:disabled:hover,.diagnostic-navigation .button:disabled,.diagnostic-navigation .button:disabled:hover,.header-controls #motion-toggle:disabled,.header-controls #motion-toggle:disabled:hover {
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--surface-raised);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 18%);
  text-shadow: none;
  transform: none;
  opacity: .62;
  cursor: not-allowed;
}
.button:disabled::before,.button:disabled::after { opacity: 0; }
.button:focus-visible,.scope-link:focus-visible,.appearance-toggle:focus-visible,.nav-toggle:focus-visible,.nav-links > .header-cta:focus-visible,.header-controls #motion-toggle:focus-visible,.dialog-close:focus-visible,.appearance-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.services .service-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.palette-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The reflection follows the pointer; no perpetual animation is needed. */
.button,.scope-link,.appearance-toggle,.nav-toggle,.nav-links > .header-cta,.header-controls #motion-toggle,.dialog-close,.appearance-close,.diagnostic-option,.services .service-tab,.palette-option {
  transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:not(:disabled):hover,.scope-link:hover { transform: translateY(-2px); }
  .button:not(:disabled):active,.scope-link:active { transform: translateY(1px); }
  .services .service-tab:not([aria-selected="true"]):hover,.diagnostic-option:hover { transform: translateY(-1px); }
}
.motion-paused .button,.motion-paused .scope-link,.motion-paused .appearance-toggle,.motion-paused .nav-toggle,.motion-paused .nav-links > .header-cta,.motion-paused .header-controls #motion-toggle,.motion-paused .dialog-close,.motion-paused .appearance-close,.motion-paused .diagnostic-option,.motion-paused .services .service-tab,.motion-paused .palette-option { transition: none; transform: none; }
.motion-paused .button:not(:disabled):hover,.motion-paused .button:not(:disabled):active,.motion-paused .services .service-tab:not([aria-selected="true"]):hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .button,.scope-link,.appearance-toggle,.nav-toggle,.nav-links > .header-cta,.header-controls #motion-toggle,.dialog-close,.appearance-close,.diagnostic-option,.services .service-tab,.palette-option { transition: none; transform: none; }
  .button:not(:disabled):hover,.button:not(:disabled):active,.scope-link:hover,.scope-link:active,.services .service-tab:not([aria-selected="true"]):hover,.diagnostic-option:hover { transform: none; }
}
@media (forced-colors: active) {
  .button.primary,.button.light,.button.secondary,.button.dark,.scope-link,.appearance-toggle,.nav-toggle,.nav-links > .header-cta,.header-controls #motion-toggle,.dialog-close,.diagnostic-option,.services .service-tab,.palette-option { color: ButtonText; border: 1px solid ButtonText; background: ButtonFace; box-shadow: none; text-shadow: none; forced-color-adjust: auto; }
  .button::before,.button::after { display: none; }
  .services .service-tab[aria-selected="true"] .service-name,.services .service-tab[aria-selected="true"] .service-symbol,.palette-option[aria-pressed="true"] > span:last-child { color: HighlightText; }
  .services .service-tab[aria-selected="true"],.palette-option[aria-pressed="true"] { color: HighlightText; background: Highlight; }
}
@media print {
  .button,.scope-link,.diagnostic-option,.services .service-tab,.module-diagnostic #diagnostic-app,.services .service-workbench,.nexus-close,.diagnostic-opportunity-primary,.capability-animation { color: #172027; border-color: #5f6470; background: #fff; box-shadow: none; text-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .button::before,.button::after { display: none; }
  .services .service-tab[aria-selected="true"] .service-name,.services .service-tab[aria-selected="true"] .service-symbol { color: #172027; }
}
