/* Insights: listing and article pages. Built from the same tokens and components as the rest of the site. */

/* Listing */
.blog-hero .lede { margin-top: 20px; }
.blog-hero h1 { max-width: 20ch; }
.blog-tools { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 36px; }
.chips-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { font: inherit; font-size: 15px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text-mute); cursor: pointer; transition: background .16s, color .16s, border-color .16s; }
.chip-btn:hover { border-color: #CFCFDE; color: var(--text); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.search { position: relative; flex: 0 1 320px; }
.search input { width: 100%; font: inherit; font-size: 15px; padding: 11px 16px 11px 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); transition: border-color .16s, box-shadow .16s; }
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: none; border-color: var(--brand-3); box-shadow: 0 0 0 4px rgba(107, 47, 217, 0.12); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); pointer-events: none; }
@media (max-width: 700px) { .search { flex: 1 1 100%; } }

.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s var(--ease-out), box-shadow .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 32px 56px -32px rgba(0, 0, 0, 0.45); }
.post-card .media { aspect-ratio: 16 / 9; border-radius: 0; }
.post-card .body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-card .meta { font-size: 14px; color: var(--text-mute); }
.post-card .meta b { color: var(--brand-3); font-weight: 500; }
.dark .post-card h3 { color: var(--text); }
.post-card h3 { font-size: 24px; line-height: 1.3; }
.post-card p { color: var(--text-mute); font-size: 16px; line-height: 1.6; }
.post-card .link-arrow { margin-top: auto; padding-top: 6px; color: var(--brand-3); }
.post-card.wide { display: grid; grid-template-columns: 1fr 1.1fr; }
.post-card.wide .media { aspect-ratio: auto; min-height: 320px; }
.empty { text-align: center; color: var(--invert-mute); padding: 40px 0 0; font-size: 17px; }
@media (max-width: 860px) { .post-grid, .post-card.wide { grid-template-columns: 1fr; } .post-card.wide .media { min-height: 0; aspect-ratio: 16 / 9; } }

/* Article hero (uses .dp-hero from detail.css) */
.post-meta-line { margin-top: 22px; font-size: 15px; color: var(--text-mute); }
.post-meta-line b { color: var(--text); font-weight: 500; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-sm svg { width: 16px; height: 16px; }

/* Article body */
.post-body { padding: var(--section-y) 0; }
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); justify-content: center; gap: clamp(40px, 5vw, 80px); }
.toc { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
.toc h4 { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-3); margin-bottom: 12px; }
.toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); font-size: 14.5px; line-height: 1.4; color: var(--text-mute); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--text); }
.toc a.active { border-color: var(--brand-3); color: var(--text); font-weight: 500; }
@media (max-width: 1100px) { .post-layout { grid-template-columns: minmax(0, 760px); } .toc { display: none; } }

.prose { font-size: 18px; line-height: 1.75; color: #2B2B37; min-width: 0; }
.prose > * + * { margin-top: 20px; }
.prose .intro { font-size: 21px; line-height: 1.55; color: var(--text); }
.prose h2 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.2; margin-top: 56px; scroll-margin-top: 100px; }
.prose h3 { font-size: 21px; line-height: 1.3; margin-top: 36px; }
.prose h2 + *, .prose h3 + * { margin-top: 14px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a:not(.btn) { color: var(--brand-3); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose code { font-size: 0.9em; background: var(--paper-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose blockquote { margin: 32px 0 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--brand-3); font-size: 21px; line-height: 1.5; color: var(--text); font-weight: 500; }
.prose .note { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; font-size: 16.5px; line-height: 1.65; }
.prose .dp-list { margin-top: 18px; }
.prose .dp-list .row { grid-template-columns: 190px 1fr; padding: 18px 0; }
.prose .dp-list .row .k { font-size: 17px; }
.prose .dp-list .row .v p { font-size: 16.5px; }
.prose .check-list li { font-size: 17px; }
.prose figure { margin: 32px 0 0; }
.prose figcaption { font-size: 14.5px; color: var(--text-mute); margin-top: 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 600px; }
.table-wrap th { background: var(--paper-2); text-align: left; font-weight: 500; padding: 12px 16px; font-size: 14.5px; color: var(--text); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; color: var(--text-mute); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { color: var(--text); font-weight: 500; }
.table-wrap .yes { color: #17663A; font-weight: 500; }
.table-wrap .no { color: var(--text-faint); }
.table-note { font-size: 15px; color: var(--text-mute); line-height: 1.6; }

.steps-list { list-style: none; padding: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.steps-list li::before { content: counter(s, decimal-leading-zero); width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--brand-3); background: var(--wash-violet); }
.steps-list b { display: block; font-weight: 500; font-size: 17px; color: var(--text); line-height: 1.4; }
.steps-list span { display: block; font-size: 16px; color: var(--text-mute); line-height: 1.55; margin-top: 2px; }

.phase-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; counter-reset: p; }
.phase-list li { counter-increment: p; border-top: 2px solid var(--brand-3); padding-top: 12px; font-size: 16px; font-weight: 500; color: var(--text); margin: 0 !important; }
.phase-list li::before { content: counter(p, decimal-leading-zero); display: block; font-size: 13px; font-weight: 600; color: var(--brand-3); margin-bottom: 4px; }
@media (max-width: 700px) { .phase-list { grid-template-columns: repeat(3, 1fr); } }

.refs { padding-left: 22px; }
.refs li { font-size: 16.5px; }

/* Listing feedback */
#articles { scroll-margin-top: calc(var(--nav-h) + 8px); }
.post-count { font-size: 16px; color: var(--invert-mute); margin-top: 2px !important; }
.post-card[hidden] { display: none !important; }

/* ---------- Insights listing (v2): featured hero, topics, latest + rail, all articles ---------- */
.bl-hero { padding: calc(var(--nav-h) + 20px) 0 clamp(56px, 6vw, 88px); background: radial-gradient(55% 60% at 92% 0%, rgba(107, 47, 217, 0.09), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(249, 115, 22, 0.06), transparent 70%), #fff; border-bottom: 1px solid var(--line); }
.bl-bar { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 12px 18px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); margin-bottom: clamp(36px, 5vw, 64px); }
.bl-bar-title { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-3); }
.bl-bar-links { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-bar-links a { font-size: 15px; padding: 6px 12px; border-radius: 8px; color: var(--text-mute); transition: background .15s, color .15s; }
.bl-bar-links a:hover { background: #fff; color: var(--text); }
.bl-bar-all { margin-left: auto; font-size: 15px; font-weight: 500; color: var(--text); display: inline-flex; gap: 6px; }
.bl-bar-all:hover .arrow { transform: translateX(3px); }
.bl-bar-all .arrow { transition: transform .2s var(--ease-out); }

.bl-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.bl-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; }
.bl-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-brand); }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 15px; color: var(--text-mute); margin-top: 18px; }
.bl-meta b { font-weight: 500; color: var(--brand-3); }
.bl-meta span::before { content: '·'; margin-right: 14px; color: var(--text-faint); }
.dark .bl-meta { color: var(--invert-mute); }
.dark .bl-meta b { color: var(--violet-soft); }
.bl-feature h1 { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.08; margin-top: 12px; max-width: 18ch; }
.bl-feature h1 a:hover { color: var(--brand-3); }
.bl-feature .lede { margin-top: 18px; }
.bl-inside { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bl-inside li { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 6px 12px; border-radius: 999px; background: var(--wash-violet); color: var(--brand-3); font-weight: 500; }
.bl-inside li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--grad-brand); }
.dark .bl-inside li { background: rgba(199, 182, 255, 0.12); color: var(--violet-soft); }
.bl-feature-media { position: relative; display: block; }
.bl-feature-media .media { aspect-ratio: 3 / 2; border-radius: 24px; box-shadow: 0 40px 80px -44px rgba(43, 21, 104, 0.45); }
.bl-float { position: absolute; left: -22px; bottom: 28px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(20, 20, 40, 0.3); animation: float 6s ease-in-out infinite; }
.bl-float .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-brand); color: #fff; flex: none; }
.bl-float .ic svg { width: 22px; height: 22px; }
.bl-float strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.bl-float span { font-size: 13.5px; color: var(--text-mute); }

.bl-topics-sec { background: #fff; }
.bl-topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bl-topic { position: relative; overflow: hidden; min-height: 200px; padding: 22px; border-radius: 20px; display: flex; flex-direction: column; color: #fff; isolation: isolate; transition: transform .35s var(--ease-pop), box-shadow .3s; }
.bl-topic::before { content: ''; position: absolute; inset: 0; z-index: -1; transition: transform .8s var(--ease-out); }
.bl-topic::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%); transition: transform .8s var(--ease-out); }
.t-ebs::before { background: linear-gradient(140deg, #2C1568 0%, #6B2FD9 60%, #B84FC9 100%); }
.t-db::before { background: linear-gradient(140deg, #3A1405 0%, #C2410C 45%, #F97316 100%); }
.t-cloud::before { background: linear-gradient(140deg, #0B1E3F 0%, #1D4ED8 60%, #4A9EFF 100%); }
.t-ai::before { background: linear-gradient(140deg, #15151F 0%, #4B1D6B 50%, #B84FC9 100%); }
a.bl-topic:hover { transform: translateY(-5px); box-shadow: 0 30px 50px -28px rgba(43, 21, 104, 0.55); }
a.bl-topic:hover::before { transform: scale(1.06); }
a.bl-topic:hover::after { transform: scale(1.3); }
.bl-topic-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.24); backdrop-filter: blur(6px); }
.bl-topic-ic svg { width: 26px; height: 26px; }
.bl-topic-name { margin-top: auto; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.bl-topic-count { font-size: 15px; color: rgba(255, 255, 255, 0.78); margin-top: 2px; }
.bl-topic.soon { filter: saturate(0.35); opacity: 0.72; cursor: default; }

.bl-latest { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.bl-lead { display: block; border-radius: 22px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line-dark); transition: transform .3s var(--ease-out), border-color .3s; }
.bl-lead:hover { transform: translateY(-4px); border-color: rgba(199, 182, 255, 0.35); }
.bl-lead .media { aspect-ratio: 16 / 9; border-radius: 0; }
.bl-lead-body { padding: clamp(24px, 3vw, 36px); }
.bl-lead-body .bl-meta { margin-top: 0; }
.bl-lead h3 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; margin-top: 12px; color: #fff; }
.bl-lead p { margin-top: 12px; font-size: 17px; line-height: 1.65; color: var(--invert-mute); max-width: 62ch; }
.bl-lead .link-arrow { margin-top: 22px; }
.bl-rail { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-h) + 24px); }
.bl-panel { padding: 22px; border-radius: 20px; background: var(--ink-2); border: 1px solid var(--line-dark); }
.bl-panel h4 { font-size: 18px; color: #fff; margin-bottom: 12px; }
.bl-mini { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-dark); }
.bl-mini:first-of-type { border-top: 0; padding-top: 0; }
.bl-mini .thumb { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--ink-3); }
.bl-mini .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.bl-mini:hover .thumb img { transform: scale(1.06); }
.bl-mini b { display: block; font-size: 16px; font-weight: 500; line-height: 1.35; color: #fff; }
.bl-mini:hover b { color: var(--violet-soft); }
.bl-mini small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--invert-mute); }
.bl-topic-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-dark); font-size: 16px; color: var(--invert); transition: color .15s; }
.bl-topic-row:first-of-type { border-top: 0; padding-top: 2px; }
.bl-topic-row:hover { color: var(--violet-soft); }
.bl-topic-row span { min-width: 30px; text-align: center; padding: 2px 10px; border-radius: 999px; font-size: 14px; background: rgba(199, 182, 255, 0.14); color: var(--violet-soft); }
.bl-panel-cta { background: var(--grad-glow); }
.bl-panel-cta h4 { margin: 12px 0 8px; font-size: 20px; line-height: 1.3; }
.bl-panel-cta p { font-size: 15.5px; color: var(--invert-mute); line-height: 1.6; }
.bl-panel-cta .btn { margin-top: 16px; }

.bl-all-sec { background: #fff; scroll-margin-top: calc(var(--nav-h) + 8px); }
.bl-all-sec .blog-tools { margin: 0 0 28px; }
.bl-all-sec .post-count, .bl-all-sec .empty { color: var(--text-mute); }
.bl-grid { grid-template-columns: repeat(3, 1fr); }
.bl-grid .post-card:hover { box-shadow: 0 32px 56px -32px rgba(43, 21, 104, 0.3); }
.bl-grid .post-card h3 { font-size: 22px; }
.bl-suggest { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius-lg); border: 1.5px dashed #D9CCFF; background: linear-gradient(160deg, var(--wash-violet), #fff 70%); transition: transform .3s var(--ease-out), border-color .3s; }
.bl-suggest:hover { transform: translateY(-4px); border-color: var(--brand-3); }
.bl-suggest-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-brand); color: #fff; }
.bl-suggest-ic svg { width: 26px; height: 26px; }
.bl-suggest h3 { font-size: 22px; margin-top: 8px; }
.bl-suggest p { color: var(--text-mute); font-size: 16px; line-height: 1.6; }
.bl-suggest .link-arrow { margin-top: auto; }

@media (max-width: 1080px) { .bl-topics { grid-template-columns: repeat(2, 1fr); } .bl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) { .bl-feature, .bl-latest { grid-template-columns: 1fr; } .bl-rail { position: static; } .bl-float { left: 12px; bottom: 12px; } }
@media (max-width: 640px) { .bl-grid, .bl-topics { grid-template-columns: 1fr; } .bl-topic { min-height: 150px; } .bl-bar-all { margin-left: 0; } .bl-float strong { font-size: 15px; } .bl-float span { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .bl-float { animation: none; } }

/* Listing v2 polish */
.bl-feature h1 em { white-space: nowrap; }
@media (max-width: 640px) {
  .bl-bar { flex-wrap: nowrap; overflow-x: auto; gap: 14px; padding: 10px 14px; margin-bottom: 32px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .bl-bar::-webkit-scrollbar { display: none; }
  .bl-bar-title, .bl-bar-links a, .bl-bar-all { white-space: nowrap; flex: none; }
  .bl-bar-links { flex-wrap: nowrap; }
  .bl-meta { flex-wrap: nowrap; gap: 8px; font-size: 13.5px; }
  .bl-meta span::before { margin-right: 8px; }
}

/* Monochrome accents (violet only on primary buttons) */
.toc a.active, .toc a:hover, .prose a, .bl-card .k, .bp-meta a, .crumbs a:hover { color: #111114 !important; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.toc a.active { border-left-color: #111114 !important; }
.toc .toc-title, .toc > span, .toc-h, .bp-toc-title, [class*="toc"] > :first-child { color: #111114 !important; }
.toc h4 { color: #111114 !important; }
