:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #64706d;
  --line: #d7dfdc;
  --surface: #f7f9f8;
  --panel: #ffffff;
  --mint: #dff4ea;
  --mint-strong: #22785d;
  --blue: #dceafa;
  --rose: #fae1e4;
  --shadow: 0 18px 60px rgba(23, 33, 31, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(215, 239, 228, 0.95), transparent 34%),
    radial-gradient(circle at 82% 6%, rgba(220, 234, 250, 0.82), transparent 30%),
    linear-gradient(135deg, #f8faf9 0%, #edf6f3 58%, #f7eef0 100%);
  color: var(--ink);
}

button,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  width: min(960px, calc(100vw - 32px));
  height: calc(100vh - 32px);
  min-height: 620px;
  margin: 16px auto;
}

.chat-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--mint-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.05;
}

.slogan {
  margin: 6px 0 0;
  color: #315d52;
  font-size: 0.94rem;
  font-weight: 700;
}

.status-pill {
  min-width: 82px;
  padding: 7px 10px;
  border: 1px solid #b9d9cb;
  border-radius: 999px;
  background: var(--mint);
  color: #18543f;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  padding: 28px 30px;
  background: rgba(247, 249, 248, 0.5);
}

.message {
  display: flex;
  margin-bottom: 14px;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  width: fit-content;
  max-width: min(720px, 88%);
  padding: 13px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  line-height: 1.48;
  white-space: pre-wrap;
}

.message.user .bubble {
  background: #183b35;
  color: white;
  border-color: #183b35;
}

.message.assistant .bubble {
  background: white;
}

.followups {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f0;
  white-space: normal;
}

.followups-label {
  display: block;
  margin-bottom: 8px;
  color: #315d52;
  font-size: 0.84rem;
  font-weight: 800;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-chip {
  min-height: 32px;
  padding: 0 10px;
  border-color: #bfd5ce;
  background: #f6fbf9;
  color: #204c42;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
}

.suggestion-chip:hover,
.feedback-button:hover {
  border-color: #22785d;
}

.feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #edf2f0;
  white-space: normal;
}

.feedback-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.feedback-button {
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-color: #c9d5d1;
  background: white;
  color: #24433b;
  font-size: 1rem;
  line-height: 1;
}

.feedback-button.selected,
.feedback-actions[data-feedback="like"] .feedback-button[data-feedback="like"],
.feedback-actions[data-feedback="dislike"] .feedback-button[data-feedback="dislike"] {
  border-color: #22785d;
  background: var(--mint);
}

.feedback-button:disabled {
  cursor: default;
}

.feedback-state {
  min-width: 76px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

textarea {
  width: 100%;
  max-height: 150px;
  min-height: 46px;
  resize: none;
  border: 1px solid #c9d5d1;
  border-radius: 8px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  line-height: 1.35;
  outline: none;
}

textarea:focus {
  border-color: #2a8c6e;
  box-shadow: 0 0 0 3px rgba(42, 140, 110, 0.14);
}

button {
  min-height: 42px;
  border: 1px solid #1f6952;
  border-radius: 8px;
  padding: 0 16px;
  background: #22785d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ghost-button {
  min-height: 34px;
  padding: 0 12px;
  background: white;
  color: #24433b;
  border-color: #c9d5d1;
}

@media (max-width: 860px) {
  .app-shell {
    height: auto;
    min-height: calc(100vh - 24px);
    width: min(100vw - 20px, 680px);
    margin: 10px auto;
  }

  .chat-panel {
    min-height: 68vh;
  }

  .topbar {
    padding: 14px;
  }

  .messages {
    padding: 14px;
  }

  .bubble {
    max-width: 94%;
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    flex-direction: column;
    align-items: flex-end;
  }
}
