/* InvesteHub technical reading layer.
   Keeps article pages focused, calm and closer to product documentation. */

body.editorial-focus-page {
  --article-reading-width: 680px;
  --article-reading-gap: clamp(36px, 5vw, 64px);
  --article-quote-bar: 5px;
}

body.editorial-focus-page main > :where(.article-section, .example-section, .article-shell) {
  width: min(100%, var(--article-reading-width)) !important;
  max-width: var(--article-reading-width) !important;
  margin: var(--article-reading-gap) auto !important;
}

body.editorial-focus-page :where(.article-section, .article-content, .example-section) {
  color: var(--text) !important;
  font-family: var(--font-body, "Inter", sans-serif) !important;
  text-align: left !important;
}

body.editorial-focus-page :where(.article-section, .article-content, .example-section) :where(p, li) {
  max-width: var(--article-reading-width) !important;
  color: color-mix(in srgb, var(--text) 74%, var(--muted)) !important;
  font-family: var(--font-body, "Inter", sans-serif) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  letter-spacing: 0 !important;
}

body.editorial-focus-page :where(.article-section, .article-content, .example-section) :where(h2, h3) {
  max-width: var(--article-reading-width) !important;
  color: var(--text) !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

body.editorial-focus-page :where(.article-section, .article-content, .example-section) h2 {
  margin: 0 0 16px !important;
  font-size: clamp(1.85rem, 3vw, 2.55rem) !important;
  line-height: 1.12 !important;
}

body.editorial-focus-page :where(.article-section, .article-content, .example-section) h3 {
  margin: 30px 0 10px !important;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem) !important;
  line-height: 1.2 !important;
}

body.editorial-focus-page :where(.article-section, .example-section) {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.editorial-focus-page .article-shell {
  display: grid !important;
  grid-template-columns: minmax(0, var(--article-reading-width)) !important;
  justify-content: center !important;
  gap: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.editorial-focus-page .article-content {
  width: min(100%, var(--article-reading-width)) !important;
  max-width: var(--article-reading-width) !important;
  margin: 0 auto !important;
  display: grid !important;
  gap: 34px !important;
}

body.editorial-focus-page .article-content > section {
  display: grid !important;
  gap: 12px !important;
  padding: 0 0 34px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent) !important;
}

body.editorial-focus-page .article-content > section:last-child {
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

body.editorial-focus-page .article-toc {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: min(100%, var(--article-reading-width)) !important;
  max-width: var(--article-reading-width) !important;
  margin: 0 auto 10px !important;
}

body.editorial-focus-page .article-toc a {
  min-height: 0 !important;
  padding: 7px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--green) 36%, transparent) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--muted) 82%, var(--text)) !important;
  box-shadow: none !important;
  font-size: .84rem !important;
  font-weight: 750 !important;
}

body.editorial-focus-page .formula-box {
  position: relative !important;
  overflow: visible !important;
  padding: 4px 0 4px 24px !important;
  border: 0 !important;
  border-left: var(--article-quote-bar) solid var(--green) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.editorial-focus-page .formula-box:hover {
  border-left-color: var(--green) !important;
  box-shadow: none !important;
  transform: none !important;
}

body.editorial-focus-page .formula-box {
  margin: 28px 0 !important;
}

body.editorial-focus-page .formula-box strong {
  display: block !important;
  margin: 0 0 8px !important;
  color: var(--text) !important;
  font-family: var(--font-body, "Inter", sans-serif) !important;
  font-size: .82rem !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
}

body.editorial-focus-page .formula-box span,
body.editorial-focus-page .formula-box code {
  display: block !important;
  color: color-mix(in srgb, var(--text) 86%, var(--green)) !important;
  font-family: var(--font-numeric, "JetBrains Mono", monospace) !important;
  font-size: clamp(1rem, 1.45vw, 1.15rem) !important;
  font-weight: 650 !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}

body.editorial-focus-page .example-section {
  display: grid !important;
  gap: 18px !important;
  padding: 0 !important;
  border-left: 0 !important;
  background: transparent !important;
}

body.editorial-focus-page :where(.example-grid, .example-card) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.editorial-focus-page .example-table {
  width: 100% !important;
  margin: 24px 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.editorial-focus-page .example-table :where(th, td) {
  padding: 14px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent) !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--text) 76%, var(--muted)) !important;
  font-family: var(--font-body, "Inter", sans-serif) !important;
  font-size: .98rem !important;
  line-height: 1.45 !important;
  text-align: left !important;
  vertical-align: top !important;
}

body.editorial-focus-page .example-table th {
  color: color-mix(in srgb, var(--muted) 84%, var(--text)) !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
}

body.editorial-focus-page .example-table :where(td, th):not(:first-child) {
  padding-left: 18px !important;
}

body.editorial-focus-page .example-table :where(td, th):last-child {
  text-align: right !important;
}

body.editorial-focus-page .example-table :where(td.numeric, th.numeric),
body.editorial-focus-page .example-table td:last-child {
  font-family: var(--font-numeric, "JetBrains Mono", monospace) !important;
  font-weight: 650 !important;
  text-align: right !important;
}

body.editorial-focus-page .example-table tbody tr:last-child td {
  border-bottom-color: color-mix(in srgb, var(--line) 55%, transparent) !important;
}

body.editorial-focus-page .table-like,
body.editorial-focus-page .table-row {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.editorial-focus-page .table-row {
  padding: 14px 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent) !important;
}

body.dark.editorial-focus-page :where(.article-section, .article-content, .example-section) :where(p, li),
body.dark.editorial-focus-page .example-table :where(th, td) {
  color: color-mix(in srgb, var(--text) 72%, var(--muted)) !important;
}

@media (max-width: 760px) {
  body.editorial-focus-page {
    --article-reading-width: 100%;
  }

  body.editorial-focus-page main > :where(.article-section, .example-section, .article-shell) {
    margin: 40px auto !important;
  }

  body.editorial-focus-page :where(.article-section, .article-content, .example-section) :where(p, li) {
    font-size: 17px !important;
    line-height: 1.68 !important;
  }

  body.editorial-focus-page .formula-box {
    padding-left: 18px !important;
    border-left-width: 4px !important;
  }

  body.editorial-focus-page .example-table {
    display: block !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
  }

  body.editorial-focus-page .example-table :where(th, td) {
    min-width: 112px !important;
    white-space: nowrap !important;
  }
}
