:root {
  color-scheme: light;
  --ink: #18231f;
  --muted: #66746d;
  --line: #dce5df;
  --brand: #1f6b50;
  --brand-dark: #164736;
  --brand-soft: #eaf4ef;
  --gold: #b58a32;
  --paper: #fbfcfa;
  --danger: #9f2f25;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(251, 252, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.logo {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #2f8c69);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
}

.brand strong,
.brand em {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 18px;
}

.brand em {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.nav a,
.nav button,
.button,
button {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.nav a:first-child,
.ghost {
  background: transparent;
  color: var(--brand-dark);
}

.button.secondary,
button.secondary {
  background: #edf3ef;
  color: var(--brand-dark);
}

.button.block,
button.block {
  display: block;
  width: 100%;
  text-align: center;
}

#app {
  min-height: 62vh;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
  gap: 30px;
  padding: clamp(28px, 5vw, 72px) clamp(18px, 4vw, 56px);
  align-items: start;
}

.hero-main {
  padding-right: clamp(0px, 2vw, 32px);
}

.eyebrow {
  color: var(--gold);
  font-weight: 700;
}

h1 {
  margin: 12px 0 16px;
  max-width: 900px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 820px;
  color: #43504a;
  font-size: 18px;
  line-height: 1.75;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.step,
.panel,
.auth-box,
.chat-window,
.profile-row,
.question {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.step {
  padding: 18px;
}

.step strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.notice {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.auth-box,
.panel {
  padding: 20px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tabs button {
  background: #edf3ef;
  color: var(--brand-dark);
}

.auth-tabs button.active {
  background: var(--brand);
  color: #fff;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}

.field label {
  color: #36433d;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.error {
  color: var(--danger);
  min-height: 20px;
  font-size: 13px;
}

.page {
  padding: clamp(22px, 4vw, 52px) clamp(18px, 4vw, 56px);
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 8px;
}

.questions {
  display: grid;
  gap: 14px;
}

.question {
  padding: 18px;
}

.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.scale label {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.scale input {
  width: auto;
  margin: 0 0 4px;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
}

.chat-window {
  min-height: 520px;
  padding: 18px;
}

.messages {
  display: grid;
  gap: 12px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.message {
  max-width: 860px;
  white-space: pre-wrap;
  line-height: 1.68;
  padding: 13px 15px;
  border-radius: 8px;
  background: #f1f5f2;
}

.message.user {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
}

.chat-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

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

.profile-row {
  padding: 16px;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 26px;
  padding: 32px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #f4f8f5;
}

.footer h2 {
  font-size: 17px;
  margin: 0 0 10px;
}

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

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

.campus {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hero,
  .footer,
  .chat-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .steps,
  .campus-grid {
    grid-template-columns: 1fr;
  }

  .scale {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }
}
