/* SWMS template pages (/swms-templates). Every rule is scoped to .st- classes. */
.st-page { max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; color: #1f2937; font-family: Arial, sans-serif; line-height: 1.55; }
.st-page h1 { font-size: 2rem; line-height: 1.25; margin: 8px 0 14px; color: #111827; }
.st-page h2 { font-size: 1.35rem; margin: 0 0 12px; color: #111827; }
.st-page h3 { font-size: 1.05rem; margin: 0 0 6px; }
.st-intro { font-size: 1.05rem; max-width: 780px; margin: 0 0 22px; }
.st-section { margin: 28px 0; }
.st-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; font-size: 0.9rem; }
.st-breadcrumb li + li::before { content: "\203A"; margin-right: 6px; color: #6b7280; }
.st-breadcrumb a { color: #1d4ed8; }
.st-draft-banner { background: #fef3c7; border: 1px solid #f59e0b; padding: 8px 12px; border-radius: 6px; font-weight: 700; }
.st-trade-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.st-trade-card { display: block; padding: 14px 16px; border: 1px solid #d1d5db; border-radius: 8px; text-decoration: none; color: #111827; background: #fff; height: 100%; box-sizing: border-box; }
.st-trade-card:hover, .st-trade-card:focus { border-color: #0000ff; }
.st-trade-name { display: block; font-weight: 700; }
.st-trade-count { display: block; font-size: 0.9rem; color: #4b5563; }
.st-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.st-card { border: 1px solid #d1d5db; border-radius: 8px; padding: 16px; background: #fff; }
.st-list { padding-left: 20px; }
.st-activity-list { columns: 2 280px; padding-left: 20px; }
.st-activity-list li { break-inside: avoid; margin-bottom: 4px; }
.st-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #e0e7ff; color: #1e3a8a; vertical-align: middle; }
.st-hrcw, .st-state, .st-ppe, .st-references, .st-back { max-width: 780px; }
.st-references { font-size: 0.9rem; color: #4b5563; }
.st-cta { margin: 24px 0 8px; }
.st-button { display: inline-block; background: #0000ff; color: #fff; padding: 12px 22px; border-radius: 6px; font-weight: 700; text-decoration: none; }
.st-button:hover, .st-button:focus { background: #1e40af; color: #fff; }
.st-button-small { padding: 8px 14px; font-size: 0.9rem; }
.st-table-wrap { overflow-x: auto; }
.st-table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.92rem; }
.st-table caption { caption-side: bottom; text-align: left; font-size: 0.85rem; color: #4b5563; padding-top: 8px; }
.st-table th, .st-table td { border: 1px solid #d1d5db; padding: 8px 10px; vertical-align: top; text-align: left; }
.st-table thead th { background: #1e3a5f; color: #fff; }
.st-table tbody th { font-weight: 700; background: #f9fafb; }
.st-table ul { margin: 0; padding-left: 18px; }
.st-risk { white-space: nowrap; font-weight: 700; }
.st-preview { margin: 24px 0; }
.st-preview img { max-width: 100%; height: auto; border: 1px solid #d1d5db; border-radius: 6px; }
.st-preview figcaption { font-size: 0.9rem; color: #4b5563; margin-top: 6px; }
@media (max-width: 640px) {
  .st-page h1 { font-size: 1.6rem; }
}
/* Phones: the job-steps table becomes one card per step, each cell labelled, so
   nothing is clipped and no sideways scrolling is needed. */
@media (max-width: 480px) {
  .st-table-wrap { overflow-x: visible; }
  .st-table { min-width: 0; }
  .st-table, .st-table caption, .st-table tbody, .st-table tr, .st-table th, .st-table td { display: block; width: auto; }
  .st-table caption { padding: 0 0 10px; }
  .st-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-table tbody tr { border: 1px solid #d1d5db; border-radius: 6px; margin-bottom: 12px; overflow: hidden; }
  .st-table tbody th, .st-table td { border: 0; border-top: 1px solid #e5e7eb; }
  .st-table tbody th { border-top: 0; background: #1e3a5f; color: #fff; }
  .st-table td::before { display: block; font-weight: 700; font-size: 0.8rem; color: #4b5563; margin-bottom: 2px; }
  .st-table td:nth-of-type(1)::before { content: "Hazards"; }
  .st-table td:nth-of-type(2)::before { content: "Risk (existing \2192  new)"; }
  .st-table td:nth-of-type(3)::before { content: "Controls"; }
  .st-table td:nth-of-type(4)::before { content: "Responsible"; }
  .st-risk { white-space: normal; }
}
