:root {
  --paper: #f7f3e8;
  --paper-2: #eee7d4;
  --ink: #11120f;
  --ink-2: #2a2d28;
  --muted: #60665e;
  --line: #cbc2a7;
  --panel: #fffaf0;
  --black: #10120f;
  --black-2: #1b1f1a;
  --lime: #9ee493;
  --green: #168958;
  --orange: #f28c28;
  --red: #c6452c;
  --steel: #6e787d;
  --blueprint: #d9f3ff;
  --shadow: 0 24px 60px rgba(17, 18, 15, 0.16);
  --hard-shadow: 8px 8px 0 rgba(17, 18, 15, 0.92);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(90deg, rgba(17,18,15,0.045) 1px, transparent 1px),
    linear-gradient(rgba(17,18,15,0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}
body.drawer-open, body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: .11;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(17,18,15,.28) 6px 7px);
  mix-blend-mode: multiply;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 3px solid var(--black);
  background: rgba(247, 243, 232, .94);
  backdrop-filter: blur(14px);
}
.brand, .top-actions, .nav, .hero-actions, .stage-readout, .listing-meta { display: flex; align-items: center; }
.brand { gap: 10px; min-width: 0; font-weight: 950; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid var(--black);
  border-radius: 6px;
  background: var(--lime);
  color: var(--black);
  box-shadow: 4px 4px 0 var(--black);
  font-size: 14px;
}
.brand-stack { display: grid; line-height: 1.05; }
.brand-stack small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0; }
.nav { justify-content: center; flex-wrap: wrap; gap: 6px; }
.nav a {
  min-height: 34px;
  padding: 7px 10px;
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 900;
}
.nav a:hover { border-color: var(--black); background: var(--panel); }
.top-actions { justify-content: flex-end; gap: 8px; }
.button, .icon-button {
  border: 3px solid var(--black);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
  transition: transform .12s ease, box-shadow .12s ease;
}
.button { min-height: 44px; padding: 10px 15px; }
.button.compact { min-height: 38px; padding: 8px 12px; }
.button.primary { background: var(--orange); }
.button.ghost { background: var(--blueprint); }
.button:hover, .icon-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--black); }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
}
.button-icon { font-size: 15px; }
.command-hero, .console-section, .section {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) clamp(14px, 3vw, 34px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.18fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}
.mission-panel, .stage-panel, .console-sidebar, .configurator, .spec-panel, .catalog-card, .repair-form, .service-card, .open-grid article, .finance-grid div, .quote-drawer, .login-card {
  border: 3px solid var(--black);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--hard-shadow);
}
.mission-panel { padding: clamp(22px, 4vw, 44px); }
.eyebrow, .panel-label {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, .section h2, .console-sidebar h2, .banyo h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 7vw, 104px);
  line-height: .9;
  letter-spacing: 0;
}
.section h2, .console-sidebar h2, .banyo h2 { font-size: clamp(31px, 4.8vw, 70px); }
.lead, .section-heading p, .banyo-copy p, .console-sidebar p {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
}
.hero-actions { flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}
.signal-strip div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px;
  border: 2px solid var(--black);
  border-radius: 7px;
  background: var(--paper-2);
}
.signal-strip strong { font-size: clamp(22px, 3vw, 34px); line-height: 1; }
.signal-strip span { color: var(--muted); font-size: 12px; font-weight: 850; }
.stage-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  overflow: hidden;
  background: var(--black);
  color: var(--paper);
}
.stage-head, .drawer-head, .split-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.stage-head { padding: 16px; border-bottom: 2px solid rgba(247,243,232,.18); }
.stage-head .eyebrow { color: var(--lime); }
#buildCanvas { display: block; width: 100%; height: 100%; min-height: 440px; }
.stage-readout {
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 2px solid rgba(247,243,232,.18);
  background: #171a16;
  font-weight: 1000;
}
.status, .tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.status.ok { background: #dcf8d7; color: #11623f; }
.status.warn, .tag.warn { background: #ffe2b8; color: #8a4c05; }
.status.danger { background: #ffe0d8; color: var(--red); }
.console-section {
  display: grid;
  grid-template-columns: minmax(250px, .7fr) minmax(340px, 1.25fr) minmax(260px, .85fr);
  gap: 18px;
  align-items: start;
}
.console-sidebar, .spec-panel { padding: 20px; }
.configurator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}
label { display: grid; gap: 6px; color: var(--ink-2); font-size: 12px; font-weight: 950; text-transform: uppercase; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--black);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fffdf6;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}
textarea { resize: vertical; text-transform: none; }
.wide { grid-column: 1 / -1; }
.warnings { display: grid; gap: 9px; margin-top: 18px; }
.warning {
  padding: 10px 12px;
  border: 2px solid var(--black);
  border-left-width: 8px;
  border-radius: 6px;
  background: #fff8dc;
  color: #60420d;
  font-size: 13px;
  font-weight: 850;
}
.warning.danger { background: #ffe0d8; color: #742716; }
.warning.ok { background: #e8fadc; color: #164d30; }
.spec-panel strong { display: block; margin-bottom: 12px; font-size: 20px; line-height: 1.1; }
.spec-list { display: grid; gap: 8px; margin: 0; }
.spec-list div, .catalog-specs div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 2px dotted var(--line);
}
dt { color: var(--muted); font-size: 12px; font-weight: 950; }
dd { margin: 0; text-align: right; font-weight: 950; }
.section-heading { margin-bottom: 24px; }
.filter-control { min-width: min(280px, 100%); }
.catalog-grid, .service-grid, .open-grid, .finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.catalog-card, .service-card { display: grid; gap: 12px; min-height: 100%; padding: 17px; }
.catalog-card h3, .service-card h3 { margin: 0; font-size: 21px; line-height: 1.05; }
.catalog-card p, .service-card p { margin: 0; color: var(--muted); }
.catalog-price { font-size: 26px; font-weight: 1000; }
.catalog-specs { display: grid; gap: 6px; margin: 0; }
.catalog-risks { display: grid; gap: 5px; color: #8a4c05; font-size: 12px; font-weight: 850; }
.listing-meta { flex-wrap: wrap; gap: 7px; }
.service-card { background: var(--black); color: var(--paper); }
.service-card p { color: #cfd7c7; }
.service-card .button { justify-self: start; background: var(--lime); }
.repair-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
}
.repair-form .button[type=submit] { align-self: end; }
.form-head h3 { margin: 0; font-size: 24px; line-height: 1.1; }
.form-head p { margin: 4px 0 0; color: var(--muted); }
.field-hint { margin: 0; align-self: center; color: var(--muted); font-size: 12px; font-weight: 800; }
label.check { display: flex; align-items: flex-start; gap: 10px; text-transform: none; font-size: 14px; font-weight: 800; }
label.check input { width: 22px; min-height: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--green); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  padding: 10px 12px;
  border: 2px solid var(--black);
  border-left-width: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
}
.form-status[hidden] { display: none; }
.form-status strong { display: block; font-weight: 950; }
.form-status p { margin: 4px 0 0; }
.form-status a { text-decoration: underline; font-weight: 900; }
.form-status.ok { background: #e8fadc; color: #164d30; }
.form-status.warn { background: #fff8dc; color: #60420d; }
.form-status.error { background: #ffe0d8; color: #742716; }
.form-status:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
.quote-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quote-form .field-hint { grid-column: 1 / -1; margin-top: -4px; }
.open-grid article, .finance-grid div { display: grid; gap: 8px; padding: 20px; }
.open-grid article:nth-child(2), .finance-grid div:nth-child(2) { background: var(--blueprint); }
.open-grid article:nth-child(3), .finance-grid div:nth-child(3) { background: #ffe2b8; }
.open-grid article strong, .finance-grid strong { font-size: clamp(26px, 3.5vw, 44px); line-height: .95; }
.open-grid article span, .finance-grid small { color: var(--muted); font-weight: 750; }
.banyo {
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(320px, 1.14fr);
  gap: 18px;
  align-items: start;
}
.finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finance-grid div span { color: var(--green); font-weight: 1000; text-transform: uppercase; font-size: 12px; }
.quote-drawer {
  position: fixed;
  top: 76px;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  grid-template-rows: auto auto minmax(90px, 1fr) auto auto auto;
  gap: 12px;
  overflow-y: auto;
  width: min(520px, calc(100vw - 24px));
  padding: 16px;
  transform: translateX(calc(100% + 40px));
  transition: transform .2s ease;
}
.quote-drawer.open { transform: translateX(0); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.drawer-note { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.drawer-head h2, .login-card h2 { margin: 0; font-size: 28px; line-height: 1; }
.quote-lines { display: grid; gap: 8px; max-height: 190px; overflow: auto; }
.quote-line {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 2px solid var(--black);
  border-radius: 6px;
  background: var(--paper-2);
}
.quote-line strong { line-height: 1.05; }
.quote-line span { color: var(--muted); font-size: 12px; font-weight: 850; }
.payload {
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 2px solid var(--black);
  border-radius: 6px;
  background: var(--black);
  color: #e7ffe3;
  font-size: 12px;
  white-space: pre-wrap;
}
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(17,18,15,.62);
}
.login-modal.open { display: grid; }
.login-card { position: relative; display: grid; gap: 14px; width: min(520px, 100%); padding: 24px; }
.close-login { position: absolute; top: 12px; right: 12px; }
.login-card form, .account-preview { display: grid; gap: 12px; }
.account-preview {
  padding: 14px;
  border: 2px solid var(--black);
  border-radius: 6px;
  background: var(--paper-2);
}
.account-preview span { color: var(--muted); font-weight: 800; }
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(14px, 3vw, 34px);
  border-top: 3px solid var(--black);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 850;
}
@media (max-width: 1180px) {
  .hero-grid, .console-section, .banyo { grid-template-columns: 1fr; }
  .catalog-grid, .service-grid, .open-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .configurator { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .stage-head, .split-heading, .footer { align-items: flex-start; flex-direction: column; }
  .signal-strip, .catalog-grid, .service-grid, .open-grid, .finance-grid, .configurator, .repair-form, .quote-form { grid-template-columns: 1fr; }
  .repair-form .button[type=submit] { width: 100%; }
  h1 { font-size: 44px; }
  .section h2, .console-sidebar h2, .banyo h2 { font-size: 34px; }
  #buildCanvas { min-height: 360px; }
  .quote-drawer { top: 10px; right: 10px; bottom: 10px; }
}

/* Fresh-from-the-bench listings (Commander marketplace feed) */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.listing-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 3px solid var(--black);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--hard-shadow);
  overflow: hidden;
  min-height: 100%;
}
.listing-photo {
  aspect-ratio: 16 / 10;
  background: #10160f;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.listing-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-photo.missing::after {
  content: "DONNYSTECH";
  font-weight: 1000;
  letter-spacing: .12em;
  color: var(--lime);
  font-size: 14px;
}
.listing-body { display: grid; gap: 10px; align-content: start; padding: 15px 17px 17px; }
.listing-body h3 { margin: 0; font-size: 20px; line-height: 1.1; }
.listing-desc { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.listing-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.listing-spec {
  padding: 3px 8px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--paper);
  font-size: 11.5px;
  font-weight: 750;
}
.listing-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.listing-price { font-size: 24px; font-weight: 1000; }
@media (max-width: 1100px) {
  .listings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .listings-grid { grid-template-columns: 1fr; }
}
