/* ============================================================
   Braindoos — Insights / Blog
   Extends styles.css + styles-sections.css tokens.
   New components: .inhero, .infilter, .infeat, .ingrid/.incard,
   and article page: .arthero, .prose, .artshare, .artbio, .artrel
   --cat-accent drives the category pills (overridable via Tweaks)
   ============================================================ */

:root { --cat-accent: #22D3EE; --cat-accent-ink: #042B33; }

/* ---------- HERO (navy, centered) ---------- */
.inhero { position: relative; background: var(--navy-900); color: #fff; padding: calc(var(--nav-h) + 72px) 0 60px; overflow: hidden; }
.inhero__bg { position: absolute; inset: 0; background:
  radial-gradient(820px 520px at 80% 12%, rgba(34,211,238,.15), transparent 60%),
  radial-gradient(720px 540px at 8% 100%, rgba(59,91,196,.28), transparent 62%),
  linear-gradient(180deg, var(--navy-900), var(--navy-800) 80%); }
.inhero__grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(120% 100% at 50% 0%, #000 28%, transparent 78%); -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 28%, transparent 78%); }
.inhero .wrap { position: relative; z-index: 2; }
.inhero__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.inhero__badge { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 100px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.inhero h1 { color: #fff; font-size: 54px; letter-spacing: -0.03em; margin-top: 22px; }
.inhero h1 .grad { background: linear-gradient(100deg, #6FE9FB, var(--accent) 50%, #7C8FF0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.inhero__sub { margin: 22px auto 0; font-size: 19.5px; line-height: 1.62; color: rgba(225,233,250,.78); max-width: 580px; }

/* ---------- CATEGORY FILTER BAR ---------- */
.infilter { position: sticky; top: var(--nav-h); z-index: 40; background: rgba(255,255,255,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.infilter__inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 0; }
.infilter__lbl { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.inchip {
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 9px 18px; border-radius: 100px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink-700);
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.inchip:hover { border-color: var(--primary-400); transform: translateY(-1px); }
.inchip[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 6px 16px rgba(11,42,107,.22); }

/* category pill (on cards / hero) */
.catpill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 100px; font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: color-mix(in srgb, var(--cat-accent) 16%, transparent); color: color-mix(in srgb, var(--cat-accent) 72%, #062330); border: 1px solid color-mix(in srgb, var(--cat-accent) 30%, transparent); }
.catpill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cat-accent); flex: 0 0 auto; }
.catpill--onimg { background: rgba(6,15,43,.5); color: #fff; border-color: rgba(255,255,255,.24); backdrop-filter: blur(6px); }
.catpill--onimg::before { background: var(--cat-accent); }

/* ---------- FEATURED LEAD CARD ---------- */
.infeat { background: var(--bg); padding: 56px 0 18px; }
.infeat__inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 0; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); background: var(--bg); transition: transform .25s ease, box-shadow .3s ease; }
.infeat__inner:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.infeat__media { position: relative; min-height: 420px; }
.infeat__media .catpill { position: absolute; top: 22px; left: 22px; }
.infeat__media .ph-label { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-display); font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.72); background: rgba(6,15,43,.5); padding: 5px 10px; border-radius: 8px; }
.infeat__body { padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.infeat__flag { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-600); display: inline-flex; align-items: center; gap: 8px; }
.infeat__flag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-600); box-shadow: 0 0 0 4px rgba(34,211,238,.18); }
.infeat__body h2 { font-size: 38px; line-height: 1.1; margin-top: 18px; }
.infeat__body h2 a { color: inherit; }
.infeat__body h2 a:hover { color: var(--primary-600); }
.infeat__dek { margin-top: 16px; font-size: 17.5px; color: var(--muted); line-height: 1.6; }
.infeat__foot { margin-top: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* author meta (shared) */
.meta { display: flex; align-items: center; gap: 11px; }
.meta__avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(160deg, var(--primary-400), var(--accent-600)); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 14px; flex: 0 0 auto; }
.meta__who { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.meta__who span { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.meta__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

/* ---------- ARTICLE GRID ---------- */
.ingrid-sec { background: var(--bg); padding: 40px 0 110px; }
.ingrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ingrid--cozy { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.incard { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .3s ease; }
.incard:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.incard.is-hidden { display: none; }
.incard__media { position: relative; aspect-ratio: 16 / 10; }
.incard__media .catpill { position: absolute; top: 14px; left: 14px; }
.incard__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.ingrid--cozy .incard__body { padding: 18px 18px 20px; }
.incard__title { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; line-height: 1.22; }
.ingrid--cozy .incard__title { font-size: 18px; }
.incard__title a { color: inherit; }
.incard__title a:hover { color: var(--primary-600); }
.incard__dek { margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.incard__foot { margin-top: auto; padding-top: 20px; }
.incard .meta__avatar { width: 34px; height: 34px; font-size: 12.5px; }
.incard .meta__who { font-size: 13.5px; }
.incard .meta__who span { font-size: 12px; }

/* tweak: hide featured lead (wins over the filter JS inline display) */
body.no-featured #featured { display: none !important; }

/* empty state */
.in-empty { display: none; text-align: center; padding: 60px 20px; color: var(--muted); }
.in-empty.is-shown { display: block; }
.in-empty h3 { font-size: 22px; color: var(--ink); }
.in-empty p { margin-top: 8px; font-size: 16px; }

/* striped placeholder tints for insight cards */
.ph--i1 { background-color: #0E2A55; }
.ph--i2 { background-color: #122144; }
.ph--i3 { background-color: #14284f; }
.ph--i4 { background-color: #0D2347; }
.ph--i5 { background-color: #182a52; }
.ph--i6 { background-color: #102a4e; }
.ph--i7 { background-color: #13284a; }

/* placeholder flag (dev note) */
.ph-note { margin-top: 14px; padding: 14px 18px; border-radius: var(--r-sm); background: #FFF7E6; border: 1px solid #F2D894; color: #7A5A00; font-size: 13.5px; font-weight: 600; }
.ph-note b { font-weight: 800; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.arthero { position: relative; background: var(--navy-900); color: #fff; padding: calc(var(--nav-h) + 64px) 0 56px; overflow: hidden; }
.arthero__bg { position: absolute; inset: 0; background:
  radial-gradient(760px 480px at 78% 10%, rgba(34,211,238,.14), transparent 60%),
  radial-gradient(680px 520px at 6% 100%, rgba(59,91,196,.26), transparent 62%),
  linear-gradient(180deg, var(--navy-900), var(--navy-800) 86%); }
.arthero__grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(120% 100% at 50% 0%, #000 28%, transparent 78%); -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 28%, transparent 78%); }
.arthero .wrap { position: relative; z-index: 2; }
.arthero__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.arthero__crumb { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: rgba(225,233,250,.62); }
.arthero__crumb a { color: rgba(225,233,250,.62); }
.arthero__crumb a:hover { color: var(--accent); }
.arthero__crumb svg { width: 14px; height: 14px; }
.arthero h1 { color: #fff; font-size: 46px; letter-spacing: -0.03em; line-height: 1.1; margin-top: 20px; }
.arthero__meta { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; color: rgba(225,233,250,.72); font-size: 14.5px; }
.arthero__meta .meta__avatar { width: 38px; height: 38px; }
.arthero__meta .meta__who { color: #fff; }
.arthero__meta .meta__who span { color: rgba(225,233,250,.6); }
.arthero__meta .meta__dot { background: rgba(255,255,255,.28); }

/* cover image placeholder */
.artcover { background: var(--bg); }
.artcover__inner { max-width: 1000px; margin: -40px auto 0; position: relative; z-index: 3; }
.artcover__img { position: relative; aspect-ratio: 21 / 9; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.artcover__img .ph-label { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-display); font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.72); background: rgba(6,15,43,.5); padding: 5px 10px; border-radius: 8px; }

/* reading column */
.artbody { background: var(--bg); padding: 56px 0 96px; }
.prose { max-width: 720px; margin: 0 auto; }
.prose > .ph-note { margin-bottom: 28px; }
.prose .lead { font-size: 22px; line-height: 1.5; color: var(--ink-700); font-weight: 500; }
.prose p { font-size: 18px; line-height: 1.75; color: var(--ink-700); margin-top: 22px; }
.prose h2 { font-size: 30px; margin-top: 48px; letter-spacing: -0.02em; }
.prose h3 { font-size: 22px; margin-top: 34px; }
.prose h2 + p, .prose h3 + p { margin-top: 14px; }
.prose a { color: var(--primary-600); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(34,211,238,.5); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose a:hover { color: var(--accent-600); }
.prose ul, .prose ol { margin: 22px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.prose ul li { position: relative; padding-left: 32px; font-size: 17.5px; line-height: 1.65; color: var(--ink-700); }
.prose ul li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-600); box-shadow: 0 0 0 4px rgba(34,211,238,.16); }
.prose ol { counter-reset: pc; }
.prose ol li { position: relative; padding-left: 44px; font-size: 17.5px; line-height: 1.65; color: var(--ink-700); counter-increment: pc; }
.prose ol li::before { content: counter(pc); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 9px; background: var(--panel-2); color: var(--primary); font-family: var(--font-display); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.prose li strong { color: var(--ink); font-weight: 700; }

.prose blockquote { margin: 38px 0 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--accent); }
.prose blockquote p { font-family: var(--font-display); font-weight: 500; font-size: 25px; line-height: 1.34; letter-spacing: -0.02em; color: var(--ink); margin-top: 0; }
.prose blockquote cite { display: block; margin-top: 14px; font-style: normal; font-size: 14.5px; font-weight: 600; color: var(--muted); }

/* callout / code style */
.callout { margin: 34px 0 0; padding: 24px 26px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); display: flex; gap: 16px; }
.callout__ic { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center; background: linear-gradient(160deg, var(--primary), var(--primary-600)); }
.callout__ic svg { width: 20px; height: 20px; color: #fff; }
.callout h4 { font-size: 16.5px; }
.callout p { font-size: 15.5px; margin-top: 6px; color: var(--muted); line-height: 1.6; }

.codeblock { margin: 30px 0 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-strong); background: var(--navy-900); box-shadow: var(--shadow-sm); }
.codeblock__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.codeblock__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); }
.codeblock__bar i:first-child { background: #FF6B6B; } .codeblock__bar i:nth-child(2) { background: #FFC65C; } .codeblock__bar i:nth-child(3) { background: #5CE6B0; }
.codeblock__bar span { margin-left: 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: rgba(225,233,250,.55); }
.codeblock pre { margin: 0; padding: 20px 22px; overflow-x: auto; }
.codeblock code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; color: #C9D6F5; }
.codeblock .c-key { color: #6FE9FB; } .codeblock .c-str { color: #5CE6B0; } .codeblock .c-com { color: rgba(225,233,250,.4); } .codeblock .c-fn { color: #9DB0FF; }

.artfig { margin: 36px 0 0; }
.artfig__img { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.artfig__img .ph-label { position: absolute; left: 16px; bottom: 14px; font-family: var(--font-display); font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.72); background: rgba(6,15,43,.5); padding: 5px 10px; border-radius: 8px; }
.artfig figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* share row */
.artshare { max-width: 720px; margin: 44px auto 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.artshare__lbl { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.artshare__btns { display: flex; gap: 10px; }
.artshare__btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--ink-700); cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease; }
.artshare__btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }
.artshare__btn svg { width: 19px; height: 19px; }

/* author bio card */
.artbio { background: var(--panel); padding: 64px 0; }
.artbio__card { max-width: 720px; margin: 0 auto; display: flex; gap: 24px; align-items: flex-start; padding: 32px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.artbio__avatar { width: 76px; height: 76px; border-radius: 20px; flex: 0 0 auto; background: linear-gradient(160deg, var(--primary-400), var(--accent-600)); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 26px; color: #fff; }
.artbio__k { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-600); }
.artbio h3 { font-size: 22px; margin-top: 8px; }
.artbio__role { font-size: 14.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.artbio p { margin-top: 14px; font-size: 15.5px; line-height: 1.65; color: var(--ink-700); }
.artbio__links { margin-top: 16px; display: flex; gap: 10px; }
.artbio__links a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--ink-700); transition: background .2s ease, color .2s ease, border-color .2s ease; }
.artbio__links a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.artbio__links svg { width: 18px; height: 18px; }

/* related insights */
.artrel { background: var(--bg); padding: 96px 0; }
.artrel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.artrel__head .section-head { margin: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .infeat__inner { grid-template-columns: 1fr; }
  .infeat__media { min-height: 280px; }
  .ingrid, .ingrid--cozy { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .inhero h1 { font-size: 38px; }
  .arthero h1 { font-size: 32px; }
  .infeat__body h2 { font-size: 28px; }
  .infeat__body { padding: 30px; }
  .ingrid, .ingrid--cozy { grid-template-columns: 1fr; }
  .prose .lead { font-size: 19px; }
  .prose p { font-size: 17px; }
  .prose h2 { font-size: 26px; }
  .artbio__card { flex-direction: column; gap: 18px; }
  .artcover__inner { padding: 0 20px; }
  .infilter__lbl { display: none; }
}
