:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #5c5f62;
  --line: #111111;
  --fine: #d7d9dc;
  --green: #0b8f55;
  --red: #c44a36;
  --blue: #246fe5;
  --amber: #a36d00;
  --cyan: #007f83;
  --soft-green: #e8f6ef;
  --soft-red: #faede9;
  --soft-blue: #ebf1ff;
  --soft-amber: #fbf3df;
  --soft-gray: #f7f7f5;
  --selection-rail: 7px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
}

body {
  font-size: 13px;
  line-height: 1.4;
}

button,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

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

.shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  min-height: 56px;
  padding: 0 28px;
  border-bottom: 2px solid var(--line);
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: 210px;
  object-fit: contain;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.top-nav-item:hover,
.top-nav-item:focus-visible,
.auth-link:hover,
.auth-link:focus-visible {
  color: var(--blue);
  outline: 0;
}

.top-nav-divider {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.header-meta {
  justify-self: end;
  text-align: right;
}

.auth-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.auth-menu strong {
  max-width: clamp(140px, 18vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.1;
}

.auth-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-link.is-primary {
  padding: 0;
  border: 0;
  color: var(--ink);
  text-decoration: underline;
}

.header-meta span,
.eyebrow,
.subheading span,
.metric span,
.market-price span,
.team-compare-stat span,
.timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.header-meta strong {
  display: block;
  font-size: 12px;
}

.auth-menu span {
  display: inline-flex;
  white-space: nowrap;
}

.auth-menu .auth-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.auth-menu .auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workspace {
  min-height: calc(100vh - 56px);
  background:
    radial-gradient(rgba(0, 0, 0, 0.04) 0.55px, transparent 0.6px) 0 0 / 4px 4px,
    #fff;
}

.workflow-guide {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 3fr);
  border-bottom: 2px solid var(--line);
  background: #fff;
}

.workflow-copy {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 12px 18px;
  border-right: 2px solid var(--line);
}

.workflow-copy span,
.workflow-step-main span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.workflow-copy strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 10px 14px;
  border-right: 1px solid var(--fine);
  background: #fff;
  text-align: left;
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step:hover,
.workflow-step:focus-visible {
  background: var(--soft-blue);
  outline: 0;
}

.workflow-step.is-active {
  background: var(--soft-blue);
  box-shadow: inset 0 -5px 0 var(--blue);
}

.workflow-step.is-error {
  background: var(--soft-red);
  box-shadow: inset 0 -5px 0 var(--red);
}

.workflow-step-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.workflow-step.is-done .workflow-step-index {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.workflow-step.is-active .workflow-step-index {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.workflow-step.is-error .workflow-step-index {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.workflow-step-main {
  display: block;
  min-width: 0;
}

.workflow-step-main strong,
.workflow-step-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step-main strong {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.15;
}

.workflow-step-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.workflow-step-status {
  align-self: center;
  padding: 4px 6px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.workflow-step.is-active .workflow-step-status {
  border-color: var(--blue);
  background: #fff;
  color: var(--blue);
}

.workflow-step.is-done .workflow-step-status {
  border-color: var(--green);
  background: var(--soft-green);
  color: var(--green);
}

.workflow-step.is-error .workflow-step-status {
  border-color: var(--red);
  background: #fff;
  color: var(--red);
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(430px, 1fr) minmax(330px, 410px);
  min-height: calc(100vh - 132px);
}

.match-browser,
.detail-board,
.debate-panel {
  min-width: 0;
  border-right: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.debate-panel {
  border-right: 0;
  overflow-x: hidden;
}

.match-browser,
.debate-panel {
  padding: 16px;
  overflow: auto;
}

.detail-board {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 14px;
  padding: 16px;
  overflow: auto;
}

.panel-heading,
.market-board-header,
.subheading,
.market-row-head,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h1,
.panel-heading h2,
.market-board-header h2 {
  margin-top: 3px;
  font-size: 19px;
  line-height: 1.12;
}

select {
  min-height: 30px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.match-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.match-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--fine);
  background: #fff;
  text-align: left;
}

.match-card.is-active {
  border-color: var(--line);
  box-shadow: inset var(--selection-rail) 0 0 var(--blue);
}

.match-card.is-changed {
  border-color: var(--green);
  background: var(--soft-green);
  animation: match-card-change-pulse 1.1s ease-in-out 0s 3;
}

.match-card.is-active.is-changed {
  box-shadow: inset var(--selection-rail) 0 0 var(--green);
}

.match-card-top,
.team-line,
.market-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-card-top span {
  color: var(--muted);
  font-size: 11px;
}

.team-line strong {
  font-size: 15px;
}

.team-pair {
  display: grid;
  gap: 8px;
}

.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.team-pill img {
  width: 24px;
  height: 16px;
  border: 1px solid var(--fine);
  object-fit: cover;
}

.price-pill {
  min-width: 52px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  text-align: center;
  font-weight: 700;
}

.price-pill.is-empty {
  color: var(--muted);
  border-color: var(--fine);
  font-weight: 600;
}

.match-card.is-changed .price-pill:not(.is-empty) {
  border-color: var(--green);
  background: #fff;
}

.market-quick {
  padding-top: 8px;
  border-top: 1px solid var(--fine);
}

.market-quick span {
  color: var(--muted);
  font-size: 10px;
}

@keyframes match-card-change-pulse {
  0%,
  100% {
    filter: none;
  }

  50% {
    filter: saturate(1.25);
  }
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb {
  padding: 4px 7px;
  border: 1px solid var(--fine);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb.is-active {
  border-color: var(--line);
  color: var(--ink);
  font-weight: 700;
}

.match-hero {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--line);
  background: #fff;
}

.empty-panel {
  display: grid;
  align-content: center;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
}

.empty-panel strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.empty-panel span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.match-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.hero-team {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.hero-team:last-child {
  grid-template-columns: 1fr 36px;
  text-align: right;
}

.hero-team img {
  width: 36px;
  height: 24px;
  border: 1px solid var(--fine);
  object-fit: cover;
}

.hero-team h2 {
  font-size: 18px;
  line-height: 1.08;
}

.versus {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--line);
  font-weight: 700;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.final-result .metric strong {
  overflow-wrap: normal;
  word-break: keep-all;
  font-size: 13px;
}

.team-and-reference {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 14px;
}

.context-panel {
  display: grid;
  align-self: start;
  gap: 10px;
}

.context-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: auto;
  min-height: 54px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: #fff;
  text-align: left;
}

.context-toggle:hover,
.context-toggle:focus-visible {
  background: var(--soft-blue);
  outline: 0;
}

.context-toggle-copy {
  display: grid;
  min-width: 0;
}

.context-toggle-copy span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.context-toggle-copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-toggle-action {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.context-panel.is-collapsed .team-and-reference {
  display: none;
}

.context-panel.is-empty .context-toggle {
  border-color: var(--fine);
  background: var(--soft-gray);
}

.team-panel,
.reference-panel,
.market-board {
  border: 2px solid var(--line);
  background: #fff;
  padding: 14px;
}

.team-compare-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.team-compare-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--fine);
  background: #fff;
  text-align: left;
}

.team-compare-team img {
  width: 30px;
  height: 20px;
  border: 1px solid var(--fine);
  object-fit: cover;
}

.team-compare-team span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.team-compare-column {
  display: grid;
  gap: 8px;
}

.team-compare-stat {
  min-width: 0;
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border: 1px solid var(--fine);
  background: #fff;
  text-align: left;
}

.team-compare-stat.is-clickable {
  cursor: pointer;
}

.team-compare-stat.is-clickable:hover,
.team-compare-stat.is-clickable:focus-visible {
  border-color: var(--line);
  background: var(--soft-blue);
  outline: 0;
}

.team-compare-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.team-compare-stat.is-compact strong {
  font-size: 14px;
  line-height: 1.28;
}

.decision-inputs {
  display: grid;
  gap: 8px;
}

.decision-input-section {
  padding: 9px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
}

.decision-input-section > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.input-chip-row,
.input-note-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.input-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--fine);
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.input-chip.is-available {
  border-color: var(--green);
  background: var(--soft-green);
}

.input-chip.is-weak {
  border-color: var(--amber);
  background: var(--soft-amber);
}

.input-chip:hover,
.input-chip:focus-visible {
  border-color: var(--blue);
  box-shadow: inset var(--selection-rail) 0 0 var(--blue);
  outline: none;
}

.input-note-list {
  display: grid;
}

.input-note-list p {
  padding: 8px 10px;
  border-left: var(--selection-rail) solid var(--fine);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.supporting-data-audit {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--fine);
  background: #fff;
}

.supporting-data-title,
.supporting-data-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.supporting-data-title span,
.supporting-data-head span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.supporting-data-title strong,
.supporting-data-head strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

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

.supporting-data-card {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--fine);
  border-left: var(--selection-rail) solid var(--fine);
  background: var(--soft-gray);
}

.supporting-data-card.is-ok {
  border-left-color: var(--green);
  background: var(--soft-green);
}

.supporting-data-card.is-partial {
  border-left-color: var(--blue);
  background: var(--soft-blue);
}

.supporting-data-card.is-weak {
  border-left-color: var(--amber);
  background: var(--soft-amber);
}

.supporting-data-card.is-missing {
  border-left-color: var(--red);
  background: var(--soft-red);
}

.supporting-data-card p {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.supporting-data-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.movement-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.movement-bars {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.movement-bar {
  display: grid;
  grid-template-columns: 42px 1fr 58px;
  align-items: center;
  gap: 8px;
}

.bar-track {
  position: relative;
  height: 8px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
}

.bar-track::before {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: var(--line);
  content: "";
}

.bar-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--blue);
}

.bar-fill.is-positive {
  left: 50%;
}

.bar-fill.is-negative {
  right: 50%;
  background: var(--red);
}

.bar-fill.is-flat {
  left: 50%;
  width: 0 !important;
}

.market-board-header {
  margin-bottom: 12px;
}

.market-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
}

.market-tab {
  min-width: 92px;
  min-height: 30px;
  padding: 5px 9px;
  border-right: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.market-tab:last-child {
  border-right: 0;
}

.market-tab.is-active {
  background: var(--soft-amber);
}

.market-table {
  display: grid;
  gap: 8px;
}

.market-refresh-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
}

.market-refresh-status strong {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.market-refresh-copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 12px;
}

.market-refresh-copy span {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-refresh-copy em {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-refresh-status.is-running {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.market-refresh-status.is-done {
  border-color: var(--green);
  background: var(--soft-green);
}

.market-refresh-status.is-error {
  border-color: var(--red);
  background: var(--soft-red);
}

.market-refresh-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 180px;
  padding: 24px;
  border: 2px solid var(--blue);
  background: var(--soft-blue);
  text-align: center;
}

.market-refresh-placeholder strong {
  font-size: 22px;
}

.market-refresh-placeholder span {
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.market-refresh-loader {
  width: min(280px, 70%);
  height: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--blue) 0 36%, transparent 36% 100%) 0 0 / 84px 100% repeat-x,
    #fff;
  animation: market-refresh-loader 1s steps(5, end) infinite;
}

.market-line-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--fine);
  background: #fff;
}

.market-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.market-line-head strong {
  display: block;
  font-size: 15px;
}

.market-line-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.market-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.market-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
  text-align: left;
}

.market-selection.is-selected {
  border-color: var(--line);
  padding-left: calc(10px + var(--selection-rail));
  background: var(--soft-blue);
  box-shadow: inset var(--selection-rail) 0 0 var(--blue);
}

.market-selection.is-changed {
  border-color: var(--green);
  background: var(--soft-green);
  animation: market-change-pulse 1.1s ease-in-out 0s 3;
}

.market-selection.is-selected.is-changed {
  border-color: var(--green);
  box-shadow: inset var(--selection-rail) 0 0 var(--green);
}

.market-selection span,
.market-selection strong {
  min-width: 0;
}

.market-selection span {
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-selection strong {
  color: var(--ink);
  font-size: 17px;
  white-space: nowrap;
}

.market-selection.is-changed strong::after {
  content: " updated";
  margin-left: 6px;
  color: var(--green);
  font-size: 10px;
  text-transform: uppercase;
}

@keyframes market-refresh-loader {
  from {
    background-position: -84px 0, 0 0;
  }
  to {
    background-position: 84px 0, 0 0;
  }
}

@keyframes market-change-pulse {
  0%,
  100% {
    transform: translateY(0);
    outline: 0 solid rgba(11, 143, 85, 0);
  }
  50% {
    transform: translateY(-1px);
    outline: 3px solid rgba(11, 143, 85, 0.18);
  }
}

.market-row {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--fine);
  background: #fff;
  text-align: left;
}

.market-row.is-selected {
  border-color: var(--line);
  padding-left: calc(11px + var(--selection-rail));
  background: var(--soft-blue);
  box-shadow: inset var(--selection-rail) 0 0 var(--blue);
}

.market-row-head strong {
  display: block;
  font-size: 14px;
}

.market-row-head span {
  color: var(--muted);
  font-size: 11px;
}

.market-prices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.market-price {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--fine);
}

.market-price strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.ghost-button {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.selected-market {
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--line);
  background: var(--soft-gray);
}

.selected-market strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.selected-market span {
  display: block;
  color: var(--muted);
}

.selected-market-movement {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--fine);
}

.selected-market-movement > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.selected-market-movement .movement-bars {
  gap: 6px;
  margin-top: 6px;
}

.selected-market-movement .movement-bar {
  grid-template-columns: 32px 1fr 52px;
  gap: 6px;
}

.selected-market-movement .bar-track {
  height: 7px;
  background: #fff;
}

.agent-config,
.billing-panel,
.debate-progress,
.final-result {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px solid var(--line);
}

.billing-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.billing-card {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--fine);
  background: #fff;
}

.billing-card.is-warning {
  border-color: var(--red);
  background: var(--soft-red);
}

.billing-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.billing-card strong {
  font-size: 17px;
  line-height: 1.1;
}

.billing-notice {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
}

.billing-notice.is-warning {
  border-color: var(--red);
  background: var(--soft-red);
}

.billing-notice.is-ok {
  border-color: var(--green);
  background: var(--soft-green);
}

.billing-notice strong {
  font-size: 12px;
  text-transform: uppercase;
}

.billing-notice span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.billing-actions .ghost-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.billing-gate-panel {
  max-width: 760px;
}

.billing-gate-body {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 2px solid var(--line);
  background: var(--soft-gray);
}

.billing-gate-body.is-warning {
  background: var(--soft-red);
}

.billing-gate-body strong {
  font-size: 26px;
  line-height: 1.05;
}

.billing-gate-body p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.billing-gate-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
}

.billing-gate-metrics div {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.billing-gate-metrics div:last-child {
  border-right: 0;
}

.billing-gate-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.billing-gate-metrics strong {
  font-size: 22px;
}

.billing-gate-actions {
  margin-top: 16px;
}

.auth-panel {
  max-width: 620px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}

.auth-form input:disabled {
  background: var(--soft-gray);
  color: var(--muted);
}

.auth-action-row {
  display: flex;
  justify-content: flex-end;
}

.auth-action-row .ghost-button:disabled,
.auth-form .run-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-message,
.auth-error {
  padding: 10px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
  color: var(--muted);
  font-weight: 700;
}

.auth-error {
  border-color: var(--red);
  background: var(--soft-red);
  color: var(--ink);
}

.recharge-panel {
  max-width: 720px;
  grid-template-rows: auto auto auto;
  overflow-anchor: none;
  padding-bottom: 28px;
}

.recharge-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.recharge-metrics div {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.recharge-metrics div:last-child {
  border-right: 0;
}

.recharge-metrics span,
.recharge-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.recharge-metrics strong {
  font-size: 22px;
}

.recharge-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.recharge-form label {
  display: grid;
  gap: 6px;
}

.recharge-method-block {
  display: grid;
  gap: 8px;
}

.recharge-method-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.recharge-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.recharge-method-grid .ghost-button {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 58px;
  padding: 9px 11px;
  text-align: left;
}

.recharge-method-grid .ghost-button.is-active {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.recharge-method-grid .ghost-button.is-disabled {
  border-style: dashed;
  background: var(--soft-gray);
  color: var(--muted);
  opacity: 0.72;
}

.recharge-method-grid .ghost-button strong {
  font-size: 14px;
}

.recharge-method-grid .ghost-button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.crypto-recharge-block {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.crypto-recharge-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.crypto-recharge-block p {
  margin: 0;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.crypto-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.crypto-option-grid .ghost-button {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 44px;
  padding: 8px 10px;
  text-align: left;
}

.crypto-option-grid .ghost-button.is-active {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.crypto-option-grid .ghost-button strong {
  font-size: 13px;
}

.crypto-option-grid .ghost-button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.recharge-form input {
  width: 100%;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  font-weight: 800;
}

.recharge-form input:disabled {
  background: var(--soft-gray);
  color: var(--muted);
}

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

.recharge-presets .ghost-button {
  min-height: 42px;
  padding: 8px;
}

.recharge-presets .ghost-button.is-active {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.recharge-note {
  margin: 0;
  padding: 10px;
  border-left: 4px solid var(--blue);
  background: var(--soft-blue);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.recharge-qr-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--soft-blue);
}

.recharge-qr-panel.is-paid {
  border-color: var(--green);
  background: var(--soft-green);
}

.recharge-qr-panel.is-review,
.recharge-qr-panel.is-expired {
  border-color: var(--red);
  background: var(--soft-red);
}

.recharge-qr-panel > span,
.recharge-qr-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.recharge-qr-panel > strong,
.recharge-qr-head strong {
  font-size: 18px;
}

.recharge-qr-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recharge-qr-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.recharge-qr-head > div {
  display: grid;
  gap: 4px;
}

.recharge-qr-body {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.recharge-qr-body img {
  width: 156px;
  height: 156px;
  border: 1px solid var(--line);
  background: #fff;
}

.recharge-qr-body code {
  display: block;
  max-height: 156px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--fine);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}

.recharge-qr-actions {
  display: grid;
  gap: 8px;
}

.recharge-qr-actions code {
  max-height: none;
  min-height: 42px;
  overflow-wrap: anywhere;
}

.status-chip {
  border: 1px solid var(--line);
  background: #fff;
  padding: 5px 8px;
  color: var(--ink) !important;
}

.agent-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.agent-runtime {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--fine);
  background: var(--soft-blue);
}

.agent-runtime strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.agent-runtime span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.agent-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.85fr) minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
}

.agent-label strong {
  display: block;
  font-size: 12px;
}

.agent-label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.agent-row select {
  width: 100%;
}

.agent-row select:disabled {
  color: var(--ink);
  background: var(--soft-gray);
  opacity: 1;
}

.run-button {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.run-button:disabled {
  border-color: var(--fine);
  background: var(--fine);
  color: var(--muted);
  cursor: not-allowed;
}

.run-button.is-running:disabled {
  border-color: var(--line);
  background: var(--soft-blue);
  color: var(--ink);
}

.round-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.timeline-item {
  min-height: 58px;
  padding: 7px;
  border: 1px solid var(--fine);
  background: #fff;
}

.timeline-item.is-active {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.timeline-item.is-done {
  border-color: var(--green);
  background: var(--soft-green);
}

.timeline-item strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.agent-output-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.agent-output {
  position: relative;
  display: block;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--fine);
  background: #fff;
  text-align: left;
}

.agent-output:hover {
  border-color: var(--line);
}

.agent-output::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: transparent;
  content: "";
}

.agent-output.is-running {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.agent-output.is-running::before {
  background: var(--blue);
}

.agent-output.is-done::before {
  background: var(--green);
}

.agent-output.is-error {
  border-color: var(--red);
  background: var(--soft-red);
}

.agent-output.is-error::before {
  background: var(--red);
}

.agent-output-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.agent-output-head strong {
  font-size: 12px;
}

.agent-output-head span {
  color: var(--muted);
  font-size: 10px;
}

.agent-output p {
  color: var(--muted);
  font-size: 12px;
}

.output-modal[hidden] {
  display: none;
}

.output-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow-anchor: none;
  padding: 32px;
}

.output-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.output-modal-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(920px, calc(100vw - 64px));
  max-height: min(760px, calc(100vh - 64px));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  padding: 16px;
  border: 2px solid var(--line);
  background: #fff;
  z-index: 1;
  scrollbar-gutter: stable;
}

.output-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.output-modal-head h2 {
  margin-top: 3px;
  font-size: 19px;
}

.output-modal-head p,
.output-modal-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.output-modal-summary {
  padding: 10px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
}

.output-modal-summary p {
  margin-top: 5px;
  color: var(--muted);
}

.agent-note-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.input-detail-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.input-detail-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
}

.input-detail-section {
  display: grid;
  gap: 8px;
}

.input-detail-section > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.input-detail-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--fine);
}

.input-detail-table div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--fine);
  border-bottom: 1px solid var(--fine);
  background: #fff;
}

.input-detail-table div:nth-child(2n) {
  border-right: 0;
}

.input-detail-table div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.input-detail-table span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.input-detail-table strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.input-detail-table a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.input-detail-evidence-list {
  display: grid;
  gap: 8px;
}

.input-detail-evidence-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.input-detail-team-evidence-group {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--fine);
  border-left: var(--selection-rail) solid var(--blue);
  background: #fff;
}

.input-detail-team-evidence-group--away {
  border-left-color: var(--green);
}

.input-detail-team-evidence-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--fine);
  background: var(--panel);
}

.input-detail-team-evidence-head h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.input-detail-team-evidence-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.input-detail-evidence-list--compact {
  gap: 7px;
}

.input-detail-evidence-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--fine);
  background: #fff;
}

.input-detail-section--availability-evidence .input-detail-evidence-item {
  border-left: 0;
}

.input-detail-section--availability-evidence .input-detail-evidence-list {
  gap: 10px;
}

.input-detail-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.input-detail-evidence-head h4,
.input-detail-evidence-head strong {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.input-detail-evidence-head span {
  flex: 0 0 auto;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.input-detail-evidence-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.input-detail-evidence-item a {
  width: max-content;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.input-detail-notes {
  display: grid;
  gap: 8px;
}

.input-detail-notes p {
  padding: 10px 12px;
  border-left: var(--selection-rail) solid var(--blue);
  background: var(--soft-blue);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.agent-note-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--fine);
  background: #fff;
}

.agent-note-body p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.agent-note-body p:last-child {
  margin-bottom: 0;
}

.output-raw {
  min-height: 0;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #111;
  color: #f7f7f5;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.decision-console-panel {
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  width: min(1040px, calc(100vw - 64px));
  max-height: min(820px, calc(100vh - 64px));
}

.decision-console-head h2 {
  max-width: 720px;
}

.decision-console-status {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
}

.console-status-main {
  min-width: 0;
  padding: 12px;
  border: 2px solid var(--line);
  background: var(--soft-blue);
}

.console-status-main.is-done {
  background: var(--soft-green);
}

.console-status-main.is-error {
  background: var(--soft-red);
}

.console-status-main span,
.console-metric-grid span,
.decision-console-current span,
.console-feed-item span,
.decision-console-final span,
.console-step span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.console-status-main strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.08;
}

.console-status-main p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.console-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.console-metric-grid div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.console-metric-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.decision-console-progress {
  display: grid;
  gap: 9px;
}

.decision-console-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-gray);
}

.decision-console-track span {
  display: block;
  height: 100%;
  min-width: 3px;
  background: var(--blue);
  transition: width 220ms ease;
}

.decision-console-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.console-step {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--fine);
  background: #fff;
}

.console-step.is-active {
  border-color: var(--blue);
  background: var(--soft-blue);
  box-shadow: inset 0 -4px 0 var(--blue);
}

.console-step.is-done {
  border-color: var(--green);
  background: var(--soft-green);
}

.console-step.is-error {
  border-color: var(--red);
  background: var(--soft-red);
}

.console-step strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-console-current {
  padding: 11px 12px;
  border-left: var(--selection-rail) solid var(--blue);
  background: var(--soft-blue);
}

.decision-console-current strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.decision-console-current p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.decision-console-feed {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.console-feed-item {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--fine);
  border-left: var(--selection-rail) solid var(--fine);
  background: #fff;
}

.console-feed-item.is-running {
  border-color: var(--blue);
  border-left-color: var(--blue);
  background: var(--soft-blue);
}

.console-feed-item.is-done {
  border-left-color: var(--green);
}

.console-feed-item.is-error {
  border-color: var(--red);
  border-left-color: var(--red);
  background: var(--soft-red);
}

.console-feed-item strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.console-feed-item p {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.console-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.console-field-row span {
  padding: 4px 7px;
  border: 1px solid var(--fine);
  background: var(--soft-gray);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.decision-console-final {
  position: relative;
  padding: 12px;
  border: 2px solid var(--line);
  background: var(--soft-amber);
}

.decision-share-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.decision-console-final.is-directional {
  background: var(--soft-green);
}

.decision-console-final.is-watchlist {
  background: var(--soft-blue);
}

.decision-console-final strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.decision-console-final p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.decision-console-pill {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  min-width: min(340px, calc(100vw - 36px));
  gap: 3px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: var(--soft-blue);
  box-shadow: 5px 5px 0 var(--line);
  text-align: left;
}

.decision-console-pill[hidden] {
  display: none;
}

.decision-console-pill span,
.decision-console-pill small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.decision-console-pill strong {
  font-size: 15px;
  line-height: 1.1;
}

.recent-results-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.recent-result-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  border: 1px solid var(--fine);
  background: #fff;
}

.recent-result-score {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 72px;
  border-right: 1px solid var(--fine);
  background: var(--soft-gray);
}

.recent-result-score span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.recent-result-score strong {
  font-size: 20px;
  line-height: 1;
}

.recent-result-main {
  min-width: 0;
  padding: 12px;
}

.recent-result-main strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-result-main p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.final-result.is-ready {
  border-top-color: var(--line);
}

.result-card {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, #fff 0%, #fff 54%, var(--soft-gray) 100%);
  box-shadow: none;
}

.result-card * {
  min-width: 0;
}

.result-card.is-no-edge {
  border-color: var(--line);
}

.result-card.is-directional {
  background:
    linear-gradient(180deg, #fff 0%, #fff 54%, var(--soft-green) 100%);
}

.result-card.is-watchlist {
  background:
    linear-gradient(180deg, #fff 0%, #fff 54%, var(--soft-blue) 100%);
}

.result-card-top,
.result-section-title,
.result-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.result-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.result-brand,
.result-logo {
  display: block;
}

.result-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  background: #fff;
}

.result-logo {
  width: auto;
  height: 42px;
  max-width: 230px;
  object-fit: contain;
}

.result-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.result-badges span {
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

.share-button {
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.share-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.result-market-header {
  min-width: 0;
  padding: 10px 0 2px;
}

.result-market-copy {
  min-width: 0;
}

.result-market-copy span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-market-copy h2,
.result-market-copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-market-copy h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.08;
}

.result-market-copy strong {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.recommendation-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--line);
  border-left-width: 8px;
  background: var(--soft-amber);
}

.result-share-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.result-card.is-directional .recommendation-panel {
  background: var(--soft-green);
  border-left-color: var(--green);
}

.result-card.is-watchlist .recommendation-panel {
  background: var(--soft-blue);
  border-left-color: var(--blue);
}

.result-card.is-no-edge .recommendation-panel {
  border-left-color: var(--amber);
}

.recommendation-panel span,
.signal-item span,
.model-chip span,
.result-section-title span,
.result-footer span,
.debate-rail span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.recommendation-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.recommendation-panel p {
  max-width: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.debate-rail {
  padding: 8px 10px;
  border: 1px solid var(--fine);
  background: #fff;
}

.debate-rail strong {
  display: block;
  margin-top: 3px;
  overflow: visible;
  color: var(--ink);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.signal-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.signal-item {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-item:nth-child(2n),
.signal-item:last-child {
  border-right: 0;
}

.signal-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.signal-item strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.model-roster,
.pressure-map,
.hard-blockers,
.result-takeaways {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.result-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: baseline;
  margin-bottom: 8px;
}

.result-section-title strong,
.result-footer strong {
  font-size: 12px;
  text-align: left;
}

.model-chip-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.pressure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.pressure-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 8px;
  border: 1px solid var(--fine);
  background: #fff;
}

.pressure-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.pressure-item strong {
  font-size: 12px;
  text-align: right;
}

.pressure-item em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.pressure-item.is-positive {
  border-left: var(--selection-rail) solid var(--green);
}

.pressure-item.is-negative {
  border-left: var(--selection-rail) solid var(--red);
}

.pressure-item.is-blocker {
  border-left: var(--selection-rail) solid var(--red);
  background: var(--soft-red);
}

.pressure-item.is-neutral {
  border-left: var(--selection-rail) solid var(--fine);
}

.hard-blockers p {
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--fine);
  background: var(--soft-red);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.model-chip {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--fine);
  background: #fff;
}

.model-chip strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-chip small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.result-takeaways ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-takeaways li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--fine);
  background: #fff;
}

.result-takeaways li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.result-takeaways p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.result-footer {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .shell-header {
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
    gap: 18px;
  }

  .header-meta {
    display: grid;
  }

  .top-nav {
    gap: 16px;
  }

  .top-nav-item {
    font-size: 13px;
  }

  .app-grid {
    grid-template-columns: 320px minmax(430px, 1fr);
  }

  .debate-panel {
    grid-column: 1 / -1;
    border-top: 2px solid var(--line);
    border-right: 0;
  }
}

@media (max-width: 820px) {
  .shell-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 16px;
  }

  .brand {
    grid-column: 1;
  }

  .header-meta {
    grid-column: 2;
    grid-row: 1;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-top: 6px;
  }

  .top-nav-item {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .top-nav-divider {
    font-size: 12px;
  }

  .workflow-guide,
  .app-grid,
  .team-and-reference,
  .match-title {
    grid-template-columns: 1fr;
  }

  .workflow-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 9px 14px;
  }

  .workflow-steps {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    overflow-x: auto;
  }

  .workflow-step {
    min-height: 68px;
    border-right: 1px solid var(--fine);
    border-bottom: 0;
  }

  .workflow-step:last-child {
    border-right: 0;
  }

  .app-grid {
    min-height: 0;
  }

  .match-browser,
  .detail-board,
  .debate-panel {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .hero-team:last-child {
    grid-template-columns: 36px 1fr;
    text-align: left;
  }

  .hero-team:last-child img {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-metrics,
  .market-prices,
  .market-selection-grid,
  .round-track,
  .decision-console-status,
  .decision-console-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recharge-qr-body {
    grid-template-columns: 1fr;
  }

  .output-modal {
    padding: 16px;
  }

  .decision-console-panel {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 540px) {
  .match-browser,
  .detail-board,
  .debate-panel {
    padding: 12px;
  }

  .hero-metrics,
  .market-prices,
  .market-selection-grid,
  .team-compare-head,
  .team-compare-grid,
  .billing-summary,
  .billing-gate-metrics,
  .recharge-metrics,
  .recharge-method-grid,
  .crypto-option-grid,
  .recharge-presets,
  .recharge-qr-actions,
  .round-track,
  .decision-console-status,
  .decision-console-steps,
  .console-metric-grid {
    grid-template-columns: 1fr;
  }

  .billing-gate-metrics div,
  .recharge-metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .billing-gate-metrics div:last-child,
  .recharge-metrics div:last-child {
    border-bottom: 0;
  }

  .market-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .market-tab {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .market-tab:last-child {
    border-bottom: 0;
  }

  .result-card-top,
  .recommendation-panel,
  .result-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-badges {
    justify-content: flex-start;
  }

  .result-market-copy h2 {
    font-size: 20px;
  }

  .recommendation-panel p {
    max-width: none;
    text-align: left;
  }

  .signal-grid,
  .model-chip-grid,
  .supporting-data-grid,
  .input-detail-table,
  .input-detail-evidence-teams {
    grid-template-columns: 1fr;
  }

  .signal-item,
  .signal-item:nth-child(2n),
  .signal-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-item:last-child {
    border-bottom: 0;
  }

  .input-detail-table div,
  .input-detail-table div:nth-child(2n),
  .input-detail-table div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--fine);
  }

  .input-detail-table div:last-child {
    border-bottom: 0;
  }
}
