:root {
  --ink: #f7f3ea;
  --muted: #d4c7b1;
  --sand: #c8ab72;
  --gold: #f0b64c;
  --rust: #a65322;
  --pine: #173337;
  --pine-soft: rgba(23, 51, 55, 0.78);
  --panel: rgba(14, 28, 31, 0.88);
  --line: rgba(240, 182, 76, 0.2);
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(240, 182, 76, 0.18), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(166, 83, 34, 0.18), transparent 26%),
    linear-gradient(180deg, #0d1719 0%, #10262a 52%, #0b1416 100%);
}

.ai-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.ai-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  pointer-events: none;
}

.ai-glow-left {
  top: -10rem;
  left: -8rem;
  background: rgba(240, 182, 76, 0.3);
}

.ai-glow-right {
  right: -10rem;
  bottom: -8rem;
  background: rgba(127, 195, 255, 0.16);
}

.ai-app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 20px 56px;
}

.ai-hero {
  display: grid;
  grid-template-columns: 1.5fr minmax(240px, 320px);
  gap: 24px;
  align-items: stretch;
}

.ai-brand {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, rgba(240, 182, 76, 0.12), rgba(14, 28, 31, 0.84));
  border: 1px solid rgba(240, 182, 76, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.ai-eagle {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(240, 182, 76, 0.16);
}

.ai-kicker {
  margin: 0 0 6px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.74rem;
}

.ai-brand h1 {
  margin: 0;
  font-family: "Impact", "Haettenschweiler", "Arial Black", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: 0.03em;
}

.ai-sub {
  margin: 12px 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.ai-status-card,
.ai-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.ai-status-card {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ai-status-label {
  margin: 0;
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
}

.ai-status-value {
  margin: 10px 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
}

.ai-status-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.ai-panel-form {
  margin-top: 22px;
  padding: 20px 22px;
}

.ask-form {
  display: grid;
  gap: 14px;
}

.ask-label {
  font-weight: 800;
  font-size: 1rem;
}

.ask-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.ask-row textarea {
  resize: vertical;
  min-height: 88px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(240, 182, 76, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
}

.ask-row textarea:focus,
.preset:focus,
#askButton:focus {
  outline: 2px solid rgba(127, 195, 255, 0.7);
  outline-offset: 2px;
}

#askButton {
  align-self: stretch;
  min-width: 140px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold), #d58426);
  color: #112326;
  font-weight: 900;
  font-size: 1rem;
  padding: 0 20px;
  cursor: pointer;
}

#askButton[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.ask-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset {
  border: 1px solid rgba(240, 182, 76, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 360px);
  gap: 22px;
  margin-top: 22px;
}

.ai-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.ai-panel {
  padding: 20px 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.06rem;
}

.response-state {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(127, 195, 255, 0.12);
  color: #baddff;
  font-size: 0.82rem;
}

.answer-output {
  min-height: 360px;
  color: var(--ink);
}

.answer-output.empty {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.answer-output p {
  margin: 0 0 16px;
  line-height: 1.6;
}

.answer-output .answer-section {
  margin: 18px 0 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.answer-output ul {
  margin: 0 0 14px;
  padding-left: 1.2rem;
}

.answer-output li {
  margin: 0 0 10px;
  line-height: 1.55;
  color: var(--ink);
}

.answer-output .cite {
  color: var(--sand);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.answer-output a.cite:hover,
.answer-output a.cite:focus {
  color: var(--gold);
}

.feedback-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(240, 182, 76, 0.16);
}

.feedback-panel.hidden {
  display: none;
}

.feedback-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-btn {
  border: 1px solid rgba(240, 182, 76, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.feedback-btn-warn {
  border-color: rgba(166, 83, 34, 0.4);
  color: #ffd9c7;
}

.feedback-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.feedback-status {
  margin: 10px 0 0;
  color: var(--sand);
  min-height: 1.2em;
}

@media (max-width: 920px) {
  .ai-hero,
  .ai-grid,
  .ask-row {
    grid-template-columns: 1fr;
  }

  #askButton {
    min-height: 56px;
  }
}

@media (max-width: 640px) {
  .ai-brand {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .ai-eagle {
    width: 124px;
    height: 124px;
  }

  .ai-app {
    padding: 24px 16px 42px;
  }
}
