:root {
  color-scheme: dark;
  --brx-black: #08090e;
  --brx-ink: #0f1118;
  --brx-surface: #151823;
  --brx-panel: #191c28;
  --brx-stroke: #2a2f3e;
  --brx-gold: #f7c843;
  --brx-gold-strong: #f1b90d;
  --brx-text: #f1f2f7;
  --brx-muted: #aeb4c2;
  --brx-success: #5ed28a;
  --brx-warning: #f7c843;
  --brx-danger: #ff6b72;
  --brx-radius: 18px;
  --brx-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--brx-text);
  background:
    radial-gradient(circle at 12% 4%, rgba(247, 200, 67, .12), transparent 28rem),
    radial-gradient(circle at 92% 28%, rgba(91, 111, 179, .12), transparent 34rem),
    var(--brx-ink);
  font: 16px/1.55 Inter, "Segoe UI", Arial, sans-serif;
}

a { color: var(--brx-gold); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  padding: 12px max(24px, calc((100% - 1680px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--brx-stroke);
  background: rgba(8, 9, 14, .94);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 18px; color: var(--brx-text); text-decoration: none; }
.brand-logo { display: block; width: 148px; height: auto; }
.brand-product { padding-left: 18px; border-left: 1px solid var(--brx-stroke); color: var(--brx-muted); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 20px; }
nav a { color: var(--brx-muted); font-size: 14px; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--brx-gold); }

main { width: min(1240px, calc(100% - 32px)); margin: 0 auto 80px; flex: 1; }
body[data-current-step="upload"] main,
body[data-current-step="review"] main { width: min(1680px, calc(100% - 48px)); }
.hero { max-width: 900px; padding: 72px 0 42px; }
.hero--compact { padding: 38px 0 24px; }
.hero h1, .legal h1 { margin: .1em 0 .3em; color: white; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.045em; }
.hero--compact h1 { font-size: clamp(31px, 4vw, 48px); }
.hero p { max-width: 800px; color: var(--brx-muted); font-size: 19px; }
.eyebrow { margin: 0 0 12px !important; color: var(--brx-gold) !important; font-size: 12px !important; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }

.step-progress {
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  overflow: hidden;
  border: 1px solid var(--brx-stroke);
  border-radius: 12px;
  background: rgba(8, 9, 14, .48);
  list-style: none;
}
.step-progress li { position: relative; padding: 12px 10px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #7f8798; font-size: 12px; font-weight: 800; text-align: center; text-transform: uppercase; }
.step-progress li + li { border-left: 1px solid var(--brx-stroke); }
.step-progress li span { width: 24px; height: 24px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid #43495a; border-radius: 50%; font-size: 11px; }
.step-progress li.is-complete { color: #c9ced9; }
.step-progress li.is-complete span { border-color: rgba(94, 210, 138, .55); color: #baf4cf; background: rgba(54, 145, 87, .18); }
.step-progress li.is-current { color: white; background: rgba(247, 200, 67, .1); }
.step-progress li.is-current span { border-color: var(--brx-gold); color: var(--brx-black); background: var(--brx-gold); }

.card {
  position: relative;
  margin: 24px 0;
  padding: 34px;
  overflow: visible;
  border: 1px solid var(--brx-stroke);
  border-radius: var(--brx-radius);
  background: linear-gradient(160deg, rgba(28, 32, 45, .98), rgba(19, 22, 32, .98));
  box-shadow: var(--brx-shadow);
}
.card::before { position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: var(--brx-radius) 0 0 var(--brx-radius); background: linear-gradient(var(--brx-gold), var(--brx-gold-strong)); content: ""; }
.step.is-page-hidden { display: none; }
.step-number { position: absolute; top: 25px; left: -17px; width: 36px; height: 36px; display: grid; place-items: center; border: 3px solid var(--brx-ink); border-radius: 50%; color: var(--brx-black); background: var(--brx-gold); font-weight: 900; }
h2 { margin-top: 0; color: white; font-size: clamp(25px, 3vw, 31px); letter-spacing: -.025em; }
h3 { margin: 20px 0 10px; color: white; }
p, li { color: #d4d7df; }
.step-lead { max-width: 970px; font-size: 17px; }

label { display: block; margin: 14px 0 7px; color: var(--brx-text); font-weight: 750; }
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #3a4052;
  border-radius: 9px;
  color: var(--brx-text);
  background: #10131c;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(247, 200, 67, .17); border-color: var(--brx-gold); }
input[type="checkbox"] { accent-color: var(--brx-gold); }

button, .button {
  display: inline-block;
  padding: 13px 21px;
  border: 1px solid var(--brx-gold);
  border-radius: 9px;
  color: var(--brx-black);
  background: linear-gradient(120deg, var(--brx-gold), var(--brx-gold-strong));
  box-shadow: 0 8px 24px rgba(247, 200, 67, .12);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:focus-visible, .button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid rgba(247, 200, 67, .4); outline-offset: 3px; }
button.secondary { border-color: var(--brx-stroke); color: var(--brx-text); background: #252a38; box-shadow: none; }
button.compact-button { padding: 9px 13px; font-size: 13px; }
button.remove-product { width: 34px; height: 34px; padding: 0; border-color: rgba(255, 107, 114, .34); color: #ffb7ba; background: rgba(255, 107, 114, .08); box-shadow: none; }
.actions { display: flex; gap: 12px; margin-top: 25px; flex-wrap: wrap; }
.token-form, .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.drop-zone {
  margin-top: 24px;
  min-height: 210px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px dashed #4a5268;
  border-radius: 14px;
  color: var(--brx-muted);
  background: rgba(8, 9, 14, .34);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.drop-zone:hover, .drop-zone.is-dragover { border-color: var(--brx-gold); background: rgba(247, 200, 67, .07); transform: translateY(-1px); }
.drop-zone strong { color: white; font-size: 18px; }
.drop-zone small { margin-top: 8px; color: #868d9d; }
.drop-zone__icon { width: 44px; height: 44px; margin-bottom: 6px; display: grid; place-items: center; border: 1px solid rgba(247, 200, 67, .5); border-radius: 50%; color: var(--brx-gold); font-size: 26px; font-weight: 900; }
.file-list { margin: 14px 0 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.file-list li { padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--brx-stroke); border-radius: 8px; background: rgba(8, 9, 14, .3); font-size: 14px; }
.file-list button { padding: 3px 8px; border-color: transparent; color: #ffb7ba; background: transparent; box-shadow: none; }
.choice-divider { margin: 28px 0 20px; display: flex; align-items: center; gap: 14px; color: #7d8494; font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.choice-divider::before, .choice-divider::after { height: 1px; flex: 1; background: var(--brx-stroke); content: ""; }
.manual-entry { margin-top: 25px; padding-top: 24px; border-top: 1px solid var(--brx-stroke); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading h3 { margin: 0; }

.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.project-details { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(320px, 1.3fr); gap: 18px; align-items: start; }
.unit-toggle { width: min(260px, 100%); margin: 14px 0 20px auto; display: flex; align-items: center; gap: 12px; }
.unit-toggle label { margin: 0; }
.unit-toggle select { padding: 8px 10px; }

.product-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--brx-stroke); border-radius: 10px; background: #080b12; }
.product-table { width: 100%; min-width: 980px; table-layout: fixed; border-collapse: collapse; color: var(--brx-text); font-size: 13px; }
.product-table th { padding: 8px 7px; color: #dfe2e9; background: #080b12; white-space: nowrap; text-align: center; }
.product-table th.product-table__standalone-heading { vertical-align: middle; }
.product-table thead tr:first-child th { color: var(--brx-gold); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.product-table thead tr:first-child th[colspan="4"] { border: 1px solid rgba(247, 200, 67, .25); border-bottom: 0; background: rgba(247, 200, 67, .09); }
.product-table thead tr:first-child th:nth-of-type(3) { border: 1px solid rgba(94, 210, 138, .24); border-bottom: 0; color: #9ce9bb; background: rgba(94, 210, 138, .08); }
.product-table tbody tr { border-top: 1px solid rgba(255, 255, 255, .07); }
.product-table td { padding: 6px; background: #0b0e16; vertical-align: middle; }
.product-table td:nth-child(n+2):nth-child(-n+5) { background: #111015; }
.product-table td:nth-child(n+6):nth-child(-n+9) { background: #0d1515; }
.product-table input { min-width: 0; max-width: none; width: 100%; padding: 7px 8px; border-color: #2d3548; border-radius: 6px; background: #080b13; font-size: 13px; font-weight: 700; }
.product-table thead tr:first-child th:first-child, .product-table td:first-child { width: 16%; }
.product-table thead tr:first-child th:last-child:not([aria-label]), .product-table td:last-child { width: 9%; }
.product-table--manual thead tr:first-child th:nth-last-child(2) { width: 9%; }
.product-table--manual th:last-child, .product-table--manual td:last-child { width: 46px; }
.product-table--manual td:last-child { width: 42px; text-align: center; }
.product-table .field-attention { border-color: var(--brx-gold); box-shadow: 0 0 0 3px rgba(247, 200, 67, .18); animation: fieldPulse 1s ease 2; }
@keyframes fieldPulse { 50% { box-shadow: 0 0 0 7px rgba(247, 200, 67, .06); } }

.clarifications { margin-top: 28px; padding: 20px; border: 1px solid rgba(247, 200, 67, .33); border-radius: 12px; background: rgba(247, 200, 67, .055); }
.clarifications > p { margin: 9px 0 15px; color: var(--brx-muted); font-size: 14px; }
.count-badge { min-width: 29px; height: 29px; padding: 0 8px; display: grid; place-items: center; border-radius: 99px; color: var(--brx-black); background: var(--brx-gold); font-size: 13px; font-weight: 900; }
#questions { display: grid; gap: 8px; }
.question { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.clarification-link { width: 100%; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-color: var(--brx-stroke); color: var(--brx-text); background: #151925; box-shadow: none; text-align: left; }
.clarification-link::after { color: var(--brx-gold); content: "→"; }
.question label { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--brx-muted); font-size: 13px; font-weight: 600; }
.question input[type="checkbox"], .consent input { width: auto; flex: 0 0 auto; }
.consent { padding: 16px; border: 1px solid var(--brx-stroke); border-radius: 10px; background: rgba(8, 9, 14, .3); font-weight: 550; }

.recommendation-layout { display: grid; grid-template-columns: minmax(280px, 42%) 1fr; gap: 32px; align-items: start; }
.recommendation-layout img { width: 100%; max-height: 430px; padding: 15px; object-fit: contain; border-radius: 12px; background: #f3f4f5; }
.sku { color: white; font-size: 25px; font-weight: 900; overflow-wrap: anywhere; }
.compatibility { display: inline-block; padding: 6px 11px; border: 1px solid rgba(94, 210, 138, .35); border-radius: 99px; color: #baf4cf; background: rgba(54, 145, 87, .18); font-weight: 850; }
.code { max-width: 240px; font-size: 30px; letter-spacing: .25em; text-align: center; }

.legal { max-width: 850px; margin: 64px auto; }
.legal h1 { font-size: clamp(34px, 5vw, 54px); }
.legal-note { margin-top: 30px; padding: 16px; border-left: 3px solid var(--brx-gold); color: #ffe994; background: rgba(247, 200, 67, .08); }
footer { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 32px; border-top: 1px solid var(--brx-stroke); color: var(--brx-muted); font-size: 14px; }
.footer-logo { width: 118px; height: auto; }

.working-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; cursor: wait; }
.working-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 9, 14, .88); backdrop-filter: blur(6px) saturate(140%); }
.working-modal__box { position: relative; width: min(340px, calc(100vw - 2rem)); padding: 19px 24px 18px; overflow: hidden; border: 1px solid rgba(247, 200, 67, .48); border-radius: 18px; background: radial-gradient(circle at 50% 0, rgba(247, 200, 67, .13), transparent 48%), linear-gradient(165deg, #171a25, #090b12 72%); box-shadow: 0 24px 65px rgba(0, 0, 0, .52), 0 0 0 8px rgba(247, 200, 67, .06), inset 0 1px rgba(255, 255, 255, .04); }
.working-loader { display: grid; width: 100%; justify-items: center; gap: 2px; }
.working-loader__scene { display: block; width: 100%; max-width: 280px; height: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .32)); }
.working-loader__track { fill: none; stroke: rgba(166, 171, 184, .32); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 5 7; animation: workingTrack 1s linear infinite; }
.working-loader__pallet { fill: none; stroke: #f7c843; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.working-loader__box { fill: #292f3e; stroke: rgba(247, 200, 67, .72); }
.working-loader__box--top-left { animation: workingSourceBox 2.6s ease-in-out infinite; }
.working-loader__base { fill: #202532; stroke: #f7c843; stroke-width: 2; }
.working-loader__base-cap { fill: #f7c843; }
.working-loader__arm { transform-box: view-box; transform-origin: 140px 86px; animation: workingArmSweep 2.6s cubic-bezier(.55, .05, .45, .95) infinite; }
.working-loader__arm-shadow, .working-loader__arm-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.working-loader__arm-shadow { stroke: rgba(0, 0, 0, .52); stroke-width: 17; }
.working-loader__arm-line { stroke: #f7c843; stroke-width: 12; }
.working-loader__joint { fill: #11151f; stroke: #ffe994; stroke-width: 4; }
.working-loader__gripper { fill: none; stroke: #ffe994; stroke-width: 3; stroke-linecap: round; transform-box: view-box; transform-origin: 52px 35px; animation: workingGripperLevel 2.6s cubic-bezier(.55, .05, .45, .95) infinite; }
.working-loader__carried-box { fill: #292f3e; stroke: #f7c843; stroke-width: 2; animation: workingCarriedBox 2.6s ease-in-out infinite; }
.working-loader__signal { fill: #f7c843; opacity: .16; }
.working-loader__signal--left { animation: workingSignalLeft 2.6s ease-in-out infinite; }
.working-loader__signal--right { animation: workingSignalRight 2.6s ease-in-out infinite; }
.working-message { min-height: 1.2em; margin: 0; color: #ffe994; font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-align: center; }
@keyframes workingArmSweep { 0%, 8% { transform: rotate(0); } 42%, 58% { transform: rotate(118deg); } 92%, 100% { transform: rotate(0); } }
@keyframes workingGripperLevel { 0%, 8% { transform: rotate(0); } 42%, 58% { transform: rotate(-118deg); } 92%, 100% { transform: rotate(0); } }
@keyframes workingCarriedBox { 0%, 8%, 42% { opacity: 1; } 50%, 92%, 100% { opacity: .18; } }
@keyframes workingSourceBox { 0%, 8% { opacity: .18; } 18%, 92%, 100% { opacity: 1; } }
@keyframes workingSignalLeft { 0%, 12%, 88%, 100% { opacity: .85; filter: drop-shadow(0 0 7px #f7c843); } 35%, 70% { opacity: .16; filter: none; } }
@keyframes workingSignalRight { 0%, 25%, 75%, 100% { opacity: .16; filter: none; } 42%, 58% { opacity: .85; filter: drop-shadow(0 0 7px #f7c843); } }
@keyframes workingTrack { to { stroke-dashoffset: -12; } }

.message-modal { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 20px; }
.message-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 4, 8, .82); backdrop-filter: blur(8px); }
.message-modal__panel { position: relative; width: min(510px, 100%); padding: 35px; border: 1px solid var(--brx-stroke); border-top: 4px solid var(--brx-gold); border-radius: 18px; background: linear-gradient(155deg, #202432, #11141d); box-shadow: 0 30px 100px rgba(0, 0, 0, .62); text-align: center; }
.message-modal__icon { width: 58px; height: 58px; margin: 0 auto 17px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; color: var(--brx-gold); font-size: 28px; font-weight: 900; }
.message-modal__kicker { margin: 0 0 5px; color: var(--brx-gold); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.message-modal__panel h2 { margin-bottom: 12px; }
.message-modal__panel p { white-space: pre-line; }
.message-modal__panel button { margin-top: 12px; min-width: 150px; }
.message-modal[data-kind="success"] .message-modal__panel { border-top-color: var(--brx-success); }
.message-modal[data-kind="success"] .message-modal__icon, .message-modal[data-kind="success"] .message-modal__kicker { color: var(--brx-success); }
.message-modal[data-kind="error"] .message-modal__panel { border-top-color: var(--brx-danger); }
.message-modal[data-kind="error"] .message-modal__icon, .message-modal[data-kind="error"] .message-modal__kicker { color: var(--brx-danger); }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .step-progress { display: flex; overflow-x: auto; }
  .step-progress li { min-width: 124px; }
  .project-details, .two-columns, .recommendation-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header { position: relative; min-height: 74px; padding: 14px 16px; align-items: flex-start; }
  .brand { gap: 8px; flex-direction: column; align-items: flex-start; }
  .brand-logo { width: 126px; }
  .brand-product { padding-left: 0; border-left: 0; font-size: 11px; }
  .site-header nav { flex-direction: column; gap: 2px; text-align: right; }
  .hero, .hero--compact { padding-top: 38px; }
  .card { padding: 29px 18px; }
  main { width: min(100% - 24px, 1680px); }
  .step-number { top: -18px; left: 16px; }
  .drop-zone { min-height: 190px; padding: 24px 15px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .question { grid-template-columns: 1fr; }
  .message-modal__panel { padding: 28px 20px; }
  footer { flex-direction: column; gap: 7px; }
}

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