:root {
  --navy:            #0f1f33;
  --navy-mid:        #1e3553;
  --navy-light:      #2d4a6e;
  --page-bg:         #edf0f4;
  --white:           #ffffff;
  --off-white:       #f4f5f7;
  --border:          #d4d9e2;
  --border-light:    #e4e7ed;
  --bg-app:          #edf0f4;
  --text-main:       #0b1929;
  --yellow-menu:     #FEF9C3;
  --green-menu:      #DCFCE7;
  --grey-menu:       #F1F5F9;
  --blue-menu:       #DBEAFE;
  --text-body-size:  1.18rem;
  --text-line-height:1.82;
  --text-body-color: #243040;
  --serif:           'EB Garamond', Georgia, serif;
  --mono:            'DM Mono', 'Courier New', monospace;
  --green-sem:       #185c38;
  --green-bg:        #e8f4ee;
  --red-sem:         #7a1824;
  --red-bg:          #faeef0;
  --blue-sem:        #183460;
  --blue-bg:         #e8eef8;
  --amber-sem:       #6e440a;
  --amber-bg:        #fdf0e0;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }
body { font-family: var(--serif); background: var(--page-bg); color: var(--text-main); margin: 0; padding: 0; overflow-x: clip; max-width: 100vw; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { min-width: 0; }
p, a, span, div, li, td { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; }
a { color: var(--navy-mid); text-decoration: none; cursor: pointer; transition: color 0.15s; }
a:hover { color: var(--navy); text-decoration: underline; }
p { font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); margin-bottom: 0.9rem; }
strong, b { font-weight: 700; color: var(--text-main); }

/* HEADINGS */
h1 { font-family: var(--serif); font-size: 3rem; font-weight: 700; color: var(--navy); letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 10px; }
h2 { font-family: var(--serif); }
h3 { scroll-margin-top: 40px; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--border-light); padding-bottom: 8px; margin-bottom: 18px; margin-top: 28px; letter-spacing: -0.02em; line-height: 1.2; }
h4 { font-family: var(--serif); font-size: 1.32rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; margin-top: 22px; border-bottom: none; }

/* BULLETS */
ul { padding-left: 1.4rem; margin-top: 4px; margin-bottom: 1rem; list-style: disc; }
ol { padding-left: 1.4rem; margin-top: 4px; margin-bottom: 1rem; }
li { font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); margin-bottom: 0.4rem; list-style: inherit; }
li > ul, li > ol { margin-top: 4px; margin-bottom: 4px; }
li > p:first-child { display: inline; }
.source-list ul { margin-bottom: 0.6rem; }
.source-list li { margin-bottom: 0.3rem; line-height: 1.6; font-size: 0.95rem; }

/* LAYOUT */
.main-wrapper { display: block; width: 100%; max-width: 100vw; overflow-x: clip; padding-left: 300px; box-sizing: border-box; }
.sidebar { position: fixed; top: 0; left: 0; width: 300px; height: 100vh; overflow-y: auto; border-right: 2px solid var(--border); background: var(--white); z-index: 1000; box-shadow: 2px 0 12px rgba(15,31,51,0.07); display: flex; flex-direction: column; }
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); }
.content-area { display: block; margin: 0 auto; padding: 48px 52px 80px; width: 100%; max-width: 1400px; min-height: 100vh; box-sizing: border-box; overflow-x: clip; }

/* SIDEBAR HEADER */
.meta-block { padding: 22px 22px 18px; border-bottom: 2px solid var(--border); background: var(--white); margin-bottom: 0; }
.sidebar-company-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; line-height: 1.15; margin: 10px 0 3px 0; padding: 0; border-bottom: none; }
.sidebar-tagline { font-family: var(--serif); font-size: 0.85rem; font-weight: 500; color: #526070; font-style: normal; margin: 0 0 10px 0; line-height: 1.45; letter-spacing: 0.01em; display: block; }
.sb-top-data { padding: 0 0 10px 0; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.sb-tag { background: var(--off-white); padding: 3px 9px; border-radius: 2px; font-family: var(--serif); font-weight: 500; font-size: 0.75rem; color: #526070; border: 1px solid var(--border); }
.sb-score { padding: 3px 9px; border-radius: 2px; font-family: var(--mono); font-weight: 700; font-size: 0.64rem; letter-spacing: 0.08em; white-space: nowrap; display: inline-block; }
.sb-score-green  { background: #185c38 !important; color: #ffffff !important; }
.sb-score-amber  { background: #5c6e18 !important; color: #ffffff !important; }
.sb-score-orange { background: #6e440a !important; color: #ffffff !important; }
.sb-score-blue   { background: #183460 !important; color: #ffffff !important; }
.sb-score-red    { background: #7a1824 !important; color: #ffffff !important; }
.score-green { background: #185c38 !important; color: #fff !important; padding: 3px 9px; border-radius: 2px; font-family: var(--mono); font-weight: 700; font-size: 0.64rem; }
.contact-row { display: flex; flex-direction: column; gap: 5px; font-size: 0.9rem; margin-top: 8px; }
.contact-row a { color: var(--navy-mid); display: flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 0.88rem; }
.contact-row a:hover { color: var(--navy); text-decoration: underline; }
.contact-row i { width: 12px; font-size: 0.82rem; color: var(--navy-light); }
.meta-desc { font-family: var(--serif); font-size: 0.88rem; font-style: normal; font-weight: 600; color: #1e3553; margin: 6px 0 12px 0; line-height: 1.6; }

/* NAVIGATION */
.nav-item { display: flex; align-items: center; gap: 9px; padding: 7px 22px; font-family: var(--serif); font-size: 0.95rem; color: var(--text-body-color); border-left: 2px solid transparent; margin-bottom: 1px; hyphens: none; overflow-wrap: break-word; word-break: normal; transition: all 0.12s; line-height: 1.4; }
.nav-item:hover { color: var(--navy); border-left-color: var(--navy); background: rgba(15,31,51,0.04) !important; text-decoration: none; }
.nav-item::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
a.nav-item.bg-yellow, a.nav-item.bg-green, a.nav-item.bg-grey, a.nav-item.bg-blue, a.nav-item.bg-light-purple, a.nav-item.bg-dd, a.nav-item.bg-pm,
.nav-item.bg-yellow, .nav-item.bg-green, .nav-item.bg-grey, .nav-item.bg-blue, .nav-item.bg-light-purple, .nav-item.bg-dd, .nav-item.bg-pm { background: transparent !important; }
a.nav-item.bg-yellow:hover, a.nav-item.bg-green:hover, a.nav-item.bg-grey:hover, a.nav-item.bg-blue:hover, a.nav-item.bg-light-purple:hover, a.nav-item.bg-dd:hover, a.nav-item.bg-pm:hover,
.nav-item.bg-yellow:hover, .nav-item.bg-green:hover, .nav-item.bg-grey:hover, .nav-item.bg-blue:hover, .nav-item.bg-light-purple:hover, .nav-item.bg-dd:hover, .nav-item.bg-pm:hover {
  background: var(--off-white) !important; color: var(--navy) !important; border-left-color: var(--navy) !important;
}
.bg-yellow::before     { background: #8fa8c8 !important; }
.bg-green::before      { background: #7aaa88 !important; }
.bg-light-purple::before { background: #a898c0 !important; }
.bg-blue::before       { background: #0f1f33 !important; }
.bg-grey::before       { background: #9eaaba !important; }
.bg-dd::before         { background: #6366f1 !important; }
.bg-pm::before         { background: #0d9488 !important; }
.sb-nav-heading { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: #8898a8; padding: 9px 22px 6px; background: #f0f2f5; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0; display: block; width: 100%; box-sizing: border-box; align-self: stretch; }
.sb-legend-wrap { margin: 0; padding: 0; background: transparent; border: none; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sb-legend-wrap div { display: flex; align-items: center; gap: 9px; padding: 6px 22px; background: #f0f2f5; }
.sb-legend-wrap span:first-child { width: 9px; height: 9px; border-radius: 1px; flex-shrink: 0; display: inline-block; }
.sb-legend-wrap span:last-child { font-family: var(--serif); font-style: italic; font-size: 0.82rem; color: #8898a8; line-height: 1.4; }
/* Top sidebar fund dashboard entry — clickable logo to Place Chat */
.sidebar-fund-link { display: block; text-align: center; padding: 18px 18px 14px; text-decoration: none; border-bottom: 1px solid var(--border); transition: background 0.18s; }
.sidebar-fund-link:hover { background: var(--off-white); text-decoration: none; }
.sidebar-fund-logo { max-width: 140px; height: auto; display: block; margin: 0 auto 8px; opacity: 0.95; transition: opacity 0.18s; }
.sidebar-fund-link:hover .sidebar-fund-logo { opacity: 1; }
.sidebar-fund-cta { display: block; font-family: var(--serif); font-style: italic; font-size: 0.76rem; line-height: 1.45; color: #8898a8; letter-spacing: 0.01em; }
.sidebar-fund-link:hover .sidebar-fund-cta { color: var(--navy); }

.sidebar-logo-wrap { text-align: center; padding: 16px 22px 20px; }
.sidebar-logo-wrap img { margin: 0 auto; display: block; }
.sidebar-logo-wrap p, .sidebar-logo-wrap .meta-text { text-align: center; }
details summary { font-family: var(--serif) !important; font-size: 1rem !important; }
.section { margin: 0; padding: 16px 22px; border-top: 1px solid var(--border); }
.section h3 { font-family: var(--serif); font-size: 0.95rem; font-weight: 700; margin: 0 0 10px 0; border: none; padding: 0; color: var(--navy); }
.divider { height: 1px; background-color: var(--border); margin: 0; }
.meta-text { font-family: var(--serif); font-size: 0.95rem; color: #526070; margin-bottom: 12px; font-style: normal; line-height: 1.7; }
p.meta-text[style*="pre-wrap"] { font-family: var(--serif) !important; font-size: 0.95rem !important; color: var(--text-body-color) !important; font-style: normal !important; line-height: 1.75; white-space: pre-wrap; }
.cta-list { list-style: none; padding: 0; margin: 0 0 12px 0; }
.cta-list li { font-family: var(--serif); font-size: 0.92rem; color: #526070; margin-bottom: 10px; padding-left: 18px; position: relative; line-height: 1.5; list-style: none; }
.cta-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--navy-mid); font-weight: bold; }
.cta-list li::marker { display: none; }
.cta-list strong { color: var(--navy); }
.btn { display: block; width: 100%; padding: 10px 14px; font-family: var(--serif); font-size: 0.95rem; font-weight: 600; text-align: center; border-radius: 2px; cursor: pointer; transition: all 0.15s ease; box-sizing: border-box; margin-bottom: 7px; line-height: 1.45; text-decoration: none !important; hyphens: none; }
.btn:hover, .btn:focus, a.btn:hover, a.btn:focus { text-decoration: none !important; }
.btn-secondary { background-color: var(--navy); color: #ffffff !important; border: 1px solid var(--navy); }
.btn-secondary:hover { background-color: var(--navy-mid); color: #ffffff !important; border-color: var(--navy-mid); }
.btn-primary { background-color: var(--navy); color: #ffffff; border: 1px solid var(--navy); }
.btn-primary:hover { background-color: var(--navy-mid); color: #ffffff !important; }
.btn-status { display: block; width: 100%; padding: 9px 12px; font-family: var(--serif); font-size: 0.92rem; font-weight: 600; border-radius: 2px; text-decoration: none !important; cursor: pointer; text-align: center; margin-bottom: 4px; box-sizing: border-box; transition: all 0.15s; border: 1px solid transparent; }
.btn-status:hover, a.btn-status:hover { text-decoration: none !important; }
.status-call     { background-color: var(--green-bg); color: var(--green-sem); border-color: #b0d4c0; }
.status-call:hover { background-color: var(--green-sem); color: #ffffff !important; }
.status-consider { background-color: var(--amber-bg); color: var(--amber-sem); border-color: #ddc898; }
.status-consider:hover { background-color: var(--amber-sem); color: #ffffff !important; }
.status-monitor  { background-color: var(--blue-bg); color: var(--blue-sem); border-color: #a8c0dc; }
.status-monitor:hover { background-color: var(--blue-sem); color: #ffffff !important; }
.status-pass     { background-color: var(--red-bg); color: var(--red-sem); border-color: #ddb8be; }
.status-pass:hover { background-color: var(--red-sem); color: #ffffff !important; }
.logic-tag { display: inline-block; font-family: var(--mono); font-size: 0.68rem; background: var(--off-white); padding: 2px 9px; border: 1px solid var(--border); color: #526070; letter-spacing: 0.02em; white-space: normal; word-break: break-word; }
.subtitle-category { font-family: var(--serif); font-size: 1rem; text-transform: none; font-style: normal; color: #526070; margin-top: 0; margin-bottom: 10px; line-height: 1.55; }
.body-tagline { font-family: var(--serif); font-size: 1.15rem; font-style: normal; color: #526070; margin-top: 0; margin-bottom: 36px; line-height: 1.7; max-width: 780px; }
.section-container .text-col li, .section-container .text-block li { list-style: disc; padding-left: 0; }
.section-container .text-col li::before, .section-container .text-block li::before { content: none; }
.section-container { background: var(--white); padding: 32px 36px 34px; margin-bottom: 20px; border: 1px solid var(--border); border-top: 3px solid var(--navy); scroll-margin-top: 32px; overflow: visible; display: block; clear: both; width: 100%; box-sizing: border-box; box-shadow: 0 1px 4px rgba(15,31,51,0.06); }
.section-container * { min-width: 0; box-sizing: border-box; }
.section-container details { max-width: 100%; overflow-x: auto; }
.section-container table { table-layout: auto; width: 100%; max-width: 100%; }
.section-container td, .section-container th { overflow-wrap: break-word; word-break: break-word; }
.section-container td { font-family: var(--serif); }
.section-container th { font-family: var(--mono); }
.memo-table-fallback { max-width: 100%; overflow-x: auto; box-sizing: border-box; }
.section-container.dd-section { border-top-color: #4f46e5; }
.section-container.pm-section { border-top-color: #0f766e; }
.section-title { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; color: var(--navy); letter-spacing: -0.03em; border-bottom: 2px solid var(--navy); padding-bottom: 14px; margin-bottom: 28px; line-height: 1.1; }
#value-chain-players, #market-trends { scroll-margin-top: 48px; }
.split-container { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; width: 100%; }
.text-col { flex: 1 1 300px; min-width: 0; max-width: 780px; font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); font-family: var(--serif); }
.img-col { flex: 0 0 360px; min-width: 260px; max-width: 42%; position: -webkit-sticky; position: sticky; top: 24px; align-self: flex-start; height: auto; }
.sticky-img { width: 100%; max-width: 100%; height: auto; box-shadow: 0 2px 8px rgba(15,31,51,0.1); border: 1px solid var(--border); display: block; object-fit: contain; cursor: zoom-in; transition: box-shadow 0.15s; }
.sticky-img:hover { box-shadow: 0 4px 16px rgba(15,31,51,0.2); }

/* LIGHTBOX */
.img-lightbox { display: none; position: fixed; inset: 0; background: rgba(11,25,41,0.88); z-index: 99999; align-items: center; justify-content: center; cursor: zoom-out; }
.img-lightbox:target { display: flex; }
.img-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; box-shadow: 0 12px 60px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); display: block; }
.img-lightbox .lb-close { position: absolute; top: 18px; right: 22px; color: rgba(255,255,255,0.75); font-size: 2rem; line-height: 1; font-family: var(--mono); text-decoration: none; padding: 4px 12px; background: none; }
.img-lightbox .lb-close:hover { color: #fff; }

.text-full-width { display: block; width: 100%; font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); font-family: var(--serif); }
.text-block { font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); font-family: var(--serif); }
.source-list { font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); font-family: var(--serif); }
.conviction-text { font-size: var(--text-body-size); line-height: var(--text-line-height); color: var(--text-body-color); font-family: var(--serif); }
.source-list ul { list-style: none !important; padding-left: 0 !important; }
.source-list li { list-style: none !important; padding-left: 0 !important; margin-bottom: 0.5rem; line-height: 1.72; }
#sources ul, #sources li { list-style: none !important; }
#sources ul { padding-left: 0 !important; }
#sources li::before, #sources li::marker { display: none !important; content: none !important; }
.section-container h3 { margin-top: 30px; margin-bottom: 14px; scroll-margin-top: 32px; }
.section-container > .section-title + h3, .section-container h3:first-of-type { margin-top: 0; }
.section-container .table-container + h3, .section-container table + h3, .section-container div[style] + h3 { margin-top: 36px; }
.disclaimer-box { background-color: #fffbeb; border-left: 3px solid #f59e0b; padding: 12px 16px; margin-top: 10px; margin-bottom: 18px; font-family: var(--serif); font-size: 0.95rem; color: #92400e; line-height: 1.6; font-style: italic; }
.disclaimer-subtext { font-family: var(--serif); font-size: 0.92rem; font-style: italic; color: #526070; margin-bottom: 10px; margin-top: -8px; }
.note { background: var(--off-white); border-left: 2px solid #c0ccd8; padding: 10px 16px; font-family: var(--serif); font-size: 0.95rem; font-style: italic; color: #526070; line-height: 1.6; margin-top: 14px; }
.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); margin-top: 16px; border: 1px solid var(--border); }
.swot-item { padding: 22px 24px; background: var(--white); }
.swot-item h3 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 0; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid; }
.swot-item ul { padding-left: 1.3rem; margin: 0; list-style: disc; }
.swot-item li { margin-bottom: 7px; font-size: 1rem; line-height: 1.65; list-style: disc; }
.swot-grid-small { display: grid; grid-template-columns: 1fr; gap: 5px; margin-top: 8px; }
.s-green { border-color: #b8d9c8; background: #f6fdf9; } .s-green h3 { color: var(--green-sem); border-color: var(--green-sem); }
.s-red   { border-color: #ddb8be; background: #fdf8f8; } .s-red   h3 { color: var(--red-sem);   border-color: var(--red-sem);   }
.s-blue  { border-color: #a8c0dc; background: #f6f9fd; } .s-blue  h3 { color: var(--blue-sem);  border-color: var(--blue-sem);  }
.s-orange{ border-color: #ddc898; background: #fdf8f0; } .s-orange h3 { color: var(--amber-sem); border-color: var(--amber-sem); }
.sg-box { padding: 8px 10px; font-size: 0.95rem; line-height: 1.55; }
.sg-box ul { padding-left: 1.2rem; margin: 5px 0 0 0; list-style: disc; }
.sg-box li { margin-bottom: 4px; list-style: disc; }
.table-container { width: 100%; max-width: 100%; overflow-x: auto; display: block; -webkit-overflow-scrolling: touch; margin-bottom: 18px; border: 1px solid var(--border); }
.section-container .synergies-table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: 0.95rem; table-layout: auto; }
.synergies-table th { background: var(--navy); color: #ffffff; padding: 10px 13px; text-align: left; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 400; border-right: 1px solid rgba(255,255,255,0.08); white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; vertical-align: top; }
.synergies-table th:last-child { border-right: none; }
.synergies-table td { padding: 10px 13px; border-bottom: 1px solid var(--border-light); border-right: 1px solid var(--border-light); vertical-align: top; font-family: var(--serif); font-size: 0.95rem; word-wrap: break-word; overflow-wrap: break-word; white-space: normal; }
.synergies-table td:last-child { border-right: none; }
.synergies-table tbody tr:nth-child(even) { background: var(--off-white); }
/* Synergy matrix table: column count varies per memo (12 or 16), so use auto layout
   with per-cell-type min-widths instead of hardcoded %. Last 3 cols are always
   financial (Revenus / Coûts / Total) → right-aligned, nowrap, regardless of count. */
#synergies .synergies-table { table-layout: auto; min-width: 1500px; }
#synergies .synergies-table th, #synergies .synergies-table td { min-width: 80px; }
#synergies .synergies-table th:first-child, #synergies .synergies-table td:first-child { min-width: 150px; }
#synergies .synergies-table th.col-summary, #synergies .synergies-table td:nth-child(2) { min-width: 280px; }
#synergies .synergies-table th:nth-last-child(-n+3), #synergies .synergies-table td:nth-last-child(-n+3) { text-align: right; white-space: nowrap; min-width: 100px; }
/* Synergies-custom 7-col table: give the prose-heavy columns enough room so name/hypothesis
   wrap on multiple lines instead of being crushed into 1-2 chars per line. */
#synergies-custom .synergies-table th:nth-child(1), #synergies-custom .synergies-table td:nth-child(1) { width: 5%; }
#synergies-custom .synergies-table th:nth-child(2), #synergies-custom .synergies-table td:nth-child(2) { width: 24%; }
#synergies-custom .synergies-table th:nth-child(3), #synergies-custom .synergies-table td:nth-child(3) { width: 10%; }
#synergies-custom .synergies-table th:nth-child(4), #synergies-custom .synergies-table td:nth-child(4) { width: 30%; }
#synergies-custom .synergies-table th:nth-child(5), #synergies-custom .synergies-table td:nth-child(5),
#synergies-custom .synergies-table th:nth-child(6), #synergies-custom .synergies-table td:nth-child(6),
#synergies-custom .synergies-table th:nth-child(7), #synergies-custom .synergies-table td:nth-child(7) { width: 10%; }
/* Quadrant summary table (Competition Magic Quadrant: Résumé du quadrant) */
.section-container .quadrant-summary-table { table-layout: auto; width: 100%; max-width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-bottom: 18px; border: 1px solid var(--border); }
.quadrant-summary-table th { background: var(--navy); color: #ffffff; padding: 10px 13px; text-align: left; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; border-right: 1px solid rgba(255,255,255,0.08); white-space: normal; vertical-align: top; }
.quadrant-summary-table th:last-child { border-right: none; }
.quadrant-summary-table td { padding: 10px 13px; border-bottom: 1px solid var(--border-light); border-right: 1px solid var(--border-light); vertical-align: top; font-family: var(--serif); font-size: 0.95rem; }
.quadrant-summary-table td:last-child { border-right: none; }
.quadrant-summary-table tbody tr:nth-child(even) { background: var(--off-white); }
.quadrant-summary-table tbody tr:last-child { background: var(--off-white); border-top: 2px solid var(--navy); }
.quadrant-summary-table tbody tr:last-child td { font-weight: 700; }
.quadrant-intro { white-space: pre-line; margin-bottom: 20px; line-height: 1.6; }
.quadrant-intro b { display: inline-block; margin-bottom: 4px; }
.battlefield-legend { margin-bottom: 18px; padding: 14px 16px; background: var(--off-white); border: 1px solid var(--border); font-size: 0.95rem; }
.legend-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 5px; }
.label-cap { background: var(--green-bg); color: var(--green-sem); padding: 2px 8px; border-radius: 2px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em; border: 1px solid #b0d4c0; white-space: nowrap; }
.label-white { background: var(--white); border: 1px solid var(--border); padding: 2px 8px; border-radius: 2px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.04em; color: #526070; }
.posture-legend { display: inline-flex; align-items: center; gap: 4px; font-family: var(--serif); font-size: 0.92rem; font-weight: 600; line-height: 1.2; margin-right: 8px; }
.battlefield-container { width: 100%; max-width: 100%; overflow-x: auto; display: block; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.battlefield-grid { display: inline-flex; flex-wrap: nowrap; gap: 14px; width: max-content; }
.battlefield-col { display: flex; flex-direction: column; gap: 8px; white-space: normal; }
.battlefield-col:empty { display: none; }

/* Stage column headers */
.stage-header {
  font-family: var(--mono);
  font-size: 0.74rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em !important;
  color: #526070;
  text-align: center;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 6px;
  min-height: 36px;
}

.actor-card { background: var(--white); border: 1px solid var(--border); font-size: 0.95rem; border-left-width: 3px; margin-bottom: 7px; transition: all 0.15s; }
.border-hunter { border-left-color: #dc2626 !important; }
.border-hunted { border-left-color: #ca8a04 !important; }
.border-fortress { border-left-color: #2563eb !important; }
.border-opportunistic { border-left-color: #16a34a !important; }
.border-distressed { border-left-color: #9333ea !important; }
.actor-card summary { padding: 11px 12px; cursor: pointer; font-family: var(--serif); font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; background: var(--white); }
.actor-card summary::after { content: "+"; font-size: 1.1em; color: var(--navy-light, #2d4a6e); font-family: var(--mono); }
.actor-card[open] summary::after { content: "\2212"; color: var(--navy); }
.actor-name { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 0.97rem; }
.label-tier { background: var(--off-white); padding: 2px 6px; border-radius: 2px; font-family: var(--mono); font-size: 0.6rem; color: #526070; white-space: nowrap; border: 1px solid var(--border); letter-spacing: 0.04em; }
.label-diff { background: var(--off-white); color: var(--navy); padding: 2px 6px; border-radius: 2px; font-family: var(--mono); font-size: 0.6rem; font-weight: 600; width: fit-content; border: 1px solid var(--border); letter-spacing: 0.04em; }
.label-posture-card { padding: 2px 7px; border-radius: 2px; font-family: var(--mono); font-size: 0.6rem; font-weight: 700; color: #fff; width: fit-content; letter-spacing: 0.06em; }
.bg-hunter { background: #dc2626; } .bg-hunted { background: #ca8a04; } .bg-fortress { background: #2563eb; } .bg-opportunistic { background: #16a34a; } .bg-distressed { background: #9333ea; }

/* Actor card summary pills */
.actor-card summary .actor-name { font-size: 0.97rem !important; }
.actor-card summary .label-tier,
.actor-card summary .label-cap,
.actor-card summary .label-diff { font-size: 0.65rem !important; padding: 2px 6px !important; }

/* Actor body */
.actor-body {
  padding: 13px;
  border-top: 1px solid var(--border-light);
  background: var(--off-white);
  overflow-wrap: break-word;
  font-size: 0.9rem !important;
  line-height: 1.6;
}
.actor-body, .actor-body * { font-size: 0.9rem !important; }
.actor-body .ws-box > div[style*="font-weight"],
.actor-body .strat-inv-box > div[style*="font-weight"],
.actor-body .sg-box > div[style*="font-weight"] {
  font-family: var(--mono) !important;
  font-size: 0.68rem !important;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}
.actor-body .actor-grid-info span[style*="font-weight:bold"],
.actor-body .actor-grid-info strong {
  font-family: var(--mono) !important;
  font-size: 0.62rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #526070;
  margin-bottom: 2px;
  display: block;
}
.actor-body .ws-box,
.actor-body .swot-grid-small,
.actor-body .strat-inv-box {
  margin-left: 4px !important;
  margin-right: 4px !important;
}

.actor-grid-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.actor-grid-info div { display: flex; flex-direction: column; font-family: var(--serif); }
.ws-box { background: #fffbeb; border: 1px solid #fcd34d; padding: 10px 12px; margin: 10px 0; color: #92400e; border-left-width: 2px; }
.ws-box ul { padding-left: 1.1rem; margin: 0; list-style: disc; }
.ws-box li { margin-bottom: 4px; list-style: disc; }
.strat-inv-box { background: #f3e8ff; border: 1px solid #e9d5ff; border-left: 2px solid #9333ea; padding: 10px 12px; margin-top: 10px; color: #6b21a8; }
.competitor-block { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.competitor-block strong { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1rem; }

/* Scenario card */
details.scenario-card { background: var(--white); border: 1px solid var(--border); margin-bottom: 12px; box-shadow: 0 1px 3px rgba(15,31,51,0.04); }
details.scenario-card summary {
  padding: 15px 16px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--text-body-size) !important;
  line-height: var(--text-line-height) !important;
  color: var(--text-body-color);
  display: block;
  cursor: pointer;
  list-style: none;
}
details.scenario-card summary::-webkit-details-marker { display: none; }
.scen-summary-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.scen-summary-top::before { content: "\25B6"; display: inline-block; font-size: 0.85rem; color: var(--navy-light, #2d4a6e); transition: transform 0.15s; margin-top: 3px; flex-shrink: 0; }
details.scenario-card[open] summary .scen-summary-top::before { transform: rotate(90deg); color: var(--navy); }
.scen-summary-top span,
details.scenario-card summary .scen-summary-text {
  font-size: var(--text-body-size) !important;
  line-height: var(--text-line-height) !important;
}

/* Scenario logic tags */
.scen-logic-grid { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.scen-logic-grid .logic-tag {
  font-size: 0.74rem !important;
  padding: 3px 9px !important;
  line-height: 1.5;
}
.scen-logic-grid .logic-tag span[style*="font-weight:700"] {
  font-size: 0.74rem !important;
}

.scen-details-body { padding: 20px; border-top: 1px solid var(--border-light); background: var(--off-white); font-size: var(--text-body-size); }

.pill { display: inline-block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 2px; border: 1px solid; }
.pill-green  { background: var(--green-bg); color: var(--green-sem); border-color: #b0d4c0; }
.pill-red    { background: var(--red-bg);   color: var(--red-sem);   border-color: #ddb8be; }
.pill-blue   { background: var(--blue-bg);  color: var(--blue-sem);  border-color: #a8c0dc; }
.pill-amber  { background: var(--amber-bg); color: var(--amber-sem); border-color: #ddc898; }
.pill-navy   { background: var(--navy);     color: var(--white);     border-color: var(--navy); }
.pill-purple { background: #f4f0fa; color: #5a3a90; border-color: #c8b8e0; }
.vp-quote { border-left: 2px solid var(--navy); padding: 14px 20px; background: var(--off-white); margin: 18px 0; }
.vp-quote p { font-family: var(--serif); font-size: 1.1rem; font-style: italic; color: var(--navy); line-height: 1.65; margin: 0; }
.source-item { padding: 9px 0; border-bottom: 1px solid var(--border-light); font-family: var(--serif); font-size: 0.95rem; color: var(--text-body-color); }
.source-item:last-child { border-bottom: none; }
[contenteditable="true"] { outline: 2px solid rgba(37,99,235,0.35) !important; border-radius: 2px; background: rgba(254,249,195,0.3) !important; }
[contenteditable="true"]:focus { outline: 2px solid #2563eb !important; background: rgba(254,249,195,0.5) !important; }
.content-area [contenteditable] * { font-weight: inherit; }
a[href*=".xlsx"], a[href*="excel"], button.excel-btn { font-size: 1rem !important; padding: 12px 18px !important; }


/* RESPONSIVE */
img { max-width: 100%; height: auto; display: block; }
a { word-break: break-all; }
p, li, td, th, .text-block, .text-col, .actor-body, .ws-box, .section-container { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; hyphens: auto; }
.sb-tag, .label-tier, .label-cap, .label-diff, .pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.scen-logic-grid { flex-wrap: wrap; }

@media (max-width: 1000px) {
  .main-wrapper { padding-left: 0; width: 100%; overflow-x: hidden; }
  .sidebar { position: relative; width: 100%; height: auto; border-right: none; border-bottom: 2px solid var(--border); flex-direction: column; box-shadow: none; overflow: visible; }
  .content-area { padding: 24px 22px 48px; width: 100%; min-height: auto; }
  .split-container { flex-direction: column; gap: 20px; margin-bottom: 20px; }
  .text-col { min-width: 0; width: 100%; flex: 1 1 100%; }
  .img-col { position: static !important; width: 100%; min-width: 0; margin-top: 0; max-height: none; flex: 1 1 100%; max-width: 100%; }
  .actor-card { width: 100% !important; }
  .swot-grid { grid-template-columns: 1fr; gap: 1px; }
  .section-container { padding: 22px 18px; }
  .section-container .section-container { margin-left: -19px; margin-right: -19px; padding: 22px 18px; }
  .section-title { font-size: 1.75rem; }
  h3 { font-size: 1.38rem; }
  h4 { font-size: 1.15rem; }
  .battlefield-col { width: 280px; min-width: 280px; flex: 0 0 280px; }
  .table-container { display: block; overflow-x: auto; }
  /* Financial & model tables: horizontal scroll instead of squishing */
  .section-container table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .section-container table thead { display: table; width: 100%; }
  .section-container table tbody { display: table; width: 100%; }
  .section-container table tfoot { display: table; width: 100%; }
  .section-container table tr    { display: table-row; }
  .section-container table th,
  .section-container table td    { display: table-cell; min-width: 100px; white-space: nowrap; }
  .section-container table td:first-child,
  .section-container table th:first-child { white-space: normal; min-width: 140px; }
  /* Synergies table: prose-heavy cells (synergy name, action hypothesis) must
     wrap on mobile — otherwise the action-hypothesis cell becomes one giant
     line, pushing Impact/Time/Difficulty columns off-screen and breaking the
     visual alignment between header cells and their data below. */
  .synergies-table th,
  .synergies-table td { white-space: normal; vertical-align: top; min-width: 110px; }
  .synergies-table th:first-child,
  .synergies-table td:first-child { min-width: 48px; }
  .synergies-table th:nth-child(2),
  .synergies-table td:nth-child(2),
  .synergies-table th:nth-child(4),
  .synergies-table td:nth-child(4) { min-width: 190px; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.9rem !important; }
  .section-title { font-size: 1.55rem !important; }
  h3 { font-size: 1.28rem !important; }
  h4 { font-size: 1.08rem !important; }
  p, li { font-size: 1.05rem; }
  .body-tagline { font-size: 0.95rem; }
  .content-area { padding: 16px 14px 40px; }
  .section-container { padding: 18px 14px; margin-bottom: 14px; }
  .split-container { gap: 14px; }
  .meta-block { padding: 18px 16px 16px; }
  .sidebar-company-name { font-size: 1.3rem; }
  .section { padding: 12px 16px; }
  .btn, .btn-primary, .btn-secondary, .btn-status { font-size: 0.85rem; padding: 9px 10px; }
  .battlefield-col { width: 240px; min-width: 240px; }
  div[style*="grid-template-columns: 1fr 1fr"] { display: flex !important; flex-direction: column !important; gap: 8px !important; }
  div[style*="grid-template-columns: repeat(2"] { display: flex !important; flex-direction: column !important; gap: 8px !important; }
}
/* sb-nav wrapper: Make.com outputs <div class="sb-nav"> around nav items */
.sb-nav { display: contents; }

/* Safety net: visually un-nest section-containers that LLMs forget to close */
.section-container .section-container {
  margin-left: -37px;
  margin-right: -37px;
  margin-top: 40px;
  padding: 32px 36px 34px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  box-shadow: 0 -20px 0 0 var(--page-bg), 0 1px 4px rgba(15,31,51,0.06);
}
.section-container:has(> .section-container) {
  overflow: visible;
  padding-bottom: 0;
}
.section-container .section-container:last-child {
  margin-bottom: -1px;
}

@media (max-width: 400px) {
  h1 { font-size: 1.6rem !important; }
  .section-title { font-size: 1.35rem !important; }
  h3 { font-size: 1.15rem !important; }
  h4 { font-size: 1.0rem !important; font-weight: 700; }
  p, li { font-size: 1.0rem; }
  .content-area { padding: 12px 10px 32px; }
  .section-container { padding: 14px 10px; }
  .meta-block { padding: 14px 12px; }
  .sidebar-company-name { font-size: 1.15rem; }
  .btn { font-size: 0.8rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Negotiation Range Gauge — CEO decision aid in render_valorisation_triangulation_html
   3 zones (LOW BALL / FAIR / STRATEGIC), 2 anchors (MEDIANE / MAX PAYABLE), 1 cursor (EV PAID)
   ═══════════════════════════════════════════════════════════════════════════ */
.neg-gauge { background: #fff; border: 1px solid var(--border, #e4e7ed); margin: 24px 0; overflow: hidden; }
.neg-gauge__title { background: var(--navy, #0f1f33); color: #fff; padding: 12px 20px; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; }
.neg-gauge__scale-labels { display: flex; justify-content: space-between; padding: 14px 22px 0; font-size: 0.7rem; color: var(--navy-light, #2d4a6e); font-family: var(--mono, monospace); }
.neg-gauge__track { position: relative; height: 48px; margin: 36px 22px 80px; overflow: visible; }
.neg-zone { position: absolute; top: 0; height: 48px; }
.neg-zone-low       { background: linear-gradient(90deg, #fee2e2, #fecaca); }
.neg-zone-fair      { background: linear-gradient(90deg, #dcfce7, #bbf7d0); }
.neg-zone-strategic { background: linear-gradient(90deg, #fef9c3, #fde68a); }

.neg-anchor { position: absolute; top: -28px; transform: translateX(-50%); font-size: 0.65rem; text-align: center; pointer-events: none; }
.neg-anchor__lbl { display: block; font-weight: 700; color: var(--text-body-color, #243040); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.neg-anchor__val { display: block; font-size: 0.78rem; font-weight: 800; color: var(--navy, #0f1f33); }
.neg-anchor::after { content: ""; display: block; width: 2px; height: 56px; background: #475569; margin: 4px auto 0; }
.neg-anchor--med::after { background: #166534; }
.neg-anchor--max::after { background: #854d0e; }

.neg-cursor { position: absolute; top: 36px; transform: translateX(-50%); text-align: center; pointer-events: none; }
.neg-cursor::before { content: "▲"; display: block; font-size: 1.5rem; color: #1f2937; line-height: 0.55; }
.neg-cursor__lbl { display: inline-block; margin-top: -1px; font-size: 0.7rem; font-weight: 800; background: #1f2937; color: #fff; padding: 3px 9px; border-radius: 4px; white-space: nowrap; letter-spacing: 0.03em; }

.neg-verdict { margin: 22px 22px 18px; padding: 12px 16px; font-size: 0.92rem; line-height: 1.5; }
.neg-verdict--ok       { background: #dcfce7; color: #166534; border-left: 4px solid #16a34a; }
.neg-verdict--lowball  { background: #dbeafe; color: #1e40af; border-left: 4px solid #2563eb; }
.neg-verdict--premium  { background: #fef9c3; color: #854d0e; border-left: 4px solid #ca8a04; }
.neg-verdict--blocked  { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; font-weight: 600; }

.neg-args { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 0 22px 22px; }
.neg-args__col { padding: 14px 16px; }
.neg-args__col--low       { background: #fef2f2; border-left: 3px solid #ef4444; }
.neg-args__col--fair      { background: #f0fdf4; border-left: 3px solid #22c55e; }
.neg-args__col--strategic { background: #fefce8; border-left: 3px solid #eab308; }
.neg-args__col h4 { font-size: 0.78rem; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--mono, monospace); color: var(--navy, #0f1f33); line-height: 1.3; padding-bottom: 8px; border-bottom: 1px solid rgba(15, 23, 42, 0.1); }
.neg-args__col h5 { font-size: 0.7rem; margin: 16px 0 8px; text-transform: uppercase; color: #475569; font-family: var(--mono, monospace); letter-spacing: 0.08em; font-weight: 700; padding: 4px 8px; background: rgba(15, 23, 42, 0.06); display: inline-block; }
.neg-args__col h5:first-of-type { margin-top: 4px; }
.neg-args__col ul { margin: 0 0 8px; padding-left: 18px; font-size: 0.84rem; line-height: 1.6; color: #1e293b; }
.neg-args__col li { margin-bottom: 8px; }
.neg-args__col li:last-child { margin-bottom: 0; }
.neg-args__col .neg-args__sep { height: 1px; background: rgba(15, 23, 42, 0.15); margin: 14px -16px 14px; }

@media (max-width: 768px) {
  .neg-args { grid-template-columns: 1fr; }
  .neg-gauge__track { margin: 48px 12px 120px; }
  .neg-gauge__title { font-size: 0.82rem; padding: 10px 14px; line-height: 1.3; }
  .neg-gauge__scale-labels { padding: 10px 12px 0; font-size: 0.6rem; }
  .neg-anchor { font-size: 0.5rem; max-width: 88px; top: -42px; }
  .neg-anchor__lbl { white-space: normal; line-height: 1.15; letter-spacing: 0.02em; }
  .neg-anchor__val { font-size: 0.68rem; margin-top: 2px; }
  .neg-anchor::after { height: 60px; }
  .neg-cursor { top: 44px; }
  .neg-cursor__lbl { font-size: 0.6rem; padding: 2px 6px; }
}
@media (max-width: 420px) {
  .neg-anchor { font-size: 0.46rem; max-width: 72px; }
  .neg-anchor__val { font-size: 0.62rem; }
}
