:root {
  color-scheme: light;
  --cardinal: #8c1515;
  --cardinal-2: #b83a4b;
  --white: #ffffff;
  --black: #2e2d29;
  --ink: #211f1c;
  --muted: #756f67;
  --line: rgba(46, 45, 41, 0.14);
  --soft: #f7f3f0;
  --shadow: 0 28px 90px rgba(46, 45, 41, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  border: 0;
  cursor: pointer;
}

.site-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 76px;
  padding: 8px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(140, 21, 21, 0.12);
  backdrop-filter: blur(18px);
}

.stanford-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.stanford-brand img {
  display: block;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.stanford-logo {
  width: auto;
  height: 38px;
  max-width: min(205px, 28vw);
}

.logo-divider {
  width: 1px;
  height: 48px;
  flex: 0 0 auto;
  background: rgba(140, 21, 21, 0.22);
}

.lab-logo {
  width: auto;
  height: 54px;
  max-width: 82px;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cardinal);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  color: var(--cardinal);
  font-size: 18px; /* 字体改大 */
  font-weight: 850;
}

.nav-links a {
  color: var(--cardinal);
  text-decoration: none;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92vh;
  padding: 120px clamp(22px, 6vw, 88px) 86px;
  background:
    linear-gradient(90deg, rgba(46, 45, 41, 0.9) 0%, rgba(46, 45, 41, 0.66) 42%, rgba(140, 21, 21, 0.08) 100%),
    url("Homepage2.png") center / cover no-repeat;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 112px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.95));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  color: var(--white);
}

.eyebrow,
.hero-copy h1,
.hero-text,
.brand p,
.brand span,
.topbar h2,
.topbar p,
.objects h2 {
  margin: 0;
}

.eyebrow {
  margin-bottom: 18px;
  color: #ffffff;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(54px, 9vw, 124px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

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

.primary-cta,
.secondary-cta {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.primary-cta {
  background: var(--cardinal);
  color: var(--white);
  box-shadow: 0 18px 46px rgba(140, 21, 21, 0.36);
}

.secondary-cta {
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(12px);
}

.content-section {
  padding: clamp(58px, 7vw, 92px) clamp(22px, 6vw, 88px);
  background: var(--white);
}

.intro-section,
.team-section,
.outcomes-section {
  padding-block: clamp(96px, 10vw, 148px);
  background:
    linear-gradient(180deg, #ffffff 0%, #fffafa 46%, #fbf8f6 100%);
}

.content-section h2 {
  margin: 0;
  color: var(--black);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

.content-section h3 {
  margin: 0;
  color: var(--black);
  font-size: 20px;
}

.content-section p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.section-kicker {
  margin-bottom: 20px;
  color: var(--cardinal);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-kicker {
  font-size: clamp(18px, 1.7vw, 28px);
  letter-spacing: 0.08em;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  gap: clamp(44px, 6vw, 86px);
  align-items: center;
}

.intro-grid > div:first-child p {
  max-width: 780px;
  margin-top: 24px;
  color: #5f5850;
  font-size: clamp(18px, 1.35vw, 21px);
  line-height: 1.72;
}

.intro-section .section-kicker,
.team-section .section-kicker,
.outcomes-section .section-kicker {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  margin-bottom: 22px;
  padding: 0 12px;
  border: 1px solid rgba(140, 21, 21, 0.18);
  border-radius: 8px;
  background: rgba(140, 21, 21, 0.06);
}

.intro-grid > div:first-child h3 {
  max-width: 820px;
  margin: 0;
  color: var(--black);
  font-size: clamp(40px, 4.6vw, 66px);
  line-height: 1.06;
  letter-spacing: 0;
}

.feature-grid,
.workflow-grid {
  display: grid;
  gap: 14px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid article,
.workflow-grid article,
.team-card,
.chat-sidebar,
.message,
.chat-composer {
  border: 1px solid rgba(140, 21, 21, 0.14);
  border-radius: 8px;
  background: #fbf8f6;
  box-shadow: 0 18px 58px rgba(46, 45, 41, 0.08);
}

.feature-grid article,
.workflow-grid article {
  padding: 20px;
}

.intro-section .feature-grid article {
  position: relative;
  min-height: 310px;
  padding: clamp(24px, 2.4vw, 34px);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(140, 21, 21, 0.18);
  box-shadow: 0 28px 76px rgba(46, 45, 41, 0.1);
}

.intro-section .feature-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: var(--cardinal);
}

.intro-section .feature-grid h3 {
  font-size: clamp(22px, 1.6vw, 28px);
  line-height: 1.15;
}

.intro-section .feature-grid p {
  margin-top: 16px;
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.66;
}

.our-work {
  margin-top: clamp(64px, 8vw, 112px);
}

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

.work-card {
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 260px;
  padding: clamp(22px, 2vw, 28px);
  border: 1px solid rgba(140, 21, 21, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 64px rgba(46, 45, 41, 0.08);
}

.work-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.work-card h3 {
  color: var(--black);
  font-size: clamp(21px, 1.6vw, 28px);
  line-height: 1.12;
}

.work-number {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 26px;
  border: 1px solid rgba(140, 21, 21, 0.24);
  border-radius: 8px;
  background: rgba(140, 21, 21, 0.08);
  color: var(--cardinal);
  font-size: 24px;
  font-weight: 950;
}

.work-card p {
  margin: 16px 0 0;
  color: #625b53;
  font-size: 16px;
  line-height: 1.62;
}

.feature-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--cardinal);
  color: var(--white);
  font-weight: 950;
}

.feature-grid p,
.workflow-grid p {
  margin-bottom: 0;
}

.workflow-section {
  background: linear-gradient(180deg, #fbf8f6, var(--white));
}

.workflow-section h2 {
  max-width: 760px;
  margin-bottom: 30px;
}

.outcomes-head {
  max-width: 980px;
  margin-bottom: clamp(30px, 4vw, 46px);
}

.outcomes-head h3 {
  margin: 0;
  color: #625b53;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.45;
  letter-spacing: 0;
  font-weight: 650;
}

.outcomes-list {
  display: grid;
  gap: 18px;
}

.outcome-card {
  position: relative;
  display: block;
  padding: clamp(22px, 2.4vw, 34px);
  border: 1px solid rgba(140, 21, 21, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 64px rgba(46, 45, 41, 0.08);
}

.outcome-link-card {
  color: inherit;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.outcome-link-card:hover,
.outcome-link-card:focus-visible {
  background:
    linear-gradient(145deg, rgba(140, 21, 21, 0.11), rgba(255, 255, 255, 0.92) 52%),
    #fff6f6;
  border-color: rgba(140, 21, 21, 0.34);
  box-shadow: 0 28px 74px rgba(46, 45, 41, 0.14);
  transform: translateY(-2px);
}

.outcome-link-card:focus-visible {
  outline: 3px solid rgba(140, 21, 21, 0.24);
  outline-offset: 4px;
}

.outcome-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: var(--cardinal);
}

.outcome-type {
  margin: 0 0 10px;
  color: var(--cardinal) !important;
  font-size: 13px !important;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.outcome-number {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 1px solid rgba(140, 21, 21, 0.24);
  border-radius: 8px;
  background: rgba(140, 21, 21, 0.08);
  color: var(--cardinal);
  font-size: 22px;
  font-weight: 950;
}

.outcome-card h2 {
  max-width: 1120px;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.12;
}

.award-badge {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  margin: 14px 0 4px;
  padding: 0 13px;
  border: 1px solid rgba(172, 121, 28, 0.34);
  border-radius: 8px;
  background: rgba(172, 121, 28, 0.1);
  color: #8a5a00 !important;
  font-size: 13px !important;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.outcome-card p {
  max-width: 1160px;
}

.outcome-citation {
  margin: 14px 0 0;
  color: #4f4942 !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  font-weight: 650;
}

@media (max-width: 1180px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

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

  .work-card,
  .work-card:nth-child(4) {
    grid-column: auto;
  }
}

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

.team-section-head {
  max-width: 980px;
  margin-bottom: clamp(34px, 4vw, 52px);
}

.team-section-head h3 {
  margin: 0;
  color: #625b53;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.45;
  letter-spacing: 0;
  font-weight: 650;
  white-space: nowrap;
}

.team-group + .team-group {
  margin-top: clamp(46px, 6vw, 76px);
}

.team-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.team-group-header::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(140, 21, 21, 0.16);
}

.team-group-header span {
  color: var(--cardinal);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 950;
  letter-spacing: 0.02em;
}

.team-subsection-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(30px, 4vw, 48px) 0 16px;
}

.team-subsection-header::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(140, 21, 21, 0.12);
}

.team-subsection-header span {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(140, 21, 21, 0.18);
  border-radius: 8px;
  background: rgba(140, 21, 21, 0.06);
  color: var(--cardinal);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

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

.student-grid {
  gap: 16px;
}

.previous-member-grid {
  gap: 16px;
}

.previous-member-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(140, 21, 21, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.9);
}

.previous-member-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: rgba(140, 21, 21, 0.72);
}

.previous-member-card .placeholder-photo {
  background: rgba(140, 21, 21, 0.13);
}

.previous-member-card h2 {
  font-size: clamp(24px, 2vw, 30px);
}

.team-card {
  padding: clamp(20px, 3vw, 30px);
}

.pi-grid .team-card {
  padding: clamp(16px, 1.4vw, 22px);
}

.leader-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pi-grid .leader-card {
  gap: 14px;
}

.pi-grid .leader-card > div:last-child {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.student-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.team-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--cardinal);
  box-shadow: 0 18px 48px rgba(46, 45, 41, 0.14);
}

.team-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: inherit;
  pointer-events: none;
}

.team-photo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo-placeholder {
  display: grid;
  place-items: center;
  background: rgba(140, 21, 21, 0.1);
  color: var(--cardinal);
}

.team-photo-placeholder svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.placeholder-photo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(140, 21, 21, 0.1);
  color: var(--cardinal);
}

.placeholder-photo svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.role-label {
  margin: 0 0 8px;
  color: var(--cardinal) !important;
  font-size: 13px !important;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.leader-card h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.pi-grid .leader-card h2 {
  font-size: clamp(22px, 1.55vw, 30px);
  line-height: 1.08;
  min-height: 2.16em;
}

.student-card h2 {
  margin: 0;
  color: var(--black);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.08;
  letter-spacing: 0;
}

.team-title {
  margin: 8px 0 14px;
  font-weight: 800;
}

.pi-grid .team-title {
  font-size: 14px;
  line-height: 1.45;
  min-height: 4.35em;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.pi-grid .team-links {
  margin-top: auto;
}

.team-card a {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--cardinal);
  color: var(--white);
  font-weight: 850;
  text-decoration: none;
}

.pending-profile {
  cursor: default;
  opacity: 0.68;
}

.pi-grid .team-card a {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 14px;
}

.email-link {
  width: 42px;
  padding: 0 !important;
}

.pi-grid .email-link {
  width: 38px;
}

.email-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coming-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(140, 21, 21, 0.1), transparent 42%),
    #ffffff;
}

.coming-card h2 {
  font-size: clamp(24px, 2.5vw, 34px);
}

.coming-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: auto;
  border: 1px dashed rgba(140, 21, 21, 0.42);
  border-radius: 50%;
  color: var(--cardinal);
  font-size: 34px;
  font-weight: 800;
}

.product-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  height: 100vh;
  min-height: 760px;
  scroll-margin-top: 76px;
  padding: 98px 22px 22px;
  background:
    linear-gradient(180deg, var(--white), #fbf8f6 44%, var(--soft)),
    var(--white);
  overflow: hidden;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  max-height: 100%;
  padding: 18px;
  border: 1px solid rgba(140, 21, 21, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  overflow-y: auto;
  scrollbar-color: rgba(140, 21, 21, 0.46) transparent;
}

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

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--cardinal);
  color: var(--white);
  font-weight: 950;
}

.brand p {
  color: var(--black);
  font-size: 17px;
  font-weight: 900;
}

.brand span,
.topbar p,
.dropzone small,
.objects,
.status {
  color: var(--muted);
}

.dropzone {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 156px;
  padding: 24px;
  border: 1px dashed rgba(140, 21, 21, 0.32);
  border-radius: 8px;
  background: #fff8f7;
  color: var(--black);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--cardinal);
  background: #fff1f0;
  transform: translateY(-1px);
}

.dropzone.has-file {
  border-color: rgba(140, 21, 21, 0.7);
  background: rgba(140, 21, 21, 0.07);
}

.dropzone input {
  display: none;
}

.demo-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(140, 21, 21, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--black);
  text-align: left;
  box-shadow: 0 14px 36px rgba(46, 45, 41, 0.08);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.demo-card:hover,
.demo-card:focus-visible {
  border-color: rgba(140, 21, 21, 0.48);
  background: #fff1f0;
  box-shadow: 0 18px 44px rgba(46, 45, 41, 0.12);
  transform: translateY(-1px);
}

.demo-card:focus-visible {
  outline: 3px solid rgba(140, 21, 21, 0.18);
  outline-offset: 3px;
}

.demo-card img {
  width: 74px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

.event-demo-card {
  grid-template-columns: 94px minmax(0, 1fr);
}

.event-demo-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.event-demo-thumbs img {
  width: 45px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

.demo-card strong,
.demo-card small {
  display: block;
}

.demo-card strong {
  font-size: 13px;
  font-weight: 900;
}

.demo-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cardinal);
  color: var(--white);
  font-size: 30px;
  line-height: 1;
}

.control {
  display: grid;
  gap: 10px;
}

.control label,
.row-label {
  color: var(--black);
  font-size: 13px;
  font-weight: 850;
}

.row-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prompt-row {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 10px;
}

input[type="text"],
#promptInput {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  padding: 0 13px;
}

#promptInput:focus {
  border-color: rgba(140, 21, 21, 0.75);
  box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.14);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cardinal);
}

.prompt-row button,
.actions button,
.actions a,
.mode {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
}

.prompt-row button {
  background: var(--cardinal);
  color: var(--white);
  font-weight: 900;
}

.mode-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode,
.actions button,
.actions a {
  border: 1px solid var(--line);
}

.mode.active {
  border-color: rgba(140, 21, 21, 0.85);
  background: rgba(140, 21, 21, 0.08);
  color: var(--cardinal);
  font-weight: 850;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions a {
  grid-column: 1 / -1;
  color: var(--cardinal);
  font-weight: 850;
}

.event-primary-action {
  border-color: rgba(140, 21, 21, 0.78) !important;
  background: var(--cardinal) !important;
  color: var(--white) !important;
  font-weight: 950;
  box-shadow: 0 14px 32px rgba(140, 21, 21, 0.24);
}

.event-primary-action:hover,
.event-primary-action:focus-visible {
  background: #741111 !important;
  box-shadow: 0 18px 42px rgba(140, 21, 21, 0.32);
  transform: translateY(-1px);
}

.event-secondary-action {
  border-color: rgba(140, 21, 21, 0.26) !important;
  background: rgba(140, 21, 21, 0.06) !important;
  color: var(--cardinal) !important;
  font-weight: 900;
}

.event-secondary-action:hover,
.event-secondary-action:focus-visible {
  border-color: rgba(140, 21, 21, 0.44) !important;
  background: rgba(140, 21, 21, 0.1) !important;
  transform: translateY(-1px);
}

.objects {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.objects h2 {
  color: var(--black);
  font-size: 14px;
}

.object-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-color: rgba(140, 21, 21, 0.46) transparent;
}

.object-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f6;
}

.swatch {
  width: 10px;
  height: 32px;
  border-radius: 999px;
}

.object-item strong {
  color: var(--black);
}

.object-item span {
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(140, 21, 21, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.topbar-right {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.topbar h2 {
  color: var(--black);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0;
}

.instruction-label {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1px solid rgba(140, 21, 21, 0.18);
  border-radius: 8px;
  background: rgba(140, 21, 21, 0.06);
  color: var(--cardinal);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf8f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f6;
}

.result-tab {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.result-tab.active {
  background: var(--cardinal);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(140, 21, 21, 0.2);
}

.stage-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 18px;
  background: #f4efeb;
}

.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(140, 21, 21, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.result-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--cardinal);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-summary strong {
  color: var(--black);
  font-size: 18px;
}

.result-summary p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  text-align: right;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 1px solid rgba(46, 45, 41, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(140, 21, 21, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(140, 21, 21, 0.06) 1px, transparent 1px),
    #ffffff;
  background-size: 32px 32px;
  overflow: hidden;
}

canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  cursor: crosshair;
}

.empty {
  position: absolute;
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.empty strong {
  color: var(--black);
  font-size: 20px;
}

.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.chat-page {
  min-height: 100vh;
  background: #ffffff;
}

.chat-shell {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 0;
  height: 100vh;
  min-height: 720px;
  padding-top: 76px;
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 18px 14px;
  border-right: 1px solid rgba(46, 45, 41, 0.1);
  background: #f7f5f2;
  box-shadow: none;
  overflow: auto;
}

.neighbordrive-brand {
  display: block;
  padding: 8px 6px 2px;
}

.neighbordrive-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.new-chat-button,
.chat-side-section button,
.chat-composer button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 850;
}

.new-chat-button,
.chat-composer button:last-child {
  background: var(--cardinal);
  color: var(--white);
}

.new-chat-button {
  justify-content: start;
  padding: 0 14px;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(140, 21, 21, 0.14);
}

.chat-side-section {
  display: grid;
  gap: 6px;
}

.recents-section {
  min-height: 0;
  overflow: auto;
}

.chat-side-section h2 {
  margin: 12px 10px 6px;
  color: #7a746c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.side-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.side-heading-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.chat-side-section button,
.mini-upload {
  display: grid;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--black);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.recent-chat {
  min-height: 38px !important;
  overflow: hidden;
}

.recent-chat strong {
  color: var(--black);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-chat.active {
  background: rgba(46, 45, 41, 0.07);
}

.mini-upload input {
  display: none;
}

.chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.chat-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.chat-hero a {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(140, 21, 21, 0.18);
  border-radius: 8px;
  color: var(--cardinal);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.chat-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--black);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.chat-hero p:last-child {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.chat-canvas {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 28px clamp(18px, 8vw, 132px);
}

.image-context-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  max-width: 920px;
  padding: 14px;
  border: 1px solid rgba(140, 21, 21, 0.14);
  border-radius: 8px;
  background: #fbf8f6;
}

.image-context-preview {
  min-height: 72px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(140, 21, 21, 0.28), rgba(46, 45, 41, 0.16)),
    url("Homepage2.png") center / cover;
}

.image-context-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--cardinal);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-context-card strong {
  color: var(--black);
  font-size: 18px;
}

.message-stack {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 820px;
  padding: 16px;
  background: #f7f5f2;
  border: 0;
  box-shadow: none;
}

.message p {
  margin: 0;
  color: var(--black);
  line-height: 1.55;
}

.user-message {
  justify-self: end;
  background: var(--cardinal);
  max-width: min(680px, 82%);
}

.user-message p {
  color: var(--white);
}

.avatar {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--cardinal);
  color: var(--white);
  font-size: 12px;
  font-weight: 950;
}

.chat-composer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 86px;
  gap: 10px;
  max-width: 980px;
  width: calc(100% - 48px);
  margin: 0 auto 24px;
  padding: 10px;
  border: 1px solid rgba(46, 45, 41, 0.12);
  background: var(--white);
  box-shadow: 0 18px 46px rgba(46, 45, 41, 0.1);
}

.chat-composer input {
  min-width: 0;
  border: 0;
  outline: none;
  color: var(--black);
}

.composer-tool {
  background: #fbf8f6;
  color: var(--cardinal);
  font-size: 24px;
}

@media (max-width: 920px) {
  .site-nav {
    height: 68px;
  }

  .nav-meta {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding-top: 104px;
  }

  .product-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding-top: 88px;
  }

  .intro-grid,
  .feature-grid,
  .workflow-grid,
  .team-grid,
  .chat-shell {
    grid-template-columns: 1fr;
  }

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

  .team-photo-wrap {
    width: 100%;
  }

  .chat-shell {
    height: auto;
  }

  .panel {
    order: 2;
    max-height: none;
  }

  .workspace {
    min-height: 620px;
  }
}

@media (max-width: 560px) {
  .site-nav {
    padding-inline: 14px;
  }

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

  .stanford-brand {
    gap: 10px;
  }

  .stanford-logo {
    height: 28px;
    max-width: 44vw;
  }

  .logo-divider {
    height: 34px;
  }

  .lab-logo {
    height: 40px;
    max-width: 56px;
  }

  .hero {
    min-height: 86vh;
    padding-inline: 18px;
  }

  .hero-actions,
  .topbar {
    display: grid;
  }

  .topbar-right {
    justify-items: stretch;
  }

  .result-tabs {
    grid-template-columns: 1fr;
  }

  .team-section-head h3 {
    white-space: normal;
  }

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

  .result-summary {
    display: grid;
  }

  .result-summary p {
    text-align: left;
  }

  .product-shell {
    padding: 12px;
  }

  .chat-shell {
    padding: 82px 12px 12px;
  }

  .chat-composer {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .chat-composer button:last-child {
    grid-column: 1 / -1;
  }

  .actions,
  .prompt-row {
    grid-template-columns: 1fr;
  }

  .status {
    max-width: 100%;
  }
}
