/* Shared shell, based on recommendation 01. Page content keeps its own layout. */
.report-shell{--green:#345c4b;--body:#505d55;--sidebar-width:180px;--shell-gap:48px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
.report-shell main{width:calc(100% - 144px);max-width:none;margin:0 auto;min-height:100svh;padding:24px 0;display:flex;flex-direction:column}
.report-shell header{margin:0;padding-bottom:16px;border-bottom:1px solid var(--line);min-height:22px;flex:none}
.report-shell .report-page-title,.report-shell .report-brand-title{margin:0;font-size:14px;line-height:1.5;font-weight:400;color:var(--muted)}
.report-layout{display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr);gap:var(--shell-gap);align-items:start;margin-top:72px;flex:1;transition:grid-template-columns 160ms ease}
.report-sidebar{min-width:0;position:sticky;top:24px;z-index:3}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:44px;margin-bottom:12px}
.sidebar-heading h2{font-size:14px;font-weight:400;color:var(--muted);line-height:22px;margin:0 0 0 12px;white-space:nowrap}
.sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:10px;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.sidebar-toggle:hover{background:var(--hover);color:var(--green)}
.sidebar-toggle svg{width:20px;height:20px}
.sidebar-tabs{display:flex;flex-direction:column;gap:8px;min-width:0}
.sidebar-tab{position:relative;display:flex;align-items:center;gap:8px;width:100%;min-height:48px;padding:12px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:inherit;font-size:16px;line-height:24px;text-align:left;cursor:pointer}
.sidebar-tab:hover{background:var(--hover);color:var(--green)}
.sidebar-tab[aria-selected=true]{background:#e6ece6;color:var(--green);font-weight:500}
.sidebar-tab[aria-selected=true]::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:2px;background:var(--green)}
.nav-mark{flex:none;display:flex;align-items:center;justify-content:center;width:20px;min-height:20px;font-size:12px;font-variant-numeric:tabular-nums}
.nav-mark svg{width:20px;height:20px}
.nav-label{min-width:0}
.report-content{min-width:0}
.report-shell[data-sidebar-collapsed=true]{--sidebar-width:44px}
.report-shell[data-sidebar-collapsed=true] .sidebar-heading h2,.report-shell[data-sidebar-collapsed=true] .nav-label{display:none}
.report-shell[data-sidebar-collapsed=true] .sidebar-heading{justify-content:center}
.report-shell[data-sidebar-collapsed=true] .sidebar-toggle svg{transform:rotate(180deg)}
.report-shell[data-sidebar-collapsed=true] .sidebar-tab{justify-content:center;padding:12px}
.report-shell[data-sidebar-collapsed=true] .sidebar-tab:is(:hover,:focus-visible)::after{content:attr(aria-label);position:absolute;left:calc(100% + 8px);top:4px;max-width:240px;white-space:nowrap;background:var(--ink);color:var(--bg);padding:8px 12px;border-radius:6px;pointer-events:none;font-size:14px;line-height:24px;font-weight:400}
.report-chapter-nav{display:flex;flex-direction:column;gap:12px;margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.report-chapter-nav .report-action{position:relative;width:100%;padding-inline:12px;font-size:14px}
.report-shell[data-sidebar-collapsed=true] .report-chapter-nav .report-action{padding:10px}
.report-shell[data-sidebar-collapsed=true] .report-chapter-nav .report-action:is(:hover,:focus-visible)::after{content:attr(title);position:absolute;left:calc(100% + 8px);top:4px;white-space:nowrap;background:var(--ink);color:var(--bg);padding:8px 12px;border-radius:6px;pointer-events:none;font-size:14px;line-height:24px;z-index:6}
.report-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid var(--green);border-radius:8px;background:transparent;color:var(--green);font:inherit;font-size:16px;line-height:24px;text-decoration:none;white-space:nowrap;cursor:pointer}
.report-action svg{width:20px;height:20px;flex:none}
.report-action:hover:not(:disabled){background:var(--hover)}
.report-action-primary{background:var(--green);color:#fff}
.report-action-primary:hover:not(:disabled){background:#284a3b;border-color:#284a3b}
.report-action:disabled{opacity:.38;cursor:default}
.report-shell [hidden]{display:none!important}
.report-shell :is(button,a,[role=tabpanel]):focus-visible{outline:2px solid var(--green);outline-offset:4px}
@media(min-width:1000px) and (max-height:800px){.report-shell main{padding-top:16px}}
@media(min-width:768px) and (max-width:999px){.report-shell{--shell-gap:32px}.report-shell main{padding-top:32px}}
@media(max-width:767px){
 .report-shell main{padding-top:24px}
 .report-shell header{align-items:flex-start;flex-direction:column;gap:8px}
 .report-shell .title-row{white-space:normal;flex-wrap:wrap;gap:0 6px}
 .report-layout{display:block}
 .report-sidebar{position:static;margin-bottom:48px}
 .sidebar-heading{min-height:0;margin-bottom:12px}.sidebar-heading h2{margin-left:0}
 .sidebar-tabs{flex-direction:row;gap:8px;overflow:auto;padding:4px;margin:-4px;scrollbar-width:thin}
 .sidebar-tab{flex:none;width:auto;white-space:nowrap}
 .report-action{padding:10px 12px}
}
@media(prefers-reduced-motion:reduce){.report-layout{transition:none}}

/* Long competitor directories scroll without pushing chapter links off screen. */
@media(min-width:768px){
 .report-sidebar{display:flex;flex-direction:column;max-height:calc(100svh - 168px)}
 .sidebar-heading,.report-chapter-nav{flex-shrink:0}
 .sidebar-tabs{min-height:0;overflow-y:auto;scrollbar-width:thin;padding:4px;margin:-4px}
}
