/* ==========================================================================
   SELF DOC - blog (/blog). Builds on site.css (colours, buttons, nav).
   ========================================================================== */

.nav-links a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.blog-page svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.blog-page .brand-mark svg, .bl-cover-mark svg, .bl-paper-img svg, .bl-cta-art svg { fill: #fff; stroke: none; }

/* reading progress (article view) */
.bl-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 3px; pointer-events: none; opacity: 0; transition: opacity .3s; }
.bl-progress.on { opacity: 1; }
.bl-progress i { display: block; height: 100%; background: var(--grad-text); transform-origin: left; transform: scaleX(var(--p, 0)); border-radius: 0 3px 3px 0; box-shadow: 0 0 12px var(--glow); }

/* ---------- hero ---------- */
.bl-hero { position: relative; isolation: isolate; overflow: clip; padding: 40px 0 70px; background: linear-gradient(180deg, transparent, var(--bg-soft)); }
.bl-hero .b1 { width: 520px; height: 520px; top: -230px; right: -140px; }
.bl-hero .b2 { width: 380px; height: 380px; bottom: -180px; left: -140px; opacity: .45; background: var(--blob-3); }
.bl-hero .b1, .bl-a-hero .b1 { background: var(--blob-1); }
.bl-hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.bl-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.7rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: .3em; max-width: 15em; }
.bl-lead { font-size: 1.12rem; color: var(--text-2); max-width: 34em; margin-bottom: 26px; }
html:lang(si) .bl-hero h1, html:lang(ta) .bl-hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }

.bl-search { position: relative; max-width: 520px; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.bl-search:focus-within { border-color: var(--brand); box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.bl-search > svg { width: 20px; height: 20px; margin-left: 20px; color: var(--brand); flex: none; }
.bl-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 16px 14px; font: 500 1rem var(--font); color: var(--text); }
.bl-search input::-webkit-search-cancel-button { display: none; }
.bl-search-clear { width: 36px; height: 36px; margin-right: 8px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.bl-search-clear:hover { background: var(--brand-soft); color: var(--brand); }
.bl-search-clear svg { width: 16px; height: 16px; }

/* decorative stack of articles */
.bl-art { position: relative; justify-self: center; width: 260px; height: 270px; }
.bl-paper { position: absolute; inset: 20px 10px 10px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.bl-paper.p3 { transform: rotate(10deg) translate(22px, 4px); opacity: .55; }
.bl-paper.p2 { transform: rotate(4deg) translate(10px, 0); opacity: .8; }
.bl-paper.p1 { display: grid; align-content: start; gap: 11px; padding: 14px 14px 18px; box-shadow: var(--shadow-lg); transform: rotate(-5deg); animation: paper-float 7s ease-in-out infinite; }
.bl-paper-img { height: 112px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; position: relative; overflow: hidden; }
.bl-paper-img::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, .35), transparent 45%); }
.bl-paper-img svg { width: 46px; height: 46px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.bl-paper i { height: 10px; border-radius: 6px; background: var(--surface-2); }
.bl-paper .l1 { width: 85%; height: 13px; background: color-mix(in srgb, var(--brand) 22%, var(--surface-2)); }
.bl-paper .l2 { width: 95%; }
.bl-paper .l3 { width: 60%; }
.bl-spark { position: absolute; width: 18px; height: 18px; background: var(--sun); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 3.2s ease-in-out infinite; }
.bl-spark.s1 { top: 0; right: 24px; }
.bl-spark.s2 { bottom: 26px; left: -6px; width: 13px; height: 13px; background: var(--accent); animation-delay: 1.2s; }
@keyframes paper-float { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-9px); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.6) rotate(45deg); opacity: .6; } }

/* ---------- list ---------- */
.bl-main { padding: 6px 0 90px; background: var(--bg-soft); }
.bl-bar { position: sticky; top: 74px; z-index: 5; display: flex; align-items: center; gap: 16px; margin: 0 -20px 22px; padding: 12px 20px; background: color-mix(in srgb, var(--bg-soft) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bl-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.bl-cats::-webkit-scrollbar { display: none; }
.bl-chip { flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 700 .88rem var(--font); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.bl-chip:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); color: var(--text); }
.bl-chip:active { transform: scale(.96); }
.bl-chip[aria-pressed="true"] { background: var(--btn-bg); color: var(--on-brand); border-color: transparent; box-shadow: 0 8px 18px -10px var(--glow); }
.bl-count { margin: 0 0 0 auto; flex: none; color: var(--muted); font-weight: 700; font-size: .86rem; }

/* shared bits */
.bl-cat-pill { display: inline-flex; align-self: flex-start; justify-self: start; padding: 5px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .84rem; font-weight: 600; }
.bl-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.bl-min { display: inline-flex; align-items: center; gap: 5px; }
.bl-min svg { width: 15px; height: 15px; }

.bl-cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); }
.bl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transform: scale(1.03); transition: opacity .5s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.bl-cover.ld img { opacity: 1; transform: none; }
.bl-cover:not(.ld):not(.no-img)::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 60%, transparent) 50%, transparent 70%) var(--surface-2); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.bl-cover.no-img { display: grid; place-items: center; }
.bl-cover.tone-0.no-img { background: var(--grad); }
.bl-cover.tone-1.no-img { background: linear-gradient(135deg, #ff9a76, #f0607a 60%, #a24c9b); }
.bl-cover.tone-2.no-img { background: linear-gradient(135deg, #5bc0f0, #4b74e6 55%, #6a4fd8); }
.bl-cover.tone-3.no-img { background: linear-gradient(135deg, #ffcf5c, #f59e3b 55%, #e2673f); }
.bl-cover.no-img::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .35), transparent 40%), radial-gradient(circle at 85% 90%, rgba(255, 255, 255, .18), transparent 35%); }
.bl-cover-mark { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); transition: transform .5s cubic-bezier(.2, .8, .2, 1.4); }
.bl-cover-mark svg { width: 34px; height: 34px; }
.bl-photos { position: absolute; z-index: 2; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: rgba(8, 24, 26, .6); color: #fff; font-size: .76rem; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bl-photos svg { width: 14px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* featured (newest) article */
.bl-feature { display: grid; grid-template-columns: 1.15fr 1fr; margin-bottom: 26px; border-radius: 32px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .3s, box-shadow .3s; animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.bl-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bl-feature .bl-cover { aspect-ratio: auto; min-height: 340px; }
.bl-feature:hover .bl-cover.ld img, .bl-card:hover .bl-cover.ld img { transform: scale(1.05); }
.bl-feature:hover .bl-cover-mark, .bl-card:hover .bl-cover-mark { transform: scale(1.1) rotate(-6deg); }
.bl-feature-body { display: grid; align-content: center; justify-items: start; gap: 14px; padding: 38px 40px; }
.bl-feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-latest { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.bl-latest svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.bl-feature h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 0; }
.bl-feature .bl-excerpt { margin: 0; color: var(--text-2); font-size: 1.02rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bl-feature-btn { margin-top: 6px; pointer-events: none; }
.bl-feature-btn .bl-ic { display: inline-flex; }
.bl-feature:hover .bl-feature-btn svg { transform: translateX(4px); }

/* card grid */
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.bl-card { display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.bl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.bl-card:focus-visible, .bl-feature:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.bl-card-body { flex: 1; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: 18px 20px 18px; }
.bl-card h3 { margin: 0; font-size: 1.22rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.bl-card .bl-excerpt { margin: 0; color: var(--text-2); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--border); }
.bl-go { margin-left: auto; width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); transition: background .25s, color .25s, transform .25s; }
.bl-go svg { width: 17px; height: 17px; }
.bl-card:hover .bl-go { background: var(--brand); color: var(--on-brand); transform: rotate(-35deg); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* loading placeholders */
.bl-skel { pointer-events: none; animation: none; }
.bl-skel .bl-cover, .bl-skel i { background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface) 70%, var(--surface-2)) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.bl-skel .bl-card-body { grid-template-rows: none; }
.bl-skel i { display: block; height: 14px; border-radius: 8px; }
.bl-skel i:nth-child(1) { width: 30%; }
.bl-skel i:nth-child(2) { height: 20px; width: 90%; }
.bl-skel i:nth-child(3) { width: 70%; }

/* empty, no results and error */
.bl-state { display: grid; justify-items: center; gap: 6px; padding: 60px 20px; text-align: center; border-radius: 30px; border: 2px dashed var(--border); background: var(--surface); }
.bl-state-ic { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand); margin-bottom: 10px; animation: paper-float 6s ease-in-out infinite; }
.bl-state-ic svg { width: 32px; height: 32px; }
.bl-state h2 { margin: 0; font-size: 1.5rem; }
.bl-state p { margin: 0 0 12px; color: var(--text-2); max-width: 32em; }
.bl-state .btn[hidden] { display: none; }

/* ---------- one article ---------- */
.bl-article { padding-bottom: 0; }
.bl-a-wrap { max-width: 840px; }
.bl-a-hero { position: relative; isolation: isolate; overflow: clip; padding: 34px 0 34px; }
.bl-a-hero .b1 { width: 460px; height: 460px; top: -260px; left: 50%; transform: translateX(-50%); opacity: .55; }
.bl-a-hero .bl-a-wrap { display: grid; justify-items: start; gap: 14px; }
.bl-back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; margin-bottom: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 700; font-size: .88rem; text-decoration: none; box-shadow: var(--shadow-sm); transition: color .2s, border-color .2s; }
.bl-back svg { width: 18px; height: 18px; transition: transform .2s; }
.bl-back:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.bl-back:hover svg { transform: translateX(-3px); }
.bl-cat-pill[hidden], .bl-a-summary[hidden] { display: none; }
.bl-article h1 { margin: 0; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; outline: none; overflow-wrap: anywhere; }
html:lang(si) .bl-article h1, html:lang(ta) .bl-article h1 { line-height: 1.3; }
.bl-a-summary { margin: 0; font-size: 1.18rem; color: var(--text-2); line-height: 1.6; }
.bl-a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.bl-author { display: inline-flex; align-items: center; gap: 10px; margin-right: 6px; }
.bl-author .brand-mark { width: 40px; height: 40px; }
.bl-author > span:last-child { display: grid; line-height: 1.3; }
.bl-author b { font-size: .92rem; }
.bl-author small { color: var(--muted); font-size: .82rem; font-weight: 600; }
.bl-a-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 700 .84rem var(--font); }
.bl-a-chip svg { width: 16px; height: 16px; color: var(--brand); }
.bl-share { cursor: pointer; transition: border-color .2s, color .2s, transform .15s; }
.bl-share:hover { border-color: var(--brand); color: var(--brand); }
.bl-share:active { transform: scale(.96); }

.bl-a-cover { position: relative; display: block; width: 100%; max-height: 560px; aspect-ratio: 16 / 9; margin: 6px 0 34px; padding: 0; border: 0; border-radius: 30px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-lg); cursor: zoom-in; }
.bl-a-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transform: scale(1.03); transition: opacity .6s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.bl-a-cover.ld img { opacity: 1; transform: none; }
.bl-a-cover:hover.ld img { transform: scale(1.02); }
.bl-a-cover[hidden] { display: none; }

.bl-a-body { font-size: 1.1rem; line-height: 1.85; color: var(--text); overflow-wrap: anywhere; }
.bl-a-body > * { margin: 0 0 1.15em; }
.bl-a-body h2 { margin: 1.6em 0 .55em; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.25; display: flex; align-items: center; gap: 12px; }
.bl-a-body h2::before { content: ''; width: 6px; height: 1.1em; border-radius: 4px; background: var(--grad); flex: none; }
.bl-a-body h3 { margin: 1.4em 0 .5em; font-size: 1.25rem; }
.bl-a-body ul { list-style: none; padding: 18px 22px; display: grid; gap: 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.bl-a-body li { position: relative; padding-left: 30px; }
.bl-a-body li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7a73' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
/* a big first letter (Latin script only, it does not suit Sinhala or Tamil) */
html:lang(en) .bl-a-body > p:first-child::first-letter { float: left; font-family: var(--display); font-weight: 800; font-size: 3.6em; line-height: .9; margin: .06em .12em 0 0; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bl-line { display: block; height: 16px; margin: 0 0 14px; border-radius: 8px; background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface) 70%, var(--surface-2)) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.bl-line:nth-child(4) { width: 60%; }
.is-loading h1 { min-height: 1.1em; width: 70%; border-radius: 12px; background: var(--surface-2); }
.is-loading .bl-a-meta { visibility: hidden; }
.is-missing .bl-a-meta { display: none; }

/* photo grid */
.bl-gallery { margin: 40px 0 10px; }
.bl-gallery h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin: 0 0 16px; }
.bl-gallery h2 small { padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font: 800 .82rem var(--font); }
.bl-gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 12px; }
.bl-gallery-grid[data-n="2"] { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; }
.bl-gallery-grid[data-n="3"] { grid-template-columns: 2fr 1fr; grid-auto-rows: 170px; }
.bl-gallery-grid[data-n="3"] .bl-tile:first-child { grid-row: span 2; }
.bl-gallery-grid[data-n="4"] { grid-template-columns: repeat(3, 1fr); }
.bl-gallery-grid[data-n="4"] .bl-tile:first-child { grid-column: span 3; grid-row: span 2; }
.bl-gallery-grid[data-n="5"] .bl-tile:first-child { grid-column: span 2; grid-row: span 2; }
.bl-tile { position: relative; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 50ms); }
.bl-tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.bl-tile.ld img { opacity: 1; }
.bl-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35)); opacity: 0; transition: opacity .3s; }
.bl-tile-more { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: rgba(6, 22, 24, .55); color: #fff; font: 800 2rem var(--display); letter-spacing: -.02em; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); transition: background .3s; }
.bl-tile:hover .bl-tile-more { background: rgba(6, 22, 24, .4); }
.bl-tile:hover img { transform: scale(1.06); }
.bl-tile:hover::after { opacity: 1; }
.bl-tile:focus-visible, .bl-a-cover:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* call to action */
.bl-cta { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; align-items: center; margin: 50px 0 70px; padding: 34px 36px; border-radius: 30px; background: var(--grad); color: #fff; box-shadow: 0 30px 60px -30px var(--glow); }
.bl-cta::before { content: ''; position: absolute; z-index: -1; width: 320px; height: 320px; right: -80px; top: -150px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.bl-cta::after { content: ''; position: absolute; z-index: -1; width: 180px; height: 180px; left: 40%; bottom: -120px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.bl-cta-art { grid-row: span 2; width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); animation: paper-float 6s ease-in-out infinite; }
.bl-cta-art svg { width: 40px; height: 40px; }
.bl-cta h2 { margin: 0 0 4px; font-size: 1.55rem; color: #fff; }
.bl-cta p { margin: 0; color: rgba(255, 255, 255, .86); }
.bl-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bl-btn-outline { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); }
.bl-btn-outline:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }

/* more articles */
.bl-more { padding: 60px 0 80px; background: var(--bg-soft); border-top: 1px solid var(--border); }
.bl-more h2 { margin: 0 0 22px; font-size: 1.7rem; }

/* ---------- photo viewer ---------- */
body.lb-open { overflow: hidden; }
.bl-lightbox { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; grid-template-rows: 64px minmax(0, 1fr) auto; align-items: center; background: rgba(4, 12, 13, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; opacity: 0; transition: opacity .22s ease; touch-action: pan-y; }
.bl-lightbox.open { opacity: 1; }
.bl-lightbox[hidden] { display: none; }
.bl-lb-count { grid-column: 1 / 3; grid-row: 1; justify-self: start; margin: 0 0 0 22px; font-weight: 700; font-size: .92rem; color: rgba(255, 255, 255, .8); }
.bl-lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .15s; }
.bl-lb-btn:hover { background: rgba(255, 255, 255, .22); }
.bl-lb-btn:active { transform: scale(.94); }
.bl-lb-btn svg { width: 22px; height: 22px; }
.bl-lb-btn[hidden] { display: none; }
.bl-lb-close { grid-column: 3; grid-row: 1; justify-self: center; }
.bl-lb-prev { grid-column: 1; grid-row: 2; justify-self: center; }
.bl-lb-next { grid-column: 3; grid-row: 2; justify-self: center; }
.bl-lb-stage { position: relative; grid-column: 2; grid-row: 2; align-self: stretch; margin: 0; min-height: 0; }
.bl-lb-stage img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); opacity: 0; transform: scale(.97); transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1); user-select: none; -webkit-user-drag: none; }
.bl-lb-stage.ld img { opacity: 1; transform: none; }
.bl-lb-stage.from-right.ld img { animation: from-right .35s cubic-bezier(.2, .8, .2, 1); }
.bl-lb-stage.from-left.ld img { animation: from-left .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes from-right { from { transform: translateX(40px); opacity: .3; } }
@keyframes from-left { from { transform: translateX(-40px); opacity: .3; } }
.bl-lb-strip { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: safe center; gap: 8px; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none; }
.bl-lb-strip::-webkit-scrollbar { display: none; }
.bl-lb-strip[hidden] { display: none; }
.bl-lb-thumb { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .08); opacity: .5; cursor: pointer; transition: opacity .2s, border-color .2s, transform .2s; }
.bl-lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-lb-thumb:hover { opacity: .85; }
.bl-lb-thumb[aria-current="true"] { opacity: 1; border-color: #fff; transform: translateY(-2px); }

.bl-toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: .92rem; box-shadow: var(--shadow-lg); animation: toast-in .3s cubic-bezier(.2, .8, .2, 1.3); max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-toast.out { opacity: 0; transform: translate(-50%, 10px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .bl-hero { padding: 26px 0 46px; }
  .bl-hero-inner { grid-template-columns: 1fr; }
  .bl-art { display: none; }
  .bl-feature { grid-template-columns: 1fr; }
  .bl-feature .bl-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .bl-feature-body { padding: 24px 24px 28px; }
  .bl-cta { grid-template-columns: 1fr; padding: 30px 26px; }
  .bl-cta-art { grid-row: auto; width: 60px; height: 60px; border-radius: 20px; }
  .bl-cta-art svg { width: 32px; height: 32px; }
}
@media (max-width: 600px) {
  .bl-bar { margin: 0 -16px 18px; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .bl-cats { flex-basis: 100%; margin: 0 -16px; padding: 2px 16px; }
  .bl-count { margin: 0; }
  .bl-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .bl-feature { border-radius: 26px; }
  .bl-feature h2 { font-size: 1.5rem; }
  .bl-feature-btn { display: none; }
  .bl-a-hero { padding: 22px 0 24px; }
  .bl-a-summary { font-size: 1.06rem; }
  .bl-a-cover { border-radius: 22px; margin-bottom: 26px; }
  .bl-a-body { font-size: 1.04rem; line-height: 1.8; }
  .bl-a-body h2 { font-size: 1.35rem; }
  .bl-gallery-grid, .bl-gallery-grid[data-n] { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 8px; }
  .bl-gallery-grid[data-n] .bl-tile:first-child { grid-column: span 2; grid-row: span 2; }
  .bl-gallery-grid[data-n="2"] .bl-tile:first-child { grid-column: auto; grid-row: span 2; }
  .bl-gallery-grid[data-n="2"] .bl-tile:nth-child(2) { grid-row: span 2; }
  .bl-gallery-grid[data-n="4"] .bl-tile:last-child { grid-column: span 2; }
  .bl-cta { margin: 36px 0 50px; }
  .bl-cta-actions .btn { flex: 1 1 100%; }
  .bl-lightbox { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: 60px minmax(0, 1fr) auto; }
  .bl-lb-close { grid-column: 2; justify-self: end; margin-right: 14px; }
  .bl-lb-count { grid-column: 2; margin-left: 16px; }
  .bl-lb-prev, .bl-lb-next { display: none; }
  .bl-lb-stage { margin: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-card, .bl-feature, .bl-tile, .bl-paper.p1, .bl-spark, .bl-state-ic, .bl-cta-art { animation: none !important; }
  .bl-lb-stage img, .bl-cover img, .bl-a-cover img { transition: opacity .2s; transform: none !important; }
}
