:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  --sb-bg: #06141c;
  --sb-surface: #102630;
  --sb-cyan: #6afff3;
  --sb-text: #f3feff;
  --sb-muted: #a8c3cb;
  --sb-line: rgba(105, 242, 238, .27);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--sb-bg); color: var(--sb-text); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.sb-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 24px 24px 100px;
  background:
    radial-gradient(circle at 56% 29%, rgba(10, 175, 176, .2), transparent 35%),
    radial-gradient(circle at 96% 2%, rgba(153, 95, 231, .15), transparent 24%),
    linear-gradient(165deg, #0a2630 0%, #06141c 47%, #071923 100%);
}

.sb-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(134, 255, 247, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(134, 255, 247, .12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, transparent 76%);
}

.sb-shell { position: relative; width: min(1300px, 100%); margin: 0 auto; }
.sb-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 12px 0 38px; }
.sb-breadcrumb { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; color: #a7c2ca; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sb-breadcrumb a { text-decoration: none; }
.sb-breadcrumb a:hover { color: var(--sb-cyan); }
.sb-breadcrumb span:last-child { color: #eafafa; }
.sb-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #7cfbf2; font-size: 13px; font-weight: 900; letter-spacing: .19em; text-transform: uppercase; }
.sb-hero h1 { max-width: 760px; margin: 13px 0 15px; font-size: clamp(48px, 6.3vw, 90px); line-height: .97; letter-spacing: -.065em; }
.sb-hero h1 em { color: var(--sb-cyan); font-style: normal; text-shadow: 0 0 42px rgba(82, 255, 242, .22); }
.sb-hero p { max-width: 760px; margin: 0; color: var(--sb-muted); font-size: 18px; line-height: 1.55; text-wrap: balance; }
.sb-hero__guide { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; padding: 4px 0; border-bottom: 1px solid rgba(106, 255, 243, .55); color: #8dfff5; font-size: 14px; font-weight: 800; text-decoration: none; transition: color .18s ease, border-color .18s ease; }
.sb-hero__guide:hover, .sb-hero__guide:focus-visible { color: #fff; border-color: #fff; outline: none; }
.sb-hero__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-bottom: 4px; }
.sb-action { min-height: 48px; padding: 0 18px; border: 1px solid var(--sb-line); border-radius: 10px; color: #eafcfd; background: #112b35; font-size: 13px; font-weight: 900; letter-spacing: .05em; white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.sb-action:hover:not(:disabled) { transform: translateY(-2px); border-color: #74fff5; box-shadow: 0 9px 26px rgba(0,0,0,.28); }
.sb-action--primary { border-color: transparent; color: #03232a; background: linear-gradient(135deg, #86fff7, #36cad7); box-shadow: 0 10px 27px rgba(43, 231, 224, .16); }
.sb-action--primary span { font-size: 18px; }
.sb-action:disabled { opacity: .55; cursor: wait; }

.sb-workspace { position: relative; padding: 20px; border: 1px solid rgba(112, 253, 244, .33); border-radius: 24px; background: linear-gradient(145deg, rgba(28, 68, 78, .86), rgba(5, 20, 28, .96) 57%); box-shadow: 0 34px 85px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255,255,255,.14); }
.sb-workspace::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(130deg, #6afff3, transparent 35%, #976ef9 100%); filter: blur(22px); opacity: .25; }
.sb-workspace__topline, .sb-workspace__bottomline { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 8px; color: #a8c6ce; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.sb-workspace__topline { margin-bottom: 18px; }
.sb-workspace__topline span:first-child { display: inline-flex; align-items: center; gap: 10px; color: #e8ffff; }
.sb-workspace__indicator { width: 8px; height: 8px; border-radius: 50%; background: #4cffe9; box-shadow: 0 0 13px #4cffe9; }
.sb-workspace__bottomline { margin-top: 17px; }

.sb-panel { position: relative; width: 100%; aspect-ratio: 648 / 360; isolation: isolate; background: center / 100% 100% no-repeat; image-rendering: pixelated; filter: drop-shadow(0 18px 18px rgba(0,0,0,.28)); }
.sb-slot { position: absolute; z-index: 1; display: grid; grid-template-columns: 30% minmax(0, 1fr); align-items: center; gap: 0; padding: 8px 9px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: #f0fafc; text-align: center; image-rendering: auto; }
button.sb-slot::before { content: ""; position: absolute; inset: 7% 3.4%; border: 1px solid rgba(107, 255, 245, .75); border-radius: 2px; background: rgba(48, 220, 216, .13); box-shadow: inset 0 0 24px rgba(67,255,243,.11), 0 0 23px rgba(70,239,232,.11); opacity: 0; pointer-events: none; transition: opacity .17s ease; }
button.sb-slot:hover::before, button.sb-slot:focus-visible::before { opacity: 1; }
button.sb-slot:focus-visible { outline: none; }
button.sb-slot:disabled { cursor: wait; }
.sb-slot[data-slot="dna"] { left: .7%; top: 6.7%; width: 31.9%; height: 27.5%; }
.sb-slot[data-slot="motor"] { left: 34%; top: 6.7%; width: 31.9%; height: 27.5%; }
.sb-slot[data-slot="power"] { left: .7%; top: 37%; width: 31.9%; height: 27.5%; }
.sb-slot[data-slot="thermal"] { left: 34%; top: 37%; width: 31.9%; height: 27.5%; }
.sb-slot[data-slot="filter"] { left: .7%; top: 67%; width: 31.9%; height: 27.5%; }
.sb-slot[data-slot="processor"] { left: 34%; top: 67%; width: 31.9%; height: 27.5%; }
.sb-slot__art { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle, rgba(178, 229, 240, .12), transparent 67%); }
.sb-slot__art img { display: block; width: min(72px, 78%); aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 7px 7px rgba(0,0,0,.48)); }
.sb-slot__copy { position: relative; z-index: 1; min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.sb-slot__label { color: #7afaf0; font-size: clamp(11px, .9vw, 14px); font-weight: 950; letter-spacing: .11em; text-transform: uppercase; }
.sb-slot__copy strong { max-width: 100%; color: #f5fcff; font-size: clamp(12px, 1.17vw, 17px); line-height: 1.17; overflow-wrap: anywhere; }
.sb-slot__copy small { color: #a9bdc8; font-size: clamp(10px, .87vw, 13px); line-height: 1.2; }
.sb-slot__lock { position: absolute; z-index: 1; right: 12px; bottom: 10px; color: #9cb0bb; font-size: 10px; font-weight: 900; letter-spacing: .08em; }

.sb-summary { position: absolute; top: 5%; right: 1.9%; bottom: 5.4%; width: 29.6%; display: flex; flex-direction: column; padding: clamp(4px, .8vw, 10px); image-rendering: auto; }
.sb-summary__mob { display: grid; gap: 5px; margin-bottom: 4%; }
.sb-summary__mob span { color: #82fff5; font-size: clamp(9px, .78vw, 12px); font-weight: 950; letter-spacing: .1em; }
.sb-summary__mob strong { overflow: hidden; font-size: clamp(13px, 1.35vw, 21px); white-space: nowrap; text-overflow: ellipsis; }
.sb-summary__resource { position: absolute; left: 3%; right: 3%; margin: 0; }
.sb-summary__resource:nth-of-type(2) { top: 18%; }
.sb-summary__resource:nth-of-type(3) { top: 34%; }
.sb-summary__resource > div:first-child { display: flex; justify-content: space-between; gap: 8px; color: #d4e1e5; font-size: clamp(10px, .9vw, 14px); font-weight: 850; text-transform: uppercase; }
.sb-summary__resource strong { color: #f3feff; }
.sb-summary__track { height: clamp(5px, .7vw, 9px); margin-top: 8px; overflow: hidden; border-radius: 99px; background: rgba(140,164,172,.21); }
.sb-summary__track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #23c6ce, #90fff5); box-shadow: 0 0 16px rgba(88,255,243,.5); transition: width .25s ease; }
.sb-summary__track span.is-limited { background: linear-gradient(90deg, #ed9b42, #ffcf70); box-shadow: 0 0 14px rgba(255,180,67,.5); }
.sb-summary__diagnostic { position: absolute; top: 51%; left: 3%; right: 3%; display: grid; gap: 5px; margin: 0; padding: 12px; border: 1px solid rgba(112, 245, 236, .2); border-radius: 7px; background: rgba(6, 29, 39, .8); }
.sb-summary__diagnostic span { color: #76f9ef; font-size: clamp(9px, .7vw, 11px); font-weight: 950; letter-spacing: .1em; }
.sb-summary__diagnostic strong { color: #f3ffff; font-size: clamp(11px, 1.05vw, 16px); }
.sb-summary__diagnostic small { color: #a8c8cc; font-size: clamp(9px, .76vw, 12px); line-height: 1.3; }
.sb-summary__stats { position: absolute; left: 3%; right: 3%; bottom: 6%; display: grid; gap: clamp(2px, .25vw, 4px); margin: 0; }
.sb-summary__stats div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c1d2d7; font-size: clamp(10px, .96vw, 14px); font-weight: 850; text-transform: uppercase; }
.sb-summary__stats strong { color: #f7fdff; font-size: 1.08em; }
.sb-summary__stats .sb-summary__total { color: #75fff2; font-size: clamp(13px, 1.25vw, 19px); }
.sb-summary__total strong { color: #75fff2; font-size: 1.1em; text-shadow: 0 0 18px rgba(98,255,240,.32); }

.sb-results { padding-top: 58px; }
.sb-section-heading h2 { margin: 11px 0 25px; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.04em; }
.sb-results__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sb-result { position: relative; min-height: 203px; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid rgba(104, 233, 231, .22); border-radius: 16px; background: linear-gradient(150deg, rgba(24, 61, 72, .78), rgba(8, 27, 37, .86)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.sb-result--primary { border-color: rgba(119, 255, 241, .55); background: linear-gradient(140deg, rgba(27, 115, 118, .55), rgba(11, 40, 53, .9)); }
.sb-result__icon { position: absolute; right: 21px; top: 16px; color: rgba(120,255,243,.38); font-size: 36px; }
.sb-result__label { color: #a3d0d0; font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.sb-result strong { margin-top: 19px; color: #f4ffff; font-size: clamp(32px, 3.4vw, 51px); line-height: 1; letter-spacing: -.04em; }
.sb-result--primary strong { color: #8ffff2; }
.sb-result p { margin: auto 0 0; padding-top: 16px; color: #a8c0c8; font-size: 14px; line-height: 1.45; }
.sb-note { max-width: 920px; margin: 21px 0 0; color: #9cb9c2; font-size: 14px; line-height: 1.6; }

.sb-dialog { width: min(670px, calc(100% - 28px)); max-height: min(780px, calc(100vh - 30px)); padding: 0; overflow: hidden; border: 1px solid rgba(117, 255, 242, .53); border-radius: 18px; color: #effeff; background: #0a202b; box-shadow: 0 30px 90px rgba(0,0,0,.68); }
.sb-dialog::backdrop { background: rgba(1, 8, 14, .79); backdrop-filter: blur(8px); }
.sb-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid rgba(112, 237, 232, .19); background: radial-gradient(circle at 88% 0, rgba(102,255,239,.14), transparent 45%); }
.sb-dialog h2 { margin: 9px 0 5px; font-size: 31px; line-height: 1.1; }
.sb-dialog__head p { margin: 0; color: #b0c9d0; font-size: 14px; line-height: 1.5; }
.sb-dialog__close { width: 38px; height: 38px; flex: none; border: 1px solid rgba(113,244,239,.25); border-radius: 8px; color: #eaffff; background: #15333f; font-size: 26px; line-height: 1; }
.sb-dialog__close:hover { border-color: #75fff4; }
.sb-dialog__search { display: grid; gap: 8px; margin: 20px 26px 0; color: #8cefe9; font-size: 12px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.sb-dialog__search[hidden] { display: none; }
.sb-dialog__search input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid rgba(115,255,244,.3); border-radius: 9px; color: #f8ffff; background: #102a35; outline: none; font-size: 16px; }
.sb-dialog__search input:focus { border-color: #73fff3; box-shadow: 0 0 0 3px rgba(96,241,232,.12); }
.sb-dialog__choices { display: grid; gap: 10px; max-height: min(615px, calc(100vh - 192px)); padding: 20px 26px 26px; overflow: auto; }
.sb-dialog__choices[data-kind="dna"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sb-option { width: 100%; min-height: 86px; display: flex; align-items: center; gap: 15px; padding: 12px 16px; border: 1px solid rgba(112,237,232,.19); border-radius: 11px; color: #f5ffff; background: linear-gradient(135deg, #13323f, #0b2430); text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.sb-option:hover, .sb-option:focus-visible { border-color: #79fff2; outline: none; background: #1a4852; transform: translateX(3px); }
.sb-option.is-selected { border-color: #68fff2; box-shadow: inset 0 0 0 1px rgba(104,255,242,.28); }
.sb-option img { width: 60px; height: 60px; flex: none; object-fit: contain; image-rendering: pixelated; }
.sb-option__copy { min-width: 0; display: grid; gap: 4px; }
.sb-option__copy strong { font-size: 17px; }
.sb-option__copy small { color: #b4cbd1; font-size: 13px; line-height: 1.3; }
.sb-option__impact { margin-left: auto; color: #84fff2; font-size: 13px; font-weight: 900; white-space: nowrap; }
.sb-noscript { padding: 20px; color: #fff; text-align: center; }

@media (max-width: 1080px) {
  .sb-hero { align-items: flex-start; flex-direction: column; }
  .sb-hero__actions { justify-content: flex-start; }
  .sb-results__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sb-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; aspect-ratio: auto; background: none; filter: none; }
  .sb-panel .sb-slot, .sb-summary { position: relative; inset: auto; width: auto; height: auto; }
  .sb-panel .sb-slot { min-height: 128px; padding: 13px; border: 1px solid rgba(113, 242, 237, .31); border-radius: 10px; background: linear-gradient(145deg, #1c3540, #102631); }
  button.sb-slot::before { inset: 0; border-radius: 10px; }
  .sb-panel .sb-slot { grid-template-columns: 80px minmax(0, 1fr); }
  .sb-slot__art img { width: 59px; }
  .sb-slot__label { font-size: 12px; }
  .sb-slot__copy strong { font-size: 15px; }
  .sb-slot__copy small { font-size: 12px; }
  .sb-summary { grid-column: 1 / -1; min-height: 355px; padding: 22px; border: 1px solid rgba(113,242,237,.31); border-radius: 12px; background: linear-gradient(145deg, #1b3540, #0a1d29); }
  .sb-summary__resource, .sb-summary__diagnostic, .sb-summary__stats { position: static; }
  .sb-summary__resource { margin-top: 16px; }
  .sb-summary__mob span, .sb-summary__resource > div:first-child, .sb-summary__stats div { font-size: 14px; }
  .sb-summary__mob strong { font-size: 23px; }
  .sb-summary__resource:nth-of-type(2), .sb-summary__resource:nth-of-type(3) { top: auto; }
  .sb-summary__track { height: 9px; }
  .sb-summary__stats { gap: 8px; margin-top: 24px; margin-bottom: 18px; }
  .sb-summary__diagnostic { margin-top: 22px; }
  .sb-summary__diagnostic span, .sb-summary__diagnostic small { font-size: 12px; }
  .sb-summary__diagnostic strong { font-size: 17px; }
  .sb-summary__stats .sb-summary__total { font-size: 19px; }
}

@media (max-width: 600px) {
  .sb-page { padding: 18px 14px 72px; }
  .sb-hero { padding-bottom: 24px; }
  .sb-hero h1 { font-size: clamp(45px, 11vw, 62px); }
  .sb-hero p { font-size: 16px; }
  .sb-hero__actions { width: 100%; }
  .sb-action { flex: 1 1 auto; }
  .sb-workspace { padding: 13px; border-radius: 17px; }
  .sb-workspace__topline, .sb-workspace__bottomline { flex-wrap: wrap; gap: 6px; font-size: 10px; }
  .sb-panel { grid-template-columns: 1fr; gap: 9px; }
  .sb-panel .sb-slot { min-height: 94px; }
  .sb-slot__art img { width: 59px; }
  .sb-results { padding-top: 44px; }
  .sb-results__grid { grid-template-columns: 1fr; gap: 10px; }
  .sb-result { min-height: 170px; }
  .sb-dialog__choices[data-kind="dna"] { grid-template-columns: 1fr; }
  .sb-dialog__head { padding: 20px; }
  .sb-dialog__search { margin: 15px 20px 0; }
  .sb-dialog__choices { padding: 16px 20px 20px; }
}

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