/* Keep the article inside its grid track, including wide financial tables. */
.reading-layout > article { min-width: 0; }
.prose .research-table {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}
.prose .research-table table {
  display: table;
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  font: 13px/1.65 var(--sans);
  font-variant-numeric: tabular-nums;
}
.prose .research-table th,
.prose .research-table td {
  min-width: 8rem;
  padding: 12px 14px;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}
.prose .research-table th { line-height: 1.5; }
.prose .research-table tbody tr:nth-child(even) { background: #f3f5ee; }
.prose .research-table tbody tr:last-child td { border-bottom: 0; }
.prose .research-table [align="right"] { text-align: right; }
.prose .research-table [align="center"] { text-align: center; }
.prose .research-table [align="left"] { text-align: left; }
.prose .math-display {
  max-width: 100%;
  overflow-x: auto;
  padding: 6px 3px;
  margin: 1.25em 0;
}
.prose .math-display mjx-container[display="true"] { margin: .5em 0; }
.prose .math-inline { overflow-wrap: normal; }
.prose mjx-container { font-size: 105% !important; }
@media print {
  .prose .research-table { overflow: visible; border: 0; }
  .prose .research-table table { table-layout: fixed; min-width: 0; font-size: 8pt; }
  .prose .research-table th,
  .prose .research-table td { min-width: 0; padding: 4px; overflow-wrap: anywhere; }
  .prose .research-table thead { display: table-header-group; }
  .prose .research-table tr { break-inside: avoid; }
  .prose .math-display { overflow: visible; }
}

/* Equations render through MathJax with a plain-language fallback if it cannot load. */
.formula-block { margin: 14px 0; }
.math-display { max-width: 100%; overflow-x: auto; padding: 6px 3px; margin: 1em 0; }
.math-display mjx-container[display="true"] { margin: .5em 0; }
.formula-fallback { display: none; color: var(--muted); font-size: 13px; }
.mathjax-fallback .formula-tex { display: none; }
.mathjax-fallback .formula-fallback { display: block; }

.video-tutorial, .video-placeholder {
  margin: 1.75rem 0;
  padding: 1.25rem;
  border: 1px solid #c9d2c2;
  border-radius: 0.75rem;
  background: #f7faf5;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #182018;
}
.video-frame iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-placeholder p:last-child { margin-bottom: 0; }

.article-discussion, .editorial-notes {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #d6ddd1;
}
.editorial-notes { border-color: #d4ba86; }
.comment-form { display: grid; gap: 0.65rem; margin: 1.25rem 0; }
.comment-form textarea { width: 100%; resize: vertical; }
.comment-list { display: grid; gap: 1rem; }
.published-comment, .internal-note { padding: 1rem; border: 1px solid #dce3d8; border-radius: 0.6rem; background: #fbfcfa; }
.internal-note { border-color: #ddc795; background: #fffaf0; }
.published-comment header, .internal-note header { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.published-comment time { color: #657063; font-size: 0.875rem; }
.comment-badge { padding: 0.1rem 0.45rem; border-radius: 1rem; background: #e3ece0; color: #385132; font-size: 0.75rem; font-weight: 700; }
.internal-note blockquote { margin: 0.75rem 0; padding-left: 0.75rem; border-left: 3px solid #c9a75d; }
.success-message { color: #255b35; font-weight: 600; }
