/* ════════════════════════════════════════════════════════════════════
   Xycora interface standard (see frontend/DESIGN.md)

   Loaded LAST on every page so the shared components look and move the
   same everywhere: logo, buttons, fields, dialogs, cards, toasts. Area
   stylesheets keep their layout; anything they need to vary should use
   the tokens in variables.css rather than new literals.

   Mobile first (prompt 034): a rule with no media query is the PHONE
   rule; larger screens add to it with min-width 600, 900 and 1200 only.

   ── Phone primitives, shared by every area ──────────────────────────
   (rules under "Phone primitives" near the end of this file; the helper
   is scripts/shared/xy-sheet.js, loaded by workspace.html)

   .xy-sheet       A bottom sheet on a phone, a centred card from 600 px.
                   Markup (start it with the hidden attribute):
                     <div class="xy-sheet" id="my-sheet" hidden aria-labelledby="my-sheet-t">
                       <div class="xy-sheet__scrim" data-sheet-close></div>
                       <div class="xy-sheet__panel">
                         <div class="xy-sheet__head">
                           <h2 class="xy-sheet__title" id="my-sheet-t">Filter</h2>
                           <button type="button" class="xy-sheet__close" data-sheet-close aria-label="Close"></button>
                         </div>
                         <div class="xy-sheet__body"> … </div>
                         <div class="xy-sheet__foot"> buttons (optional) </div>
                       </div>
                     </div>
                   Open:  xySheet.open('my-sheet', { opener: btn, onClose: fn })
                          or a button with data-sheet-open="my-sheet".
                   Close: xySheet.close('my-sheet'), any [data-sheet-close]
                          inside it, Escape, or a swipe down on the head.
                   A "…" menu in one call (built, opened, removed on close):
                     xySheet.menu({ title: 'Matter', opener: btn, items: [
                       { label: 'Ask Theo', icon: '<svg…>', onSelect: fn },
                       { label: 'Delete', danger: true, onSelect: fn } ] })
                   Modifiers: --full (a dialog: full height on a phone),
                   --wide (a 640 px card from 600 px). Rows inside a sheet:
                   .xy-sheet__list > button.xy-sheet__item (52 px).
                   While one is open, html carries .xy-sheet-lock.
                   Layer: z-index 1300 (system dialogs sit at 1400).
   .xy-tabs        One row of .xy-tab that scrolls sideways on a phone, with
                   a soft fade at the cut edge and the active tab scrolled
                   into view (automatic; after re-rendering a bar you may call
                   xyTabs.refresh(container)). Never wraps. Still from 900 px.
   .xy-list/.xy-row One tappable row per item, 56 to 72 px: .xy-row__lead
                   (optional icon; add .xy-row--lead), .xy-row__main >
                   .xy-row__title (two lines at most) + .xy-row__meta (one
                   line), .xy-row__status on the right. A <button> or <a>.
   .xy-toolbar     A search field and one .xy-filter-btn ("Filter", 44 px,
                   optional .xy-filter-btn__count) that opens a sheet.
   .xy-icon-btn    A 44 × 44 icon button, e.g. the "…" of a page header.
   .xy-loading     The one loading look (prompt 035): rows of shimmering
                   bars on hairlines, like the matters list. Fill a box with
                   it: xyLoading(el, 'Loading matters', { rows: 5 }); or
                   build markup: xyLoading.html('Loading matters', 3). It sets
                   aria-busy on the box and reads the label to screen readers;
                   your render replaces it (remove aria-busy when you do, or
                   call xyLoading.done(el)). .xy-loading--compact for small
                   boxes (one column, 12 px rows).
   ════════════════════════════════════════════════════════════════════ */

/* ── Global ─────────────────────────────────────────────────────────── */
html { text-rendering: optimizeLegibility; }

::selection { background: #DAF6EF; color: #0A2536; }
:root[data-theme="dark"] ::selection { background: rgba(111, 203, 186, 0.35); color: #F3FAFF; }

/* A theme switch is instant: nothing eases between the two palettes while
   theme-boot.js flips them (prompt 035). */
html.xy-theme-flip *,
html.xy-theme-flip *::before,
html.xy-theme-flip *::after { transition: none !important; }

* { scrollbar-width: thin; scrollbar-color: rgba(10, 37, 54, 0.22) transparent; }
:root[data-theme="dark"] * { scrollbar-color: rgba(243, 250, 255, 0.2) transparent; }

input[type="checkbox"], input[type="radio"], input[type="range"], progress {
  accent-color: var(--btn-primary-bg);
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* ── Logo: the X mark plus the wordmark ─────────────────────────────── */
.xy-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-navy);
  text-decoration: none;
  line-height: 1;
}
.xy-logo:hover { color: inherit; }
.xy-logo__mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.xy-logo__word {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: currentColor;
  /* the tracking adds space after the last letter; pull it back */
  margin-right: -0.34em;
}
/* On Obsidian the mark's navy half disappears, so on dark grounds it sits on
   a small ivory tile. The mark itself is never recoloured. */
.xy-logo__tile {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #FBF9F4;
  flex-shrink: 0;
}
.xy-logo__tile .xy-logo__mark { width: 20px; height: 20px; }
.xy-logo--sm .xy-logo__mark { width: 22px; height: 22px; }
.xy-logo--sm .xy-logo__word { font-size: 13px; }
.xy-logo--lg .xy-logo__mark { width: 36px; height: 36px; }
.xy-logo--lg .xy-logo__word { font-size: 18px; }
.xy-logo--inverse { color: #F3FAFF; }
.xy-logo--stacked { flex-direction: column; gap: 12px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
/* One motion for every button on every screen, including the ones that
   don't use .btn: colour eases on hover, the button settles 1 px when
   pressed. No lift and no drop shadow (Counsel is calm). Individual
   transform properties so the press never fights a component's own
   transform. */
:where(button, .btn, a.btn, [role="button"], input[type="submit"], input[type="button"]) {
  transition-property: background-color, border-color, color, box-shadow, opacity, translate;
  transition-duration: var(--dur);
  transition-timing-function: var(--ease-out);
}
:where(button, .btn, [role="button"]):not(:disabled):not([aria-disabled="true"]):active {
  translate: 0 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--ctl-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.003em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transform: none;
  box-shadow: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { transform: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--border-focus), var(--ring); }

.btn--primary,
.btn--gold {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}
.btn--primary:hover,
.btn--gold:hover {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
  color: var(--btn-primary-fg);
}
.btn--primary:active,
.btn--gold:active {
  background: var(--btn-primary-bg-press);
  border-color: var(--btn-primary-bg-press);
}

.btn--secondary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-control);
}
.btn--secondary:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.btn--secondary:active { background: var(--surface-recessed); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--surface-recessed);
  color: var(--text-primary);
  border-color: transparent;
}

.btn--danger {
  background: var(--status-danger);
  color: #FFFFFF;
  border-color: var(--status-danger);
  padding: 0 18px;
}
.btn--danger:hover {
  background: #842222;
  border-color: #842222;
  color: #FFFFFF;
}
:root[data-theme="dark"] .btn--danger { background: #B23A35; border-color: #B23A35; }
:root[data-theme="dark"] .btn--danger:hover { background: #C4473F; border-color: #C4473F; }

/* Link-style action: text with a hairline underline */
.btn--link {
  height: auto;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: none;
  color: var(--text-primary);
}

/* On dark bands (website) */
.btn--primary-on-dark {
  background: #FBF9F4;
  color: #0A2536;
  border-color: #FBF9F4;
}
.btn--primary-on-dark:hover {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0A2536;
  filter: none;
}
.btn--secondary-on-dark {
  background: transparent;
  color: #F3FAFF;
  border-color: rgba(243, 250, 255, 0.35);
}
.btn--secondary-on-dark:hover {
  background: rgba(243, 250, 255, 0.08);
  border-color: rgba(243, 250, 255, 0.6);
  color: #FFFFFF;
}

.btn--small,
.btn.btn--small,
.btn.btn--sm { height: var(--ctl-h-sm); padding: 0 12px; font-size: 13px; gap: 6px; }
.btn--lg,
.btn.btn--lg { height: var(--ctl-h-lg); padding: 0 24px; font-size: 15px; }
.btn--full, .btn--block { width: 100%; }
.btn.btn--icon { width: var(--ctl-h); height: var(--ctl-h); padding: 0; border-radius: var(--r-md); }

.btn:disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  translate: none;
  box-shadow: none;
}

.btn.btn--loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.btn--loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: xy-spin 0.7s linear infinite;
}
.btn--secondary.btn--loading::after,
.btn--ghost.btn--loading::after {
  border-color: rgba(10, 37, 54, 0.18);
  border-top-color: #0A2536;
}
@keyframes xy-spin { to { transform: rotate(360deg); } }

/* Workspace, admin and portal run a denser scale from 900 px; on a phone
   every button is a 44 px target (40 px for a small one) */
.ws-body .btn { height: 44px; padding: 0 16px; font-size: 14px; border-radius: var(--r-md); }
.ws-body .btn--small,
.ws-body .btn.btn--small,
.ws-body .btn.btn--sm { height: 40px; padding: 0 12px; font-size: 13px; }
.ws-body .btn--lg,
.ws-body .btn.btn--lg { height: 48px; padding: 0 20px; font-size: 15px; }
.ws-body .btn.btn--icon { width: 44px; height: 44px; padding: 0; }
@media (min-width: 900px) {
  /* Desktop: the denser scale of before prompt 034 */
  .ws-body .btn { height: 36px; padding: 0 14px; font-size: 13px; }
  .ws-body .btn--small,
  .ws-body .btn.btn--small,
  .ws-body .btn.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
  .ws-body .btn--lg,
  .ws-body .btn.btn--lg { height: 44px; font-size: 14px; }
  /* After the small size, so a small icon-only button keeps no padding */
  .ws-body .btn.btn--icon { width: 36px; height: 36px; padding: 0; }
}

/* ── Fields ─────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0;
  text-transform: none;
}
.form-label .optional,
.form-label .form-optional { font-weight: 400; color: var(--text-muted); margin-left: 4px; }

.form-hint { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-top: 0; }
.form-error { font-size: 13px; color: var(--status-danger); line-height: 1.5; margin-top: 0; }
@media (min-width: 900px) {
  .form-hint, .form-error { font-size: 12.5px; }
}

/* Unclassed fields get the standard look at zero specificity, so any
   component that styles its own field still wins. */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]),
       select, textarea) {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--surface-input);
  border: 1px solid var(--border-control);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]),
       select, textarea):hover {
  border-color: var(--border-control-hover);
}
:where(input, select, textarea):focus-visible,
:where(input, select, textarea):focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring);
}
:where(input, select, textarea):disabled {
  background-color: var(--surface-recessed);
  color: var(--text-muted);
  cursor: not-allowed;
}
:where(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--status-danger);
}
:where(input, select, textarea)[aria-invalid="true"]:focus { box-shadow: var(--ring-danger); }

.form-input,
.form-select {
  width: 100%;
  height: var(--ctl-h);
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--surface-input);
  border: 1px solid var(--border-control);
  border-radius: var(--r-md);
  box-shadow: none;
}
textarea.form-input {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}
.form-input:hover,
.form-select:hover { border-color: var(--border-control-hover); }
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring);
}

/* Select chevron, drawn once for every select */
.form-select,
:where(select:not([multiple]):not([size])) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F7383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] :where(select:not([multiple]):not([size])) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B3C7D4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* On a phone fields are 44 px and 16 px (an iPhone zooms into anything
   smaller); the denser scale from 900 px */
.ws-body .form-input,
.ws-body .form-select { height: 44px; padding: 0 12px; font-size: 16px; border-radius: var(--r-md); }
.ws-body .form-select { padding-right: 34px; }
.ws-body textarea.form-input { height: auto; min-height: 88px; padding: 10px 12px; }
.ws-body .form-label { font-size: 13px; }
@media (min-width: 900px) {
  .ws-body .form-input,
  .ws-body .form-select { height: 36px; font-size: 13.5px; }
  .ws-body textarea.form-input { padding: 9px 12px; }
  .ws-body .form-label { font-size: 12.5px; }
}

/* ── Dialogs ────────────────────────────────────────────────────────── */
/* Every overlay family shares one backdrop and one entrance. */
.modal-overlay,
.ws-modal-overlay,
.ds-modal-scrim,
.ws-search-palette-overlay,
.ws-client-wizard-overlay,
.xyb-overlay {
  background: var(--surface-overlay);
  -webkit-backdrop-filter: blur(6px) saturate(115%);
  backdrop-filter: blur(6px) saturate(115%);
  animation: xy-fade-in var(--dur) var(--ease-out);
}
:root[data-theme="dark"] .modal-overlay,
:root[data-theme="dark"] .ws-modal-overlay,
:root[data-theme="dark"] .ds-modal-scrim { background: rgba(2, 12, 18, 0.66); }

dialog::backdrop {
  background: rgba(10, 37, 54, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal,
.ws-modal,
.ds-modal,
dialog {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  animation: xy-dialog-in var(--dur-slow) var(--ease-out);
}
dialog[open] { animation: xy-dialog-in var(--dur-slow) var(--ease-out); }

@keyframes xy-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes xy-dialog-in {
  from { opacity: 0; translate: 0 8px; scale: 0.985; }
  to   { opacity: 1; translate: 0 0;   scale: 1; }
}

/* Light header: the dark chrome belongs to the sidebar and top bar only */
.modal__header,
.ws-body .modal__header {
  background: var(--surface-elevated);
  color: var(--text-primary);
  padding: 22px 60px 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal__header--danger,
.modal__header--gold { background: var(--surface-elevated); }
.modal__title,
.ws-body .modal__title,
.ws-modal__title,
.ds-modal__title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}
.modal__header--danger .modal__title { color: var(--status-danger); }
.modal__subtitle,
.ws-body .modal__subtitle {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 4px 0 0;
}
.modal__body,
.ws-body .modal__body { padding: 24px; }
.modal__footer,
.ws-body .modal__footer,
.ws-modal__footer,
.ds-modal__foot {
  padding: 16px 24px;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-recessed);
}
.ws-modal__header,
.ds-modal__head {
  padding: 20px 24px 16px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.ws-modal__body,
.ds-modal__body { padding: 24px; }

/* One close button for every dialog and drawer: a 32 px quiet square
   with a drawn X, whatever glyph the markup carries. */
.modal__close,
.ws-body .modal__close,
.ws-modal__close,
.ws-cal-modal__close,
.dialog__close,
.result-panel__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}
.modal__close > *,
.ws-modal__close > *,
.ws-cal-modal__close > *,
.dialog__close > *,
.result-panel__close > * { display: none; }
.modal__close::before,
.ws-modal__close::before,
.ws-cal-modal__close::before,
.dialog__close::before,
.result-panel__close::before {
  content: '';
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.modal__close:hover,
.ws-modal__close:hover,
.ws-cal-modal__close:hover,
.dialog__close:hover,
.result-panel__close:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
/* A 44 px target on a phone, the quiet 32 px square from 900 px */
.modal__close,
.ws-body .modal__close,
.ws-modal__close,
.ws-cal-modal__close,
.dialog__close,
.result-panel__close { width: 44px; height: 44px; top: 8px; right: 8px; }
@media (min-width: 900px) {
  .modal__close,
  .ws-body .modal__close,
  .ws-modal__close,
  .ws-cal-modal__close,
  .dialog__close,
  .result-panel__close { width: 32px; height: 32px; top: 16px; right: 16px; }
}

/* System dialogs on a phone: a sheet from the bottom, as tall as it needs
   up to the whole screen, its footer kept in reach; a centred card from 600 */
.modal-overlay { align-items: flex-end; padding: 0; }
.modal-overlay > .modal {
  max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-radius: 20px 20px 0 0;
  animation: xy-sheet-up var(--dur-slow) var(--ease-out);
}
@keyframes xy-sheet-up { from { opacity: 0; translate: 0 32px; } to { opacity: 1; translate: 0 0; } }
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .modal-overlay > .modal {
    max-height: 90vh;
    padding-bottom: 0;
    border-radius: var(--r-xl);
    animation: xy-dialog-in var(--dur-slow) var(--ease-out);
  }
}
.ws-modal__close,
.ws-cal-modal__close,
.result-panel__close { position: static; }

/* Slide-over result panel: light header like the dialogs */
.result-panel__header {
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 24px;
}
.result-panel__title { color: var(--text-primary); font-size: 17px; }
.result-panel__meta { color: var(--text-muted); }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.card:hover { transform: none; box-shadow: var(--shadow-xs); border-color: var(--border-subtle); }
a.card:hover,
.card--hoverable:hover {
  transform: none;
  border-color: var(--border-control-hover);
  background: var(--surface-hover);
}
a.card, .card--hoverable {
  transition: translate var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

/* ── Toasts ─────────────────────────────────────────────────────────── */
.toast {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--text-secondary);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  animation: xy-toast-in var(--dur-slow) var(--ease-out);
}
.toast--success { border-left-color: var(--status-success); background: var(--surface-elevated); color: var(--text-primary); }
.toast--error   { border-left-color: var(--status-danger);  background: var(--surface-elevated); color: var(--text-primary); }
.toast--warning { border-left-color: var(--status-warning); background: var(--surface-elevated); color: var(--text-primary); }
.toast--info    { border-left-color: var(--status-info);    background: var(--surface-elevated); color: var(--text-primary); }
@keyframes xy-toast-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* ── Chips ──────────────────────────────────────────────────────────── */
.xy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background: var(--surface-recessed);
  color: var(--text-secondary);
}
.xy-chip--success { background: var(--status-success-soft); color: var(--status-success); }
.xy-chip--warning { background: var(--status-warning-soft); color: var(--status-warning); }
.xy-chip--danger  { background: var(--status-danger-soft);  color: var(--status-danger); }
.xy-chip--info    { background: var(--status-info-soft);    color: var(--status-info); }
@media (min-width: 900px) {
  .xy-chip { height: 22px; font-size: 12px; }
}

/* ── Empty states ───────────────────────────────────────────────────── */
.xy-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.xy-empty__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--surface-recessed);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.xy-empty__title { font-family: var(--font-sans); font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0; }
.xy-empty__text { font-size: 13.5px; line-height: 1.55; max-width: 360px; margin: 0; }
.xy-empty .btn { margin-top: 12px; }

/* ── Counsel patterns (DESIGN.md) ────────────────────────────────────── */
/* Headings: Newsreader for titles and figures at 17 px and above, Inter for
   anything smaller. Bare h1/h2 get the serif; h3 and below stay Inter so a
   small section label never renders in a light serif. */
h1, h2 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; }
h3, h4, h5, h6 { font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }

/* Small-caps eyebrow above a title */
.xy-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Page header: eyebrow, serif title, one line of description, actions right */
.xy-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.xy-page-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--text-primary);
  margin: 6px 0 0;
}
.xy-page-sub { font-size: 14px; line-height: 1.55; color: var(--text-muted); margin: 6px 0 0; }

/* Sheet (card) header title */
.xy-sheet-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}

/* Figures: tabular numbers for money, dates, counts */
.xy-num { font-variant-numeric: tabular-nums lining-nums; }

/* Status as a dot plus a word */
.xy-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
.xy-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
.xy-dot--ready::before   { background: var(--dot-ready); }
.xy-dot--reading::before { background: var(--dot-reading); }
.xy-dot--failed::before  { background: var(--dot-failed); }
.xy-dot--failed          { color: var(--status-danger); }
.xy-dot--closed::before  { background: var(--text-faint); }
.xy-dot--closed          { color: var(--text-muted); }

/* AI-prepared content awaiting a lawyer's review: the one use of mint */
.xy-ai {
  background: var(--ai-surface);
  border: 1px solid var(--ai-border);
  border-radius: var(--r-lg);
}
.xy-ai__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ai-text);
}
.xy-ai__badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--ai-border);
  border-radius: var(--r-sm);
  background: var(--surface-elevated);
  font-size: 13px;
  font-weight: 500;
  color: var(--ai-text);
}
@media (min-width: 900px) {
  .xy-ai__badge { font-size: 12.5px; }
}

/* Tabs: text with a 2 px ink underline on the active one. On a phone the
   row scrolls sideways (never wraps, never cuts a word) with a soft fade on
   the cut edge; xy-sheet.js sets .is-fade-start / .is-fade-end and keeps the
   active tab in view. From 900 px the row sits still as it always has. */
.xy-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.xy-tabs::-webkit-scrollbar { display: none; }
.xy-tabs.is-fade-end {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 40px);
  mask-image: linear-gradient(to left, transparent 0, #000 40px);
}
.xy-tabs.is-fade-start {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px);
  mask-image: linear-gradient(to right, transparent 0, #000 40px);
}
.xy-tabs.is-fade-start.is-fade-end {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.xy-tab {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 12px 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
}
.xy-tab:hover { color: var(--text-primary); }
.xy-tab[aria-selected="true"],
.xy-tab.is-active { color: var(--text-primary); }
.xy-tab[aria-selected="true"]::after,
.xy-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--text-primary);
}
@media (min-width: 900px) {
  .xy-tab__count { font-size: 12px; }
  .xy-tabs,
  .xy-tabs.is-fade-start,
  .xy-tabs.is-fade-end,
  .xy-tabs.is-fade-start.is-fade-end { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .xy-tab { flex: 0 1 auto; min-height: 0; white-space: normal; }
  .xy-tab[aria-selected="true"]::after,
  .xy-tab.is-active::after { bottom: -1px; }
}
.xy-tab__count { margin-left: 6px; font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* Tables: caps header on vellum, hairline rows, mint-tinted selection */
.xy-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.xy-table th {
  height: 40px;
  padding: 0 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-recessed);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.xy-table td {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.xy-table tbody tr { transition: background-color var(--dur) var(--ease-out); }
.xy-table tbody tr:hover { background: var(--surface-hover); }
.xy-table tbody tr[aria-selected="true"],
.xy-table tbody tr.is-selected { background: var(--surface-selected); box-shadow: inset 2px 0 0 var(--text-primary); }
.xy-table .xy-num, .xy-table td.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }

/* ── Dark (the default): the site's type and light ──────────────────────
   On the midnight ground the workspace reads like the site: Inter for
   headings too, ice for the small labels, the off-white primary button
   with a soft glow, sheets and dialogs rounded at 20 px. ── */
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] .xy-page-title,
:root[data-theme="dark"] .xy-sheet-title,
:root[data-theme="dark"] .modal__title,
:root[data-theme="dark"] .ws-body .modal__title,
:root[data-theme="dark"] .ws-modal__title,
:root[data-theme="dark"] .ds-modal__title {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}
:root[data-theme="dark"] .xy-page-title { font-size: 28px; }
/* Page titles stay in the editorial serif in both themes (prompt 038): this
   outranks the dark theme's sans for h1 and h2 above. */
:root[data-theme] :is(.xy-page-title, .ws-dash-head__title, .ml-title, .mp-title, .cl-title,
  .vx-title, .vw-title, .dsx-title, .dsx-rtitle, .ds-title, .st-title),
:root :is(.ws-dash-head__title, .ml-title, .mp-title, .cl-title, .vx-title, .vw-title,
  .dsx-title, .dsx-rtitle, .ds-title, .st-title) {
  font-family: var(--font-title);
  font-weight: 450;
  letter-spacing: -0.012em;
}
:root[data-theme="dark"] .xy-eyebrow { color: var(--ice); }
:root[data-theme="dark"] .btn--primary,
:root[data-theme="dark"] .btn--gold {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 24px -12px rgba(238, 241, 240, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
}
:root[data-theme="dark"] .btn--secondary {
  background: var(--surface-input);
  box-shadow: inset 0 1px 0 var(--border-strong);
}
:root[data-theme="dark"] .btn--secondary:hover { border-color: var(--border-control-hover); background: var(--surface-hover); }
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .xy-ai { box-shadow: var(--shadow-md); }
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .ws-modal,
:root[data-theme="dark"] .ds-modal,
:root[data-theme="dark"] dialog { border-color: var(--border-strong); }
:root[data-theme="dark"] .modal__footer,
:root[data-theme="dark"] .ws-body .modal__footer,
:root[data-theme="dark"] .ws-modal__footer,
:root[data-theme="dark"] .ds-modal__foot { background: rgba(255, 255, 255, 0.02); }
:root[data-theme="dark"] .xy-table th { background: rgba(255, 255, 255, 0.02); }

/* ── Phone primitives (prompt 034; described at the top of this file) ──── */

/* The sheet: rises from the bottom on a phone, a centred card from 600 px */
html.xy-sheet-lock,
html.xy-sheet-lock body,
html.xy-sheet-lock .sb-content { overflow: hidden; }
.xy-sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.xy-sheet__scrim {
  position: absolute;
  inset: 0;
  background: var(--surface-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}
:root[data-theme="dark"] .xy-sheet__scrim { background: rgba(2, 7, 12, 0.66); }
.xy-sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-xl);
  color: var(--text-primary);
  outline: none;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}
:root[data-theme="dark"] .xy-sheet__panel { background: linear-gradient(180deg, #121D2A 0%, #0D1621 100%); }
/* the grab handle */
.xy-sheet__panel::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 2px;
  background: var(--border-strong);
}
.xy-sheet.is-open .xy-sheet__scrim { opacity: 1; }
.xy-sheet.is-open .xy-sheet__panel { transform: none; }
.xy-sheet.is-dragging .xy-sheet__panel { transition: none; }
.xy-sheet__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 12px 8px 4px 20px;
  border-bottom: 1px solid var(--border-subtle);
  touch-action: none;
}
.xy-sheet__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
}
.xy-sheet__sub { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.xy-sheet__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.xy-sheet__close:empty::before {
  content: '';
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.xy-sheet__close:hover { background: var(--surface-hover); color: var(--text-primary); }
.xy-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 20px 20px;
  font-size: 15px;
  line-height: 1.55;
}
.xy-sheet__foot {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
}
.xy-sheet__foot > .btn { flex: 1; height: 48px; font-size: 15px; }
/* A dialog: the whole screen on a phone */
.xy-sheet--full .xy-sheet__panel {
  height: 100dvh;
  max-height: none;
  padding-top: env(safe-area-inset-top, 0px);
  border: 0;
  border-radius: 0;
}
.xy-sheet--full .xy-sheet__panel::before { display: none; }
.xy-sheet--full .xy-sheet__head { padding-top: 4px; }
/* Menu rows inside a sheet */
.xy-sheet__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.xy-sheet--menu .xy-sheet__body { padding: 8px 12px 12px; }
.xy-sheet__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.xy-sheet__item svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-muted); }
.xy-sheet__item:hover,
.xy-sheet__item:focus-visible { background: var(--surface-hover); outline: none; }
.xy-sheet__item:active { translate: none; background: var(--surface-hover); }
.xy-sheet__item--danger,
.xy-sheet__item--danger svg { color: var(--status-danger); }
.xy-sheet__item[aria-checked="true"]::after {
  content: '';
  margin-left: auto;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.xy-sheet__sep { height: 1px; margin: 6px 12px; background: var(--border-subtle); }

/* List rows: one tappable row per item */
.xy-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.xy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.xy-list > :last-child .xy-row,
.xy-list > .xy-row:last-child { border-bottom: 0; }
.xy-row:hover { background: var(--surface-hover); color: var(--text-primary); }
.xy-row:active { translate: none; background: var(--surface-hover); }
.xy-row--lead { grid-template-columns: 40px minmax(0, 1fr) auto; }
.xy-row__lead {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-recessed);
  color: var(--text-secondary);
}
.xy-row__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xy-row__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}
.xy-row__meta {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.xy-row__status { justify-self: end; font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* Search and one Filter button */
.xy-toolbar { display: flex; align-items: center; gap: 8px; }
.xy-toolbar > input,
.xy-toolbar > .xy-toolbar__search { flex: 1; min-width: 0; height: 44px; padding: 0 14px; font-size: 16px; border-radius: 12px; }
.xy-filter-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-control);
  border-radius: 12px;
  background: var(--surface-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.xy-filter-btn:hover { border-color: var(--border-control-hover); }
.xy-filter-btn svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--text-muted); }
.xy-filter-btn__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.xy-filter-btn__count:empty { display: none; }

/* A 44 px icon button */
.xy-icon-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-control);
  border-radius: 12px;
  background: var(--surface-input);
  color: var(--text-secondary);
  cursor: pointer;
}
.xy-icon-btn:hover,
.xy-icon-btn[aria-expanded="true"] { border-color: var(--border-control-hover); color: var(--text-primary); }
.xy-icon-btn--quiet { border-color: transparent; background: transparent; }

@media (min-width: 600px) {
  .xy-sheet { align-items: center; justify-content: center; padding: 24px; }
  .xy-sheet__panel,
  .xy-sheet--full .xy-sheet__panel {
    width: min(480px, 100%);
    height: auto;
    max-height: min(720px, calc(100dvh - 48px));
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out);
  }
  .xy-sheet--wide .xy-sheet__panel { width: min(640px, 100%); }
  .xy-sheet.is-open .xy-sheet__panel { opacity: 1; transform: none; }
  .xy-sheet__panel::before { display: none; }
  .xy-sheet__head { padding: 8px 10px 8px 24px; }
  .xy-sheet__body { padding: 16px 24px 24px; }
  .xy-sheet__foot { justify-content: flex-end; padding: 14px 24px; }
  .xy-sheet__foot > .btn { flex: 0 0 auto; height: 40px; font-size: 14px; }
}

/* The one loading look: shimmering bars on hairline rows (prompt 035) */
.xy-loading { padding: 8px 0; }
.xy-loading__row {
  display: grid;
  grid-template-columns: minmax(64px, 120px) minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.xy-loading__row:last-of-type { border-bottom: 0; }
.xy-loading__bar {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border-subtle) 25%, #F3FAFF 50%, var(--border-subtle) 75%);
  background-size: 200% 100%;
  animation: xy-shimmer 1.4s infinite;
}
.xy-loading__bar--sm { width: 40%; min-width: 48px; }
.xy-loading__bar--md { width: 65%; }
.xy-loading__bar--lg { width: 90%; }
.xy-loading__label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.xy-loading--compact { padding: 4px 0; }
.xy-loading--compact .xy-loading__row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; }
@keyframes xy-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .xy-sheet__scrim, .xy-sheet__panel { transition: none !important; }
  .xy-loading__bar { animation: none; }
  *, *::before, *::after {
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .modal, .ws-modal, .ds-modal, dialog, dialog[open], .toast,
  .modal-overlay, .ws-modal-overlay, .ds-modal-scrim { animation: none; }
  :where(button, .btn, [role="button"]):active { translate: none; }
  a.card:hover, .card--hoverable:hover { translate: none; }
}
