.sth-wrap {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
  padding: 36px 0 64px;
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.75;
}
.sth-reading {
  max-width: 820px;
}

/* ─── SECTION NAV ────────────────────────────────────────── */
.sth-section-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.sth-section-nav > div {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 12px;
}
.sth-section-brand {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.sth-section-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
}
.sth-section-nav li a {
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  transition: all 0.15s;
}
.sth-section-nav li a:hover {
  color: var(--brand);
  background: var(--surface-subtle);
}
.sth-section-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--surface-subtle);
  font-weight: 700;
}

/* ─── BREADCRUMBS & HEADER ──────────────────────────────── */
.sth-breadcrumb {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.sth-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sth-breadcrumb a:hover {
  text-decoration: underline;
}
.sth-header {
  padding: 10px 0 28px;
  border-bottom: 1px solid var(--border);
}
.sth-kicker {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sth-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 10px 0 16px;
}
.sth-lead {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 12px;
}
.sth-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* ─── BUTTONS & ACTIONS ─────────────────────────────────── */
.sth-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}
.sth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 20px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
  transition: all 0.18s;
}
.sth-button:hover {
  background: var(--brand-mid);
  transform: translateY(-1px);
}
.sth-button--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.sth-button--secondary:hover {
  background: var(--surface-subtle);
  border-color: var(--brand);
  color: var(--brand);
}
.sth-wrap a:not(.sth-button):not(.sth-topic-link) {
  color: var(--brand);
  text-underline-offset: 3px;
}
.sth-wrap :is(button, a, input, select, summary, textarea):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

/* ─── CONTEXT & SCRIPT CALLOUTS ─────────────────────────── */
.sth-context {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 18px 22px;
  border-radius: 12px;
  margin: 24px 0;
  font-size: 15.5px;
}
.sth-context p {
  margin: 6px 0;
}
.sth-context strong {
  color: var(--text);
}
.sth-script {
  border-left: 4px solid var(--brand);
  background: var(--surface-subtle);
  padding: 26px 30px;
  border-radius: 0 14px 14px 0;
  margin: 28px 0;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--text) 3%, transparent);
}
.sth-script h2,
.sth-script h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  margin-top: 0;
  margin-bottom: 16px;
}
.sth-script p {
  margin: 0 0 18px;
  line-height: 1.8;
  font-size: 16px;
}
.sth-script p:last-child {
  margin-bottom: 0;
}

/* ─── NOTE (STOP & REPORT) ──────────────────────────────── */
.sth-note {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-left: 4px solid var(--warning-dark);
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
}
.sth-note h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--warning-dark);
  margin-top: 0;
  margin-bottom: 8px;
}
.sth-note p {
  margin-bottom: 0;
  font-size: 15.5px;
  color: var(--text);
}

/* ─── SECTIONS & QUESTIONS ──────────────────────────────── */
.sth-section {
  margin-top: 36px;
}
.sth-wrap h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.015em;
}
.sth-wrap h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  margin: 20px 0 10px;
}
.sth-section ol,
.sth-section ul {
  padding-left: 22px;
  margin-bottom: 18px;
}
.sth-section li {
  margin-bottom: 8px;
  line-height: 1.65;
}

/* ─── ATTENDANCE TABLE ──────────────────────────────────── */
.sth-attendance {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 36px;
}
.sth-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.sth-fields label,
.sth-followup {
  font-size: 13.5px;
  font-weight: 700;
  display: block;
}
.sth-fields input,
.sth-followup textarea {
  display: block;
  margin-top: 5px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
.sth-table-wrap {
  overflow-x: auto;
  margin-block: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sth-attendance table {
  border-collapse: collapse;
  width: 100%;
  min-width: 380px;
  font-size: 14px;
}
.sth-attendance th {
  background: var(--surface-subtle);
  border-bottom: 2px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
}
.sth-attendance td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  height: 38px;
}
.sth-attendance caption {
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

/* ─── RELATED TOPICS GRID ───────────────────────────────── */
.sth-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.sth-related a {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.18s;
}
.sth-related a:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 10%, transparent);
}

/* ─── CATEGORY & UTILITY GRIDS ─────────────────────────── */
.sth-category-grid,
.sth-utility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.sth-category-grid a,
.sth-utility-grid > a {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s;
}
.sth-category-grid a:hover,
.sth-utility-grid > a:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 10%, transparent);
}
.sth-category-grid a span {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 8px;
}
.sth-utility-grid h2,
.sth-utility-grid h3 {
  font-size: 19px;
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--text);
}
.sth-utility-grid p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ─── PRINT OPTIONS & FAQ ───────────────────────────────── */
.sth-print-options {
  margin-top: 25px;
  padding: 12px 16px;
  background: var(--surface-subtle);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.sth-print-options summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.sth-print-options label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}
.sth-faq {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.sth-faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}
.sth-faq p {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--text-muted);
}
.sth-sources {
  font-size: 14px;
  margin-top: 32px;
}
.sth-sources h2 {
  font-size: 18px;
}

/* ─── FORM BUILDER & PLANNER TABLES ─────────────────────── */
.sth-builder {
  display: grid;
  gap: 18px;
}
.sth-builder label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.sth-builder :is(input, select, textarea),
.sth-plan-table :is(select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
.sth-builder p {
  margin: 0;
}
.sth-builder textarea,
.sth-plan-table textarea {
  resize: vertical;
}
.sth-plan-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 14px;
}
.sth-plan-table th,
.sth-plan-table td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}
.sth-plan-table th {
  background: var(--surface-subtle);
}
.sth-plan-table select {
  max-width: 250px;
}
.sth-plan-table caption {
  text-align: left;
  margin: 12px 0;
}
.sth-plan-table a {
  display: inline-block;
  margin-top: 8px;
}
.sth-print-only {
  display: none;
}
.sth-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  inset: 0 auto auto 0;
}
.sth-followup-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: 14px;
}
.sth-followup-table td,
.sth-followup-table th {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}
.sth-followup-table th {
  background: var(--surface-subtle);
}
.sth-followup-table td {
  height: 55px;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 850px) {
  .sth-section-nav > div {
    display: block;
  }
  .sth-section-nav ul {
    margin-top: 10px;
    gap: 6px 12px;
  }
  .sth-category-grid,
  .sth-utility-grid,
  .sth-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .sth-wrap {
    width: calc(100% - 32px);
    padding-top: 20px;
    font-size: 16px;
  }
  .sth-header h1 {
    font-size: 28px;
  }
  .sth-lead {
    font-size: 18px;
  }
  .sth-actions {
    gap: 10px;
  }
  .sth-actions .sth-button {
    flex: 1;
  }
  .sth-script {
    padding: 20px;
  }
  .sth-wrap h2 {
    font-size: 22px;
  }
  .sth-fields {
    grid-template-columns: 1fr;
  }
  .sth-category-grid,
  .sth-utility-grid,
  .sth-related {
    grid-template-columns: 1fr;
  }
}

/* ─── PRINT RULES ───────────────────────────────────────── */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm;
  }
  .safety-talk-help > :not(main) {
    display: none !important;
  }
  .safety-talk-help :is(.sth-no-print, .sth-actions, .sth-faq, .sth-section-nav, .sth-breadcrumb, .sth-related, .sth-print-options) {
    display: none !important;
  }
  .safety-talk-help .sth-wrap {
    width: 100%;
    padding: 0;
    font-size: 10.5pt;
    line-height: 1.5;
  }
  .safety-talk-help .sth-header {
    padding: 0 0 10px;
    border-bottom: 2px solid var(--border);
  }
  .safety-talk-help .sth-header h1 {
    font-size: 18pt;
    margin: 6px 0 8px;
  }
  .safety-talk-help .sth-lead {
    font-size: 11pt;
  }
  .safety-talk-help .sth-script {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    margin: 12px 0;
  }
  .safety-talk-help .sth-section {
    margin-top: 14px;
  }
  .safety-talk-help h2 {
    font-size: 13pt;
    break-after: avoid;
  }
  .safety-talk-help p,
  .safety-talk-help li {
    orphans: 3;
    widows: 3;
  }
  .safety-talk-help .sth-attendance {
    display: none;
    break-before: page;
  }
  .sth-include-attendance .sth-attendance {
    display: block;
  }
  .safety-talk-help .sth-fields {
    grid-template-columns: 1fr 1fr;
  }
  .safety-talk-help .sth-fields input,
  .safety-talk-help .sth-followup textarea {
    border-radius: 0;
    min-height: 30px;
  }
  .safety-talk-help .sth-attendance tr {
    break-inside: avoid;
  }
  .safety-talk-help .sth-plan-table {
    min-width: 0;
    font-size: 8.5pt;
  }
  .safety-talk-help .sth-plan-table select {
    display: none;
  }
  .safety-talk-help .sth-print-only {
    display: block;
  }
  .safety-talk-help .sth-table-wrap {
    overflow: visible;
  }
  .safety-talk-help .sth-followup-table {
    min-width: 0;
  }
  .safety-talk-help .sth-category-grid,
  .safety-talk-help .sth-utility-grid {
    display: none !important;
  }
}
