@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/public-sans-700.woff2) format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/public-sans-800.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-500.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-600.woff2) format('woff2');
}

:root{--teal:#0b5e4b;--teal-d:#083f33;--green:#0e8a5f;--green-l:#e6f4ec;--slate:#1f2a2e;--muted:#4b5a60;--bg:#f4f8f6;--card:#ffffff;--line:#cfe0d8;--accent:#e8a13a;--red:#b3402a}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:'Inter','Segoe UI',system-ui,-apple-system,sans-serif;color:var(--slate);background:var(--bg);line-height:1.65;font-size:17px}
h1,h2,h3{font-family:'Public Sans','Segoe UI',system-ui,sans-serif;line-height:1.3;color:var(--teal-d)}
a{color:var(--teal);text-decoration:underline}
a:hover{color:var(--green)}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:1100px;margin:0 auto;padding:0 20px}
/* header */
.site-header{background:var(--teal-d);color:#fff;position:sticky;top:0;z-index:50;box-shadow:0 2px 10px rgba(0,0,0,.25)}
.header-inner{max-width:1180px;margin:0 auto;padding:8px 16px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.site-header .logo img{width:120px;height:auto;background:#fff;border-radius:8px;padding:4px}
.main-nav{display:flex;align-items:center;gap:14px;flex:1;flex-wrap:wrap;justify-content:flex-end}
.search-box{position:relative}
.search-box input{padding:10px 12px;border-radius:8px;border:1px solid var(--line);font-size:15px;width:230px}
.search-results{position:absolute;right:0;top:110%;background:#fff;border:1px solid var(--line);border-radius:10px;width:340px;max-width:90vw;max-height:60vh;overflow:auto;box-shadow:0 10px 30px rgba(0,0,0,.25);display:none;z-index:60}
.search-results.open{display:block}
.search-results a{display:block;padding:10px 14px;color:var(--slate);text-decoration:none;border-bottom:1px solid #eef3f1}
.search-results a:hover{background:var(--green-l)}
.search-results a small{display:block;color:var(--muted)}
.menu-btn{display:none;background:var(--green);color:#fff;border:0;border-radius:8px;padding:10px 14px;font-size:16px;cursor:pointer}
.mobile-menu{display:none;background:#fff;border-top:1px solid var(--line);max-height:75vh;overflow:auto;padding:10px 16px}
.mobile-menu.open{display:block}
.mobile-menu a{display:block;padding:9px 6px;color:var(--slate);text-decoration:none;border-bottom:1px solid #eef3f1}
.mobile-menu .search-box input{width:100%;margin:6px 0}
/* hero */
.hero{position:relative;background:var(--teal-d);color:#fff;overflow:hidden}
.hero img{width:100%;height:420px;object-fit:cover;opacity:.92}
.hero-text{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:20px;background:linear-gradient(180deg,rgba(8,63,51,.55),rgba(8,63,51,.78))}
.hero-text h1{color:#fff;font-size:clamp(28px,4.5vw,46px);margin:0 0 12px;max-width:820px}
.hero-text p{font-size:18px;max-width:720px;margin:0 0 20px;color:#eaf5ef}
.cta-row{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.btn{display:inline-block;background:var(--accent);color:#231a05;text-decoration:none;font-weight:700;padding:12px 22px;border-radius:10px}
.btn.ghost{background:#fff;color:var(--teal-d)}
/* page head */
.page-head{background:linear-gradient(135deg,var(--teal),var(--green));color:#fff;padding:38px 0 30px}
.page-head h1{color:#fff;margin:0;font-size:clamp(26px,4vw,40px)}
.page-head p{color:#eaf5ef;max-width:800px;margin:10px 0 0}
/* article sections */
.article-body{padding:10px 0 30px}
.sec{margin:26px 0;padding:26px 24px;border-radius:16px;background:var(--card);border:1px solid var(--line)}
.sec h2{text-align:center;margin:0 0 18px;font-size:clamp(21px,3vw,28px);padding-bottom:12px;border-bottom:3px solid var(--green)}
.sec-intro{background:linear-gradient(180deg,#eaf6ef,#fff);border-left:6px solid var(--green)}
.sec-1{background:#fff;border-top:5px solid var(--teal)}
.sec-2{background:#eef7f2;border:1px solid #bfe3cf}
.sec-2 h2{border-bottom-color:var(--teal)}
.sec-3{background:#fff8ec;border:1px solid #f0d9a8}
.sec-3 h2{border-bottom-color:var(--accent)}
.sec-4{background:#eef4f8;border:1px solid #c3d8e8}
.sec-4 h2{border-bottom-color:#2a6f97}
.sec-5{background:#f3eef7;border:1px solid #d8c8e8}
.sec-5 h2{border-bottom-color:#6a4a9e}
.sec-6{background:#fff;border-left:6px solid var(--accent)}
.sec-7{background:#eaf6ef;border:1px dashed var(--green)}
.sec-8{background:#fdf2f0;border:1px solid #ecc9c2}
.sec-8 h2{border-bottom-color:var(--red)}
.sec-conclusion{background:linear-gradient(135deg,var(--teal-d),var(--teal));color:#fff}
.sec-conclusion h2{color:#fff;border-bottom-color:var(--accent)}
.sec-conclusion a{color:#ffe9b8}
.direct-answer{background:var(--green-l);border-left:5px solid var(--green);padding:14px 16px;border-radius:8px}
.sec ul{padding-left:22px}
.sec ul li{margin:7px 0}
.sec ol{padding-left:26px;counter-reset:step}
.sec ol li{margin:10px 0;padding-left:6px}
.sec ol li::marker{font-weight:700;color:var(--teal)}
.sec figure{margin:22px auto;max-width:760px}
.sec figure img{border-radius:12px;border:1px solid var(--line);margin:0 auto}
.table-wrap{overflow:visible}
table{width:100%;border-collapse:collapse;margin:16px 0;font-size:15px}
th{background:var(--teal);color:#fff;text-align:left;padding:10px 12px}
td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
tbody tr:nth-child(even){background:#f2f8f4}
/* tools */
.tools-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:20px 0}
.tool-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 16px;text-align:left;cursor:pointer;box-shadow:0 2px 8px rgba(8,63,51,.08)}
.tool-card:hover{border-color:var(--green);box-shadow:0 6px 18px rgba(8,63,51,.16)}
.tool-card h3{margin:0 0 8px;font-size:17px}
.tool-card p{margin:0;color:var(--muted);font-size:14px}
.tool-card .open-hint{display:inline-block;margin-top:10px;color:var(--teal);font-weight:700;font-size:14px}
.tools-title{text-align:center}
.tool{background:#fff;border:2px solid var(--green);border-radius:16px;padding:22px;margin:22px 0}
.tool h3{margin-top:0;color:var(--teal-d)}
.tool label{display:block;font-weight:600;margin:10px 0}
.tool input,.tool select{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;font-size:15px;margin-top:4px;background:#fff;color:var(--slate)}
.tool button{background:var(--teal);color:#fff;border:0;border-radius:8px;padding:11px 18px;font-size:15px;font-weight:700;cursor:pointer;margin-top:8px}
.tool button:hover{background:var(--green)}
.tool-result{margin-top:14px;padding:14px;border-radius:10px;background:var(--green-l);display:none}
.tool-result.show{display:block}
.tool-note{font-size:13.5px;color:var(--muted);margin-top:12px}
.office-list{list-style:none;padding:0}
.office-list li{padding:10px 0;border-bottom:1px solid #eef3f1}
.office-list .prov{color:var(--green);font-weight:700;font-size:13px}
/* faq */
.faq-sec{background:#fff;border:2px solid var(--teal);border-radius:16px;padding:26px 24px;margin:26px 0}
.faq-sec h2{text-align:center}
.faq-sec details{border:1px solid var(--line);border-radius:10px;margin:10px 0;background:#fbfdfc}
.faq-sec summary{cursor:pointer;padding:14px 16px;font-weight:700;color:var(--teal-d);list-style:none}
.faq-sec summary::-webkit-details-marker{display:none}
.faq-sec summary::before{content:"";display:inline-block;width:18px;height:18px;margin-right:8px;vertical-align:-3px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e8a5f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .2s ease}
.faq-sec details[open ] summary::before{transform:rotate(180deg)}
.faq-sec details div{padding:0 16px 14px}
/* related + share */
.related{background:var(--teal-d);color:#fff;border-radius:16px;padding:24px;margin:30px 0}
.related h2{color:#fff;text-align:center;margin-top:0}
.related ul{list-style:none;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.related a{display:block;background:#fff;color:var(--teal-d);text-decoration:none;border-radius:10px;padding:14px;font-weight:600}
/* footer */
.site-footer{background:var(--teal-d);color:#d9ece4;margin-top:40px}
.footer-inner{max-width:1180px;margin:0 auto;padding:34px 16px;display:flex;gap:30px;flex-wrap:wrap;justify-content:space-between}
.footer-brand{max-width:520px}
.footer-brand img{width:160px;background:#fff;border-radius:8px;padding:4px}
.footer-brand p{font-size:14px}
.footer-links h3{color:#fff;margin-top:0}
.footer-links ul{list-style:none;padding:0}
.footer-links a{color:#d9ece4;text-decoration:none;display:block;padding:4px 0}
.footer-links a:hover{color:#fff;text-decoration:underline}
.copyright{border-top:1px solid rgba(255,255,255,.2);text-align:center;padding:14px;font-size:13.5px;color:#cfe6da}
/* scroll buttons */
.scroll-btns{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:40}
.scroll-btns button{background:var(--teal);color:#fff;border:0;border-radius:50%;width:46px;height:46px;font-size:20px;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.3)}
.scroll-btns button:hover{background:var(--green)}
/* important pages */
.info-page{background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px;margin:24px 0}
.info-page h2{margin-top:28px}
.contact-form label{display:block;font-weight:600;margin:12px 0}
.contact-form input,.contact-form textarea,.contact-form select{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;font-size:15px;margin-top:4px}
.contact-form button{background:var(--teal);color:#fff;border:0;border-radius:8px;padding:12px 20px;font-weight:700;cursor:pointer}
.form-ok{display:none;background:var(--green-l);border:1px solid var(--green);border-radius:10px;padding:14px;margin-top:14px}
.form-err{color:var(--red);font-size:14px;display:none}
@media (max-width:900px){.tools-grid{grid-template-columns:repeat(2,1fr)}.related ul{grid-template-columns:1fr}}
@media (max-width:640px){
 body{font-size:16px}
 .header-inner{gap:10px}
 .site-header .logo img{width:96px}
 .menu-btn{display:block}
 .search-box.desktop-search{display:none}
 .hero img{height:300px}
 .sec{padding:20px 14px}
 .tools-grid{grid-template-columns:1fr}
 table,thead,tbody,th,td,tr{display:block}
 thead{display:none}
 tr{border:1px solid var(--line);border-radius:10px;margin:10px 0;padding:6px;background:#fff}
 td{border:0;padding:6px 10px}
 td::before{content:attr(data-label) ": ";font-weight:700;color:var(--teal-d);display:block;font-size:13px}
 .footer-inner{flex-direction:column}
}

/* Mobile header (<=640px): keep logo + menu button on ONE row at ~390px. */
@media (max-width:640px){
  /* Keep logo + menu button on ONE row at ~390px:
     no wrapping in the header row, tighter gaps, logo never shrinks. */
  .header-inner{flex-wrap:nowrap}
  .site-header .logo{flex-shrink:0}
  .main-nav{flex-wrap:nowrap;gap:8px}

  /* Slightly smaller menu button on mobile, still >=40px tall
     (10px + 10px padding + ~20px text = 40px tap target). */
  .menu-btn{padding:10px 12px;min-height:40px;white-space:nowrap;flex-shrink:0}
}

/* Fix 2 — two-column hero snippet for the CIPC homepage (site/index.html).
   Coordinator: append AFTER the existing hero rules in site/assets/css/style.css
   (or load after style.css). Do NOT edit style.css in place — this file is the
   only CSS deliverable for Fix 2.

   REPLACES these old rules (style.css lines ~36-40 and ~149):
     .hero{position:relative;background:var(--teal-d);color:#fff;overflow:hidden}
     .hero img{width:100%;height:420px;object-fit:cover;opacity:.92}
     .hero-text{position:absolute;inset:0;display:flex;flex-direction:column;
       justify-content:center;align-items:center;text-align:center;padding:20px;
       background:linear-gradient(180deg,rgba(8,63,51,.55),rgba(8,63,51,.78))}
     .hero-text h1{color:#fff;font-size:clamp(28px,4.5vw,46px);margin:0 0 12px;max-width:820px}
     .hero-text p{font-size:18px;max-width:720px;margin:0 0 20px;color:#eaf5ef}
     @media ... .hero img{height:300px}
   The old rules made the hero a full-width image with text overlaid on top
   (absolute positioning + dark gradient). The new rules below override them:
   the hero becomes a two-column grid, text on the left, the certificate image
   on the right, with no overlay and no absolute positioning. Because these
   selectors are more specific (.hero.hero-split ...) and must come later in
   the cascade, keep them after the old rules. */

/* --- Two-column hero (desktop) --- */
.hero.hero-split{
  position:static;                 /* drops the old relative + overlay context */
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:clamp(24px,4vw,56px);
  align-items:center;
  max-width:1200px;
  margin:0 auto;
  padding:clamp(28px,4vw,56px) clamp(20px,4vw,48px);
  background:var(--teal-d);
  color:#fff;
  overflow:hidden;
}

/* Left column: text is in normal flow now, left-aligned, no overlay gradient */
.hero.hero-split .hero-text{
  position:static;
  display:block;
  text-align:left;
  padding:0;
  background:none;
}
.hero.hero-split .hero-text h1{
  color:#fff;
  font-size:clamp(28px,4vw,44px);
  line-height:1.15;
  margin:0 0 14px;
  max-width:640px;
}
.hero.hero-split .hero-text p{
  font-size:18px;
  line-height:1.6;
  max-width:600px;
  margin:0 0 24px;
  color:#eaf5ef;
}
.hero.hero-split .cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

/* Right column: certificate image, natural aspect, readable, no distortion */
.hero.hero-split .hero-media{
  display:flex;
  justify-content:center;
}
.hero.hero-split .hero-media img{
  width:100%;
  max-width:420px;                 /* portrait document stays readable, not oversized */
  height:auto;                     /* natural 559x797 aspect preserved — no cropping, no stretch */
  object-fit:contain;
  opacity:1;
  border-radius:8px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  background:#fff;                 /* document edges read cleanly against the dark hero */
  padding:6px;
}

/* --- Mobile: stack, text first, image below --- */
@media (max-width:768px){
  .hero.hero-split{
    grid-template-columns:1fr;
    gap:24px;
    padding:28px 20px 32px;
  }
  .hero.hero-split .hero-text h1{
    font-size:clamp(26px,7vw,34px);
  }
  .hero.hero-split .hero-text p{
    font-size:17px;
  }
  .hero.hero-split .hero-media img{
    max-width:340px;
  }
}

/* Fix 5 icons — shared sizing/alignment (inline SVG, currentColor) */
.icon{width:20px;height:20px;flex:none;vertical-align:-4px}
.icon-inline{width:16px;height:16px;vertical-align:-3px}
/* Tool-card icon chip (homepage cards) */
.tool-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;background:var(--green-l);color:var(--teal);margin-bottom:10px}
.tool-icon .icon{width:26px;height:26px}
.tool-card .open-hint .icon{width:16px;height:16px;vertical-align:-3px}
/* Header buttons */
.menu-btn .icon{width:18px;height:18px;vertical-align:-3px}
/* Search-box magnifier (positioned inside the input, left edge) */
.search-box .icon-search{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--muted);pointer-events:none;z-index:1}
.search-box input{padding-left:38px}
/* Scroll buttons: centre the arrow in the round button */
.scroll-btns button{display:flex;align-items:center;justify-content:center}
.scroll-btns button .icon{width:22px;height:22px}
/* Contact-form submit: icon + text on one line */
.contact-form button{display:inline-flex;align-items:center;gap:8px}
.contact-form button .icon{width:18px;height:18px}

/* Fix 6 — post page H1 centred (homepage hero H1 stays left) */
.page-head h1{text-align:center}

/* ============================================================
   FIX ROUND 2 (assets worker) — appended after all Round 1 rules
   so these selectors win at equal specificity.
   Covers: numbered-list badges (Fix 1), hero full-bleed (Fix 2),
   hero subtitle (Fix 5), second-row nav (Fix 4), list markers (Fix 7).
   ============================================================ */

/* --- Fix 1 — Numbered lists / steps: designed counter badges ---
   Applies to every <ol> in article bodies and in tools (including the
   CoR39 <ol> that tools.js injects into .tool-result at runtime).
   Each <ol> restarts its own counter, so nested lists (none on the
   site today) restart correctly. Wrapped text aligns under the text,
   not under the badge, via the li left padding. */
.article-body ol,
.tool ol{list-style:none;counter-reset:step;margin:18px 0;padding-left:0}
.article-body ol ol,
.tool ol ol{counter-reset:step;margin:10px 0 4px}
.article-body ol li,
.tool ol li{position:relative;counter-increment:step;margin:12px 0;padding-left:46px;min-height:30px}
.article-body ol li::before,
.tool ol li::before{content:counter(step);position:absolute;left:0;top:1px;width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--teal),var(--green));color:#fff;font-weight:700;font-size:15px;line-height:30px;text-align:center;box-shadow:0 2px 6px rgba(8,63,51,.25)}
.article-body ol li::marker,
.tool ol li::marker{content:none}

/* --- Fix 2 — Hero full-bleed ---
   The hero is a direct child of the unstyled, full-width <main>, so
   width:100% already spans the viewport — no 100vw breakout (and its
   scrollbar-overflow risk) is needed. The only constraint was the
   Round 1 .hero-split max-width:1200px, which this lifts; the content
   itself stays centred in a 1200px column via the max() side padding.
   Two-column desktop grid and stacked mobile layout are untouched,
   and .hero-media img sizing is not changed. */
.hero-full-bleed{width:100%;max-width:none;margin-left:0;margin-right:0}
.hero.hero-split.hero-full-bleed{width:100%;max-width:none;margin:0;padding-left:max(20px,calc((100vw - 1200px)/2 + 20px));padding-right:max(20px,calc((100vw - 1200px)/2 + 20px))}

/* --- Fix 5 — Hero subtitle ---
   NOTE: the hero sits on a dark teal background, so the subtitle stays
   near-white (#eaf5ef) for readability — a dark slate colour would be
   unreadable on the dark hero. Everything else follows the brief:
   clamp() sizing, weight 500, comfortable line-height, readability
   max-width, and a short amber accent rule above the text (typographic
   only, via ::before — no new HTML). Specificity (0,4,0) beats the
   Round 1 .hero.hero-split .hero-text p rule (0,3,1). */
.hero .hero-sub{font-size:clamp(18px,2.2vw,21px);font-weight:500;line-height:1.65;color:#eaf5ef;max-width:600px;margin:0 0 24px}
.hero.hero-split .hero-text .hero-sub{font-size:clamp(18px,2.2vw,21px);font-weight:500;line-height:1.65;color:#eaf5ef;max-width:600px;margin:0 0 24px;text-align:left}
.hero.hero-split .hero-text .hero-sub::before{content:"";display:block;width:56px;height:4px;border-radius:2px;background:var(--accent);margin-bottom:14px}

/* --- Fix 4 — Second header row: horizontal nav of 15 links ---
   <nav class="guide-nav"> is a direct child of .site-header, below
   .header-inner. Pill links on a teal row; a single non-wrapping row
   that scrolls horizontally on medium widths instead of wrapping
   messily; hidden below 900px (mobile/tablet use the hamburger menu,
   which already lists all 20 posts). */
.site-header .guide-nav{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;width:100%;overflow-x:auto;overflow-y:hidden;background:var(--teal);border-top:1px solid rgba(255,255,255,.16);padding:6px max(16px,calc((100vw - 1180px)/2));scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.35) transparent;-webkit-overflow-scrolling:touch}
.site-header .guide-nav a{display:inline-block;flex:none;white-space:nowrap;color:#eaf5ef;text-decoration:none;font-size:14.5px;font-weight:600;line-height:1.4;padding:8px 13px;border-radius:999px}
.site-header .guide-nav a:hover{background:rgba(255,255,255,.16);color:#fff}
.site-header .guide-nav a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* --- Fix 7 — Designed bullets for article + tool lists ---
   Green markers only. .office-list, .footer-links and .related lists
   are list-style:none, so they are unaffected. */
.article-body ul li::marker,
.tool ul li::marker{color:var(--green);font-weight:700}

/* --- Fix Round 2 — small screens --- */
@media (max-width:900px){
  .site-header .guide-nav{display:none}
}
@media (max-width:768px){
  .hero.hero-split .hero-text .hero-sub{font-size:clamp(17px,4.5vw,19px)}
  .hero.hero-split .hero-text .hero-sub::before{width:44px}
}
@media (max-width:640px){
  .article-body ol li,
  .tool ol li{padding-left:38px;min-height:26px;margin:10px 0}
  .article-body ol li::before,
  .tool ol li::before{width:26px;height:26px;font-size:14px;line-height:26px;top:0}
}
