/*
 * Shared additions, 2026-11-10. Loaded on every page after the consent manager's stylesheet.
 *  1. Cookie prompt on phones: a compact bar instead of a panel over half the screen.
 *  2. The hero shown to visitors who arrive from an ad (index.html swaps it in, see td-ads.js adVariant).
 *  3. The sample report page (sample-report.html).
 */

/* ---------- 1. Cookie prompt on phones ---------- */
@media (max-width: 600px) {
  #stcm-wrapper #stcm-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    top: auto;
    width: auto;
    max-width: none;
    padding: 12px 14px 8px;
    border-radius: 14px;
  }
  #stcm-wrapper #stcm-banner p {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 10px;
  }
  #stcm-wrapper #stcm-banner p a {
    display: inline;
    padding: 0;
    min-height: 0;
  }
  #stcm-wrapper #stcm-banner .stcm-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
  }
  #stcm-wrapper #stcm-banner .stcm-accept-all,
  #stcm-wrapper #stcm-banner .stcm-reject-all {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    min-height: 0;
    height: auto;
    padding: 10px 6px;
    font-size: 13px;
    line-height: 1.25;
  }
  #stcm-wrapper #stcm-banner .stcm-actions-row {
    flex: 0 0 100%;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
    height: 26px;
    margin: 0;
  }
  #stcm-wrapper #stcm-banner .stcm-preferences-button {
    padding: 0;
    min-height: 0;
    height: 26px;
    font-size: 12px;
  }
  #stcm-wrapper #stcm-banner .stcm-logo {
    width: 26px;
    height: 26px;
    min-height: 0;
  }
  #stcm-wrapper #stcm-banner .stcm-logo svg {
    width: 16px;
    height: 16px;
  }
  /* The round icon that reopens the preferences: smaller, so it does not sit on the text. */
  #stcm-wrapper #stcm-icon {
    width: 38px;
    height: 38px;
    left: 8px;
    bottom: 8px;
    opacity: 0.85;
  }
  #stcm-wrapper #stcm-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* ---------- 2. Hero for ad visitors ---------- */
.hero.td-ad-hero {
  padding: 4.5rem 0 5rem;
}
.td-ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.25rem;
}
.td-ad-actions a.td-btn,
.sr-actions a.td-btn {
  flex: 1 1 210px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.td-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.td-btn-primary {
  background-color: #FF6600;
  border: 2px solid #FF6600;
  color: #fff;
}
.td-btn-wa {
  background-color: #fff;
  border: 2px solid #25D366;
  color: #0B7A46;
}
.td-btn-wa svg {
  flex: none;
}
.td-btn-plain {
  background-color: #fff;
  border: 2px solid #CBD5E1;
  color: #0F172A;
}
.td-ad-note {
  margin-top: 1rem;
  font-size: 0.98rem;
  color: #334155;
}
.hero-content p.td-ad-note {
  font-size: 0.98rem;
  margin-bottom: 0;
}
.td-ad-note a {
  color: #FF6600;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .hero.td-ad-hero {
    padding: 1.4rem 0 2.5rem;
  }
  .td-ad-hero .hero-grid {
    gap: 1.75rem;
  }
  .td-ad-hero .hero-content h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.7rem;
  }
  .td-ad-hero .hero-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
  }
  .td-ad-actions {
    flex-direction: column;
    gap: 0.65rem;
  }
  .td-ad-actions a.td-btn {
    flex: none;
    padding: 0.85rem 1rem;
  }
}

/* ---------- 3. Sample report page ---------- */
.sr-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.25rem 1.1rem 4rem;
  color: #334155;
  line-height: 1.6;
}
.sr-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FF6600;
  margin-bottom: 0.5rem;
}
.sr-wrap > h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.75rem;
}
.sr-lead {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.sr-sample-note {
  font-size: 0.92rem;
  color: #64748B;
  margin-bottom: 1.25rem;
}
.sr-wrap > h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0F172A;
  margin: 2.25rem 0 0.85rem;
}
.sr-wrap > p {
  margin-bottom: 0.8rem;
}
/* The report, framed as the email it arrives in. */
.sr-mail {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin: 0 0 1.5rem;
}
.sr-mail-bar {
  background: #F1F5F9;
  border-bottom: 1px solid #E2E8F0;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #475569;
}
.sr-mail-bar strong {
  color: #0F172A;
}
/* Inside the frame the markup and inline styles are the email's own (see tools/make-sample-report.py).
   The rules below only give back the browser defaults an email client applies and the site's reset removes. */
.sr-report {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  font-size: 16px;
}
.sr-report h2 {
  font-size: 1.5em;
  font-weight: bold;
  line-height: 1.3;
  margin: 0.83em 0;
}
.sr-report h3 {
  font-size: 1.17em;
  font-weight: bold;
  line-height: 1.4;
}
.sr-report p {
  margin: 1em 0;
}
.sr-report strong {
  font-weight: bold;
}
.sr-report em {
  font-style: italic;
}
.sr-report table {
  font-size: inherit;
}
.sr-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.sr-cta {
  margin-top: 2.5rem;
  background: #0F172A;
  color: #E2E8F0;
  border-color: #0F172A;
  text-align: center;
  padding: 1.75rem 1.25rem;
}
.sr-cta h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.4rem;
}
.sr-cta p {
  margin: 0 0 1.1rem;
}
.sr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.sr-inline-actions {
  margin-top: 1.25rem;
}
.sr-cta .sr-foot {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: #94A3B8;
}
.sr-cta .sr-foot a {
  color: #FDBA74;
}
@media (max-width: 640px) {
  .sr-wrap {
    padding: 1.4rem 0.7rem 3rem;
  }
  .sr-wrap > h1 {
    font-size: 1.7rem;
  }
  .sr-lead {
    font-size: 1.02rem;
  }
  /* On a phone the email's two nested 20px paddings and 10px cells leave no room for the table. */
  .sr-report {
    font-size: 13.5px;
  }
  .sr-report > div {
    padding: 10px !important;
  }
  .sr-report > div > div[style*="max-width:1200px"] {
    padding: 0 !important;
  }
  .sr-report td,
  .sr-report th {
    padding: 8px 5px !important;
  }
  .sr-report table table td {
    padding: 8px 2px !important;
  }
  .sr-actions a.td-btn {
    flex: 1 1 100%;
  }
}

/* ---------- 4. Homepage on phones: the contact block must not be wider than the screen ---------- */
@media (max-width: 768px) {
  .contact-grid > * {
    min-width: 0;
  }
  .contact-image .td-calendly-inline {
    min-width: 0 !important;
    max-width: 100%;
  }
  /* Long words in headings (German) must break instead of widening the page. */
  h1,
  h2,
  h3 {
    overflow-wrap: anywhere;
  }
  html[lang="de"] h1,
  html[lang="de"] h2,
  html[lang="de"] h3 {
    hyphens: auto;
  }
}
