:root {
  color-scheme: light;
  --ink: #11151a;
  --muted: #64707c;
  --subtle: #8b96a3;
  --line: #dce2e8;
  --line-strong: #c7d0d9;
  --panel: #ffffff;
  --panel-raised: #f8fafc;
  --wash: #eef2f6;
  --canvas: #e9eef3;
  --graphite: #171d23;
  --graphite-2: #2b333c;
  --green: #15a371;
  --green-soft: rgba(21, 163, 113, 0.12);
  --gold: #b8892d;
  --gold-soft: rgba(184, 137, 45, 0.16);
  --bitcoin: #f7931a;
  --danger: #b94444;
  --shadow: 0 18px 48px rgba(17, 24, 32, 0.12);
  --soft-shadow: 0 10px 28px rgba(17, 24, 32, 0.08);
  --radius: 8px;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f7f8f9;
  --muted: #aeb8c3;
  --subtle: #7f8a96;
  --line: #2e3843;
  --line-strong: #45515e;
  --panel: #12171d;
  --panel-raised: #171e25;
  --wash: #1d252e;
  --canvas: #090d11;
  --graphite: #f4f6f8;
  --graphite-2: #d7dde4;
  --green: #25c88d;
  --green-soft: rgba(37, 200, 141, 0.15);
  --gold: #f2b34d;
  --gold-soft: rgba(242, 179, 77, 0.18);
  --bitcoin: #ff9f2f;
  --danger: #ff7777;
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.38);
  --soft-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .market-main,
body[data-theme="dark"] .quote-panel,
body[data-theme="dark"] .dashboard-sidebar,
body[data-theme="dark"] .wallet-entry {
  background: color-mix(in srgb, var(--panel) 92%, #000);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 21, 26, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 21, 26, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(247, 147, 26, 0.08), transparent 34rem),
    var(--canvas);
  background-size: 28px 28px, 28px 28px, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body[data-theme="dark"] {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(247, 147, 26, 0.08), transparent 34rem),
    var(--canvas);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

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

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(300px, 1fr) minmax(430px, auto);
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 12px clamp(16px, 3vw, 38px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(17, 24, 32, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand > img {
  width: 174px;
  max-width: min(174px, 43vw);
  height: 44px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
}

.brand-seal {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--bitcoin) 42%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(247, 147, 26, 0.16), rgba(255, 255, 255, 0.08)),
    var(--panel-raised);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 24px rgba(247, 147, 26, 0.14);
}

.brand-seal img {
  width: 23px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 4px 9px rgba(247, 147, 26, 0.34));
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  max-width: 190px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  display: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.nav a,
.support-link,
.theme-toggle,
.surface-switcher a,
.status-pill,
.quote-head span,
.icon-button,
.card-top button,
.actions button,
.wallet-form button,
.supplier-upload button,
#refreshOpsEvents {
  border-radius: var(--radius);
}

.nav a,
.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.nav a[aria-current="true"],
.surface-switcher a[aria-current="true"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--gold) 14%, var(--wash));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 32%, transparent);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.select-shell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  max-width: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  color: var(--muted);
  background: var(--panel-raised);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.select-shell select {
  min-height: 30px;
  min-width: 0;
  max-width: 132px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.theme-toggle,
.support-link {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-raised);
}

.theme-toggle {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}

.support-link {
  min-width: 182px;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
}

[data-surface],
#app [data-surface] {
  display: none;
}

#app[data-active-surface="supplier"] [data-surface~="supplier"],
#app[data-active-surface="marketplace"] [data-surface~="marketplace"],
#app[data-active-surface="sales"] [data-surface~="sales"] {
  display: grid;
}

.surface-intro,
.section-head {
  color: #fff;
  background:
    linear-gradient(112deg, rgba(8, 10, 12, 0.98) 0%, rgba(21, 26, 31, 0.91) 48%, rgba(28, 34, 40, 0.76) 100%),
    url("assets/marketplace-concept.png") center / cover;
}

.surface-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(18px, 3vw, 32px);
  align-items: stretch;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--shadow);
}

.surface-intro h1 {
  max-width: 890px;
  margin: 0;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

.surface-intro p:not(.kicker) {
  max-width: 740px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.wallet-entry {
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.wallet-entry span,
.wallet-entry li,
.dashboard-command span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.surface-intro .wallet-entry span,
.surface-intro .wallet-entry li {
  color: rgba(255, 255, 255, 0.66);
}

.wallet-entry strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wallet-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.wallet-actions button:first-child {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.72), rgba(247, 147, 26, 0.32));
}

.wallet-entry ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.surface-switcher {
  display: grid;
  gap: 10px;
}

.surface-switcher a {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.surface-switcher a[aria-current="true"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.38), rgba(21, 163, 113, 0.16));
}

.market-grid {
  grid-template-columns: 248px minmax(0, 1fr) minmax(340px, 390px);
  gap: 14px;
  align-items: start;
}

.market-main,
.quote-panel,
.dashboard-sidebar,
.role-band,
.supplier-band,
.wallet-dashboard,
.ops-portal,
.bundle-panel,
.pipeline-panel,
.supplier-upload {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
}

.dashboard-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  padding: 14px;
}

.dashboard-sidebar nav,
.trust-stack {
  display: grid;
  gap: 7px;
}

.dashboard-sidebar a,
.trust-stack article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.dashboard-sidebar a[aria-current="page"],
.dashboard-sidebar a:hover {
  color: var(--ink);
  background: var(--wash);
}

.dashboard-sidebar a span,
.trust-stack article span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--gold);
  background: var(--panel-raised);
  font-weight: 900;
}

.trust-stack {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.trust-stack article {
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 64px;
}

.trust-stack strong,
.trust-stack small {
  display: block;
}

.trust-stack small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.market-main {
  min-width: 0;
  overflow: hidden;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 18px clamp(16px, 3vw, 26px);
}

.section-head h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 170px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 7px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill:first-child {
  border-color: rgba(37, 200, 141, 0.5);
  background: rgba(21, 163, 113, 0.18);
}

.status-pill.muted {
  color: rgba(255, 255, 255, 0.78);
}

.toolbar {
  display: flex;
  gap: 12px;
  padding: 16px clamp(16px, 3vw, 26px);
  border-bottom: 1px solid var(--line);
  background: var(--panel-raised);
}

.dashboard-command {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 210px) minmax(170px, 230px);
  gap: 10px;
  padding: 14px clamp(16px, 3vw, 26px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.dashboard-command label,
.dashboard-command div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dashboard-command input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--panel-raised);
  outline: 0;
}

.dashboard-command div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--panel-raised);
}

.dashboard-command strong {
  font-size: 13px;
}

.toolbar label,
.quote-panel label,
.wallet-form label,
.supplier-upload label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.toolbar label {
  flex: 1 1 0;
}

.toolbar select,
.quote-panel input,
.quote-panel select,
.quote-panel textarea,
.wallet-form input,
.supplier-upload input,
.supplier-upload textarea,
.role-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  color: var(--ink);
  background: var(--panel);
  text-transform: none;
  outline: 0;
}

.toolbar select:focus,
.quote-panel input:focus,
.quote-panel select:focus,
.quote-panel textarea:focus,
.wallet-form input:focus,
.supplier-upload input:focus,
.supplier-upload textarea:focus,
.role-grid select:focus {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px clamp(16px, 3vw, 26px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.market-stats div,
.product-card dl div,
.spec-grid div,
.quote-summary div,
.role-grid label,
.role-grid div,
.ops-board article,
.pipeline-flow span,
.upload-state,
.empty-state,
.compatibility-panel,
.bundle-card,
.ops-event {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
}

.market-stats div {
  padding: 12px;
}

.market-stats span,
.role-grid span,
.ops-board span,
dt,
.quote-summary span,
.ops-event span,
.ops-board small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.carousel-wrap {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  padding: 20px clamp(14px, 3vw, 26px);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-raised);
  font-size: 24px;
  line-height: 1;
}

.product-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 312px);
  gap: 14px;
  overflow-x: auto;
  padding: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.product-card {
  display: grid;
  grid-template-rows: auto 154px auto minmax(48px, auto) auto;
  gap: 12px;
  min-height: 396px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, var(--gold) 8%), var(--panel) 42%),
    var(--panel);
  box-shadow: var(--soft-shadow);
  scroll-snap-align: start;
}

.product-card.active {
  border-color: color-mix(in srgb, var(--green) 70%, var(--line));
  box-shadow: 0 0 0 3px var(--green-soft), var(--soft-shadow);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-top span {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-top button,
.actions button,
.wallet-form button,
.supplier-upload button,
#refreshOpsEvents {
  min-height: 38px;
  border: 0;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
}

.card-top button,
.secondary,
#refreshOpsEvents {
  color: var(--ink);
  background: var(--wash);
}

.miner-visual,
.product-media {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: 154px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent),
    color-mix(in srgb, var(--wash) 86%, var(--gold) 14%);
  overflow: hidden;
}

.product-media {
  margin: 0;
  padding: 10px;
}

.product-media img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(17, 20, 24, 0.22));
}

body[data-theme="dark"] .miner-visual {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent),
    color-mix(in srgb, var(--wash) 88%, var(--gold) 12%);
}

.miner-visual::before {
  content: "";
  position: absolute;
  inset: auto 28px 16px;
  height: 18px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(13px);
}

.miner-face {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 172px;
  height: 92px;
  padding-top: 17px;
  border: 1px solid #79828c;
  border-radius: 7px;
  background: linear-gradient(145deg, #e3e7eb, #f8fafc);
  box-shadow: 0 18px 28px rgba(17, 20, 24, 0.18);
}

body[data-theme="dark"] .miner-face {
  border-color: #4d5967;
  background: linear-gradient(145deg, #27313b, #636d78);
}

.miner-face span {
  width: 40px;
  height: 40px;
  border: 8px solid #2b333c;
  border-radius: 50%;
  background: radial-gradient(circle, #cbd3dc 0 22%, #7e8995 24% 100%);
}

.miner-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 190px;
  height: 34px;
  margin-top: -4px;
  padding: 7px;
  border-radius: 0 0 7px 7px;
  background: #2b333c;
}

.miner-body i {
  display: block;
  border-radius: 4px;
  background: #87919c;
}

.miner-visual b {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--bitcoin);
  font-size: 11px;
  font-weight: 900;
}

.product-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.16;
}

.product-card p,
.bundle-card span,
.compatibility-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-card dl,
.spec-grid {
  display: grid;
  gap: 8px;
  margin: 0;
}

.product-card dl {
  grid-template-columns: 1fr 1fr;
}

.product-card dl div,
.spec-grid div,
.quote-summary div {
  padding: 10px;
}

dd,
.quote-summary strong {
  display: block;
  margin: 4px 0 0;
  font-size: 14px;
}

.compare-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 20px;
  padding: 22px clamp(16px, 3vw, 26px) 26px;
  border-top: 1px solid var(--line);
}

.bundle-panel {
  display: grid;
  gap: 18px;
  padding: 22px clamp(16px, 3vw, 26px) 26px;
  border-top: 1px solid var(--line);
  box-shadow: none;
}

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.bundle-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
}

.bundle-card.active {
  border-color: color-mix(in srgb, var(--green) 62%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--panel));
}

.bundle-card.muted {
  color: var(--muted);
}

.bundle-card b {
  color: var(--green);
}

.compatibility-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--ink) !important;
  background: var(--panel-raised);
  text-transform: none !important;
}

.check-row input {
  width: auto;
  min-height: 0;
  accent-color: var(--green);
}

.check-row span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  line-height: 1.35;
}

.cart-upsell {
  display: grid;
  gap: 8px;
}

.compare-copy h2,
.bundle-panel h2,
.role-band h2,
.wallet-dashboard h2,
.supplier-band h2,
.ops-copy h2,
.quote-head h2,
.pipeline-panel h2,
.supplier-upload h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
}

.compare-copy p:not(.kicker),
.bundle-panel p,
.role-band p,
.wallet-dashboard p,
.supplier-band p,
.ops-copy p,
.pipeline-panel p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.55;
}

.spec-grid {
  grid-template-columns: 1fr 1fr;
}

.quote-panel {
  position: sticky;
  top: 98px;
  padding: 18px;
}

.order-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  padding: 0 clamp(16px, 3vw, 26px) 22px;
}

.order-strip article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-raised);
}

.order-strip span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.order-strip small {
  color: var(--muted);
  line-height: 1.35;
}

.quote-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.quote-head span {
  align-self: start;
  border: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--muted);
  background: var(--panel-raised);
  font-size: 12px;
  font-weight: 900;
}

form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row.compact {
  grid-template-columns: 120px 1fr;
}

.quote-panel textarea,
.supplier-upload textarea {
  min-height: 96px;
  resize: vertical;
}

#receiptEmail {
  color: var(--muted);
  background: var(--wash);
}

.quote-summary {
  display: grid;
  gap: 8px;
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 74%, #0b5));
}

.primary:hover,
.card-top button:hover,
.secondary:hover,
#refreshOpsEvents:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
}

.wallet-dashboard,
.role-band,
.supplier-band,
.ops-portal,
.pipeline-grid {
  margin-top: 22px;
}

.wallet-dashboard {
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.wallet-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wallet-form button,
.wallet-form .upload-state {
  grid-column: 1 / -1;
}

.role-band,
.supplier-band {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.role-grid,
.supplier-steps {
  display: grid;
  gap: 10px;
  align-content: center;
}

.role-grid label,
.role-grid div,
.supplier-steps span {
  padding: 14px;
}

.role-grid strong,
.ops-board strong {
  font-size: 15px;
  line-height: 1.35;
}

.ops-portal {
  grid-template-columns: minmax(0, 0.85fr) minmax(460px, 1.15fr);
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.ops-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-content: center;
}

.ops-board article {
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 14px;
}

.ops-board article:nth-child(2) {
  border-color: color-mix(in srgb, var(--gold) 46%, var(--line));
}

.ops-board article:nth-child(3) {
  border-color: color-mix(in srgb, var(--green) 46%, var(--line));
}

.ops-board small,
.ops-event span {
  color: var(--green);
}

.ops-events {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
}

.ops-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-events-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ops-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.ops-event strong {
  display: block;
  margin-top: 4px;
}

.ops-event time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.ops-event pre {
  grid-column: 1 / -1;
  max-height: 180px;
  overflow: auto;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.pipeline-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 24px;
}

.pipeline-panel,
.supplier-upload {
  padding: clamp(22px, 4vw, 34px);
}

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.pipeline-flow span,
.supplier-steps span {
  font-weight: 900;
}

.supplier-steps {
  grid-template-columns: 1fr 1fr;
}

.supplier-upload {
  display: grid;
  gap: 14px;
}

.upload-state,
.empty-state {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.upload-state[data-state="ready"] {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
}

.upload-state[data-state="error"] {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}

@media (prefers-reduced-motion: no-preference) {
  .primary,
  .secondary,
  .card-top button,
  .theme-toggle,
  .icon-button {
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-tools {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .market-grid,
  .wallet-dashboard,
  .role-band,
  .supplier-band,
  .ops-portal,
  .pipeline-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-sidebar nav {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .trust-stack {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .quote-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: start;
    padding: 12px 14px;
  }

  .brand-seal {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .support-link {
    width: 100%;
    max-width: none;
  }

  .select-shell {
    flex: 1 1 190px;
    max-width: none;
    justify-content: space-between;
  }

	  .surface-intro,
	  .section-head,
	  .dashboard-command,
	  .compare-panel,
	  .form-row,
	  .form-row.compact,
	  .actions,
	  .order-strip {
	    grid-template-columns: 1fr;
	  }

  .section-head {
    display: grid;
  }

  .surface-intro h1,
  .section-head h1 {
    font-size: clamp(30px, 11vw, 44px);
  }

  .status-stack {
    align-items: flex-start;
  }

	  .toolbar {
	    flex-direction: column;
	  }

  .dashboard-sidebar nav,
  .trust-stack,
  .wallet-actions {
    grid-template-columns: 1fr;
  }

  .carousel-wrap {
    grid-template-columns: 1fr;
  }

  .market-stats,
  .spec-grid,
  .bundle-grid,
  .wallet-form,
  .supplier-steps,
  .product-card dl,
  .ops-board,
  .pipeline-flow {
    grid-template-columns: 1fr;
  }

  .icon-button {
    display: none;
  }

  .product-rail {
    grid-auto-columns: minmax(244px, 84vw);
  }
}
