/* OXO public action system — load after every existing public stylesheet.
   Explicit component selectors only. Forms, links, and event handlers are intact.
   The About story owns its compact playback/chapter controls separately. */

:root {
  --oxo-action-blue: #0868d9;
  --oxo-action-blue-hover: #0b70df;
  --oxo-action-blue-press: #0758b8;
  --oxo-action-ink: #142130;
  --oxo-action-ink-hover: #1a3048;
  --oxo-action-line: #52677e;
  --oxo-action-text: #f5f9ff;
  --oxo-action-focus: #92d7ff;
  --oxo-action-radius: 12px;
}

/* Three old stylesheets progressively add chrome, a moving shine, an inset
   bevel, and shadowed arrow capsules. Override each layer, including hover. */
body :is(
  .button,
  .header .nav-contact,
  .header .mobile-start,
  .oxo-footer .oxo-footer-cta,
  .case-visit-button,
  .ai-edge .ai-edge-link,
  .case-next .case-links :where(a),
  .oxo-app-nav .app-nav-bottom > :where(a)
) {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  height: auto;
  padding: 9px 11px 9px 20px;
  border: 1px solid var(--oxo-action-border, var(--oxo-action-line));
  border-radius: var(--oxo-action-radius);
  background: var(--oxo-action-fill, var(--oxo-action-ink));
  color: var(--oxo-action-label, var(--oxo-action-text));
  box-shadow: 0 3px 12px #00000018;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.01em;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  text-shadow: none;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
  transform: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease, box-shadow 160ms ease, transform 100ms ease;
}

/* Preserve the responsive display rules of the two header CTAs. */
body :is(.button, .oxo-footer .oxo-footer-cta, .case-visit-button,
  .ai-edge .ai-edge-link, .case-next .case-links a,
  .oxo-app-nav .app-nav-bottom > a) {
  display: inline-flex;
}

body :is(.button, .header .nav-contact, .header .mobile-start)::before,
body :is(.button, .header .nav-contact, .header .mobile-start)::after {
  content: none;
  display: none;
  animation: none;
  transition: none;
}

/* A single blue identifies actions that start an enquiry or exploration. */
body :is(.button-primary, .header .nav-contact, .header .mobile-start,
  .oxo-footer .oxo-footer-cta, .insight-help .button,
  .case-next .case-links a:first-child, .oxo-app-nav .app-nav-bottom > a) {
  --oxo-action-fill: var(--oxo-action-blue);
  --oxo-action-fill-hover: var(--oxo-action-blue-hover);
  --oxo-action-fill-press: var(--oxo-action-blue-press);
  --oxo-action-border: #3b8bec;
  --oxo-action-border-hover: #78b5ff;
  --oxo-action-label: #fff;
  --oxo-action-icon-fill: #003a8429;
  --oxo-action-icon-line: #ffffff38;
  --oxo-action-icon-color: #fff;
}

/* The preview dialog returns to the form; it is a secondary action. */
body #edit-enquiry {
  --oxo-action-fill: var(--oxo-action-ink);
  --oxo-action-fill-hover: var(--oxo-action-ink-hover);
  --oxo-action-fill-press: #0c1826;
  --oxo-action-border: var(--oxo-action-line);
  --oxo-action-border-hover: #8bc7f9;
  --oxo-action-icon-fill: #70beff0d;
  --oxo-action-icon-line: #9bcaff38;
  --oxo-action-icon-color: #a6d9ff;
}

body :is(
  .button, .header .nav-contact, .header .mobile-start,
  .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
  .case-next .case-links :where(a), .oxo-app-nav .app-nav-bottom > :where(a)
):is(:hover, :focus-visible) {
  background: var(--oxo-action-fill-hover, var(--oxo-action-ink-hover));
  border-color: var(--oxo-action-border-hover, #8bc7f9);
  color: var(--oxo-action-label, var(--oxo-action-text));
  box-shadow: 0 4px 14px #00000022;
  text-shadow: none;
  transform: none;
}

body :is(
  .button, .header .nav-contact, .header .mobile-start,
  .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
  .case-next .case-links :where(a), .oxo-app-nav .app-nav-bottom > :where(a)
):active {
  background: var(--oxo-action-fill-press, #0c1826);
  box-shadow: none;
  transform: translateY(1px);
}

/* Arrow tokens use the actual glyph, so back/next/external directions stay true.
   The build helper wraps the few legacy trailing text arrows in a span. */
body :is(
  .button, .header .nav-contact, .header .mobile-start,
  .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
  .case-next .case-links :where(a)
) > span[aria-hidden="true"],
body .oxo-app-nav .app-nav-bottom > a > span {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--oxo-action-icon-line, #9bcaff38);
  border-radius: 50%;
  background: var(--oxo-action-icon-fill, #70beff0d);
  color: var(--oxo-action-icon-color, #a6d9ff);
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
  text-decoration: none;
  transform: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

body :is(.button, .header .nav-contact, .header .mobile-start,
  .case-visit-button, .ai-edge .ai-edge-link, .case-next .case-links a,
  .oxo-footer .oxo-footer-cta) > span[aria-hidden="true"]::before,
body :is(.button, .header .nav-contact, .header .mobile-start,
  .case-visit-button, .ai-edge .ai-edge-link, .case-next .case-links a,
  .oxo-footer .oxo-footer-cta) > span[aria-hidden="true"]::after {
  content: none;
  display: none;
  border: 0;
  background: none;
  box-shadow: none;
}

body :is(.button, .header .nav-contact, .header .mobile-start):is(:hover, :focus-visible)
  > span[aria-hidden="true"] {
  transform: none;
}

/* Form labels are content, never icons. The white form retains a blue CTA. */
body .enquiry .form-bottom .button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 9px 11px 9px 20px;
  border-radius: var(--oxo-action-radius);
  gap: 18px;
  justify-content: space-between;
  text-align: left;
}

body .enquiry .form-bottom .button .submit-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

body .insight-help .button { justify-content: space-between; }
body .case-visit .case-visit-button { min-width: 180px; }

/* This legacy first-child CTA has stronger color rules than a plain button. */
body .case-next .case-links a:first-child {
  background: var(--oxo-action-blue);
  border-color: #3b8bec;
  color: #fff;
  box-shadow: 0 3px 12px #00000018;
}
body .case-next .case-links a:first-child:is(:hover, :focus-visible) {
  background: var(--oxo-action-blue-hover);
  border-color: #78b5ff;
  color: #fff;
  box-shadow: 0 4px 14px #00000022;
}
body .case-next .case-links a:first-child:active {
  background: var(--oxo-action-blue-press);
  box-shadow: none;
}

/* Preserve the existing hero CTA height and type size inside its scroll scene. */
body .phoenix-stage .phoenix-intro .button {
  min-height: 49px;
  padding: 8px 10px 8px 18px;
  font-size: 13px;
}
body .phoenix-stage .phoenix-intro .button > span[aria-hidden="true"] {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
}

/* Only these legacy declarations were !important; keep the exceptions local. */
body .ai-edge .ai-edge-link {
  padding: 9px 11px 9px 20px !important;
  border-color: var(--oxo-action-line) !important;
  font-size: 14px !important;
}
body .ai-edge .ai-edge-link:is(:hover, :focus-visible) {
  border-color: #8bc7f9 !important;
}
body .ai-edge .ai-edge-link > span[aria-hidden="true"] { font-size: 20px !important; }

/* Compact header controls share the same silhouette, with optical spacing. */
body .header :is(.nav-contact, .mobile-start) {
  min-height: 46px;
  padding: 8px 9px 8px 16px;
  gap: 12px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}
body .header :is(.nav-contact, .mobile-start) > span[aria-hidden="true"] {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  font-size: 18px;
}

/* Utility controls are quiet ink surfaces, with a complete 44px hit area. */
body :is(.header .mobile-menu, .app-nav-top button, .dialog-close,
  .oxo-discovery-clear, .page-links a, .insights-categories a,
  .insights-pagination a, .app-nav-quick a) {
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--oxo-action-line);
  border-radius: 10px;
  background: var(--oxo-action-ink);
  color: var(--oxo-action-text);
  box-shadow: none;
  text-shadow: none;
  text-decoration: none;
  line-height: 1.4;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease, transform 100ms ease;
}
body :is(.header .mobile-menu, .app-nav-top button, .dialog-close,
  .oxo-discovery-clear, .page-links a, .insights-categories a,
  .insights-pagination a, .app-nav-quick a):is(:hover, :focus-visible) {
  background: var(--oxo-action-ink-hover);
  border-color: #8bc7f9;
  color: #fff;
}
body :is(.header .mobile-menu, .app-nav-top button, .dialog-close,
  .oxo-discovery-clear, .page-links a, .insights-categories a,
  .insights-pagination a, .app-nav-quick a):active {
  background: #0c1826;
  transform: translateY(1px);
}
body .header .mobile-menu {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 10px;
  gap: 5px;
}
body .header .mobile-menu span { width: 19px; height: 1.5px; background: #edf6ff; }
body .header .mobile-menu[aria-expanded="true"] { background: #17416a; border-color: #75bfff; }
body .header .nav-group > summary { min-height: 44px; }
body :is(.app-nav-top button, .dialog-close) { width: 44px; height: 44px; padding: 0; font-size: 28px; }
body .dialog-close { display: grid; place-items: center; top: 14px; right: 14px; }
body .oxo-discovery-clear { min-height: 48px; min-width: 72px; padding: 10px 15px; font-size: 14px; }
body :is(.page-links a, .insights-categories a, .insights-pagination a, .app-nav-quick a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
}
body :is(.insights-categories a, .insights-pagination a)[aria-current="page"] {
  background: var(--oxo-action-blue);
  color: #fff;
  border-color: #78b5ff;
}
body :is(.app-nav-top button, .oxo-discovery-clear)[hidden] { display: none !important; }

/* Menu rows are larger navigation surfaces, not oversized primary buttons. */
body .oxo-app-nav .app-nav-body nav > :is(button, a) {
  border-color: #425a70;
  border-radius: 14px;
  background: #152434;
  color: #f5f9ff;
  box-shadow: none;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}
body .oxo-app-nav .app-nav-body nav > :is(button, a):is(:hover, :focus-visible) {
  background: #1c334a;
  border-color: #83bff0;
}
body .oxo-app-nav .app-nav-body nav > :is(button, a):active { background: #0d1d2d; }
body .oxo-app-nav .app-nav-icon { border-radius: 10px; background: #4baaff12; color: #9ad3ff; }
body .oxo-app-nav .app-nav-bottom > a { display: flex; width: 100%; }
body .oxo-app-nav .app-nav-quick a { padding: 12px 8px; }

/* Decorative arrows on large link surfaces belong to the same token family. */
body :is(.work .project-open, .service-list .service-arrow,
  .oxo-project-nav a > span[aria-hidden="true"], .oxo-app-nav .app-nav-arrow) {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid #9bcaff38;
  border-radius: 50%;
  background: #70beff0d;
  color: #a6d9ff;
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
body .work .project-open { color: #a6d9ff !important; }
body .work .project:is(:hover, :focus-visible) .project-open {
  background: var(--oxo-action-blue);
  border-color: #78b5ff;
  color: #fff !important;
}
body .service-list .service { grid-template-columns: 42px minmax(0, 1fr) 32px !important; }
body .service-list .service:is(:hover, :focus-visible) .service-arrow,
body .oxo-project-nav a:is(:hover, :focus-visible) > span[aria-hidden="true"] {
  background: #1b446b;
  border-color: #78b5ff;
  color: #fff;
}

/* Explicit focus remains visible on dark cards and the white enquiry form. */
body :is(
  .button, .header .nav-contact, .header .mobile-start, .header .mobile-menu,
  .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
  .case-next .case-links a, .app-nav-top button, .oxo-app-nav .app-nav-bottom > a,
  .oxo-app-nav .app-nav-body nav > button, .oxo-app-nav .app-nav-body nav > a,
  .dialog-close, .oxo-discovery-clear, .page-links a, .insights-categories a,
  .insights-pagination a, .app-nav-quick a
):focus-visible {
  outline: 3px solid var(--oxo-action-focus);
  outline-offset: 3px;
}
body .enquiry .form-bottom .button:focus-visible { outline-color: #064c9c; }

/* Preserve readable labels and arrow spacing while disabled. The existing
   enquiry handler already disables the submit button while showing Sending… */
body :is(.button, .header .nav-contact, .header .mobile-start, .oxo-discovery-clear,
  .app-nav-top button, .oxo-app-nav .app-nav-body nav > button):is(:disabled, [aria-disabled="true"]) {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
body .enquiry form .button[type="submit"]:disabled {
  opacity: 1;
  cursor: wait;
  background: #0758b8;
  border-color: #3b8bec;
  color: #fff;
  transform: none;
  box-shadow: none;
}
body .enquiry form .button[type="submit"]:disabled > span[aria-hidden="true"] {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
  margin: 6px;
  border: 2px solid #ffffff55;
  border-top-color: #fff;
  background: transparent;
  font-size: 0;
  animation: oxo-action-wait 700ms linear infinite;
}
@keyframes oxo-action-wait { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  body .header .mobile-start { min-height: 44px; padding: 7px 8px 7px 13px; gap: 10px; font-size: 12px; }
  body .header .mobile-start > span[aria-hidden="true"] { flex-basis: 26px; width: 26px; height: 26px; font-size: 17px; }
  body .page-contact .button { width: 100%; }
  body .ai-edge .ai-edge-link { width: 100%; }
  body .case-next .case-links a { justify-content: space-between; }
}

@media (max-width: 640px) {
  body .oxo-footer .oxo-footer-cta { width: 100%; min-width: 0; gap: 12px; }
  body .oxo-footer .oxo-footer-contact > a[href="/contact/"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 11px 16px;
    border: 1px solid var(--oxo-action-line);
    border-radius: var(--oxo-action-radius);
    background: var(--oxo-action-ink);
    color: var(--oxo-action-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    text-shadow: none;
  }
  body .oxo-footer .oxo-footer-contact > a[href="/contact/"]:is(:hover, :focus-visible) { background: var(--oxo-action-ink-hover); border-color: #8bc7f9; }
}

@media (prefers-reduced-motion: reduce) {
  body :is(.button, .header .nav-contact, .header .mobile-start,
    .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
    .case-next .case-links a, .header .mobile-menu, .app-nav-top button,
    .oxo-discovery-clear, .dialog-close, .page-links a, .insights-categories a,
    .insights-pagination a, .app-nav-quick a, .oxo-app-nav .app-nav-bottom > a) {
    transition: none;
  }
  body :is(.button, .header .nav-contact, .header .mobile-start,
    .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
    .case-next .case-links a, .header .mobile-menu, .app-nav-top button,
    .oxo-discovery-clear, .dialog-close, .page-links a, .insights-categories a,
    .insights-pagination a, .app-nav-quick a, .oxo-app-nav .app-nav-bottom > a):active {
    transform: none;
  }
  body .enquiry form .button[type="submit"]:disabled > span[aria-hidden="true"] { animation: none; }
}

@media (forced-colors: active) {
  body :is(.button, .header .nav-contact, .header .mobile-start,
    .oxo-footer .oxo-footer-cta, .case-visit-button, .ai-edge .ai-edge-link,
    .case-next .case-links a, .header .mobile-menu, .app-nav-top button,
    .oxo-discovery-clear, .dialog-close, .page-links a, .insights-categories a,
    .insights-pagination a, .app-nav-quick a, .oxo-app-nav .app-nav-bottom > a) {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
    box-shadow: none;
  }
}
