/* ==========================================================
   SHARE MARKET GYAN — INVESTING MASTERCLASS
   Standalone page stylesheet.
   No dependency on style.css or responsive.css.
   No font-size below 14px.
========================================================== */

:root {
  --inv-navy: #0a2342;
  --inv-blue: #1769d2;
  --inv-blue-dark: #0d4f9f;
  --inv-teal: #15956a;
  --inv-text: #182a40;
  --inv-muted: #5e7188;
  --inv-border: #dfe7f0;
  --inv-bg: #f6f8fb;
  --inv-card: #ffffff;
  --inv-shadow: 0 10px 30px rgba(16, 39, 68, .07);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  margin: 0;
  color: var(--inv-text);
  background: var(--inv-bg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

button, input { font: inherit; }

a { color: inherit; }

.inv-container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

/* TOP BAR */
.inv-topbar {
  background: var(--inv-navy);
  color: #dce9f8;
  min-height: 38px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.inv-topbar .inv-container {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* HEADER */
.inv-header {
  background: #fff;
  border-bottom: 1px solid var(--inv-border);
}

.inv-header-inner {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.inv-logo {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--inv-navy);
  text-decoration: none;
  min-width: 330px;
}

.inv-logo-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, #1769d2, #159b91);
}

.inv-logo-icon svg {
  width: 36px;
  height: 36px;
}

.inv-logo strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1.1;
}

.inv-logo small {
  display: block;
  margin-top: 5px;
  color: #64758a;
  font-size: 14px;
}

.inv-header-search {
  width: min(430px, 100%);
  display: flex;
  align-items: center;
  border: 1px solid #d7e1ec;
  border-radius: 10px;
  overflow: hidden;
  background: #fbfcfe;
}

.inv-header-search input {
  flex: 1;
  min-width: 0;
  height: 45px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: var(--inv-text);
  background: transparent;
  font-size: 14px;
}

.inv-header-search button {
  width: 48px;
  height: 45px;
  border: 0;
  color: #fff;
  background: var(--inv-blue);
  cursor: pointer;
}

.inv-header-search svg {
  width: 19px;
  height: 19px;
}

.inv-mobile-menu {
  display: none;
}

/* NAVIGATION */
.inv-nav {
  position: relative;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--inv-border);
}

.inv-nav-menu {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 29px;
  min-height: 61px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inv-nav-menu > li {
  position: relative;
  display: flex;
  align-items: stretch;
}

.inv-nav-menu > li > a,
.inv-mega-trigger,
.inv-tools > a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #18283e;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.inv-nav-menu > li > a::after,
.inv-mega-trigger::after,
.inv-tools > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--inv-blue);
  transition: transform .18s ease;
}

.inv-nav-menu > li > a:hover::after,
.inv-mega:hover .inv-mega-trigger::after,
.inv-mega.open .inv-mega-trigger::after,
.inv-tools:hover > a::after {
  transform: scaleX(1);
}

.inv-nav-menu svg {
  width: 15px;
  height: 15px;
}

/* MEGA MENU */
.inv-mega { position: static !important; }

.inv-mega-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(1160px, calc(100vw - 28px));
  padding: 20px;
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border: 1px solid #dce5ef;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(11, 36, 68, .18);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.inv-mega:hover .inv-mega-panel,
.inv-mega:focus-within .inv-mega-panel,
.inv-mega.open .inv-mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.inv-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr 1fr 1.03fr;
}

.inv-mega-column {
  min-width: 0;
  padding: 3px 16px 5px;
  border-right: 1px solid #e5ecf3;
}

.inv-mega-column h3 {
  margin: 0 0 10px;
  color: #153151;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.inv-mega-column a {
  display: block;
  margin: 2px -7px;
  padding: 8px;
  border-radius: 8px;
  color: #304861;
  text-decoration: none;
}

.inv-mega-column a:hover {
  background: #f1f6fc;
}

.inv-mega-column strong,
.inv-mega-column span {
  display: block;
}

.inv-mega-column strong {
  font-size: 14px;
  line-height: 1.35;
}

.inv-mega-column span {
  margin-top: 3px;
  color: #687b90;
  font-size: 14px;
  line-height: 1.35;
}

.inv-mega-column em {
  display: inline-flex;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #147b4c;
  background: #dff5e9;
  font-size: 14px;
  font-style: normal;
}

.inv-mega-feature {
  border: 1px solid #c8ddf8;
  background: #f1f7ff;
}

.inv-mega-journey {
  margin-left: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: linear-gradient(145deg, #f0faf6, #eef6ff);
}

.inv-mega-journey > span {
  color: #13804e;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
}

.inv-mega-journey h3 {
  margin: 9px 0 7px;
  color: #16314f;
  font-size: 18px;
  line-height: 1.3;
}

.inv-mega-journey p {
  margin: 0 0 16px;
  color: #607288;
  font-size: 14px;
  line-height: 1.55;
}

.inv-mega-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 8px;
  color: #fff !important;
  background: var(--inv-teal) !important;
  font-size: 14px !important;
  font-weight: 800;
}

.inv-mega-button svg {
  width: 16px;
}

/* TOOLS */
.inv-tools { position: relative; }

.inv-tools > a svg {
  width: 14px;
  height: 14px;
}

.inv-tools-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  display: none;
  width: 245px;
  padding: 9px;
  transform: translateX(-50%);
  border: 1px solid #dce5ef;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 42, 72, .16);
}

.inv-tools:hover .inv-tools-panel,
.inv-tools.open .inv-tools-panel {
  display: block;
}

.inv-tools-panel span,
.inv-tools-panel a {
  display: block;
}

.inv-tools-panel span {
  padding: 8px 9px 5px;
  color: #6d7e92;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.inv-tools-panel a {
  padding: 9px;
  border-radius: 7px;
  color: #314961;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.inv-tools-panel a:hover {
  color: var(--inv-blue);
  background: #f3f7fc;
}

.inv-tools-panel hr {
  border: 0;
  border-top: 1px solid #e4ebf2;
  margin: 7px 4px;
}

/* BREADCRUMB */
.inv-breadcrumb {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #63758a;
  font-size: 14px;
}

.inv-breadcrumb a {
  color: #315a86;
  text-decoration: none;
}

.inv-breadcrumb a:hover {
  color: var(--inv-blue);
}

/* HERO */
.inv-hero {
  background: #fff;
  border-top: 1px solid #e4ebf2;
  border-bottom: 1px solid #e4ebf2;
}

.inv-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(450px, .96fr);
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}

.inv-eyebrow {
  display: inline-flex;
  color: var(--inv-blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.inv-hero h1 {
  margin: 11px 0 15px;
  color: var(--inv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -1.4px;
}

.inv-hero h1 span { color: var(--inv-blue); }

.inv-hero-copy > p {
  max-width: 690px;
  margin: 0;
  color: #53677e;
  font-size: 17px;
  line-height: 1.75;
}

.inv-hero-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 25px;
}

.inv-hero-points span {
  padding: 11px 12px;
  border: 1px solid #dfe7ef;
  border-radius: 9px;
  background: #fbfcfe;
  color: #344b65;
  font-size: 14px;
  font-weight: 750;
}

/* CHART */
.inv-chart-card {
  padding: 19px 19px 14px;
  overflow: hidden;
  border: 1px solid #0c4f99;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 12%, rgba(71, 197, 255, .22), transparent 34%),
    linear-gradient(145deg, #061c3e, #0a3b7c 65%, #0c56a9);
  box-shadow: 0 24px 48px rgba(8, 43, 88, .20);
}

.inv-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inv-chart-head span,
.inv-chart-head strong,
.inv-chart-status {
  display: block;
}

.inv-chart-head span {
  color: rgba(255,255,255,.58);
  font-size: 14px;
}

.inv-chart-head strong {
  margin-top: 3px;
  color: #fff;
  font-size: 16px;
}

.inv-chart-status {
  color: #7ce0b5;
  font-size: 14px;
  font-weight: 800;
}

.inv-chart-wrap {
  height: 300px;
  margin-top: 7px;
}

.inv-chart-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.inv-grid line {
  stroke: rgba(255,255,255,.13);
  stroke-width: 1;
  stroke-dasharray: 5 7;
}

.inv-chart-area { fill: rgba(75, 201, 255, .15); }

.inv-candles line {
  stroke: #7de1f1;
  stroke-width: 2;
}

.inv-candles rect {
  fill: #38ca99;
  stroke: #a1ffe1;
  stroke-width: 1;
}

.inv-candles g:nth-child(3) rect,
.inv-candles g:nth-child(8) rect {
  fill: #ec7171;
  stroke: #ffb1b1;
}

.inv-trend {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inv-last {
  fill: #fff;
  stroke: #5ad9ff;
  stroke-width: 4;
}

.inv-chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.inv-chart-foot span {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  font-weight: 700;
}

/* TOOLBAR */
.inv-toolsbar {
  background: #fff;
  border-bottom: 1px solid #e0e7ef;
}

.inv-toolsbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.inv-contents-button { display: none; }

.inv-local-search {
  width: min(390px, 100%);
  position: relative;
}

.inv-local-search > svg {
  position: absolute;
  left: 14px;
  top: 13px;
  width: 18px;
  height: 18px;
  color: #718399;
}

.inv-local-search input {
  width: 100%;
  height: 44px;
  padding: 0 13px 0 40px;
  border: 1px solid #dbe4ed;
  border-radius: 9px;
  outline: 0;
  background: #fbfcfe;
  color: var(--inv-text);
  font-size: 14px;
}

.inv-local-search input:focus {
  border-color: #73a7e8;
  box-shadow: 0 0 0 3px rgba(23,105,210,.1);
}

/* CONTENT */
.inv-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 70px;
}

.inv-sidebar {
  position: sticky;
  top: 18px;
}

.inv-sidebar-card {
  overflow: hidden;
  border: 1px solid var(--inv-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--inv-shadow);
}

.inv-sidebar-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid #e4ebf2;
}

.inv-sidebar-head span {
  display: block;
  color: #718096;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
}

.inv-sidebar-head strong {
  display: block;
  color: #17304e;
  font-size: 17px;
}

.inv-sidebar-head button {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.inv-sidebar-head svg {
  width: 20px;
  height: 20px;
}

.inv-progress {
  height: 4px;
  background: #edf2f7;
}

.inv-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--inv-blue);
  transition: width .15s linear;
}

.inv-toc {
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 9px;
}

.inv-toc a {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: #40556e;
  text-decoration: none;
}

.inv-toc a:hover,
.inv-toc a.active {
  color: #fff;
  background: var(--inv-blue);
}

.inv-toc span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #62758c;
  background: #eff4fa;
  font-size: 14px;
  font-weight: 800;
}

.inv-toc a.active span,
.inv-toc a:hover span {
  color: #fff;
  background: rgba(255,255,255,.17);
}

.inv-toc strong {
  font-size: 14px;
  line-height: 1.35;
}

/* INTRO + LESSONS */
.inv-content { min-width: 0; }

.inv-intro {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #cbdff6;
  border-radius: 12px;
  background: #eef6ff;
}

.inv-intro-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  color: #fff;
  background: var(--inv-blue);
  font-size: 14px;
  font-weight: 800;
}

.inv-intro span {
  display: block;
  color: var(--inv-blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
}

.inv-intro p {
  margin: 5px 0 0;
  color: #50657c;
  font-size: 15px;
  line-height: 1.7;
}

.inv-lesson {
  scroll-margin-top: 108px;
  margin-bottom: 22px;
  padding: 32px;
  border: 1px solid var(--inv-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--inv-shadow);
}

.inv-lesson[hidden] { display: none; }

.inv-lesson-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inv-lesson-number,
.inv-lesson-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
}

.inv-lesson-number { color: var(--inv-blue); }
.inv-lesson-label { color: #6e8094; }

.inv-lesson h2 {
  margin: 8px 0 10px;
  color: var(--inv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.25;
}

.inv-lead {
  color: #4f637a !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

.inv-subsection {
  margin-top: 25px;
}

.inv-subsection h3 {
  margin: 0 0 9px;
  color: #173250;
  font-size: 20px;
}

.inv-lesson p {
  margin: 0 0 14px;
  color: #52667d;
  font-size: 15px;
  line-height: 1.8;
}

.inv-takeaway {
  margin-top: 23px;
  padding: 16px 18px;
  border: 1px solid #c7e6d4;
  border-radius: 10px;
  background: #effaf4;
}

.inv-takeaway span {
  display: block;
  color: #14814d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
}

.inv-takeaway p {
  margin: 5px 0 0;
  color: #345f4b;
  font-size: 15px;
}

/* FRAMEWORK */
.inv-framework {
  margin: 26px 0;
  padding: 34px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #071d3e, #0c4d9c);
}

.inv-framework .inv-eyebrow { color: #8fc7ff; }

.inv-framework h2 {
  margin: 8px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
}

.inv-framework > p {
  max-width: 820px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 15px;
}

.inv-framework-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.inv-framework-grid div {
  min-height: 105px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  background: rgba(255,255,255,.07);
}

.inv-framework-grid b,
.inv-framework-grid strong,
.inv-framework-grid span {
  display: block;
}

.inv-framework-grid b {
  color: #8ec3ff;
  font-size: 14px;
}

.inv-framework-grid strong {
  margin-top: 7px;
  font-size: 14px;
}

.inv-framework-grid span {
  margin-top: 4px;
  color: rgba(255,255,255,.65);
  font-size: 14px;
}

/* CROSS LINKS */
.inv-crosslink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 24px 0;
  padding: 27px;
  border: 1px solid #cbdff6;
  border-radius: 14px;
  background: #eef6ff;
}

.inv-crosslink h2 {
  margin: 7px 0 7px;
  color: #133050;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.inv-crosslink p {
  max-width: 760px;
  margin: 0;
  color: #53677e;
  font-size: 15px;
  line-height: 1.7;
}

.inv-crosslink > a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 9px;
  color: #fff;
  background: var(--inv-blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.inv-crosslink > a svg {
  width: 16px;
}

.inv-blog-link {
  border-color: #cce6d8;
  background: #effaf4;
}

.inv-blog-link .inv-eyebrow { color: #168150; }

.inv-blog-link > a { background: var(--inv-teal); }

/* FAQ + DISCLAIMER */
.inv-faq {
  margin-top: 25px;
  padding: 30px;
  border: 1px solid var(--inv-border);
  border-radius: 14px;
  background: #fff;
}

.inv-faq h2 {
  margin: 7px 0 17px;
  color: var(--inv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

.inv-faq details {
  border-top: 1px solid #e3eaf2;
  padding: 15px 0;
}

.inv-faq details:last-child {
  border-bottom: 1px solid #e3eaf2;
}

.inv-faq summary {
  cursor: pointer;
  color: #18324f;
  font-size: 15px;
  font-weight: 800;
}

.inv-faq details p {
  margin: 8px 0 0;
  color: #566a81;
  font-size: 15px;
}

.inv-disclaimer {
  margin-top: 22px;
  padding: 17px;
  border: 1px solid #e5d8b4;
  border-radius: 10px;
  background: #fffaf0;
  color: #6d5c35;
  font-size: 14px;
  line-height: 1.65;
}

/* FOOTER */
.inv-footer {
  color: #dbe7f4;
  background: #071c36;
  padding: 45px 0 20px;
}

.inv-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
  gap: 35px;
}

.inv-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.inv-footer-brand .inv-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.inv-footer-brand .inv-logo-icon svg {
  width: 30px;
}

.inv-footer-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.inv-footer p {
  max-width: 330px;
  margin: 14px 0 0;
  color: #9db0c7;
  font-size: 14px;
  line-height: 1.7;
}

.inv-footer h3 {
  margin: 0 0 11px;
  color: #fff;
  font-size: 15px;
}

.inv-footer-grid > div > a {
  display: block;
  margin: 8px 0;
  color: #a9bad0;
  font-size: 14px;
  text-decoration: none;
}

.inv-footer-grid > div > a:hover {
  color: #fff;
}

.inv-social {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.inv-social a {
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  border: 1px solid #31506f;
  border-radius: 8px;
  color: #cfe0f2 !important;
  font-size: 14px !important;
}

.inv-footer-legal {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-top: 35px;
  padding-top: 19px;
  border-top: 1px solid #203956;
}

.inv-footer-legal a,
.inv-footer-legal span {
  color: #a7b9ce;
  font-size: 14px;
  text-decoration: none;
}

.inv-footer-bottom {
  margin-top: 13px;
  color: #8196ae;
  text-align: center;
  font-size: 14px;
}

.inv-back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--inv-blue);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(12, 57, 111, .25);
}

.inv-back-top.show { display: block; }

.inv-search-empty {
  margin-bottom: 22px;
  padding: 25px;
  border: 1px dashed #b9c9da;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.inv-search-empty strong,
.inv-search-empty span { display: block; }

.inv-search-empty strong { color: #17314e; font-size: 16px; }
.inv-search-empty span { margin-top: 4px; color: #65778c; font-size: 14px; }

/* RESPONSIVE */
@media (max-width: 1120px) {
  .inv-nav-menu { gap: 20px; }
  .inv-mega-grid { grid-template-columns: repeat(2, 1fr); }
  .inv-mega-journey { grid-column: 1 / -1; margin: 16px 0 0; }
  .inv-mega-column:nth-child(2n) { border-right: 0; }
  .inv-framework-grid { grid-template-columns: repeat(4, 1fr); }
  .inv-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 850px) {
  .inv-header-inner { min-height: 86px; }
  .inv-logo { min-width: 0; }
  .inv-logo strong { font-size: 23px; }
  .inv-header-search { display: none; }

  .inv-mobile-menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #dbe4ed;
    border-radius: 9px;
    color: var(--inv-navy);
    background: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
  }

  .inv-mobile-menu svg { width: 18px; height: 18px; }

  .inv-nav-menu {
    display: none;
    width: 100%;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 8px;
    flex-direction: column;
    gap: 3px;
  }

  .inv-nav-menu.open { display: flex; }

  .inv-nav-menu > li { width: 100%; min-height: 45px; }

  .inv-nav-menu > li > a,
  .inv-mega-trigger,
  .inv-tools > a {
    width: 100%;
    min-height: 45px;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .inv-nav-menu > li > a::after,
  .inv-mega-trigger::after,
  .inv-tools > a::after { display: none; }

  .inv-mega {
    position: relative !important;
  }

  .inv-mega-panel {
    position: static;
    display: none;
    width: 100%;
    max-height: none;
    padding: 8px;
    transform: none;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
  }

  .inv-mega.open .inv-mega-panel { display: block; }

  .inv-mega-grid { display: block; }

  .inv-mega-column {
    padding: 10px 3px;
    border-right: 0;
    border-bottom: 1px solid #e4ebf2;
  }

  .inv-mega-journey { margin: 12px 3px 4px; }

  .inv-tools-panel {
    position: static;
    width: 100%;
    transform: none;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
  }

  .inv-tools.open .inv-tools-panel { display: block; }

  .inv-hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .inv-layout { display: block; }

  .inv-sidebar {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    padding: 12px;
    background: rgba(4, 19, 38, .55);
  }

  .inv-sidebar.open { display: block; }

  .inv-sidebar-card {
    width: min(430px, 100%);
    height: calc(100vh - 24px);
    margin-left: auto;
    display: flex;
    flex-direction: column;
  }

  .inv-sidebar-head button { display: grid; place-items: center; }
  .inv-toc { max-height: none; flex: 1; }

  .inv-contents-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    flex: 1;
    padding: 0 13px;
    border: 1px solid #dbe4ed;
    border-radius: 9px;
    background: #fff;
    color: #17304e;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
  }

  .inv-contents-button svg { width: 16px; }

  .inv-toolsbar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px 0;
  }

  .inv-local-search { width: 100%; }

  .inv-crosslink {
    align-items: flex-start;
    flex-direction: column;
  }

  .inv-framework-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .inv-container { width: min(100% - 24px, 1180px); }
  .inv-topbar .inv-container { white-space: nowrap; overflow: hidden; }
  .inv-topbar { font-size: 14px; }

  .inv-logo-icon { width: 48px; height: 48px; border-radius: 14px; }
  .inv-logo-icon svg { width: 30px; }
  .inv-logo strong { font-size: 20px; }
  .inv-logo small { font-size: 14px; }

  .inv-hero-grid { padding: 35px 0; }
  .inv-hero h1 { font-size: 38px; }
  .inv-hero-copy > p { font-size: 15px; }
  .inv-hero-points { grid-template-columns: 1fr; }

  .inv-chart-card { padding: 14px 11px 11px; }
  .inv-chart-wrap { height: 230px; }

  .inv-toolsbar-inner {
    grid-template-columns: 1fr;
  }

  .inv-lesson { padding: 23px 18px; }
  .inv-lesson h2 { font-size: 25px; }
  .inv-subsection h3 { font-size: 18px; }

  .inv-framework { padding: 24px 17px; }
  .inv-framework h2 { font-size: 25px; }
  .inv-framework-grid { grid-template-columns: 1fr 1fr; }

  .inv-crosslink { padding: 22px 18px; }
  .inv-crosslink h2 { font-size: 22px; }

  .inv-footer-grid { grid-template-columns: 1fr; }
  .inv-footer { padding-top: 34px; }
}


/* FINAL COMPATIBILITY PATCH
   Works with the universal style.css/responsive.css + app.js.
   Page-specific rules remain isolated.
*/
.hm-lesson[hidden],
.inv-lesson[hidden] {
  display: none !important;
}

/* app.js compatibility: app.js applies .hidden to generic sections for reveal animations.
   Investing owns its own page layout, so that generic effect must not hide its content. */
.investing-page .hidden {
  opacity: 1 !important;
  transform: none !important;
}


/* ==========================================================
   FINAL FIX — STICKY / SCROLLABLE LESSON TOC
   Desktop/tablet only. Mobile drawer remains unchanged.
========================================================== */
@media (min-width: 821px) {
  .inv-layout {
    align-items: start;
  }

  .inv-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    height: fit-content;
    min-height: 0;
    z-index: 20;
  }

  .inv-sidebar-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 112px);
    overflow: hidden;
  }

  .inv-toc {
    min-height: 0;
    max-height: calc(100vh - 184px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

@media (max-width: 820px) {
  .inv-sidebar {
    position: fixed;
  }

  .inv-toc {
    max-height: none;
    overflow-y: auto;
  }
}
