/* MarcusPai article reading system on the "Curvatura em cor" skin (rewritten 2026-10-01).
   Loaded on posts whose metadata enables the system (lib/marcuspai-article-reading-system.php; body.mp-ars), after
   v6-imported-articles.css. Owns the frame (rail + story), the "Neste artigo" rail and the optional components the
   library prints: decision register, clinical balance, next reading, inserted photo figure.

   Before: a cream/green token set (--ars-paper #f7f4ed, --ars-accent #245f49), Georgia headings, four layout
   variants (atlas, compare, pathway, evidence) and a Hardware override layer on top. Now one layout on the site
   tokens: 124 posts use it and 121 of them were "atlas" already, so compare (rail on the right), pathway (sticky
   strip plus a dotted spine) and evidence (blue tokens) render as atlas. The body classes are still printed.
   Previous file: 03-notes/curvatura-inner-20261001/backup-articles/assets/css/article-reading-system.css.

   Frame sizes (--mpa-col, --mpa-rail, --mpa-gap, --mpa-frame) and the selector prefix are defined in posts.css. */

/* the legacy theme clips the site container, which disables sticky rails */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .site-container { overflow-x: clip; overflow-y: visible; }

/* ---------- frame */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__frame { display: block; margin: 0 !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story { min-width: 0; }
@media (min-width: 1101px) {
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__frame { display: grid; grid-template-columns: var(--mpa-rail) minmax(0, var(--mpa-col)); column-gap: var(--mpa-gap); row-gap: 0; align-items: start; justify-content: start; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register { grid-column: 2; grid-row: 1; margin-bottom: 56px; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters { grid-column: 1; grid-row: 2; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story { grid-column: 2; grid-row: 2; }
}

/* ---------- "Neste artigo": a ruled list under a small label. Numerals are muted, not vermilion: at 15px the
   vermilion does not reach 4.5:1 on the ground. */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters { display: block; min-width: 0; margin: 0; padding: 0 !important; border: 0 !important; background: none; box-shadow: none; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters-label { margin: 0 !important; padding: 0 0 14px !important; border: 0 !important; border-bottom: 1.5px solid var(--mpc-ink) !important; font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0.1em !important; line-height: 1.2 !important; text-transform: uppercase !important; color: var(--mpc-muted) !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters ol { margin: 0 !important; padding: 0 !important; list-style: none !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters li { margin: 0 !important; padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--mpc-rule) !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters li::before { content: none !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters a.mp-ars__chapter-link { display: grid !important; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 11px 0 !important; border: 0 !important; color: var(--mpc-ink) !important; font-size: 16px !important; font-weight: 500 !important; line-height: 1.35 !important; text-decoration: none !important; transition: color .15s ease; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters a.mp-ars__chapter-link > span { color: var(--mpc-muted) !important; font-size: 15px !important; font-weight: 500 !important; font-variant-numeric: tabular-nums; letter-spacing: 0.02em !important; line-height: 1.5 !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters a.mp-ars__chapter-link:is(:hover, :focus-visible) { color: var(--mpc-accent) !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters a.mp-ars__chapter-link:is(:hover, :focus-visible) > span { color: var(--mpc-accent) !important; }
@media (min-width: 1101px) {
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters { position: sticky; top: 32px; max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (max-width: 1100px) {
	/* one column: the rail is a strip of chapters that stays at the top of the screen and scrolls sideways */
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__frame { display: flex; flex-direction: column; align-items: stretch; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register { order: -2; margin-bottom: 40px; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters { position: sticky; top: 0; z-index: 8; order: -1; width: auto !important; /* style.css: nav { width: 100% } */ margin: 0 calc(var(--mpc-pad) * -1) 40px; padding: 0 var(--mpc-pad) !important; border-bottom: 1px solid var(--mpc-rule) !important; background: var(--mpc-ground); }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters-label { display: none !important; }
	/* the list runs to the right edge of the screen, so a chapter cut by the edge reads as "there is more" */
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters ol { display: flex; gap: 28px; margin-right: calc(var(--mpc-pad) * -1) !important; padding-right: var(--mpc-pad) !important; overflow-x: auto; scrollbar-width: none; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters ol::-webkit-scrollbar { display: none; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters li { flex: none; border: 0 !important; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters a.mp-ars__chapter-link { grid-template-columns: auto auto; align-items: center; min-height: 52px; padding: 0 !important; white-space: nowrap; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story [data-v6-article] :is(h2, h3)[id] { scroll-margin-top: 76px; }
}

/* ---------- photo inserted by the library between sections */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__figure { width: 100%; margin: clamp(48px, 6vw, 72px) 0 !important; padding: 0 !important; border: 0 !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__figure-image { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 0; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__figure figcaption { max-width: 64ch; margin: 0 !important; padding: 12px 0 0 !important; border: 0 !important; font-size: 15px !important; font-weight: 400 !important; line-height: 1.5 !important; color: var(--mpc-muted) !important; }

/* ---------- decision register (printed above the story when a post's decision layer is current) */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register { box-sizing: border-box; min-width: 0; padding: 24px 0 0; border-top: 1.5px solid var(--mpc-ink); background: none; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register h2 { max-width: 28ch; margin: 0 0 12px !important; font-size: clamp(25px, 2.4vw, 34px) !important; line-height: 1.15 !important; color: var(--mpc-ink); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-lead { max-width: 64ch; margin: 0 0 24px; font-size: 18px !important; line-height: 1.55; color: var(--mpc-body); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register dl { margin: 0; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register-row { display: grid; grid-template-columns: minmax(150px, .33fr) minmax(0, 1fr); gap: 4px 24px; min-width: 0; padding: 16px 0; border-top: 1px solid var(--mpc-rule); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register-row:last-child { border-bottom: 1px solid var(--mpc-rule); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register :is(dt, dd) { min-width: 0; margin: 0; font-size: 17px !important; line-height: 1.5; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register dt { font-weight: 600; color: var(--mpc-ink); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register dd { color: var(--mpc-body); }

/* ---------- clinical balance (two ruled columns and a verdict line) */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story [data-v6-article] .mp-ars__clinical-balance { box-sizing: border-box; min-width: 0; margin: clamp(56px, 6vw, 80px) 0; padding: 24px 0 0; border-top: 1.5px solid var(--mpc-ink); background: none; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story [data-v6-article] .mp-ars__clinical-balance h2 { max-width: 28ch; margin: 0 0 24px !important; padding: 0; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; min-width: 0; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-side { min-width: 0; padding: 0; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story [data-v6-article] .mp-ars__balance-side h3 { margin: 0 !important; padding: 0 0 12px; border-bottom: 1px solid var(--mpc-ink); font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0.1em !important; line-height: 1.3 !important; text-transform: uppercase !important; color: var(--mpc-muted); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-side ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__story [data-v6-article] .mp-ars__balance-side li { margin: 0 !important; padding: 12px 0 !important; border-bottom: 1px solid var(--mpc-rule); font-size: 17px !important; line-height: 1.5 !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-side li::before { content: none !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-verdict { margin: 24px 0 0 !important; padding: 20px 24px; background: var(--mpc-tint); font-size: 17px !important; line-height: 1.55 !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-verdict strong { color: var(--mpc-ink); }

/* ---------- next reading: row links with the arrow circle */
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading { box-sizing: border-box; min-width: 0; margin-top: clamp(64px, 7vw, 96px); padding-top: 24px; border-top: 1.5px solid var(--mpc-ink); background: none; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading h2 { margin: 0 0 8px !important; font-size: clamp(25px, 2.4vw, 34px) !important; line-height: 1.15 !important; color: var(--mpc-ink); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading ol { margin: 0 !important; padding: 0 !important; list-style: none !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading li { margin: 0 !important; padding: 0 !important; border-bottom: 1px solid var(--mpc-rule); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading a { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 4px 24px; align-items: center; min-width: 0; padding: 18px 0; color: var(--mpc-ink) !important; text-decoration: none !important; border: 0 !important; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading a::after { content: ''; grid-column: 2; grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--mpc-ink); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12' fill='none' stroke='%2313151B' stroke-width='1.5'%3E%3Cpath d='M0 6h20M15 1l5 5-5 5'/%3E%3C/svg%3E") center / 20px 11px no-repeat; }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading a:is(:hover, :focus-visible)::after { background-color: var(--mpc-ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12' fill='none' stroke='%23FFFFFF' stroke-width='1.5'%3E%3Cpath d='M0 6h20M15 1l5 5-5 5'/%3E%3C/svg%3E"); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading-role { grid-column: 1; font-size: 15px !important; font-weight: 600; letter-spacing: 0.1em !important; line-height: 1.3; text-transform: uppercase !important; color: var(--mpc-muted); }
html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__next-reading-title { grid-column: 1; min-width: 0; font-size: clamp(18px, 1.5vw, 21px) !important; font-weight: 600; line-height: 1.3; }

@media (max-width: 640px) {
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__decision-register-row, html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-grid { grid-template-columns: minmax(0, 1fr); }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__balance-side + .mp-ars__balance-side { margin-top: 28px; }
	html body:is(#mpc, .mpc-site):is(#mpa, .mp-ars) .mp-ars__chapters ol { gap: 24px; }
}
