@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&display=swap');

/*  CSS Variables  */
:root {
  --primary:    #1D3557;
  --primary-lt: #2a4d73;
  --accent:     #F5B041;
  --accent-lt:  #F8C471;
  --success:    #2E7D52;
  --danger:     #E63946;
  --info:       #2980b9;
  --page-bg:    #F8F3E7;
  --card-bg:    #ffffff;
  --text:       #2F3437;
  --text-muted: #6c757d;
  --border:     #dee2e6;
  --radius:     8px;
  --shadow:     0 2px 8px rgba(0,0,0,.09);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --font-body:  'Inter', system-ui, sans-serif;
  --font-head:  'Poppins', system-ui, sans-serif;
}

/*  Reset & Base  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--page-bg);
}

a { color: var(--primary-lt); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }
strong { font-weight: 600; }

/*  Breadcrumb  */
.breadcrumb {
  background-color: #e8e2d6;
  padding: 10px 24px;
  font-size: 0.85rem;
  color: #555;
  border-bottom: 1px solid #d5cfc5;
}
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.bc-sep  { margin: 0 6px; color: #aaa; }
.bc-current { color: var(--text); font-weight: 600; }

/*  Page Wrapper  */
.page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/*  Page Title Block  */
.page-title-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-lt) 100%);
  color: #F8F3E7;
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 28px;
}
.page-title-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.page-title-main { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.page-title-sub  { font-size: 1rem; opacity: 0.85; line-height: 1.6; max-width: 680px; }

/*  Quick Nav  */
.quick-nav-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem;
  margin-bottom: 2.5rem;
}
.qnav-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem .5rem;
  text-align: center;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}
.qnav-card:hover {
  border-color: var(--primary-lt);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
/* -- Quick Nav Active State (scroll-driven) -- */
.qnav-card.active {
  border-color: var(--primary-lt);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transform: translateY(-2px);
  text-decoration: none;
  background-color: var(--primary);
  color: #fff;
}

.qnav-card.active .qnav-icon {
  filter: brightness(1.3);
}
.qnav-icon { font-size: 1.7rem; line-height: 1; }

/*  Section Article Card  */
.section-art-txt {
  margin: 0 0 28px 0;
  padding: 28px 28px 24px;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section-art-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--danger);
  padding-left: 12px;
  margin-bottom: 20px;
  line-height: 1.3;
}
.section-art-txt > p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 16px;
}

/*  Subsection Block  */
.subsection-block { margin-bottom: 2.8rem; }

/*  PPE Category (reused for tool categories)  */
.ppe-category { margin-bottom: 2rem; scroll-margin-top: 80px; }
.ppe-cat-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #f8f9fb;
  border-left: 4px solid var(--accent);
  padding: .6rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
}
.ppe-cat-icon { font-size: 1.5rem; }
.ppe-cat-header h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

/*  Cards Grid  */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.item-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.item-card h4 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.item-card h4::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.item-card ul { font-size: .84rem; padding-left: 1.2rem; }
.item-card li  { margin-bottom: .3rem; }

/*  Styled Table  */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.styled-table thead tr { background: var(--primary); color: #fff; text-align: left; }
.styled-table th, .styled-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.styled-table tbody tr:last-child td { border-bottom: none; }
.styled-table tbody tr:nth-child(even) { background: #f8f9fb; }
.styled-table tbody tr:hover { background: #eef2f7; }

/*  Check List  */
.check-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.check-list li {
  font-size: 0.95rem;
  color: var(--text);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/*  Content List  */
.content-list {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem 1rem 2rem;
  box-shadow: var(--shadow);
  font-size: .9rem;
}
.content-list li { margin-bottom: .4rem; }

/*  Proc List  */
.proc-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.proc-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem 1rem .6rem 1.1rem;
  border-left: 4px solid var(--info);
  font-size: .875rem;
  box-shadow: var(--shadow);
}

/*  Storage Grid  */
.storage-grid { display: flex; flex-wrap: wrap; gap: .7rem; }
.storage-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .85rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.storage-item::before {
  content: '📦';
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

/*  Callout Boxes  */
.callout {
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin: 1rem 0;
  font-size: .875rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.callout-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .05rem; }
.callout-body  { flex: 1; }
.callout-body strong { display: block; margin-bottom: .25rem; font-size: .9rem; }
.callout-warn   { background: #fef9e7; border: 1px solid #f1c40f; }
.callout-info   { background: #eaf4fb; border: 1px solid #85c1e9; }
.callout-danger { background: #fdf2f2; border: 1px solid #e74c3c; }
.callout-tip    { background: #eafaf1; border: 1px solid #2ecc71; }

/*  Intro Para  */
.intro-para {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

/*  Section Divider  */
.section-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 2.5rem 0;
}


/* QUIZ NAV */
.quiz-nav-container {
  text-align: center;
  margin-bottom: 0.75rem;
}

.quiz-nav {
  display: flex;
  justify-content: center;
}

.quiz-nav-btn {
  display: inline-block;
  background-color: #E63946;
  color: #F8F3E7;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(29, 53, 87, 0.18);
  border: 2px solid transparent;
}

.quiz-nav-btn:hover {
  background-color: #C92F3B;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29, 53, 87, 0.24);
}

.quiz-nav-btn:focus {
  outline: none;
  border-color: #F1C40F;
}

/* FOOTER NAV */
.main-footer-nav {
  background-color: var(--primary);
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.main-footer-nav-btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: 4px;
  transition: background-color 0.2s;
  text-decoration: none;
}
.main-footer-nav-btn:hover { background-color: var(--accent-lt); }

/*  Site Footer  */
.site-footer { background-color: #2F3437; color: #F8F3E7; padding: 40px 24px 24px; }
.footer-container { display: flex;
  align-items: flex-start;
  justify-content: center;
  color: #F1C40F; gap: 32px; max-width: 1200px; margin: 0 auto; }
.footer-col {
  text-align: left;
  color: #F1C40F;
  margin: 0 50px;
}
.footer-col a { color: #F1C40F; text-decoration: underline; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 0.5; }
.footer-col h3 { font-size: 1.05rem; color: #F1C40F; margin-bottom: 10px; }
.footer-col p  { font-size: 0.9rem; opacity: 0.8; line-height: 1.7; }
.footer-credit {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/*  Responsive  */
@media (max-width: 768px) {
  .page-title-main { font-size: 1.5rem; }
  .page-title-block { padding: 24px 20px; }
  .section-art-txt { padding: 20px 16px; }
  .section-art-title { font-size: 1rem; }
  .cards-grid, .cards-grid-2 { grid-template-columns: 1fr; }
  .footer-container { flex-direction: column; gap: 20px; }
}
@media (max-width: 480px) {
  .quick-nav-grid { grid-template-columns: repeat(3, 1fr); }
  .storage-grid   { flex-direction: column; }
}
/*  Back to Top Button  */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  padding: 10px 18px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* -- Scroll Margin for Quick Nav Anchor Targets -- */
.section-art-txt[id],
.ppe-category[id],
.subsection-block[id],
.hazard-nav-card[id],
div[id].section-art-txt,
article[id] {
  scroll-margin-top: 80px;
}