/* fenbivermenb.org — calm medical research site */
:root {
  --bg: #f6f8f6;
  --surface: #ffffff;
  --ink: #1a2420;
  --muted: #4a5c54;
  --line: #d5e0da;
  --teal: #0d6b5c;
  --teal-dark: #084c42;
  --teal-soft: #e6f3ef;
  --amber: #8a5a00;
  --amber-bg: #fff6e5;
  --red-soft: #fdecea;
  --red: #8b1e1e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 40, 32, 0.07);
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #eef5f2 0%, var(--bg) 220px);
  line-height: 1.65;
}

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0; flex-wrap: wrap;
}
.header-right {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-left: auto;
}
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.15rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.15rem 0.3rem; background: var(--surface);
}
.lang-switch a {
  text-decoration: none;
  padding: 0.2rem 0.35rem; border-radius: 999px;
  line-height: 1; font-size: 1.15rem;
  opacity: 0.72;
}
.lang-switch a:hover { opacity: 1; background: var(--teal-soft); }
.lang-switch a[aria-current="true"] {
  opacity: 1; background: var(--teal-soft);
  box-shadow: inset 0 0 0 1.5px var(--teal);
}
.lang-switch .flag { font-size: 1.15rem; margin: 0; }
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  color: inherit; text-decoration: none; font-weight: 700;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(145deg, var(--teal), #1a9a82);
  color: #fff; display: grid; place-items: center; font-size: 0.75rem; letter-spacing: -0.03em;
}
.brand span { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }
nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 600;
  padding: 0.25rem 0.15rem;
}
nav a:hover, nav a[aria-current="page"] { color: var(--teal-dark); }

/* Subnav (Husdjur section) */
.subnav {
  background: var(--teal-soft);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
}
.subnav-inner {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  align-items: center;
}
.subnav .label {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--teal-dark); margin-right: 0.3rem;
}
.subnav a {
  color: var(--teal-dark); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 0.2rem 0.55rem; border-radius: 999px;
}
.subnav a:hover, .subnav a[aria-current="page"] {
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Hero */
.hero { padding: 2.4rem 0 1.4rem; }
.hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  line-height: 1.2; margin: 0 0 0.8rem; letter-spacing: -0.02em;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.72rem 1.1rem; border-radius: 999px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; font-size: 0.95rem;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--teal-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }

/* Cards & sections */
section { padding: 1.4rem 0; }
.section-title { margin: 0 0 0.4rem; font-size: 1.45rem; }
.section-sub { margin: 0 0 1.1rem; color: var(--muted); }

.grid-3 {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.15rem 1.2rem; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.card p { margin: 0 0 0.8rem; color: var(--muted); }
.card .meta { font-size: 0.85rem; color: var(--teal-dark); font-weight: 700; }

/* Callouts */
.callout {
  border-radius: var(--radius); padding: 1rem 1.15rem; margin: 1rem 0;
  border: 1px solid var(--line); background: var(--surface);
}
.callout strong { display: block; margin-bottom: 0.25rem; }
.callout-warn { background: var(--amber-bg); border-color: #f0d39a; color: #3d2c00; }
.callout-danger { background: var(--red-soft); border-color: #f0c2c2; color: var(--red); }
.callout-info { background: var(--teal-soft); border-color: #b7ddd3; }

/* Evidence badges */
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.02em; padding: 0.18rem 0.5rem; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal-dark); margin-right: 0.35rem;
}
.badge-A { background: #e7f7ea; color: #14532d; }
.badge-B { background: #e8f0fe; color: #1e3a8a; }
.badge-C { background: #f3e8ff; color: #5b21b6; }
.badge-D { background: #f1f5f9; color: #334155; }
.badge-E { background: #fff7ed; color: #9a3412; }
.badge-R { background: #ecfeff; color: #155e75; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f6f3; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* Source list */
.source-list { list-style: none; padding: 0; margin: 0; }
.source-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.9rem 1rem; margin-bottom: 0.65rem;
}
.source-list .title { font-weight: 700; margin-bottom: 0.2rem; }
.source-list .orig { font-style: italic; color: var(--muted); font-size: 0.92rem; }
.source-list .links { margin-top: 0.35rem; font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Content pages */
.page-hero { padding: 1.8rem 0 0.6rem; }
.page-hero h1 { margin: 0 0 0.5rem; font-size: clamp(1.55rem, 3vw, 2.1rem); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.8rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.3rem; font-size: 1.08rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose ol { padding-left: 1.3rem; }
.prose ol li { margin-bottom: 0.45rem; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1rem 0; }
.steps li {
  position: relative; padding: 1rem 1rem 1rem 3.2rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 0.7rem;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0.85rem; top: 1rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 0.85rem;
  display: grid; place-items: center;
}

/* Footer */
.site-footer {
  margin-top: 2.5rem; border-top: 1px solid var(--line);
  background: #0f1f1b; color: #d7e6e0; padding: 2rem 0 1.4rem;
}
.site-footer a { color: #9fd9c8; }
.footer-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 1.2rem;
}
.site-footer h4 { margin: 0 0 0.45rem; color: #fff; font-size: 0.95rem; }
.site-footer p, .site-footer li { color: #b7c9c2; font-size: 0.92rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.3rem; }
.footer-note { font-size: 0.85rem; border-top: 1px solid #274039; padding-top: 1rem; color: #93a8a0; }

/* Utilities */
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 0; }
.chip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.85rem; font-weight: 600;
}

@media (max-width: 640px) {
  .header-inner { align-items: flex-start; }
  nav { width: 100%; }
}
