/* Body Electric — design tokens from the Astrozon design system */
:root {
  --gold: #b8962e;
  --gold-dark: #97791f;
  --cream: #faf8f5;
  --cream-dark: #f3efe6;
  --brown: #1a1612;
  --brown-soft: #4a4238;
  --border: #e8e0d0;
  --muted: #8a8172;
  --danger: #a33;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--brown);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.nav-logo, .btn {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 { font-size: 2.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
h1 .accent { color: var(--gold); }

p { margin: 0 0 1.1rem; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header / Nav ── */
.site-header {
  background: #000;
  border-bottom: 1px solid #1c1c1c;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.nav-logo {
  font-size: 1.32rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
}
.nav-logo .logo-mark {
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.logo-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.05;
  font-weight: 700;
  white-space: nowrap;
}
.logo-wordmark .logo-the {
  font-size: 0.66em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-bottom: 0.1em;
}
.nav-links {
  display: flex;
  padding: 0.85rem 0;
  column-gap: 0.3rem;
  row-gap: 0.1rem;
  flex: 1;
  flex-wrap: wrap;
  align-content: center;
}
/* Separator dot between items. Adjacent-sibling only, so the first link of
   each row (which follows a full-width .nav-break) stays unbulleted. */
.nav-links a + a::before {
  content: "•";
  display: inline-block;
  margin-right: 0.3rem;
  color: var(--gold);
  font-weight: 700;
  opacity: 0.85;
}
/* Forces the three-row layout: Methods/Treatment/Devices, then
   Authors/Studies/Bibliography, then the rest. */
.nav-break { flex-basis: 100%; height: 0; }
.nav-links a {
  color: #dcd8d0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-menu {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}
.nav-side {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  margin: 0;
  background: #e8e4dc;
  transform: translateX(-50%);
  transition: top 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.open span:nth-child(1) { top: 21px; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 21px; transform: translateX(-50%) rotate(-45deg); }
.nav-user {
  position: relative;
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: #e8e4dc;
}
.user-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 50%;
  background: transparent;
  color: #f0ece4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.user-toggle:hover,
.nav-user.open .user-toggle { background: rgba(255,255,255,0.14); border-color: var(--gold); }
.user-initials {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.user-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  min-width: 190px;
  display: none;
  flex-direction: column;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}
.nav-user.open .user-menu { display: flex; }
.user-menu-name {
  padding: 0.45rem 0.7rem 0.5rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--brown-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu a,
.user-menu button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 4px;
  background: none;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown);
  text-decoration: none;
  cursor: pointer;
}
.user-menu a:hover,
.user-menu button:hover { background: var(--cream); color: var(--gold-dark); }
.user-menu .user-menu-primary { color: var(--gold-dark); }
.site-header .btn.ghost { color: #f0ece4; border-color: rgba(255,255,255,0.45); }
.site-header .btn.ghost:hover { background: rgba(255,255,255,0.12); }
.lang-switch,
.nav-user { align-self: center; }
.lang-switch {
  display: flex;
  gap: 0.35rem;
  font-family: var(--sans);
  font-size: 0.82rem;
}
.lang-switch a {
  color: #b8b2a6;
  text-decoration: none;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.lang-switch a.on { color: #fff; background: var(--gold); }

/* ── Hero ── */
.hero {
  background: linear-gradient(160deg, #fffdf9 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
  text-align: center;
}
.hero .eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--brown-soft);
  max-width: 640px;
  margin: 0 auto;
}
.hero-figure {
  margin: 2rem auto 0;
  text-align: center;
}
.hero-art {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 600px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(26,22,18,0.22);
}
.hero-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--brown-soft);
  opacity: 0.8;
}

/* ── Cards / grids ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.3rem 1.4rem;
  display: block;
  color: var(--brown);
  text-decoration: none !important;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 6px 18px rgba(26,22,18,0.07); transform: translateY(-2px); }
.card .icon { font-size: 1.8rem; }
.card h3 { margin: 0.5rem 0 0.35rem; font-size: 1.1rem; color: var(--brown); }
.card p { font-size: 0.95rem; color: var(--brown-soft); margin: 0; }
.card .more { display: inline-block; margin-top: 0.6rem; font-family: var(--sans); font-weight: 700; font-size: 0.82rem; color: var(--gold-dark); }

/* Authors overview */
.authors-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.author-card { display: flex; flex-direction: column; }
.author-monogram {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.author-card .author-role {
  margin: 0 0 0.55rem;
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--gold-dark);
}
.author-card .more { margin-top: auto; padding-top: 0.6rem; }

/* ── Content ── */
.content { padding: 2.5rem 0 4rem; }
.prose { max-width: 760px; margin: 0 auto; }
.prose img { max-width: 100%; border-radius: 8px; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.4rem 0;
  padding: 0.4rem 1.2rem;
  background: var(--cream-dark);
  color: var(--brown-soft);
  border-radius: 0 6px 6px 0;
}
.prose code {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--cream-dark);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.prose pre {
  background: #241f19;
  color: #f3efe6;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; }
.prose th { background: var(--cream-dark); font-family: var(--sans); }
.prose.devices table { table-layout: fixed; }
.prose.devices th:nth-child(1) { width: 18%; }
.prose.devices th:nth-child(2) { width: 10%; }
.prose.devices th:nth-child(3) { width: 10%; }
.prose.devices th:nth-child(4) { width: 19%; }
.prose.devices th:nth-child(5) { width: 14%; }
.prose.devices th:nth-child(6) { width: 13%; }
.prose.devices th:nth-child(7) { width: 16%; }
/* PEMF table uses a 6-column layout (no separate V/A columns) */
.prose.devices table.pemf-table th:nth-child(1) { width: 18%; }
.prose.devices table.pemf-table th:nth-child(2) { width: 22%; }
.prose.devices table.pemf-table th:nth-child(3) { width: 16%; }
.prose.devices table.pemf-table th:nth-child(4) { width: 16%; }
.prose.devices table.pemf-table th:nth-child(5) { width: 13%; }
.prose.devices table.pemf-table th:nth-child(6) { width: 15%; }
.prose.devices th, .prose.devices td { overflow-wrap: break-word; }
.prose.devices .device-thumb {
  display: block;
  width: 88px;
  max-width: 100%;
  margin-top: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.prose.devices .device-link { color: inherit; text-decoration: none; }
.prose.devices .device-link:hover { text-decoration: underline; }

/* Associations table: name / address / website / description */
.prose.orgs table.orgs-table { table-layout: fixed; }
.prose.orgs table.orgs-table th:nth-child(1) { width: 24%; }
.prose.orgs table.orgs-table th:nth-child(2) { width: 16%; }
/* Column 3 holds the actual domain as link text — it must not break mid-word. */
.prose.orgs table.orgs-table th:nth-child(3) { width: 25%; }
.prose.orgs table.orgs-table th:nth-child(4) { width: 35%; }
.prose.orgs table.orgs-table th:nth-child(3),
.prose.orgs table.orgs-table td:nth-child(3) { white-space: nowrap; overflow-wrap: normal; font-size: 0.88rem; }
.prose.orgs th, .prose.orgs td { overflow-wrap: break-word; }

/* Responsive card-flip: each table row becomes a labelled card on small screens */
@media (max-width: 1150px) {
  .nav-logo { font-size: 1.1rem; }
  .nav-links a { font-size: 0.78rem; }
  .nav-links { gap: 0.5rem 0.9rem; }
  /* Narrower table: shrink the domain column so long hosts still fit inline. */
  .prose.orgs table.orgs-table th:nth-child(3),
  .prose.orgs table.orgs-table td:nth-child(3) { font-size: 0.78rem; }
}

@media (max-width: 640px) {
  .prose.devices table { display: block; }
  .prose.devices thead { display: none; }
  .prose.devices tbody, .prose.devices tr { display: block; }
  .prose.devices tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.3rem 0;
  }
  .prose.devices td {
    display: block;
    position: relative;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.9rem 0.5rem 46%;
    text-align: right;
  }
  .prose.devices td:last-child { border-bottom: none; }
  .prose.devices td::before {
    position: absolute;
    left: 0.9rem;
    top: 0.55rem;
    width: 42%;
    text-align: left;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted);
  }
  /* First cell = card header (model name + thumbnail), no repeated label */
  .prose.devices td:nth-of-type(1) {
    padding: 0.7rem 0.9rem 0.6rem;
    text-align: left;
    font-family: var(--sans);
    font-weight: 700;
  }
  .prose.devices td:nth-of-type(2)::before { content: "V"; }
  .prose.devices td:nth-of-type(3)::before { content: "A"; }
  .prose.devices td:nth-of-type(4)::before { content: "Hz"; }
  .prose.devices td:nth-of-type(5)::before { content: "Manufacturer"; }
  .prose.devices td:nth-of-type(6)::before { content: "Price"; }
  .prose.devices td:nth-of-type(7)::before { content: "Approval / Evidence"; }
  /* PEMF table (6 columns): relabel the shifted cells */
  .prose.devices table.pemf-table td:nth-of-type(2)::before { content: "Hz"; }
  .prose.devices table.pemf-table td:nth-of-type(3)::before { content: "T"; }
  .prose.devices table.pemf-table td:nth-of-type(4)::before { content: "Manufacturer"; }
  .prose.devices table.pemf-table td:nth-of-type(5)::before { content: "Price"; }
  .prose.devices table.pemf-table td:nth-of-type(6)::before { content: "Approval / Evidence"; }
  /* Associations table (4 columns): stacked cards with labels */
  .prose.orgs table.orgs-table { display: block; }
  .prose.orgs thead { display: none; }
  .prose.orgs tbody, .prose.orgs tr { display: block; }
  .prose.orgs tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.3rem 0;
  }
  .prose.orgs td {
    display: block;
    position: relative;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.9rem 0.5rem 38%;
    text-align: right;
  }
  .prose.orgs td:last-child { border-bottom: none; }
  .prose.orgs td::before {
    position: absolute;
    left: 0.9rem;
    top: 0.55rem;
    width: 34%;
    text-align: left;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted);
  }
  .prose.orgs td:nth-of-type(1) {
    padding: 0.7rem 0.9rem 0.6rem;
    text-align: left;
    font-family: var(--sans);
    font-weight: 700;
  }
  .prose.orgs td:nth-of-type(2)::before { content: "Address"; }
  .prose.orgs td:nth-of-type(3)::before { content: "Website"; }
  .prose.orgs td:nth-of-type(4)::before { content: "Description"; }
  .prose.orgs.lang-de td:nth-of-type(2)::before { content: "Adresse"; }
  .prose.orgs.lang-de td:nth-of-type(4)::before { content: "Beschreibung"; }
}
.prose .note {
  background: #fdf6e8;
  border: 1px solid #eed9a8;
  border-radius: 8px;
  padding: 1rem 1.3rem;
  font-size: 0.95rem;
}
.prose .meta { color: var(--muted); font-size: 0.9rem; font-family: var(--sans); margin-top: 2rem; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn.ghost { background: transparent; color: var(--gold-dark); }
.btn.ghost:hover { background: var(--cream-dark); }
.btn.small { font-size: 0.82rem; padding: 0.4rem 0.85rem; }

/* ── Forms ── */
.form {
  max-width: 460px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem 2rem;
}
.form label { display: block; font-family: var(--sans); font-weight: 700; font-size: 0.88rem; margin: 1rem 0 0.3rem; }
.form input, .form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.form textarea { min-height: 140px; resize: vertical; }
.form .hint { font-size: 0.85rem; color: var(--muted); }
.form .error { color: var(--danger); font-family: var(--sans); font-size: 0.9rem; margin-top: 0.6rem; }
.form .ok { color: #2a7a2a; font-family: var(--sans); font-size: 0.9rem; margin-top: 0.6rem; }
.form button[type="submit"] { margin-top: 1.3rem; width: 100%; }

/* ── Forum ── */
.forum-list { display: flex; flex-direction: column; gap: 0.75rem; }
.forum-cat {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.3rem; display: flex; justify-content: space-between; align-items: center;
  color: var(--brown); text-decoration: none !important;
}
.forum-cat:hover { border-color: var(--gold); }
.forum-cat .name { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; }
.forum-cat .count { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.thread-row {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.3rem; margin-bottom: 0.7rem;
}
.thread-row a.title { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; color: var(--brown); }
.thread-row .sub { font-size: 0.85rem; color: var(--muted); font-family: var(--sans); }
.post {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 1.2rem 1.4rem; margin: 1rem 0;
}
.post .post-head { display: flex; justify-content: space-between; font-family: var(--sans); font-size: 0.88rem; color: var(--muted); margin-bottom: 0.5rem; }
.post .post-head .author { font-weight: 700; color: var(--brown); }
.post.deleted { opacity: 0.5; font-style: italic; }
.i18n-flag { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0.05rem 0.4rem; margin-left: 0.4rem; }


/* ── Changelog ── */
.changelog { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.changelog li {
  border-left: 2px solid var(--gold);
  padding: 0 0 0 1.1rem;
  margin: 0 0 1.6rem;
}
.changelog-meta {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
}
.changelog-kind {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--gold);
}
.changelog h2 { margin: 0.2rem 0 0.3rem; font-size: 1.15rem; }
.changelog h2 a { color: var(--brown); text-decoration: none; }
.changelog h2 a:hover { color: var(--gold); }
.changelog p { margin: 0; color: var(--brown-soft); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid #1c1c1c;
  background: #2e2e2e;
  padding: 1.6rem 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: #cfcabf;
}
.site-footer a { color: #e8e0d0; margin: 0 0.6rem; }
.site-footer a:hover { color: var(--gold); }
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}
.footer-links { text-align: center; white-space: nowrap; }
.footer-disclaimer { margin: 0.9rem auto 0; max-width: 760px; padding: 0 1.25rem; opacity: 0.75; }
.footer-copy { margin: 0.35rem 0 0; font-size: 0.75rem; letter-spacing: 0.04em; color: #a8a29a; }

/* Newsletter/updates CTA — deliberately quiet, sits below the fold */
.subscribe-form { max-width: 420px; }
.subscribe-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.3rem;
}
.subscribe-intro { margin: 0 0 0.7rem; color: #b9b4a9; font-size: 0.82rem; line-height: 1.45; }
.subscribe-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.subscribe-row input:not(.subscribe-hp) {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  background: #232323;
  color: #f0ece4;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.subscribe-row input:not(.subscribe-hp):focus { outline: none; border-color: var(--gold); }
.subscribe-row input[name="name"] { flex: 0 1 30%; }
.subscribe-row input[name="email"] { min-width: 200px; }
.subscribe-row button {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.subscribe-row button:hover { background: var(--gold); color: #1a1612; }
.subscribe-row button:disabled { opacity: 0.5; cursor: default; }
.subscribe-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.subscribe-note { margin: 0.55rem 0 0; font-size: 0.72rem; color: #9b968c; line-height: 1.45; }
.subscribe-note a { color: #cfcabf; margin: 0; text-decoration: underline; }
.subscribe-status { margin: 0.4rem 0 0; font-size: 0.78rem; min-height: 1em; }
.subscribe-status.ok { color: #9fd39f; }
.subscribe-status.err { color: #e59a8f; }

/* Newsletter band above the footer (home page) */
.newsletter-band {
  background: linear-gradient(160deg, #fffdf9 0%, var(--cream) 100%);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}
.newsletter-inner { max-width: 720px; margin: 0 auto; padding: 0 1.25rem; }
.newsletter-heading { margin: 0 0 0.4rem; font-size: 1.55rem; }
.newsletter-lead { margin: 0 0 1.1rem; font-size: 1.05rem; color: var(--brown-soft); }
.newsletter-points { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.newsletter-points li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.55;
}
.newsletter-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 700;
}
.subscribe-form-band { max-width: none; }
.subscribe-form-band .subscribe-row { gap: 0.5rem; }
.subscribe-form-band .subscribe-row input:not(.subscribe-hp) {
  padding: 0.7rem 0.8rem;
  border-color: var(--border);
  background: #fff;
  color: var(--brown);
  font-size: 0.95rem;
}
.subscribe-form-band .subscribe-row button {
  padding: 0.7rem 1.3rem;
  background: var(--gold);
  color: #fff;
  font-size: 0.9rem;
}
.subscribe-form-band .subscribe-row button:hover { background: #a0831f; color: #fff; }
.subscribe-form-band .subscribe-note { color: var(--muted); }
.subscribe-form-band .subscribe-note a { color: var(--brown); }
.subscribe-form-band .subscribe-status.ok { color: #2f7d32; }
.subscribe-form-band .subscribe-status.err { color: #a8322a; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Mobile navigation ── */
@media (max-width: 1000px) {
  .nav { gap: 0.6rem; padding: 0.5rem 1rem; }
  .nav-logo { flex: 1 1 auto; font-size: 1.15rem; }
  .nav-logo .logo-mark { width: 64px; height: 64px; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid #1c1c1c;
    padding: 0.3rem 0 0.9rem;
  }
  .nav-menu.open { display: flex; }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.3rem 0;
  }
  .nav-break { display: none; }
  .nav-links a + a::before { content: none; }
  .nav-links a {
    display: block;
    padding: 0.65rem 0.15rem;
    font-size: 0.88rem;
    border-bottom: 1px solid #1c1c1c;
  }
  .nav-side {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 0.9rem;
  }
  .nav-side .nav-user { justify-content: flex-start; flex-wrap: wrap; align-self: stretch; flex-direction: column; align-items: flex-start; }
  /* Inside the mobile menu the dropdown sits inline instead of floating. */
  .nav-side .user-menu {
    position: static;
    right: auto;
    margin-top: 0.5rem;
    min-width: 0;
    width: 100%;
    box-shadow: none;
  }
  .nav-side .lang-switch { align-self: flex-start; }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    text-align: center;
  }
  .footer-links { text-align: center; white-space: normal; }
  .subscribe-form { max-width: none; }
  .subscribe-row { flex-direction: column; }
  .subscribe-row input:not(.subscribe-hp),
  .subscribe-row button { width: 100%; flex: 1 1 100%; }
  .newsletter-band { padding: 2.2rem 0; }
}

/* Compact footer on wide screens: minimal height, the sign-up texts each on a
   single line, and the button immediately right of the email field. Below
   1290px the regular (and, under 1000px, stacked) footer applies. */
@media (min-width: 1290px) {
  .site-footer { padding: 0.8rem 0; }
  .footer-disclaimer { margin: 0.5rem auto 0; white-space: nowrap; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  .nav-links { gap: 0; }
}

/* ── Bibliography (literature table) ── */
.prose.bibliography { max-width: 980px; }
.lit-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lit-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1.2rem 0; }
.lit-table thead th {
  text-align: left; padding: 0.6rem 0.8rem; border: none;
  border-bottom: 2px solid var(--gold); background: none;
  color: var(--gold); font-family: var(--sans); font-weight: 700; white-space: nowrap;
}
.lit-table tbody td { padding: 0.6rem 0.8rem; border: none; border-bottom: 1px solid var(--border); vertical-align: top; }
.lit-row { cursor: pointer; transition: background 0.15s; }
.lit-row:hover { background: rgba(184, 150, 46, 0.08); }
.lit-chevron { display: inline-block; font-size: 0.7rem; margin-right: 0.5rem; color: var(--gold); transition: transform 0.2s; }
.lit-chevron-open { transform: rotate(90deg); }
.lit-table td:nth-child(3), .lit-table td:nth-child(5) { white-space: nowrap; }
.lit-detail td { padding: 0 !important; border: none; border-bottom: 1px solid var(--border); }
.lit-detail-inner { padding: 0.8rem 1.5rem 1.2rem 2rem; background: var(--cream-dark); line-height: 1.6; font-size: 0.9rem; }
.lit-detail-section { margin-bottom: 0.8rem; }
.lit-detail-section:last-child { margin-bottom: 0; }
.lit-detail-label {
  font-family: var(--sans); font-weight: 700; color: var(--gold);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem;
}
.lit-links { display: flex; gap: 1rem; }
.lit-links a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold); }
.lit-links a:hover { opacity: 0.7; }
.lit-pdf-link { color: var(--gold); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); margin-left: 0.3rem; }
.lit-pdf-link:hover { opacity: 0.7; }
.lit-isbn { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; margin-left: 0.4rem; }
.lit-cover-wrap { float: right; margin: 0 0 0.8rem 1rem; }
.lit-cover-thumb { width: 64px; height: auto; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; transition: box-shadow 0.2s; }
.lit-cover-thumb:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.cover-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9999; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cover-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
@media (max-width: 640px) {
  .lit-table { font-size: 0.85rem; }
  .lit-table thead th, .lit-table tbody td { padding: 0.4rem 0.5rem; }
  .lit-detail-inner { padding: 0.6rem 0.8rem 1rem 1.2rem; }
}

/* ── Sitemap (hierarchical overview) ── */
.sitemap { max-width: 760px; margin: 0 auto; }
.sitemap ul { list-style: none; margin: 0; padding: 0; }
.sitemap li { margin: 0.4rem 0; }
.sitemap > ul > li { margin: 0.7rem 0; }
.sitemap a { font-family: var(--sans); color: var(--brown); text-decoration: none; }
.sitemap a:hover { color: var(--gold-dark); text-decoration: underline; }
.sitemap > ul > li > a { font-weight: 700; font-size: 1.05rem; }
.sitemap ul ul {
  margin: 0.4rem 0 0.6rem 1.4rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--border);
}
.sitemap ul ul a { font-weight: 400; font-size: 0.95rem; color: var(--brown-soft); }
.sitemap .count { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }

/* ── Treatment finder ── */
.treatment-search {
  display: flex; gap: 0.6rem; max-width: 640px; margin: 1.6rem auto 0;
}
.treatment-search input {
  flex: 1; font-family: var(--sans); font-size: 1rem;
  padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; color: var(--brown);
}
.treatment-search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.treatment-count { text-align: center; font-family: var(--sans); color: var(--brown-soft); margin: 0 0 1.4rem; }

.treatment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
.treatment-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.8rem;
}
.treatment-card header h2 { margin: 0; font-size: 1.2rem; color: var(--brown); }
.treatment-card .summary { margin: 0.35rem 0 0; font-size: 0.92rem; color: var(--brown-soft); }
.treatment-fields { margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.treatment-fields > div { border-top: 1px solid var(--border); padding-top: 0.6rem; }
.treatment-fields dt {
  font-family: var(--sans); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold);
}
.treatment-fields dd { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--brown); }
.treatment-fields .device-list, .treatment-fields .study-list { margin: 0; padding-left: 1.1rem; }
.treatment-fields .device-list li, .treatment-fields .study-list li { margin: 0.15rem 0; }
.treatment-fields a { color: var(--gold-dark); }
.evidence { margin: 0; font-size: 0.9rem; color: var(--brown-soft); }
.evidence strong { color: var(--brown); }
.caution {
  margin: 0; font-size: 0.88rem; color: var(--danger);
  background: var(--cream-dark); border-radius: 6px; padding: 0.6rem 0.8rem;
}

@media (max-width: 640px) {
  .treatment-search { flex-direction: column; }
  .treatment-grid { grid-template-columns: 1fr; }
}

/* ── Newsletter pop-up (slides up from the bottom after 60 s) ──
   Appended last so these rules win over the generic .subscribe-* blocks. */
.nl-popup {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: #2e2e2e;
  color: #e8e4dc;
  border-top: 2px solid var(--gold);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.25);
  transform: translateY(110%);
  transition: transform 0.35s ease;
  padding: 0.9rem 1.1rem calc(0.9rem + env(safe-area-inset-bottom));
}
.nl-popup.is-open { transform: translateY(0); }
.nl-popup-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.nl-popup-body { flex: 1 1 auto; min-width: 0; }
.nl-popup .subscribe-form { max-width: none; }
.nl-popup .subscribe-title { margin: 0 0 0.15rem; font-size: 0.95rem; white-space: normal; }
.nl-popup .subscribe-intro { margin: 0 0 0.55rem; font-size: 0.8rem; white-space: normal; }
.nl-popup .subscribe-row { flex-wrap: nowrap; flex-direction: row; }
.nl-popup .subscribe-row input[name="name"] { flex: 0 1 22%; width: auto; }
.nl-popup .subscribe-row input[name="email"] { flex: 1 1 auto; width: auto; min-width: 140px; }
.nl-popup .subscribe-row button {
  flex: 0 0 auto;
  width: auto;
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1612;
}
.nl-popup .subscribe-row button:hover { background: #d0ac3e; border-color: #d0ac3e; color: #1a1612; }
.nl-popup .subscribe-note { margin: 0.45rem 0 0; font-size: 0.68rem; white-space: normal; }
.nl-popup .subscribe-status { margin: 0.3rem 0 0; }
.nl-popup-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-top: -0.15rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9b968c;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.nl-popup-close:hover { color: #faf8f5; }

@media (max-width: 1000px) {
  .nl-popup .subscribe-row { flex-wrap: wrap; }
  .nl-popup .subscribe-row input[name="name"] { flex: 1 1 100%; }
  .nl-popup .subscribe-row input[name="email"] { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .nl-popup { padding: 0.8rem 0.9rem calc(0.8rem + env(safe-area-inset-bottom)); }
  .nl-popup .subscribe-intro { display: none; }
  .nl-popup .subscribe-row input:not(.subscribe-hp) { font-size: 16px; } /* no iOS zoom */
}
