:root {
      --primary: #124148;
      --accent:  #179995;
      --orange:  #EE6421;
      --berry:   #B21B57;
      --gold:    #F5B727;
      --surface: #f4f8f8;
      --border:  #d1e0e0;
      --text:    #1f2937;
      --muted:   #4b5563;
      --bg:      #ffffff;
    }

    @page {
      size: letter;
      margin: 18mm 17mm 20mm;
      background: var(--bg);
      @top-left {
        content: "Pathway2Careers | All-in-One Scope & Sequence";
        font-family: 'Inter', -apple-system, sans-serif;
        font-size: 9pt;
        color: var(--muted);
      }
      @bottom-left {
        content: "p2c.org";
        font-family: 'Inter', -apple-system, sans-serif;
        font-size: 9pt;
        color: var(--accent);
      }
      @bottom-right {
        content: "Page " counter(page) " of " counter(pages);
        font-family: 'Inter', -apple-system, sans-serif;
        font-size: 9pt;
        white-space: nowrap;
        color: var(--muted);
      }
    }
    @page :first {
      margin: 0;
      @top-left { content: none; }
      @bottom-left { content: none; }
      @bottom-right { content: none; }
    }

    *, *::before, *::after { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; background: transparent; }
    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 11pt;
      line-height: 1.56;
      color: var(--text);
    }
    @media screen {
      html, body { background: var(--bg); }
      body { max-width: 860px; margin: 0 auto; padding: 28px 36px; }
    }

    main.document-flow { width: 100%; margin: 0; padding: 0; }

    /* Cover Page */
    .cover-page {
      height: 278mm;
      max-height: 279mm;
      overflow: hidden;
      background: var(--primary);
      color: #ffffff;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 16px;
      padding: 18mm 18mm 14mm;
      break-after: page;
      page-break-after: page;
      position: relative;
    }
    .cover-top-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 3px solid var(--accent);
      padding-bottom: 12px;
    }
    .cover-logo {
      height: 54px;
      width: auto;
      display: block;
    }
    .cover-kicker {
      font-size: 10.5pt;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--gold);
    }
    .cover-title {
      font-family: 'Inter Display', 'Inter', sans-serif;
      font-size: 31pt;
      font-weight: 800;
      line-height: 1.12;
      margin: 4px 0 6px;
      color: #ffffff;
    }
    .cover-subtitle {
      font-size: 13.5pt;
      line-height: 1.42;
      color: #d7eded;
      margin: 0;
      max-width: 94%;
    }
    .cover-hero-img {
      width: 100%;
      max-height: 106mm;
      object-fit: cover;
      border-radius: 8px;
      border: 3px solid var(--accent);
    }
    .cover-highlights {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .cover-stat {
      background: rgba(255,255,255,0.09);
      border-top: 3px solid var(--orange);
      border-radius: 6px;
      padding: 10px 12px;
    }
    .cover-stat strong {
      display: block;
      font-size: 15.5pt;
      color: var(--gold);
      line-height: 1.2;
    }
    .cover-stat span {
      font-size: 10pt;
      color: #e2f1f1;
    }
    .cover-footer-strip {
      height: 8px;
      width: 100%;
      border-radius: 4px;
      background: linear-gradient(90deg, var(--orange) 0%, var(--berry) 35%, var(--accent) 70%, var(--gold) 100%);
      margin-top: 4px;
    }

    /* TOC Page */
    .toc-page {
      break-after: page;
      page-break-after: page;
    }
    .toc-table {
      width: 100%;
      border-collapse: collapse;
      margin: 14px 0 18px;
    }
    .toc-table td {
      padding: 8px 6px;
      border-bottom: 1px dashed var(--border);
      font-size: 10.5pt;
      background: transparent !important;
    }
    .toc-table td.toc-sec {
      font-weight: 700;
      color: var(--primary);
      width: 14%;
    }
    .toc-table td.toc-title a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 600;
    }
    .toc-table td.toc-desc {
      color: var(--muted);
      font-size: 10pt;
    }
    .toc-table td.toc-pg {
      text-align: right;
      font-weight: 700;
      color: var(--accent);
      width: 8%;
      font-variant-numeric: tabular-nums;
    }

    /* Headings & Text */
    h1 {
      font-family: 'Inter Display', 'Inter', sans-serif;
      font-size: 23pt;
      font-weight: 800;
      line-height: 1.2;
      margin: 0 0 12px 0;
      color: var(--primary);
    }
    .sec-header {
      margin: 26px 0 10px 0;
      break-after: avoid;
      page-break-after: avoid;
      break-inside: avoid;
      page-break-inside: avoid;
    }
    .sec-header h2 {
      margin: 4px 0 0 0;
    }
    h2 {
      font-family: 'Inter Display', 'Inter', sans-serif;
      font-size: 17pt;
      font-weight: 800;
      line-height: 1.25;
      margin: 24px 0 10px 0;
      padding-bottom: 6px;
      border-bottom: 2.5px solid var(--accent);
      color: var(--primary);
      break-after: avoid;
      page-break-after: avoid;
    }
    .sec-tag {
      display: inline-block;
      background: var(--primary);
      color: #ffffff;
      font-size: 9.5pt;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      padding: 2px 9px;
      border-radius: 4px;
    }
    h3 {
      font-family: 'Inter Display', 'Inter', sans-serif;
      font-size: 13pt;
      font-weight: 700;
      line-height: 1.3;
      margin: 18px 0 7px 0;
      color: var(--primary);
      break-after: avoid;
      page-break-after: avoid;
    }
    p { margin: 0 0 11px 0; }
    ul, ol { margin: 0 0 11px 0; padding-inline-start: 20px; }
    li { margin-bottom: 4px; }
    a { color: var(--primary); text-decoration: underline; text-underline-offset: 2.5px; overflow-wrap: anywhere; }
    section { margin-bottom: 20px; break-inside: auto; page-break-inside: auto; }

    /* Callouts & Cards */
    .callout {
      background: var(--surface);
      border-inline-start: 4px solid var(--orange);
      border-radius: 6px;
      padding: 12px 16px;
      margin: 14px 0;
      break-inside: avoid;
      page-break-inside: avoid;
    }
    .callout-title {
      font-weight: 700;
      color: var(--primary);
      margin-bottom: 5px;
      font-size: 11pt;
    }

    .card-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin: 14px 0;
      break-inside: auto;
      page-break-inside: auto;
    }
    .feature-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-top: 3px solid var(--accent);
      border-radius: 6px;
      padding: 11px 14px;
      break-inside: avoid;
      page-break-inside: avoid;
    }
    .feature-card h4 {
      margin: 0 0 5px 0;
      font-size: 11pt;
      color: var(--primary);
    }
    .feature-card p {
      margin: 0;
      font-size: 10pt;
      line-height: 1.45;
    }

    .kpi-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
      margin: 14px 0;
      break-inside: avoid;
      page-break-inside: avoid;
    }
    .kpi-box {
      background: var(--primary);
      color: #ffffff;
      border-radius: 6px;
      padding: 10px 10px;
      text-align: center;
    }
    .kpi-box strong {
      display: block;
      font-size: 16pt;
      color: var(--gold);
      line-height: 1.2;
    }
    .kpi-box span {
      font-size: 9.5pt;
      color: #e2f1f1;
    }

    .step-block {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      margin: 10px 0;
      break-inside: avoid;
      page-break-inside: avoid;
    }
    .step-badge {
      background: var(--orange);
      color: #ffffff;
      font-weight: 700;
      font-size: 10.5pt;
      min-width: 28px;
      height: 28px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* Tables */
    table { width: 100%; border-collapse: collapse; margin: 14px 0; break-inside: auto; page-break-inside: auto; }
    th, td {
      text-align: start;
      padding: 7px 9px;
      font-size: 10pt;
      vertical-align: top;
      overflow-wrap: break-word;
    }
    th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
    th {
      background: var(--primary);
      font-weight: 700;
      color: #ffffff;
    }
    td { border-bottom: 1px solid var(--border); }
    tbody tr:nth-child(even) { background: var(--surface); }
    tr { break-inside: avoid; page-break-inside: avoid; }

    /* Images */
    img { max-width: 100%; height: auto; display: block; border-radius: 5px; }
    figure { margin: 14px 0; break-inside: avoid; page-break-inside: avoid; }
    figure img.photo-img { max-height: 225px; width: 100%; object-fit: cover; border: 1px solid var(--border); }
    figure img.spot-img { max-height: 155px; width: 100%; object-fit: cover; border: 1px solid var(--border); }
    figure img.chart-img { width: 100%; max-height: 360px; object-fit: contain; }
    figure img.logo-img { max-height: 85px; width: auto; margin: 0 auto; }
    figcaption { font-size: 9pt; color: var(--muted); margin-top: 6px; text-align: center; }

    .cta-banner {
      background: var(--primary);
      color: #ffffff;
      border-radius: 8px;
      padding: 18px 20px;
      margin: 16px 0;
      border-left: 6px solid var(--orange);
      break-inside: avoid;
      page-break-inside: avoid;
    }
    .cta-banner h3 { color: var(--gold); margin-top: 0; }
    .cta-banner a { color: #ffffff; font-weight: 700; }

/* --- Web Template Navigation & Interactive Polish --- */
html { scroll-behavior: smooth; }
@media screen {
  html, body { background: #e8efef; }
  body {
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 0 0 40px 0;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(18, 65, 72, 0.10);
  }
  main.document-flow {
    padding: 0 44px;
  }
  .cover-page {
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 0 -44px 32px;
    padding: 40px 44px 28px;
  }
  .toc-page {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
  }
  .toc-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
  }
  .toc-table tbody tr:hover {
    background-color: #e3f0f0 !important;
  }
  section[id] {
    scroll-margin-top: 68px;
  }
}

.web-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 3px solid var(--accent);
  font-size: 9.5pt;
}
.web-topbar-title {
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}
.web-topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.web-topbar-links a {
  color: #d7eded;
  text-decoration: none;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.web-topbar-links a:hover,
.web-topbar-links a.active {
  background: var(--accent);
  color: #ffffff;
}
.back-to-toc {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--orange);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 9.5pt;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 120;
}
.back-to-toc.visible {
  opacity: 1;
  pointer-events: auto;
}
@media print {
  .web-topbar, .back-to-toc { display: none !important; }
}
