:root {
  --bg: #f6efe6;
  --surface: rgba(255, 251, 247, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #1e1a17;
  --muted: #6c6258;
  --line: rgba(56, 39, 22, 0.1);
  --orange: #ee4d2d;
  --orange-deep: #c93c20;
  --sand: #f4dfcb;
  --ink: #2c4058;
  --ink-soft: #dce8f6;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-lg: 0 24px 60px rgba(54, 34, 18, 0.12);
  --shadow-md: 0 14px 34px rgba(54, 34, 18, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 176, 129, 0.34), transparent 30%),
    radial-gradient(circle at bottom left, rgba(119, 158, 214, 0.18), transparent 26%),
    linear-gradient(180deg, #fbf6f1 0%, #f4ece4 44%, #f9f4ee 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

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

.page-glow {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.glow-a {
  top: -90px;
  right: -90px;
  width: 340px;
  height: 340px;
  background: rgba(255, 153, 108, 0.44);
}

.glow-b {
  left: -100px;
  bottom: 12%;
  width: 260px;
  height: 260px;
  background: rgba(121, 180, 255, 0.22);
}

.glow-c {
  right: 16%;
  top: 44%;
  width: 220px;
  height: 220px;
  background: rgba(255, 225, 193, 0.32);
}

.demo-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px;
  backdrop-filter: blur(18px);
  background: rgba(250, 245, 239, 0.72);
  border-bottom: 1px solid rgba(56, 39, 22, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 12px 24px rgba(201, 60, 32, 0.24);
}

.brand-copy {
  display: grid;
}

.brand-kicker,
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.demo-nav a:hover {
  color: var(--text);
}

.demo-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
  display: grid;
  gap: 20px;
}

.panel,
.panel-inner {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.panel {
  padding: clamp(20px, 2vw, 28px);
}

.panel-inner {
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  min-height: 78vh;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding-right: 10px;
}

.hero-copy h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-tags,
.hero-footnote,
.soft-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.soft-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.preview-stack {
  width: min(100%, 520px);
  display: grid;
  gap: 18px;
}

.preview-chat-card,
.preview-score-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 244, 239, 0.88));
  border: 1px solid rgba(56, 39, 22, 0.08);
  box-shadow: var(--shadow-md);
}

.preview-chat-card {
  transform: rotate(-2deg);
}

.preview-score-card {
  transform: translateX(42px);
}

.preview-chat-card header,
.preview-score-card header,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.preview-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--orange);
}

.preview-message {
  margin-top: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.55;
}

.preview-message.seller,
.preview-message.subtle {
  background: #f1ece6;
}

.preview-message.learner {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
}

.preview-metrics {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}

.preview-metrics div {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(56, 39, 22, 0.08);
}

.capability-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.capability-card h2 {
  margin: 10px 0 8px;
  font-size: 1.4rem;
}

.capability-card p {
  line-height: 1.7;
  color: var(--muted);
}

.story-grid {
  display: grid;
  gap: 18px;
}

.story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 20px;
  align-items: center;
}

.story-copy {
  display: grid;
  gap: 10px;
}

.story-copy h2,
.section-head h2,
.cta-section h2 {
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.08;
}

.story-copy p,
.section-note,
.cta-section p,
.formal-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.story-visual {
  min-height: 210px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 39, 22, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 232, 222, 0.92));
  padding: 18px;
  display: grid;
  align-items: center;
}

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

.window-column,
.loop-preview span {
  border-radius: 16px;
  padding: 16px;
  background: var(--surface-strong);
  border: 1px solid rgba(56, 39, 22, 0.08);
  display: grid;
  gap: 8px;
}

.window-column span,
.mini-bar span {
  color: var(--muted);
  font-size: 0.84rem;
}

.window-column strong,
.loop-preview span {
  font-size: 1.08rem;
}

.stat-preview {
  gap: 14px;
}

.mini-bar {
  display: grid;
  gap: 8px;
}

.mini-bar i {
  display: block;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--orange), var(--orange-deep)) 0 0 / var(--bar) 100% no-repeat,
    rgba(56, 39, 22, 0.08);
}

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

.experience-section,
.result-section,
.formal-section,
.cta-section {
  display: grid;
  gap: 18px;
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.chat-stage,
.score-stage {
  min-height: 560px;
}

.chat-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 760px;
  height: 760px;
  overflow: hidden;
}

.chat-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.chat-stage-head h3 {
  font-size: 1.46rem;
}

.demo-chat-log {
  border-radius: 22px;
  border: 1px solid rgba(56, 39, 22, 0.08);
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  min-height: 0;
  max-height: 100%;
  scrollbar-gutter: stable;
}

.chat-placeholder {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  gap: 8px;
}

.chat-bubble {
  max-width: 86%;
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
}

.chat-bubble.seller {
  align-self: flex-start;
  background: #eee7df;
}

.chat-bubble.learner {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
}

.bubble-role {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  opacity: 0.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-composer {
  display: grid;
  gap: 12px;
}

.demo-composer textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(56, 39, 22, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.composer-actions-left,
.composer-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.score-stage {
  position: sticky;
  top: 92px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.score-panel-block {
  border-radius: 18px;
  border: 1px solid rgba(56, 39, 22, 0.08);
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.score-panel-empty {
  min-height: 420px;
  place-items: center;
  text-align: left;
}

.score-panel-empty h3,
.score-panel-result h3 {
  font-size: 1.5rem;
}

.score-panel-processing h3 {
  font-size: 1.5rem;
}

.score-summary {
  color: var(--muted);
  line-height: 1.7;
}

.processing-pulse {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(238, 77, 45, 0.18), rgba(238, 77, 45, 0.82), rgba(238, 77, 45, 0.18)) 0 0 / 40% 100% no-repeat,
    rgba(56, 39, 22, 0.08);
  animation: demoPulse 1.2s ease-in-out infinite;
}

.metric-stack {
  display: grid;
  gap: 10px;
}

.metric-row {
  display: grid;
  gap: 8px;
}

.metric-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.metric-row b {
  color: var(--text);
}

.metric-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(56, 39, 22, 0.08);
  overflow: hidden;
}

.metric-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.issue-list,
.formal-grid {
  display: grid;
  gap: 12px;
}

.issue-card,
.formal-grid article {
  border: 1px solid rgba(56, 39, 22, 0.08);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.issue-card h4 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.issue-card p {
  color: var(--muted);
  line-height: 1.7;
}

.issue-list-detailed {
  gap: 14px;
}

.issue-card-detailed {
  gap: 10px;
  display: grid;
}

.issue-card-detailed p {
  margin: 0;
}

.result-reveal.empty {
  border-radius: 22px;
  border: 1px dashed rgba(56, 39, 22, 0.14);
  background: rgba(255, 255, 255, 0.42);
}

.result-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}

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

.result-summary-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1fr);
  gap: 16px;
}

.score-badge {
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(238, 77, 45, 0.94), rgba(201, 60, 32, 0.94));
  color: #fff;
  display: grid;
  gap: 8px;
  box-shadow: 0 20px 40px rgba(201, 60, 32, 0.18);
}

.score-badge strong {
  font-size: 3rem;
  line-height: 1;
}

.result-copy {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(56, 39, 22, 0.08);
}

.result-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.example-box {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(44, 64, 88, 0.96), rgba(34, 49, 69, 0.96));
  color: #fef6ef;
  line-height: 1.8;
}

.formal-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.formal-grid article strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.cta-section {
  text-align: center;
  justify-items: center;
  padding-block: 42px;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 14px 28px rgba(201, 60, 32, 0.22);
}

.btn-secondary,
.btn-ghost {
  border: 1px solid rgba(56, 39, 22, 0.1);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  border-radius: 14px;
  background: rgba(32, 37, 47, 0.96);
  color: #fff;
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
}

.toast.error {
  background: rgba(201, 60, 32, 0.96);
}

.hidden {
  display: none !important;
}

@keyframes demoPulse {
  0% {
    background-position: -20% 0, 0 0;
  }
  100% {
    background-position: 120% 0, 0 0;
  }
}

@media (max-width: 1180px) {
  .hero-section,
  .story-panel,
  .experience-grid,
  .result-summary-grid,
  .capability-strip,
  .formal-grid {
    grid-template-columns: 1fr;
  }

  .score-stage {
    position: static;
  }

  .preview-score-card {
    transform: none;
  }

  .story-visual,
  .chat-stage,
  .score-stage {
    min-height: 0;
  }

  .chat-stage {
    height: auto;
  }

  .demo-chat-log {
    max-height: 520px;
  }
}

@media (max-width: 860px) {
  .demo-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .demo-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .demo-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 16px;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .loop-preview {
    grid-template-columns: 1fr;
  }
}
