/* Brightview Senior Living: colors sampled from the company website.
   Buttons use a deeper green than the site's #38903e so white text meets 4.5:1 contrast. */
:root {
  color-scheme: light;
  --green: #38903e;
  --green-deep: #2c7a33;
  --green-ink: #256a2b;
  --navy: #0d2854;
  --blue: #20477e;
  --gold: #f3c128;
  --ink: #202020;
  --muted: #4d5560;
  --paper: #ffffff;
  --stone: #eeeceb;
  --bubble: #f3f1ee;
  --line: #d9d5d0;
  --field: #7b838d;
  --serif: Baskerville, "Libre Baskerville", "Baskerville Old Face", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--stone);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}

/* Navy utility strip, like the company site */
.strip {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.masthead {
  background: var(--paper);
  display: flex;
  justify-content: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.logo { display: block; width: 190px; height: auto; }

.stage {
  flex: 1;
  padding: 36px 20px 48px;
}

/* The gold frame echoes the frame on the company home page */
.frame {
  max-width: 680px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 2px 14px rgba(13, 40, 84, 0.12);
  outline: 2px solid var(--gold);
  outline-offset: 8px;
}

.intro { padding: 30px 32px 6px; }
h1 {
  margin: 0 0 8px;
  font: 600 1.75rem/1.2 var(--serif);
  color: var(--navy);
}
.lede { margin: 0; color: var(--muted); max-width: 52ch; }

.log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 46vh;
  overflow-y: auto;
  margin-top: 14px;
  padding: 16px 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fcfbfa;
}
.msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 3px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.bot {
  align-self: flex-start;
  background: var(--bubble);
  border-left: 3px solid var(--green);
}
.msg.me {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 8px 32px 26px;
}
.controls > * { min-width: 0; }
.row { display: flex; gap: 10px; min-width: 0; }
.row button { flex: none; }

input[type="text"], input[type="password"] {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--field);
  border-radius: 2px;
}

button {
  font: inherit;
  cursor: pointer;
}
button.go, .choices button {
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--green-deep);
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
button.go {
  background: var(--green-deep);
  color: #fff;
}
button.go:hover { background: var(--green-ink); border-color: var(--green-ink); }
button.go::after, .choices button::after { content: "\2192"; margin-left: 10px; }

.choices { display: grid; gap: 10px; }
.choices button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--paper);
  color: var(--green-deep);
  text-align: left;
}
.choices button:hover { background: var(--green-deep); color: #fff; }

button:disabled { opacity: 0.5; cursor: default; }

.aside { text-align: center; }
button.link {
  min-height: 44px;
  padding: 4px 8px;
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
button.link:hover { color: var(--navy); }

.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-deep);
  animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.done { display: flex; justify-content: center; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.band {
  background: var(--navy);
  color: #fff;
  padding: 22px 20px;
  text-align: center;
  font-size: 0.8125rem;
}
.band p { margin: 0 auto 6px; max-width: 62ch; }
.band .addr { margin: 8px auto 0; font-weight: 700; letter-spacing: 0.04em; }

.hidden { display: none !important; }
.sr { position: absolute; left: -9999px; }

@media (max-width: 520px) {
  .stage { padding: 24px 16px 36px; }
  .frame { outline-offset: 5px; }
  .intro { padding: 22px 18px 4px; }
  h1 { font-size: 1.45rem; }
  .log { padding: 12px 18px; max-height: min(52vh, 440px); margin-top: 10px; }
  .controls { padding: 6px 18px 20px; }
  .logo { width: 160px; }
  .msg { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; opacity: 1; }
}

@media (max-width: 380px) {
  .row { flex-wrap: wrap; }
  .row input { flex: 1 1 100%; }
  .row button { flex: 1 1 100%; justify-content: center; }
}
