/** Shopify CDN: Minification failed

Line 1016:0 Unexpected "}"

**/
/* hard reset: roll back ALL theme styles on app elements, then app rules below re-apply */
#clearray-app, #clearray-app *, #clearray-app *::before, #clearray-app *::after { all: revert; }

:root {
  --bg-0:        #050B1A;
  --bg-1:        #0A1628;
  --bg-2:        #0E1B30;
  --bg-3:        #14233E;
  --card:        rgba(20, 35, 62, 0.55);
  --card-h:      rgba(28, 48, 84, 0.7);
  --border:      rgba(255, 255, 255, 0.06);
  --border-h:    rgba(0, 212, 255, 0.25);
  --line:        rgba(255, 255, 255, 0.04);

  --cyan:        #00D4FF;
  --cyan-2:      #0094C6;
  --blue:        #2A7DB8;
  --blue-2:      #0055CC;
  --green:       #4ECB8A;
  --warm:        #FFB347;
  --orange:      #FF8847;
  --red:         #FF4466;
  --purple:      #B47AFF;

  --text:        rgba(255, 255, 255, 0.95);
  --text-2:      rgba(255, 255, 255, 0.7);
  --text-3:      rgba(255, 255, 255, 0.48);
  --text-4:      rgba(255, 255, 255, 0.28);

  --shadow:      0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg:   0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-cyan: 0 8px 32px rgba(0, 212, 255, 0.15);

  --grad-hero:   linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(42, 125, 184, 0.04) 100%);
  --grad-btn:    linear-gradient(135deg, #00D4FF 0%, #2A7DB8 100%);
  --grad-btn-h:  linear-gradient(135deg, #14E0FF 0%, #3A8DC8 100%);

  --mono:        'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --sans:        'Inter', system-ui, -apple-system, sans-serif;

  --radius:      12px;
  --radius-lg:   16px;
  --radius-sm:   8px;
}#clearray-app * { box-sizing: border-box; margin: 0; padding: 0; }#clearray-app, #clearray-app {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}#clearray-app {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 255, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 10% 40%, rgba(42, 125, 184, 0.05), transparent),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(78, 203, 138, 0.04), transparent);
  background-attachment: fixed;
}#clearray-app ::-webkit-scrollbar { width: 10px; height: 10px; }#clearray-app ::-webkit-scrollbar-track { background: var(--bg-1); }#clearray-app ::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 5px; }#clearray-app ::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.3); }#clearray-app a { color: var(--cyan); text-decoration: none; }#clearray-app button { font-family: inherit; }#clearray-app input, #clearray-app select, #clearray-app textarea { font-family: inherit; color: inherit; }#clearray-app .top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 11, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}#clearray-app .top-bar-inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}#clearray-app .brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}#clearray-app .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--grad-btn);
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: var(--shadow-cyan);
}#clearray-app .brand-accent { color: var(--cyan); }#clearray-app .top-actions { display: flex; gap: 8px; align-items: center; }#clearray-app .top-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}#clearray-app .top-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--border-h);
}#clearray-app .top-btn.primary {
  background: var(--grad-btn);
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-cyan);
}#clearray-app .top-btn.primary:hover { background: var(--grad-btn-h); }#clearray-app .hero {
  max-width: 1680px;
  margin: 24px auto 0;
  padding: 0 28px;
}#clearray-app .hero-card {
  background: var(--grad-hero);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  padding: 26px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}#clearray-app .hero-left h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}#clearray-app .hero-left h1 .accent { color: var(--cyan); }#clearray-app .hero-tag {
  color: var(--text-3);
  font-size: 0.85rem;
  margin-bottom: 18px;
  font-family: var(--mono);
}#clearray-app .hero-tag .dot { color: var(--cyan); margin: 0 6px; }#clearray-app .ai-bar {
  display: flex;
  align-items: stretch;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-h);
  border-radius: 12px;
  padding: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}#clearray-app .ai-bar:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12);
}#clearray-app .ai-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 14px 16px;
  font-size: 0.95rem;
  outline: 0;
}#clearray-app .ai-bar input::placeholder { color: var(--text-4); }#clearray-app .ai-bar button {
  background: var(--grad-btn);
  border: 0;
  color: white;
  font-weight: 600;
  padding: 0 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}#clearray-app .ai-bar button:hover { background: var(--grad-btn-h); transform: scale(1.02); }#clearray-app .ai-bar .clear {
  background: transparent;
  color: var(--text-3);
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 400;
}#clearray-app .ai-bar .clear:hover { color: var(--red); transform: none; background: transparent; }#clearray-app .hero-stats { display: flex; gap: 10px; }#clearray-app .stat-pill {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 22px;
  text-align: center;
  min-width: 110px;
}#clearray-app .stat-pill-v {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cyan);
  font-family: var(--mono);
  letter-spacing: -0.01em;
}#clearray-app .stat-pill-l {
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--mono);
  margin-top: 4px;
}#clearray-app .nlp-reasoning {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid var(--border-h);
  border-radius: 8px;
  display: none;
}#clearray-app .nlp-reasoning.on { display: block; }#clearray-app .nlp-reasoning .row {
  display: flex;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.82rem;
  font-family: var(--mono);
}#clearray-app .nlp-reasoning .k { color: var(--cyan); min-width: 110px; }#clearray-app .nlp-reasoning .v { color: var(--text-2); }#clearray-app .layout {
  max-width: 1680px;
  margin: 24px auto 60px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 240px 1fr 360px;
  gap: 22px;
  align-items: start;
}#clearray-app .sidebar-l {
  position: sticky;
  top: 96px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
}#clearray-app .sb-section { margin-bottom: 18px; }#clearray-app .sb-section:last-child { margin-bottom: 0; }#clearray-app .sb-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}#clearray-app .sb-chips { display: flex; flex-wrap: wrap; gap: 6px; }#clearray-app .chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  white-space: nowrap;
}#clearray-app .chip:hover { background: rgba(255, 255, 255, 0.08); }#clearray-app .chip.active {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}#clearray-app .col-center { display: flex; flex-direction: column; gap: 20px; }#clearray-app .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
}#clearray-app .card-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}#clearray-app .card-hd h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}#clearray-app .card-hd .sub {
  font-family: var(--mono);
  color: var(--text-3);
  font-size: 0.7rem;
}#clearray-app .sizing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}#clearray-app .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}#clearray-app .field label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}#clearray-app .input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 0.95rem;
  color: var(--text);
  outline: 0;
  font-family: var(--mono);
  transition: border 0.15s, box-shadow 0.15s;
  width: 100%;
}#clearray-app .input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}#clearray-app .input::placeholder { color: var(--text-4); }#clearray-app .input-with-suffix { position: relative; }#clearray-app .input-with-suffix .suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  pointer-events: none;
}#clearray-app .input-with-suffix .input { padding-right: 44px; }#clearray-app .select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 36px 11px 13px;
  font-size: 0.85rem;
  color: var(--text);
  outline: 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2300D4FF' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  width: 100%;
}#clearray-app .btn-row {
  display: flex;
  gap: 6px;
}#clearray-app .btn-tog {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}#clearray-app .btn-tog:hover { background: rgba(255, 255, 255, 0.08); }#clearray-app .btn-tog.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.2) inset;
}#clearray-app .btn-tog.warm.active { background: rgba(255, 179, 71, 0.1); border-color: var(--warm); color: var(--warm); }#clearray-app .btn-tog.green.active { background: rgba(78, 203, 138, 0.1); border-color: var(--green); color: var(--green); }#clearray-app .rec-build {
  position: relative;
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(42, 125, 184, 0.06) 100%),
    var(--card);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
}#clearray-app .rec-build::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(0,212,255,0.4), transparent 40%, rgba(78,203,138,0.2));
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.4;
}#clearray-app .rec-grid {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 24px;
  align-items: start;
}#clearray-app .rec-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}#clearray-app .rec-title .accent { color: var(--cyan); }#clearray-app .rec-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}#clearray-app .rec-points li {
  font-size: 0.92rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 10px;
}#clearray-app .rec-points li .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: rgba(78, 203, 138, 0.15);
  border-radius: 50%;
  color: var(--green);
  font-size: 0.7rem;
  flex-shrink: 0;
}#clearray-app .rec-points li.warn .check {
  background: rgba(255, 179, 71, 0.15);
  color: var(--warm);
}#clearray-app .rec-points li.fail .check {
  background: rgba(255, 68, 102, 0.15);
  color: var(--red);
}#clearray-app .rec-emoji {
  background: rgba(0, 212, 255, 0.2);
  border-radius: var(--radius);
  padding: 16px 0;
  text-align: center;
  font-size: 3.4rem;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}#clearray-app .rec-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}#clearray-app .rec-stat {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}#clearray-app .rec-stat-v {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cyan);
  font-family: var(--mono);
  letter-spacing: -0.02em;
}#clearray-app .rec-stat-v.warm { color: var(--warm); }#clearray-app .rec-stat-v.green { color: var(--green); }#clearray-app .rec-stat-l {
  font-size: 0.6rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--mono);
  margin-top: 2px;
}#clearray-app .arch-row {
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 0;
  align-items: center;
  justify-content: center;
}#clearray-app .arch-node {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 8px 14px;
  text-align: center;
  min-width: 96px;
  transition: all 0.2s;
}#clearray-app .arch-node:hover {
  border-color: var(--cyan);
  background: var(--bg-3);
  transform: translateY(-2px);
}#clearray-app .arch-emoji {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 10px;
}#clearray-app .arch-label {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 600;
}#clearray-app .arch-sub {
  font-size: 0.62rem;
  color: var(--text-3);
  font-family: var(--mono);
  margin-top: 2px;
}#clearray-app .arch-arrow {
  color: var(--cyan);
  font-size: 1.3rem;
  padding: 0 6px;
  opacity: 0.6;
}#clearray-app .inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}#clearray-app .inv-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}#clearray-app .inv-card:hover {
  border-color: var(--border-h);
  background: var(--bg-3);
}#clearray-app .inv-card.selected {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0,212,255,0.08), transparent);
  box-shadow: var(--shadow-cyan);
}#clearray-app .inv-card.selected::after {
  content: "✓ Selected";
  position: absolute;
  top: 8px;
  right: 10px;
  background: var(--cyan);
  color: var(--bg-0);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
}#clearray-app .inv-card-badges {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}#clearray-app .b {
  font-family: var(--mono);
  font-size: 0.58rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
}#clearray-app .b-top { background: linear-gradient(90deg, #00D4FF, #4ECB8A); color: var(--bg-0); }#clearray-app .b-hybrid { background: rgba(78,203,138,0.15); color: var(--green); }#clearray-app .b-string { background: rgba(0,212,255,0.12); color: var(--cyan); }#clearray-app .b-stock { background: rgba(78,203,138,0.12); color: var(--green); }#clearray-app .b-stock-low { background: rgba(255,179,71,0.12); color: var(--warm); }#clearray-app .b-stock-none { background: rgba(255,255,255,0.06); color: var(--text-3); }#clearray-app .b-1ph { background: rgba(180,122,255,0.12); color: var(--purple); }#clearray-app .b-3ph { background: rgba(255,179,71,0.12); color: var(--warm); }#clearray-app .b-g99 { background: rgba(255,179,71,0.1); color: var(--warm); }#clearray-app .b-fail { background: rgba(255,68,102,0.12); color: var(--red); }#clearray-app .inv-card-mfg {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}#clearray-app .inv-card-model {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 4px 0 6px;
  letter-spacing: -0.005em;
}#clearray-app .inv-card-name {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}#clearray-app .inv-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}#clearray-app .inv-card-stat { text-align: center; }#clearray-app .inv-card-stat-v {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
}#clearray-app .inv-card-stat-v.warm { color: var(--warm); }#clearray-app .inv-card-stat-v.green { color: var(--green); }#clearray-app .inv-card-stat-l {
  font-size: 0.56rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--mono);
}#clearray-app .inv-card-foot {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}#clearray-app .inv-card-foot .price {
  flex: 1;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--green);
  display: flex;
  align-items: center;
}#clearray-app .inv-card-foot button {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--cyan);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}#clearray-app .inv-card-foot button:hover {
  background: var(--cyan);
  color: var(--bg-0);
}#clearray-app .inv-card-foot button.compare {
  background: transparent;
  color: var(--text-3);
  border-color: var(--border);
}#clearray-app .inv-card-foot button.compare:hover { color: var(--text); border-color: var(--text-3); background: transparent; }#clearray-app .inv-card-foot button.compare.on { background: rgba(180, 122, 255, 0.12); color: var(--purple); border-color: var(--purple); }#clearray-app .inv-card.selected .inv-card-foot button:not(.compare) { background: var(--cyan); color: var(--bg-0); }#clearray-app .inv-card-compat {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.66rem;
  display: flex;
  align-items: center;
  gap: 6px;
}#clearray-app .inv-card-compat.ok { background: rgba(78,203,138,0.08); color: var(--green); }#clearray-app .inv-card-compat.warn { background: rgba(255,179,71,0.08); color: var(--warm); }#clearray-app .inv-card-compat.fail { background: rgba(255,68,102,0.08); color: var(--red); }#clearray-app .dc-check {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}#clearray-app .dc-row {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 12px;
}#clearray-app .dc-row.warn { border-left-color: var(--warm); }#clearray-app .dc-row.fail { border-left-color: var(--red); }#clearray-app .dc-row-l {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}#clearray-app .dc-row-v {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
}#clearray-app .dc-row.warn .dc-row-v { color: var(--warm); }#clearray-app .dc-row.fail .dc-row-v { color: var(--red); }#clearray-app .dc-row-note {
  font-size: 0.62rem;
  color: var(--text-3);
  margin-top: 4px;
  font-family: var(--mono);
}#clearray-app .mcs {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}#clearray-app .mcs-item {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.78rem;
  color: var(--text-2);
  align-items: center;
}#clearray-app .mcs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 0.65rem;
  flex-shrink: 0;
}#clearray-app .mcs-icon.ok { background: rgba(78,203,138,0.15); color: var(--green); }#clearray-app .mcs-icon.warn { background: rgba(255,179,71,0.15); color: var(--warm); }#clearray-app .mcs-icon.fail { background: rgba(255,68,102,0.15); color: var(--red); }#clearray-app .bom {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  overflow: hidden;
}#clearray-app .bom-hd {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}#clearray-app .bom-hd h2 {
  font-size: 1.05rem;
  font-weight: 700;
}#clearray-app .bom-hd .sub {
  font-family: var(--mono);
  color: var(--text-3);
  font-size: 0.65rem;
  margin-top: 2px;
}#clearray-app .bom-hd .pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}#clearray-app .bom-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}#clearray-app .bom-empty {
  text-align: center;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 40px 20px;
}#clearray-app .bom-section-lbl {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 6px 4px 2px;
  margin-top: 4px;
}#clearray-app .bom-section-lbl:first-child { margin-top: 0; }#clearray-app .bom-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
}#clearray-app .bom-item:hover {
  border-color: var(--border-h);
  background: var(--bg-3);
}#clearray-app .bom-item-role {
  grid-column: 1 / 2;
  grid-row: 1;
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 6px;
}#clearray-app .bom-oos-badge {
  font-family: var(--mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: #dc2626;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}#clearray-app .bom-low-badge {
  font-family: var(--mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: #d97706;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}#clearray-app .bom-oos {
  opacity: 0.75;
  border-left: 2px solid #dc2626 !important;
}#clearray-app .bom-low {
  border-left: 2px solid #d97706 !important;
}#clearray-app .bom-item-qty {
  grid-column: 2;
  grid-row: 1;
  background: rgba(0, 212, 255, 0.12);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  align-self: start;
}#clearray-app .bom-item-name {
  grid-column: 1 / 3;
  grid-row: 2;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}#clearray-app .bom-item-detail {
  grid-column: 1 / 2;
  grid-row: 3;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  margin-top: 2px;
}#clearray-app .bom-item-price {
  grid-column: 2;
  grid-row: 3;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  align-self: end;
  text-align: right;
}#clearray-app .bom-totals {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}#clearray-app .bom-total {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}#clearray-app .bom-total-v {
  font-size: 1rem;
  font-weight: 800;
  color: var(--cyan);
  font-family: var(--mono);
  letter-spacing: -0.01em;
}#clearray-app .bom-total-v.green { color: var(--green); }#clearray-app .bom-total-v.warm { color: var(--warm); }#clearray-app .bom-total-l {
  font-size: 0.58rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--mono);
  margin-top: 2px;
}#clearray-app .bom-actions {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}#clearray-app .bom-btn {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}#clearray-app .bom-btn.primary {
  background: var(--grad-btn);
  color: white;
  box-shadow: var(--shadow-cyan);
}#clearray-app .bom-btn.primary:hover {
  background: var(--grad-btn-h);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(0,212,255,0.3);
}#clearray-app .bom-btn.primary:active { transform: translateY(0); }#clearray-app .bom-btn.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}#clearray-app .bom-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-h);
}#clearray-app .bom-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }#clearray-app .bom-btn.tiny {
  text-transform: none;
  font-size: 0.72rem;
  padding: 9px 10px;
  font-weight: 600;
}#clearray-app .bom-warn {
  margin: 0 14px 6px;
  padding: 9px 11px;
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: var(--radius-sm);
  color: var(--warm);
  font-size: 0.7rem;
  font-family: var(--mono);
  line-height: 1.4;
}#clearray-app .bom-warn.fail {
  background: rgba(255, 68, 102, 0.08);
  border-color: rgba(255, 68, 102, 0.3);
  color: var(--red);
}#clearray-app .modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 5, 15, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}#clearray-app .modal-bg.open { display: flex; }#clearray-app .modal {
  background: var(--bg-1);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}#clearray-app .modal.wide { max-width: 1080px; }#clearray-app .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}#clearray-app .modal-close:hover { background: var(--red); }#clearray-app .modal h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}#clearray-app .modal .modal-tag {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}#clearray-app .item-detail {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 22px;
  margin-bottom: 18px;
}#clearray-app .item-emoji {
  font-size: 4rem;
  background: rgba(0, 212, 255, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 100px;
  overflow: hidden;
  flex-shrink: 0;
}#clearray-app .item-emoji img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: var(--radius); }#clearray-app .item-meta { display: flex; flex-direction: column; gap: 8px; }#clearray-app .item-meta-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  font-size: 0.84rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}#clearray-app .item-meta-row .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}#clearray-app .item-meta-row .v { color: var(--text); }#clearray-app .item-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad-btn);
  color: white;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  margin-top: 12px;
}#clearray-app .toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-1);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 14px 22px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  z-index: 2000;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}#clearray-app .toast.show { transform: translateX(-50%) translateY(0); }#clearray-app .toast.ok { border-color: var(--green); }#clearray-app .toast.err { border-color: var(--red); }#clearray-app .quote-preview {
  background: white;
  color: #111;
  padding: 32px;
  border-radius: var(--radius);
  margin-top: 14px;
  font-family: var(--sans);
}#clearray-app .quote-preview * { color: #111; }#clearray-app .qp-hd {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 3px solid #00D4FF;
  margin-bottom: 18px;
}#clearray-app .qp-hd .logo { font-weight: 900; font-size: 1.4rem; }#clearray-app .qp-hd .logo span:last-child { color: #00D4FF; }#clearray-app .qp-hd .info { text-align: right; font-size: 0.75rem; color: #555; }#clearray-app .qp-hd .info strong { display: block; color: #111; font-size: 0.85rem; }#clearray-app .qp-client { background: #f4f7fb; border-left: 3px solid #00D4FF; padding: 10px 14px; margin-bottom: 18px; border-radius: 4px; }#clearray-app .qp-section {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 18px 0 10px;
  color: #0055cc;
}#clearray-app .qp-bom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}#clearray-app .qp-bom-table th, #clearray-app .qp-bom-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e0e6ee;
  text-align: left;
}#clearray-app .qp-bom-table th {
  background: #eef3f9;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0055cc;
}#clearray-app .qp-bom-table .qty { text-align: center; width: 50px; }#clearray-app .qp-bom-table .price { text-align: right; width: 100px; font-family: var(--mono); }#clearray-app .qp-bom-table tr.section td {
  background: #eef3f9;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0055cc;
  font-weight: 700;
}#clearray-app .qp-bom-table tr.total td {
  background: #0a1628;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}#clearray-app .qp-bom-table tr.total td * { color: #fff !important; }#clearray-app .qp-footer { margin-top: 24px; padding-top: 14px; border-top: 2px solid #00D4FF; font-size: 0.7rem; color: #888; display: flex; justify-content: space-between; }#clearray-app .modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}#clearray-app .modal-actions button {
  background: var(--grad-btn);
  border: 0;
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.82rem;
}#clearray-app .modal-actions button.gh { background: rgba(255,255,255,0.08); border: 1px solid var(--border); }


@media print {}
}#clearray-app .sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }#clearray-app .sd-result {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}#clearray-app .sd-result-l { font-family: var(--mono); font-size: 0.6rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; }#clearray-app .sd-result-v { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--cyan); margin-top: 2px; }#clearray-app .sd-result-v.warn { color: var(--warm); }#clearray-app .sd-result-v.fail { color: var(--red); }


@media (max-width: 1280px) {#clearray-app .layout { grid-template-columns: 1fr 340px; }#clearray-app .sidebar-l { display: none; }
}
@media (max-width: 900px) {#clearray-app .layout { grid-template-columns: 1fr; }#clearray-app .bom { position: relative; top: 0; max-height: none; }#clearray-app .hero-card { grid-template-columns: 1fr; }#clearray-app .hero-stats { width: 100%; justify-content: stretch; }#clearray-app .stat-pill { flex: 1; }#clearray-app .arch-row { grid-template-columns: 1fr; gap: 6px; }#clearray-app .arch-arrow { transform: rotate(90deg); padding: 4px 0; }#clearray-app .rec-stats { grid-template-columns: 1fr 1fr; }#clearray-app .dc-check { grid-template-columns: 1fr 1fr; }
}

#clearray-app { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — injected fix
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {

  /* Top bar: stack brand + icon-only action buttons */
  #clearray-app .top-bar-inner {
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  #clearray-app .brand {
    font-size: 0.95rem;
    flex-shrink: 0;
  }
  #clearray-app .brand-accent {
    display: none;           /* hide "System Designer" text, keep "ClearRay" */
  }
  #clearray-app .top-actions {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  /* Hide text labels on mobile, show only emoji icons */
  #clearray-app .top-btn {
    font-size: 0;            /* hide text */
    padding: 8px 9px;
    min-width: 36px;
    border-radius: 8px;
  }
  #clearray-app .top-btn::first-letter {
    font-size: 1rem;         /* show only emoji */
  }
  /* "Generate Quote" stays visible with shortened label */
  #clearray-app .top-btn.primary {
    font-size: 0.72rem;
    padding: 8px 10px;
    white-space: nowrap;
  }
  #clearray-app .top-btn.primary::first-letter {
    font-size: 0.72rem;
  }

  /* Hero section */
  #clearray-app .hero {
    margin: 12px auto 0;
    padding: 0 12px;
  }
  #clearray-app .hero-card {
    padding: 18px 16px;
    gap: 16px;
    grid-template-columns: 1fr;
  }
  #clearray-app .hero-left h1 {
    font-size: 1.4rem;
  }
  #clearray-app .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
  }
  #clearray-app .stat-pill {
    flex: unset;
    padding: 10px 8px;
  }
  #clearray-app .stat-pill-v {
    font-size: 1.1rem;
  }
  #clearray-app .ai-bar input {
    font-size: 0.85rem;
  }

  /* Main layout: single column, no padding bleed */
  #clearray-app .layout {
    grid-template-columns: 1fr;
    padding: 0 12px;
    gap: 14px;
    margin: 14px auto 40px;
  }

  /* Cards: tighten padding */
  #clearray-app .card {
    padding: 16px 14px;
  }

  /* System sizing buttons */
  #clearray-app .btn-tog-group {
    flex-wrap: wrap;
    gap: 6px;
  }
  #clearray-app .btn-tog {
    flex: 1 1 auto;
    min-width: 70px;
  }

  /* Recommended build stats */
  #clearray-app .rec-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* DC check: 2 cols on mobile */
  #clearray-app .dc-check {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #clearray-app .dc-row {
    padding: 10px 12px;
  }

  /* Inverter grid: single col on mobile */
  #clearray-app .inv-grid {
    grid-template-columns: 1fr;
  }

  /* BOM sidebar: full width below grid */
  #clearray-app .bom {
    position: relative;
    top: 0;
    max-height: none;
    width: 100%;
  }

  /* Modals: full width */
  #clearray-app .modal {
    max-width: calc(100vw - 24px);
    margin: 12px;
    max-height: 90dvh;
    overflow-y: auto;
  }
  #clearray-app .modal.wide {
    max-width: calc(100vw - 24px);
  }

  /* String designer grid */
  #clearray-app .sd-grid {
    grid-template-columns: 1fr;
  }

  /* Architecture row */
  #clearray-app .arch-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  #clearray-app .arch-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HORIZONTAL OVERFLOW FIX — content bleeding off right edge
   ═══════════════════════════════════════════════════════════════ */
#clearray-app {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
#clearray-app * {
  box-sizing: border-box;
  max-width: 100%;
}
/* Grid children need min-width:0 to prevent blowout */
#clearray-app .layout > *,
#clearray-app .hero-card > *,
#clearray-app .rec-stats > *,
#clearray-app .dc-check > *,
#clearray-app .sd-grid > * {
  min-width: 0;
}
/* Inputs/selects must not exceed container */
#clearray-app input,
#clearray-app select,
#clearray-app textarea {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 700px) {
  /* Force ALL 2-col grids to single col */
  #clearray-app .sizing-grid,
  #clearray-app .config-grid,
  #clearray-app [style*="grid-template-columns: 1fr 1fr"],
  #clearray-app [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Ensure hero inner doesn't overflow */
  #clearray-app .hero-card,
  #clearray-app .hero-left,
  #clearray-app .ai-bar {
    width: 100%;
    max-width: 100%;
  }
  /* Top bar must not overflow */
  #clearray-app .top-bar,
  #clearray-app .top-bar-inner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  /* All cards full width */
  #clearray-app .card,
  #clearray-app .rec-build,
  #clearray-app .dc-check-wrap,
  #clearray-app .mcs-check,
  #clearray-app .inv-section {
    width: 100%;
    max-width: 100%;
  }
  /* btn-tog rows wrap */
  #clearray-app .btn-tog-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  /* Inputs in sizing grid */
  #clearray-app .num-input-wrap {
    width: 100%;
  }
  #clearray-app .num-input-wrap input {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — hide item detail icon, go single column
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  #clearray-app .item-emoji {
    display: none;
  }
  #clearray-app .item-detail {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #clearray-app .item-meta-row {
    grid-template-columns: 110px 1fr;
    font-size: 0.82rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — BOM moves to top of stacked layout
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #clearray-app .layout {
    display: flex;
    flex-direction: column;
  }
  #clearray-app .sidebar-l { order: 99; display: none; }
  #clearray-app .bom        { order: 1; }
  /* everything else (the center column div) stays order:2 by default */
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BOM REORDER — targeted fix with !important
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #clearray-app .layout {
    display: flex !important;
    flex-direction: column !important;
  }
  #clearray-app .sidebar-l  { order: 10 !important; display: none !important; }
  #clearray-app .bom        { order: -1 !important; width: 100% !important; max-height: none !important; position: relative !important; top: 0 !important; }
  #clearray-app .col-center { order: 1  !important; width: 100% !important; }
}
