/* Result sections as blocks (loaded after app-5.css, which keeps the Read-all accordion).
   .chapters            → tile grid (Blocks view, the default)
   .chapters.focus      → one section open: compact rail on the left, large panel on the right
   .chapters.readall    → original stacked accordion (Read all view; print uses it too)
   Each section carries its own hue in --chc (bare r,g,b, like --acc-rgb). */
.chapter{--chc:102,115,145}
.chapter[data-ch="briefing"],.chapter[data-ch="existing"]{--chc:28,47,94}
.chapter[data-ch="signals"]{--chc:168,120,44}
.chapter[data-ch="stack"],.chapter[data-ch="gtm"],.chapter[data-ch="channel"]{--chc:74,120,194}
.chapter[data-ch="comp"],.chapter[data-ch="agent"]{--chc:107,79,194}
.chapter[data-ch="arch"]{--chc:0,128,128}
.chapter[data-ch="opps"],.chapter[data-ch="need"]{--chc:30,138,98}
.chapter[data-ch="meet"]{--chc:148,105,42}
.chapter[data-ch="events"]{--chc:185,83,31}
.chapter[data-ch="bc"],.chapter[data-ch="competitor"]{--chc:194,59,75}
.bc-tab-lead{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.bc-tab-h{font-size:20px;font-weight:700;letter-spacing:-.03em;color:var(--text)}
.bc-tab-copy p{margin:6px 0 0;max-width:58ch;font-size:14px;line-height:1.5;color:var(--text2)}
.bc-tab-go,.bc-tab .bc-gen{flex:none;font-size:15px;font-weight:700;color:#fff;
  background:linear-gradient(100deg,var(--navy),var(--navy2));border:0;border-radius:12px;padding:14px 20px;
  cursor:pointer;box-shadow:0 10px 24px -14px rgba(28,47,94,.32)}
.bc-tab-go:hover,.bc-tab .bc-gen:hover{filter:brightness(1.06)}
.bc-tab .bc-pk-foot{margin-top:16px}
.bc-drop+.bc-drop{margin-top:10px}
.bc-drop{border:1px solid var(--t-teal-b);border-radius:13px;overflow:hidden}
.bc-drop .bc-ready{border:0;border-radius:0;cursor:pointer;width:100%}
.bc-drop-chev{flex:none;color:var(--muted);font-size:16px;line-height:1;transition:transform .15s}
.bc-drop.open .bc-drop-chev{transform:rotate(180deg)}
.bc-drop.open .bc-ready{border-bottom:1px solid var(--t-teal-b)}
.bc-drop-body{padding:8px 12px 16px}
.bc-drop-body[hidden]{display:none}
@media (max-width:640px){
  .bc-tab-lead{flex-direction:column;align-items:stretch}
  .bc-tab-go{width:100%}
}
.ch-x{display:none}
.cb-tog button.on{color:var(--teal-d);background:var(--t-teal)}

/* Once a report is on screen the page widens so the blocks and the open panel get the room. */
.wrap:has(#results .card.pack){max-width:min(1720px,96vw)}

/* ---------- Blocks: the tile grid ---------- */
.chapters:not(.readall){display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;
  align-items:stretch}
.chapters:not(.readall)>.chapter{border-radius:18px;border-color:rgba(var(--chc),.2);
  background:linear-gradient(160deg,rgba(var(--chc),.11),var(--s0) 62%);
  transition:transform .2s var(--ease),border-color .18s,box-shadow .2s,background .18s}
.chapters:not(.readall):not(.focus)>.chapter:hover{transform:translateY(-4px);border-color:rgba(var(--chc),.55);
  box-shadow:0 16px 36px rgba(28,47,94,.16)}
.chapters:not(.readall)>.chapter.open::before,.chapters.readall>.chapter.open::before{
  background:linear-gradient(90deg,transparent,rgba(var(--chc),.75),transparent)}
.chapters:not(.readall)>.chapter>.ch-head{display:grid;grid-template-columns:auto 1fr auto;
  grid-template-areas:"ico . n" "t t t";grid-template-rows:auto 1fr;
  align-items:start;gap:16px 10px;padding:18px 18px 20px;min-height:158px;
  height:100%;border-radius:18px}
.chapters:not(.readall)>.chapter>.ch-head:focus-visible{outline:2px solid rgb(var(--chc));outline-offset:-2px}
.chapters:not(.readall) .ch-ico{grid-area:ico;width:44px;height:44px;border-radius:14px;color:rgb(var(--chc));
  background:rgba(var(--chc),.13);border-color:rgba(var(--chc),.32)}
.chapters:not(.readall) .ch-ico svg{width:20px;height:20px}
.chapters:not(.readall) .ch-head:hover .ch-ico{color:rgb(var(--chc));border-color:rgba(var(--chc),.6)}
.chapters:not(.readall) .ch-n{grid-area:n;font-size:24px;line-height:1;font-weight:700;letter-spacing:-.5px;
  padding:4px 0 0;background:none;border:0;color:rgb(var(--chc))}
.chapters:not(.readall) .chapter.open .ch-n{background:none;border:0;color:rgb(var(--chc))}
.chapters:not(.readall) .ch-t{grid-area:t;gap:6px}
.chapters:not(.readall) .ch-title{font-size:16px}
.chapters:not(.readall) .ch-prev,.chapters:not(.readall) .chapter.open .ch-prev{white-space:normal;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;
  line-height:1.5;font-size:12.8px}
.chapters:not(.readall) .ch-chev{position:absolute;right:12px;bottom:12px;color:rgba(var(--chc),.7);opacity:.55;
  transform:none}
.chapters:not(.readall):not(.focus)>.chapter:hover .ch-chev{opacity:1;transform:translateX(3px)}
.chapters:not(.readall) .ch-body{display:none;transition:none}
/* Briefing is the wide lead block and shows more of its summary. */
.chapters:not(.readall):not(.focus)>.chapter[data-ch="briefing"]{grid-column:1/-1}
.chapters:not(.readall):not(.focus)>.chapter[data-ch="briefing"]>.ch-head{min-height:0;
  grid-template-columns:auto 1fr auto;grid-template-areas:"ico t n";grid-template-rows:auto;
  align-items:center;gap:18px}
.chapters:not(.readall):not(.focus)>.chapter[data-ch="briefing"] .ch-title{font-size:18px}
.chapters:not(.readall):not(.focus)>.chapter[data-ch="briefing"] .ch-prev{-webkit-line-clamp:4;line-clamp:4;
  font-size:14px;color:var(--text2);padding-right:24px}
.chapters:not(.readall) .empty{grid-column:1/-1}

/* ---------- Focus: rail + large panel ---------- */
.chapters.focus{grid-template-columns:minmax(200px,250px) minmax(0,1fr);gap:8px 16px;align-items:start}
.chapters.focus>.chapter:not(.open){grid-column:1;border-radius:12px}
.chapters.focus>.chapter:not(.open)>.ch-head{display:flex;align-items:center;gap:10px;min-height:0;
  padding:9px 11px;border-radius:12px}
.chapters.focus>.chapter:not(.open) .ch-ico{width:30px;height:30px;border-radius:9px}
.chapters.focus>.chapter:not(.open) .ch-ico svg{width:15px;height:15px}
.chapters.focus>.chapter:not(.open) .ch-title{font-size:13.5px}
.chapters.focus>.chapter:not(.open) .ch-prev,.chapters.focus>.chapter:not(.open) .ch-chev{display:none}
.chapters.focus>.chapter:not(.open) .ch-n{font-size:12px;padding:0}
.chapters.focus>.chapter:not(.open):hover{border-color:rgba(var(--chc),.55);background:rgba(var(--chc),.1)}
.chapters.focus>.chapter.open{grid-column:2;grid-row:1/span var(--chn,1);display:flex;flex-direction:column;
  max-height:calc(100vh - var(--ch-top,140px) - 18px);min-height:340px;border-color:rgba(var(--chc),.45);
  background:linear-gradient(180deg,rgba(var(--chc),.07),var(--s1) 160px);animation:chIn .22s var(--ease)}
.chapters.focus>.chapter.open>.ch-head{display:flex;align-items:center;gap:14px;min-height:0;height:auto;
  padding:16px 20px;border-bottom:1px solid var(--line);border-radius:18px 18px 0 0;flex:none}
.chapters.focus>.chapter.open .ch-prev{-webkit-line-clamp:1;line-clamp:1}
.chapters.focus>.chapter.open .ch-title{font-size:19px}
.chapters.focus>.chapter.open .ch-n{font-size:13px;padding:4px 10px;border-radius:999px;
  background:rgba(var(--chc),.14);border:1px solid rgba(var(--chc),.32)}
.chapters.focus>.chapter.open .ch-chev{display:none}
.chapters.focus>.chapter.open .ch-x{display:grid;place-items:center;flex:none;width:32px;height:32px;
  border-radius:10px;border:1px solid var(--line);color:var(--muted);font-size:14px;transition:var(--tr-ui)}
.chapters.focus>.chapter.open>.ch-head:hover .ch-x{color:var(--text);border-color:var(--line2);background:var(--s2)}
.chapters.focus>.chapter.open>.ch-body{display:block;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;
  scrollbar-gutter:stable}
.chapters.focus>.chapter.open .ch-inner{overflow:visible;padding:0 22px}
.chapters.focus>.chapter.open .ch-inner>.ch-pad{padding:18px 0 28px}
/* Sticky bars inside a section stick to the panel's own scroll box, not the page. */
@media (min-width:821px){
  .chapters.focus>.chapter.open .gp-nav,.chapters.focus>.chapter.open .cmap th{top:0}
}
/* Inside the large panel, use the width: stack products, findings and plays sit in card grids. */
.chapters.focus>.chapter.open .stk-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
@media (min-width:1100px){
  .chapters.focus>.chapter.open .fsec>.list,.chapters.focus>.chapter.open .opp-grp{display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
  .chapters.focus>.chapter.open .fsec>.list>.finding,.chapters.focus>.chapter.open .opp-grp>.opp{margin:0}
  .chapters.focus>.chapter.open .opp-grp>.opp-grp-h{grid-column:1/-1;margin:0}
  .chapters.focus>.chapter.open .opp-grp{margin-top:20px}
}
@keyframes chIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---------- Narrow screens ---------- */
@media (max-width:820px){
  .chapters.focus{grid-template-columns:minmax(0,1fr);grid-template-rows:none!important}
  .chapters.focus>.chapter:not(.open){display:none}
  .chapters.focus>.chapter.open{grid-column:1;grid-row:auto;max-height:none;min-height:0}
  .chapters.focus>.chapter.open>.ch-head{position:sticky;top:var(--ch-top,120px);z-index:3;background:var(--s1)}
  .chapters.focus>.chapter.open>.ch-body{overflow:visible}
  .chapters.focus>.chapter.open .ch-inner{padding:0 14px}
}
@media (max-width:620px){
  .chapters:not(.readall):not(.focus){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .chapters:not(.readall)>.chapter>.ch-head{min-height:132px;padding:14px;gap:12px 8px}
  .chapters:not(.readall) .ch-ico{width:36px;height:36px;border-radius:11px}
  .chapters:not(.readall) .ch-n{font-size:20px}
  .chapters:not(.readall) .ch-title{font-size:14.5px}
  .chapters:not(.readall) .ch-prev{-webkit-line-clamp:2;line-clamp:2;font-size:12px}
}
@media (max-width:380px){.chapters:not(.readall):not(.focus){grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){
  .chapters:not(.readall)>.chapter,.chapters:not(.readall) .ch-chev{transition:none}
  .chapters:not(.readall):not(.focus)>.chapter:hover{transform:none}
  .chapters.focus>.chapter.open{animation:none}
}
@media print{
  .chapters,.chapters.focus{display:block!important}
  .chapters>.chapter{display:block!important;height:auto!important;margin-bottom:10px;break-inside:auto}
  .chapters .ch-body{display:block!important;overflow:visible!important}
  .chapters .ch-body{grid-template-rows:1fr!important}
  .chapters .ch-inner{overflow:visible!important}
}
