:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --ink: #18201b;
  --muted: #68746d;
  --line: #d7ddd5;
  --panel: #ffffff;
  --panel-soft: #eef3f4;
  --accent: #176b63;
  --accent-strong: #0f514b;
  --warning: #a35218;
  --shadow: 0 18px 60px rgba(24, 32, 27, 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: var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  min-height: 40px;
  padding: 0 14px;
}

button:disabled {
  border-color: var(--line);
  background: #dce2df;
  color: #7f8984;
  cursor: not-allowed;
}

button.secondary {
  background: #fff;
  color: var(--accent-strong);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.shell {
  display: block;
  min-height: 100vh;
  padding: 20px;
}

.workspace,
.question-panel,
.config-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
}

.topbar,
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.topbar h1,
.panel-header h2 {
  margin: 0;
}

.topbar h1 {
  font-size: 2rem;
}

.panel-header h2 {
  font-size: 1.15rem;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-strip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--accent-strong);
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 750;
  white-space: nowrap;
}

.config-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  box-shadow: none;
}

.question-panel {
  display: grid;
  gap: 18px;
  min-height: 56vh;
  padding: 18px;
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.response-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  min-height: 180px;
  padding: 18px;
  color: var(--ink);
  line-height: 1.55;
}

.response-content h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.question-meta {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  color: var(--muted);
}

.question-meta p {
  margin: 0;
}

.question-number {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.question-source {
  font-size: 0.9rem;
  font-weight: 650;
}

.response-content p {
  margin: 0 0 12px;
}

.recommendation-image {
  margin: 10px 0 14px;
  width: min(100%, 520px);
}

.recommendation-image img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
}

.answer-form {
  display: grid;
  gap: 12px;
}

.show-results-button {
  margin-top: 12px;
  width: fit-content;
}

.result-section {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.result-section h4,
.result-item h5 {
  margin: 0;
}

.result-section ul {
  margin: 0;
  padding-left: 20px;
}

.result-item {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-top: 10px;
}

.result-item p {
  margin: 0;
}

.alternative-role {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.alternative-image {
  margin: 6px 0 4px;
  width: min(100%, 360px);
}

.alternative-image img {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  border-radius: 8px;
}

.option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.option-button {
  min-height: 46px;
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.option-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: #dbece8;
  color: var(--accent-strong);
}

.notice {
  color: var(--warning);
  font-weight: 700;
}

@media (max-width: 980px) {
  .config-panel {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header {
    display: grid;
  }

  .actions {
    justify-content: flex-start;
  }
}
