:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f6f8fb;
  --line: #d8e0ea;
  --text: #102033;
  --muted: #667488;
  --soft: #475569;
  --blue: #2563eb;
  --green: #00a878;
  --red: #d92d20;
  --amber: #d6a13d;
  --violet: #a88cff;
  --gold: #c7a45d;
  --terminal: #f6f8fb;
  --radius: 12px;
  --shadow: 0 18px 48px rgba(16, 32, 51, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: #102033;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  letter-spacing: 0;
}

.gb-tool-disclaimer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  border: 1px solid rgba(217, 45, 32, .28);
  border-radius: 12px;
  background: #fff5f4;
  padding: 14px 16px;
  color: #5b2a25;
}
.gb-tool-disclaimer strong { flex: 0 0 auto; color: #d92d20; }
.gb-tool-section :where(button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 3px;
}

button,
textarea,
input,
select {
  font: inherit;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .7fr);
  gap: 24px;
  align-items: center;
}

.hero-copy {
  padding: 28px 0;
}

.eyebrow {
  display: inline-flex;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .96;
}

.hero p {
  max-width: 680px;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.7;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-proof span {
  border: 1px solid rgba(199, 164, 93, .28);
  border-radius: 999px;
  background: rgba(199, 164, 93, .08);
  color: #f3dfb3;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions,
.result-actions,
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.button.primary {
  border-color: rgba(25, 195, 125, .5);
  background: #0f5f44;
}

.button.ghost {
  background: #11171b;
}

.button:hover {
  border-color: rgba(199, 164, 93, .74);
  transform: translateY(-1px);
}

.team-preview,
.wizard,
.starter-summary,
.card,
.prompt-panel,
.starter-intro {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 20, 24, .94);
  box-shadow: var(--shadow);
}

.team-preview {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.preview-header strong {
  color: var(--text);
}

.mini-agent {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f12;
  padding: 13px;
  font-weight: 850;
}

.mini-agent span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.mini-agent.risk {
  border-color: rgba(25, 195, 125, .48);
}

.starter-output {
  padding: 14px 0 30px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 7px 0 9px;
  font-size: 32px;
}

.section-heading p {
  color: var(--soft);
  line-height: 1.7;
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.output-grid article {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 15px;
}

.output-grid strong {
  display: block;
  color: var(--text);
  margin-bottom: 10px;
}

.output-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.how {
  padding: 26px 0;
}

.how h2 {
  font-size: 24px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.how-grid div {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 13px;
}

.how-grid b {
  display: block;
  color: var(--blue);
  font-size: 22px;
  margin-bottom: 10px;
}

.how-grid span {
  color: var(--soft);
  font-size: 14px;
}

.starter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding-top: 22px;
}

.wizard {
  padding: 22px;
}

.wizard-head {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.wizard-head span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.wizard-head h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.wizard-head p {
  color: var(--muted);
  line-height: 1.55;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: #090f12;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green), var(--blue));
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.choice-grid,
.agent-grid,
.indicator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.combined-step {
  display: grid;
  gap: 18px;
}

.choice,
.agent-card,
.indicator-card,
.preset-chip {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f12;
  color: var(--text);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.choice.selected,
.agent-card.selected,
.indicator-card.selected,
.preset-chip.selected {
  border-color: var(--green);
  background: rgba(25, 195, 125, .1);
}

.choice:hover,
.agent-card:hover,
.indicator-card:hover,
.preset-chip:hover {
  border-color: rgba(199, 164, 93, .55);
  background: rgba(199, 164, 93, .07);
  transform: translateY(-1px);
}

.choice strong,
.agent-card strong,
.indicator-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 7px;
}

.choice span,
.agent-card span,
.indicator-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.agent-card em {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.agent-card small,
.indicator-card small {
  display: inline-flex;
  margin-top: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.agent-card strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

.team-builder,
.risk-builder,
.indicator-builder {
  display: grid;
  gap: 18px;
}

.team-builder-head,
.agent-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.team-builder-head {
  margin-bottom: 0;
  align-items: flex-start;
}

.team-builder-head h3 {
  margin: 6px 0 7px;
  font-size: 26px;
}

.team-builder-head p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.55;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.risk-field {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f12;
  padding: 14px;
}

.risk-field span {
  color: var(--text);
  font-weight: 850;
}

.risk-field input,
.risk-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05080a;
  color: var(--text);
  padding: 0 11px;
  outline: none;
}

.risk-field input:focus,
.risk-field select:focus {
  border-color: rgba(199, 164, 93, .7);
  box-shadow: 0 0 0 3px rgba(199, 164, 93, .11);
}

.risk-field.invalid {
  border-color: rgba(255, 93, 93, .68);
  background: rgba(255, 93, 93, .06);
}

.risk-field.invalid input {
  border-color: rgba(255, 93, 93, .8);
}

.risk-field.invalid small {
  color: #ffb4b4;
}

.risk-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.schedule-field,
.schedule-window {
  grid-column: 1 / -1;
}

.schedule-window.is-hidden {
  display: none;
}

.segmented-control,
.quick-days,
.weekday-picker,
.time-window {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment,
.weekday-picker label {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05080a;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.segment.selected,
.weekday-picker label.selected {
  border-color: var(--green);
  background: rgba(25, 195, 125, .12);
  color: var(--text);
}

.weekday-picker label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.time-window label {
  display: grid;
  gap: 6px;
  flex: 1 1 180px;
}

.team-builder-head > span {
  flex: 0 0 auto;
  border: 1px solid rgba(199, 164, 93, .3);
  border-radius: 999px;
  background: rgba(199, 164, 93, .09);
  color: #f3dfb3;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 850;
}

.team-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.section-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.section-label strong {
  color: var(--text);
}

.section-label span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.preset-chip {
  min-height: 38px;
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
}

.team-selectors {
  display: grid;
  gap: 18px;
}

.agent-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-grid.compact .agent-card {
  min-height: 132px;
}

.team-builder-preview {
  display: grid;
  gap: 18px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f12;
  padding: 14px;
}

.team-builder-preview .team-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.metric-grid div,
.team-estimate,
.debate-mini div,
.final-vote {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f12;
  padding: 10px;
}

.metric-grid b {
  display: block;
  color: var(--gold);
  font-size: 25px;
  line-height: 1;
}

.metric-grid span,
.team-estimate span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.team-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.team-estimate span {
  margin-top: 0;
}

.team-estimate strong {
  color: var(--text);
  white-space: nowrap;
}

.debate-preview-box {
  padding-top: 14px;
}

.debate-mini {
  display: grid;
  gap: 8px;
}

.debate-mini div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 13px;
}

.debate-mini span::after {
  content: " →";
  color: var(--muted);
}

.debate-mini strong {
  color: var(--soft);
}

.debate-mini strong.agree {
  color: var(--green);
}

.debate-mini strong.reject {
  color: var(--red);
}

.debate-mini strong.neutral {
  color: var(--amber);
}

.final-vote {
  margin-top: 9px;
  border-color: rgba(25, 195, 125, .42);
  background: rgba(25, 195, 125, .1);
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.agent-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.starter-summary {
  align-self: start;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.starter-summary h3 {
  margin-bottom: 14px;
}

.starter-summary dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.starter-summary div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.starter-summary dt {
  color: var(--muted);
}

.starter-summary dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.readiness {
  margin-top: 14px;
  border: 1px solid rgba(199, 164, 93, .3);
  border-radius: 8px;
  background: rgba(199, 164, 93, .08);
  color: #f3dfb3;
  padding: 11px;
  font-size: 13px;
  line-height: 1.45;
}

.results {
  margin-top: 28px;
}

.is-hidden {
  display: none !important;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}

.prompt-result-panel,
.settings-result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 20, 24, .94);
  box-shadow: var(--shadow);
  padding: 18px;
}

.result-panel-head {
  margin-bottom: 16px;
}

.result-panel-head h2 {
  margin: 6px 0 6px;
  font-size: 32px;
}

.result-panel-head p {
  color: var(--muted);
  line-height: 1.55;
}

.trade-card-preview {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(61, 213, 152, .36);
  border-radius: 8px;
  background: #07110f;
  padding: 14px;
  margin-bottom: 14px;
}

.trade-card-preview strong {
  color: var(--green);
  font-size: 16px;
}

.trade-card-preview span {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.visual-preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 20, 24, .94);
  box-shadow: var(--shadow);
  margin-top: 18px;
  overflow: hidden;
}

.visual-preview-head {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.visual-preview-head strong {
  color: var(--text);
}

.visual-preview-head span {
  color: var(--muted);
  font-size: 13px;
}

.chart-preview {
  background: #03070b;
  overflow: hidden;
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 0;
  position: relative;
  z-index: 4;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 7, 11, .84);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.tag.buy,
.tp {
  color: #42f08f;
}

.tag.sell,
.sl {
  color: #ff6666;
}

.tag.watch {
  color: #ffb000;
}

.tag.day {
  color: #4ab8ff;
}

.tag.prev {
  color: #c78cff;
}

.tag.range {
  color: #f4f7fb;
}

.chart-stage {
  height: 390px;
  position: relative;
  margin-top: -2px;
  background:
    linear-gradient(to right, rgba(91, 109, 130, .22) 1px, transparent 1px) 0 0 / 9.1% 100%,
    linear-gradient(to bottom, rgba(91, 109, 130, .22) 1px, transparent 1px) 0 0 / 100% 52px,
    #03070b;
  overflow: hidden;
}

.chart-stage::before {
  content: "";
  position: absolute;
  inset: 54px 3% 40px 3%;
  background:
    linear-gradient(118deg, transparent 0 10%, #f2f7ff 10.4% 12%, transparent 12.4% 19%, #f2f7ff 19.4% 21%, transparent 21.4% 31%, #f2f7ff 31.4% 33%, transparent 33.4% 43%, #f2f7ff 43.4% 45%, transparent 45.4% 56%, #f2f7ff 56.4% 58%, transparent 58.4% 68%, #f2f7ff 68.4% 70%, transparent 70.4% 82%, #f2f7ff 82.4% 84%, transparent 84.4%);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .35));
  clip-path: polygon(0 92%, 9% 36%, 14% 27%, 20% 56%, 28% 92%, 35% 82%, 47% 64%, 55% 26%, 62% 12%, 70% 46%, 77% 67%, 86% 34%, 93% 10%, 100% 17%, 100% 24%, 93% 17%, 86% 41%, 77% 74%, 70% 53%, 62% 19%, 55% 33%, 47% 71%, 35% 89%, 28% 99%, 20% 63%, 14% 34%, 9% 43%, 0 99%);
  z-index: 2;
}

.price-line {
  position: absolute;
  left: 3.2%;
  right: 3.2%;
  height: 2px;
  z-index: 1;
}

.price-line span {
  position: absolute;
  right: 0;
  top: -17px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.line-blue {
  background: #3dafff;
}

.line-blue span {
  color: #3dafff;
}

.line-white {
  background: #e9eef7;
}

.line-white span {
  color: #f4f7fb;
}

.line-purple {
  background: #bb7dff;
}

.line-purple span {
  color: #d9a9ff;
}

.line-green {
  background: #24c27a;
}

.line-green span {
  color: #36e692;
}

.line-amber {
  background: #ffb000;
}

.line-amber span {
  color: #ffbd2e;
}

.line-top { top: 28%; }
.line-orl { top: 42%; }
.line-pdh { top: 49%; }
.line-vwap { top: 62%; }
.line-support { top: 63.5%; }
.line-pressure { top: 69.5%; }
.line-pdl { top: 77%; }
.line-orh { top: 88%; }
.line-low { top: 96%; }

.signal-label {
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: rgba(3, 7, 11, .88);
  padding: 4px 9px;
  font-size: clamp(13px, 1.8vw, 20px);
  font-weight: 950;
  z-index: 5;
  white-space: nowrap;
}

.buy-signal {
  top: 22%;
  left: 50%;
  color: #42f08f;
  transform: translateX(-18%);
}

.watch-signal {
  top: 65%;
  left: 41%;
  color: #ffb000;
  font-size: 15px;
}

.exit-signal {
  top: 68%;
  left: 70%;
  color: #ffb000;
}

.tp-line,
.sl-line {
  position: absolute;
  left: 57%;
  width: 16%;
  height: 3px;
  z-index: 3;
}

.tp-line {
  top: 28%;
  background: #42f08f;
}

.sl-line {
  top: 72%;
  background: #ff6666;
}

.tp-line span,
.sl-line span {
  position: absolute;
  right: -34px;
  top: -8px;
  font-size: 12px;
  font-weight: 900;
}

.tp-line span {
  color: #42f08f;
}

.sl-line span {
  color: #ff6666;
}

.candles {
  position: absolute;
  inset: 70px 5% 46px 5%;
  z-index: 3;
}

.candles i {
  position: absolute;
  bottom: 20%;
  width: 2px;
  height: 68px;
  background: #35d06f;
}

.candles i::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 24px;
  width: 6px;
  height: 24px;
  background: #35d06f;
}

.candles i.red {
  background: var(--red);
}

.candles i.red::after {
  background: var(--red);
}

.candles i:nth-child(1) { left: 2%; bottom: 2%; height: 70px; }
.candles i:nth-child(2) { left: 10%; bottom: 45%; height: 82px; }
.candles i:nth-child(3) { left: 14%; bottom: 48%; height: 76px; }
.candles i:nth-child(4) { left: 18%; bottom: 30%; height: 70px; }
.candles i:nth-child(5) { left: 22%; bottom: 11%; height: 66px; }
.candles i:nth-child(6) { left: 26%; bottom: 0%; height: 75px; }
.candles i:nth-child(7) { left: 30%; bottom: 10%; height: 68px; }
.candles i:nth-child(8) { left: 34%; bottom: 20%; height: 70px; }
.candles i:nth-child(9) { left: 38%; bottom: 27%; height: 75px; }
.candles i:nth-child(10) { left: 46%; bottom: 33%; height: 78px; }
.candles i:nth-child(11) { left: 50%; bottom: 49%; height: 78px; }
.candles i:nth-child(12) { left: 55%; bottom: 56%; height: 72px; }
.candles i:nth-child(13) { left: 59%; bottom: 50%; height: 74px; }
.candles i:nth-child(14) { left: 63%; bottom: 37%; height: 76px; }
.candles i:nth-child(15) { left: 67%; bottom: 27%; height: 70px; }
.candles i:nth-child(16) { left: 71%; bottom: 31%; height: 72px; }
.candles i:nth-child(17) { left: 75%; bottom: 42%; height: 73px; }
.candles i:nth-child(18) { left: 83%; bottom: 55%; height: 76px; }
.candles i:nth-child(19) { left: 87%; bottom: 60%; height: 74px; }
.candles i:nth-child(20) { left: 91%; bottom: 57%; height: 70px; }

.card {
  padding: 18px;
}

.card h3 {
  margin-bottom: 12px;
}

.summary-list,
.selected-agents,
.debate-flow {
  display: grid;
  gap: 9px;
}

.summary-item,
.selected-agent,
.debate-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f12;
  padding: 11px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.45;
}

.selected-agent strong,
.debate-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.selected-agent span {
  display: block;
}

.decision-preview {
  background:
    linear-gradient(145deg, rgba(199, 164, 93, .1), rgba(15, 20, 24, .96));
}

.decision-state {
  border: 1px solid rgba(214, 161, 61, .42);
  border-radius: 8px;
  background: rgba(214, 161, 61, .1);
  padding: 14px;
  margin-bottom: 12px;
}

.decision-state strong {
  display: block;
  color: #ffe0a3;
  font-size: 22px;
  margin-bottom: 5px;
}

.decision-state span {
  color: var(--soft);
}

.state-row {
  display: grid;
  gap: 8px;
}

.state-row span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #0a0f12;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.prompt-panel {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05080a;
}

.prompt-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.prompt-head h3 {
  margin-bottom: 5px;
}

.prompt-head span {
  color: var(--muted);
  font-size: 13px;
}

.prompt-panel textarea {
  width: 100%;
  min-height: 440px;
  display: block;
  border: 0;
  background: #05080a;
  color: #dce7f5;
  padding: 16px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.prompt-panel.is-collapsed textarea {
  display: none;
}

@media (max-width: 980px) {
  .hero,
  .starter,
  .team-layout,
  .results-layout,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 30px;
  }

  .how-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .chart-stage {
    height: 330px;
  }

  .output-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .starter-summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 24px, 1180px);
    padding-top: 16px;
  }

  h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions,
  .result-actions,
  .wizard-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .how-grid,
  .output-grid,
  .choice-grid,
  .agent-grid,
  .indicator-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

  .wizard,
  .starter-summary,
  .card,
  .visual-preview-head {
    padding: 15px;
  }

  .visual-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-stage {
    height: 290px;
  }

  .chart-toolbar {
    padding: 10px 10px 0;
  }

  .price-line span {
    right: 4px;
    font-size: 11px;
  }

  .watch-signal {
    left: 33%;
  }

  .exit-signal {
    left: 60%;
  }

  .agent-toolbar,
  .team-builder-head,
  .section-label,
  .starter-summary div {
    flex-direction: column;
  }

  .section-label span {
    text-align: left;
  }

  .preset-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .starter-summary dd {
    text-align: left;
  }
}

/* Prompt quality badge */
.prompt-quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(199, 164, 93, .12);
  border: 1px solid rgba(199, 164, 93, .3);
  color: var(--gold);
  cursor: default;
}
.prompt-quality-badge:empty { display: none; }
.prompt-quality-badge[data-grade="A"] { border-color: rgba(25, 195, 125, .4); background: rgba(25, 195, 125, .08); color: var(--green); }
.prompt-quality-badge[data-grade="B"] { border-color: rgba(199, 164, 93, .4); background: rgba(199, 164, 93, .08); color: var(--gold); }
.prompt-quality-badge[data-grade="C"] { border-color: rgba(255, 95, 87, .35); background: rgba(255, 95, 87, .07); color: var(--red); }

/* Starter card button — primary variant */
#copyStarterBtn {
  border-color: var(--gold);
  color: var(--gold);
}
#copyStarterBtn:hover {
  background: rgba(199, 164, 93, .12);
}

/* ===== UX v2 additions ===== */

/* Hero trust narrative (#1) */
.hero h1 { line-height: 1.02; }
.hero-guards {
  list-style: none;
  margin: 22px 0 4px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 680px;
}
.hero-guards li {
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 95, 87, .05);
  padding: 10px 12px;
}
.hero-guards b { display: block; color: var(--text); font-size: 14px; }
.hero-guards span { color: var(--muted); font-size: 13px; }
.hero-note {
  margin-top: 18px;
  max-width: 680px;
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* Operation flow diagram (#5) */
.flow { padding: 26px 0; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { font-size: 26px; margin-bottom: 8px; }
.section-heading p { color: var(--soft); max-width: 720px; line-height: 1.6; }
.flow-diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 20, 24, .7);
  padding: 14px 18px;
  overflow-x: auto;
}

/* Wizard step nav + autosave (#4) */
.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.step-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a0f12;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.step-dot b { color: inherit; font-size: 12px; }
.step-dot span { display: none; }
.step-dot.current { border-color: var(--blue); color: var(--blue); background: rgba(79, 179, 255, .1); }
.step-dot.current span { display: inline; }
.step-dot.done { border-color: rgba(25, 195, 125, .5); color: var(--green); }
.step-dot:not(.locked):hover { border-color: rgba(199, 164, 93, .6); color: var(--soft); }
.step-dot.locked { opacity: .45; cursor: not-allowed; }
.wizard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.save-hint {
  font-size: 12px;
  color: var(--green);
  opacity: 0;
  transition: opacity .2s ease;
}
.save-hint.show { opacity: 1; }
.link-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--soft); }

/* Persona archetype on personality choices (#3) */
.choice-persona .archetype {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  color: var(--blue);
}
.choice-persona.selected .archetype { color: var(--green); }

/* Agent selector */
.agent-card.persona {
  position: relative;
  min-height: 196px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 13px;
  overflow: hidden;
  isolation: isolate;
}

.agent-grid.compact .agent-card.persona {
  min-height: 196px;
}

.agent-card.persona::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--persona) 24%, transparent), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,.035), transparent 44%);
  opacity: .75;
  z-index: -1;
}

.agent-card.persona.selected {
  border-color: var(--persona);
  background: color-mix(in srgb, var(--persona) 10%, #0a0f12);
}

.agent-card.persona .agent-figure {
  width: 70px;
  height: 112px;
  align-self: start;
  justify-self: center;
  position: relative;
  margin-top: 4px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .36));
  transform: translateX(calc(var(--stance) * 1px));
}

.agent-figure::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 5px;
  width: 27px;
  height: 29px;
  border-radius: 45% 45% 42% 42%;
  background: #050607;
  box-shadow: inset -5px 0 0 rgba(255,255,255,.035);
}

.agent-figure::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 31px;
  width: 46px;
  height: 72px;
  border-radius: 24px 24px 10px 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), transparent 36%),
    #050607;
  clip-path: polygon(17% 0, 83% 0, 100% 26%, 83% 100%, 17% 100%, 0 26%);
}

.agent-figure span {
  position: absolute;
  left: 5px;
  top: 55px;
  width: 60px;
  height: 4px;
  border-radius: 999px;
  background: var(--persona);
  opacity: .9;
  box-shadow: 0 0 18px color-mix(in srgb, var(--persona) 72%, transparent);
}

.agent-card.persona .agent-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.agent-card.persona strong {
  display: block;
  margin: 0;
  font-size: 17px;
}

.agent-card .agent-role {
  color: var(--persona);
  font-size: 13px;
  font-weight: 850;
}

.agent-card.persona .agent-hover {
  position: absolute;
  inset: auto 10px 10px 10px;
  display: grid;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--persona) 58%, var(--line));
  border-radius: 8px;
  background: rgba(5, 8, 10, .96);
  color: var(--soft);
  padding: 10px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .42);
}

.agent-hover b {
  color: var(--persona);
  font-size: 13px;
}

.agent-hover span {
  color: var(--soft);
  font-size: 12px;
}

.agent-card.persona:hover .agent-hover,
.agent-card.persona:focus .agent-hover,
.agent-card.persona:focus-visible .agent-hover {
  opacity: 1;
  transform: translateY(0);
}

.selected-agent.persona strong { display: flex; align-items: center; gap: 8px; }
.selected-agent .persona-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--persona);
  flex: 0 0 auto;
}

/* Cost estimate card (#6) */
.cost-readout { display: grid; gap: 7px; }
.cost-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
}
.cost-row:last-child { border-bottom: none; }
.cost-row span { color: var(--muted); font-size: 13px; }
.cost-row strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.cost-row:last-child strong { color: var(--gold); }
.cost-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* Platform guide card (#7) */
.platform-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.platform-head strong { color: var(--blue); font-size: 16px; }
.platform-head span { color: var(--muted); font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.platform-guide ol { margin: 0; padding-left: 20px; }
.platform-guide li { color: var(--soft); font-size: 13px; line-height: 1.55; margin-bottom: 7px; }

/* Fail-closed recovery card (#8) */
.recovery-intro { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recovery-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(79, 179, 255, .04);
  padding: 12px;
}
.recovery-tag {
  display: inline-flex;
  border: 1px solid rgba(79, 179, 255, .4);
  border-radius: 4px;
  background: rgba(79, 179, 255, .08);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  margin-bottom: 8px;
}
.recovery-item strong { display: block; font-size: 14px; margin-bottom: 4px; }
.recovery-why { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.recovery-next { display: block; color: var(--soft); font-size: 12px; line-height: 1.5; }
.recovery-next b { color: var(--green); }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--blue); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* GoodBroker light-brand adaptation for the transplanted tool. */
.gb-tool-section .starter,
.gb-tool-section .results,
.gb-tool-section .visual-preview-card { color: #102033; }
.gb-tool-section .wizard,
.gb-tool-section .starter-summary,
.gb-tool-section .card,
.gb-tool-section .prompt-panel,
.gb-tool-section .settings-result-panel,
.gb-tool-section .prompt-result-panel,
.gb-tool-section .visual-preview-card,
.gb-tool-section .team-section,
.gb-tool-section .risk-field,
.gb-tool-section .choice,
.gb-tool-section .agent-card,
.gb-tool-section .recovery-item {
  border-color: #d8e0ea;
  background: #ffffff;
  color: #102033;
  box-shadow: none;
}
.gb-tool-section :where(.choice, .agent-card, .preset-chip, .segment, .button) {
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.gb-tool-section :where(.choice, .agent-card):hover {
  border-color: #2563eb;
  transform: translateY(-2px);
}
.gb-tool-section :where(.choice.selected, .agent-card.selected, .preset-chip.selected, .segment.selected) {
  border-color: #00a878;
  background: #ecfdf5;
  color: #102033;
}
.gb-tool-section :where(.danger, .invalid, [aria-invalid="true"]) {
  border-color: #d92d20 !important;
  background-color: #fff5f4 !important;
}
.gb-tool-section :where(p, span, dd, .choice span, .agent-card span, .cost-note) { color: #667488; }
.gb-tool-section :where(h2, h3, strong, dt, label, .choice strong, .agent-card strong) { color: #102033; }
.gb-tool-section .button { border-radius: 999px; border-color: #d8e0ea; background: #fff; color: #102033; }
.gb-tool-section .button.primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.gb-tool-section .button.primary:hover { background: #1d4ed8; }
.gb-tool-section input,
.gb-tool-section select,
.gb-tool-section textarea { border-color: #d8e0ea; background: #fff; color: #102033; }
.gb-tool-section .wizard { box-shadow: 0 18px 48px rgba(16, 32, 51, .12); }
.gb-tool-section .flow-diagram,
.gb-tool-section .chart-stage,
.gb-tool-section .prompt-panel { background: #f6f8fb; }
.gb-tool-section .step-dot b { color: inherit; }
@media (max-width: 640px) {
  .gb-tool-disclaimer { flex-direction: column; }
  .gb-tool-section { overflow: clip; }
}

@media (max-width: 720px) {
  .hero-guards,
  .recovery-grid { grid-template-columns: 1fr; }
  .step-dot.current span { display: none; }
}
