/* Welcome page: the Start Here box and the Companion Handbooks cards.
   Identical in all four handbooks. Each book sets its colors through a
   book-* class, so one file serves every Welcome page in light and dark mode. */

.book-physician {
  --hb-accent: #0fb5ba;
  --hb-ink: #0a2540;
  --hb-tint: #f0fdfa;
}
.book-publichealth {
  --hb-accent: #2563eb;
  --hb-ink: #1e40af;
  --hb-tint: #eff6ff;
}
.book-biosecurity {
  --hb-accent: #c9a961;
  --hb-ink: #824d0f;
  --hb-tint: #fef9f3;
}
.book-lifesciences {
  --hb-accent: #15803d;
  --hb-ink: #14532d;
  --hb-tint: #f0fdf4;
}

body.quarto-dark .book-physician {
  --hb-accent: #2dd4bf;
  --hb-ink: #5eead4;
  --hb-tint: rgba(15, 181, 186, 0.1);
}
body.quarto-dark .book-publichealth {
  --hb-accent: #60a5fa;
  --hb-ink: #93c5fd;
  --hb-tint: rgba(37, 99, 235, 0.14);
}
body.quarto-dark .book-biosecurity {
  --hb-accent: #c9a961;
  --hb-ink: #e3c88e;
  --hb-tint: rgba(201, 169, 97, 0.12);
}
body.quarto-dark .book-lifesciences {
  --hb-accent: #22c55e;
  --hb-ink: #86efac;
  --hb-tint: rgba(21, 128, 61, 0.16);
}

/* Start Here: the book's own reading path, the strongest box on the page. */
.start-here-box {
  border: 2px solid var(--hb-accent);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 1rem 0 2rem 0;
  background-color: var(--hb-tint);
  color: #334155;
}
.start-here-box .start-here-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1rem 0;
}
.start-here-box ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 1.05rem;
  line-height: 2;
}
.start-here-box .start-here-next {
  font-size: 0.95rem;
  margin: 1rem 0 0 0;
  color: #64748b;
}
body.quarto-dark .start-here-box {
  color: #e2e8f0;
}
body.quarto-dark .start-here-box .start-here-next {
  color: #a1a1aa;
}

/* Companion Handbooks: quieter cards, three across when they fit. */
.companion-handbooks {
  container-type: inline-size;
  margin: 1rem 0 2rem 0;
}
.companion-handbook-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@container (min-width: 540px) {
  .companion-handbook-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Each card keeps its book's own border and tinted background. */
.companion-card {
  position: relative;
  border: 2px solid var(--hb-accent);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  background-color: var(--hb-tint);
  transition: box-shadow 0.15s ease;
}
.companion-card:hover {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}
.companion-card:focus-within {
  outline: 2px solid var(--hb-accent);
  outline-offset: 2px;
}
.companion-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}
.companion-card h3 a {
  color: var(--hb-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--hb-accent);
  padding-bottom: 2px;
}
.companion-card h3 a:focus {
  outline: none;
}
/* Quarto's heading anchor would be a second, hidden link in the card. */
.companion-card .anchorjs-link {
  display: none;
}
/* One link per card: the title link covers the whole card. */
.companion-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
}
.companion-card .companion-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 0.4rem 0;
  color: #1e293b;
}
.companion-card .companion-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: #475569;
}
body.quarto-dark .companion-card .companion-subtitle {
  color: #e2e8f0;
}
body.quarto-dark .companion-card .companion-tagline {
  color: #a1a1aa;
}

@media (max-width: 575.98px) {
  .start-here-box {
    padding: 1.25rem 1.25rem;
  }
}
