/* TrafWise blog — listing + article pages (generated by scripts/build-blog.mjs). Loads after /styles.css. */
.blog { background: #f6f7f9; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--asphalt); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.nav-links a.is-current { color: var(--white); background: rgba(255,255,255,.08); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: #aab0ba; margin-bottom: 18px; }
.crumbs a:hover { color: var(--yellow); }

/* ---------- listing ---------- */
.blog-hero { background: var(--asphalt); color: var(--white); padding: clamp(40px, 7vw, 84px) 0 clamp(36px, 6vw, 64px); }
.blog-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 14px 0 16px; }
.blog-hero p { max-width: 720px; color: #cfd3da; font-size: 1.08rem; }
.blog-list { padding: 32px 0 72px; }
.b-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.b-filters button { border: 1px solid var(--concrete-2); background: var(--white); color: var(--ink); border-radius: 99px; padding: 8px 14px; font-weight: 600; font-size: .88rem; }
.b-filters button[aria-pressed="true"] { background: var(--asphalt); border-color: var(--asphalt); color: var(--yellow); }
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.blog-list .b-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.blog-list { scroll-margin-top: 110px; }
.blog-tools { display:flex; gap:16px; align-items:end; margin:0 0 22px; }
.blog-search { flex:1; }.blog-sort { width:185px; }
.blog-tools label { display:grid; gap:7px; color:#596579; font-size:.85rem; font-weight:600; }
.blog-tools input,.blog-tools select { width:100%; min-height:46px; border:1px solid #dce2ea; border-radius:12px; padding:10px 14px; background:#fff; color:#101820; font:inherit; }
.blog-results { margin:20px 0; color:#647084; font-size:.92rem; }
.blog-pagination { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; margin:40px 0 12px; }
.blog-pagination a,.blog-pagination .is-disabled { display:grid; place-items:center; min-width:44px; height:44px; padding:0 10px; border:1px solid #dde3ea; border-radius:12px; background:#fff; color:#192232; font-weight:700; text-decoration:none; }
.blog-pagination a:hover { border-color:#ff6b00; color:#d34d00; background:#fff6ed; }
.blog-pagination a[aria-current="page"] { background:#15171b; border-color:#15171b; color:#fff; box-shadow:0 4px 12px #15171b18; }
.blog-pagination .is-disabled { color:#a7afba; background:#eef1f5; }.page-gap { padding:0 3px; color:#6a7483; }
.blog-pagination a:focus-visible,.blog-tools input:focus-visible,.blog-tools select:focus-visible { outline:3px solid #ffb800; outline-offset:3px; }
.blog-empty { padding:40px 22px; text-align:center; background:#fff; border:1px solid #e6e9ee; border-radius:18px; }
.blog-pagination[hidden],.blog-empty[hidden] { display:none; }
@media(max-width:999px){.blog-list .b-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:640px){.blog-list .b-grid{grid-template-columns:minmax(0,1fr);}.blog-tools{align-items:stretch;flex-direction:column;}.blog-sort{width:100%;}.blog-pagination{gap:6px;}.blog-list{scroll-margin-top:85px;}}
.b-card { background: var(--white); border: 1px solid #e6e9ee; border-radius: var(--radius-lg); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.b-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.b-card[hidden] { display: none; }
.b-card-link { display: flex; flex-direction: column; height: 100%; }
.b-cover { display: flex; align-items: flex-end; height: 132px; padding: 14px 18px; color: var(--white); font-family: var(--display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em;
  background: linear-gradient(135deg, rgba(21,23,27,.2), rgba(21,23,27,.85)), repeating-linear-gradient(-45deg, var(--yellow) 0 16px, var(--asphalt) 16px 32px); }
.b-cover.cat-costs-hiring { background: linear-gradient(135deg, #ff6a00, #c2410c); }
.b-cover.cat-licences-careers { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.b-cover.cat-rules-standards { background: linear-gradient(135deg, #15171b, #374151); }
.b-cover.cat-plans-tgs { background: linear-gradient(135deg, #0f766e, #134e4a); }
.b-cover.cat-permits-approvals { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.b-cover.cat-site-safety { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.b-cover.cat-equipment { background: linear-gradient(135deg, #ca8a04, #713f12); }
.b-cover.cat-events-special-works { background: linear-gradient(135deg, #db2777, #831843); }
.b-cover.cat-running-a-tc-business { background: linear-gradient(135deg, #16a34a, #14532d); }
.b-cover span { position: relative; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.b-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.b-cat { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.b-cat.on-dark { color: var(--yellow); }
.b-card h3 { font-family: var(--body); font-size: 1.12rem; line-height: 1.35; font-weight: 750; text-transform: none; }
.b-card:hover h3 { color: #c2410c; }
.b-desc { color: #4b5563; font-size: .93rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-meta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--steel); font-size: .82rem; }
.b-meta svg { width: 15px; height: 15px; }

/* ---------- article ---------- */
.post-hero { background: var(--asphalt); color: var(--white); padding: clamp(28px, 5vw, 56px) 0 clamp(30px, 5vw, 52px); }
.post-hero-in { max-width: 920px; }
.post-hero h1 { font-family: var(--body); text-transform: none; font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.15; letter-spacing: -.01em; margin: 12px 0 14px; }
.post-lede { color: #cfd3da; font-size: 1.1rem; max-width: 760px; }
.post-by { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.post-by small { display: block; color: #aab0ba; font-size: .85rem; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--yellow); color: var(--asphalt); font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.post-grid { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 48px; justify-content: center; padding: 40px 0 56px; }
.post-toc { position: sticky; top: 100px; align-self: start; font-size: .9rem; }
.post-toc summary { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); cursor: pointer; margin-bottom: 10px; }
.post-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid #e2e5ea; }
.post-toc li a { display: block; padding: 6px 0 6px 14px; color: #374151; line-height: 1.35; }
.post-toc li a:hover { color: #c2410c; }
.post { min-width: 0; font-size: 1.07rem; line-height: 1.75; color: #1f2937; }
.post h2 { font-family: var(--body); text-transform: none; font-weight: 800; font-size: clamp(1.45rem, 2.6vw, 1.8rem); line-height: 1.25; color: var(--ink); margin: 44px 0 14px; scroll-margin-top: 96px; }
.post h3 { font-family: var(--body); font-weight: 750; font-size: 1.2rem; line-height: 1.35; margin: 28px 0 10px; scroll-margin-top: 96px; }
.post p, .post ul, .post ol { margin: 0 0 18px; }
.post ul, .post ol { padding-left: 1.3em; }
.post li { margin-bottom: 8px; }
.post a { color: #c2410c; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post a:hover { color: var(--orange); }
.takeaways { background: var(--white); border: 1px solid #e6e9ee; border-left: 5px solid var(--yellow); border-radius: var(--radius); padding: 20px 24px 8px; margin-bottom: 30px; }
.takeaways h2 { margin: 0 0 10px; font-size: 1.15rem; letter-spacing: .02em; }
.callout { background: #fff8e6; border: 1px solid #fde68a; border-radius: var(--radius); padding: 16px 18px; margin: 0 0 22px; }
.callout.warn { background: #fef2f2; border-color: #fecaca; }
.callout p { margin: 0; }
.post-table { overflow-x: auto; margin: 0 0 24px; border: 1px solid #e2e5ea; border-radius: var(--radius); background: var(--white); }
.post-table table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.post-table th { background: var(--asphalt); color: var(--white); text-align: left; padding: 11px 14px; font-weight: 700; white-space: nowrap; }
.post-table td { padding: 11px 14px; border-top: 1px solid #eef0f2; vertical-align: top; min-width: 120px; }
.post-table tr:nth-child(even) td { background: #fafbfc; }
.post-faq details { background: var(--white); border: 1px solid #e6e9ee; border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
.post-faq summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.5rem; color: var(--orange); font-weight: 700; }
.post-faq details[open] summary::after { content: "–"; }
.post-faq summary h3 { display: inline; margin: 0; font-size: 1.04rem; }
.post-faq details p { padding-bottom: 16px; margin: 0; }
.post-cta { display: flex; align-items: center; gap: 22px; justify-content: space-between; background: var(--asphalt); color: var(--white); border-radius: var(--radius-lg); padding: 24px 26px; margin: 40px 0 22px; position: relative; overflow: hidden; }
.post-cta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--asphalt) 14px 28px); }
.post-cta b { font-size: 1.15rem; } .post-cta p { color: #cfd3da; margin: 6px 0 0; font-size: .97rem; }
.post-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.post-cta .btn { flex: none; text-decoration: none; color: var(--asphalt); }
.post-cta .btn-ghost { color: var(--white); }
.post-author { display: flex; gap: 14px; background: var(--white); border: 1px solid #e6e9ee; border-radius: var(--radius); padding: 18px 20px; font-size: .93rem; }
.post-author p { margin: 4px 0 0; color: #4b5563; }
.related { background: var(--white); border-top: 1px solid #e6e9ee; padding: 44px 0 64px; }
.related h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 22px; }

/* ---------- footer ---------- */
.blog-footer { background: var(--asphalt); color: #aab0ba; padding: 34px 0; }
.blog-footer-in { display: grid; gap: 16px; }
.blog-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.blog-footer nav a { color: #e5e7eb; font-weight: 600; }
.blog-footer nav a:hover { color: var(--yellow); }
.blog-footer p { font-size: .85rem; max-width: 820px; }

@media (max-width: 1000px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 22px; }
  .post-toc { position: static; background: var(--white); border: 1px solid #e6e9ee; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px; }
  .post-toc details:not([open]) summary { margin: 0; }
}
@media (max-width: 640px) {
  .post { font-size: 1.02rem; }
  .post-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .post-cta-btns, .post-cta .btn { width: 100%; }
  .post-table td { min-width: 110px; }
}
/* free tool callout on an article (build-blog.mjs: tools whose page.json lists the article) */
.post-tool { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 30px 0; padding: 18px 20px; border-radius: 16px; background: var(--asphalt); color: #fff; }
.post-tool b { display: block; font-size: 1.05rem; } .post-tool p { margin: 2px 0 0; color: #c9ced6; font-size: .9rem; }
.post-tool .tc-cat { color: var(--yellow); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
