/* QE V30-A: selection geometry/colors reused from the portfolio text-selection-v2_A.css source. */
/* Illustrator-inspired selection chrome. All dimensions are design choices;
   the target is measured from the live DOM, never from a screenshot. */
.xs-text-selection {
  --xs-selection-blue: #508dff;
  --xs-selection-cyan: #35e4e8;
  position: fixed !important;
  top: 0;
  left: 0;
  box-sizing: border-box;
  border: 1px solid currentColor;
  border-radius: 0;
  color: var(--xs-selection-blue);
  background: transparent;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 35%);
  z-index: 2147483646;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 80ms linear;
}
.xs-text-selection[data-visible] { opacity: 1; visibility: visible; }
.xs-text-selection[data-activated] { color: var(--xs-selection-cyan); }
.xs-text-selection > i {
  position: absolute;
  display: block;
  width: 5px;
  height: 5px;
  box-sizing: border-box;
  border: 1px solid currentColor;
  background: #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.xs-text-selection > i:nth-child(1) { left: 0; top: 0; }
.xs-text-selection > i:nth-child(2) { left: 50%; top: 0; }
.xs-text-selection > i:nth-child(3) { left: 100%; top: 0; }
.xs-text-selection > i:nth-child(4) { left: 100%; top: 50%; }
.xs-text-selection > i:nth-child(5) { left: 100%; top: 100%; }
.xs-text-selection > i:nth-child(6) { left: 50%; top: 100%; }
.xs-text-selection > i:nth-child(7) { left: 0; top: 100%; }
.xs-text-selection > i:nth-child(8) { left: 0; top: 50%; }
@media (prefers-reduced-motion: reduce) {
  .xs-text-selection { transition: none; }
}
@media (forced-colors: active) {
  .xs-text-selection { color: Highlight; box-shadow: none; }
  .xs-text-selection > i { background: Canvas; }
}
@media print { .xs-text-selection { display: none; } }

/* Cellar door: a small native vector inside a 44px focus/touch target. */
html[data-theme] body .qe-cellar-door {
  position: fixed !important;
  right: max(12px, calc(env(safe-area-inset-right) + 8px));
  bottom: max(8px, calc(env(safe-area-inset-bottom) + 4px));
  left: auto;
  top: auto;
  z-index: 880;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #d5d3cb;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  visibility: hidden;
}
html[data-theme] body .qe-cellar-door[data-ready] { visibility: visible; }
html[data-theme] body .qe-cellar-door:focus-visible { outline: 1px solid #508dff; outline-offset: 2px; }
.qe-cellar-door > svg { display: block; width: 25px; height: 33px; overflow: visible; filter: drop-shadow(0 1px 1px #0009); }
.qe-cellar-door .qe-cellar-frame { fill: #111313; stroke: currentColor; stroke-width: 1.15; }
.qe-cellar-door .qe-cellar-leaf { transform-origin: 6px 20px; transition: transform 220ms ease; }
.qe-cellar-door .qe-cellar-panel { fill: #525650; stroke: currentColor; stroke-width: .85; }
.qe-cellar-door .qe-cellar-detail { fill: none; stroke: #d5d3cb; stroke-width: .65; opacity: .65; }
.qe-cellar-door .qe-cellar-knob { fill: #ddd8bf; stroke: #131511; stroke-width: .5; }
@media (hover: hover) and (pointer: fine) {
  .qe-cellar-door:hover .qe-cellar-leaf { transform: perspective(100px) rotateY(-24deg); }
}
.qe-cellar-door:focus-visible .qe-cellar-leaf { transform: perspective(100px) rotateY(-24deg); }
.qe-cellar-door:active .qe-cellar-leaf { transform: perspective(100px) rotateY(-30deg); }
@media (prefers-reduced-motion: reduce) {
  .qe-cellar-door .qe-cellar-leaf { transition: none; transform: none !important; }
}
@media (forced-colors: active) {
  .qe-cellar-door { color: LinkText; }
  .qe-cellar-door .qe-cellar-frame, .qe-cellar-door .qe-cellar-panel { fill: Canvas; stroke: LinkText; }
  .qe-cellar-door .qe-cellar-detail { stroke: LinkText; }
  .qe-cellar-door .qe-cellar-knob { fill: LinkText; }
}
@media print { .qe-cellar-door { display: none !important; } }
