/* Shared readability and navigation layer for the two sample-size calculators. */
html {
  scroll-padding-top: 118px;
}

body {
  font-size: 16px;
  line-height: 1.65;
}

p,
li,
label,
td,
th,
summary,
.method-summary,
.protocol-copy,
.method-detail-body,
.method-plain-body,
.source-item {
  overflow-wrap: break-word;
  word-break: normal;
}

small {
  font-size: 12.5px !important;
  line-height: 1.55;
}

.topbar {
  min-height: 72px;
  height: auto;
}

.topbar .brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.topbar .brand {
  font-size: 15px;
}

.topbar .brand b {
  font-size: 12px;
}

.topbar .header-actions {
  flex: 1;
}

.calculator-switch,
.site-switcher {
  flex-wrap: nowrap;
}

.calculator-switch a,
.site-switcher a {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}

.page-subnav {
  position: sticky;
  z-index: 85;
  top: 72px;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 54px);
  border-bottom: 1px solid #d7e1e8;
  background: rgba(255, 255, 255, 0.96);
  padding: 6px 20px;
  box-shadow: 0 4px 14px rgba(7, 26, 43, 0.035);
  backdrop-filter: blur(14px);
}

.page-subnav a {
  color: #526b7c;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.page-subnav a:hover,
.page-subnav a:focus-visible,
.page-subnav a.active {
  color: #0d8e91;
  outline: none;
}

/* Protection-effectiveness calculator */
.hero-content {
  padding-top: 52px;
  padding-bottom: 46px;
}

.hero-content .eyebrow {
  font-size: 12px;
}

.hero-content .hero-lead {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
  font-size: 18px;
  line-height: 1.75;
}

.module-tabs b {
  font-size: 17px;
}

.module-tabs small,
.question-strip,
.implementation-note p,
.field-help,
.field-note,
.result-explanation,
.sensitivity-caption,
.method-card p,
.design-card p,
.reference-card p,
.reference-card cite,
.boundary-card p {
  font-size: 13px !important;
  line-height: 1.68;
}

.parameter-card label,
.field-label,
.result-label,
.method-label {
  font-size: 13px !important;
}

.design-card h3,
.reference-card strong {
  line-height: 1.45;
}

.method-card,
.design-card,
.reference-card,
.boundary-card {
  min-width: 0;
}

/* Safety calculator */
.sitebar-inner {
  min-height: 72px;
}

.sitebrand {
  font-size: 15px;
}

.sitebrand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.sitebrand b {
  font-size: 12px;
}

.safety-hero h1 {
  font-size: clamp(30px, 3vw, 40px);
}

.safety-hero .hero-lead,
.reg-note,
.question p,
.context,
.method-step p,
.method-plain-body,
.method-detail-body,
.method-tip,
.model-note,
.answer .detail,
.panel .desc,
.source-item,
.warning,
.protocol-copy {
  font-size: 13px !important;
  line-height: 1.72;
}

.field label,
.field input,
.field select,
.method-select-wrap label,
.method-guide-details summary,
.method-guide-details table,
.formula,
.symbols {
  font-size: 13px !important;
}

.help,
.source-panel-note,
.kpi .s {
  font-size: 12.5px !important;
  line-height: 1.62;
}

.question {
  min-width: 0;
  min-height: 124px;
}

.question h3 {
  font-size: 15px;
  line-height: 1.45;
}

.method-source-panel,
.method-detail-grid,
.kpis,
.question-grid {
  min-width: 0;
}

.protocol-copy,
.formula,
.source-item {
  white-space: normal;
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .topbar .header-actions,
  .calculator-switch {
    width: 100%;
  }

  .calculator-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calculator-switch a {
    padding: 7px 6px;
    text-align: center;
    white-space: normal;
  }

  .page-subnav {
    position: static;
  }

  html {
    scroll-padding-top: 18px;
  }
}

@media (max-width: 760px) {
  .sitebar-inner {
    padding: 10px 14px;
  }

  .sitebar-actions,
  .site-switcher {
    width: 100%;
  }

  .site-switcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calculator-switch a,
  .site-switcher a {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
  }

  .page-subnav {
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
    padding-right: 16px;
    padding-left: 16px;
  }

  .page-subnav a {
    flex: 0 0 auto;
  }

  .hero-content .hero-lead {
    font-size: 16px;
  }

  .question-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .page-subnav {
    display: none !important;
  }
}
