/* Research Studio 3.2.2 Design refinement layer.
   Presentation-only changes built on top of core 3.2.0 workflow. */
:root{
  --rs-ink:#173745;
  --rs-quiet:#627884;
  --rs-teal:#195f70;
  --rs-teal-deep:#0f4d5d;
  --rs-aqua:#2a8e96;
  --rs-mint:#ebf7f4;
  --rs-line:#dbe7e8;
  --rs-line-strong:#cddcde;
  --rs-paper:#ffffff;
  --rs-shadow-sm:0 8px 22px rgba(16,49,61,.06);
  --rs-shadow-md:0 18px 48px rgba(14,44,58,.10);
}
html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(circle at top left, rgba(42,142,150,.06), transparent 29%),
    radial-gradient(circle at top right, rgba(25,95,112,.05), transparent 24%),
    linear-gradient(180deg,#f5f8f9 0%,#f3f7f8 100%);
  color:var(--rs-ink)
}
button{transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
button:focus-visible,summary:focus-visible,.step:focus-visible{outline:3px solid #83c7d3!important;outline-offset:2px}
button:disabled{cursor:not-allowed!important;opacity:.56}
.topbar{
  position:sticky;top:0;z-index:60;min-height:76px;
  padding:14px max(28px,calc((100vw - 1680px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px;
  background:rgba(255,255,255,.88);border-bottom:1px solid rgba(210,224,226,.9);
  box-shadow:0 6px 28px rgba(20,54,66,.05);backdrop-filter:blur(16px)
}
.rs-header-leading{display:flex;align-items:center;gap:12px;min-width:220px}
.rs-brand-link{border:0;padding:0;background:transparent;cursor:pointer;flex-shrink:0}
.rs-brand-symbol{
  position:relative;display:grid;place-items:center;
  background:linear-gradient(140deg,#114a5d 0%,#1b6c76 78%,#47a49d 100%);
  color:white;width:44px;height:44px;border-radius:14px;font-weight:850;font-size:1.55rem;letter-spacing:-.085em;
  box-shadow:0 10px 24px rgba(17,74,93,.22)
}
.rs-brand-symbol:after{content:"";position:absolute;inset:1px;border-radius:13px;border:1px solid rgba(255,255,255,.18)}
.rs-brand-dot{color:#b7efe6}
.rs-header-titles{display:grid;gap:2px;min-width:0}
.rs-header-titles strong{font-size:1rem;line-height:1.25;letter-spacing:-.015em}
.rs-header-titles span{color:#77909a;font-size:.7rem;white-space:nowrap;letter-spacing:.02em}
.rs-header-navigation{display:flex;align-items:center;gap:10px;margin-left:auto}
.rs-header-home{border:1px solid transparent;color:#43606d;background:transparent;display:flex;align-items:center;gap:8px;padding:11px 15px;font:inherit;font-weight:780;border-radius:12px;cursor:pointer}
.rs-header-home:hover,.rs-view-home .rs-header-home{background:#edf7f7;color:#114e60;border-color:#d9e9ea}
.rs-header-home svg{width:18px;height:18px}
.top-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap}
.top-actions .badge.access-identity-badge{max-width:178px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:7px 11px;font-size:.74rem;border-radius:999px;background:#eff7f7;color:#275f68;border:1px solid #d6e8ea}
.rs-new-top{white-space:nowrap;font-size:.86rem!important;padding:10px 16px!important;border-radius:12px!important;box-shadow:0 10px 24px rgba(22,92,109,.16)}
.rs-save-top{white-space:nowrap;padding:9px 14px!important;font-size:.84rem!important;border-radius:11px!important}
.rs-system-details{position:relative;flex-shrink:0}
.rs-system-details>summary{display:grid;place-items:center;width:40px;height:40px;cursor:pointer;border:1px solid var(--rs-line);border-radius:12px;list-style:none;background:white;color:#5a6d75;box-shadow:var(--rs-shadow-sm)}
.rs-system-details>summary::-webkit-details-marker{display:none}
.rs-system-details>summary svg{width:19px;height:19px}
.rs-system-details[open]>summary{background:#eef5f6;border-color:#adcfd2}
.rs-system-popover{position:absolute;right:0;top:calc(100% + 10px);width:min(330px,calc(100vw - 28px));padding:18px;display:grid;gap:11px;background:white;border:1px solid var(--rs-line);border-radius:16px;box-shadow:0 20px 48px rgba(18,49,61,.16);z-index:100}
.rs-system-popover>strong{font-size:.86rem}
.rs-system-popover .badge{border-radius:10px;display:block;font-size:.71rem;line-height:1.55;overflow-wrap:anywhere;white-space:normal}
.rs-system-popover .button{width:100%;text-align:left;justify-content:flex-start;border-radius:10px}
#reportHubTopBtn{display:none!important}
.project-context-bar{position:sticky;top:76px;z-index:45;padding:8px max(28px,calc((100vw - 1680px)/2));background:rgba(250,251,252,.90);backdrop-filter:blur(10px);border-bottom:1px solid #e6eeef;min-height:50px}
.project-context-main{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%}
.project-context-main .project-context-label{font-size:.71rem;letter-spacing:.02em;text-transform:none;color:#78909a}
.project-context-main strong{font-size:.82rem;font-weight:760;max-width:min(48vw,560px);color:#1a5461}
.project-context-main>span:last-child{display:none}
.project-context-actions{flex-shrink:0;gap:8px}
#resumeLocalTopBtn{padding:6px 10px;font-size:.73rem;border-radius:9px}
#projectSyncState{font-size:.7rem;padding:4px 9px}
.workspace{max-width:1640px;padding:28px 28px 58px;gap:24px;grid-template-columns:268px minmax(0,1fr);align-items:start}
.sidebar{position:sticky!important;top:142px!important;max-height:calc(100dvh - 162px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;align-self:start;min-width:0;padding:13px 10px;border:1px solid #e2ebed;border-radius:18px;box-shadow:var(--rs-shadow-sm);background:rgba(255,255,255,.86);backdrop-filter:blur(12px)}
.sidebar .step{border-radius:12px;padding:10px 9px;column-gap:10px;grid-template-columns:31px 1fr;align-items:center;margin-bottom:2px}
.sidebar .step span{width:28px;height:28px;font-size:.74rem}
.sidebar .step span svg{width:14px;height:14px}
.sidebar .step b{font-size:.79rem;font-weight:760;line-height:1.35}
.sidebar .step small{font-size:.69rem;line-height:1.35}
.sidebar .sidebar-group-title{display:block;font-size:.64rem;font-weight:800;letter-spacing:.11em;padding:15px 8px 6px;color:#83959e}
.sidebar .sidebar-group-title.rs-sidebar-section-first{padding-top:4px}
.sidebar .step.active{box-shadow:inset 0 0 0 1px #d8ebed, 0 10px 22px rgba(19,74,87,.08);background:linear-gradient(180deg,#f4fbfb 0%,#ecf7f7 100%)}
.sidebar .step.active b{color:#145a6c}
.sidebar .progress-card{padding:16px 9px 10px}
.content{min-width:0}
.rs-view-home .workspace{display:block;max-width:1480px;padding:42px 34px 72px}
.rs-view-home .sidebar{display:none!important}
.rs-view-home .content{width:100%}
.rs-home-panel{min-width:0}
.rs-home-welcome{
  display:grid;grid-template-columns:minmax(0,1.42fr) minmax(360px,.84fr);gap:26px;align-items:stretch;position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(135deg,#eef9f7 0%,#f9fcfb 46%,#f3faf9 100%);
  border:1px solid #dceceb;padding:clamp(28px,3.8vw,48px);border-radius:28px;box-shadow:var(--rs-shadow-md)
}
.rs-home-welcome:before{content:"";position:absolute;z-index:-1;width:360px;height:360px;border-radius:100%;background:radial-gradient(circle,#dff1ed 0%,rgba(223,241,237,.25) 42%,transparent 72%);right:-120px;top:-90px;pointer-events:none}
.rs-home-welcome:after{content:"";position:absolute;z-index:-1;left:42%;bottom:-120px;width:360px;height:260px;background:radial-gradient(circle at center,rgba(25,95,112,.05),transparent 68%);pointer-events:none}
.rs-home-intro{min-width:0;display:flex;flex-direction:column;justify-content:center}
.rs-overline{display:flex;align-items:center;gap:9px;letter-spacing:.15em;color:#4d8090;font-size:.66rem;font-weight:850}
.rs-overline-dot{width:8px;height:8px;border-radius:100%;background:linear-gradient(180deg,#37b5a6,#1f7c7f)}
.rs-home-intro h1{font-size:clamp(2.05rem,3.15vw,3.35rem);letter-spacing:-.04em;line-height:1.16;margin:20px 0 14px;color:#143947;font-weight:830;max-width:14ch}
.rs-home-intro>p{max-width:670px;color:#56727d;font-size:1rem;line-height:1.8;margin:0 0 18px}
.rs-home-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 22px;max-width:860px}
.rs-home-highlights span{display:grid;gap:3px;padding:13px 14px;border-radius:16px;background:rgba(255,255,255,.72);border:1px solid rgba(214,230,231,.9);box-shadow:0 10px 22px rgba(18,59,69,.05)}
.rs-home-highlights strong{font-size:.8rem;color:#204654;line-height:1.4}
.rs-home-highlights small{font-size:.73rem;color:#6a8089;line-height:1.55}
.rs-home-hero-actions{display:flex;gap:11px;flex-wrap:wrap}
.rs-primary-cta,.rs-secondary-cta{border-radius:13px!important;min-height:48px;padding:12px 20px!important;font-weight:780!important}
.rs-primary-cta{box-shadow:0 10px 26px rgba(22,92,109,.18)}
.rs-secondary-cta{background:white!important;border-color:#dce8ea!important}
.rs-home-help{margin-top:18px;font-size:.75rem;color:#6d868f;line-height:1.68}
.rs-home-project-side{min-width:0;display:flex;align-items:stretch}
.rs-home-project-side .project-current-card{margin:0;width:100%;min-height:296px;display:flex;flex-direction:column;border:1px solid #dce9ea;border-radius:22px;padding:23px;background:linear-gradient(180deg,rgba(255,255,255,.95) 0%,rgba(250,252,252,.93) 100%);box-shadow:var(--rs-shadow-sm);position:relative;overflow:hidden}
.rs-home-project-side .project-current-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#1a6575,#4ab0aa)}
.rs-current-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#6f868e;font-size:.78rem;font-weight:760}
.rs-current-head .pill{font-size:.69rem;padding:4px 10px;border-radius:999px}
.rs-home-project-side .project-hub-current-name{font-size:1.36rem;font-weight:830;line-height:1.38;color:#1a4252;max-height:4.4em;overflow-wrap:anywhere;overflow:hidden;margin:20px 0 7px}
.rs-home-project-side #projectHubCurrentMeta{font-size:.72rem;max-height:5.2em;overflow:auto;overflow-wrap:anywhere;color:#647b84}
.rs-current-insight{margin-top:14px;padding:12px 13px;border-radius:14px;background:#f2f8f8;border:1px solid #deebec;color:#607a83;font-size:.74rem;line-height:1.65}
.rs-current-insight strong{color:#204955}
.rs-current-primary-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:16px}
.rs-current-primary-actions .button{font-size:.78rem;padding:9px 12px;border-radius:10px}
.rs-current-extra{margin-top:14px;font-size:.72rem;color:#56737f}
.rs-current-extra summary{cursor:pointer;width:max-content;padding:3px 0}
.rs-current-extra .action-row{padding-top:9px}
.rs-home-project-side .save-status{font-size:.75rem;margin-top:8px;color:#6f848c}
.rs-section-heading{display:flex;justify-content:space-between;align-items:end;gap:18px;margin:36px 0 16px;padding:0 3px}
.rs-section-heading>div{position:relative}
.rs-section-heading>div:after{content:"";display:block;width:72px;height:3px;border-radius:999px;margin-top:14px;background:linear-gradient(90deg,#2d7f8a,#7ac7c0)}
.rs-section-heading h2{margin:4px 0;font-size:1.42rem;line-height:1.32;color:#173846;letter-spacing:-.015em}
.rs-section-heading p{margin:4px 0 0;color:#758892;font-size:.82rem}
.rs-section-kicker{font-size:.66rem;letter-spacing:.14em;font-weight:850;color:#4b8594}
.rs-home-panel .studio-home-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:0}
.rs-home-panel .studio-module-card{position:relative;display:flex;flex-direction:column;text-align:left;min-height:192px;gap:7px;background:linear-gradient(180deg,#fff 0%,#fcfefe 100%);border:1px solid #dfe8ea;padding:20px 20px 18px;border-radius:18px;box-shadow:var(--rs-shadow-sm);color:#253947;overflow:hidden}
.rs-home-panel .studio-module-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:linear-gradient(180deg,#2b8693,#7ec6bf);opacity:.9}
.rs-home-panel .studio-module-card:hover,.rs-home-panel .studio-module-card:focus-visible{transform:translateY(-3px);border-color:#98c4ca;box-shadow:0 18px 42px rgba(22,58,73,.11)}
.rs-module-top{display:flex;justify-content:space-between;align-items:start;width:100%;margin-bottom:10px}
.rs-home-panel .studio-module-card .module-icon{font-size:.75rem;font-weight:850;letter-spacing:.04em;border-radius:11px;width:38px;height:38px;display:grid;place-items:center;background:linear-gradient(180deg,#e7f5f4,#eef8f8);color:#1f6574;box-shadow:inset 0 0 0 1px rgba(31,101,116,.08)}
.rs-home-panel .studio-module-card .rs-module-arrow{font-size:1.08rem;color:#7a939b}
.rs-home-panel .studio-module-card:nth-child(1){grid-column:span 2;min-height:208px;background:linear-gradient(135deg,#fefefe 0%,#f6fcfb 100%)}
.rs-home-panel .studio-module-card:nth-child(4),.rs-home-panel .studio-module-card:nth-child(5){grid-column:span 2}
.rs-home-panel .studio-module-card.rs-locked{opacity:1;filter:grayscale(.12);background:#fafcfc;cursor:not-allowed}
.rs-home-panel .studio-module-card.rs-locked:hover{transform:none;box-shadow:var(--rs-shadow-sm);border-color:#dfe8ea}
.rs-home-panel .studio-module-card.rs-locked .rs-module-arrow{visibility:hidden}
.rs-home-panel .studio-module-card strong{font-size:1.01rem;color:#183947;line-height:1.42}
.rs-home-panel .studio-module-card span:not(.module-icon):not(.rs-module-top):not(.rs-module-arrow){font-size:.83rem;color:#56717d;line-height:1.58}
.rs-home-panel .studio-module-card small{font-size:.71rem;color:#8798a0;margin-top:auto;padding-top:8px}
.rs-home-project-library{margin-top:34px;background:linear-gradient(180deg,#ffffff 0%,#fbfcfc 100%);border:1px solid #e0e8ea;border-radius:22px;padding:22px 24px;min-width:0;box-shadow:var(--rs-shadow-sm)}
.rs-library-heading{margin:0 0 16px}
.rs-home-project-library .projects-list{display:grid;gap:11px;max-height:560px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px}
.rs-home-project-library .project-row{position:relative;min-width:0;border:1px solid #e1e8ec;border-radius:14px;gap:12px;background:linear-gradient(180deg,#fff 0%,#fcfefe 100%);padding:14px 16px;box-shadow:0 6px 16px rgba(18,58,69,.03)}
.rs-home-project-library .project-row:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:999px;background:#d6e5e7}
.rs-home-project-library .project-row.current{background:#f2fbfb;border-color:#a8d1d7;box-shadow:0 10px 24px rgba(24,96,110,.08)}
.rs-home-project-library .project-row.current:before{background:linear-gradient(180deg,#1d6b79,#54b4ab)}
.rs-home-project-library .project-meta{min-width:0;overflow-wrap:anywhere}
.rs-home-project-library .project-row .button{font-size:.75rem;padding:8px 12px;border-radius:10px}
.rs-home-project-library .project-row .action-row{flex-wrap:wrap}
.rs-home-footnote{margin:16px 4px 0;color:#819199;font-size:.74rem;text-align:center}
body:not(.rs-view-home) .content>.panel.active>.section-heading{background:#fff;border:1px solid #e2eaec;border-radius:16px;padding:20px 22px;margin-bottom:18px;box-shadow:var(--rs-shadow-sm)}
body:not(.rs-view-home) .content>.panel.active>.section-heading>div:after{display:none}
body:not(.rs-view-home) .content>.panel.active>.section-heading h2{font-size:1.48rem}
body:not(.rs-view-home) .content>.panel.active>.section-heading p{font-size:.82rem}
.content .card{box-shadow:var(--rs-shadow-sm);border-radius:16px;background:#fff}
.content .card:not(.project-current-card){border-color:#e1e8eb}
@media(min-width:1101px){
  #reportStageRevision .report-revision-grid{align-items:start}
  #reportStageRevision .report-revision-inspector{overflow-y:auto;max-height:calc(100dvh - 164px);overscroll-behavior:contain;scrollbar-gutter:stable}
  #reportRevisionQueue{overflow-y:auto;max-height:calc(100dvh - 320px);overscroll-behavior:contain}
}
.rs-mobile-nav-toggle{display:none}
.rs-mobile-nav-scrim{display:none}
@media(max-width:1240px){
  .rs-view-home .workspace{padding:30px 24px 60px}
  .rs-home-welcome{grid-template-columns:minmax(0,1.16fr) minmax(300px,.84fr);gap:18px}
  .rs-home-highlights{grid-template-columns:1fr}
  .rs-home-panel .studio-home-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rs-home-panel .studio-module-card,.rs-home-panel .studio-module-card:nth-child(1),.rs-home-panel .studio-module-card:nth-child(4),.rs-home-panel .studio-module-card:nth-child(5){grid-column:span 1;min-height:178px}
  .topbar{padding:12px 22px}
  .project-context-bar{padding:8px 22px}
  .rs-header-leading{min-width:170px}
}
@media(max-width:980px){
  .topbar{min-height:68px;gap:10px}
  .project-context-bar{top:68px;position:sticky;padding:7px 18px}
  .rs-header-navigation{margin-left:auto}
  .rs-mobile-nav-toggle{display:grid;place-items:center;border:1px solid #d9e5e6;background:white;color:#1a5361;border-radius:12px;width:40px;height:40px;flex-shrink:0;cursor:pointer;box-shadow:var(--rs-shadow-sm)}
  .rs-mobile-nav-toggle svg{width:21px;height:21px}
  .workspace{display:block!important;padding:18px 17px 46px}
  .rs-view-home .workspace{padding:25px 18px 50px}
  .sidebar{position:fixed!important;z-index:78;top:68px!important;left:0;width:min(326px,88vw);height:calc(100dvh - 68px);max-height:none;display:block!important;overflow-y:auto;border-radius:0 18px 18px 0;box-shadow:18px 0 50px rgba(14,43,55,.16);transform:translateX(-105%);transition:transform .18s ease}
  .rs-nav-open .sidebar{transform:translateX(0)}
  .rs-mobile-nav-scrim{display:none;position:fixed;z-index:75;inset:68px 0 0;background:rgba(23,43,51,.34)}
  .rs-nav-open .rs-mobile-nav-scrim{display:block}
  .rs-view-home .sidebar{display:block!important}
  .rs-header-leading{min-width:0}
  .rs-header-navigation{margin-left:auto}
  .rs-home-welcome{grid-template-columns:1fr;gap:16px}
  .rs-home-intro h1{font-size:2.15rem;max-width:none}
  .project-context-main strong{max-width:42vw}
}
@media(max-width:700px){
  .topbar{gap:9px;padding:10px 12px;min-height:60px}
  .rs-brand-symbol{width:39px;height:39px;font-size:1.32rem;border-radius:12px}
  .rs-header-leading{gap:8px}
  .rs-header-titles strong{font-size:.84rem}
  .rs-header-home{font-size:.78rem;padding:9px 8px;gap:5px}
  .rs-header-home svg{width:16px;height:16px}
  .rs-new-top{display:none!important}
  .rs-save-top{display:none}
  .rs-system-details>summary{width:36px;height:36px;border-radius:10px}
  .top-actions{gap:6px}
  .top-actions .access-identity-badge{display:none}
  .rs-mobile-nav-toggle{width:36px;height:36px;border-radius:10px}
  .project-context-bar{top:60px;padding:7px 12px;min-height:40px;display:flex;gap:7px}
  .project-context-main .project-context-label{display:none}
  .project-context-main strong{max-width:62vw;font-size:.72rem}
  #resumeLocalTopBtn{display:none}
  #projectSyncState{font-size:.63rem;padding:4px 7px}
  .rs-mobile-nav-scrim{inset:60px 0 0}
  .sidebar{top:60px!important;height:calc(100dvh - 60px)}
  .rs-view-home .workspace{padding:18px 12px 42px}
  .workspace{padding:14px 12px 40px}
  .rs-home-welcome{padding:22px 18px;border-radius:20px;gap:18px}
  .rs-home-intro h1{font-size:1.98rem;margin:12px 0 9px}
  .rs-home-intro>p{font-size:.9rem;margin-bottom:15px}
  .rs-home-highlights{gap:10px;margin-bottom:18px}
  .rs-home-highlights span{padding:11px 12px;border-radius:14px}
  .rs-primary-cta,.rs-secondary-cta{padding:10px 14px!important;font-size:.82rem;min-height:44px}
  .rs-home-project-side .project-current-card{min-height:auto;padding:18px;border-radius:18px}
  .rs-section-heading{margin:28px 2px 13px;align-items:start}
  .rs-section-heading h2{font-size:1.18rem}
  .rs-home-panel .studio-home-actions{grid-template-columns:1fr;gap:11px}
  .rs-home-panel .studio-module-card,.rs-home-panel .studio-module-card:nth-child(1),.rs-home-panel .studio-module-card:nth-child(4),.rs-home-panel .studio-module-card:nth-child(5){min-height:120px;padding:16px;gap:4px}
  .rs-home-panel .studio-module-card .rs-module-top{margin-bottom:5px}
  .rs-home-project-library{margin-top:26px;padding:16px 12px;border-radius:18px}
  .rs-library-heading{flex-wrap:wrap;margin:0 2px 14px}
  .rs-home-project-library .project-row{flex-direction:column;align-items:stretch;border-radius:12px}
  .rs-home-project-library .project-row .action-row{width:100%}
  .rs-home-project-library .project-row .button{max-width:100%}
  body:not(.rs-view-home) .content>.panel.active>.section-heading{padding:14px;flex-direction:column;border-radius:14px}
  body:not(.rs-view-home) .content>.panel.active>.section-heading h2{font-size:1.25rem}
  #reportStageRevision .report-revision-inspector,#reportRevisionQueue{max-height:none;overflow:visible}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}button,.sidebar{transition:none!important}}
