/* ==========================================================================
   Broome Street Labs: long-form pages (research write-ups, methods notes)
   Load after site.css. Uses its colors and fonts.
   ========================================================================== */

.article {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.article h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1;
  margin: 1.1rem 0 1rem;
}
.article h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  line-height: 1.2;
  margin: 3.5rem 0 1.1rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}
.article h3 { font-size: 1.125rem; font-weight: 600; margin: 2rem 0 0.5rem; }
.article h2[id], .article h3[id] { scroll-margin-top: 90px; }

.article p, .article ul, .article ol { margin: 0 0 1.1rem; }
.article ul, .article ol { padding-left: 1.25rem; }
.article li { margin: 0.4rem 0; }
.article strong { font-weight: 600; }
.article a {
  color: var(--link);
  text-decoration-color: var(--haze);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.article a:hover { text-decoration-color: var(--link); }

.byline {
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 2.25rem !important;
}
.byline strong { color: var(--ink); font-weight: 500; }

.intro-note { color: var(--muted); font-style: italic; border-left: 2px solid var(--haze); padding-left: 1rem; }

.callout {
  background: var(--tint);
  border-left: 3px solid var(--blue);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout p { margin: 0; }

/* On-this-page box */
.toc {
  border: 1px solid var(--line); background: #fff;
  padding: 1.1rem 1.35rem; margin: 2rem 0;
  font-size: 0.92rem;
}
.toc p { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin: 0 0 0.5rem; }
.article .toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
.article .toc li { break-inside: avoid; margin: 0.15rem 0; }
.article .toc a { text-decoration: none; color: var(--ink); }
.article .toc a:hover { color: var(--link); text-decoration: underline; }
@media (max-width: 560px) { .article .toc ol { columns: 1; } }

.faq-q { font-weight: 600; font-size: 1.05rem; margin: 1.75rem 0 0.25rem !important; }

/* Tables: the .wide variant breaks out of the text column on big screens;
   on phones every table scrolls sideways inside its own box. */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.table-wrap.wide {
  width: min(60rem, calc(100vw - 2rem));
  position: relative; left: 50%; transform: translateX(-50%);
}
.article table {
  border-collapse: collapse; width: 100%;
  font-size: 0.875rem; line-height: 1.4;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.article th, .article td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.article th { background: var(--tint); font-weight: 600; min-width: 5.5rem; }
.article td:first-child { white-space: nowrap; }
.article td.num, .article th.num { text-align: right; }
.article td.num { white-space: nowrap; }
.article tr.total td { font-weight: 600; border-top: 2px solid var(--ink); }
.article tr.actual td { font-weight: 600; }

.table-notes { font-size: 0.97rem; }

.article figure { margin: 2rem 0; }
.article figure img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: #fff; }
.article figcaption { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-top: 0.6rem; }

.cta {
  background: var(--tint);
  padding: 1.35rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 1rem;
}
.cta p { margin: 0; }

.technical { font-size: 0.98rem; }
.meta-block { font-size: 0.94rem; }
.meta-block h3 { margin-top: 1.5rem; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 3.5rem 0 1.5rem; }
