/* =========================================================================
   Fix My Hair article template (2026-11-24), new-site look.
   Pages with <main class="art-main"> (articles, city pages, treatment
   guides). Loaded LAST in <head> by tools/apply-theme.mjs (fmh-tpl block)
   so it wins over the skin, the dark layer and the pages' inline article CSS
   without new !important where specificity is enough. Values come from
   assets/ds/tokens.css only. ASCII only (gate D1).
   ========================================================================= */

/* ---- column ------------------------------------------------------------ */
html:root body .art-main .art{max-width:720px;padding-left:var(--sp-5);padding-right:var(--sp-5)}
html:root body .art-main .art-bc{max-width:720px!important;padding-left:var(--sp-5)!important;padding-right:var(--sp-5)!important;color:var(--c-dim)!important}

/* ---- header: eyebrow, title, reviewer, lead ----------------------------- */
html:root body .art .art-meta1{gap:var(--sp-3);margin-bottom:var(--sp-4);font:600 .75rem/1 var(--font-body);letter-spacing:.2em;text-transform:uppercase;color:var(--c-dim)}
html:root body .art .art-pill{padding:0;border-radius:0;background:none!important;color:var(--c-accent)!important;font:inherit;letter-spacing:inherit}
html:root body .art .art-title{margin:0 0 var(--sp-5);max-width:18ch;font-family:var(--font-display)!important;font-weight:700!important;font-size:var(--fs-2xl);line-height:1.02;letter-spacing:-.04em;color:var(--c-text)}
html:root body .art .art-review{display:flex;align-items:center;gap:var(--sp-3);margin:0 0 var(--sp-6);padding:var(--sp-3) var(--sp-4);border:0;border-radius:var(--r-md);background:var(--c-surface)!important;box-shadow:inset 0 0 0 1px var(--c-line)!important;font-size:var(--fs-sm);line-height:1.45;color:var(--c-muted)}
html:root body .art .art-review b{color:var(--c-text)}
html:root body .art .art-doc{width:36px;height:36px;border:0}
html:root body .art .art-lead{margin:0 0 var(--sp-5);font-family:var(--font-body);font-weight:400;font-size:var(--fs-lg);line-height:1.55;color:var(--c-muted)!important}

/* ---- body copy --------------------------------------------------------- */
html:root body .art p{font-size:1.0625rem;line-height:1.7;color:var(--c-muted)}
html:root body .art :is(p,li) :is(b,strong){color:var(--c-text);font-weight:600}
html:root body .art :is(ul,ol):not([class],[style],.fmh-toc ol,.art-take ol){margin:0 0 var(--sp-5);padding-left:1.25em}   /* paragraph rhythm below; markers inside the text column */
html:root body .art li{color:var(--c-muted)}
html:root body .art :is(h2,h3,h4){color:var(--c-text);letter-spacing:-.02em}
html:root body .art h2{margin:var(--sp-7) 0 var(--sp-3)}
html:root body .art h3{margin:var(--sp-6) 0 var(--sp-2)}
html:root body .art p.small{font-size:var(--fs-sm);color:var(--c-dim)}

/* ---- key points, figures, clinical notes: cards ------------------------- */
html:root body .art :is(.art-take,.art-fig,.art-clin){border:0!important;border-radius:var(--r-lg)!important;background:var(--c-surface)!important;box-shadow:inset 0 0 0 1px var(--c-line)!important}
html:root body .art .art-take{padding:var(--sp-5) var(--sp-5)}
html:root body .art .art-take h4{font:600 .75rem/1 var(--font-body);letter-spacing:.2em;text-transform:uppercase;color:var(--c-accent)}
html:root body .art .art-take li{color:var(--c-text)!important;font-size:var(--fs-base)}
html:root body .art .art-take li::before{background:var(--c-accent);border:0;width:8px;height:8px;top:8px}
html:root body .art .art-take li::after{display:none}
/* numbered lists: the number is the marker, no gold dot; a heading that opens a card sits at its top padding */
html:root body .art .art-take ol{padding-left:1.25em}
html:root body .art .art-take ol>li{padding-left:0}
html:root body .art .art-take ol>li::before{display:none}
html:root body .art :is(.art-take,.art-clin)>:is(h2,h3,h4):first-child{margin-top:0!important}
html:root body .art .art-clin:has(>:is(h2,h3,h4):first-child){padding-top:var(--sp-5)}

/* ---- call to action: the homepage's gold card with a dark button ---------
   :not(#_) matches the effects layer's .fmx-btn:not(#_) weight. */
html:root body .art .art-cta{margin:var(--sp-7) 0 var(--sp-3);padding:var(--sp-5);border-radius:var(--r-lg);background:var(--c-accent);color:var(--c-on-accent)}
/* the card's button is a plain element (.art-cta-go, no .btn): no effects
   layer, no clip, no label roll, so nothing can hide its text (owner, 2026-11-25) */
html:root body .art .art-cta .art-cta-go{-webkit-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:100%;min-height:52px;margin:0;padding:14px 20px;border:0;border-radius:var(--r-md);background:var(--c-bg);color:var(--c-accent);font:600 1rem/1.3 var(--font-body);text-align:center;text-decoration:none;cursor:pointer;opacity:1;visibility:visible;transition:transform var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
@media (hover:hover){html:root body .art .art-cta .art-cta-go:hover{transform:translateY(-2px);box-shadow:0 12px 30px -14px rgba(0,0,0,.6)}}
html:root body .art .art-cta :is(p,li){color:var(--c-on-accent)}
html:root body .art .art-cta a:not(.btn):not([class*="btn"]):not(.art-cta-go){color:var(--c-on-accent)!important}
html:root body .art .art-disc{color:var(--c-dim)}

/* ---- related reading: homepage cards ----------------------------------- */
html:root body .art .art-rel-h{margin:var(--sp-7) 0 var(--sp-4);font:600 .75rem/1 var(--font-body)!important;letter-spacing:.2em;text-transform:uppercase;color:var(--c-accent)}
html:root body .art .art-rel{gap:var(--sp-3)}
html:root body .art .relcard{display:flex;flex-direction:column;flex:0 0 min(72vw,260px);min-height:min(108vw,400px);padding:8px;border:0!important;border-radius:var(--r-lg)!important;background:var(--c-surface)!important;box-shadow:inset 0 0 0 1px var(--c-line-strong)!important;
  transition:background-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
html:root body .art .relcard:is(:hover,:focus-visible){background:var(--c-surface-hover)!important;box-shadow:inset 0 0 0 1px var(--c-edge-accent)!important}
html:root body .art .relcard .hcard-hero{display:flex;flex-direction:column;flex:1 1 auto;aspect-ratio:auto!important;min-height:0;border-radius:calc(var(--r-lg) - 8px);background:var(--c-surface-2)!important}
html:root body .art .relcard .hcard-hero>*{flex:1 1 auto;min-height:0}html:root body .art .relcard .hcard-hero .cimg{width:100%;height:100%!important;object-fit:cover}
/* no photo: a typographic title tile instead of a placeholder (owner, 2026-11-25). Eyebrow = the section's own
   label (dropped for related cards, 2026-11-25), title large in the display font, "Read" at the bottom, a gold corner rule as the one decoration */
html:root body .art .relcard:has(.ntile):not(#_){position:relative;container-type:inline-size;padding:var(--sp-5) var(--sp-4) var(--sp-4);background:var(--c-surface-2)!important;box-shadow:inset 0 0 0 1px var(--c-line)!important}
html:root body .art .relcard:has(.ntile):not(#_):is(:hover,:focus-visible){background:var(--c-surface-hover)!important;box-shadow:inset 0 0 0 1px var(--c-edge-accent)!important}
html:root body .art .relcard:has(.ntile):not(#_)::before{content:none}   /* no eyebrow: it only repeated the rail's "Related reading" heading */
html:root body .art .relcard:has(.ntile):not(#_)::after{content:'Read \2192';margin-top:auto;padding-top:var(--sp-4);font:600 var(--fs-xs)/1 var(--font-body);letter-spacing:.12em;text-transform:uppercase;color:var(--c-accent)}
html:root body .art .relcard:not(#_) .hcard-hero:has(.ntile){position:absolute;top:var(--sp-5);right:var(--sp-4);flex:none;width:var(--sp-6);height:var(--sp-6);border-radius:0;background:none!important;border:solid var(--c-accent);border-width:1.5px 1.5px 0 0;opacity:.5}
html:root body .art .relcard:not(#_) .ntile{display:none}
html:root body .art .relcard:has(.ntile):not(#_) .rc-t{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;padding:0 var(--sp-7) 0 0!important;font:600 clamp(1.25rem,13cqi,2.5rem)/1.1 var(--font-display)!important;letter-spacing:-.02em;overflow-wrap:break-word;hyphens:auto;color:var(--c-text)!important}
html:root body .art .relcard:has(.ntile):not(#_) .rc-t::after{content:none}
html:root body .art .relcard .rc-t:not(#_){flex:none;padding:14px 8px 6px!important;font-size:1.0625rem!important;line-height:1.3}
html:root body .art .relcard .rc-t::after{content:'Read \2192';display:block;margin-top:10px;font:600 var(--fs-xs)/1 var(--font-body);letter-spacing:.12em;text-transform:uppercase;color:var(--c-accent)}
@media (min-width:900px){html:root body .art .art-rel{display:grid;grid-template-columns:repeat(3,1fr);overflow:visible;margin:0;padding:0}html:root body .art .relcard{min-height:400px}}
html:root body .art .relcard .rc-t{padding:var(--sp-3) var(--sp-4) var(--sp-4);font:600 var(--fs-sm)/1.35 var(--font-body);color:var(--c-text)!important}
html:root body .art .relcard:focus-visible{outline:2px solid var(--c-accent);outline-offset:3px}
@media (hover:hover) and (prefers-reduced-motion:no-preference){html:root body .art .relcard:hover{transform:translateY(-3px)}}

/* ---- contents (built by fmh-motion.js) --------------------------------- */
html:root body .fmh-toc summary{background:var(--c-surface)!important;color:var(--c-text)!important;box-shadow:inset 0 0 0 1px var(--c-line)!important;font-family:var(--font-body)}
html:root body .fmh-toc ol{border-radius:var(--r-lg)!important;background:var(--c-surface)!important;box-shadow:inset 0 0 0 1px var(--c-line)!important}
html:root body .fmh-toc a{color:var(--c-muted)!important}
html:root body .fmh-toc a:is(:hover,:focus-visible,[aria-current],.on){color:var(--c-accent)!important;background:var(--c-surface-2)!important}

@media (prefers-reduced-motion:reduce){html:root body .art .relcard{transition:none}}

/* ---- family polish (2026-11-25): articles only. Every rule is scoped .art-main:not(.k-page), so pages rebuilt
   with the kit (class="art-main k-page") are untouched. No HTML changes. -------------------------------- */
/* gold bar above the title (the kit eyebrow bar) */
html:root body .art-main:not(.k-page) .art .art-title::before{content:"";display:block;width:44px;height:5px;margin-bottom:var(--sp-4);border-radius:3px;background:var(--c-accent)}
/* key takeaways: tan surface, dark text (--c-on-accent on --c-tan) */
html:root body .art-main:not(.k-page) .art .art-take:not(#_){background:var(--c-tan)!important;box-shadow:none!important;color:var(--c-on-accent)}
html:root body .art-main:not(.k-page) .art .art-take:not(#_) :is(h2,h3,p,li,b,strong,a){color:var(--c-on-accent)!important}
html:root body .art-main:not(.k-page) .art .art-take:not(#_) h4{background:var(--c-bg)!important;color:var(--c-accent)!important}
html:root body .art-main:not(.k-page) .art .art-take:not(#_) li::before{background:var(--c-on-accent)!important;box-shadow:none!important}
html:root body .art-main:not(.k-page) .art .art-take:not(#_) a{text-decoration:underline;text-underline-offset:3px}
/* question-and-answer runs: a heading followed by two or more consecutive <p><b>Question</b>Answer</p>
   become cards (up to seven in a run; a single bold-led paragraph is left alone) */
html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child):has(+p:not([class])>b:first-child),html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child),html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child),html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child),html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child),html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child),html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child){margin:0 0 var(--sp-2);padding:var(--sp-4) var(--sp-5);border-radius:var(--r-md);background:var(--c-surface-2);box-shadow:inset 0 0 0 1px var(--c-line)}
html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child):has(+p:not([class])>b:first-child)>b:first-child,html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)>b:first-child,html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)>b:first-child,html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)>b:first-child,html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)>b:first-child,html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)>b:first-child,html:root body .art-main:not(.k-page) .art>:is(h2,h3)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)+p:not([class]):has(>b:first-child)>b:first-child{display:block;margin-bottom:var(--sp-2);font-size:1.0625rem;line-height:1.35;color:var(--c-text)}
/* tables sit in a framed card and keep their own sideways scroll */
html:root body .art-main:not(.k-page) .art table{border-radius:var(--r-md);overflow-x:auto;box-shadow:inset 0 0 0 1px var(--c-line)}
