:root {
  color-scheme: light;
  --bg: #eef1ed;
  --panel: #fffdf8;
  --ink: #16211e;
  --muted: #65706a;
  --line: #d4d9d0;
  --accent: #1f6f5b;
  --accent-strong: #174d40;
  --coral: #b95644;
  --gold: #ca9a32;
  --disabled: #a8b0aa;
  --shadow: 0 18px 48px rgba(22, 33, 30, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(31, 111, 91, 0.16), transparent 42%),
    linear-gradient(315deg, rgba(185, 86, 68, 0.13), transparent 36%),
    var(--bg);
  color: var(--ink);
}

button,
select,
input {
  font: inherit;
}

button,
select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

button {
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  color: var(--disabled);
  background: #eef0ec;
}

.secondary-button {
  border-color: var(--coral);
  color: var(--coral);
}

.secondary-button:disabled {
  border-color: var(--line);
  color: var(--disabled);
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 850;
  text-decoration: none;
}

.install-button {
  padding: 10px 14px;
}

.studio-title {
  margin: 0 0 24px;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.3;
}

.guide-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  margin-top: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.guide-navigation nav {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.guide-navigation a {
  color: var(--accent-strong);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.guide-navigation a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.summary-panel,
.workflow-panel,
.step,
.video-card,
.segment-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.summary-panel {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 24px;
  min-height: 620px;
  padding: 28px;
}

.workflow-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4.8vw, 4.7rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 5px;
  font-size: 1.15rem;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.facts {
  display: grid;
  align-content: end;
  gap: 14px;
  margin-bottom: 0;
}

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

.parrot-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.service-status {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
}

.service-status .eyebrow {
  margin-bottom: 10px;
}

.service-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.service-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.service-facts dd {
  font-size: 0.85rem;
  font-weight: 750;
  font-family: monospace;
}

.pipeline-capabilities p {
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.fallback-endpoints {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

dt {
  color: var(--muted);
  font-weight: 750;
}

dd {
  margin-bottom: 0;
  font-weight: 850;
  text-align: right;
}

.dropzone {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 138px;
  padding: 22px;
  border: 2px dashed #9fa9a3;
  border-radius: 8px;
  background: #fbfaf4;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: rgba(31, 111, 91, 0.09);
}

.upload-notice {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-copy {
  display: grid;
  gap: 4px;
}

.drop-copy strong {
  font-size: 1.55rem;
  line-height: 1.15;
}

.drop-copy span {
  color: var(--muted);
}

.video-card {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 16px;
  padding: 16px;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #111;
}

.video-meta {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.video-meta strong,
.video-meta span {
  overflow-wrap: anywhere;
}

.video-meta span {
  color: var(--muted);
}

.video-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}

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

.step {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 250px;
  padding: 18px;
  box-shadow: none;
}

.step-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 850;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

select {
  width: 100%;
  padding: 0 12px;
}

.result {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef3ef;
  color: var(--accent-strong);
  font-weight: 850;
}

.progress-block {
  display: grid;
  gap: 10px;
}

.progress-stack {
  display: grid;
  gap: 14px;
}

.button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #e7ebe6;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 160ms ease;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 850;
  text-decoration: none;
}

.segment-review {
  display: grid;
  gap: 16px;
  padding: 18px;
  box-shadow: none;
}

.segment-review[hidden] {
  display: none;
}

.segment-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.segment-review-header h2 {
  margin-bottom: 0;
}

.segment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.segment-summary div {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf4;
}

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

.segment-details {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #eef3ef;
  color: var(--accent-strong);
  font-size: 0.82rem;
  text-transform: uppercase;
}

@media (max-width: 840px) {
  .app-shell {
    padding: 14px;
  }

  .workspace,
  .step-grid,
  .video-card,
  .dropzone,
  .segment-summary {
    grid-template-columns: 1fr;
  }

  .segment-review-header {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-panel {
    position: static;
    min-height: auto;
    padding: 22px;
  }

  h1 {
    max-width: 13ch;
  }

  .workflow-panel {
    padding: 14px;
  }
}
