:root {
  --bg: #242321;
  --panel: rgba(27, 26, 24, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.02);
  --text: #e7e1d7;
  --muted: #b7aea0;
  --line: rgba(231, 225, 215, 0.18);
  --accent: #d2871d;
  --accent-soft: rgba(210, 135, 29, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: radial-gradient(circle at top, #34322f 0%, var(--bg) 42%, #1d1c1a 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background: transparent;
}

button,
textarea,
a {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 20px 24px 150px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.suggestions h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wordmark {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(2rem, 3.1vw, 3.2rem);
  font-weight: 600;
  line-height: 0.92;
}

.wordmark-light {
  color: #f3efe8;
}

.wordmark-accent {
  color: var(--accent);
  font-style: italic;
}

.masthead-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  padding-top: 12px;
  color: var(--muted);
  text-align: right;
}

.masthead-meta p,
.masthead-meta a {
  margin: 0;
  font-size: 0.84rem;
}

.masthead-meta a {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.masthead-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.content {
  max-width: 1240px;
}

.hero {
  padding: 34px 4px 30px;
}

.hero p {
  margin: 0;
  max-width: 940px;
  color: #dfd8cd;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.35rem, 2.35vw, 2.45rem);
  line-height: 1.36;
}

.hero strong {
  color: #f5efe6;
  font-weight: 600;
}

.suggestions {
  padding: 0 4px 28px;
}

.suggestion-list {
  display: grid;
  gap: 10px;
}

.suggestion-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #f3eee6;
  background: var(--panel-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.suggestion-card:hover,
.suggestion-card:focus-visible {
  border-color: rgba(210, 135, 29, 0.55);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.suggestion-card span:last-child {
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  font-weight: 600;
  line-height: 1.35;
}

.suggestion-arrow {
  color: var(--accent);
  font-size: 1rem;
}

.transcript {
  min-height: 148px;
  padding: 14px 4px 0;
  border-top: 1px solid var(--line);
}

.transcript-empty {
  max-width: 720px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.transcript-list {
  display: grid;
  gap: 12px;
  padding: 14px 0 0;
}

.message {
  max-width: 920px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
}

.message-user {
  justify-self: end;
  background: rgba(210, 135, 29, 0.12);
}

.message-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.composer {
  position: fixed;
  right: 24px;
  bottom: 16px;
  left: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(31, 30, 28, 0.92), rgba(24, 23, 21, 0.97));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.composer textarea {
  width: 100%;
  min-height: 88px;
  border: 0;
  outline: none;
  resize: none;
  color: var(--text);
  background: transparent;
  font-size: clamp(0.98rem, 1.15vw, 1.18rem);
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: var(--muted);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #fbf7f0;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 1.25rem;
}

.send-button:hover,
.send-button:focus-visible {
  border-color: rgba(210, 135, 29, 0.55);
  background: var(--accent-soft);
}

.send-button[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .page-shell {
    padding: 18px 16px 172px;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .masthead-meta {
    justify-items: start;
    padding-top: 0;
    text-align: left;
  }

  .masthead-links {
    flex-wrap: wrap;
  }

  .composer {
    right: 16px;
    bottom: 16px;
    left: 16px;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .composer-actions {
    justify-content: flex-end;
  }

  .send-button {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 24px;
  }

  .suggestion-card {
    padding: 13px 14px;
  }

  .suggestion-card span:last-child {
    font-size: 0.9rem;
  }

  .composer textarea {
    min-height: 82px;
    font-size: 0.96rem;
  }
}
