:root {
  --bg: #f6f1e8;
  --paper: rgba(255, 251, 245, 0.9);
  --surface: rgba(255, 255, 255, 0.84);
  --ink: #17120f;
  --muted: #6c6054;
  --line: rgba(23, 18, 15, 0.1);
  --accent: #0d7c6b;
  --accent-strong: #08564b;
  --accent-soft: rgba(13, 124, 107, 0.12);
  --amber-soft: rgba(214, 130, 32, 0.14);
  --shadow: 0 28px 90px rgba(32, 24, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(13, 124, 107, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(214, 130, 32, 0.12), transparent 24%),
    linear-gradient(180deg, #fffaf3 0%, var(--bg) 100%);
}

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

.bench-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: grid;
  gap: 22px;
}

.hero-panel,
.bench-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(13, 124, 107, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.74);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--muted);
}

.hero-panel h1,
.panel-head h2 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: -0.05em;
}

.hero-panel h1 {
  margin-top: 12px;
  max-width: 10ch;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.98;
}

.hero-copy,
.panel-copy,
.fixture-copy,
.detail-box p,
.result-row p,
.empty-state p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: 62ch;
  margin: 14px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.bench-panel {
  padding: 24px;
}

.bench-panel--workspace {
  display: grid;
  gap: 20px;
}

.bench-panel--results {
  position: sticky;
  top: 22px;
  align-self: start;
}

.panel-head {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: start;
}

.status-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-copy {
  margin: -4px 0 0;
  max-width: 62ch;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.metric-card,
.fixture-card,
.result-row,
.detail-box,
.empty-state {
  border: 1px solid rgba(23, 18, 15, 0.08);
  border-radius: 22px;
  background: var(--surface);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.result-grid span,
.detail-box span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-card strong,
.detail-box strong,
.fixture-value {
  display: block;
  margin-top: 10px;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.9rem;
  line-height: 1;
}

.fixture-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  align-items: stretch;
}

.fixture-card,
.detail-box,
.result-row,
.empty-state {
  padding: 18px;
}

.fixture-card {
  display: grid;
  align-content: start;
}

.fixture-card--counter {
  min-height: 228px;
}

.fixture-card--preview {
  min-height: 228px;
}

.fixture-card--branch {
  gap: 0;
}

.fixture-copy,
.detail-box p,
.result-row p {
  margin: 10px 0 0;
}

.fixture-card .action {
  margin-top: 16px;
  justify-self: start;
}

.preview-shell {
  margin-top: 14px;
  max-height: 424px;
  overflow: auto;
  padding-right: 6px;
}

.preview-list,
.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.preview-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(13, 124, 107, 0.06);
}

.preview-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(13, 124, 107, 0.14);
  color: var(--accent-strong);
  font-weight: 700;
}

.preview-label {
  min-width: 0;
}

.preview-value {
  font-family: "Sora", "Segoe UI", sans-serif;
}

.detail-box {
  margin-top: 18px;
  min-height: 144px;
  background:
    linear-gradient(135deg, rgba(214, 130, 32, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.86);
}

.result-stack {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 6px;
}

.empty-state strong {
  display: block;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.15rem;
}

.empty-state p {
  margin: 8px 0 0;
}

.result-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
}

.result-head strong {
  font-size: 1rem;
}

.result-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.result-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  line-height: 1;
}

.action {
  border: 0;
  border-radius: 999px;
  padding: 12px 17px;
  background: rgba(23, 18, 15, 0.08);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.action:hover {
  transform: translateY(-1px);
  background: rgba(23, 18, 15, 0.12);
}

.action--primary {
  background: var(--accent);
  color: white;
}

.action--primary:hover {
  background: var(--accent-strong);
}

.action--ghost {
  background: var(--amber-soft);
}

.preview-shell::-webkit-scrollbar,
.result-stack::-webkit-scrollbar {
  width: 10px;
}

.preview-shell::-webkit-scrollbar-thumb,
.result-stack::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(23, 18, 15, 0.12);
}

@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .bench-panel--results {
    position: static;
  }

  .result-stack {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 820px) {
  .fixture-grid {
    grid-template-columns: 1fr;
  }

  .preview-shell {
    max-height: 320px;
  }
}

@media (max-width: 680px) {
  .panel-head,
  .result-head {
    display: grid;
  }

  .preview-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .preview-value {
    grid-column: 1 / -1;
    padding-left: 48px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}
