/**
 * UI Handbook compatibility layer.
 * Keeps the existing product identity while normalising interaction, rhythm,
 * accessibility and responsive behaviour across every Twig view.
 */

:root,
[data-theme="dark"] {
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-6: 24px;
  --ui-space-8: 32px;
  --ui-space-12: 48px;
  --ui-control-compact: 32px;
  --ui-control-default: 36px;
  --ui-control-touch: 44px;
  --ui-icon-sm: 16px;
  --ui-icon-md: 20px;
  --ui-icon-lg: 24px;
  --ui-radius-control: 6px;
  --ui-radius-card: 12px;
  --ui-radius-dialog: 16px;
  --ui-motion-fast: 150ms;
  --ui-motion-enter: 240ms;
  --ui-motion-exit: 180ms;
  --ui-ease-out: cubic-bezier(.2, .8, .2, 1);
  --ui-ease-in: cubic-bezier(.4, 0, 1, 1);
  --ui-z-content: 0;
  --ui-z-float: 10;
  --ui-z-popover: 20;
  --ui-z-sticky: 40;
  --ui-z-modal: 50;
  --ui-z-toast: 60;
  --ui-scrim: rgba(2, 6, 23, .58);
  --ui-ring: 0 0 0 3px rgba(16, 185, 129, .28);
}

html {
  scroll-padding-top: 84px;
}

body {
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"],
[role="tab"],
summary,
select,
label[for] {
  touch-action: manipulation;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]),
summary,
select,
label[for] {
  cursor: pointer;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: var(--ui-ring);
}

:where(button, [role="button"], [role="tab"]):active:not(:disabled) {
  transform: scale(.98);
}

:where(button, input, select, textarea):disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: .48;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 { line-height: 1.25; }
h2 { line-height: 1.33; }
h3 { line-height: 1.4; }

p,
.footer-desc,
.section-desc,
.hero-description {
  text-wrap: pretty;
}

.tabular-nums,
.price,
.price-display,
.stat-value,
.metric-value,
time,
[data-number] {
  font-variant-numeric: tabular-nums;
}

/* Surfaces and elevation */
.card,
.stat-card,
.market-card,
.machine-card,
.ranking-tabs-unified,
.filter-bar,
.advanced-filter-panel,
.system-health-panel,
.status-run-summary,
.offer-system-card,
.watch-machine-panel {
  border-radius: var(--ui-radius-card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--ui-motion-fast) ease,
    background-color var(--ui-motion-fast) ease,
    box-shadow var(--ui-motion-fast) ease,
    transform var(--ui-motion-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .stat-card:hover,
  .market-card:hover,
  .offer-system-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }
}

/* Controls */
.btn,
.nav-link,
.tab-btn,
.rank-primary-tab,
.sub-tab-btn,
.quick-filter-chip,
.market-apply-button,
.market-reset-link,
.pagination a,
.pagination button {
  min-height: var(--ui-control-default);
  border-radius: var(--ui-radius-control);
  transition:
    color var(--ui-motion-fast) ease,
    background-color var(--ui-motion-fast) ease,
    border-color var(--ui-motion-fast) ease,
    box-shadow var(--ui-motion-fast) ease,
    transform var(--ui-motion-fast) ease;
}

.btn-primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.btn-primary:hover {
  box-shadow: 0 5px 16px rgba(5, 150, 105, .22);
}

.btn.is-loading,
button.is-loading {
  pointer-events: none;
  position: relative;
}

.btn.is-loading::after,
button.is-loading::after {
  width: 16px;
  height: 16px;
  margin-left: var(--ui-space-2);
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  display: inline-block;
  vertical-align: -3px;
  animation: ui-spin .65s linear infinite;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.search-input,
.filter-input,
.filter-select {
  min-height: var(--ui-control-touch);
  border-radius: var(--ui-radius-control);
  transition:
    border-color var(--ui-motion-fast) ease,
    background-color var(--ui-motion-fast) ease,
    box-shadow var(--ui-motion-fast) ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: .82;
}

/* Navigation hierarchy */
.header {
  z-index: var(--ui-z-sticky);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  gap: var(--ui-space-6);
}

.nav-links {
  gap: var(--ui-space-1);
}

.nav-link {
  position: relative;
  padding-inline: var(--ui-space-3);
  color: var(--text-muted);
  font-weight: 500;
}

.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 650;
}

.nav-links a.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  position: absolute;
  right: var(--ui-space-3);
  bottom: 3px;
  left: var(--ui-space-3);
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.tab-icon {
  display: inline-grid;
  width: var(--ui-icon-md);
  height: var(--ui-icon-md);
  place-items: center;
}

.tab-icon svg {
  width: 100%;
  height: 100%;
}

.mobile-menu-toggle {
  min-width: var(--ui-control-touch);
  min-height: var(--ui-control-touch);
}

.mobile-bottom-nav {
  z-index: var(--ui-z-sticky);
  padding-bottom: max(var(--ui-space-2), env(safe-area-inset-bottom));
}

.mobile-bottom-link {
  position: relative;
  min-height: 52px;
}

.mobile-bottom-link[aria-current="page"]::before,
.mobile-bottom-link.active::before {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
  transform: translateX(-50%);
}

/* Tabs: selected state is more than colour alone. */
[role="tablist"] {
  scrollbar-width: thin;
}

[role="tab"] {
  position: relative;
  min-height: var(--ui-control-touch);
}

[role="tab"][aria-selected="true"] {
  color: var(--text-primary);
  font-weight: 650;
}

[role="tab"][aria-selected="true"]::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

/* Dialog, drawer and feedback */
.modal-overlay {
  z-index: var(--ui-z-modal);
  background: var(--ui-scrim);
  backdrop-filter: blur(6px);
  transition: opacity var(--ui-motion-exit) var(--ui-ease-in);
}

.modal-overlay.active {
  transition-duration: var(--ui-motion-enter);
  transition-timing-function: var(--ui-ease-out);
}

.modal-content {
  max-height: min(86dvh, 780px);
  overflow: auto;
  border-radius: var(--ui-radius-dialog);
  overscroll-behavior: contain;
}

.modal-close {
  display: inline-grid;
  min-width: var(--ui-control-touch);
  min-height: var(--ui-control-touch);
  place-items: center;
}

body.ui-modal-open {
  overflow: hidden;
}

.ui-toast-region {
  position: fixed;
  z-index: var(--ui-z-toast);
  right: max(var(--ui-space-4), env(safe-area-inset-right));
  bottom: max(var(--ui-space-4), env(safe-area-inset-bottom));
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: var(--ui-space-2);
  pointer-events: none;
}

.ui-toast {
  display: flex;
  align-items: flex-start;
  gap: var(--ui-space-3);
  padding: var(--ui-space-3) var(--ui-space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--ui-radius-card);
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--ui-motion-enter) var(--ui-ease-out), transform var(--ui-motion-enter) var(--ui-ease-out);
}

.ui-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ui-toast__icon {
  color: var(--primary);
  font-weight: 700;
}

.ui-toast[data-tone="error"] .ui-toast__icon { color: var(--danger); }
.ui-toast[data-tone="warning"] .ui-toast__icon { color: var(--warning); }

.ui-empty-state {
  display: grid;
  min-height: 180px;
  padding: var(--ui-space-8);
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--ui-radius-card);
  color: var(--text-muted);
  text-align: center;
}

.skeleton,
[data-skeleton] {
  background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  background-size: 200% 100%;
  animation: ui-shimmer 1.6s linear infinite;
}

.page-progress-bar {
  z-index: var(--ui-z-toast);
}

#main-content.page-entering {
  animation: ui-page-enter var(--ui-motion-enter) var(--ui-ease-out) both;
}

/* Compact desktop, touch-friendly handheld. */
@media (max-width: 1024px) {
  .container {
    padding-inline: var(--ui-space-6);
  }
}

@media (max-width: 768px), (max-width: 900px) and (max-height: 500px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .container {
    padding-inline: var(--ui-space-4);
  }

  .btn,
  .nav-link,
  .tab-btn,
  .rank-primary-tab,
  .sub-tab-btn,
  .quick-filter-chip,
  .market-apply-button,
  .market-reset-link,
  .pagination a,
  .pagination button {
    min-height: var(--ui-control-touch);
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: 0;
    border-radius: var(--ui-radius-dialog) var(--ui-radius-dialog) 0 0;
    padding-bottom: max(var(--ui-space-6), env(safe-area-inset-bottom));
  }

  .ui-toast-region {
    right: var(--ui-space-4);
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: var(--ui-space-4);
    width: auto;
  }
}

@media (max-width: 375px) {
  .container {
    padding-inline: var(--ui-space-3);
  }

  .ranking-primary-tabs,
  .ranking-sub-tabs {
    gap: var(--ui-space-1);
  }
}

@media (hover: none), (pointer: coarse) {
  button,
  [role="button"],
  [role="tab"],
  a.btn,
  .nav-link {
    min-height: var(--ui-control-touch);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@keyframes ui-spin {
  to { transform: rotate(360deg); }
}

@keyframes ui-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes ui-page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* v3.10: hierarchy-first navigation and product-card actions. */
@media (min-width: 1121px) {
  .nav-actions {
    gap: var(--ui-space-3);
  }

  .nav-actions .search-box {
    width: clamp(220px, 19vw, 300px);
  }

  .nav-links--primary,
  .nav-links--utility {
    gap: 2px;
  }

  .nav-links--utility {
    margin-left: var(--ui-space-1);
    padding-left: var(--ui-space-2);
    border-left: 1px solid var(--border-subtle);
  }

  .nav-links--utility .nav-link {
    color: var(--text-muted);
    font-size: 12px;
  }
}

.home-action-card {
  padding: var(--ui-space-4) !important;
}

.home-action-card .action-card-header {
  align-items: flex-start;
  margin-bottom: var(--ui-space-3);
}

.home-action-card__signals {
  margin-bottom: var(--ui-space-3);
}

.home-action-card .action-card-specs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  min-height: auto;
  padding: var(--ui-space-3) 0;
}

.home-action-card .action-card-specs .spec-item {
  display: grid;
  min-width: 0;
  padding: 0 var(--ui-space-2);
  place-items: center;
  border-right: 1px solid var(--border-subtle);
  line-height: 1.35;
  text-align: center;
}

.home-action-card .action-card-specs .spec-item:first-child { padding-left: 0; }
.home-action-card .action-card-specs .spec-item:last-child { padding-right: 0; border-right: 0; }
.home-action-card .action-card-specs .spec-dot { display: none; }

.home-action-card .action-card-footer {
  align-items: center;
  padding-top: var(--ui-space-3);
}

.home-action-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 1.15fr);
  gap: var(--ui-space-2);
  align-items: center;
}

.home-action-card__secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ui-space-2);
  min-width: 0;
}

.home-action-card__actions .btn {
  min-height: 42px;
}

.home-action-card__primary-action {
  width: 100%;
  font-weight: 750;
}

.card-action-menu {
  position: relative;
  min-width: 0;
}

.card-action-menu > summary {
  width: 100%;
  list-style: none;
  cursor: pointer;
}

.card-action-menu > summary::-webkit-details-marker { display: none; }

.card-action-menu > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--ui-motion-fast) var(--ui-ease-out);
}

.card-action-menu[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.card-action-menu__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + var(--ui-space-2));
  z-index: var(--ui-z-popover);
  display: grid;
  width: 180px;
  padding: var(--ui-space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--ui-radius-control);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-lg);
}

.card-action-menu__panel a,
.card-action-menu__panel button {
  display: flex;
  min-height: 42px;
  padding: 0 var(--ui-space-3);
  align-items: center;
  border: 0;
  border-radius: var(--ui-radius-control);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.card-action-menu__panel a:hover,
.card-action-menu__panel button:hover,
.card-action-menu__panel a:focus-visible,
.card-action-menu__panel button:focus-visible {
  background: var(--surface-hover);
  color: var(--text-primary);
}

@media (max-width: 1500px) and (min-width: 769px) {
  .home-action-card .action-card-footer {
    gap: var(--ui-space-3);
  }
}

@media (max-width: 768px) {
  .nav-links--utility {
    padding-top: var(--ui-space-2);
    border-top: 1px solid var(--border-subtle);
  }

  .home-action-card .action-card-specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--ui-space-2);
  }

  .home-action-card .action-card-specs .spec-item {
    min-height: 34px;
  }

  .home-action-card .action-card-specs .spec-item:nth-child(5) { border-right: 0; }

  .home-action-card__actions {
    grid-template-columns: 1fr;
  }

  .home-action-card__primary-action {
    grid-row: 1;
    min-height: var(--ui-control-touch) !important;
  }

  .home-action-card__secondary-actions {
    grid-row: 2;
  }

  .home-action-card__secondary-actions .btn,
  .card-action-menu > summary {
    min-height: var(--ui-control-touch);
  }
}

/* v3.11 canonical component system. All colors resolve through theme tokens. */
:root,
[data-theme="dark"] {
  --ui-card-accent: #10b981;
  --ui-card-accent-soft: rgba(16, 185, 129, .12);
  --ui-card-price: #f59e0b;
  --ui-card-price-soft: rgba(245, 158, 11, .12);
  --ui-card-danger-soft: rgba(244, 63, 94, .1);
}

[data-theme="light"] {
  --ui-card-accent: #047857;
  --ui-card-accent-soft: #ecfdf5;
  --ui-card-price: #b45309;
  --ui-card-price-soft: #fffbeb;
  --ui-card-danger-soft: #fff1f2;
}

/* Overview: visually identifiable offer cards with a labeled spec rail. */
.home-action-card {
  overflow: visible;
  border-left: 3px solid var(--ui-card-accent) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm) !important;
}

.home-action-card.is-card-soldout {
  border-left-color: var(--text-dim) !important;
}

.home-action-card__region {
  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  border-color: var(--border-strong) !important;
}

.home-action-card__host,
a.home-action-card__host,
a.home-action-card__host:visited {
  color: var(--text-primary) !important;
  text-shadow: none;
}

.home-action-card__plan,
a.home-action-card__plan,
a.home-action-card__plan:visited {
  color: var(--text-secondary) !important;
}

.home-action-card .action-card-specs {
  border: 1px solid var(--border-subtle);
  border-radius: var(--ui-radius-control);
  background: var(--surface-subtle);
}

.home-action-card .action-card-specs .spec-item {
  gap: 2px;
  color: var(--text-primary) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700 !important;
}

.home-action-card .action-card-specs .spec-item::before {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .05em;
}

.home-action-card .action-card-specs .spec-item:nth-child(1)::before { content: "CPU"; }
.home-action-card .action-card-specs .spec-item:nth-child(3)::before { content: "内存"; }
.home-action-card .action-card-specs .spec-item:nth-child(5)::before { content: "硬盘"; }
.home-action-card .action-card-specs .spec-item:nth-child(7)::before { content: "流量"; }
.home-action-card .action-card-specs .spec-item:nth-child(9)::before { content: "带宽"; }

.home-action-card__price .price-display {
  color: var(--ui-card-price) !important;
  text-shadow: none;
}

.home-action-card__secondary-actions {
  gap: 8px;
}

.home-action-card__secondary-actions .btn,
.card-action-menu > summary {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
  color: var(--text-secondary) !important;
}

.home-action-card__primary-action {
  min-width: 118px;
}

/* Rankings: one compact segmented hierarchy, dense host and plan rows. */
.ranking-tabs-unified {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-card);
  background: var(--surface);
}

.ranking-primary-tabs {
  padding: 5px;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
}

.rank-primary-tab {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-control);
  border-bottom-width: 1px;
}

.rank-primary-tab.active {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ranking-sub-tabs-scroller {
  padding: 6px 8px;
  background: var(--surface);
}

.ranking-sub-tabs { gap: 2px; }

.sub-tab-btn {
  min-height: 34px;
  padding: 5px 11px;
  border: 0;
  border-radius: var(--ui-radius-control);
  background: transparent;
}

.sub-tab-btn.active {
  background: var(--ui-card-accent-soft);
  box-shadow: inset 0 -2px 0 var(--ui-card-accent);
}

.machine-rankings-view { gap: 12px; }

.machine-sla-card {
  overflow: hidden;
  border-radius: var(--ui-radius-card);
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm) !important;
}

.machine-sla-card__header {
  padding: 13px 16px 10px;
  gap: 16px;
}

.machine-sla-card__identity h3 {
  margin-bottom: 6px;
  font-size: clamp(16px, 1.5vw, 19px);
}

.machine-sla-card__eyebrow { margin-bottom: 3px; }

.machine-sla-card__network-summary {
  width: 245px;
  min-width: 245px;
  min-height: 62px;
  padding: 8px 10px;
}

.machine-sla-card__network-icon {
  width: 34px;
  height: 34px;
}

.machine-sla-card__network-value strong { font-size: 18px; }

.machine-sla-compact-strip {
  min-height: 42px;
  margin: 0 10px 6px;
  padding: 5px 8px;
  border-color: var(--border-subtle);
  background: var(--surface-subtle);
}

.machine-sla-compact-items { gap: 8px 18px; }
.machine-sla-compact-item { font-size: 11px; }
.machine-sla-compact-strip .btn { min-height: 32px; padding: 4px 9px; }
.machine-plan-list__heading { padding: 7px 14px; }

.machine-plan-row {
  grid-template-columns: minmax(210px, 1.65fr) auto 76px minmax(230px, auto);
  gap: 8px 12px;
  padding: 9px 14px;
  align-items: center;
}

.machine-plan-row__name { font-size: 13px; }
.machine-plan-row__specs { margin-top: 2px; font-size: 10.5px; }
.machine-plan-row__actions { gap: 5px; }
.machine-plan-action { min-height: 34px; min-width: 50px; padding: 5px 9px; }

.machine-plan-row > .offer-activity-timeline {
  display: none;
}

/* Market: commerce first, stronger pricing and calmer supporting data. */
.market-card {
  border-top: 3px solid var(--ui-card-accent) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm) !important;
}

.market-card--attention { border-top-color: var(--warning) !important; }
.market-card__title { padding-bottom: 10px; }
.market-card__title h2 { font-size: 17px; }

.market-card__commerce {
  background: var(--surface-subtle);
}

.market-pricing > div:first-child {
  margin: -1px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  border-left: 3px solid var(--ui-card-price);
  background: var(--ui-card-price-soft);
}

.market-pricing > div:first-child strong {
  color: var(--ui-card-price);
  font-size: 23px;
}

.market-specs dd { color: var(--text-primary); }
.market-card__footer { padding-top: 10px; padding-bottom: 11px; }
.market-card__actions .market-card-action--primary { min-width: 92px; }

/* Comparison uses page scrolling; the dialog never creates an inner vertical viewport. */
#compareModal {
  overflow-y: auto;
  align-items: flex-start;
}

#compareModal .modal-content {
  max-height: none;
  margin: 24px auto;
  overflow: visible;
}

#compareModalBody .table-responsive {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.compare-table th,
.compare-table td {
  padding: 9px 10px;
}

.compare-offer-card {
  background: var(--surface-subtle);
}

/* Explicit light theme contracts; no dark card may leak through. */
[data-theme="light"] .card,
[data-theme="light"] .action-card,
[data-theme="light"] .home-action-card,
[data-theme="light"] .leaderboard-panel,
[data-theme="light"] .term-window,
[data-theme="light"] .machine-sla-card,
[data-theme="light"] .market-card,
[data-theme="light"] .watchlist-offer-card,
[data-theme="light"] .modal-content {
  background: var(--surface) !important;
  color: var(--text-primary);
  border-color: var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="light"] .pulse-banner,
[data-theme="light"] .stats-strip-secondary,
[data-theme="light"] .leaderboard-card-header,
[data-theme="light"] .compare-offer-card {
  background: var(--surface-subtle) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

[data-theme="light"] :is(.section-title, .leaderboard-card-title, .home-action-card__host, .home-action-card__plan) {
  color: var(--text-primary) !important;
  text-shadow: none !important;
}

[data-theme="light"] :is(.section-sub, .leaderboard-card-sub, .signal-subtext) {
  color: var(--text-secondary) !important;
}

@media (max-width: 900px) {
  .machine-sla-card__network-summary { width: 100%; min-width: 0; }
  .machine-plan-row { grid-template-columns: minmax(0, 1fr) auto; }
  .machine-plan-row__actions { grid-column: 1 / -1; }
}

/* ==========================================================================
   Canonical information architecture v3.12 — dense decision dashboard
   ========================================================================== */
:root {
  --radius-control: 6px;
  --radius-card: 12px;
  --radius-modal: 16px;
  --control-compact: 32px;
  --control-default: 36px;
  --control-touch: 44px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
}

body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
:is(.price-display, .stat-value, .stat-secondary-value, .pulse-val, .market-pricing strong,
  .market-lifecycle dd, .market-traffic strong, .system-diagnostic strong, .data-table td,
  .compare-table td, .machine-plan-row__price) {
  font-variant-numeric: tabular-nums lining-nums;
}

:is(button, .btn, a, summary, select, input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-primary) 38%, transparent);
  outline-offset: 2px;
}

/* One market-activity surface; secondary feeds no longer compete vertically. */
.market-activity {
  margin-bottom: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}
.market-activity__tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2);
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.market-activity__tab {
  min-height: var(--control-touch);
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  font: 600 14px/1.2 inherit;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.market-activity__tab span {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-raised);
  font: 600 12px/1.4 var(--font-mono);
}
.market-activity__tab.active { background: var(--surface); color: var(--text-primary); box-shadow: inset 0 -2px var(--accent-primary); }
.market-activity__panels { padding: var(--space-3); }
.market-activity__panel { margin: 0; padding: var(--space-4); box-shadow: none; }
.market-activity__panel[hidden] { display: none !important; }

/* Dashboard KPIs: current value first, explanation second. */
.stats-grid--primary .stat-card {
  min-height: 124px;
  padding: var(--space-4);
  border-radius: var(--radius-card);
  border-top: 3px solid var(--border-strong);
}
.stats-grid--primary .stat-card--instock { border-top-color: var(--success); }
.stats-grid--primary .stat-label { color: var(--text-secondary); font-weight: 600; }
.stats-grid--primary .stat-value { margin-top: var(--space-2); font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.stats-grid--primary .stat-sub { margin-top: auto; color: var(--text-muted); font-family: inherit; }

/* Region list behaves as TOP 10; progressive disclosure owns the rest. */
.region-chips-title > span:first-child::first-letter { font-size: 0; }
.region-chip-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn-region-expand { width: 100%; min-height: var(--control-touch); margin-top: var(--space-3); }

/* Market cards answer: buy price, running cost, value, traffic, expiry. */
.market-premium { position: relative; }
.market-premium strong { display: inline-flex; width: max-content; padding: 4px 8px; border-radius: 999px; font-size: 13px !important; }
.market-premium em { display: block; margin-top: 5px; color: var(--text-secondary); font: 600 12px/1.3 var(--font-mono); font-style: normal; }
.market-premium--fair strong, .market-premium--discount strong { color: var(--success); background: var(--success-soft); }
.market-premium--premium strong { color: var(--warning); background: var(--warning-soft); }
.market-traffic__track { height: 8px; }
.market-lifecycle dd { font-size: 18px; font-weight: 750; }

/* Analytics/status tables: scan columns without losing headers. */
.data-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-subtle); }
.data-table th:not(:first-child), .data-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.status-run-summary { position: sticky; top: var(--header-height, 68px); z-index: 8; }

/* Reading pages use a deliberate measure, not dashboard width. */
.methodology-container { max-width: 960px; margin: 0 auto 48px; }
.methodology-body { max-width: 760px; font-family: "Plus Jakarta Sans", system-ui, sans-serif; line-height: 1.7; }
.methodology-body :is(p, li) { font-family: inherit; }
.methodology-body :is(pre, code) { font-family: var(--font-mono); }

.watchlist-empty { min-height: 360px; justify-content: center; }
.watchlist-empty__hint { margin: 12px 0 0; color: var(--text-muted); font-size: 13px; }

.ranking-more-actions { position: relative; }
.ranking-more-actions > summary { min-height: var(--control-touch); display: inline-flex; align-items: center; list-style: none; cursor: pointer; }
.ranking-more-actions > summary::-webkit-details-marker { display: none; }
.ranking-more-actions__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}
.ranking-more-actions__menu button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.ranking-more-actions__menu button:hover { background: var(--surface-subtle); }

@media (max-width: 640px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .market-activity__tabs { overflow-x: auto; scroll-snap-type: x mandatory; }
  .market-activity__tab { flex: 0 0 auto; scroll-snap-align: start; }
  .market-activity__panels { padding: var(--space-2); }
  .market-activity__panel { padding: var(--space-3); }
  .stats-grid--primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid--primary .stat-card,
  .stats-grid--primary .stat-card:nth-child(n + 3) { display: grid !important; min-width: 0; min-height: 112px; }
  .stats-grid--primary .stat-value { font-size: 26px; }
  .market-card-grid { grid-template-columns: minmax(0, 1fr); }
  .market-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-premium { grid-column: 1 / -1; }
  .methodology-grid { display: block !important; }
  .methodology-toc { position: static !important; margin-bottom: var(--space-4); }
  .region-breakdown-table thead { display: none; }
  .region-breakdown-table, .region-breakdown-table tbody, .region-breakdown-table tr, .region-breakdown-table td { display: block; width: 100%; }
  .region-breakdown-table tr { margin-bottom: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
  .region-breakdown-table td { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border: 0; text-align: right; }
  .region-breakdown-table td::before { content: attr(data-label); color: var(--text-muted); text-align: left; }
  .status-run-summary { position: static; }
  :is(.btn, button, select, input, summary, .market-card-action) { min-height: var(--control-touch); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ==========================================================================*/
   v3.14 content-first shell: readable, shareable, deliberately ordinary
   ========================================================================== */
:root {
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --refactor-content-width: 1180px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
}

.header {
  background: var(--surface);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.logo-tagline { color: var(--text-muted); font-family: var(--font-sans); letter-spacing: 0; }
.logo-tagline .prompt, .logo-tagline .path, .logo-tagline .cmd, .logo-tagline .cursor-blink { display: none; }
.card, .stat-card, .region-globe-card, .tg-hub-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: var(--refactor-content-width);
  margin: 0 auto var(--space-6);
  padding: clamp(24px, 4vw, 40px) 0 var(--space-6);
  border-bottom: 1px solid var(--border);
}
.home-intro__copy { min-width: 0; }
.home-eyebrow { margin: 0 0 var(--space-2); color: var(--text-muted); font: 700 12px/1.2 var(--font-mono); letter-spacing: .08em; }
.home-intro h1 { margin: 0; color: var(--text-primary); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; line-height: 1.12; }
.home-intro__summary { max-width: 680px; margin: var(--space-3) 0 0; color: var(--text-secondary); font-size: 16px; }
.home-intro__meta { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: 13px; }
.home-intro__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); flex: 0 0 auto; }
.home-intro__actions .btn { min-height: var(--control-touch); }
.pulse-banner { border: 1px solid var(--border); background: var(--surface-subtle); box-shadow: none; }
.pulse-title { font-family: var(--font-sans); letter-spacing: 0; }
.pulse-title .prompt, .section-title .prompt { display: none; }
.section-sub { letter-spacing: 0; }

.globe-enhancement {
  display: grid;
  min-height: 460px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface-subtle);
  color: var(--text-muted);
}
.globe-enhancement canvas { display: block; width: 100%; height: 100%; }
.globe-static-fallback { display: grid; max-width: 300px; gap: var(--space-2); padding: var(--space-6); text-align: center; }
.globe-static-fallback strong { color: var(--text-primary); font-size: 16px; }
.globe-static-fallback span { font-size: 13px; line-height: 1.6; }

.share-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.share-actions__button { min-height: var(--control-touch); }
.share-actions__feedback { min-height: 22px; color: var(--success); font-size: 12px; }
.share-actions__manual { flex-basis: 100%; color: var(--text-muted); font-size: 12px; }
.share-actions__manual summary { display: inline-flex; min-height: 32px; align-items: center; }
.share-actions__manual textarea { display: block; width: min(100%, 560px); min-height: 116px; margin-top: var(--space-2); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); color: var(--text-secondary); font: 13px/1.55 var(--font-sans); resize: vertical; }
.machine-detail-header__actions .share-actions { justify-content: flex-end; }
.tg-feat-icon { min-width: 54px; padding: 4px 6px; border-radius: var(--radius-control); font: 700 11px/1.2 var(--font-sans); text-align: center; }
.search-status { display: inline-flex; align-items: center; gap: 5px; }
.search-status--online { color: var(--success); }
.search-status--offline { color: var(--danger); }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }

@media (max-width: 1180px) {
  .home-intro { padding-inline: var(--space-4); }
}

@media (max-width: 720px) {
  .home-intro { align-items: stretch; flex-direction: column; gap: var(--space-4); padding-top: var(--space-6); }
  .home-intro__actions { justify-content: stretch; }
  .home-intro__actions .btn { flex: 1 1 160px; text-align: center; }
  .globe-enhancement { min-height: 300px; }
  .share-actions { align-items: stretch; }
  .share-actions__button { flex: 1 1 140px; }
  .share-actions__feedback { flex-basis: 100%; }
  .machine-detail-header__actions .share-actions { justify-content: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .globe-enhancement canvas { animation: none !important; }
}

/* ==========================================================================*
   v3.15 dense operations view: node summary -> plan rows -> optional detail
   ========================================================================== */
.rankings-page-heading {
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.rankings-page-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.rankings-page-heading .section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.035em;
}

.rankings-page-heading .section-sub {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.rankings-page-meta {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.rankings-page-meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--border-strong);
}

.rankings-results-shell {
  overflow: visible;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-card);
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm) !important;
}

.rankings-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 48px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.rankings-results-header > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.rankings-results-header strong { color: var(--text-primary); font-size: 14px; }
.rankings-results-header span:not(.rankings-live-status):not(.status-dot) { color: var(--text-muted); font-size: 12px; }
.rankings-live-status { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--success); font-size: 12px; }

.rankings-results-shell > .term-body {
  padding: 12px;
  border: 0;
  background: transparent;
}

.rankings-view-toolbar,
.rankings-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
}

.rankings-view-toolbar__summary,
.rankings-selection-bar__summary {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.rankings-view-toolbar__summary strong,
.rankings-selection-bar__summary strong { color: var(--text-primary); }
.rankings-view-toolbar__actions,
.rankings-selection-bar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.rankings-selection-bar { position: sticky; top: calc(var(--desktop-header-height, 68px) + 10px); z-index: 20; border-color: var(--accent-primary); background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.rankings-selection-bar__summary span { color: var(--text-muted); }

.machine-rankings-view { gap: 10px; }

.machine-sla-card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-card) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.machine-sla-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: center;
  gap: 12px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.machine-sla-card__identity { min-width: 0; }
.machine-sla-card__eyebrow { margin-bottom: 3px; font-size: 11px; }
.machine-sla-card__title-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.machine-sla-card__title-row h3 { min-width: 0; margin: 0; overflow: hidden; color: var(--text-primary); font-size: 16px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.machine-group-toggle { display: inline-grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-subtle); color: var(--text-secondary); font-size: 17px; line-height: 1; cursor: pointer; }
.machine-group-toggle:hover { background: var(--surface-raised); color: var(--text-primary); }
.machine-sla-card__status-line { min-height: 17px; margin-top: 3px; font-size: 11px; }

.machine-sla-card__network-summary { width: auto; min-width: 0; min-height: 54px; padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); }
.machine-sla-card__network-icon { width: 30px; height: 30px; }
.machine-sla-card__network-value strong { font-size: 16px; }
.machine-sla-card__network-method { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.machine-sla-compact-strip { min-height: 36px; margin: 7px 9px 6px; padding: 4px 7px; border-color: var(--border-subtle); background: var(--surface-subtle); }
.machine-sla-compact-items { gap: 6px 16px; }
.machine-sla-compact-item { font-size: 11px; }
.machine-sla-compact-item small { color: var(--text-muted); }
.machine-sla-compact-strip .btn { min-height: 30px; padding: 3px 8px; }
.machine-sla-extended[hidden], .machine-plan-list[hidden] { display: none !important; }

.machine-plan-list { border-top: 1px solid var(--border); }
.machine-plan-list__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 35px; padding: 5px 10px; background: var(--surface-subtle); color: var(--text-secondary); font-size: 12px; }
.machine-plan-list__summary { min-width: 0; }
.machine-plan-list__summary > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.machine-plan-list__summary small { color: var(--text-muted); }
.machine-group-select { min-height: 28px !important; padding: 3px 8px !important; white-space: nowrap; }

.machine-plan-row {
  display: grid;
  grid-template-columns: 28px minmax(230px, 1.7fr) minmax(88px, auto) minmax(92px, auto) minmax(260px, auto);
  align-items: center;
  gap: 6px 10px;
  min-height: 54px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}

.machine-plan-row:last-child { border-bottom: 0; }
.machine-plan-row:hover { background: var(--surface-subtle); }
.machine-plan-row__select { display: grid; place-items: center; }
.machine-plan-select { width: 17px; height: 17px; margin: 0; accent-color: var(--accent-primary); cursor: pointer; }
.machine-plan-row__main { min-width: 0; }
.machine-plan-row__title-line { display: flex; align-items: center; min-width: 0; gap: 6px; }
.machine-plan-row__name { overflow: hidden; color: var(--text-primary); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.machine-plan-row__specs { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: 10.5px; line-height: 1.35; }
.machine-plan-row__specs span + span::before { content: "·"; margin-right: 8px; color: var(--border-strong); }
.machine-plan-row__stock { min-width: 0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.machine-plan-row__price { white-space: nowrap; }
.machine-plan-row__price strong { color: var(--ui-card-price, var(--text-primary)); font-size: 15px; }
.machine-plan-row__price span { color: var(--text-muted); font-size: 10px; }
.machine-plan-row__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; min-width: 0; }
.machine-plan-action { min-height: 30px; padding: 4px 8px; border-radius: var(--radius-control); font-size: 11px; }
.machine-plan-row__actions .machine-plan-action--primary { min-width: 48px; }

.rankings-results-shell.is-comfortable .machine-plan-row { min-height: 68px; padding-top: 11px; padding-bottom: 11px; }
.rankings-results-shell.is-comfortable .machine-plan-row__specs { font-size: 11px; }

@media (max-width: 1020px) {
  .machine-sla-card__header { grid-template-columns: minmax(0, 1fr); }
  .machine-sla-card__network-summary { width: 100%; }
  .machine-plan-row { grid-template-columns: 28px minmax(0, 1fr) minmax(82px, auto) minmax(90px, auto); }
  .machine-plan-row__actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .rankings-page-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .rankings-page-meta { font-size: 11px; }
  .rankings-results-header, .rankings-view-toolbar, .rankings-selection-bar { align-items: stretch; flex-direction: column; }
  .rankings-live-status { align-self: flex-start; }
  .rankings-view-toolbar__actions, .rankings-selection-bar__actions { justify-content: stretch; }
  .rankings-view-toolbar__actions .btn, .rankings-selection-bar__actions .btn { flex: 1 1 120px; }
  .rankings-results-shell > .term-body { padding: 8px; }
  .machine-sla-card__header { padding: 9px 10px 7px; }
  .machine-sla-card__title-row h3 { font-size: 15px; }
  .machine-sla-compact-strip { align-items: flex-start; flex-direction: column; gap: 6px; }
  .machine-sla-compact-items { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machine-sla-compact-strip .btn { align-self: flex-start; }
  .machine-plan-list__heading { align-items: flex-start; flex-direction: column; }
  .machine-plan-list__summary { white-space: normal; }
  .machine-plan-list__summary > span { display: block; }
  .machine-plan-row { grid-template-columns: 26px minmax(0, 1fr) auto; min-height: 0; padding: 9px 8px; gap: 4px 8px; }
  .machine-plan-row__select { grid-row: 1 / span 2; align-self: start; padding-top: 3px; }
  .machine-plan-row__main { grid-column: 2; grid-row: 1; }
  .machine-plan-row__stock { grid-column: 3; grid-row: 1; align-self: start; text-align: right; }
  .machine-plan-row__price { grid-column: 2 / -1; grid-row: 2; }
  .machine-plan-row__actions { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; }
  .machine-plan-row__actions .machine-plan-action { flex: 1 1 64px; text-align: center; }
  .machine-plan-row__name { font-size: 12.5px; }
  .machine-plan-row__specs { max-height: 30px; }
  .rankings-selection-bar { top: 8px; }
}

/* v3.15.1 first-screen density pass: keep the first actionable node in view */
.rankings-page-heading { margin-top: .75rem; margin-bottom: .5rem; }
.rankings-page-kicker { margin-bottom: 2px; font-size: 11px; line-height: 1.25; }
.rankings-page-heading .section-title { font-size: clamp(22px, 2.8vw, 30px); line-height: 1.08; }
.rankings-page-heading .section-sub { margin-top: 4px; font-size: 12px; line-height: 1.35; }
.rankings-sticky-controls { margin-bottom: 7px; padding: 4px 0 0; }
.rankings-sticky-controls .rankings-filter-bar { gap: 8px; margin-bottom: 6px; padding: 6px 10px; }
.rankings-sticky-controls .ranking-tabs-unified { gap: 4px; }
.rankings-sticky-controls .ranking-tabs-unified { margin-top: 6px; margin-bottom: 8px; }
.rankings-sticky-controls .ranking-primary-tabs { padding: 3px 5px; }
.rankings-sticky-controls .rank-primary-tab { min-height: 32px; padding: 4px 10px; }
.rankings-sticky-controls .ranking-sub-tabs-scroller { padding: 3px 6px; }
.rankings-sticky-controls .sub-tab-btn { min-height: 28px; padding: 3px 9px; }
.rankings-results-shell > .term-body { padding: 8px; }
.rankings-results-shell .ranking-result-bar {
  min-height: 32px;
  margin-bottom: 6px !important;
  padding: 4px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.rankings-results-shell .ranking-result-summary { color: var(--text-muted); font-size: 11px; }
.rankings-results-shell .ranking-result-summary__query { margin-left: 6px; color: var(--accent-primary); }
.rankings-results-shell .ranking-result-summary__status { margin-left: 6px; color: var(--success); }
.rankings-results-shell .ranking-more-actions { margin: 0; }
.rankings-results-shell .ranking-more-actions > summary { min-height: 28px; padding: 4px 8px; }
.rankings-view-toolbar,
.rankings-selection-bar { margin-bottom: 7px; padding: 6px 8px; }
.rankings-view-toolbar__summary { align-items: baseline; }
.rankings-view-toolbar__summary .ranking-result-summary { display: inline; }

.rankings-results-shell .machine-group-toggle .sr-only,
.rankings-results-shell .rankings-selection-bar .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.machine-sla-card__header { padding: 7px 10px 6px; }
.machine-sla-card__eyebrow { margin-bottom: 2px; font-size: 10px; line-height: 1.2; }
.machine-sla-card__title-row h3 { font-size: 15px; }
.machine-group-toggle { width: 24px; height: 24px; flex-basis: 24px; font-size: 15px; }
.machine-sla-card__status-line { min-height: 0; }
.machine-sla-card__status-line .machine-live-state { padding: 2px 8px; line-height: 16px; }
.machine-sla-card__network-summary { min-height: 44px; padding: 5px 7px; }
.machine-sla-card__network-kicker { line-height: 1.2; }
.machine-sla-card__network-value { margin: 1px 0; line-height: 1.15; }
.machine-sla-card__network-method { line-height: 1.2; }
.machine-sla-compact-strip { min-height: 32px; margin: 5px 8px 4px; padding: 3px 6px; }
.machine-plan-list__heading { min-height: 32px; padding: 3px 8px; }
.machine-plan-list__summary { line-height: 1.2; white-space: nowrap; }
.machine-plan-list__summary > span { display: inline; }
.machine-group-select { min-height: 26px !important; padding: 2px 7px !important; }

@media (max-width: 640px) {
  .rankings-page-heading { margin-top: .5rem; margin-bottom: .5rem; }
  .rankings-sticky-controls { padding-top: 2px; }
  .rankings-sticky-controls .rankings-filter-bar { padding: 5px 8px; }
  .rankings-results-shell > .term-body { padding: 6px; }
}

/* v3.16: explorer workspace - filters, dense results and a persistent offer inspector. */
.rankings-page-heading { margin: 10px 0 14px; }
.rankings-page-heading .section-title { letter-spacing: -.025em; }
.rankings-page-tools { display: flex; min-width: 0; align-items: center; gap: 14px; }
.rankings-page-meta { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 5px 10px; color: var(--text-muted); font-size: 11px; }
.rankings-top-search { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 6px; width: clamp(250px, 29vw, 390px); }
.rankings-top-search input { min-width: 0; min-height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text-primary); font: inherit; font-size: 12px; }
.rankings-top-search input::placeholder { color: var(--text-dim); }
.rankings-top-search input:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.rankings-top-search .btn { min-height: 38px; padding-inline: 13px; }
.rankings-explorer-layout {
  display: grid;
  grid-template-columns: minmax(205px, 238px) minmax(0, 1fr) minmax(270px, 302px);
  align-items: start;
  gap: 12px;
  margin-bottom: 24px;
}
.rankings-explorer-layout > * { min-width: 0; }
.rankings-filter-rail {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: calc(var(--desktop-header-height, 68px) + 12px);
  min-width: 0;
}
.rankings-filter-rail .rankings-sticky-controls {
  display: grid;
  position: static;
  top: auto;
  z-index: auto;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.rankings-filter-rail .rankings-filter-bar,
.rankings-filter-rail .ranking-tabs-unified {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rankings-filter-rail .rankings-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.rankings-filter-rail .filter-group-search,
.rankings-filter-rail .filter-actions { width: 100%; }
.rankings-filter-rail .local-filter-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.rankings-filter-rail .filter-input--local { min-width: 0; }
.rankings-filter-rail .advanced-filter-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.rankings-filter-rail .filter-group { min-width: 0; }
.rankings-filter-rail .filter-select { width: 100%; min-width: 0; }
.rankings-filter-rail .filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.rankings-filter-rail .filter-actions .btn { min-width: 0; padding-inline: 8px; }
.rankings-filter-rail .mobile-filter-toggle,
.rankings-filter-rail .mobile-ranking-sort { display: none; }
.rankings-filter-rail .ranking-tabs-unified { overflow: hidden; }
.rankings-filter-rail .ranking-primary-tabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 0 0 9px; }
.rankings-filter-rail .rank-primary-tab { justify-content: flex-start; min-height: 36px; padding-inline: 10px; text-align: left; }
.rankings-filter-rail .ranking-sub-tabs-scroller { padding: 8px 0 0; }
.rankings-filter-rail .ranking-sub-tabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.rankings-filter-rail .sub-tab-btn { justify-content: flex-start; min-height: 34px; padding-inline: 10px; text-align: left; }
.rankings-explorer-layout > .qualification-box { grid-column: 2; min-width: 0; margin: 0 0 8px; }
.rankings-explorer-layout > .rankings-explorer-results { grid-column: 2; min-width: 0; }
.rankings-explorer-results .rankings-results-header span:not(.rankings-live-status):not(.status-dot) { line-height: 1.4; }
.rankings-explorer-results > .term-body { padding: 10px; }
.rankings-explorer-results .ranking-method-note { margin-bottom: 8px !important; padding: 7px 9px !important; font-size: 11px !important; line-height: 1.5 !important; }
.rankings-explorer-results .rankings-view-toolbar { justify-content: flex-end; margin-bottom: 8px; }
.rankings-explorer-results .rankings-view-toolbar__actions { gap: 5px; }
.rankings-explorer-results .rankings-view-toolbar__actions .btn { min-height: 32px; padding-inline: 8px; font-size: 11px; }
.rankings-explorer-table__header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(76px, auto) minmax(86px, auto) minmax(70px, auto) minmax(70px, auto);
  gap: 6px 8px;
  padding: 7px 9px;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: var(--radius-control) var(--radius-control) 0 0;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 650;
}
.rankings-explorer-table { min-width: 0; }
.rankings-explorer-table__header > [role="columnheader"] { min-width: 0; font-size: 10px; }
.rankings-explorer-list { overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 0 0 var(--radius-control) var(--radius-control); background: var(--surface); }
.rankings-explorer-list .machine-plan-row:first-child { border-top: 0; }
.rankings-explorer-results .machine-plan-row {
  grid-template-columns: 24px minmax(0, 1fr) minmax(76px, auto) minmax(86px, auto) minmax(70px, auto) minmax(70px, auto);
  gap: 6px 8px;
  min-height: 54px;
  padding: 7px 9px;
}
.rankings-explorer-results .machine-plan-row__name {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.rankings-explorer-results .machine-plan-row__name:hover { color: var(--accent-primary); }
.rankings-explorer-results .machine-plan-row__name:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }
.rankings-explorer-results .machine-plan-row.is-inspected { background: color-mix(in srgb, var(--accent-primary) 8%, var(--surface)); box-shadow: inset 2px 0 var(--accent-primary); }
.rankings-explorer-results .machine-plan-row__location { display: flex; min-width: 0; gap: 5px; margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: 10.5px; line-height: 1.25; }
.rankings-explorer-results .machine-plan-row__location span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankings-explorer-results .machine-plan-row__specs { gap: 2px 7px; font-size: 11px; }
.rankings-explorer-results .machine-plan-row__stock { justify-self: start; padding: 4px 7px; font-size: 10px; }
.rankings-explorer-results .machine-plan-row__price strong { font-size: 14px; }
.rankings-explorer-results .machine-plan-row__sla { justify-self: start; padding: 4px 7px; border: 1px solid var(--success-border); border-radius: var(--radius-full); background: var(--success-bg); color: var(--success); font-family: var(--font-mono); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rankings-explorer-results .machine-plan-row__sla[data-state="collecting"] { border-color: var(--border-subtle); background: var(--surface-subtle); color: var(--text-muted); }
.rankings-explorer-results .machine-plan-row__updated { display: grid; min-width: 0; gap: 1px; color: var(--text-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rankings-explorer-results .machine-plan-row__updated small { color: var(--text-dim); font-size: 9.5px; }
.rankings-explorer-results .machine-plan-row__actions { display: none !important; }
.rankings-explorer-results .offer-activity-timeline { display: none; }
.rankings-explorer-empty { display: grid; min-height: 180px; padding: 20px; place-content: center; justify-items: center; gap: 8px; color: var(--text-muted); text-align: center; }
.rankings-explorer-empty [role="cell"] { display: grid; justify-items: center; gap: 8px; }
.rankings-explorer-empty strong { color: var(--text-primary); font-size: 14px; }
.rankings-explorer-empty .btn { min-height: 36px; margin-top: 4px; }
.rankings-plan-inspector {
  grid-column: 3;
  grid-row: 1 / span 3;
  position: sticky;
  top: calc(var(--desktop-header-height, 68px) + 12px);
  min-width: 0;
  overflow: hidden auto;
  max-height: calc(100vh - var(--desktop-header-height, 68px) - 24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rankings-plan-inspector__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.rankings-plan-inspector__eyebrow { color: var(--text-muted); font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.rankings-plan-inspector__header h2 { margin: 2px 0 0; color: var(--text-primary); font-size: 15px; line-height: 1.25; }
.rankings-plan-inspector__close { display: none; min-height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--text-secondary); font: inherit; cursor: pointer; }
.rankings-plan-inspector__empty { display: grid; min-height: 190px; padding: 20px; align-content: center; gap: 6px; color: var(--text-muted); font-size: 12px; text-align: center; }
.rankings-plan-inspector__empty strong { color: var(--text-primary); font-size: 14px; }
.rankings-plan-inspector__body { padding: 12px; }
.rankings-plan-inspector__identity { display: grid; gap: 7px; }
.rankings-plan-inspector__context { display: flex; min-width: 0; gap: 6px; color: var(--text-muted); font-size: 11px; }
.rankings-plan-inspector__context span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankings-plan-inspector__identity h3 { margin: 0; overflow-wrap: anywhere; color: var(--text-primary); font-size: 18px; line-height: 1.3; }
.rankings-plan-inspector__stock { justify-self: start; padding: 4px 8px; border: 1px solid var(--success-border); border-radius: var(--radius-full); background: var(--success-bg); color: var(--success); font-size: 10px; font-weight: 700; }
.rankings-plan-inspector__stock[data-state="sold_out"] { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }
.rankings-plan-inspector__updated { color: var(--text-muted); font-size: 10px; }
.rankings-plan-inspector__updated time { margin-left: 4px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rankings-plan-inspector__price { display: flex; align-items: baseline; gap: 4px; margin: 12px 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); }
.rankings-plan-inspector__price strong { color: var(--ui-card-price, var(--text-primary)); font-family: var(--font-mono); font-size: 28px; font-variant-numeric: tabular-nums; }
.rankings-plan-inspector__price span { color: var(--text-muted); font-size: 11px; }
.rankings-plan-inspector__primary-actions { display: grid; gap: 7px; }
.rankings-plan-inspector__primary-actions .btn { display: flex; min-height: 42px; align-items: center; justify-content: center; }
.rankings-plan-inspector__primary-actions [hidden] { display: none !important; }
.rankings-plan-inspector__machine-link { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.rankings-plan-inspector__machine-link:hover { color: var(--accent-primary); }
.rankings-plan-inspector__sold-out { display: flex; min-height: 40px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-control); color: var(--text-muted); font-size: 12px; }
.rankings-plan-inspector__quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.rankings-plan-inspector__quick-actions .btn { min-width: 0; min-height: 38px; padding: 0 5px; font-size: 10px; }
.rankings-plan-inspector__section { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border-subtle); }
.rankings-plan-inspector__section h3 { margin: 0 0 8px; color: var(--text-primary); font-size: 12px; }
.rankings-plan-inspector__section dl { display: grid; margin: 0; }
.rankings-plan-inspector__section dl > div { display: grid; grid-template-columns: minmax(78px, .8fr) minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 11px; }
.rankings-plan-inspector__section dt { color: var(--text-muted); }
.rankings-plan-inspector__section dd { margin: 0; color: var(--text-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rankings-plan-inspector__network > div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 10px; }
.rankings-plan-inspector__network > div span { color: var(--text-muted); }
.rankings-plan-inspector__network > div strong { color: var(--text-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rankings-plan-inspector__network > small { display: block; margin-top: 4px; color: var(--text-dim); font-size: 9px; line-height: 1.45; }

/* Overview event cards shrink to their data instead of reserving empty vertical space. */
.market-activity__panel > div[style*="flex-direction:column"] { gap: 8px !important; }
.market-activity__panel .home-action-card {
  min-height: 0 !important;
  height: auto !important;
  padding: 11px 13px !important;
  align-content: start !important;
  gap: 7px !important;
  border-left-width: 2px !important;
}
.market-activity__panel .home-action-card .action-card-header { min-height: 0 !important; margin: 0 !important; gap: 8px; }
.market-activity__panel .home-action-card__identity { gap: 3px !important; }
.market-activity__panel .home-action-card__primary-title { gap: 7px; }
.market-activity__panel .home-action-card__region { min-height: 23px; border-radius: 6px; font-size: 10px; }
.market-activity__panel .home-action-card__host { font-size: 14px; line-height: 1.25; }
.market-activity__panel .home-action-card__plan { font-size: 11px; }
.market-activity__panel .home-action-card__badges { gap: 4px !important; }
.market-activity__panel .home-action-card__signals { grid-template-rows: none; min-height: 0 !important; margin: 0 !important; gap: 2px !important; }
.market-activity__panel .home-action-card__signal-line { gap: 5px; }
.market-activity__panel .home-action-card .action-card-specs { min-height: 0; padding: 5px 0; }
.market-activity__panel .home-action-card .action-card-specs .spec-item { min-height: 0; padding-top: 2px; padding-bottom: 2px; font-size: 11px; }
.market-activity__panel .home-action-card .action-card-footer { grid-template-columns: minmax(82px, auto) minmax(0, 1fr) !important; align-items: center; gap: 8px; padding-top: 7px; border-top: 1px solid var(--border-subtle); }
.market-activity__panel .home-action-card__price .price-display { font-size: 18px; }
.market-activity__panel .home-action-card__actions { grid-template-columns: minmax(0, 1fr) minmax(100px, 1.05fr); gap: 6px; }
.market-activity__panel .home-action-card__secondary-actions { gap: 4px; }
.market-activity__panel .home-action-card__actions .btn { min-height: 34px; padding-inline: 5px; font-size: 11px; }

@media (max-width: 1190px) and (min-width: 1021px) {
  .rankings-explorer-layout { grid-template-columns: minmax(190px, 215px) minmax(0, 1fr) minmax(250px, 270px); gap: 9px; }
}
@media (max-width: 1020px) {
  .rankings-explorer-layout > .rankings-plan-inspector {
    display: none;
    position: fixed;
    z-index: 55;
    inset: auto 0 0;
    width: min(100%, 720px);
    max-height: min(78vh, 680px);
    margin-inline: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 42px rgba(0, 0, 0, .28);
  }
  .rankings-explorer-layout > .rankings-plan-inspector.is-open { display: block; }
  .rankings-plan-inspector__close { display: inline-flex; align-items: center; }
  .rankings-plan-inspector__body { overflow-y: auto; max-height: calc(78vh - 66px); }
}
@media (max-width: 1020px) and (min-width: 761px) {
  .rankings-explorer-layout { grid-template-columns: minmax(190px, 220px) minmax(0, 1fr); gap: 10px; }
  .rankings-filter-rail { grid-row: 1 / span 2; }
  .rankings-explorer-layout > .qualification-box,
  .rankings-explorer-layout > .rankings-explorer-results,
  .rankings-plan-inspector { grid-column: 2; }
  .rankings-plan-inspector { grid-row: auto; position: static; max-height: none; }
  .rankings-explorer-results .rankings-explorer-table__header,
  .rankings-explorer-results .machine-plan-row { grid-template-columns: 22px minmax(90px, 1fr) minmax(62px, auto) minmax(70px, auto) minmax(58px, auto) minmax(56px, auto); column-gap: 5px; }
  .rankings-explorer-results .machine-plan-row__name { font-size: 11.5px; }
  .rankings-explorer-results .machine-plan-row__specs { gap: 2px 5px; font-size: 9px; }
  .rankings-explorer-results .machine-plan-row__stock,
  .rankings-explorer-results .machine-plan-row__sla { padding-inline: 5px; font-size: 9px; }
  .rankings-explorer-results .machine-plan-row__updated { font-size: 9.5px; }
}
@media (max-width: 760px) {
  .rankings-explorer-layout { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .rankings-filter-rail,
  .rankings-explorer-layout > .qualification-box,
  .rankings-explorer-layout > .rankings-explorer-results { grid-column: 1; grid-row: auto; position: static; }
  .rankings-filter-rail .rankings-sticky-controls { gap: 7px; }
  .rankings-filter-rail .rankings-filter-bar,
  .rankings-filter-rail .ranking-tabs-unified { padding: 9px; }
  .rankings-filter-rail .ranking-primary-tabs { display: flex; overflow-x: auto; }
  .rankings-filter-rail .rank-primary-tab { flex: 0 0 auto; min-height: 38px; }
  .rankings-filter-rail .ranking-sub-tabs { display: flex; overflow-x: auto; }
  .rankings-filter-rail .sub-tab-btn { flex: 0 0 auto; min-height: 38px; }
  .rankings-page-heading { align-items: stretch; flex-direction: column; }
  .rankings-page-tools { width: 100%; align-items: flex-start; flex-direction: column; gap: 7px; }
  .rankings-top-search { grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .rankings-filter-rail .mobile-filter-toggle { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: center; gap: 8px; }
  .rankings-filter-rail #mobileFilters { display: none; }
  .rankings-filter-rail #mobileFilters.is-open { display: grid; }
  .rankings-explorer-table__header { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .rankings-explorer-table__header > [role="columnheader"]:nth-child(5) { display: none; }
  .rankings-explorer-results .machine-plan-row { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 8px; }
  .rankings-explorer-results .machine-plan-row__sla { display: none; }
  .rankings-explorer-results .machine-plan-row__select { grid-column: 1; grid-row: 1 / span 2; }
  .rankings-explorer-results .machine-plan-row__main { grid-column: 2; grid-row: 1; }
  .rankings-explorer-results .machine-plan-row__stock { grid-column: 3; grid-row: 1; }
  .rankings-explorer-results .machine-plan-row__price { grid-column: 2; grid-row: 2; }
  .rankings-explorer-results .machine-plan-row__updated { grid-column: 3; grid-row: 2; justify-self: end; }
  .rankings-explorer-results .machine-plan-row__specs { max-height: 34px; font-size: 10.5px; }
  .market-activity__panel .home-action-card { padding: 10px !important; }
  .market-activity__panel .home-action-card .action-card-footer { grid-template-columns: minmax(0, 1fr) !important; }
  .market-activity__panel .home-action-card__actions { grid-template-columns: minmax(0, 1fr) minmax(104px, .9fr); }
  .market-activity__panel .home-action-card__actions .btn { min-height: 40px; }
}
@media (max-width: 420px) {
  .rankings-explorer-results .machine-plan-row__stock { padding: 3px 5px; font-size: 9px; }
  .rankings-explorer-results .machine-plan-row__updated { font-size: 9px; }
  .rankings-plan-inspector__price strong { font-size: 25px; }
  .market-activity__panel .home-action-card .action-card-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .market-activity__panel .home-action-card .action-card-specs .spec-item { min-height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .rankings-explorer-results .machine-plan-row,
  .rankings-plan-inspector,
  .market-activity__panel .home-action-card { transition: none !important; }
}
