/* Symptom Diagnosis Helper — pipad.co.uk — minimal, calm, readable. */
:root {
  --bg: #f7f9fc;
  --ink: #1a2233;
  --muted: #5b6878;
  --accent: #3a6db8;
  --accent-dark: #2a4f88;
  --card-bg: #ffffff;
  --border: #d8dde6;
  --warn: #b34a3a;
  --warn-bg: #fcebe8;
  --max-width: 940px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: var(--accent);
  color: #fff;
  padding: 2rem 0 1.75rem;
  margin-bottom: 2rem;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.site-header .tagline {
  margin: 0;
  font-size: 1rem;
  max-width: 60ch;
}

.site-header .tagline strong { font-weight: 600; }

.back-link {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.back-link a { color: #fff; text-decoration: underline; }

main { padding-bottom: 3rem; }

section { margin-bottom: 2.5rem; }

section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--accent-dark);
}

#symptom-search {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 1rem;
  background: var(--card-bg);
}

.symptom-list {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.symptom-list .loading {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: italic;
}

.symptom-list label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.4rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.1s;
}

.symptom-list label:hover {
  background: #eef3fa;
}

.symptom-list input[type="checkbox"] {
  cursor: pointer;
}

.results-section { margin-top: 2rem; }

#results-summary {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.results {
  display: grid;
  gap: 1rem;
}

.result-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 5px;
  padding: 1rem 1.25rem;
}

.result-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-dark);
}

.result-card .matched {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.result-card .matched strong { color: var(--ink); }

.result-card .desc {
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

.result-card .precautions {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.result-card .precautions li { margin-bottom: 0.25rem; }

.about {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.25rem;
  font-size: 0.92rem;
}

.about a { color: var(--accent-dark); }

.site-footer {
  background: var(--ink);
  color: #c4ccd6;
  padding: 1.25rem 0;
  font-size: 0.85rem;
}

.site-footer p { margin: 0; }

.disclaimer {
  background: var(--warn-bg);
  border: 1px solid #e8b5ad;
  border-left: 4px solid var(--warn);
  color: var(--warn);
  padding: 0.75rem 1rem;
  border-radius: 5px;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.disclaimer strong { font-weight: 600; }
