/* One shared control finish. Geometry, scene transforms, hit testing and game
   input remain with their original components. Artwork and record-card buttons
   are content surfaces, so they deliberately keep their existing treatment.
   The few important declarations unify this skin across legacy page themes;
   no dimensions, layout, pointer events, transforms or animations are changed. */
:root {
  --gd-glass-fill: rgba(29, 35, 27, .94);
  --gd-glass-ink: #f4eddc;
  --gd-glass-edge: rgba(237, 214, 173, .47);
  --gd-glass-top: rgba(255, 252, 238, .22);
  --gd-glass-bottom: rgba(201, 165, 101, .08);
  --gd-glass-focus: #eccb8d;
  --gd-glass-shadow: 0 5px 18px #03060124;
}

/* The cream pages retain a clear, paper-light version of the same material. */
:where(.light, .article-dialog, .access-screen, .workspace-main, .record-dialog) {
  --gd-glass-fill: rgba(244, 239, 224, .96);
  --gd-glass-ink: #282b21;
  --gd-glass-edge: rgba(119, 91, 42, .48);
  --gd-glass-top: rgba(255, 255, 255, .93);
  --gd-glass-bottom: rgba(181, 145, 76, .17);
  --gd-glass-focus: #70511c;
  --gd-glass-shadow: 0 5px 18px #493b1a10;
}
:where(.dark, .cofo-viewer, .photo-lightbox, .gd-page-loader, #jet-flight-layer, .doc-presence) {
  --gd-glass-fill: rgba(29, 35, 27, .94);
  --gd-glass-ink: #f4eddc;
  --gd-glass-edge: rgba(237, 214, 173, .47);
  --gd-glass-top: rgba(255, 252, 238, .22);
  --gd-glass-bottom: rgba(201, 165, 101, .08);
  --gd-glass-focus: #eccb8d;
  --gd-glass-shadow: 0 5px 18px #03060124;
}

body :is(
  button:not(:where(.gallery-item, .creative-image-button, .cofo-image-button,
    .rezenkia-image-button, .doc-avatar-hit, .doc-spark, .project-card,
    .session-card, .metric-card, .note-card, .task-info, .cs-entry, .journal-entry)),
  input[type="button"], input[type="submit"], input[type="reset"],
  a.button, a.co-button, a.service-button, a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link,
  a.ex-primary, .ribbon-jumps a, a.home-discover-link,
  a.home-work-inquiry, a.cp-project-inquiry, a.access-button, a.btn,
  .contact-arrow
) {
  border-radius: var(--gd-control-radius, 999px) !important;
  color: var(--gd-glass-ink) !important;
  background-color: var(--gd-glass-fill) !important;
  background-image:
    radial-gradient(ellipse at 18% 0, var(--gd-glass-top), transparent 64%),
    linear-gradient(155deg, #ffffff0a 0%, transparent 44%, var(--gd-glass-bottom) 100%) !important;
  border-color: var(--gd-glass-edge) !important;
  box-shadow:
    inset 0 1px 0 #fff7,
    inset 0 -1px 0 #080d0930,
    inset 1px 0 0 #f4e8ce18,
    inset -1px 0 0 #f4e8ce18,
    var(--gd-glass-shadow) !important;
  -webkit-backdrop-filter: blur(16px) saturate(145%) !important;
  backdrop-filter: blur(16px) saturate(145%) !important;
  text-shadow: none;
}

/* Gold keeps the primary actions distinct from the translucent secondary ones. */
body :is(a.button-light, a.co-button, a.service-button:not(.service-button-secondary),
  a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link, .co-inquiry .co-button,
  .doc-controls [data-doc-action="play"], [data-jet-fire], .btn.primary,
  .cs-primary, .access-button) {
  --gd-glass-fill: rgba(216, 190, 143, .96);
  --gd-glass-ink: #192016;
  --gd-glass-edge: rgba(255, 236, 194, .8);
  --gd-glass-top: rgba(255, 250, 226, .85);
  --gd-glass-bottom: rgba(131, 90, 29, .22);
}

/* Selection remains visible without relying on hover or motion. */
body :is(button, .ribbon-jumps a):is([aria-pressed="true"], [aria-selected="true"],
  [aria-current="page"], .active),
body :is(.task-check.checked, .doc-controls button[aria-pressed="true"]) {
  --gd-glass-fill: rgba(112, 83, 40, .98);
  --gd-glass-ink: #fff1d4;
  --gd-glass-edge: rgba(246, 208, 144, .95);
  --gd-glass-top: rgba(255, 235, 191, .22);
  --gd-glass-bottom: rgba(15, 19, 12, .2);
}

/* The image-viewer arrows, filters, game deck, pause, submit and replay controls
   all get an equally legible keyboard ring. No existing focus target is lost. */
body :is(button:not(:where(.gallery-item, .creative-image-button, .cofo-image-button,
    .rezenkia-image-button, .doc-avatar-hit, .doc-spark, .project-card,
    .session-card, .metric-card, .note-card, .task-info, .cs-entry, .journal-entry)),
  input[type="button"], input[type="submit"], input[type="reset"],
  a.button, a.co-button, a.service-button, a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link,
  a.ex-primary, .ribbon-jumps a, a.home-discover-link,
  a.home-work-inquiry, a.cp-project-inquiry, a.access-button, a.btn):focus-visible {
  outline: 2px solid var(--gd-glass-focus) !important;
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  body :is(button:not(:where(.gallery-item, .creative-image-button, .cofo-image-button,
      .rezenkia-image-button, .doc-avatar-hit, .doc-spark, .project-card,
      .session-card, .metric-card, .note-card, .task-info, .cs-entry, .journal-entry)),
    a.button, a.co-button, a.service-button, a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link,
    a.ex-primary, .ribbon-jumps a, a.home-discover-link,
    a.home-work-inquiry, a.cp-project-inquiry, a.access-button, a.btn):hover:not(:disabled):not([aria-disabled="true"]) {
    border-color: var(--gd-glass-focus) !important;
    box-shadow: inset 0 1px 0 #fffb, inset 0 -1px 0 #080d0928,
      inset 0 0 14px #f6e4b915, 0 7px 24px #03060130 !important;
  }
}
body :is(button, input[type="button"], input[type="submit"], input[type="reset"]):disabled,
body :is(a.button, a.co-button, a.service-button, a.ph-button, a.pro-button,
  a.pw-button, a.ex-primary, .ribbon-jumps a, a.btn)[aria-disabled="true"] {
  --gd-glass-fill: rgba(87, 89, 77, .62);
  --gd-glass-ink: #e3dece;
  --gd-glass-top: rgba(247, 244, 228, .11);
  --gd-glass-bottom: transparent;
  --gd-glass-edge: rgba(183, 179, 155, .28);
}
body :is(button:not(:where(.gallery-item, .creative-image-button, .cofo-image-button,
    .rezenkia-image-button, .doc-avatar-hit, .doc-spark, .project-card,
    .session-card, .metric-card, .note-card, .task-info, .cs-entry, .journal-entry)),
  a.button, a.co-button, a.service-button, a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link,
  a.ex-primary, .ribbon-jumps a, a.home-discover-link,
  a.home-work-inquiry, a.cp-project-inquiry, a.access-button, a.btn):active:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: inset 0 2px 8px #05090538, inset 0 1px 0 #fff4,
    inset 0 -1px 0 #e9d7b12b, 0 2px 8px #03060120 !important;
}

/* Genuine transparency is progressive: opaque gradients stay readable in
   browsers that cannot blur content behind a surface. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root { --gd-glass-fill: rgba(29, 35, 27, .78); }
  :where(.light, .article-dialog, .access-screen, .workspace-main, .record-dialog) {
    --gd-glass-fill: rgba(244, 239, 224, .78);
  }
  :where(.dark, .cofo-viewer, .photo-lightbox, .gd-page-loader, #jet-flight-layer, .doc-presence) {
    --gd-glass-fill: rgba(29, 35, 27, .78);
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --gd-glass-fill: #1d231b; }
  :where(.light, .article-dialog, .access-screen, .workspace-main, .record-dialog) { --gd-glass-fill: #f4efe0; }
  :where(.dark, .cofo-viewer, .photo-lightbox, .gd-page-loader, #jet-flight-layer, .doc-presence) { --gd-glass-fill: #1d231b; }
  body :is(button, input[type="button"], input[type="submit"], input[type="reset"],
    a.button, a.co-button, a.service-button, a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link,
    a.ex-primary, .ribbon-jumps a, a.home-discover-link, a.btn, .contact-arrow) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
@media (forced-colors: active) {
  body :is(button:not(:where(.gallery-item, .creative-image-button, .cofo-image-button,
      .rezenkia-image-button, .doc-avatar-hit, .doc-spark, .project-card,
      .session-card, .metric-card, .note-card, .task-info, .cs-entry, .journal-entry)),
    input[type="button"], input[type="submit"], input[type="reset"],
    a.button, a.co-button, a.service-button, a.ph-button, a.pro-button, a.pw-button, a.cc-primary-link,
    a.ex-primary, .ribbon-jumps a, a.home-discover-link,
    a.home-work-inquiry, a.cp-project-inquiry, a.access-button, a.btn, .contact-arrow) {
    color: ButtonText !important;
    background: ButtonFace !important;
    border-color: ButtonText !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    forced-color-adjust: auto;
  }
}
