:root {
  --niu-red: #ba0c2f;
  --niu-red-dark: #8f0924;
  --black: #171717;
  --ink: #24272c;
  --muted: #6a7280;
  --line: #dfe3ea;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --soft-red: #fff1f4;
  --teal: #126a72;
  --gold: #b8860b;
  --green: #247145;
  --shadow: 0 24px 70px rgba(24, 28, 35, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(186, 12, 47, 0.10), transparent 28rem),
    linear-gradient(180deg, #fff 0%, #f6f8fb 48%, #fff 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

.hero {
  min-height: auto;
  padding: 24px;
  display: flex;
  align-items: center;
}

.hero-panel {
  width: min(1240px, 100%);
  margin: 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(23, 23, 23, 0.10);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 249, 0.88)),
    repeating-linear-gradient(90deg, rgba(186, 12, 47, 0.05) 0 1px, transparent 1px 72px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-hero {
  padding-bottom: 0;
}

.demo-panel {
  min-height: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
}

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

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--niu-red);
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--niu-red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-nav a {
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

.quick-nav a:hover {
  color: var(--niu-red-dark);
  background: rgba(186, 12, 47, 0.08);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: 44px;
  align-items: center;
  padding: 54px 56px 46px;
}

.demo-intro-grid {
  grid-template-columns: 1fr;
  padding-bottom: 54px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  margin: 0 0 22px;
  padding: 9px 12px;
  color: var(--niu-red-dark);
  background: #fff;
  border: 1px solid rgba(186, 12, 47, 0.22);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--black);
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-lede {
  margin: 24px 0 0;
  color: #444b55;
  font-size: 1.14rem;
  line-height: 1.7;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  color: #fff;
  background: var(--niu-red);
  box-shadow: 0 14px 30px rgba(186, 12, 47, 0.28);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.hero-visual {
  display: grid;
  gap: 16px;
}

.teams-shell {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 456px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, 0.10);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(27, 31, 39, 0.16);
}

.teams-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  background: #2f3247;
}

.teams-sidebar span {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.20);
}

.teams-sidebar span:first-child {
  background: #fff;
}

.teams-main {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #fafbff, #fff),
    linear-gradient(90deg, transparent 0 49%, rgba(186, 12, 47, 0.08) 49% 51%, transparent 51%);
}

.teams-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.teams-header strong,
.teams-header span {
  display: block;
}

.teams-header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-dot {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--green);
  background: rgba(36, 113, 69, 0.10);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
}

.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
}

.bubble {
  width: min(430px, 100%);
  padding: 16px 18px;
  border-radius: 8px;
  line-height: 1.55;
  box-shadow: 0 10px 28px rgba(28, 34, 43, 0.08);
}

.bubble.question {
  align-self: flex-end;
  color: #fff;
  background: var(--niu-red);
}

.bubble.answer {
  align-self: flex-start;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.source-row span {
  padding: 8px 10px;
  color: var(--teal);
  background: rgba(18, 106, 114, 0.09);
  border: 1px solid rgba(18, 106, 114, 0.18);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
}

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

.metric-strip div {
  padding: 16px;
  border: 1px solid rgba(23, 23, 23, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.metric-strip strong,
.metric-strip span {
  display: block;
}

.metric-strip strong {
  color: var(--black);
}

.metric-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0;
}

.section-heading {
  max-width: 830px;
  margin-bottom: 28px;
}

.section-heading.compact {
  max-width: 760px;
}

.section-heading h2,
.analytics-layout h2,
.closing-section h2 {
  margin: 8px 0 0;
  color: var(--black);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.analytics-layout p,
.closing-section p {
  margin: 16px 0 0;
  color: #505967;
  font-size: 1.02rem;
  line-height: 1.75;
}

.scenario-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.scenario-tab {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.scenario-tab:hover,
.scenario-tab.active {
  color: #fff;
  border-color: var(--niu-red);
  background: var(--niu-red);
}

.question-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(186, 12, 47, 0.18);
  border-radius: 8px;
  background: var(--soft-red);
}

.question-card h3 {
  margin: 8px 0 0;
  color: var(--black);
  font-size: clamp(1.08rem, 2vw, 1.4rem);
  line-height: 1.45;
}

.student-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(186, 12, 47, 0.20);
  border-radius: 8px;
  background: #fff;
}

.student-chip > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--niu-red);
  border-radius: 8px;
  font-weight: 800;
}

.student-chip strong,
.student-chip small {
  display: block;
}

.student-chip small {
  margin-top: 2px;
  color: var(--muted);
}

.answer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.answer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(24, 28, 35, 0.08);
}

.answer-card.enhanced {
  border-color: rgba(186, 12, 47, 0.28);
}

.answer-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.answer-header h3 {
  margin: 5px 0 0;
  color: var(--black);
  font-size: 1.12rem;
}

.score {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: var(--green);
  background: rgba(36, 113, 69, 0.10);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.score.muted {
  color: var(--muted);
  background: var(--soft);
}

.response-body {
  padding: 20px;
  color: #3d4652;
  line-height: 1.68;
}

.response-body p {
  margin: 0 0 14px;
}

.response-body p:last-child,
.response-body ul:last-child,
.response-body ol:last-child {
  margin-bottom: 0;
}

.response-body ul,
.response-body ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.response-body li {
  margin: 7px 0;
}

.response-body strong {
  color: var(--black);
}

.rich-response h4 {
  margin: 18px 0 8px;
  color: var(--black);
  font-size: 1rem;
}

.rich-response h4:first-child {
  margin-top: 0;
}

.references {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

#reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.reference-chip {
  padding: 8px 10px;
  color: var(--teal);
  background: rgba(18, 106, 114, 0.08);
  border: 1px solid rgba(18, 106, 114, 0.18);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.architecture-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.architecture-card,
.info-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 28, 35, 0.07);
}

.icon-badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--niu-red);
  border-radius: 8px;
  font-weight: 800;
}

.architecture-card h3,
.info-panel h3 {
  margin: 18px 0 8px;
  color: var(--black);
  font-size: 1.02rem;
  line-height: 1.35;
}

.architecture-card p,
.info-panel p,
.info-panel li {
  color: #596271;
  line-height: 1.65;
}

.architecture-card p,
.info-panel p {
  margin: 0;
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(186, 12, 47, 0.18);
  border-radius: 8px;
  background: #fff;
}

.pipeline-step {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.pipeline-step strong,
.pipeline-step span {
  display: block;
}

.pipeline-step span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.pipeline-arrow {
  color: var(--niu-red);
  font-size: 1.4rem;
  font-weight: 800;
}

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

.info-panel {
  padding: 28px;
}

.info-panel h3 {
  margin-top: 0;
  font-size: 1.28rem;
}

.info-panel ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.analytics-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 78px 20px;
  background: #191b21;
  color: #fff;
}

.analytics-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1fr);
  gap: 34px;
  align-items: center;
}

.analytics-layout h2 {
  color: #fff;
}

.analytics-layout p {
  color: #c7cbd3;
}

.dashboard-mockup {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--black);
  margin-bottom: 14px;
}

.dashboard-header span {
  color: var(--muted);
}

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

.kpi-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.kpi-card span,
.kpi-card strong {
  display: block;
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.kpi-card strong {
  margin-top: 8px;
  color: var(--black);
  font-size: 2rem;
  line-height: 1;
}

.topic-bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.topic-bars div {
  display: grid;
  gap: 7px;
}

.topic-bars span {
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
}

.topic-bars i {
  display: block;
  height: 11px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--niu-red) var(--bar), #eceff5 var(--bar));
}

.closing-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.72fr);
  gap: 32px;
  align-items: center;
}

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

.pilot-list span {
  padding: 14px 16px;
  color: var(--black);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(24, 28, 35, 0.06);
}

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

  .hero-panel {
    min-height: auto;
  }

  .topbar,
  .question-card,
  .closing-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero-grid,
  .answer-grid,
  .analytics-layout,
  .closing-section {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding: 34px 22px 28px;
  }

  .teams-shell {
    grid-template-columns: 54px 1fr;
    min-height: 390px;
  }

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

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

  .pipeline-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .analytics-layout {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .section {
    width: min(100% - 28px, 1180px);
    padding: 54px 0;
  }

  .topbar {
    padding: 18px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .hero-actions,
  .metric-strip,
  .architecture-grid,
  .info-grid,
  .kpi-grid,
  .pilot-list {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .teams-shell {
    grid-template-columns: 1fr;
  }

  .teams-sidebar {
    display: none;
  }

  .chat-preview,
  .teams-header,
  .answer-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .answer-header,
  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-chip {
    width: 100%;
  }
}
