:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --ink: #181915;
  --muted: #686b60;
  --line: #d9d4c7;
  --panel: #fffdf8;
  --panel-strong: #f0eee6;
  --green: #245b45;
  --green-2: #dceadd;
  --coral: #d75f42;
  --amber: #f1bd55;
  --blue: #4d6f9d;
  --shadow: 0 18px 50px rgba(40, 38, 28, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

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

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.workspace {
  width: min(1440px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: 0;
}

.repo-link,
button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}

.repo-link {
  flex: 0 0 auto;
  background: var(--ink);
  color: white;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.86fr) minmax(560px, 1.14fr);
  min-height: 720px;
}

.coach-panel,
.output-panel {
  padding: 24px;
}

.coach-panel {
  border-right: 1px solid var(--line);
  background: #fbf7ed;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.panel-head h2 {
  margin-bottom: 4px;
  font-size: 28px;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.step-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  color: #3c3f37;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9c2b2;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 91, 69, 0.14);
}

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

.primary-button {
  background: var(--coral);
  color: white;
  border-color: #a9412b;
  font-weight: 800;
}

.ghost-button {
  background: transparent;
}

.output-panel {
  background:
    linear-gradient(180deg, rgba(77, 111, 157, 0.08), transparent 42%),
    var(--panel);
}

.agent-status {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(36, 91, 69, 0.12);
}

.visual-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbf7;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
}

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

.result-block {
  min-height: 158px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  padding: 16px;
}

.result-kicker {
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

li {
  margin: 8px 0;
  line-height: 1.5;
}

.final-output {
  grid-column: 1 / -1;
  min-height: 132px;
  background: var(--green-2);
}

.final-output p {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.6;
}

.product-strip {
  width: min(1440px, 100%);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--ink);
  color: white;
  padding: 26px 28px;
}

.product-strip .eyebrow {
  color: var(--amber);
}

.product-strip h2 {
  max-width: 850px;
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.08;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 104px);
  gap: 10px;
}

.metrics div {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.metrics strong {
  display: block;
  color: var(--amber);
  font-size: 34px;
}

.metrics span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.feature-band {
  width: min(1440px, 100%);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.feature-band article {
  min-height: 150px;
  background: var(--panel);
  padding: 22px;
}

.feature-band h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.feature-band p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

  .topbar,
  .product-strip {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-grid,
  .product-strip,
  .feature-band {
    display: block;
  }

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

  .output-stack {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
  }

  .feature-band article + article {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .topbar,
  .coach-panel,
  .output-panel,
  .product-strip {
    padding: 18px;
  }

  h1 {
    font-size: 38px;
  }

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

  .actions button {
    width: 100%;
  }
}
