html[data-theme="metawise-classic"] {
  color-scheme: light;
}

html[data-theme="axians-hybrid"] {
  color-scheme: light;
  --font-sans: "VINCI Sans", Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f4f7f9;
  --bg-shell: #ffffff;
  --bg-card: #ffffff;
  --bg-tertiary: #eef4f8;
  --bg-hover: #e7f6fb;
  --bg-page: linear-gradient(180deg, rgba(0, 94, 184, 0.08) 0%, rgba(244, 247, 249, 0.96) 34%, #f4f7f9 100%);
  --ink: #172a38;
  --ink-secondary: #304b5d;
  --ink-muted: #687987;
  --ink-subtle: #8b98a2;
  --border: #d6e1e8;
  --border-subtle: #edf2f6;
  --border-focus: #005EB8;
  --accent: #005EB8;
  --accent-hover: #004c94;
  --accent-soft: rgba(0, 94, 184, 0.12);
  --accent-strong: #003b5c;
  --danger: #E50051;
  --danger-soft: rgba(229, 0, 81, 0.14);
  --warning: #F7A823;
  --warning-soft: rgba(247, 168, 35, 0.18);
  --info: #00B1EB;
  --info-soft: rgba(0, 177, 235, 0.16);
  --success: #95C11F;
  --success-soft: rgba(149, 193, 31, 0.18);
  --shadow-sm: 0 8px 24px rgba(23, 42, 56, 0.06);
  --shadow-md: 0 16px 42px rgba(23, 42, 56, 0.1);
  --shadow-lg: 0 24px 70px rgba(23, 42, 56, 0.16);
}

html[data-theme="axians-hybrid"] body {
  font-family: var(--font-sans);
}

html[data-theme="axians-hybrid"] .mw-sidebar {
  background:
    linear-gradient(180deg, rgba(0, 94, 184, 0.96) 0%, rgba(0, 59, 92, 0.98) 62%, #002b43 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

html[data-theme="axians-hybrid"] .mw-sidebar-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(162, 0, 103, 0.24));
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="axians-hybrid"] .mw-logo-orb {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #005EB8, #A20067);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

html[data-theme="axians-hybrid"] .mw-topbar {
  border-bottom: 3px solid #005EB8;
  box-shadow: 0 10px 28px rgba(23, 42, 56, 0.05);
}

html[data-theme="axians-hybrid"] .mw-tag,
html[data-theme="axians-hybrid"] .mw-sidebar-pill,
html[data-theme="axians-hybrid"] .mw-topbar-chip {
  border-radius: var(--radius-pill);
}

html[data-theme="axians-hybrid"] .mw-card {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

html[data-theme="axians-hybrid"] .mw-card:hover {
  box-shadow: var(--shadow-md);
}

html[data-theme="axians-hybrid"] .mw-btn-primary {
  background: linear-gradient(135deg, #005EB8, #004c94);
  border-color: #005EB8;
}

html[data-theme="axians-hybrid"] .mw-btn-primary:hover {
  background: linear-gradient(135deg, #004c94, #003b5c);
  border-color: #004c94;
}

html[data-theme="axians-hybrid"] .mw-nav-item.is-active,
html[data-theme="axians-hybrid"] .mw-nav-item:hover {
  background: rgba(255, 255, 255, 0.13);
  border-left-color: #41C0F0;
}

html[data-theme="axians-hybrid"] :focus-visible {
  outline: 3px solid rgba(0, 177, 235, 0.42);
  outline-offset: 2px;
}

html[data-theme="high-contrast"] {
  color-scheme: dark;
  --bg: #050505;
  --bg-shell: #000000;
  --bg-card: #101010;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #222222;
  --bg-page: #050505;
  --ink: #ffffff;
  --ink-secondary: #f5f5f5;
  --ink-muted: #d5d5d5;
  --ink-subtle: #b5b5b5;
  --border: #f5f5f5;
  --border-subtle: #777777;
  --border-focus: #ffd000;
  --accent: #ffd000;
  --accent-hover: #ffe36a;
  --accent-soft: rgba(255, 208, 0, 0.2);
  --accent-strong: #ffffff;
  --danger: #ff5c8a;
  --danger-soft: rgba(255, 92, 138, 0.2);
  --warning: #ffd000;
  --warning-soft: rgba(255, 208, 0, 0.2);
  --info: #00B1EB;
  --info-soft: rgba(0, 177, 235, 0.2);
  --success: #a7f432;
  --success-soft: rgba(167, 244, 50, 0.2);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
}

html[data-theme="high-contrast"] .mw-sidebar,
html[data-theme="high-contrast"] .mw-topbar,
html[data-theme="high-contrast"] .mw-card {
  border-width: 2px;
}

html[data-theme="high-contrast"] .mw-btn-primary {
  color: #000000;
}

html[data-theme="high-contrast"] :focus-visible {
  outline: 4px solid #ffd000;
  outline-offset: 3px;
}

.mw-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.mw-theme-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 210px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.mw-theme-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm);
}

.mw-theme-card-title {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: flex-start;
  font-weight: 700;
  color: var(--ink);
}

.mw-theme-card-description,
.mw-theme-card-target {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.5;
}

.mw-theme-card-target {
  margin-top: auto;
}

.mw-theme-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  text-transform: uppercase;
}

.mw-theme-swatches {
  display: flex;
  gap: 6px;
  margin-top: var(--space-1);
}

.mw-theme-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.48);
}

.mw-theme-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

/* v0.5.3 Axians Hybrid layout refinement */
html[data-theme="axians-hybrid"] .mw-view-container,
html[data-theme="axians-hybrid"] .governance-view,
html[data-theme="axians-hybrid"] .datasets-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

html[data-theme="axians-hybrid"] .mw-context-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(0, 94, 184, 0.16);
  border-left: 5px solid #005EB8;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgba(0, 94, 184, 0.08), rgba(162, 0, 103, 0.06), rgba(0, 177, 235, 0.06)),
    var(--bg-card);
  box-shadow: var(--shadow-sm);
}

html[data-theme="axians-hybrid"] .mw-context-eyebrow {
  color: #005EB8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="axians-hybrid"] .mw-context-title {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.18;
  margin-top: 3px;
}

html[data-theme="axians-hybrid"] .mw-context-subtitle {
  max-width: 760px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 5px;
}

html[data-theme="axians-hybrid"] .mw-context-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

html[data-theme="axians-hybrid"] .mw-trust-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 94, 184, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

html[data-theme="axians-hybrid"] .mw-kpi-strip {
  align-items: stretch;
}

html[data-theme="axians-hybrid"] .mw-kpi-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.94)),
    var(--bg-card);
}

html[data-theme="axians-hybrid"] .mw-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #005EB8, #00B1EB);
}

html[data-theme="axians-hybrid"] .mw-kpi-card .mw-card-kpi,
html[data-theme="axians-hybrid"] .mw-kpi-card [style*="font-size: 20px"] {
  color: #003b5c;
  font-weight: 900 !important;
}

html[data-theme="axians-hybrid"] .mw-score-card {
  border-left: 5px solid #00B1EB;
}

html[data-theme="axians-hybrid"] .mw-score-card .mw-quality-meter,
html[data-theme="axians-hybrid"] .mw-quality-summary .mw-quality-meter {
  filter: drop-shadow(0 14px 24px rgba(0, 94, 184, 0.14));
}

html[data-theme="axians-hybrid"] .mw-ops-panel {
  border-radius: var(--radius-lg);
  background: #ffffff;
}

html[data-theme="axians-hybrid"] .mw-activity-panel {
  border-top: 4px solid #A20067;
}

html[data-theme="axians-hybrid"] .mw-tab-rail {
  padding: 4px;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
}

html[data-theme="axians-hybrid"] .tab-btn {
  border-radius: var(--radius-md);
  border-bottom: 0 !important;
  font-weight: 800;
}

html[data-theme="axians-hybrid"] .tab-btn.active {
  box-shadow: inset 0 0 0 1px rgba(0, 94, 184, 0.24);
}

html[data-theme="axians-hybrid"] .mw-compliance-kpi-panel,
html[data-theme="axians-hybrid"] .mw-stewardship-panel {
  border-left: 5px solid #005EB8;
}

html[data-theme="axians-hybrid"] .mw-ai-readiness-panel {
  border-left: 5px solid #A20067;
  background:
    linear-gradient(135deg, rgba(162, 0, 103, 0.055), rgba(0, 177, 235, 0.065)),
    #ffffff;
}

html[data-theme="axians-hybrid"] .mw-trust-card {
  border-radius: var(--radius-lg);
  border-color: rgba(0, 94, 184, 0.16);
}

html[data-theme="axians-hybrid"] .mw-trust-mini-card::before {
  background: linear-gradient(180deg, #A20067, #00B1EB);
}

html[data-theme="axians-hybrid"] .mw-trust-row,
html[data-theme="axians-hybrid"] .mw-work-row {
  min-height: 58px;
  padding: 10px 12px !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
}

html[data-theme="axians-hybrid"] .mw-trust-row:hover,
html[data-theme="axians-hybrid"] .mw-work-row:hover {
  border-color: rgba(0, 177, 235, 0.34) !important;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

html[data-theme="axians-hybrid"] .mw-filter-bar {
  background:
    linear-gradient(90deg, rgba(0, 94, 184, 0.06), rgba(0, 177, 235, 0.06)),
    #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

html[data-theme="axians-hybrid"] .mw-filter-bar input,
html[data-theme="axians-hybrid"] .mw-filter-bar select {
  background: #ffffff;
  border-color: #cad8e2 !important;
  min-height: 38px;
}

html[data-theme="axians-hybrid"] .dataset-card {
  min-height: 100%;
}

html[data-theme="axians-hybrid"] .dataset-card .mw-card-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-3);
}

html[data-theme="axians-hybrid"] .mw-trust-metric {
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}

html[data-theme="axians-hybrid"] .mw-trust-metric:last-of-type {
  border-bottom: 0;
}

html[data-theme="axians-hybrid"] .mw-tag {
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 800;
}

html[data-theme="axians-hybrid"] .mw-theme-card {
  min-height: 230px;
}

html[data-theme="axians-hybrid"] .mw-theme-card.is-active {
  border-color: #005EB8;
  background:
    linear-gradient(180deg, rgba(0, 94, 184, 0.055), rgba(255, 255, 255, 0.95)),
    #ffffff;
}

@media (max-width: 980px) {
  html[data-theme="axians-hybrid"] .mw-context-panel {
    flex-direction: column;
  }

  html[data-theme="axians-hybrid"] .mw-context-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  html[data-theme="axians-hybrid"] .mw-context-title {
    font-size: 18px;
  }

  html[data-theme="axians-hybrid"] .mw-kpi-card {
    min-height: 108px;
  }
}
