/* Surety 2.3.0 — Display, design, UI and UX refinement (851–1050)
   This layer intentionally consolidates shared presentation rules. It does not
   replace route-specific controllers or add duplicate workflow behavior. */

:root {
  --ux230-gutter:clamp(16px,2.15vw,36px);
  --ux230-section-gap:clamp(22px,2.4vw,38px);
  --ux230-grid-gap:clamp(12px,1.35vw,22px);
  --ux230-panel-pad:clamp(16px,1.65vw,26px);
  --ux230-control-h:44px;
  --ux230-nav-row:46px;
  --ux230-radius-sm:9px;
  --ux230-radius-md:13px;
  --ux230-radius-lg:18px;
  --ux230-radius-xl:24px;
  --ux230-border-subtle:color-mix(in srgb,var(--line) 74%,transparent);
  --ux230-border-strong:color-mix(in srgb,var(--text) 22%,var(--line));
  --ux230-shadow-float:0 20px 55px rgba(18,24,44,.14),0 3px 12px rgba(18,24,44,.08);
  --ux230-status-ownership:#7c3aed;
  --ux230-status-evidence:#0284c7;
  --ux230-status-validation:#059669;
  --ux230-status-payment:#2563eb;
  --ux230-status-market:#c2410c;
  --ux230-status-security:#b42318;
}

/* 851–870: visual hierarchy, semantic identity and trust presentation */
body.ux230-ready {
  --panel-border:var(--ux230-border-subtle);
  text-rendering:optimizeLegibility;
  font-kerning:normal;
}
body.ux230-ready :where(.panel,.card,.admin-section,.case-card,.market-card,.billing-plan-card,.record-card) {
  border-color:var(--ux230-border-subtle);
}
body.ux230-ready :where(.panel,.card,.admin-section,.case-card,.market-card,.billing-plan-card,.record-card)[data-interactive="true"],
body.ux230-ready :where(a.panel,a.card,a.market-card) {
  transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
body.ux230-ready :where(.panel,.card,.admin-section,.case-card,.market-card,.billing-plan-card,.record-card)[data-interactive="true"]:hover,
body.ux230-ready :where(a.panel,a.card,a.market-card):hover {
  border-color:color-mix(in srgb,var(--primary) 28%,var(--line));
  box-shadow:0 10px 28px rgba(24,30,52,.09);
  transform:none;
}
body.ux230-ready :where(.panel,.card,.admin-section,.case-card,.record-card):not(a):not(button):not([data-interactive="true"]):hover { transform:none; }
body.ux230-ready :where(.status-badge,.case-status,.billing-status,.market-status-pill,.trust-badge,[data-status]) {
  min-height:28px;
  max-width:100%;
  padding:5px 9px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid color-mix(in srgb,currentColor 20%,transparent);
  border-radius:999px;
  line-height:1.15;
  font-size:.72rem;
  font-weight:780;
  letter-spacing:.005em;
  white-space:nowrap;
}
body.ux230-ready [data-ux220-state="verified"],body.ux230-ready [data-ux230-state="verified"] { color:var(--green); background:var(--green-soft); }
body.ux230-ready [data-ux220-state="provisional"],body.ux230-ready [data-ux230-state="pending"] { color:var(--amber-strong,var(--amber)); background:var(--amber-soft); }
body.ux230-ready [data-ux220-state="disputed"],body.ux230-ready [data-ux230-state="blocked"] { color:var(--red); background:var(--red-soft); }
body.ux230-ready [data-ux220-state="revoked"],body.ux230-ready [data-ux230-state="failed"] { color:var(--red); background:var(--red-soft); text-decoration:none; }
body.ux230-ready .ux230-trust-summary {
  min-width:0;
  padding:14px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:11px;
  align-items:start;
  border:1px solid var(--ux230-border-subtle);
  border-radius:var(--ux230-radius-md);
  background:linear-gradient(135deg,color-mix(in srgb,var(--green-soft) 60%,var(--surface)),var(--surface));
}
body.ux230-ready .ux230-trust-summary > i { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:var(--green); background:color-mix(in srgb,var(--green-soft) 78%,var(--surface)); }
body.ux230-ready .ux230-trust-summary :where(strong,p,small) { margin:0; }
body.ux230-ready .ux230-trust-summary p { margin-top:3px; color:var(--muted); }
body.ux230-ready [data-record-source="verified"] { --ux230-record-accent:var(--ux230-status-validation); }
body.ux230-ready [data-record-source="submitted"] { --ux230-record-accent:var(--ux230-status-evidence); }
body.ux230-ready [data-record-source] { border-left:3px solid var(--ux230-record-accent,var(--line-strong)); }
body.ux230-ready .ux230-provenance-line { position:relative; padding-left:24px; }
body.ux230-ready .ux230-provenance-line::before { content:""; position:absolute; inset:5px auto 5px 8px; width:2px; border-radius:2px; background:linear-gradient(var(--ux230-status-evidence),var(--ux230-status-validation)); opacity:.55; }

/* 871–890: shell and navigation consistency. Full-width rows resolve the
   reported blank space below/around menu items across expanded and mobile modes. */
body.ux230-ready .sidebar {
  display:flex;
  flex-direction:column;
  min-width:0;
}
body.ux230-ready .primary-nav {
  width:100%;
  min-width:0;
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:3px;
  padding:2px 2px 16px;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
}
body.ux230-ready .primary-nav > * { flex:0 0 auto; }
body.ux230-ready .nav-label {
  width:100%;
  min-width:0;
  margin:8px 0 0;
  padding:12px 12px 6px!important;
  line-height:1.1;
}
body.ux230-ready .nav-link {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:var(--ux230-nav-row);
  height:auto;
  margin:0;
  padding:9px 12px;
  flex:0 0 auto;
  display:grid;
  grid-template-columns:20px minmax(0,1fr) auto;
  align-items:center;
  align-content:center;
  column-gap:11px;
  row-gap:0;
  border-radius:11px;
  line-height:1.2;
}
body.ux230-ready .nav-link > i:first-child { width:20px; min-width:20px; margin:0; text-align:center; line-height:1; }
body.ux230-ready .nav-link > span:not(.nav-count):not(.nav-active-dot) {
  min-width:0;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.ux230-ready .nav-link .nav-count { justify-self:end; }
body.ux230-ready .nav-link .nav-active-dot { position:absolute; right:8px; }
body.ux230-ready .sidebar-bottom { width:100%; min-width:0; flex:0 0 auto; }
body.ux230-ready .profile-chip { width:100%; min-width:0; }
body.ux230-ready .profile-chip > span:nth-child(2) { min-width:0; }
body.ux230-ready .profile-chip :where(strong,small) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.ux230-ready .ux230-nav-scroll-cue { position:sticky; bottom:0; height:18px; margin-top:-18px; pointer-events:none; background:linear-gradient(transparent,var(--surface)); opacity:0; transition:opacity .16s ease; }
body.ux230-ready .primary-nav[data-scrollable="true"] + .ux230-nav-scroll-cue { opacity:1; }
body.sidebar-collapsed.ux230-ready .sidebar .nav-link {
  width:46px;
  min-width:46px;
  height:46px;
  min-height:46px;
  margin-inline:auto;
  padding:0;
  display:grid;
  grid-template-columns:1fr;
  place-items:center;
}
body.sidebar-collapsed.ux230-ready .sidebar .nav-link > span:not(.nav-count):not(.nav-active-dot) { display:none; }
body.sidebar-collapsed.ux230-ready .sidebar .nav-label { height:12px; margin:4px 0; padding:0!important; overflow:hidden; color:transparent; }

/* 891–910: page headers, breadcrumbs and section architecture */
body.ux230-ready :where(.page-heading,.workspace-hero,.panel-hero,.admin-heading,.case-heading) {
  container-type:inline-size;
  gap:var(--ux230-grid-gap);
  padding:clamp(18px,2vw,30px);
}
body.ux230-ready [data-ux230-header="compact"] { padding-block:16px; min-height:0; }
body.ux230-ready [data-ux230-header="expanded"] { padding-block:clamp(24px,3.2vw,46px); }
body.ux230-ready :where(.page-heading,.workspace-hero,.panel-hero,.admin-heading,.case-heading) > :first-child { min-width:0; max-width:76ch; }
body.ux230-ready :where(.page-heading,.workspace-hero,.panel-hero,.admin-heading,.case-heading) h1 { max-width:24ch; overflow-wrap:anywhere; text-wrap:balance; }
body.ux230-ready :where(.page-actions,.heading-actions) { min-width:0; align-self:flex-start; justify-content:flex-end; }
body.ux230-ready :where(.breadcrumbs,.ux-breadcrumbs) { max-width:100%; min-height:32px; align-items:center; }
body.ux230-ready :where(.breadcrumbs,.ux-breadcrumbs) a { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.ux230-ready .ux230-section-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
body.ux230-ready .ux230-section-header > :first-child { min-width:0; max-width:72ch; }
body.ux230-ready .ux230-section-header :where(h2,h3,p) { margin-top:0; }
body.ux230-ready .ux230-inset-info,
body.ux230-ready .ux230-warning-section { padding:15px 16px; border:1px solid var(--ux230-border-subtle); border-radius:var(--ux230-radius-md); background:var(--surface-soft); }
body.ux230-ready .ux230-warning-section { border-color:color-mix(in srgb,var(--amber) 30%,var(--line)); background:var(--amber-soft); }

/* 911–930: responsive grid and container-aware composition */
body.ux230-ready :where(.workspace-grid,.dashboard-grid,.admin-grid,.market-grid,.marketplace-grid,.billing-grid,.validator-grid,.card-grid,.organization-grid,.asset-grid) {
  min-width:0;
  gap:var(--ux230-grid-gap);
  align-items:start;
  container-type:inline-size;
}
body.ux230-ready :where(.workspace-grid,.dashboard-grid,.admin-grid,.billing-grid,.validator-grid,.card-grid) > * { min-width:0; }
body.ux230-ready .ux230-grid-1 { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--ux230-grid-gap); }
body.ux230-ready .ux230-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ux230-grid-gap); }
body.ux230-ready .ux230-grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--ux230-grid-gap); }
body.ux230-ready .ux230-grid-4 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--ux230-grid-gap); }
body.ux230-ready :where(.metric-grid,.workspace-stats,.admin-metric-grid,.validator-metrics,.market-metrics) {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));
}
body.ux230-ready :where(.market-grid,.marketplace-grid,.market-listing-grid) { grid-template-columns:repeat(auto-fill,minmax(min(100%,285px),1fr)); }
body.ux230-ready :where(.billing-grid,.plan-grid) { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
body.ux230-ready .panel,
body.ux230-ready .admin-section,
body.ux230-ready .case-card { padding:var(--ux230-panel-pad); }
body.ux230-ready :where(.panel .panel,.card .card,.admin-section .panel,.case-card .panel) { padding:clamp(13px,1.2vw,18px); }
body.ux230-ready .ux230-container { container-type:inline-size; min-width:0; }
body.ux230-ready :where(.split-layout,.case-layout,.market-detail-grid,.experience-layout) { min-width:0; }
body.ux230-ready :where(.split-layout,.case-layout,.market-detail-grid,.experience-layout) > * { min-width:0; }

/* 931–950: dashboards and information visualization */
body.ux230-ready .ux230-dashboard-header { margin-bottom:var(--ux230-grid-gap); display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap; }
body.ux230-ready .ux230-dashboard-header > :first-child { min-width:0; }
body.ux230-ready :where(.metric-card,.stat-card,.kpi-card,.billing-usage-card) { min-width:0; min-height:132px; display:flex; flex-direction:column; }
body.ux230-ready :where(.metric-card,.stat-card,.kpi-card,.billing-usage-card) strong { font-variant-numeric:tabular-nums; letter-spacing:-.035em; }
body.ux230-ready .ux230-metric-unit { margin-left:4px; color:var(--muted); font-size:.75em; font-weight:700; letter-spacing:0; }
body.ux230-ready [data-metric-state="unavailable"] strong { color:var(--muted-2); }
body.ux230-ready [data-metric-state="abnormal"] { border-color:color-mix(in srgb,var(--amber) 34%,var(--line)); background:linear-gradient(135deg,var(--amber-soft),var(--surface)); }
body.ux230-ready .chart-card,
body.ux230-ready .chart-panel { min-width:0; overflow:hidden; }
body.ux230-ready .chart-card canvas,
body.ux230-ready .chart-panel canvas { max-width:100%; }
body.ux230-ready .ux230-chart-summary { margin-top:10px; padding-top:10px; border-top:1px solid var(--ux230-border-subtle); color:var(--muted); font-size:.78rem; }
body.ux230-ready .ux230-data-freshness { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:.72rem; }

/* 951–970: tables and dense data */
body.ux230-ready :where(.table-filter-toolbar,.ux-table-toolbar,.table-toolbar) {
  width:100%;
  min-width:0;
  min-height:60px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  align-content:center;
  gap:9px;
  flex-wrap:wrap;
}
body.ux230-ready :where(.table-filter-toolbar,.ux-table-toolbar,.table-toolbar) > * { min-width:0; }
body.ux230-ready :where(.table-search,.ux-table-search) { position:relative; flex:1 1 240px; min-width:min(100%,220px); max-width:520px; }
body.ux230-ready :where(.table-search,.ux-table-search) input { width:100%; min-height:var(--ux230-control-h); padding-right:42px; }
body.ux230-ready .ux230-search-clear { position:absolute; top:50%; right:7px; width:32px; height:32px; transform:translateY(-50%); display:grid; place-items:center; border:0; border-radius:8px; color:var(--muted); background:transparent; cursor:pointer; }
body.ux230-ready .ux230-search-clear:hover { color:var(--text); background:var(--surface-soft); }
body.ux230-ready .ux230-result-count { flex:0 0 auto; color:var(--muted); font-size:.72rem; white-space:nowrap; }
body.ux230-ready :where(.table-scroll,.admin-table-wrap,.data-table-wrap) { max-width:100%; border-color:var(--ux230-border-subtle); scrollbar-gutter:stable; }
body.ux230-ready table { width:100%; border-collapse:separate; border-spacing:0; }
body.ux230-ready table :where(th,td) { min-width:0; vertical-align:middle; }
body.ux230-ready table th { height:44px; white-space:nowrap; }
body.ux230-ready table td[data-cell-type="number"],body.ux230-ready table td[data-cell-type="currency"],body.ux230-ready table td[data-cell-type="percent"] { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
body.ux230-ready table td[data-cell-type="id"] { font-family:var(--font-mono); font-size:.76rem; }
body.ux230-ready table td[data-cell-type="time"] { white-space:nowrap; color:var(--muted); }
body.ux230-ready tr[data-row-locked="true"] { opacity:.65; background:var(--surface-sunken); }
body.ux230-ready tr[data-row-locked="true"] td:first-child::before { content:"\f023"; margin-right:7px; font-family:"Font Awesome 6 Free"; font-weight:900; color:var(--muted); }
body.ux230-ready :where(.ux220-table-summary,.ux230-table-summary) { min-height:42px; padding:9px 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; border-top:1px solid var(--ux230-border-subtle); color:var(--muted); font-size:.75rem; }
body.ux230-ready mark.ux230-match { padding:0 2px; border-radius:3px; color:inherit; background:color-mix(in srgb,var(--amber) 35%,transparent); }

/* 971–990: filters, search and views */
body.ux230-ready :where(.filter-panel,.audit-filter-form,.market-filter-bar,.validator-filter-bar,.advanced-filters) {
  min-width:0;
  border-color:var(--ux230-border-subtle);
}
body.ux230-ready .ux230-filter-heading { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:12px; }
body.ux230-ready .ux230-filter-heading :where(h2,h3,p) { margin:0; }
body.ux230-ready .ux230-quick-filters { display:flex; flex-wrap:wrap; gap:7px; }
body.ux230-ready .ux230-advanced-filters { border-top:1px solid var(--ux230-border-subtle); padding-top:12px; }
body.ux230-ready :where(.filter-chip,.active-filter-chip) { min-height:32px; display:inline-flex; align-items:center; gap:6px; border-radius:999px; }
body.ux230-ready .saved-view-item { min-width:0; }
body.ux230-ready .saved-view-item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.ux230-ready [data-view-scope]::after { content:attr(data-view-scope); margin-left:6px; color:var(--muted); font-size:.65rem; font-weight:700; }
body.ux230-ready [data-view-dirty="true"]::before { content:""; width:7px; height:7px; display:inline-block; margin-right:6px; border-radius:50%; background:var(--amber); }
body.ux230-ready .search-syntax { border-color:var(--ux230-border-subtle); }
body.ux230-ready .search-syntax > button { box-shadow:none; }
body.ux230-ready .search-syntax > button:focus-visible { border-color:var(--primary); }

/* 991–1010: forms and data entry */
body.ux230-ready form[data-ux230-size="short"] { max-width:520px; }
body.ux230-ready form[data-ux230-size="medium"] { max-width:780px; }
body.ux230-ready form[data-ux230-size="long"] { max-width:1080px; }
body.ux230-ready :where(.form-grid,.form-section,.auth-form,.case-form,.settings-form) { min-width:0; }
body.ux230-ready .ux230-form-section { min-width:0; padding-block:4px; }
body.ux230-ready .ux230-form-section + .ux230-form-section { margin-top:var(--ux230-section-gap); padding-top:var(--ux230-section-gap); border-top:1px solid var(--ux230-border-subtle); }
body.ux230-ready :where(label,.field) { min-width:0; }
body.ux230-ready :where(input,select,textarea) { max-width:100%; }
body.ux230-ready textarea { min-height:110px; resize:vertical; }
body.ux230-ready textarea[data-content-size="short"] { min-height:82px; }
body.ux230-ready textarea[data-content-size="long"] { min-height:190px; }
body.ux230-ready .ux230-repeatable-item { position:relative; min-width:0; padding:15px; border:1px solid var(--ux230-border-subtle); border-radius:var(--ux230-radius-md); background:var(--surface-soft); }
body.ux230-ready .ux230-repeatable-index { margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:.72rem; font-weight:800; }
body.ux230-ready .file-upload-zone,
body.ux230-ready [data-upload-zone] { border-color:var(--ux230-border-strong); }
body.ux230-ready .ux230-file-progress { height:6px; overflow:hidden; border-radius:999px; background:var(--surface-sunken); }
body.ux230-ready .ux230-file-progress > span { display:block; height:100%; width:var(--progress,0%); border-radius:inherit; background:var(--primary); transition:width .18s ease; }
body.ux230-ready .form-actions,
body.ux230-ready .dialog-actions,
body.ux230-ready .drawer-actions { gap:9px; }

/* 1011–1030: workflow, lifecycle and action presentation */
body.ux230-ready :where(.asset-lifecycle-track,.workflow-progress,.lifecycle-track,.timeline-progress) { min-width:0; }
body.ux230-ready [data-ux230-workflow="horizontal"] { display:grid; grid-template-columns:repeat(var(--ux230-stages,4),minmax(0,1fr)); gap:10px; }
body.ux230-ready [data-ux230-workflow="vertical"] { display:grid; grid-template-columns:1fr; gap:9px; }
body.ux230-ready [data-ux230-workflow="vertical"] > * { position:relative; padding-left:42px; }
body.ux230-ready [data-ux230-workflow="vertical"] > *::before { left:13px!important; }
body.ux230-ready [data-ux230-workflow="vertical"] > *::after { content:""; position:absolute; left:17px; top:34px; bottom:-12px; width:2px; background:var(--line); }
body.ux230-ready [data-ux230-workflow="vertical"] > *:last-child::after { display:none; }
body.ux230-ready .ux230-current-stage { box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent); }
body.ux230-ready .ux230-stage-owner { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:.7rem; }
body.ux230-ready .prioritized-actions,
body.ux230-ready .record-actions { min-width:0; gap:10px; }
body.ux230-ready :where(.prioritized-actions,.record-actions) > :is(a,button,.action-card) { min-width:0; }
body.ux230-ready .ux230-action-group { padding:12px; display:grid; gap:8px; border:1px solid var(--ux230-border-subtle); border-radius:var(--ux230-radius-md); background:var(--surface-soft); }
body.ux230-ready .ux230-action-consequence { color:var(--muted); font-size:.72rem; line-height:1.4; }
body.ux230-ready [aria-disabled="true"] .ux230-action-requirement,
body.ux230-ready .disabled .ux230-action-requirement { display:block; margin-top:4px; color:var(--muted); font-size:.68rem; }

/* 1031–1050: overlays, messages and visual-regression resilience */
body.ux230-ready :where(.modal,.dialog,.ux-dialog,[role="dialog"]) { max-height:min(88dvh,900px); }
body.ux230-ready :where(.modal-content,.dialog-content,.ux-dialog-content) { min-height:0; overflow:auto; overscroll-behavior:contain; }
body.ux230-ready :where(.modal-header,.dialog-header,.ux-dialog-header) { position:sticky; top:0; z-index:3; background:var(--surface); }
body.ux230-ready :where(.modal-footer,.dialog-footer,.ux-dialog-footer) { position:sticky; bottom:0; z-index:3; background:var(--surface); }
body.ux230-ready :where(.drawer,.ux-drawer,.ux220-drawer) { width:min(620px,calc(100vw - 28px)); max-width:100%; box-shadow:var(--ux230-shadow-float); }
body.ux230-ready .ux230-drawer-history { display:flex; gap:5px; overflow-x:auto; color:var(--muted); font-size:.72rem; }
body.ux230-ready .toast-container,
body.ux230-ready [data-toast-container] { position:fixed; right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); z-index:500; width:min(390px,calc(100vw - 32px)); display:grid; gap:9px; pointer-events:none; }
body.ux230-ready .toast { max-width:100%; pointer-events:auto; }
body.ux230-ready .toast[data-tone="error"] { border-color:color-mix(in srgb,var(--red) 36%,var(--line)); }
body.ux230-ready .toast[data-tone="success"] { border-color:color-mix(in srgb,var(--green) 34%,var(--line)); }
body.ux230-ready :where(.menu,.popover,.dropdown-menu,.ux-action-overflow-menu) { max-width:min(340px,calc(100vw - 24px)); }
body.ux230-ready .ux230-visual-boundary { outline:1px dashed color-mix(in srgb,var(--primary) 30%,transparent); outline-offset:3px; }

/* Container-aware refinements */
@container (max-width:620px) {
  body.ux230-ready .ux230-grid-2,
  body.ux230-ready .ux230-grid-3,
  body.ux230-ready .ux230-grid-4 { grid-template-columns:1fr; }
  body.ux230-ready .ux230-section-header { flex-direction:column; }
}
@container (min-width:621px) and (max-width:940px) {
  body.ux230-ready .ux230-grid-3,
  body.ux230-ready .ux230-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Responsive shell and content */
@media (max-width:1180px) {
  body.ux230-ready .sidebar {
    width:min(360px,calc(100vw - 28px));
    max-width:100%;
    padding-inline:14px;
  }
  body.sidebar-collapsed.ux230-ready .sidebar .nav-label {
    height:auto;
    margin:8px 0 0;
    padding:12px 12px 6px!important;
    overflow:visible;
    color:var(--muted-2);
  }
  body.sidebar-collapsed.ux230-ready .sidebar .nav-link {
    width:100%;
    min-width:0;
    height:auto;
    min-height:var(--ux230-nav-row);
    margin:0;
    padding:9px 12px;
    display:grid;
    grid-template-columns:20px minmax(0,1fr) auto;
    place-items:initial;
    align-items:center;
  }
  body.sidebar-collapsed.ux230-ready .sidebar .nav-link > span:not(.nav-count):not(.nav-active-dot) { display:block!important; }
  body.ux230-ready :where(.ux230-grid-3,.ux230-grid-4) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  body.ux230-ready :where(.page-heading,.workspace-hero,.panel-hero,.admin-heading,.case-heading) { align-items:flex-start; }
  body.ux230-ready :where(.page-actions,.heading-actions) { width:100%; justify-content:flex-start; }
  body.ux230-ready .ux230-grid-2,
  body.ux230-ready .ux230-grid-3,
  body.ux230-ready .ux230-grid-4 { grid-template-columns:1fr; }
  body.ux230-ready [data-ux230-workflow="horizontal"] { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  :root { --ux230-gutter:14px; --ux230-panel-pad:15px; --ux230-grid-gap:12px; --ux230-section-gap:24px; }
  body.ux230-ready .page { padding-inline:var(--ux230-gutter); }
  body.ux230-ready :where(.context-nav,.panel-tabs,.settings-tabs,.account-settings-nav,.explorer-tabs,.market-tabs,.collaboration-tabs,.breadcrumbs,.ux-breadcrumbs,[data-page-tabs]) {
    scroll-padding-inline:8px;
  }
  body.ux230-ready :where(.context-nav,.panel-tabs,.settings-tabs,.account-settings-nav,.explorer-tabs,.market-tabs,.collaboration-tabs,[data-page-tabs]) > * { min-height:40px; }
  body.ux230-ready :where(.table-filter-toolbar,.ux-table-toolbar,.table-toolbar) { align-items:stretch; }
  body.ux230-ready :where(.table-search,.ux-table-search) { flex:1 1 100%; max-width:none; }
  body.ux230-ready .ux230-result-count { align-self:center; }
  body.ux230-ready :where(.modal,.dialog,.ux-dialog,[role="dialog"]) { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:18px; }
  body.ux230-ready :where(.drawer,.ux-drawer,.ux220-drawer) { width:100vw; max-width:100vw; border-radius:0; }
  body.ux230-ready .form-actions,
  body.ux230-ready .dialog-actions,
  body.ux230-ready .drawer-actions { padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  body.ux230-ready .toast-container,
  body.ux230-ready [data-toast-container] { left:12px; right:12px; bottom:max(12px,env(safe-area-inset-bottom)); width:auto; }
}
@media (max-width:520px) {
  body.ux230-ready :where(.page-heading,.workspace-hero,.panel-hero,.admin-heading,.case-heading) { padding:18px 15px; }
  body.ux230-ready :where(.page-actions,.heading-actions) > :is(a,button) { flex:1 1 auto; justify-content:center; }
}

/* Dark and high-contrast behavior */
:root[data-theme="dark"] body.ux230-ready {
  --ux230-border-subtle:color-mix(in srgb,var(--text) 15%,var(--line));
  --ux230-border-strong:color-mix(in srgb,var(--text) 30%,var(--line));
}
:root[data-theme="dark"] body.ux230-ready :where(.panel,.card,.admin-section,.case-card,.market-card) { box-shadow:0 1px 0 rgba(255,255,255,.025); }
:root[data-contrast="high"] body.ux230-ready :where(.nav-link,.panel,.card,.admin-section,.case-card,input,select,textarea,button) { border-color:currentColor; }
@media (prefers-reduced-motion:reduce) {
  body.ux230-ready *,body.ux230-ready *::before,body.ux230-ready *::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; animation-iteration-count:1!important; }
}
@media print {
  body.ux230-ready :where(.sidebar,.topbar,.context-nav,.page-actions,.heading-actions,.table-filter-toolbar,.ux-table-toolbar,.toast-container) { display:none!important; }
  body.ux230-ready :where(.main,.page,.admin-main,.case-main) { width:100%!important; max-width:none!important; margin:0!important; padding:0!important; }
  body.ux230-ready :where(.panel,.card,.admin-section,.case-card) { break-inside:avoid; box-shadow:none!important; }
}
