.result-view {
  display: grid;
  gap: 18px;
}

.json-dump {
  display: none;
}

.brand-mark {
  text-decoration: none;
  cursor: pointer;
}

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

.result-summary div,
.provider-chip {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.22);
}

.result-summary div {
  min-height: 82px;
  padding: 15px;
}

.result-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.result-summary strong {
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
}

.result-section {
  display: grid;
  gap: 12px;
}

.result-section h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.scenario-hero {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 18px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(232,196,106,.11), rgba(110,231,183,.06));
}

.scenario-hero h2 {
  margin: 2px 0 8px;
  font-size: 28px;
}

.scenario-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.scenario-job {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 0;
}

.scenario-job span,
.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scenario-job strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.scenario-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scenario-kpis div {
  min-height: 96px;
  background: rgba(255,255,255,.035);
}

.scenario-kpis strong {
  font-size: 20px;
  word-break: normal;
}

.scenario-alert {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(232,196,106,.38);
  border-radius: 20px;
  background: rgba(232,196,106,.08);
}

.scenario-alert strong {
  color: var(--accent);
}

.scenario-alert ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

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

.scenario-section {
  display: grid;
  gap: 10px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-title h3,
.scenario-section h3 {
  margin: 0;
  font-size: 20px;
}

.scenario-table-wrap {
  background: rgba(0,0,0,.16);
}

.scenario-table {
  min-width: 620px;
}

.scenario-grid .scenario-table {
  min-width: 0;
}

.scenario-grid .scenario-table-wrap {
  overflow-x: hidden;
}

.scenario-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(14,16,28,.98);
}

.scenario-table td {
  vertical-align: top;
}

.scenario-table td:nth-child(1),
.scenario-table th:nth-child(1),
.scenario-table td:nth-child(2),
.scenario-table th:nth-child(2) {
  text-align: left;
}

.scenario-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.025);
}

.market-hero {
  align-items: center;
  background: linear-gradient(135deg, rgba(110,231,183,.12), rgba(232,196,106,.08));
}

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

.market-kpis article,
.market-summary-strip div {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.04);
}

.market-kpis article {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 18px;
}

.market-kpis span,
.market-summary-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-kpis strong {
  font-size: 22px;
  line-height: 1.15;
}

.market-kpis small {
  color: var(--muted);
  font-size: 13px;
}

.market-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.market-summary-strip div {
  display: grid;
  gap: 6px;
  padding: 13px 15px;
}

.market-summary-strip strong {
  font-size: 18px;
}

.market-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.13);
}

.market-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.22);
}

.market-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.market-table th,
.market-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  text-align: right;
  white-space: nowrap;
}

.market-table th:first-child,
.market-table td:first-child {
  text-align: left;
}

.market-table th:nth-child(2),
.market-table td:nth-child(2) {
  text-align: left;
  white-space: normal;
  min-width: 170px;
}

.market-table td strong {
  display: block;
}

.market-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.market-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--accent);
  background: rgba(14,16,28,.98);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.market-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.025);
}

.market-table tbody tr:hover {
  background: rgba(110,231,183,.065);
}

.market-provider-note {
  max-width: 900px;
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.market-low {
  color: #ffb4c2;
}

.market-base {
  color: #ffffff;
  font-weight: 900;
}

.market-high {
  color: #6ee7b7;
}

.market-alert {
  background: rgba(232,196,106,.07);
}

.scenario-details {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.025);
}

.scenario-details summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--accent);
  font-weight: 900;
}

.scenario-details .pivot-table-wrap {
  padding: 0 16px 16px;
}

.answer-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.2);
  color: rgba(255,255,255,.88);
  line-height: 1.65;
}

.prompt-answer h3 {
  margin: 0;
}

.pivot-stack {
  display: grid;
  gap: 18px;
}

.pivot-section {
  display: grid;
  gap: 10px;
}

.pivot-section h4 {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
}

.provider-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  font-weight: 800;
}

.provider-green { color: #6ee7b7; }
.provider-yellow { color: #ffd166; }
.provider-red { color: #ff7a90; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.forecast-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(0,0,0,.22);
}

.forecast-table th,
.forecast-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: right;
  white-space: nowrap;
}

.forecast-table th:first-child,
.forecast-table td:first-child {
  text-align: left;
}

.pivot-table td:first-child,
.pivot-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(14,16,28,.98);
}

.forecast-table th {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.forecast-table tbody tr:hover {
  background: rgba(255,255,255,.055);
}

.total-cell,
.grand-total td {
  font-weight: 900;
}

.grand-total {
  color: var(--accent);
  background: rgba(232,196,106,.1);
}

.notes-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

.progress-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.22);
}

.progress-main {
  display: grid;
  grid-template-columns: 1fr 170px 140px;
  gap: 14px;
  align-items: stretch;
}

.progress-main h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.progress-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.timer-card {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.045);
}

.timer-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.timer-card strong {
  font-size: 24px;
}

.progress-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.progress-bar span {
  display: block;
  height: 100%;
  min-width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #6ee7b7);
  transition: width .35s ease;
}

.error-panel {
  border-color: rgba(255,93,108,.4);
}

@media (max-width: 760px) {
  .result-summary,
  .market-kpis,
  .market-summary-strip {
    grid-template-columns: 1fr;
  }
  .scenario-hero,
  .scenario-grid {
    grid-template-columns: 1fr;
  }
  .scenario-job {
    justify-items: start;
  }
  .progress-main {
    grid-template-columns: 1fr;
  }
}


/* WOW refresh harmonisation */
.result-summary div,
.market-kpis article,
.market-summary-strip div,
.timer-card,
.provider-chip {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.result-summary div {
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.03));
}
.scenario-hero, .market-hero {
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 15%, rgba(112,230,198,.14), transparent 32%),
    linear-gradient(135deg, rgba(242,200,107,.13), rgba(255,255,255,.035));
}
.scenario-section, .pivot-section {
  min-width: 0;
}
.provider-chip {
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}
.table-wrap, .market-table-wrap, .pivot-table-wrap {
  border-radius: 20px;
}
.forecast-table, .market-table {
  overflow: hidden;
}
.progress-panel {
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(242,200,107,.09), transparent 34%),
    rgba(0,0,0,.22);
}
.answer-box {
  border-radius: 22px;
}
.scenario-details {
  overflow: hidden;
}
