/* public/amd/conditions.css: see src/amdsite/conditions.js and pages.js. Loaded after amd.css on every athleticsmd.com page. */
/* The five condition pages (/care/brain-fog, belly-fat, heavy-periods-low-iron,
   anemia, hangover). Phone first. Every figure's resting state is the finished
   picture: motion runs only after site.js marks a .nr-research figure
   .nr-reveal and then .in, which it never does without script or with reduced
   motion. Text colours meet WCAG AA on their own backgrounds. */

.cx-hero-cta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Sound familiar? ── */
.cx-split { display: grid; gap: 26px; }
.cx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cx-checks li { position: relative; padding: 14px 16px 14px 50px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); font: 550 1.04rem/1.45 var(--sans); color: var(--ink); }
.cx-checks li::before { content: ''; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--tint); box-shadow: inset 0 0 0 2px #0b7a45; }
.cx-checks li::after { content: ''; position: absolute; left: 23px; top: 50%; width: 8px; height: 4px; margin-top: -4px; border-left: 2px solid #0b7a45; border-bottom: 2px solid #0b7a45; transform: rotate(-45deg); }
.cx-photo { margin: 0; }
.cx-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.cx-photo figcaption { margin-top: 10px; color: #4a5470; font-size: .95rem; line-height: 1.5; }
@media (min-width: 900px) { .cx-split { grid-template-columns: 1.05fr .95fr; align-items: center; } }

/* ── The pictorial ── */
.cx-pict { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.cx-pict > svg { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; overflow: visible; }
.cx-t { font: 600 22px var(--sans); fill: var(--ink); }
.cx-tb { font-weight: 750; font-size: 26px; }
.cx-ts { font-weight: 500; font-size: 18px; fill: var(--muted); }
.cx-tw { fill: #fff; font-size: 19px; font-weight: 700; }
.cx-n1 { fill: #0b2a8f; } .cx-n2 { fill: #1b6fa8; } .cx-n3 { fill: #6a3fa0; } .cx-n4 { fill: #b3261e; } .cx-n5 { fill: #0b7a45; } .cx-n6 { fill: #a35a00; }
.cx-spoke { stroke: #9db3c8; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 0; }
.cx-arrow { fill: none; stroke: #566179; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.cx-drop { fill: #c8372d; }
.cx-tank { fill: #fff; stroke: #566179; stroke-width: 3; }
.cx-level { fill: #c8372d; opacity: .85; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.22); }
.cx-tick { stroke: #566179; stroke-width: 2.5; }
.cx-rbc { fill: #d6453a; stroke: #a3231b; stroke-width: 2; }
.cx-rbc.cx-pale { fill: #f2b5ae; stroke: #d98b82; }
.cx-cloud circle { fill: #dfe6f1; }
.cx-cloud text { fill: #0f1a33; }
.cx-sat { fill: #f3d28a; stroke: #c99a5b; stroke-width: 3; }
.cx-muscle { fill: #b55a4c; }
.cx-cavity { fill: #fbeae6; }
.cx-gut { fill: #e9a3a1; stroke: #c4706f; stroke-width: 2.5; }
.cx-vfat { fill: #e8a02a; stroke: #b9781a; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.cx-spine { fill: #e8e2d6; stroke: #b9b0a0; stroke-width: 3; }
.cx-pin circle { fill: #0f1a33; } .cx-pin text { fill: #fff; font: 750 20px var(--sans); }
.cx-hub { fill: #e7ecf5; }
.cx-stem { fill: none; stroke: #0f1a33; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.cx-wine { fill: #b3261e; opacity: .85; }
.cx-ico { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.cx-dot { fill: #fff; }
.cx-bone { fill: #f7f1e6; stroke: #fff; stroke-width: 2; }
.cx-crack { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* The steps under each pictorial: the words that matter, readable on a phone. */
.cx-steps { list-style: none; counter-reset: cx; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.cx-steps li { counter-increment: cx; position: relative; padding: 14px 16px 14px 58px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.cx-steps li::before { content: counter(cx); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: #0b2a8f; color: #fff; font: 750 .92rem/32px var(--sans); text-align: center; }
.cx-steps b { display: block; font: 650 1.02rem/1.35 var(--sans); color: var(--ink); }
.cx-steps span { display: block; margin-top: 2px; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.cx-steps-ab li:nth-child(1)::before { content: 'A'; background: #f3d28a; color: #3d2a00; }
.cx-steps-ab li:nth-child(2)::before { content: 'B'; background: #e8a02a; color: #2a1a00; }
.cx-steps-ab li:nth-child(3)::before { content: '✓'; background: #0b7a45; }
@media (min-width: 900px) { .cx-steps { grid-template-columns: repeat(3, 1fr); } .cx-steps:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
.cx-page .nr-rsrc a, .cx-steps a { color: #0b2a8f; }
.cx-pict .nr-rsrc { color: #4a5470; } /* --muted on the grey page is 4.3:1; this is 6.6:1 */

/* ── Research charts, in the No Regain research style ── */
.cx-charts { display: grid; gap: 18px; }
@media (min-width: 900px) { .cx-charts { grid-template-columns: 1fr 1fr; align-items: start; } }
.cx-chart { margin: 0; padding: 20px 18px; background: #fff; }
.cx-chart h3 { font: 450 clamp(1.2rem, 2.4vw, 1.5rem)/1.22 var(--display); margin: 10px 0 16px; }
.cx-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.cx-tag { display: inline-block; margin: 0; padding: 4px 10px; border-radius: 999px; background: #e1e8f7; color: #0b2a8f; font: 650 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.cx-grp { font: 700 16px var(--sans); fill: var(--ink); }
.cx-lab { font: 500 16px var(--sans); fill: #4a5470; }
.cx-val { font: 750 18px var(--sans); fill: var(--ink); }
.cx-bar { transform-box: fill-box; transform-origin: 0 50%; }
.cx-bar.cx-a { fill: #0b2a8f; } .cx-bar.cx-b { fill: #a9b8cc; } .cx-bar.cx-r { fill: #c8372d; } .cx-bar.cx-g { fill: #0b8a4e; }

/* ── What we do: a safety note where it matters ── */
.cx-alert { margin-top: 22px; padding: 18px 20px; border-radius: 16px; background: #fff4f2; border-left: 5px solid #c8372d; }
.cx-alert-h { margin: 0 0 8px; font: 750 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #a3231b; }
.cx-alert ul { margin: 0; padding-left: 18px; }
.cx-alert li { margin: 4px 0; color: var(--ink); line-height: 1.5; }

/* ── What waiting costs, and the decision: dark bands ── */
.cx-page .nr-band > .nr-kicker { color: #6fe3a5; }
.cx-cost ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.cx-cost li { padding: 0 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.cx-cost li span { display: block; color: #fff; font-size: 1.08rem; line-height: 1.55; }
.cx-cost li small { display: block; margin-top: 8px; color: rgba(255, 255, 255, .78); font-size: .8rem; line-height: 1.45; }
.cx-cost a, .cx-close a:not(.nr-btn) { color: #6fe3a5; }
@media (min-width: 900px) { .cx-cost ul { grid-template-columns: repeat(3, 1fr); gap: 28px; } .cx-cost li { border: 0; border-top: 2px solid #6fe3a5; padding: 16px 0 0; } }
.cx-close { text-align: center; }
.cx-close > h2 { margin-left: auto; margin-right: auto; }
.cx-close > p { color: rgba(255, 255, 255, .88); }
.cx-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0 12px; }
.cx-close .nr-btn.gold { background: linear-gradient(135deg, #0d8447, #087a41 55%, #066234); }
.cx-close .nr-btn.ghost { color: #fff; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .75); }
.cx-close .cx-fine { font-size: .82rem; color: rgba(255, 255, 255, .78); }

/* ── Motion, only once the figure is reached (site.js: .nr-reveal → .in) ── */
.cx-pict.nr-reveal .cx-s1, .cx-pict.nr-reveal .cx-s2, .cx-pict.nr-reveal .cx-s3, .cx-pict.nr-reveal .cx-s4, .cx-pict.nr-reveal .cx-s5, .cx-pict.nr-reveal .cx-s6 { opacity: 0; transform: translateY(14px); }
.cx-pict.nr-reveal.in .cx-s1, .cx-pict.nr-reveal.in .cx-s2, .cx-pict.nr-reveal.in .cx-s3, .cx-pict.nr-reveal.in .cx-s4, .cx-pict.nr-reveal.in .cx-s5, .cx-pict.nr-reveal.in .cx-s6 { opacity: 1; transform: none; transition: opacity .6s ease, transform .7s cubic-bezier(.2, .75, .15, 1); }
.cx-pict.nr-reveal.in .cx-s1 { transition-delay: .3s; } .cx-pict.nr-reveal.in .cx-s2 { transition-delay: .65s; } .cx-pict.nr-reveal.in .cx-s3 { transition-delay: 1s; }
.cx-pict.nr-reveal.in .cx-s4 { transition-delay: 1.35s; } .cx-pict.nr-reveal.in .cx-s5 { transition-delay: 1.7s; } .cx-pict.nr-reveal.in .cx-s6 { transition-delay: 2.05s; }
.cx-pict.nr-reveal .cx-spoke { stroke-dashoffset: 260; }
.cx-pict.nr-reveal.in .cx-spoke { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s ease .2s; }
.cx-pict.nr-reveal .cx-level { transform: scaleY(1); }
.cx-pict.nr-reveal.in .cx-level { transform: scaleY(.22); transition: transform 2.6s cubic-bezier(.45, 0, .2, 1) 1.1s; }
.cx-pict.nr-reveal .cx-rbc.cx-pale { fill: #d6453a; stroke: #a3231b; }
.cx-pict.nr-reveal.in .cx-rbc.cx-pale { fill: #f2b5ae; stroke: #d98b82; transition: fill 1.6s ease 2.6s, stroke 1.6s ease 2.6s; }
.cx-pict.nr-reveal .cx-vfat { transform: scale(.3); opacity: .3; }
.cx-pict.nr-reveal.in .cx-vfat { transform: none; opacity: 1; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1.15) .7s, opacity 1s ease .7s; }
.cx-pict.nr-reveal.in .cx-vfat.cx-v2 { transition-delay: 1s; } .cx-pict.nr-reveal.in .cx-vfat.cx-v3 { transition-delay: 1.3s; }
.cx-pict.nr-reveal.in .cx-fall { animation: cx-drip 2.4s ease-in-out 1s 3; }
.cx-pict.nr-reveal.in .cx-f2 { animation-delay: 1.4s; } .cx-pict.nr-reveal.in .cx-f3 { animation-delay: 1.8s; }
.cx-pict.nr-reveal.in .cx-float { animation: cx-float 5s ease-in-out 1.5s 4 alternate; }
@keyframes cx-drip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes cx-float { from { transform: translateX(-4px); } to { transform: translateX(4px); } }
.cx-chart.nr-reveal .cx-bar { transform: scaleX(0); }
.cx-chart.nr-reveal .cx-val { opacity: 0; }
.cx-chart.nr-reveal.in .cx-bar { transform: scaleX(1); transition: transform 1.3s cubic-bezier(.2, .75, .15, 1) .4s; }
.cx-chart.nr-reveal.in .cx-val { opacity: 1; transition: opacity .6s ease 1.5s; }
.cx-chart.nr-reveal.in .cx-d1 { transition-delay: .6s; } .cx-chart.nr-reveal.in .cx-d2 { transition-delay: .8s; } .cx-chart.nr-reveal.in .cx-d3 { transition-delay: 1s; }
.cx-chart.nr-reveal.in .cx-d4 { transition-delay: 1.2s; } .cx-chart.nr-reveal.in .cx-d5 { transition-delay: 1.4s; }
.cx-chart.nr-reveal.in .cx-val.cx-d1 { transition-delay: 1.7s; } .cx-chart.nr-reveal.in .cx-val.cx-d2 { transition-delay: 1.9s; } .cx-chart.nr-reveal.in .cx-val.cx-d3 { transition-delay: 2.1s; }
.cx-chart.nr-reveal.in .cx-val.cx-d4 { transition-delay: 2.3s; } .cx-chart.nr-reveal.in .cx-val.cx-d5 { transition-delay: 2.5s; }
@media (prefers-reduced-motion: reduce) {
  .cx-pict *, .cx-chart * { animation: none !important; transition: none !important; }
}
