:root {
    --teal: #006666;
    --light-gray: #E0E0E0;
    --white: #FFFFFF;
    --dark: #333333;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

/* Peptide Hub tools: restrained utility styling, using the site's existing teal system. */
.tool-kicker { display:block; text-transform:uppercase; letter-spacing:.12em; font-size:.72rem; font-weight:700; opacity:.8; margin-bottom:.65rem; }
.tool-card { border-top:4px solid var(--teal) !important; }
.tool-card:hover { transform:translateY(-5px); }
.tool-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:12px; color:var(--teal); background:rgba(0,102,102,.1); font-size:1.25rem; }
.tool-shell { max-width:920px; margin:0 auto; }
.tool-shell .card { border-radius:12px; }
.chart-wrap { position:relative; min-height:320px; }
.result-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1px; background:#e5e7eb; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; }
.result-grid > div { background:#fff; padding:1rem; }
.result-grid span { display:block; color:#6b7280; font-size:.8rem; margin-bottom:.25rem; }
.result-grid strong { color:#0d1b2a; font-size:1.05rem; }
.tool-callout { background:#d1fae5; border-left:4px solid var(--teal); color:#174d40; padding:1rem; border-radius:6px; font-size:.9rem; }
.quick-picks { display:flex; flex-wrap:wrap; gap:.5rem; }
.quick-picks .active { background:var(--teal); color:#fff; }
.option-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin-top:1.5rem; }
.option-card { text-align:left; border:1px solid #d8e1df; background:#fff; border-radius:10px; padding:1.15rem; min-height:112px; color:var(--dark); transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.option-card:hover,.option-card:focus { border-color:var(--teal); box-shadow:0 5px 16px rgba(0,102,102,.13); transform:translateY(-2px); outline:0; }
.option-card.selected { border-color:var(--teal); background:rgba(0,102,102,.08); box-shadow:0 0 0 2px rgba(0,102,102,.16); }
.option-card strong,.option-card span { display:block; }
.option-card span { color:#6b7280; font-size:.9rem; margin-top:.45rem; line-height:1.4; }
.stack-card { border-left:3px solid var(--teal); }
.tool-progress { color:var(--teal); font-size:.78rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; margin-bottom:1rem; }
.share-action { border:0; background:transparent; color:#6b7280; padding:0; font-size:.82rem; }
.share-action:hover,.share-action:focus { color:var(--teal); text-decoration:underline; }
.share-action-light { color:rgba(255,255,255,.75); }
.share-action-light:hover,.share-action-light:focus { color:#fff; }

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    background-color: var(--light-gray);
    line-height: 1.6;
}

.text-teal {
    color: var(--teal) !important;
}

.bg-teal {
    background-color: var(--teal) !important;
}

.btn-teal {
    background-color: var(--teal);
    color: white;
    border: none;
}

.btn-teal:hover {
    background-color: #005555;
    color: white;
}

.border-teal {
    border-color: var(--teal) !important;
}

.btn-outline-teal {
    color: var(--teal);
    border-color: var(--teal);
    background: transparent;
}

.btn-outline-teal:hover {
    background-color: var(--teal);
    color: white;
}

.bg-teal-light {
    background-color: rgba(0, 102, 102, 0.1) !important;
}

.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-toggler {
    border-color: rgba(0, 102, 102, 0.35);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 102, 0.2);
}

.navbar-toggler-icon {
    background-image:
        linear-gradient(var(--teal), var(--teal)),
        linear-gradient(var(--teal), var(--teal)),
        linear-gradient(var(--teal), var(--teal));
    background-position: center top, center center, center bottom;
    background-repeat: no-repeat;
    background-size: 100% 2px, 100% 2px, 100% 2px;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--teal) !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--teal) !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--teal) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--teal);
}

.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 76px;
}

.hero-section {
    background: #000;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 0;
}

.hero-section .container {
    z-index: 1;
}

.hero-section h1,
.hero-section p,
.hero-section .btn {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .hero-video,
    video.hero-bg,
    #hero-video,
    .hero-section video {
        display: none !important;
    }

    .hero-section,
    section.hero,
    .hero {
        background-image:
            linear-gradient(rgba(0, 16, 22, 0.5), rgba(0, 10, 14, 0.72)),
            url('/static/images/hero-mobile.jpg') !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .hero-section {
        min-height: 620px;
        padding: 2.5rem 0;
    }

    .hero-section .min-vh-75 {
        min-height: 0;
    }

    .hero-section h1 {
        font-size: clamp(2rem, 8vw, 2.75rem);
        line-height: 1.12;
        margin-bottom: 1.25rem !important;
    }

    .hero-section p {
        font-size: 1.05rem;
        line-height: 1.55;
    }
}

.min-vh-75 {
    min-height: 75vh;
}

.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-fade-in-delay-1 {
    animation: fadeIn 1s ease-in 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0.7;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 102, 102, 0.2) !important;
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.testimonial-card {
    max-width: 800px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    transition: transform 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    transform: scale(1.2);
}

.page-header {
    background: linear-gradient(135deg, var(--teal) 0%, #004d4d 100%);
}

.bg-gradient-teal {
    background: linear-gradient(135deg, var(--teal) 0%, #004d4d 100%);
}

.cta-section {
    background: linear-gradient(135deg, var(--teal) 0%, #004d4d 100%);
}

.card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.resource-card .expand-btn {
    transition: all 0.3s ease;
}

.resource-card:hover .expand-btn {
    background-color: var(--teal);
    color: white;
    border-color: var(--teal);
}

.sticky-filter {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 102, 0.25);
}

.btn {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--teal);
    border-color: var(--teal);
}

.btn-primary:hover {
    background-color: #005555;
    border-color: #005555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 102, 0.3);
}

.btn-outline-primary {
    color: var(--teal);
    border-color: var(--teal);
}

.btn-outline-primary:hover {
    background-color: var(--teal);
    border-color: var(--teal);
    color: white;
}

.glossary-item {
    transition: all 0.3s ease;
}

.glossary-item:hover {
    border-left: 4px solid var(--teal) !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(0, 102, 102, 0.1);
    color: var(--teal);
}

.accordion-button:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 102, 0.25);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

.valid-feedback,
.invalid-feedback {
    display: none;
    margin-top: 0.5rem;
}

.form-control.is-valid ~ .valid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.footer {
    background-color: #1a1a1a !important;
    margin-top: auto;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--white) !important;
    transform: translateX(5px);
    text-decoration: none;
}

.disclaimer-banner {
    animation: fadeUp 0.6s ease-in;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.search-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-close:hover {
    color: var(--dark);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: rgba(0, 102, 102, 0.05);
}

.toast-container {
    z-index: 9999;
}

.toast {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

.table {
    background-color: white;
    border-radius: 8px;
    overflow: visible;
}

.dosing-guide-wrapper {
    overflow: visible;
}

.details-open-padding {
    padding-bottom: 600px;
}

.table thead {
    background-color: var(--dark);
    color: white;
}

.table-hover tbody tr {
    transition: background-color 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 102, 102, 0.05);
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .sticky-filter {
        position: relative;
        top: 0;
    }
    
    .search-modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-right: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 102, 102, 0.3);
    border-radius: 50%;
    border-top-color: var(--teal);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--teal);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #005555;
}

.category-tab.active {
    background-color: var(--teal);
    color: white;
    border-color: var(--teal);
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

#researchListBadge {
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    padding: 0.25rem 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    border-radius: 50%;
    font-weight: 600;
}

#researchListLink {
    position: relative;
    text-decoration: none;
    transition: transform 0.3s ease;
}

#researchListLink:hover {
    transform: scale(1.1);
}

#researchListLink:focus {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.add-to-research-btn {
    transition: all 0.3s ease;
}

.add-to-research-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.add-to-research-btn:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

.remove-btn:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* ===== THE JOURNAL ===== */
.journal-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: 'Inter', sans-serif;
  color: #1a202c;
  line-height: 1.8;
}
.journal-article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #006666;
}
.journal-category {
  display: inline-block;
  background: #e1f5ee;
  color: #006666;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.journal-article h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0d1b2a;
  margin: 0.75rem 0 1rem;
}
.journal-meta {
  font-size: 13px;
  color: #718096;
  margin-bottom: 1.25rem;
}
.journal-lead {
  font-size: 1.125rem;
  color: #2d3748;
  line-height: 1.7;
  font-weight: 400;
  border-left: 3px solid #006666;
  padding-left: 1.25rem;
  margin: 0;
}
.journal-article h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0d1b2a;
  margin: 2.25rem 0 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid #e2e8f0;
}
.journal-article p {
  margin-bottom: 1.25rem;
  color: #2d3748;
}
.journal-article ul {
  margin: 0 0 1.25rem 1.5rem;
  color: #2d3748;
}
.journal-article ul li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.journal-article a {
  color: #006666;
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 102, 0.3);
}
.journal-article a:hover {
  text-decoration-color: #006666;
}
.journal-disclaimer {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #006666;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  font-size: 13px;
  color: #4a5568;
  margin-top: 3rem;
  line-height: 1.6;
}

/* Journal index page */
.journal-index-header {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}
.journal-overline {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #006666;
  margin-bottom: 0.75rem;
}
.journal-index-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: #0d1b2a;
  margin-bottom: 1rem;
}
.journal-index-header p {
  font-size: 1.1rem;
  color: #4a5568;
  max-width: 620px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}
.journal-divider {
  border: none;
  border-top: 2px solid #006666;
  width: 60px;
  margin: 0 auto;
}
.journal-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.75rem;
  height: 100%;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  background: #fff;
}
.journal-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  transform: translateY(-3px);
}
.journal-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.75rem 0 0.5rem;
  line-height: 1.35;
}
.journal-card h2 a {
  color: #0d1b2a;
  text-decoration: none;
}
.journal-card h2 a:hover {
  color: #006666;
}
.journal-card-date {
  font-size: 12px;
  color: #a0aec0;
  margin-bottom: 0.35rem;
}
.journal-card-author {
  font-size: 12px;
  color: #718096;
  margin-bottom: 0.875rem;
}
.journal-card p {
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.journal-read-link {
  font-size: 13px;
  font-weight: 600;
  color: #006666;
  text-decoration: none;
}
.journal-read-link:hover {
  text-decoration: underline;
}
.journal-editorial-note {
  text-align: center;
  font-size: 12px;
  color: #a0aec0;
  max-width: 600px;
  margin: 3rem auto 0;
  line-height: 1.6;
}

/* Journal teaser on homepage */
.journal-teaser-section {
  padding: 4rem 0;
  background: #f8fafb;
}
.journal-teaser-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.journal-teaser-overline {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #006666;
  margin-bottom: 0.5rem;
}
.journal-teaser-header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #0d1b2a;
  margin-bottom: 0.5rem;
}
.journal-teaser-header p {
  font-size: 1rem;
  color: #718096;
}
.journal-teaser-cta {
  text-align: center;
  margin-top: 2.5rem;
}
.journal-teaser-cta a {
  font-size: 14px;
  font-weight: 600;
  color: #006666;
  text-decoration: none;
}
.journal-teaser-cta a:hover {
  text-decoration: underline;
}

/* Mobile optimization */
.chart-container,
.chart-wrap,
#halfLifeChart {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
}

canvas {
  max-width: 100% !important;
}

@media (max-width: 991px) {
  .email-capture-section .col-lg-6,
  .email-capture-section .col-lg-5 {
    margin-bottom: 1.5rem;
  }

  .email-capture-section .offset-lg-1 {
    margin-left: 0;
  }
}

html { -webkit-text-size-adjust: 100%; }
#toolApp, #toolApp .form-control, #toolApp .form-select, #toolApp input, #toolApp select, #toolApp button {
  font-size: 16px;
}
#toolApp .form-control, #toolApp .form-select, #toolApp .btn {
  min-height: 44px;
}
#toolApp { padding-bottom: 96px; } /* room for Pepe bubble */
footer {
  padding-bottom: env(safe-area-inset-bottom);
}
#pepe-bubble {
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
  #toolApp .input-group {
    flex-direction: column;
    align-items: stretch;
  }
  #toolApp .input-group > * {
    width: 100%;
    margin: 0 0 8px;
  }
  #toolApp .quick-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  #toolApp .quick-picks .btn { min-height: 40px; }
  #toolApp .option-grid { grid-template-columns: 1fr !important; }
  #toolApp .chart-wrap { height: 240px; }
  .table-responsive, #toolApp table { display: block; width: 100%; overflow-x: auto; }
}

@media (max-width: 768px) {
  #pepe-bubble,
  .pepe-bubble,
  [id*="pepe-bubble"] {
    bottom: 16px !important;
    right: 16px !important;
  }

  #pepe-panel,
  .pepe-panel,
  [id*="pepe-panel"] {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 75vh !important;
  }

  .tool-inputs .row > [class*="col-"] {
    margin-bottom: 12px;
  }

  footer .row > [class*="col-"] {
    margin-bottom: 1.5rem;
  }

  footer h6 {
    margin-top: 0.5rem;
  }

  .nav-link {
    padding: 12px 16px !important;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .btn {
    min-height: 44px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .pepe-quick-btn {
    min-height: 44px;
    padding: 10px 14px !important;
  }

  .database-filters select,
  .database-filters input,
  #peptideSearch,
  #peptide-search {
    width: 100% !important;
    margin-bottom: 10px !important;
    font-size: 16px !important;
  }

  .filter-row {
    flex-direction: column !important;
  }

  .journal-article h1 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }

  .journal-article h2 {
    font-size: 1.25rem !important;
  }

  .journal-article p,
  .journal-article li {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  .journal-article-header {
    padding: 0 !important;
  }

  .glossary h2 {
    font-size: 1.4rem !important;
    padding: 12px 0 8px !important;
    border-bottom: 2px solid var(--teal);
    margin-top: 2rem !important;
  }

  .glossary h5 {
    font-size: 1rem !important;
  }

  .glossary p {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
}

@media (max-width: 576px) {
  .table th,
  .table td {
    font-size: 13px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .email-capture-section input[type="email"],
  .email-capture-section input[type="text"] {
    font-size: 16px !important;
  }

  .calculator-row {
    flex-direction: column;
  }

  .calculator-row > * {
    width: 100%;
    margin-bottom: 12px;
  }

  .goal-options .row {
    grid-template-columns: 1fr;
  }

  .goal-card {
    margin-bottom: 10px;
  }

  .peptide-card {
    margin-bottom: 16px;
  }

  .peptide-card .card-body {
    padding: 14px !important;
  }

  .peptide-card h5,
  .peptide-card .card-title {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .share-row {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .share-row a {
    font-size: 12px !important;
  }
}

/* build: 20260913-mobile-tools-3 */
@media (max-width: 768px) {
  /* Tool pages: teaser covers inputs. Hide it. Keep the 🧬 button. */
  body.tool-page #pepe-teaser,
  body:has(#toolApp) #pepe-teaser,
  html body.tool-page #pepe-teaser {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  /* Non-tool pages: keep a SMALL teaser next to the bubble, do not stretch */
  #pepe-teaser {
    left: auto !important;
    right: 84px !important;
    bottom: 16px !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: 220px !important;
    z-index: 9997 !important;
  }

  #pepe-bubble {
    bottom: 16px !important;
    right: 14px !important;
    z-index: 9998 !important;
  }
}
