/* Quiet window surfaces and consistent targets for the Living Fold controls. */
@media screen {
  html body.visual-refresh.editorial-v1.living-fold {
    --fold-window-shadow: 0 16px 44px rgb(0 0 0 / .2);
  }
  html[data-theme="light"] body.visual-refresh.editorial-v1.living-fold {
    --fold-window-shadow: 0 16px 44px rgb(25 30 40 / .08);
  }
  html body.visual-refresh.editorial-v1.living-fold :is(.colour-studio, .accessibility-panel, .catalog-dialog),
  html body.visual-refresh.editorial-v1.living-fold #portfolioNavigation .portfolio-preferences__panel {
    background: var(--paper) !important;
    border-color: var(--line) !important;
    box-shadow: var(--fold-window-shadow) !important;
  }
  html body.visual-refresh.editorial-v1.living-fold :is(.colour-studio, .accessibility-panel, .catalog-dialog) > header,
  html body.visual-refresh.editorial-v1.living-fold .accessibility-panel > footer,
  html body.visual-refresh.editorial-v1.living-fold .catalog-tabs {
    background: var(--paper) !important;
  }

  /* The existing exact-match state also gets a small non-color cue. */
  html body.visual-refresh.editorial-v1.living-fold .colour-presets--studio button {
    position: relative !important;
  }
  html body.visual-refresh.editorial-v1.living-fold .colour-presets--studio button[aria-current="true"] {
    color: var(--ink) !important;
    border-color: var(--accent-readable, var(--ink)) !important;
    background: color-mix(in srgb, var(--accent) 4%, var(--paper)) !important;
    font-weight: 600 !important;
  }
  html body.visual-refresh.editorial-v1.living-fold .colour-presets--studio button[aria-current="true"]::after {
    content: "" !important;
    position: absolute !important;
    top: calc(50% - 5px) !important;
    left: 9px !important;
    width: 4px !important;
    height: 7px !important;
    margin: 0 !important;
    border: solid var(--accent-on, #000) !important;
    border-width: 0 1.5px 1.5px 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: rotate(45deg) !important;
    pointer-events: none !important;
  }

  /* Keep small brand marks, with space around them for touch and focus. */
  html body.visual-refresh.editorial-v1.living-fold #reviews .review-linkedin {
    display: inline-grid !important;
    place-items: center !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
    overflow: visible !important;
    transform: none !important;
  }
  html body.visual-refresh.editorial-v1.living-fold #reviews .review-linkedin .linkedin-brand-mark {
    width: 24px !important;
    height: 24px !important;
  }
  html body.visual-refresh.editorial-v1.living-fold #about .about76__instagram > header > a {
    min-height: 44px !important;
    align-items: center !important;
  }
  html body.visual-refresh.editorial-v1.living-fold #work .project-step,
  html body.visual-refresh.editorial-v1.living-fold #reviews .review-nav button,
  html body.visual-refresh.editorial-v1.living-fold #archive .archive-arrow {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
  }

  /* A familiar text caret stays precise without the old glowing capsule. */
  html body.visual-refresh.editorial-v1 #portfolio-cursor :is(.cursor-ring, .cursor-dot) { box-shadow: none !important; }
  html body.visual-refresh.editorial-v1:not(.a11y-large-cursor) #portfolio-cursor.is-text .cursor-ring {
    width: 1px !important;
    height: 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--accent-readable, var(--ink)) !important;
  }
  html body.visual-refresh.editorial-v1:not(.a11y-large-cursor) #portfolio-cursor.is-text .cursor-ring::before,
  html body.visual-refresh.editorial-v1:not(.a11y-large-cursor) #portfolio-cursor.is-text .cursor-ring::after {
    content: "";
    position: absolute;
    left: -3px;
    width: 7px;
    height: 1px;
    background: inherit;
  }
  html body.visual-refresh.editorial-v1:not(.a11y-large-cursor) #portfolio-cursor.is-text .cursor-ring::before { top: 0; }
  html body.visual-refresh.editorial-v1:not(.a11y-large-cursor) #portfolio-cursor.is-text .cursor-ring::after { bottom: 0; }
  html body.visual-refresh.editorial-v1:not(.a11y-large-cursor) #portfolio-cursor.is-text .cursor-dot { display: none !important; }

  /* The last phone anchor needs enough document space to clear the header. */
  html body.visual-refresh.editorial-v1.living-fold.mobile-continuous:not(.vertical-fallback) #contact {
    min-height: calc(100svh - var(--mobile-top, 64px)) !important;
  }
}

@media (forced-colors: active) {
  html body.visual-refresh.editorial-v1.living-fold :is(.colour-studio, .accessibility-panel, .catalog-dialog),
  html body.visual-refresh.editorial-v1.living-fold #portfolioNavigation .portfolio-preferences__panel {
    box-shadow: none !important;
  }
  html body.visual-refresh.editorial-v1.living-fold .colour-presets--studio button[aria-current="true"] {
    outline: 1px solid Highlight !important;
    outline-offset: -2px !important;
  }
  html body.visual-refresh.editorial-v1.living-fold .colour-presets--studio button[aria-current="true"]::after {
    border-color: CanvasText !important;
  }
}
