:root {
  --paper: #f5efe4;
  --paper-strong: #fffaf2;
  --ink: #1d1b18;
  --muted: #655d52;
  --line: rgba(29, 27, 24, 0.12);
  --accent: #d4632f;
  --accent-deep: #7e3620;
  --accent-soft: rgba(212, 99, 47, 0.12);
  --highlight: #0e7c66;
  --shadow: 0 24px 60px rgba(60, 42, 22, 0.14);
  --radius: 24px;
  --radius-small: 16px;
  --mono: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(14, 124, 102, 0.14), transparent 26%),
    radial-gradient(circle at left 15%, rgba(212, 99, 47, 0.18), transparent 24%),
    linear-gradient(180deg, #f3e9d7 0%, #efe6d6 42%, #f8f3ea 100%);
}

.page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-deep);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.92;
}

.subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.language-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 170px;
  padding: 16px;
  border-radius: var(--radius-small);
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--shadow);
}

.layout {
  display: grid;
  gap: 20px;
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

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

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 18px;
  border: 1.5px dashed rgba(126, 54, 32, 0.35);
  border-radius: var(--radius-small);
  background: linear-gradient(135deg, rgba(212, 99, 47, 0.08), rgba(14, 124, 102, 0.08));
  color: var(--accent-deep);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
}

.file-drop.slim {
  min-height: 88px;
  margin-bottom: 18px;
}

.file-drop input {
  display: none;
}

button,
select,
input {
  font: inherit;
}

.primary {
  margin-top: 14px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #e3834a 100%);
  color: white;
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, opacity 120ms ease;
}

.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary:not(:disabled):hover {
  transform: translateY(-1px);
}

.status-text {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
}

.status-text.error {
  color: #a32525;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

select,
input[type="number"] {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.tabs-shell {
  display: grid;
  gap: 16px;
}

.tab-buttons,
.workflow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-btn,
.workflow-btn {
  padding: 12px 18px;
  border: 1px solid rgba(126, 54, 32, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.86);
  color: var(--accent-deep);
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.tab-btn.active,
.workflow-btn.active {
  background: linear-gradient(135deg, rgba(212, 99, 47, 0.16), rgba(14, 124, 102, 0.16));
  border-color: rgba(126, 54, 32, 0.28);
}

.tab-btn:hover,
.workflow-btn:hover {
  transform: translateY(-1px);
}

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

.tracks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.track-counter {
  font-family: var(--mono);
  color: var(--muted);
}

.tracks-list {
  display: grid;
  gap: 12px;
}

.tracks-list.compact .track-card {
  padding: 14px;
}

.track-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.track-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.track-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(14, 124, 102, 0.12);
  color: var(--highlight);
}

.pill.neutral {
  background: rgba(29, 27, 24, 0.08);
  color: var(--muted);
}

.track-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.track-block {
  display: grid;
  gap: 6px;
}

.track-block strong {
  font-size: 14px;
}

.samples {
  display: grid;
  gap: 6px;
}

.sample {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(29, 27, 24, 0.05);
  color: var(--muted);
  white-space: pre-wrap;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
}

.warnings-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .hero {
    flex-direction: column;
  }

  .language-picker {
    width: 100%;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }
}
