/* Content blocks of the hub pages (built by build_hub.py).
   Uses only site.css colour variables (plus #b8b8b8 from .cards); adds no new colours. */
.article-body h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.article-body h4 { font-size: 1rem; margin: 1rem 0 .4rem; }
.draft-note { font-style: italic; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono, .era, .kind, .tk-label, .cn-label, .glance-label { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* section numbers */
.sec { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.sec > h2[data-n]::before { content: "\00a7\2009" attr(data-n); display: block; font: 700 .85rem ui-monospace, Consolas, monospace; margin-bottom: .4rem; }
.sec--example > h2[data-n]::before { content: "\00a7\2009" attr(data-n) "\2003Worked example"; }
.contents nav a { font-size: .875rem; }
.toc-group + .toc-group { margin-top: .9rem; }
.toc-gl { font: 700 .7rem ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .35rem; }
.toc-group a { display: block; margin-bottom: .35rem; }

/* labels */
.tk-label, .kind, .cn-label, .glance-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .6rem; }

/* key takeaways: the strongest box, dark like the top bar */
.takeaways { background: var(--frame); color: var(--text-light); padding: 1.1rem 1.35rem .5rem; margin: 0 0 1.5rem; border-left: 5px solid var(--green); }
.takeaways .tk-label { color: var(--green); }
.takeaways ul { padding-left: 1.1rem; }
.takeaways li { margin-bottom: .55rem; }
.takeaways li::marker { color: var(--green); }
.takeaways a { color: var(--text-light); }

/* at a glance */
.glance { background: var(--ob); padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-top: 4px solid var(--frame); }
.glance dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1.5rem; margin: 0; }
.glance .g-wide { grid-column: 1 / -1; }
.glance dt { font: 700 .72rem ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .15rem; }
.glance dd { margin: 0; overflow-wrap: anywhere; }
.glance .cite { white-space: normal; }

/* checklist */
.checklist { background: var(--ob); padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-top: 4px solid var(--fpfvg); }
.cl-title { font-size: 1.0625rem; margin: 0 0 .7rem; }
.cl-items { list-style: none; padding: 0; margin: 0; }
.cl-items li { display: flex; gap: .7rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid #b8b8b8; margin: 0; }
.cl-items input { accent-color: var(--frame); transform: translateY(.1rem); }

/* rule cards */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1.5rem; }
.rule { background: var(--ob); border: 1px solid var(--line); border-top: 4px solid var(--bisi); padding: .9rem 1.1rem; }
.rule-title { font-size: .8rem; font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .5rem; }
.rule-now p { margin-bottom: .5rem; }
.rule-now > :last-child { margin-bottom: 0; }
.rule-earlier { margin-top: .7rem; border-top: 1px solid #b8b8b8; padding-top: .5rem; font-size: .925rem; }
.rule-earlier summary { cursor: pointer; font-weight: 700; }

/* callouts */
.callout { background: var(--ob); padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-left: 5px solid var(--org); }
.callout--caution { border-left-color: var(--sibi); }
.callout .kind { color: var(--ink); }
.callout--caution .kind::before { content: "\26A0\2009"; }
.callout-title { font-size: 1.0625rem; margin: 0 0 .45rem; }
.callout > :last-child { margin-bottom: 0; }

/* our read (interpretation) */
.our-read { border-left: 4px solid var(--org); background: #b8b8b8; padding: .7rem 1rem; margin: 0 0 1.5rem; }
.our-read p { margin: 0; }
.or-label { font-weight: 750; }
.or-label::after { content: "interpretation"; margin-left: .5rem; padding: .05rem .4rem; background: var(--org); font: 600 .68rem ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; vertical-align: .1em; }

/* numbered steps */
ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 2.4rem; margin-bottom: .9rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--frame); color: var(--text-light); font: 700 .8rem ui-monospace, Consolas, monospace; }
ul.leads > li::marker { color: var(--frame); }

/* lead-in rows: label | text */
.leadgroup { display: grid; margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.lp { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.2rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.lp p { margin: 0; }
.lp-head strong.lead { font-size: .95rem; }

/* era badges, e.g. (2025-26) */
.era { display: inline-flex; align-items: center; margin-left: .25rem; padding: .05rem .45rem; background: var(--frame); color: var(--text-light); font-size: .72rem; font-weight: 600; border-radius: .2rem; white-space: nowrap; vertical-align: .1em; }
.era .cp, .era-dot { display: none; }
.lp-head .era { margin: .35rem .1rem 0 0; }
.lp-head strong.lead { display: block; }

/* citations: faint date only; full source (title, ICT, timestamp) in the hover tooltip */
.cite { font-size: .8em; opacity: .62; text-decoration: none; white-space: nowrap; }
a.cite:hover, a.cite:focus-visible { opacity: 1; text-decoration: underline; }
.cite .c-who, .cite .c-sep, .cite .c-title, .cite .c-mid, .cite .c-note { display: none; }
.cite[data-t]::after { content: "\2009\25B6"; font-size: .85em; }
.cite--text { font-style: italic; }

/* mistakes */
.mistakes { list-style: none; padding: 0; display: grid; gap: .6rem; margin: 0 0 1.5rem; }
.mk { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--ob); border: 1px solid var(--line); margin: 0; }
.mk--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mk-wrong { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: .4rem; padding: .75rem 1rem; }
.mk-x { font-weight: 800; color: var(--sibi); filter: brightness(.6); }
.mk-right { padding: .75rem 1rem; background: #b8b8b8; border-left: 4px solid var(--green); }
.mk p { margin: 0; font-size: .95rem; }
.mk-lbl { display: block; }

/* open questions */
.open-qs { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.oq { background: var(--ob); border-left: 4px solid var(--fpfvg); padding: .7rem 1rem; margin: 0; }
.oq p { margin: 0; }
.oq strong.lead { display: block; margin-bottom: .2rem; }
.oq strong.lead::before { content: "?"; display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin-right: .45rem; border-radius: 50%; background: var(--frame); color: var(--text-light); font-size: .8em; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
.tbl { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--ob); }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--frame); color: var(--text-light); font: 700 .75rem ui-monospace, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.tbl tbody th { font-weight: 700; }

/* timeline */
.timeline { list-style: none; padding: 0 0 0 1.3rem; border-left: 3px solid var(--frame); margin: 0 0 1.5rem; }
.tl-node { position: relative; margin-bottom: 1.1rem; }
.tl-node::before { content: ""; position: absolute; left: -1.3rem; top: .35rem; width: .8rem; height: .8rem; margin-left: -.55rem; border-radius: 50%; background: var(--green); border: 2px solid var(--frame); }
.tl-period { font-weight: 750; margin-bottom: .25rem; }
.tl-text, .tl-meta { margin-bottom: .25rem; }
.tl-lbl { font-weight: 700; }

/* charts */
.chart { margin: 0 0 1.5rem; }
.chart-frame img { display: block; max-width: 100%; height: auto; background: var(--frame); }
.chart-frame > a:first-child { display: block; cursor: zoom-in; }
.chart-full { display: none; }
@media (max-width: 48rem) { .chart-full { display: inline-block; padding-block: .5rem; font-size: .925rem; } }
.chart figcaption { font-size: .925rem; }
.chart-notice { background: var(--ob); padding: .8rem 1.1rem; margin-top: .75rem; border-left: 4px solid var(--frame); }
.chart-notice ul { margin-bottom: 0; }

/* pull quote */
.pullquote { margin: 0 0 1.5rem; border-left: 5px solid var(--green); padding: .3rem 0 .3rem 1.2rem; }
.pullquote blockquote { margin: 0; font-size: 1.3rem; font-style: italic; line-height: 1.35; }
.pullquote blockquote p { margin: 0; }
.pullquote figcaption { margin-top: .5rem; }

/* levels schematic */
.levels { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.2rem; margin: 0 0 1.5rem; align-items: start; background: var(--ob); padding: 1rem; }
.lv-svg { width: 100%; height: auto; }
.lv-box { fill: var(--bisi); }
.levels--bearish .lv-box { fill: var(--sibi); }
.levels--neutral .lv-box { fill: #b8b8b8; }
.lv-line { stroke: var(--ink); stroke-width: 1.5; }
.lv-q { stroke-dasharray: 4 3; }
.lv-pct, .lv-name { font-size: 11px; fill: var(--ink); }
.lv-cap { font-size: .8rem; }
.lv-list { list-style: none; padding: 0; margin: 0; }
.lv-list li { border-bottom: 1px solid #b8b8b8; padding: .35rem 0; }
.lv-pct-t { font: .75rem ui-monospace, Consolas, monospace; }

/* links to pages not built yet */
.pending { text-decoration: underline dotted; cursor: default; }

/* end matter */
.disclaimer p { font-size: .9rem; }
.disclaimer p + p { margin-top: .5rem; }

@media (max-width: 48rem) {
  .rules, .levels, .mk--pair { grid-template-columns: 1fr; }
  .glance dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp { grid-template-columns: 1fr; gap: .3rem; }
}

/* "On this page": plain heading on desktop, tap-to-open menu on phones */
.toc-details > summary { list-style: none; cursor: default; }
.toc-details > summary::-webkit-details-marker { display: none; }
@media (max-width: 48rem) {
  .toc-details > summary { cursor: pointer; margin: 0; padding: .6rem 0; }
  .toc-details > summary::after { content: " \25BE"; }
  .toc-details[open] > summary::after { content: " \25B4"; }
  .toc-details[open] > nav { padding-bottom: .6rem; }
  .contents { border-bottom: 1px solid var(--line); padding-top: .2rem; }
}

/* desktop: "On this page" stays in view and marks the section being read */
@media (min-width: 48.01rem) {
  .contents { position: sticky; top: 1rem; }
  .toc-details > nav { display: block; max-height: calc(100vh - 5rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .4rem; }
}
.toc-group a { border-left: 3px solid transparent; padding-left: .5rem; margin-left: -.5rem; }
.toc-group a.active { border-left-color: var(--frame); font-weight: 700; text-decoration-thickness: 2px; }
.toc-details > nav { display: block; }
