/* Blog v5: cards with designed covers, short-answer box, library grid. Loaded after blog.css / blog3.css / art.css. */
.ag-art { display: block; overflow: hidden; }
.ag-art .cv { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.ag-card, .bn5-l, .bn5-tool { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px #eee4d8, 0 30px 50px -44px rgba(60, 40, 20, .45); text-decoration: none; color: inherit; transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.ag-card:hover, .bn5-l:hover, .bn5-tool:hover { transform: translateY(-6px); box-shadow: 0 0 0 1.5px #f7a24e, 0 40px 60px -40px rgba(247, 134, 30, .5); }
.ag-card:hover .cv, .bn5-l:hover .cv { transform: scale(1.04); }
.ag-card .bx-body > b { font-size: 18.5px; line-height: 1.3; color: #12212f; }
.ag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ag-grid.lib { gap: 24px; }
.bx-hide { display: none !important; }

/* start-here bento */
.bn5-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; grid-template-areas: "l l a b" "l l c t"; }
.bn5-l { grid-area: l; }
.bn5-l .bx-body { padding: 26px 28px 28px; gap: 12px; }
.bn5-l .bx-body > b { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -.03em; color: #12212f; }
.bn5-l .btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.bn5-s:nth-of-type(2) { grid-area: a; } .bn5-s:nth-of-type(3) { grid-area: b; } .bn5-s:nth-of-type(4) { grid-area: c; }
.bn5-tool { grid-area: t; background: linear-gradient(160deg, #fff7ee, #ffe6c9); box-shadow: 0 0 0 1px #f3d4ae, 0 30px 50px -44px rgba(247, 134, 30, .6); }
.bn5-tool .bn-ico { display: grid; place-items: center; width: 60px; height: 60px; margin: 24px 0 0 24px; border-radius: 18px; background: linear-gradient(135deg, #ffa24a, #f7861e); color: #fff; box-shadow: 0 16px 30px -12px rgba(247, 134, 30, .9); }
.bn5-tool .bx-body > b { font-size: 19px; color: #12212f; }
.bn5-pilot { display: flex; min-height: 240px; border-radius: 28px; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.bn5-pilot .bn-body { display: flex; flex-direction: column; gap: 12px; }
.bn5-pilot .bn-body > b { font-size: clamp(24px, 2.4vw, 34px); color: #12212f; }
.bn5-pilot .btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; }
.bn-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.bn-top h2 { margin: 12px 0 0; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -.035em; color: #12212f; }
.bx-sec .bx-bar { position: static; margin: 0; }

/* hero stack uses covers */
.hs-img { display: block; padding: 0 !important; background: none !important; aspect-ratio: auto !important; }

/* article: cover + short answer */
.ba-cover5 { max-width: 1100px; margin: clamp(32px, 4vw, 48px) auto 0; border-radius: 32px; overflow: hidden; box-shadow: 0 0 0 1px rgba(16, 33, 47, .06), 0 60px 100px -60px rgba(120, 70, 20, .6); }
.ba-cover5 .cv { aspect-ratio: 16 / 7.2; }
.ba-short { position: relative; margin: 0 0 40px; padding: 26px 28px 24px; border-radius: 22px; background: linear-gradient(135deg, #fff7ee, #fff1e1); box-shadow: inset 4px 0 0 #f7861e, 0 0 0 1px #f6dcbc; }
.ba-short-k { display: inline-flex; align-items: center; gap: 8px; font: 800 12px/1 var(--mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; color: #c25e00; }
.ba-short-k i { font-style: normal; }
.bl-art .ba-short p { margin: 12px 0 0; font-size: 18px !important; line-height: 1.7 !important; color: #12212f; }
.ba-art-body > .ba-short + h2 { border-top: 0; padding-top: 0; }
.ba-art-body > p:first-of-type::first-letter { float: none; margin: 0; font-size: inherit; color: inherit; }
.bl-art .ba-note { margin-top: 18px !important; padding: 16px 18px; border-radius: 14px; background: #f6f8fa; box-shadow: inset 0 0 0 1px #e6ebf0; font-size: 15.5px !important; }
.ba-chiplist { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.ba-chiplist li { padding: 9px 14px 9px 14px !important; border-radius: 99px !important; background: #fff1e2 !important; box-shadow: inset 0 0 0 1px #f6d3ad !important; font-weight: 600; color: #c25e00; font-size: 14.5px !important; }
.ba-chiplist li::before { display: none !important; }
.bl-art .rs-eq { flex-wrap: wrap; }

@media (max-width: 1100px) { .bn5-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "l l" "a b" "c t"; } }
@media (max-width: 1000px) { .ag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ba-cover5 .cv { aspect-ratio: 16 / 10; } }
@media (max-width: 640px) { .ag-grid, .bn5-grid { grid-template-columns: 1fr; grid-template-areas: "l" "a" "b" "c" "t"; } .ba-cover5 { border-radius: 20px; } }

/* ===== Editorial cards (like the reference): clean cover, pill + date, title, summary, hover motion ===== */
.ag-card { border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.ag-card:hover { transform: none; box-shadow: none; }
.ag-card .ag-art { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px #efe6da, 0 26px 44px -34px rgba(60, 40, 20, .45); transition: box-shadow .45s, transform .45s cubic-bezier(.2, .8, .2, 1); }
.ag-card:hover .ag-art { transform: translateY(-6px); box-shadow: 0 0 0 1.5px #f7a24e, 0 36px 60px -36px rgba(247, 134, 30, .55); }
.ag-card .ag-art .cv { transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.ag-card:hover .ag-art .cv { transform: scale(1.07) rotate(-.6deg); }
.ag-go { position: absolute; right: 14px; bottom: 14px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #12212f; color: #fff; opacity: 0; transform: translateY(10px) scale(.8) rotate(-45deg); transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1), background .3s; }
.ag-card:hover .ag-go { opacity: 1; transform: none; background: #f7861e; }
.ag-card .bx-body { padding: 18px 2px 4px; gap: 10px; }
.ag-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ag-meta em { padding: 7px 14px; border-radius: 99px; background: #f3efe9; font-style: normal; font-size: 13.5px; font-weight: 600; color: #12212f; transition: background .3s, color .3s; }
.ag-card:hover .ag-meta em { background: #fff1e2; color: #c25e00; }
.ag-meta time { font-size: 14px; color: #7a8693; }
.ag-meta small { margin-left: auto; font-size: 13px; color: #9aa4af; }
.ag-card .bx-body > b { display: inline; font-size: clamp(19px, 1.5vw, 22px); line-height: 1.35; letter-spacing: -.015em; background: linear-gradient(#f7861e, #f7861e) 0 100% / 0 2px no-repeat; transition: background-size .5s cubic-bezier(.2, .8, .2, 1), color .3s; padding-bottom: 2px; }
.ag-card:hover .bx-body > b { background-size: 100% 2px; color: #12212f; }
.ag-card .bx-desc { font-size: 15.5px; line-height: 1.65; color: #6b7886; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ag-card .bx-go { display: none; }
.ag-grid { column-gap: 32px; row-gap: 44px; }
/* scroll-in: cards rise one after another */
.js .ag-card { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); }
.js .ag-card.in { opacity: 1; transform: none; }
.js .ag-card.in:hover { transform: none; }
@media (prefers-reduced-motion: reduce) { .js .ag-card { opacity: 1; transform: none; } .ag-card *, .ag-card { transition: none !important; } }
.hs-card .hs-img { display: block !important; width: 100%; padding: 0 !important; }
.hs-card .hs-img .cv { width: 100%; }
.bx-bar { row-gap: 4px; }
/* article hero cover: same proportions as the cards, so every scene fits */
.ba-cover5 { max-width: 880px; }
.ba-cover5 .cv { aspect-ratio: 16 / 10 !important; }
.ba-art-body > p:first-of-type::first-letter { all: unset; }

/* ===== v4: one joined card (cover + text in the same box), equal heights, clean alignment ===== */
.ag-grid { align-items: stretch; column-gap: 24px; row-gap: 28px; }
.ag-card, .bn5-l, .bn5-tool { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px #eee4d8, 0 26px 44px -36px rgba(60, 40, 20, .45); }
.ag-card:hover, .bn5-l:hover, .bn5-tool:hover { transform: translateY(-6px); box-shadow: 0 0 0 1.5px #f7a24e, 0 36px 60px -36px rgba(247, 134, 30, .5); }
.js .ag-card.in:hover { transform: translateY(-6px); }
.ag-card .ag-art { border-radius: 0; box-shadow: none; transform: none !important; flex: none; }
.ag-card:hover .ag-art { box-shadow: none; }
.ag-card .bx-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 18px 22px 22px; }
.ag-meta { flex-wrap: nowrap; gap: 8px; white-space: nowrap; }
.ag-meta em { padding: 6px 12px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.ag-meta time { font-size: 13px; }
.ag-meta small { font-size: 12.5px; }
.ag-card .bx-body > b { display: block; font-size: 19px; line-height: 1.32; background: none; padding: 0; }
.ag-card:hover .bx-body > b { color: #c25e00; }
.ag-card .bx-desc { -webkit-line-clamp: 2; font-size: 15px; }
.ag-card .bx-go { display: inline-flex; margin-top: auto; padding-top: 4px; font-size: 14px; }
.ag-go { display: none; }
/* start here: big card left, four equal boxes right */
.bn5-grid { grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: 1fr 1fr; grid-template-areas: "l a b" "l c t"; align-items: stretch; gap: 22px; }
.bn5-l .ag-art { flex: none; }
.bn5-l .bx-body { flex: 1; justify-content: flex-start; }
.bn5-grid .ag-card .bx-meta, .bn5-grid .ag-card .ag-meta time { display: none; }
.bn5-grid .ag-card .bx-body > b { font-size: 17.5px; }
.bn5-grid .ag-card .bx-desc { display: none; }
.bn5-tool .bn-ico { margin: 22px 0 0 22px; }
.bn5-tool .bx-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bn5-tool .bx-go { margin-top: auto; }
@media (max-width: 1100px) { .bn5-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; grid-template-areas: "l l" "a b" "c t"; } }
@media (max-width: 640px) { .bn5-grid { grid-template-columns: 1fr; grid-template-areas: "l" "a" "b" "c" "t"; } }
/* start-here: equal rows, the big card's cover fills the spare height */
.bn5-grid .ag-card .ag-art { height: 170px; position: relative; }
.bn5-grid .ag-card .ag-art .cv { position: absolute; left: 50%; top: 50%; width: 100%; translate: -50% -50%; }
.bn5-l .ag-art { flex: 1; min-height: 300px; position: relative; }
.bn5-l .ag-art .cv { position: absolute; inset: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.bn5-l .bx-body { flex: none; }
.bn5-tool .bx-body > b { font-size: 17.5px; }

/* ===== v5: one library section: centred head, one-line filters, featured card inside the grid ===== */
.ag-sec { background: linear-gradient(180deg, #fff 0, #fffaf4 340px, #fffaf4); }
.ag-head { display: grid; justify-items: center; text-align: center; max-width: 720px; margin: 0 auto; }
.ag-head h2 { margin: 14px 0 0; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.04em; color: #12212f; }
.ag-head p { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: #5a6878; }
.ag-bar-w { position: sticky; top: 86px; z-index: 6; display: flex; justify-content: center; margin: 30px 0 34px; }
.ag-bar-w .bx-bar { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin: 0; scrollbar-width: none; }
.ag-bar-w .bx-bar::-webkit-scrollbar { display: none; }
.ag-bar-w .bx-f { white-space: nowrap; flex: none; height: 38px; padding: 0 14px; font-size: 13.5px; }
/* featured card: spans two columns, cover beside the text */
.ag-grid.lib .ag-feat { grid-column: span 2; flex-direction: row; }
.ag-grid.lib .ag-feat .ag-art { flex: 0 0 56%; position: relative; }
.ag-grid.lib .ag-feat .ag-art .cv { position: absolute; inset: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.ag-grid.lib .ag-feat .bx-body { justify-content: center; padding: 30px 32px; }
.ag-grid.lib .ag-feat .bx-body > b { font-size: clamp(22px, 2vw, 30px); line-height: 1.18; letter-spacing: -.025em; }
.ag-grid.lib .ag-feat .bx-desc { -webkit-line-clamp: 4; font-size: 16px; }
.ag-grid.lib .ag-feat .bx-go { margin-top: 8px; }
.ag-star { background: #12212f !important; color: #fff !important; }
.ag-grid.lib.filtering .ag-feat { grid-column: auto; flex-direction: column; }
.ag-grid.lib.filtering .ag-feat .ag-art { flex: none; } .ag-grid.lib.filtering .ag-feat .ag-art .cv { position: relative; aspect-ratio: 16 / 10; height: auto; }
.ag-grid.lib.filtering .ag-star, .ag-grid.lib.filtering .ag-tool { display: none !important; }
/* tool tile inside the grid */
.ag-tool { background: radial-gradient(ellipse at 100% 0%, #ffd29c, transparent 60%), linear-gradient(160deg, #fff7ee, #ffe6c9); box-shadow: 0 0 0 1px #f3d4ae, 0 26px 44px -36px rgba(247, 134, 30, .55); }
.ag-tool-in { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 28px 26px 26px; }
.ag-tool .bn-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: linear-gradient(135deg, #ffa24a, #f7861e); color: #fff; box-shadow: 0 16px 30px -12px rgba(247, 134, 30, .9); margin-bottom: 6px; }
.ag-tool b { font-size: 22px; line-height: 1.25; color: #12212f; }
.ag-tool .bx-desc { display: block; font-size: 15.5px; line-height: 1.6; color: #5a6878; }
.ag-tool .bx-go { display: inline-flex; margin-top: auto; color: #c25e00; font-weight: 700; }
@media (max-width: 1000px) { .ag-grid.lib .ag-feat { grid-column: span 2; } }
@media (max-width: 640px) { .ag-grid.lib .ag-feat { grid-column: auto; flex-direction: column; } .ag-grid.lib .ag-feat .ag-art { flex: none; } .ag-grid.lib .ag-feat .ag-art .cv { position: relative; aspect-ratio: 16 / 10; height: auto; } .ag-bar-w { top: 72px; } }
.ag-bar-w { position: static; margin: 28px 0 36px; }
.ag-bar-w .bx-bar { flex-wrap: wrap; justify-content: center; gap: 10px; overflow: visible; width: auto; padding: 0; background: none; box-shadow: none; backdrop-filter: none; border-radius: 0; }
.ag-bar-w .bx-f { height: 40px; padding: 0 16px; background: #fff; box-shadow: 0 0 0 1px #eadfd3; border-radius: 99px; }
.ag-bar-w .bx-f:hover { box-shadow: 0 0 0 1px #f7a24e; color: #c25e00; background: #fff; }
.ag-bar-w .bx-f.on { box-shadow: 0 10px 20px -10px rgba(247, 134, 30, .8); }
.ag-grid.lib .ag-feat .ag-art { flex: 0 0 50%; }
.ag-grid.lib .ag-feat .bx-body { min-width: 0; padding: 30px 30px; }
.ag-grid.lib .ag-feat .ag-meta { flex-wrap: wrap; }
.ag-grid.lib .ag-feat .ag-meta small { margin-left: 0; }
.ag-head p { max-width: 560px; }
.ag-bar-w .bx-f.on, .ag-bar-w .bx-f.on:hover { background: linear-gradient(135deg, #ffa24a, #f7861e); color: #fff; box-shadow: 0 10px 20px -10px rgba(247, 134, 30, .8); }

/* ===== use the site-wide page width (.wrap = 1450px) on every blog page ===== */
.bx-sec .wrap, .ba-more .wrap, .ag-sec .wrap { max-width: 1450px; }
.bh-hw { max-width: 1450px; }
.ba-grid { max-width: 1450px; grid-template-columns: 260px minmax(0, 780px) 280px; justify-content: space-between; }
.ba-cover5 { max-width: 1000px; }
.ag-grid { column-gap: 28px; row-gap: 32px; }
.ag-head { max-width: 820px; }
.ag-head p { max-width: 640px; }
/* featured card a little taller so the cover has room */
.ag-grid.lib .ag-feat .ag-art { flex: 0 0 52%; min-height: 380px; }
.ag-grid.lib .ag-feat .bx-body { padding: 36px 40px; }
@media (max-width: 1240px) { .ba-grid { grid-template-columns: 230px minmax(0, 780px); justify-content: center; } }
