/* HealthChek — single stylesheet. Typography + layout only. No frameworks. */

:root {
  --text: #1a1a1a;
  --muted: #555555;
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --border: #dcdfe3;
  --link: #0b5fae;
  --link-visited: #5a3ea1;
  --max-width: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

header nav a {
  margin-left: 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

header nav a:first-child { margin-left: 0; }

header nav a:hover,
header nav a:focus {
  text-decoration: underline;
}

/* Main content */
main {
  padding: 28px 0 48px;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 14px;
}

h2 {
  font-size: 1.35rem;
  margin: 32px 0 10px;
}

h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
}

p { margin: 0 0 16px; }

.lead {
  font-size: 1.05rem;
  color: var(--muted);
}

a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

ul, ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li { margin-bottom: 6px; }

.plain-list, .article-list {
  list-style: none;
  padding-left: 0;
}

.article-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.article-list li:first-child { padding-top: 0; }

.article-list a {
  font-weight: 600;
  text-decoration: none;
}

.article-list a:hover { text-decoration: underline; }

.article-list p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumbs a { color: var(--muted); }

/* Quick answer box */
.quick-answer {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--link);
  padding: 14px 18px;
  margin: 0 0 20px;
}

.quick-answer h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quick-answer p:last-child { margin-bottom: 0; }

/* Table of contents */
.toc {
  border: 1px solid var(--border);
  padding: 14px 18px;
  margin: 0 0 24px;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  columns: 1;
}

.toc li { margin-bottom: 4px; }

.toc .toc-h3 { padding-left: 16px; font-size: 0.92rem; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

th { background: var(--bg-alt); }

/* FAQ / summary / related */
.faq h3 { margin-top: 22px; }

.summary, .related {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.meta-line {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 24px;
}

/* Ad slots (inert until ADSENSE_CLIENT_ID is configured) */
.ad-slot {
  margin: 24px 0;
  text-align: center;
}

.ad-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Consent banner */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--text);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.consent-banner p {
  margin: 0;
  font-size: 0.88rem;
  max-width: 640px;
}

.consent-banner a { color: #fff; text-decoration: underline; }

.consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.consent-actions .btn-secondary {
  background: transparent;
  border: 1px solid #fff;
}

/* Search form */
form[role="search"] {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

form[role="search"] label { display: none; }

input[type="search"], input[type="text"], input[type="password"], textarea, select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  flex: 1 1 260px;
}

button, input[type="submit"] {
  font: inherit;
  padding: 8px 16px;
  background: var(--link);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

button:hover { background: #094a87; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  font-size: 0.95rem;
}

/* Images */
img { max-width: 100%; height: auto; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 20px;
}

footer nav a {
  margin-left: 14px;
  color: var(--muted);
}

footer nav a:first-child { margin-left: 0; }

/* Mobile */
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.2rem; }
  .header-inner, .footer-inner { flex-direction: column; align-items: flex-start; }
  header nav a { margin-left: 0; margin-right: 14px; }
}

/* Contact form */
.contact-form { max-width: 560px; margin-top: 1.5rem; }
.form-group { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.form-group label { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
.form-group input,
.form-group textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--link); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  background: var(--link);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 24px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-submit:hover { background: #0a4f93; }
.contact-notice {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.contact-success { background: #eaf7ee; border: 1px solid #a3d9af; color: #1e6630; }
.contact-error   { background: #fdf2f2; border: 1px solid #f5c6cb; color: #721c24; }
.contact-errors  { color: #721c24; background: #fdf2f2; border: 1px solid #f5c6cb; border-radius: 4px; padding: 10px 10px 10px 28px; margin-bottom: 1rem; }
