* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

button, input { font: inherit; }

body.login {
  color-scheme: light;
  display: grid;
  place-items: center;
  background: #fff;
  color: #1d2740;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.login-card {
  width: min(440px, calc(100% - 40px));
  text-align: center;
}

.login-card h1 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #1a2744;
}

.switch {
  margin: 10px 0 28px;
  color: #9aa3b2;
  font-size: 0.98rem;
}

.text-link {
  padding: 0;
  border: 0;
  background: none;
  color: #2f6fed;
  font-weight: 600;
  cursor: pointer;
}

.login-card form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  color: #1d2740;
  background: #fff;
}

.login-card input::placeholder { color: #b4bcc8; }

.login-card input:focus {
  outline: 2px solid rgba(47, 111, 237, 0.25);
  border-color: #c5d4f6;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b95a5;
  font-size: 0.95rem;
}

.check input { width: 16px; height: 16px; accent-color: #2f6fed; }

.signin {
  justify-self: center;
  margin-top: 18px;
  min-width: 148px;
  height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #6ec83a;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.signin:hover { background: #62b832; }
.signin:disabled { opacity: 0.6; cursor: wait; }

.banner, .hint {
  margin: 0 0 16px;
  color: #9a3412;
  font-size: 0.92rem;
}

body.advisor {
  color-scheme: dark;
  min-height: 100vh;
  color: #f4f1ea;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: #07080d;
  background-image:
    radial-gradient(ellipse at center, rgba(28, 32, 48, 0.55), rgba(7, 8, 13, 0.2) 55%, #07080d 78%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

.signout {
  position: absolute;
  top: 18px;
  right: 22px;
}

.signout button {
  border: 0;
  background: transparent;
  color: #9aa3b2;
  cursor: pointer;
}

.hero {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14vh 0 48px;
  text-align: center;
}

.mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  color: #f3d2dc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.hero h1 span {
  background: linear-gradient(100deg, #d4c2ea 0%, #e4c3d0 46%, #f0c2b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 560px;
  margin: 18px auto 0;
  color: #9aa0ab;
  font-size: 1.02rem;
  line-height: 1.55;
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px auto 0;
  text-align: left;
}

.transcript:empty { display: none; }

.transcript article {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 14px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.transcript article.user {
  align-self: flex-end;
  background: #f0c7b6;
  color: #2a211c;
}

.transcript article.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ask {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.ask input {
  width: min(280px, 100%);
  height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #16181f;
  color: #f4f1ea;
}

.ask input::placeholder { color: #8d939e; }

.ask input:focus {
  outline: 2px solid rgba(240, 199, 182, 0.35);
  border-color: transparent;
}

.ask button {
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #f0c7b6;
  color: #2a211c;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.ask button:disabled { opacity: 0.6; cursor: wait; }

#status {
  min-height: 1.3em;
  margin: 12px 0 0;
  color: #f0c7b6;
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .ask { flex-direction: column; }
  .ask input { width: 100%; }
}
