.ahg-tool-page {
  background: #faf8f1;
  color: #1f2937;
  min-height: 100vh;
}

.ahg-tool-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.ahg-tool-hero {
  padding: 2.5rem 0 1rem;
}

.ahg-tool-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 0.95;
  margin: 0;
  color: #17351f;
}

.ahg-tool-hero p,
.ahg-tool-card p,
.ahg-diagnoser-result p {
  color: #64748b;
  line-height: 1.6;
}

.ahg-tool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.ahg-tool-card,
.ahg-diagnoser-result {
  border: 1px solid rgba(47, 111, 78, 0.18);
  border-radius: 1.25rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.ahg-tool-card h2,
.ahg-diagnoser-result h2,
.ahg-diagnoser-result h3 {
  color: #17351f;
  margin-top: 0;
}

.ahg-tool-controls {
  display: grid;
  gap: 0.75rem;
}

.ahg-tool-controls label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
  color: #17351f;
}

.ahg-tool-controls select,
.ahg-tool-controls input,
.ahg-tool-controls textarea {
  width: 100%;
  border: 1px solid rgba(47, 111, 78, 0.24);
  border-radius: 0.85rem;
  padding: 0.72rem 0.8rem;
  background: #fff;
  color: #1f2937;
}

.ahg-tool-controls textarea {
  min-height: 130px;
}

.ahg-tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ahg-tool-buttons button,
.ahg-tool-button {
  border: 1px solid rgba(47, 111, 78, 0.24);
  border-radius: 999px;
  padding: 0.66rem 0.9rem;
  background: #2f6f4e;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.ahg-tool-buttons button.secondary,
.ahg-tool-button.secondary {
  background: #fff;
  color: #14532d;
}

.ahg-symptom-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ahg-symptom-buttons button {
  border: 1px solid rgba(47, 111, 78, 0.24);
  border-radius: 999px;
  padding: 0.5rem 0.72rem;
  background: #fff;
  color: #14532d;
  font-weight: 800;
  cursor: pointer;
}

.ahg-symptom-buttons button[aria-pressed="true"] {
  background: #2f6f4e;
  color: #fff;
}

.ahg-result-grid {
  display: grid;
  gap: 1rem;
}

.ahg-diagnoser-badge {
  display: inline-flex;
  margin: 0.25rem 0.35rem 0.25rem 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
  font-size: 0.78rem;
}

.ahg-diagnoser-badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.ahg-diagnoser-badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.ahg-diagnoser-list {
  padding-left: 1.15rem;
  color: #475569;
  line-height: 1.55;
}

.ahg-companion-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1rem;
}

.ahg-companion-card {
  border: 1px solid rgba(47, 111, 78, 0.16);
  border-radius: 1rem;
  padding: 0.85rem;
  background: #fff;
}

.ahg-companion-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.85rem;
  background: #f7f3ea;
}

@media (max-width: 850px) {
  .ahg-tool-grid {
    grid-template-columns: 1fr;
  }
}
