:root {
  --bg: #08090d;
  --surface: #12141c;
  --line: #292c3a;
  --muted: #a5a8b8;
  --accent: #8b5cff;
  --accent-blue: #1677ff;
  --accent-orange: #ff7a2f;
  --text: #f7f7fb;
}

body {
  background:
    radial-gradient(circle at 72% 0, #162253 0, transparent 26%),
    radial-gradient(circle at 22% 8%, #2b1050 0, transparent 22%),
    var(--bg);
  background-attachment: fixed;
}

header {
  background: #08090ded;
  border-bottom-color: #272a38;
  box-shadow: 0 1px 0 #364fc422;
}

.channel-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(#111, #111) padding-box,
    linear-gradient(135deg, var(--accent-blue), var(--accent), var(--accent-orange)) border-box;
  box-shadow: 0 0 20px #684cff55;
}

.intro .eyebrow,
.panel .eyebrow,
#result .eyebrow {
  background: linear-gradient(90deg, #5e9fff, #b76cff, #ff9b4b);
  background-clip: text;
  color: transparent;
}

h1 span {
  background: linear-gradient(90deg, #b7c9ff, #b987ff, #ff9a5c);
  background-clip: text;
  color: transparent;
}

.editor,
.summary,
#result {
  background: linear-gradient(160deg, #171927, #101219 65%);
  border-color: #33364a;
  box-shadow: 0 22px 70px #02030a66;
}

.mode:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(135deg, #176eff10, #a844ff14);
  box-shadow: inset 0 0 0 1px #9c6dff33;
}

.mode input,
.check input {
  accent-color: var(--accent);
}

.primary {
  background: linear-gradient(110deg, var(--accent-blue), var(--accent));
  color: #fff;
  box-shadow: 0 8px 24px #4e39cc38;
}

.primary:hover {
  background: linear-gradient(110deg, #3188ff, #a173ff);
}

.small-chip {
  border-color: #714fe0;
  color: #c6aaff;
}

#result {
  border-color: #7456c7;
}

footer a {
  color: #aab5ff;
  text-decoration: none;
}

footer a:hover {
  color: #ff9b5c;
}

@media (max-width: 760px) {
  .channel-avatar { width: 38px; height: 38px; }
}

/* Hardware console refinement */
html { scroll-behavior: smooth; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  background-image:
    linear-gradient(#7080ff20 1px, transparent 1px),
    linear-gradient(90deg, #7080ff20 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 75%);
  z-index: 0;
}

#cooling-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .86;
}

header,
main { position: relative; }
header { z-index: 20; }
main { z-index: 1; }

header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  padding-block: 13px;
  backdrop-filter: blur(18px);
}

.brand { letter-spacing: .11em; }

.channel-avatar {
  transition: transform .2s ease, box-shadow .2s ease;
}

.brand:hover .channel-avatar {
  transform: scale(1.06);
  box-shadow: 0 0 28px #684cff88;
}

main {
  position: relative;
  max-width: 1280px;
  padding-top: 30px;
}

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 54px;
  min-height: 250px;
  margin-bottom: 24px;
  padding: 34px 40px;
  overflow: hidden;
  border: 1px solid #333854;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0, #6426a62c, transparent 45%),
    linear-gradient(125deg, #111421f2, #0c0e16f2);
  box-shadow: 0 24px 70px #0007, inset 0 1px #ffffff0a;
}

.intro::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  right: -230px;
  top: -240px;
  border: 1px solid #8b5cff30;
  border-radius: 50%;
  box-shadow: 0 0 0 48px #1677ff0a, 0 0 0 96px #8b5cff08;
  animation: thermal-orbit 12s linear infinite;
}

.intro-copy { position: relative; z-index: 1; }

.intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.intro .eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48a4ff;
  box-shadow: 0 0 14px #48a4ff;
}

.intro h1 {
  max-width: 680px;
  font-size: clamp(38px, 4.25vw, 58px);
  margin-bottom: 14px;
}

.analysis-flow {
  position: relative;
  z-index: 2;
  padding: 19px;
  border: 1px solid #393f5e;
  border-radius: 12px;
  background: #0a0d15b8;
  box-shadow: inset 0 1px #ffffff0b;
}

.flow-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 13px;
  margin-bottom: 12px;
  border-bottom: 1px solid #292e43;
  color: #8d96aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.flow-top b {
  color: #80c4ff;
  font-size: 9px;
}

.flow-item {
  display: flex;
  align-items: center;
  gap: 13px;
}

.flow-item em {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid #41465a;
  border-radius: 8px;
  color: #81899b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.flow-item.active em {
  border-color: #6778ff;
  color: #fff;
  background: linear-gradient(145deg, #137cff, #914fff);
  box-shadow: 0 0 18px #6d54ff55;
}

.flow-item span { display: grid; }
.flow-item strong { font-size: 13px; font-weight: 650; }
.flow-item small { color: #8f98aa; font-size: 11px; }

.flow-connector {
  width: 1px;
  height: 12px;
  margin: 3px 0 3px 15px;
  background: linear-gradient(#5c65a5, #30354b);
}

.workspace { gap: 22px; }

.editor {
  border-radius: 16px;
  box-shadow: 0 24px 70px #0008, inset 0 1px #ffffff08;
}

.steps {
  min-height: 67px;
  align-items: stretch;
  background: #0d1019a8;
}

.step { position: relative; padding: 21px 0 18px; }
.step.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, #1677ff, #a85cff, #ff7a2f);
  box-shadow: 0 0 12px #885cff;
  background-size: 220% 100%;
  animation: energy-line 2.4s linear infinite;
}

.panel { padding: 34px 36px 30px; }
.panel h2 { font-size: 26px; }

.mode {
  min-height: 128px;
  border-color: #363c50;
  background: linear-gradient(145deg, #161a25, #11141d);
}

.mode:hover {
  border-color: #5a6280;
  transform: translateY(-1px);
}

input:not([type=radio]):not([type=checkbox]), textarea, select {
  border-color: #343b50;
  background: #090c13c7;
  box-shadow: inset 0 1px 2px #0006;
}

input:not([type=radio]):not([type=checkbox]):focus,
textarea:focus,
select:focus {
  border-color: #7f63ff;
  box-shadow: 0 0 0 3px #7f63ff1f, inset 0 1px 2px #0006;
  outline: none;
}

.inline-tip {
  border-left: 2px solid #7771ff;
  background: linear-gradient(90deg, #282641, #1b202a);
}

.form-footer {
  min-height: 78px;
  background: #0c0f17b5;
}

.workspace > aside {
  position: sticky;
  top: 94px;
}

.summary {
  position: relative;
  top: auto;
  border-radius: 16px;
  background:
    linear-gradient(155deg, #181a2a, #10131c 65%),
    #11141c;
}

.summary::before {
  content: "";
  display: block;
  height: 2px;
  margin: -24px -24px 21px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #1677ff, #9a55ff, #ff7a2f);
  background-size: 220% 100%;
  animation: energy-line 3s linear infinite;
}

@keyframes energy-line {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@keyframes thermal-orbit {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  to { transform: rotate(360deg) scale(1); }
}

.summary-row strong { color: #eff1ff; }

.workflow-note {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid #292e3e;
  border-radius: 14px;
  background: #0d1017a6;
}

.example {
  padding-inline: 20px;
  border: 1px solid #343a4c;
  border-radius: 10px;
  background: #11151e;
}

.example:hover {
  border-color: #725eff;
  background: #17182a;
}

.primary {
  min-height: 48px;
  border: 1px solid #9b8bff70;
}

@media (max-width: 1000px) {
  .intro { grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; padding: 30px; }
}

@media (max-width: 760px) {
  header { position: relative; }
  .intro { grid-template-columns: 1fr; padding: 26px 22px; }
  .intro h1 { font-size: 38px; }
  .analysis-flow { display: none; }
  .panel { padding: 25px 20px; }
  .workspace > aside { position: relative; top: auto; }
  .steps { gap: 16px; overflow-x: auto; }
  .step { white-space: nowrap; }
  #cooling-canvas { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #cooling-canvas { opacity: .4; }
  .intro::after,
  .step.active::after,
  .summary::before { animation: none; }
}
