:root {
  --ink: #132623;
  --muted: #60706c;
  --paper: #f4f7f5;
  --white: #fff;
  --line: #d8e2de;
  --teal: #087f70;
  --teal-dark: #075f55;
  --teal-soft: #e2f2ee;
  --coral: #e8654a;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 19px; height: 19px; stroke-width: 1.8; }

.agent-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 800 17px/1 "Manrope", sans-serif; text-decoration: none; }
.brand-mark { position: relative; width: 29px; height: 29px; border-radius: 50%; background: var(--teal); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border-radius: 3px; background: white; }
.brand-mark::before { width: 14px; height: 4px; left: 7.5px; top: 12.5px; }
.brand-mark::after { width: 4px; height: 14px; left: 12.5px; top: 7.5px; }
.header-links { display: flex; align-items: center; gap: 10px; }
.icon-button, .header-link {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.header-link { padding: 0 13px; }
.icon-button:hover, .header-link:hover { border-color: var(--teal); color: var(--teal); }

.gate-page { min-height: 100svh; display: grid; grid-template-columns: 1.05fr .95fr; }
.gate-brand { position: relative; min-height: 580px; display: flex; flex-direction: column; justify-content: space-between; padding: 42px clamp(30px, 5vw, 72px); overflow: hidden; color: white; background: #153c36; }
.gate-brand::after { content: ""; position: absolute; width: 520px; height: 520px; right: -190px; bottom: -190px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.025); }
.gate-brand .brand { position: relative; z-index: 1; color: white; }
.gate-message { position: relative; z-index: 1; max-width: 650px; }
.eyebrow { margin: 0 0 18px; color: #9edfd3; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.gate-message h1 { margin: 0; font: 800 clamp(43px, 5vw, 70px)/1.05 "Manrope", sans-serif; letter-spacing: 0; }
.gate-message > p:last-child { max-width: 550px; margin: 24px 0 0; color: #c9ddd8; font-size: 17px; line-height: 1.65; }
.gate-foot { position: relative; z-index: 1; color: #8eb1aa; font-size: 11px; }
.gate-panel { display: grid; place-items: center; padding: 38px; background: white; }
.login-box { width: min(410px, 100%); }
.lock-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 7px; color: var(--teal); background: var(--teal-soft); }
.login-box h2 { margin: 0; font: 800 31px/1.2 "Manrope", sans-serif; }
.login-copy { margin: 13px 0 30px; color: var(--muted); font-size: 14px; }
.field-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; }
.password-field { height: 52px; display: grid; grid-template-columns: 1fr 44px; border: 1px solid #aebdb8; border-radius: 6px; overflow: hidden; }
.password-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,112,.1); }
.password-field input { min-width: 0; padding: 0 14px; border: 0; outline: 0; color: var(--ink); }
.password-field button { display: grid; place-items: center; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.primary-button { width: 100%; height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; border: 0; border-radius: 6px; color: white; background: var(--teal); font-weight: 800; cursor: pointer; }
.primary-button:hover { background: var(--teal-dark); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.form-error { min-height: 20px; margin: 10px 0 0; color: #b03a27; font-size: 12px; }
.privacy-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 28px; color: #788783; font-size: 11px; line-height: 1.5; }
.privacy-note svg { width: 15px; height: 15px; margin-top: 1px; color: var(--teal); }

.chat-page { height: 100svh; display: grid; grid-template-rows: 68px 1fr; overflow: hidden; }
.chat-main { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.avatar-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: clamp(26px, 4vh, 48px) clamp(24px, 4vw, 64px) 24px;
  overflow: hidden;
  color: white;
  background: radial-gradient(circle at 50% 55%, #2c6259 0, #183f39 48%, #102e2a 100%);
}
.avatar-panel::before { content: ""; position: absolute; width: 420px; height: 420px; right: -180px; top: -210px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.avatar-panel-copy { position: relative; z-index: 1; max-width: 520px; }
.avatar-panel-copy .eyebrow { margin-bottom: 10px; }
.avatar-panel-copy h1 { margin: 0; font: 800 clamp(25px, 3vw, 42px)/1.12 "Manrope", sans-serif; }
.avatar-panel-copy > p:last-child { margin: 12px 0 0; color: #c7ddd8; font-size: 13px; line-height: 1.55; }
.mascot-stage { min-height: 0; position: relative; z-index: 1; display: grid; place-items: center; align-content: center; }
.mascot-frame {
  width: min(100%, 540px);
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: white;
  box-shadow: 0 28px 80px rgba(2,18,15,.34), 0 0 0 10px rgba(255,255,255,.055);
}
.mascot-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 -30px 70px rgba(12,44,38,.08); pointer-events: none; }
.mascot-frame.speaking { box-shadow: 0 28px 80px rgba(2,18,15,.34), 0 0 0 10px rgba(255,255,255,.07), 0 0 0 16px rgba(110,222,201,.14); }
.mascot-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mascot-status { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; color: white; background: rgba(13,45,39,.84); backdrop-filter: blur(10px); white-space: nowrap; font-size: 11px; }
.mascot-status span { width: 7px; height: 7px; border-radius: 50%; background: #78dfca; box-shadow: 0 0 0 4px rgba(120,223,202,.14); }
.avatar-disclaimer { position: relative; z-index: 1; margin: 0; color: #9cbab3; font-size: 10px; text-align: center; }
.conversation { min-width: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; background: white; }
.messages { min-height: 0; overflow-y: auto; padding: 40px clamp(20px, 4vw, 54px) 24px; }
.welcome { max-width: 720px; margin: 2vh auto 0; text-align: center; }
.welcome-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 8px; color: var(--teal); background: var(--teal-soft); }
.welcome h1 { margin: 0; font: 800 clamp(28px, 4vw, 40px)/1.15 "Manrope"; }
.welcome > p { max-width: 570px; margin: 15px auto 28px; color: var(--muted); font-size: 14px; }
.suggestions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: left; }
.suggestion { min-height: 116px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; font-size: 12px; font-weight: 700; line-height: 1.45; cursor: pointer; }
.suggestion:hover { border-color: var(--teal); background: #fbfdfc; }
.suggestion svg { width: 17px; height: 17px; color: var(--teal); }
.message { max-width: 720px; display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin: 0 auto 22px; }
.message-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: var(--teal-soft); }
.message.user .message-avatar { color: white; background: var(--ink); }
.message-avatar svg { width: 16px; height: 16px; }
.message-body { min-width: 0; }
.message-body strong { display: block; margin: 1px 0 5px; font-size: 11px; }
.message-body p { margin: 0; color: #374a45; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.typing { display: flex; gap: 4px; padding-top: 8px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: #83a19a; animation: pulse 1s infinite alternate; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { opacity: .25; transform: translateY(-3px); } }
.composer-wrap { padding: 14px clamp(20px, 4vw, 54px) 18px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.composer { min-height: 58px; display: grid; grid-template-columns: 42px 1fr 44px; align-items: end; padding: 7px; border: 1px solid #aabbb5; border-radius: 7px; background: white; box-shadow: 0 8px 28px rgba(19,38,35,.07); }
.composer:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,112,.08); }
.composer textarea { min-height: 42px; max-height: 130px; resize: none; padding: 10px 8px; border: 0; outline: 0; color: var(--ink); line-height: 1.4; }
.composer button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 5px; cursor: pointer; }
.voice-button { color: var(--teal); background: transparent; }
.voice-button.listening { color: white; background: var(--coral); }
.send-button { color: white; background: var(--teal); }
.send-button:disabled { opacity: .45; cursor: wait; }
.composer-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: #87948f; font-size: 9px; }
.voice-status { color: var(--teal); }

.help-main { min-height: calc(100svh - 68px); padding: 76px 20px; }
.help-shell { width: min(820px, 100%); margin: 0 auto; }
.help-shell h1 { margin: 0; font: 800 clamp(38px, 6vw, 58px)/1.1 "Manrope"; }
.help-intro { max-width: 600px; color: var(--muted); }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 38px; }
.help-item { padding: 24px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.help-item svg { color: var(--teal); }
.help-item h2 { margin: 18px 0 8px; font: 800 17px "Manrope"; }
.help-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.help-cta { margin-top: 28px; display: inline-flex; align-items: center; gap: 8px; padding: 13px 17px; border-radius: 6px; color: white; background: var(--teal); font-size: 13px; font-weight: 800; text-decoration: none; }

@media (max-width: 760px) {
  .gate-page { grid-template-columns: 1fr; }
  .gate-brand { min-height: 350px; padding: 30px 24px 42px; }
  .gate-brand .gate-foot { display: none; }
  .gate-panel { padding: 46px 24px; }
  .chat-page { min-height: 100svh; height: auto; overflow: auto; }
  .chat-main { min-height: calc(100svh - 68px); grid-template-columns: 1fr; grid-template-rows: minmax(330px, 44svh) minmax(560px, 1fr); }
  .avatar-panel { padding: 22px 20px 14px; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .avatar-panel-copy h1 { font-size: 24px; }
  .avatar-panel-copy > p:last-child, .avatar-disclaimer { display: none; }
  .mascot-frame { width: min(54vw, 230px); }
  .mascot-status { bottom: 0; }
  .conversation { min-height: 560px; }
  .header-link span { display: none; }
  .messages { padding: 28px 15px 20px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestion { min-height: 78px; }
  .composer-wrap { padding: 10px 12px 14px; }
  .composer-note span:first-child { display: none; }
  .help-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; }
}
