/* Playbooks section (/playbooks, /playbooks/<slug>). Uses the tokens in /styles.css. */
.pb-ui { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-surface); font-size: .88em; font-weight: 500; white-space: nowrap; }

/* Hero */
.pb-hero { padding: 72px 0 0; position: relative; overflow: hidden; }
.pb-hero .hero__grid { -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 78%); mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 78%); }
.pb-hero__in { position: relative; display: grid; gap: 20px; max-width: 900px; }
.pb-hero h1 { font: 300 clamp(38px, 5.2vw, 68px)/1.02 var(--font-sans); letter-spacing: -0.05em; text-wrap: balance; }
.pb-hero--hub { padding-bottom: 40px; }
.crumb { font: 500 12px/1.4 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumb a:hover { color: var(--text); }
.pb-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-meta li { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--bg-surface); border-radius: var(--r-pill); font-size: 15px; }
.pb-meta li span { color: var(--text-2); }
.pb-meta li b { font-weight: 500; }
.pb-meta li em { font: 500 10px/1 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; font-style: normal; color: var(--warn); background: var(--warn-tint); padding: 4px 6px; border-radius: var(--r-sm); }
.pb-meta .i { color: var(--brand); }
.pb-meta--stack { display: grid; gap: 6px; }
.pb-meta--stack li { height: auto; padding: 8px 12px; border-radius: var(--r-lg); font-size: 14px; flex-wrap: wrap; }
.pb-basis { font-size: 14px; color: var(--text-2); max-width: 70ch; }
.pb-basis b { color: var(--text); font-weight: 500; }
.pb-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* The output, framed */
.pb-out { margin: 56px 0 0; display: grid; gap: 14px; }
.pb-out__cap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.pb-out__note { font-size: 13px; color: var(--text-2); }
.pb-art { background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; line-height: 1.5; }
.art-bar { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.art-bar b { color: var(--text); font-weight: 500; }
.art-bar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.art-body { padding: 24px 28px 28px; display: grid; gap: 18px; }
.art-body h3 { font: 500 20px/1.25 var(--font-sans); letter-spacing: -0.02em; }
.art-body h4 { font: 500 12px/1.3 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-2); }
.art-body p { color: var(--text); max-width: 75ch; }
.art-body ul.dots { display: grid; gap: 6px; padding-left: 18px; list-style: disc; }
.art-body ul.dots li::marker { color: var(--brand); }
.art-mail { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.art-mail b { color: var(--text); font-weight: 500; }
.art-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.art-kpis > div { background: var(--bg-surface); padding: 14px 16px; display: grid; gap: 4px; }
.art-kpis span { font-size: 12px; color: var(--text-2); }
.art-kpis b { font: 400 24px/1.1 var(--font-sans); letter-spacing: -0.03em; }
.art-kpis small { font-size: 12px; }
.up { color: var(--ok); } .down { color: var(--danger); } .flat { color: var(--text-2); }
.art-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); }
.art-table table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.art-table th, .art-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.art-table thead th { font: 500 11px/1.3 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-2); background: #FAFAF9; white-space: nowrap; }
.art-table tbody tr:last-child td { border-bottom: 0; }
.art-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.art-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--warn-tint); color: var(--warn); font-size: 13px; }
.art-note--ok { background: var(--ok-tint); color: var(--ok); }
.art-note--info { background: var(--info-tint); color: var(--info); }
.art-note .i { margin-top: 2px; }
.art-approve { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: #FAFAF9; font-size: 13px; color: var(--text-2); }
.art-approve .right { margin-left: auto; display: flex; gap: 8px; }
.art-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.art-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
@media (max-width: 760px) {
  .pb-hero { padding-top: 40px; }
  .pb-out { margin-top: 36px; }
  .art-body { padding: 18px 16px 20px; }
  .art-kpis { grid-template-columns: 1fr 1fr; }
  .art-two { grid-template-columns: 1fr; }
  .pb-meta li { height: 36px; font-size: 14px; padding: 0 12px; }
}

/* Body: sticky summary + sections */
.pb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 88px; align-items: start; }
.pb-side { position: sticky; top: calc(var(--nav-h) + 24px); }
.pb-side__in { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-surface); }
.pb-side__t { font-weight: 500; font-size: 17px; }
.pb-side__chips, .pb-card__chips, .pb-rel__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-side__h { font: 500 11px/1 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-2); margin-top: 4px; }
.pb-side .pb-tools { grid-template-columns: 1fr; }
.pb-side__btn { width: 100%; }
.pb-toc { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.pb-toc a { padding: 5px 0; color: var(--text-2); }
.pb-toc a:hover { color: var(--text); }
.pb-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 12px; color: var(--text-2); background: var(--bg-surface); }
.pb-chip--seg { background: var(--tint); border-color: #DAE0BD; color: var(--on-tint); }
.pb-body-col { display: grid; gap: 56px; min-width: 0; }
.pb-sec { display: grid; gap: 16px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.pb-h2 { font: 400 30px/1.15 var(--font-sans); letter-spacing: var(--track-title); }
.pb-h2--big { font-size: clamp(28px, 3vw, 40px); }
.pb-prose { display: grid; gap: 12px; color: var(--text-2); font-size: 16px; max-width: 68ch; }
.pb-prose b, .pb-prose strong { color: var(--text); font-weight: 500; }
.pb-prose ul { display: grid; gap: 6px; padding-left: 18px; list-style: disc; }
.pb-prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.pb-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pb-tools li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-surface); font-size: 14px; font-weight: 500; flex-wrap: wrap; }
.pb-tools li .i { color: var(--ok); }
.pb-tools li.is-soon { color: var(--text-2); background: transparent; border-style: dashed; }
.pb-tools li.is-soon .i { color: var(--text-2); }
.pb-steps { display: grid; gap: 0; counter-reset: none; }
.pb-step { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.pb-step:last-child { border-bottom: 1px solid var(--line); }
.pb-step__n { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font: 500 13px/1 var(--font-mono); background: var(--bg-surface); }
.pb-step__b { display: block;  color: var(--text-2); font-size: 15.5px; }
.pb-step__b b { display: block; color: var(--text); font-weight: 500; font-size: 17px; margin: 8px 0 4px; }
.pb-step__tag { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--info); background: var(--info-tint); padding: 5px 8px; border-radius: var(--r-sm); }
.pb-code { border-radius: var(--r-xl); overflow: hidden; background: #1F1F1B; color: #F2F2EC; border: 1px solid #31312A; }
.pb-code__bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; border-bottom: 1px solid #31312A; font: 500 12px/1 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: #B4B4B4; }
.pb-code__bar span { display: inline-flex; gap: 8px; align-items: center; }
.pb-copy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid #4A4A3D; color: #F2F2EC; font: 500 13px/1 var(--font-sans); text-transform: none; letter-spacing: 0; }
.pb-copy:hover { border-color: #81815F; }
.pb-copy.is-done { border-color: #8BC59E; color: #8BC59E; }
.pb-code pre { margin: 0; padding: 18px 20px 22px; font: 400 13px/1.65 var(--font-mono); white-space: pre-wrap; word-break: break-word; max-height: 520px; overflow: auto; }
.pb-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-surface); }
.pb-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pb-table th, .pb-table td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pb-table tr:last-child th, .pb-table tr:last-child td { border-bottom: 0; }
.pb-table th { width: 30%; font-weight: 500; background: #FAFAF9; }
.pb-table td { color: var(--text-2); }
.pb-table .cap { height: 24px; font-size: 12px; margin: 0 4px 4px 0; }
.pb-list { display: grid; gap: 10px; }
.pb-list li { position: relative; padding-left: 30px; color: var(--text-2); }
.pb-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%232B6644' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.pb-list li b { color: var(--text); font-weight: 500; }
.pb-rel__meta { font-size: 13px !important; color: var(--text-2); margin-top: auto; }
.related .rel { align-content: start; }
@media (max-width: 960px) {
  .pb-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .pb-side { position: static; }
  .pb-toc { display: none; }
  .pb-body-col { gap: 44px; }
  .pb-h2 { font-size: 26px; }
  .pb-table th, .pb-table td { padding: 12px 14px; display: block; width: auto; border-bottom: 0; }
  .pb-table tr { display: block; border-bottom: 1px solid var(--line); }
  .pb-table tr:last-child { border-bottom: 0; }
  .pb-table th { background: transparent; padding-bottom: 0; }
}

/* Hub */
.pb-hubsec { padding: 8px 0 0; }
.pb-filters { display: grid; grid-template-columns: auto auto 1fr; gap: 12px 24px; align-items: center; padding: 14px 0 18px; border-bottom: 1px solid var(--line); position: sticky; top: var(--nav-h); z-index: 5; background: var(--bg-canvas); }
.pb-filters__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pb-filters__l { font: 500 11px/1 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-2); margin-right: 4px; }
.pb-f { height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--bg-surface); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.pb-f span { color: var(--text-2); font-size: 12px; }
.pb-f:hover { border-color: var(--line-control); }
.pb-f[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pb-f[aria-pressed="true"] span { color: var(--text-inv-2); }
.pb-search { justify-self: end; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; width: min(320px, 100%); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg-surface); color: var(--text-2); }
.pb-search:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px rgba(41,41,41,.08); }
.pb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); }
.pb-count { font-size: 13px; color: var(--text-2); padding: 18px 0 14px; }
.pb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pb-card[hidden] { display: none; }
.pb-card a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-surface); overflow: hidden; transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.pb-card a:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pb-card__out { height: 188px; padding: 16px 16px 0; background: linear-gradient(160deg, #F2F6E1 0%, #F7F7F2 55%, #F2F2EA 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.pb-mini { background: var(--bg-surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; height: 100%; padding: 12px 14px; font-size: 11.5px; line-height: 1.45; color: var(--text); display: grid; gap: 7px; align-content: start; overflow: hidden; box-shadow: var(--shadow-1); }
.pb-mini .t { font-weight: 500; font-size: 12.5px; }
.pb-mini .s { color: var(--text-2); font-size: 11px; }
.pb-mini .r { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.pb-mini .r span:last-child { font-variant-numeric: tabular-nums; }
.pb-mini .k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pb-mini .k > div { border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.pb-mini .k b { display: block; font-weight: 500; font-size: 14px; }
.pb-mini .bar { height: 6px; border-radius: 3px; background: var(--bg-sunken); }
.pb-mini .bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.pb-card__b { display: grid; gap: 8px; padding: 18px 18px 20px; align-content: start; flex: 1; }
.pb-card h3 { font: 500 18px/1.25 var(--font-sans); letter-spacing: -0.015em; }
.pb-card p { font-size: 14px; color: var(--text-2); }
.pb-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px !important; color: var(--text) !important; margin-top: auto; padding-top: 8px; }
.pb-card__meta span + span::before { content: "·"; margin-right: 12px; color: var(--text-2); }
.pb-empty { padding: 40px 0; color: var(--text-2); }
.pb-empty a { color: var(--link); text-decoration: underline; }
.pb-fine { font-size: 13px; color: var(--text-2); margin-top: 28px; max-width: 80ch; }
@media (max-width: 1000px) { .pb-cards { grid-template-columns: 1fr 1fr; } .pb-filters { grid-template-columns: 1fr; position: static; } .pb-search { justify-self: stretch; width: 100%; } }
@media (max-width: 640px) { .pb-cards { grid-template-columns: 1fr; } .pb-filters__row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); } .pb-f { flex: none; } }
.pb-quote { display: grid; gap: 8px; padding: 18px 20px; border-left: 3px solid var(--brand); background: var(--bg-surface); border-radius: 0 var(--r-lg) var(--r-lg) 0; max-width: 68ch; }
.pb-quote blockquote { font: 400 18px/1.45 var(--font-sans); letter-spacing: -0.01em; }
.pb-quote blockquote::before { content: "\201C"; color: var(--brand); }
.pb-quote blockquote::after { content: "\201D"; color: var(--brand); }
.pb-quote cite { font-style: normal; font-size: 13px; color: var(--text-2); }
.pb-quote cite a { text-decoration: underline; text-underline-offset: 3px; }

/* Refs board picks: agentik sticky prompt card (right), vertical step line, card tool line */
.pb-copy--side { color: var(--text); border: 1px solid var(--line-strong); height: 44px; font-size: 15px; }
.pb-copy--side.is-done { color: var(--ok); border-color: #B9D3C0; }
.pb-step { position: relative; }
.pb-step:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 56px; bottom: -20px; width: 1px; background: var(--line-strong); }
.pb-steps .pb-step { border-top: 0; }
.pb-steps .pb-step:last-child { border-bottom: 0; }
.pb-card__tools { display: flex; gap: 6px; align-items: center; font-size: 12.5px !important; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-card__tools .i { flex: none; color: var(--ok); }
.pb-card__tools span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .pb-side { display: none; } }

/* Split hero: the output opens the page (agentik / LangChain refs) */
.pb-hero--split { padding: 48px 0 0; }
.pb-split { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head out" "rest out"; gap: 20px 56px; align-items: start; }
.pb-split__head { grid-area: head; display: grid; gap: 18px; padding-top: 28px; }
.pb-split__rest { grid-area: rest; display: grid; gap: 18px; align-content: start; }
.pb-split .pb-out { grid-area: out; margin: 0; }
.pb-hero--split h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; }
.pb-hero--split .lead { font-size: 17px; }
.pb-split .pb-meta--h { display: grid; }
.pb-split .pb-meta { display: grid; gap: 8px; justify-items: start; }
.pb-split .art-body { padding: 20px 22px 22px; gap: 14px; }
.pb-split .art-kpis b { font-size: 21px; }
@media (max-width: 1100px) {
  .pb-split { grid-template-columns: 1fr; grid-template-areas: "head" "out" "rest"; gap: 28px; }
  .pb-split__head { padding-top: 0; }
  .pb-split .pb-meta { display: flex; flex-wrap: wrap; }
}
.pb-card__meta span + span::before { content: "·"; margin-right: 12px; color: var(--text-2); }
.pb-card__save { font-size: 13px !important; color: var(--ok) !important; font-weight: 500; }
.pb-card__meta { padding-top: 10px; }
@media (max-width: 760px) { .pb-meta li { height: auto; min-height: 36px; padding: 6px 12px; border-radius: 18px; } }
/* Hub: most asked for (research ranking) and coming soon */
.pb-top { margin-top: 12px; display: grid; gap: 10px; max-width: 900px; }
.pb-top__h { font: 500 11px/1 var(--font-mono); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-2); }
.pb-top ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pb-top a { display: grid; grid-template-columns: 28px 1fr 16px; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-surface); transition: border-color .18s var(--ease); }
.pb-top a:hover { border-color: var(--line-strong); }
.pb-top__n { width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--on-tint); display: grid; place-items: center; font: 500 13px/1 var(--font-mono); }
.pb-top b { display: block; font-weight: 500; font-size: 15px; }
.pb-top small { display: block; font-size: 12.5px; color: var(--text-2); }
.pb-top .i { color: var(--text-2); }
.pb-top__src { font-size: 12.5px; color: var(--text-2); }
.pb-soon { margin-top: 64px; display: grid; gap: 12px; }
.pb-soon__l { color: var(--text-2); }
.pb-soon ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.pb-soon li { display: grid; gap: 8px; align-content: start; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-xl); }
.pb-soon li .pill { justify-self: start; }
.pb-soon li b { font-weight: 500; font-size: 17px; }
.pb-soon li p { font-size: 14px; color: var(--text-2); }
.pb-soon li small { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 900px) { .pb-top ol, .pb-soon ul { grid-template-columns: 1fr; } }
