/* Study result page — chat rail + Intake / Insights / Report tabs.
   Reuses the .i3-* shell language from the study-creation screen so the
   two pages read as one product. */
.srp-main{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:#f6fafd}
.srp-tabs{flex:none;display:flex;align-items:center;gap:22px;padding:0 24px;border-bottom:1px solid #e5ebf1;height:46px;background:#fff}
.srp-tab{background:none;border:none;font:inherit;font-size:13.5px;font-weight:600;color:#636c79;height:46px;padding:0;cursor:pointer;position:relative;display:inline-flex;align-items:center;gap:7px}
.srp-tab>i.ti{font-size:16px;color:#9aa4af}
.srp-tab.on{color:#050301;font-weight:700}
.srp-tab.on>i.ti{color:#3a8518}
.srp-tab.on::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:#3a8518}
.srp-tab__n{font-weight:400;color:#9aa4af;font-size:11px}
.srp-tabs__sp{flex:1}
.srp-status{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:#3a8518;background:#eef6e9;border-radius:900px;padding:4px 10px}
.srp-status i{font-size:13px}
.srp-export{display:inline-flex;align-items:center;gap:7px;font:inherit;font-size:12.5px;font-weight:600;color:#fff;background:#3a8518;border:none;border-radius:900px;padding:7px 14px;cursor:pointer}
.srp-export:hover{background:#2b6418}
.srp-export i{font-size:14px}
.srp-view{flex:1;min-height:0;display:flex;overflow:hidden}
.srp-view>.gl-page{flex:1;min-height:0}

/* ---------- Report ---------- */
.rp{flex:1;min-height:0;display:flex;overflow:hidden}
.rp-rail{width:196px;flex:none;background:#fff;border-right:1px solid #e5ebf1;overflow:auto;padding:12px 10px 20px;display:flex;flex-direction:column;gap:7px}
.rp-rail__k{font-size:10px;font-weight:700;letter-spacing:.08em;color:#9aa4af;padding:2px 4px 4px}
.rp-thumb{text-align:left;background:#fff;border:1px solid #e5ebf1;border-radius:9px;padding:8px 9px;cursor:pointer;font:inherit;display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start}
.rp-thumb:hover{background:#f6fafd}
.rp-thumb.on{border-color:#3a8518;box-shadow:0 0 0 1px #3a8518 inset}
.rp-thumb__n{font-size:10px;font-weight:700;color:#9aa4af;letter-spacing:.04em;padding-top:1px}
.rp-thumb.on .rp-thumb__n{color:#3a8518}
.rp-thumb__t{font-size:11.5px;line-height:1.35;color:#050301;font-weight:600;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.rp-thumb__k{grid-column:2;font-size:9.5px;font-weight:700;letter-spacing:.07em;color:#9aa4af;margin-bottom:2px}
.rp-stage{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.rp-bar{flex:none;height:46px;padding:0 18px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #e5ebf1;background:#fff;white-space:nowrap;overflow:hidden}
.rp-bar__t{font-size:13px;font-weight:700;flex:none}
.rp-bar__s{font-size:12px;color:#636c79;min-width:0;overflow:hidden;text-overflow:ellipsis}
.rp-bar__sp{flex:1}
.rp-btn{background:#fff;border:1px solid #e5ebf1;border-radius:8px;font:inherit;font-size:12.5px;font-weight:600;color:#050301;padding:7px 12px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.rp-btn:hover{background:#f6fafd}
.rp-btn--p{background:#050301;border-color:#050301;color:#fff}
.rp-btn--p:hover{background:#1c1c1a}
.rp-canvas{flex:1;min-height:0;overflow:auto;padding:20px 24px;display:flex;justify-content:center;align-items:flex-start}
.rp-slide{width:100%;max-width:1080px;aspect-ratio:16/9;background:#fff;border:1px solid #e5ebf1;border-radius:4px;box-shadow:0 12px 34px rgba(5,3,1,.08);container-type:inline-size;display:flex;flex-direction:column;padding:4.4cqw 4.8cqw;position:relative;overflow:hidden}
.rp-slide__k{display:flex;align-items:center;gap:1.1cqw;font-size:1.35cqw;font-weight:700;letter-spacing:.1em;color:#636c79}
.rp-slide__k i.rule{width:2.6cqw;height:2px;background:#3a8518;display:block}
.rp-slide__h{font-size:3.5cqw;line-height:1.18;font-weight:700;letter-spacing:-.02em;margin-top:2.4cqw;text-wrap:pretty}
.rp-slide__s{font-size:1.7cqw;line-height:1.5;color:#636c79;margin-top:1.4cqw;max-width:76cqw;text-wrap:pretty}
.rp-slide__body{flex:1;min-height:0;display:flex;margin-top:2.6cqw}
.rp-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:1.4cqw;width:100%;align-items:stretch}
.rp-card{border:1px solid #e5ebf1;border-radius:1cqw;padding:1.8cqw;display:flex;flex-direction:column;gap:.9cqw;background:#fbfdfe}
.rp-card__n{font-size:1.2cqw;font-weight:700;letter-spacing:.08em;color:#3a8518}
.rp-card__t{font-size:1.6cqw;line-height:1.45;text-wrap:pretty}
.rp-viz{flex:1;min-height:0;overflow:hidden;border:1px solid #eef2f6;border-radius:1cqw;padding:1.4cqw;background:#fbfdfe}
.rp-viz__in{transform-origin:top left}
.rp-slide__ft{flex:none;display:flex;align-items:center;gap:1cqw;font-size:1.2cqw;color:#9aa4af;border-top:1px solid #eef2f6;padding-top:1.4cqw;margin-top:2cqw}
.rp-slide__ft b{color:#050301;letter-spacing:.02em}
.rp-slide__ft span{margin-left:auto}
/* cover */
.rp-slide--cover{background:#050301;border-color:#050301;justify-content:center}
.rp-slide--cover .rp-slide__k{color:#8f9a86}
.rp-slide--cover .rp-slide__h{color:#fff;font-size:4.4cqw;max-width:70cqw}
.rp-slide--cover .rp-slide__s{color:#b9c0b4}
.rp-slide--cover .rp-slide__ft{border-top-color:rgba(255,255,255,.14);color:#8f9a86;margin-top:3.6cqw}
.rp-slide--cover .rp-slide__ft b{color:#fff}

/* ---------- Report: slide-miniature rail ----------
   A thumbnail is the real slide rendered at stage width and scaled down, the
   way a slide editor does it. It is NOT the slide re-laid-out at rail width:
   .rp-slide is a container-query context sized by aspect-ratio, and asking it
   to also fit a 150px box makes the cqw units resolve against a collapsed
   container — every label came out sub-pixel. Fixing the width at RP_MINI_W
   and scaling by RP_MINI_S keeps one code path and a faithful replica. */
.rp-rail{width:246px;gap:9px}
.rp-thumb{display:grid;grid-template-columns:20px 1fr;gap:6px;align-items:start;padding:6px;border-radius:8px}
.rp-thumb__mini{width:180px;height:101px;flex:none;position:relative;overflow:hidden;
  border:1px solid #eef2f6;border-radius:3px;background:#fff;pointer-events:none}
.rp-thumb__mini .rp-slide{position:absolute;top:0;left:0;width:900px;height:506px;max-width:none;
  aspect-ratio:auto;transform:scale(0.2);transform-origin:top left;
  border:none;border-radius:0;box-shadow:none}
.rp-thumb.on{border-color:#3a8518;box-shadow:0 0 0 1px #3a8518 inset;background:#fff}
.rp-thumb.on .rp-thumb__mini{border-color:#3a8518}
.rp-thumb__n{padding-top:3px}

/* ---------- Report: paging ---------- */
.rp-bar__pg{display:inline-flex;align-items:center;gap:4px;margin-right:4px}
.rp-bar__pg em{font-style:normal;font-size:12px;color:#636c79;font-variant-numeric:tabular-nums;min-width:44px;text-align:center}
.rp-nav{background:#fff;border:1px solid #e5ebf1;border-radius:7px;width:26px;height:26px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;color:#050301;padding:0}
.rp-nav:hover:not(:disabled){background:#f6fafd}
.rp-nav:disabled{opacity:.4;cursor:default}
.rp-nav i{font-size:15px}

/* ---------- Report: agenda + section divider ---------- */
.rp-agenda{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;
  gap:2.2cqw;width:100%;border-left:1px solid #e5ebf1;padding-left:3cqw}
.rp-agenda li{display:grid;grid-template-columns:4.4cqw 1fr;gap:1.4cqw;align-items:baseline}
.rp-agenda b{font-size:1.5cqw;font-weight:700;letter-spacing:.06em;color:#3a8518}
.rp-agenda span{font-size:2cqw;line-height:1.35;text-wrap:pretty}
.rp-slide--divider{background:#050301;border-color:#050301;justify-content:center}
.rp-slide--divider .rp-slide__k{color:#8f9a86}
.rp-slide--divider .rp-slide__h{color:#fff;font-size:4cqw;max-width:64cqw}
.rp-slide--divider .rp-slide__ft{border-top-color:#2a2a26;color:#6d7565}
.rp-slide--divider .rp-slide__ft b{color:#fff}
.rp-slide__big{position:absolute;right:3cqw;bottom:0.4cqw;font-size:20cqw;line-height:1;font-weight:700;
  color:#3f4635;opacity:.55;letter-spacing:-.04em;pointer-events:none}

/* A matrix inside a slide gets the whole body — it is the argument. */
.rp-viz:has(.ap-mx){padding:0;border:none;background:none}

/* ---------- Report: table slides ----------
   A matrix IS the slide, so the header gives up room and the table gets it.
   Without this the fitted scale drops under 0.3 and the numbers stop being
   readable, which defeats the point of putting the table on a slide. */
.rp-slide--table .rp-slide__h{font-size:2.5cqw;margin-top:1.6cqw}
.rp-slide--table .rp-slide__s{font-size:1.4cqw;margin-top:.8cqw;max-width:none}
.rp-slide--table .rp-slide__body{margin-top:1.5cqw}
.rp-slide--table .rp-slide__ft{margin-top:1.2cqw;padding-top:1cqw}
.rp-slide .ap-mx__legend{display:none}
.rp-slide .ap-mx__sub{font-size:11px;margin-bottom:6px}
.rp-slide .ap-mx td{height:28px}
.rp-slide .ap-mx td.t-text{font-size:11px;line-height:1.35;padding:5px 9px;min-width:150px}
.rp-slide .ap-mx thead th{padding:6px 8px}
.rp-slide .ap-mx__note{margin-top:7px;padding:7px 10px;font-size:11px;line-height:1.45}
/* The handoff line is slide furniture, not chart content — it renders at slide
   scale under the table rather than being shrunk with it. */
.rp-slide .ap-mx__note{display:none}
.rp-slide__note{flex:none;margin-top:1.4cqw;background:#dfeed3;border-left:.34cqw solid #3a8518;
  border-radius:0 .8cqw .8cqw 0;padding:1cqw 1.3cqw;font-size:1.25cqw;line-height:1.45;color:#28341c;
  text-wrap:pretty}

/* Cover and divider centre their headline, which left the footer floating in
   the middle of the slide. Take it out of the flex flow and pin it. */
.rp-slide--cover .rp-slide__ft,.rp-slide--divider .rp-slide__ft{position:absolute;
  left:4.8cqw;right:4.8cqw;bottom:3.6cqw;margin-top:0}

/* ---------- Report: a delivered deck ----------
   The pages as exported, not a re-rendering of them. Same rail-and-stage as the
   generated deck, so the tab behaves the same whichever a study has. */
.rp-thumb--img .rp-thumb__mini{display:block;background:#fff}
.rp-thumb--img .rp-thumb__mini img{width:100%;height:100%;object-fit:contain;display:block}
.rp-canvas--img{align-items:center}
.rp-page{width:100%;max-width:1080px;height:auto;display:block;border-radius:4px;
  box-shadow:0 12px 34px rgba(5,3,1,.10);background:#fff}
a.rp-btn{text-decoration:none}

/* ---------- MakerChat collapse ----------
   The rail is the same conversation on all four tabs, so its toggle sits in the
   section header rather than inside the panel — reachable when the panel is
   gone, and in the same place whichever tab you are on. */
.srp-chat-tgl{flex:none;align-self:center;background:none;border:none;font:inherit;cursor:pointer;
  color:#9aa4af;width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;
  justify-content:center;padding:0;transition:background 120ms,color 120ms}
.srp-chat-tgl:hover{background:#f3f6f9;color:#050301}
.srp-chat-tgl.on{background:#eef6e9;color:#3a8518}
.srp-chat-tgl i{font-size:17px}
.srp-tabs__div{flex:none;align-self:center;width:1px;height:18px;background:#e5ebf1;margin:0 6px 0 2px}
a.srp-export{text-decoration:none}

/* Closing MakerChat from inside the panel; the section-header icon reopens it. */
.srp-chatclose{margin-left:8px;background:none;border:none;padding:2px;line-height:0;color:#9aa4af;cursor:pointer}
.srp-chatclose:hover{color:#41505f}
