:root {
  color-scheme: light;
  --bg: #f5f2ec;
  --panel: #fffdf8;
  --ink: #1f2933;
  --muted: #64707d;
  --line: #ded7cb;
  --primary: #214f4b;
  --primary-strong: #163b38;
  --accent: #b7782f;
  --error: #a23a3a;
  --success: #2f6f4e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top left, #efe4d0 0, transparent 34rem), var(--bg);
  color: var(--ink);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  max-width: 760px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  line-height: 1.08;
}

h1 { font-size: clamp(36px, 7vw, 64px); letter-spacing: -0.05em; }
h2 { font-size: 24px; letter-spacing: -0.03em; }

.lede {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.card {
  background: color-mix(in srgb, var(--panel) 94%, white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(31, 41, 51, 0.08);
  padding: 24px;
}

.ask-card { margin-bottom: 24px; }

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

textarea, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  padding: 14px 16px;
  background: #fffaf2;
}

textarea:focus, input:focus, button:focus-visible {
  outline: 3px solid rgba(183, 120, 47, 0.35);
  outline-offset: 2px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  background: var(--primary);
  font-weight: 800;
  padding: 12px 18px;
}

button:hover { background: var(--primary-strong); }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.status { color: var(--muted); font-size: 14px; }
.status.error { color: var(--error); }
.status.success { color: var(--success); }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 24px;
  margin-bottom: 24px;
}

.answer-text {
  margin-top: 16px;
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.65;
}

.trace-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.trace-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

dt { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
dd { margin: 4px 0 0; line-height: 1.45; }

details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}

summary { cursor: pointer; font-weight: 800; }
pre { overflow: auto; white-space: pre-wrap; font-size: 12px; }

.feedback-card { margin-top: 24px; }

.verdicts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.verdicts button {
  background: #ebe2d5;
  color: var(--ink);
}

.verdicts button.active {
  background: var(--primary);
  color: white;
}

.feedback-form, .form-grid {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.hidden { display: none !important; }

@media (max-width: 820px) {
  .shell { width: min(100% - 24px, 1120px); padding: 28px 0; }
  .grid, .form-grid { grid-template-columns: 1fr; }
  .card { border-radius: 18px; padding: 18px; }
}
