/* Palette Girlies, pages-live.css (V2, wave 5, nov 2026): the live parts of the content pages (makeup, style, hair, the test, the journal, about, method, the skin pages),
   markup in tools/pages_live.py. Technique of docs/web/REFERENCIA-DISENO-EU.md sections 6, 7 and 9, never its colors.
   Hidden or folded states live under html.live only (site/js/live.js sets it when motion is allowed): reduced motion, Save-Data and no JavaScript see the final state.
   Swatches stay flat and exact: every chip comes in as --c, never on a wash. */

/* ---------- the wash: a watercolor canvas behind words or pictures, never behind data ---------- */
.lv-wash { position: absolute; z-index: -1; pointer-events: none; }
.lv-host { position: relative; isolation: isolate; }
.lv-wash--hero { right: -4%; top: -6%; width: 72%; height: 112%; opacity: .55; }
.lv-wash--left { left: -12%; top: 4%; width: 70%; height: 96%; opacity: .4; }
.lv-wash--band { left: -4%; top: 30%; width: 108%; height: 60%; opacity: .4; }
.lv-wash--under { left: -8%; top: -10%; width: 116%; height: 120%; opacity: .45; }
@media (max-width: 899px) { .lv-wash--hero { right: -20%; width: 120%; height: 70%; top: 0; } }

/* ---------- a picture that runs off the page on a wide screen ---------- */
@media (min-width: 900px) {
  .lv-bleed-r { margin-right: calc(-1 * var(--gut)); }
  .lv-bleed-r img { border-radius: var(--r-sm) 0 0 var(--r-sm) !important; }
  .lv-bleed-l { margin-left: calc(-1 * var(--gut)); }
  .lv-bleed-l img { border-radius: 0 var(--r-sm) var(--r-sm) 0 !important; }
}

/* ---------- the big word: one word of the section set huge, behind or beside its headline ---------- */
.lv-word { display: block; font: italic 400 clamp(72px, 15vw, 220px)/.8 var(--serif); letter-spacing: -.03em; color: var(--berry); opacity: .14; pointer-events: none; user-select: none; }

/* ---------- the drawing: ink lines draw, then the fills arrive (tools/pages_live.py sketch) ---------- */
.sk { display: block; width: 100%; height: auto; overflow: visible; }
.live .sk .sk-l path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.live .sk .sk-p { opacity: 0; transform: translateY(6px); }
.live .sk.is-in .sk-l path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease) calc(var(--sd, 0ms) + var(--k) * 260ms); }
.live .sk.is-in .sk-p { opacity: 1; transform: none; transition: opacity .7s var(--ease) calc(var(--sd, 0ms) + var(--n) * 260ms + 700ms + var(--k) * 160ms), transform .7s var(--ease) calc(var(--sd, 0ms) + var(--n) * 260ms + 700ms + var(--k) * 160ms); }
.live .sk.is-in .sk-lines { opacity: .32; transition: opacity 1s var(--ease) calc(var(--sd, 0ms) + var(--n) * 420ms + 1200ms); }
.sk .sk-lines { opacity: .32; }
.live .sk:not(.is-in) .sk-lines { opacity: 1; }

/* ---------- the conversation: bubbles arrive one after another, with three dots before each answer ---------- */
.lv-chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lv-bub { position: relative; max-width: min(34ch, 86%); padding: 12px 16px; border-radius: 20px; font-size: var(--fs-3); line-height: 1.45; }
.lv-bub--me { justify-self: end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 6px; }
.lv-bub--them { justify-self: start; background: var(--card); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
.lv-bub--note { justify-self: center; max-width: none; padding: 2px 0; background: none; font: 600 12.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.lv-bub b { font-weight: 700; }
.lv-bub .lv-k { display: block; margin-bottom: 2px; font: 600 12.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.live .lv-chat .lv-bub { opacity: 0; transform: translateY(14px) scale(.96); transform-origin: 100% 100%; }
.live .lv-chat .lv-bub--them { transform-origin: 0 100%; }
.live .lv-chat.is-in .lv-bub { opacity: 1; transform: none; transition: opacity .45s var(--ease) calc(var(--i) * 650ms + 200ms), transform .55s var(--ease) calc(var(--i) * 650ms + 200ms); }
/* the dots: shown in the bubble's place for 700 ms before a reply from the colorist */
.live .lv-chat .lv-bub--them::before { content: ""; position: absolute; left: 0; bottom: 0; width: 58px; height: 34px; border-radius: 18px 18px 18px 6px; background:
  radial-gradient(circle 3.5px at 18px 50%, var(--graphite) 98%, transparent) , radial-gradient(circle 3.5px at 29px 50%, var(--graphite) 98%, transparent), radial-gradient(circle 3.5px at 40px 50%, var(--graphite) 98%, transparent), var(--card);
  box-shadow: inset 0 0 0 1px var(--line-2); opacity: 0; }
.live .lv-chat.is-in .lv-bub--them::before { animation: lv-dots 1s steps(1) calc(var(--i) * 650ms - 500ms) 1 both; }
@keyframes lv-dots { 0% { opacity: 1; } 99% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- paint chips dealt on the paper: flat, exact, overlapping a little ---------- */
.lv-deals { list-style: none; margin: 0; padding: 0; display: flex; }
.lv-deal { position: relative; flex: 0 0 auto; display: grid; gap: 2px; width: clamp(104px, 12vw, 148px); padding: 8px 8px 10px; margin-left: -14px; background: var(--card); border-radius: 6px;
  box-shadow: 0 1px 0 rgba(43, 34, 48, .08), 0 14px 26px -16px rgba(43, 34, 48, .55); z-index: calc(1 + var(--i)); }
.lv-deal:first-child { margin-left: 0; }
.lv-deal i { display: block; height: clamp(72px, 9vw, 112px); margin-bottom: 6px; border-radius: 3px; background: var(--c); }
.lv-deal.is-light i { box-shadow: inset 0 0 0 1px var(--line-2); }
.lv-deal b { font: 600 14px/1.2 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.lv-deal code { font: 500 12.5px/1.2 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .04em; color: var(--ink-2); }
.live .lv-deals .lv-deal { opacity: 0; transform: translate(-28px, 10px); }
.live .lv-deals.is-in .lv-deal { opacity: 1; transform: none; transition: opacity .5s var(--ease) calc(var(--i) * 120ms), transform .8s var(--ease) calc(var(--i) * 120ms); }

/* ---------- a card that turns (site/js/pages-live.js [data-flip]) ---------- */
.lv-flip { perspective: 1400px; }
.lv-flip-in { position: relative; display: grid; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.lv-flip-in > * { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lv-flip-back { transform: rotateY(180deg); }
.lv-flip.is-turned .lv-flip-in { transform: rotateY(180deg); }
html:not(.js) .lv-flip-back { display: none; }

/* ---------- a pull quote with a hand mark ---------- */
.lv-pull { margin: 0; padding: 0; border: 0; font: italic 400 clamp(28px, 3.4vw, 48px)/1.12 var(--serif); letter-spacing: -.015em; color: var(--ink); max-width: 22ch; }
.lv-pull em { color: var(--berry); }

@media (prefers-reduced-motion: reduce) {
  .lv-flip-in { transition: none; }
}

/* =====================================================================================================================================================
   The page families that use the ph-* and ft-* grammar (the test, the games, the journal, the articles, about, method, the skin pages)
   ===================================================================================================================================================== */

/* ---------- /test: the start screen is a card laid on the table, over the photograph; each new screen turns in like a card; the result turns over ---------- */
.tp-table { position: relative; isolation: isolate; }
.tp-table .tp-h1 { font-size: clamp(48px, 6.4vw, 100px); line-height: .96; max-width: 12ch; }
html:not([data-tp="run"]) .tp-table .tp-app { position: relative; z-index: 2; margin-top: var(--s3); padding: clamp(18px, 3vw, 36px); background: var(--card); border-radius: var(--r-md);
  box-shadow: 0 1px 0 rgba(43, 34, 48, .08), 0 40px 70px -40px rgba(43, 34, 48, .6); }
html:not([data-tp="run"]) .tp-table .tp-app::before { content: ""; position: absolute; left: 50%; top: -12px; width: 96px; height: 24px; margin-left: -48px; background: rgba(185, 163, 208, .6); transform: rotate(-2deg); }
@media (min-width: 900px) {
  html:not([data-tp="run"]) .tp-table .ph-hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: start; }
  html:not([data-tp="run"]) .tp-table .tp-app { margin-right: -26%; transform: rotate(-.6deg); }
  html:not([data-tp="run"]) .tp-table .tp-pic { position: sticky; top: calc(var(--hdr-h) + 24px); margin-right: calc(-1 * var(--gut)); }
  html:not([data-tp="run"]) .tp-table .tp-pic img { aspect-ratio: 4 / 5; max-height: calc(100svh - var(--hdr-h) - 48px); border-radius: var(--r-sm) 0 0 var(--r-sm); }
}
@media (prefers-reduced-motion: no-preference) {
  .live .tp-app .tp-card { animation: lv-turn-in .75s var(--ease) both; transform-origin: 0 50%; }
  .live .tp-app .tp-card--result { animation: lv-turn-over 1.2s var(--ease) both; transform-origin: 50% 50%; }
}
@keyframes lv-turn-in { from { opacity: 0; transform: perspective(1600px) rotateY(-24deg) translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes lv-turn-over { 0% { opacity: 0; transform: perspective(1600px) rotateY(-110deg) scale(.96); } 45% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.tp-drawn > li { grid-template-columns: 64px minmax(0, 1fr) !important; align-items: start; }
.tp-drawn > li > .tp-ico-draw { grid-row: 1 / span 2; width: 56px; height: 56px; }
.tp-drawn > li > p { grid-column: 2; }

/* ---------- /tests/play: three live previews, the first one large ---------- */
.lab .gm-cards.gm-cards--live { gap: var(--s3); }
.lab .gm-cards.gm-cards--live .gm-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; min-height: 260px; padding: var(--s4); border-radius: var(--r-md); background: var(--card); }
.gm-prev { position: absolute; left: var(--s4); right: var(--s4); top: var(--s4); height: 110px; display: flex; align-items: center; justify-content: center; gap: var(--s3); pointer-events: none; }
.lab .gm-cards.gm-cards--live .gm-chips { display: none; }
.lab .gm-cards.gm-cards--live .gm-card { align-content: end; padding-top: 150px; }
.lab .gm-cards.gm-cards--live .gm-card > * { grid-area: auto; grid-column: 1; }
/* warm or cool: a chip that swings between the two sides */
.gm-prev--woc b { font: 600 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.gm-flip { display: block; width: 64px; height: 84px; border-radius: 6px; background: var(--a); box-shadow: 0 0 0 4px var(--card), 0 18px 26px -16px rgba(43, 34, 48, .6); }
/* mix it: a target chip and the mix walking toward it on three rails */
.gm-target, .gm-mixer { display: block; width: 72px; height: 84px; border-radius: 6px; }
.gm-target { background: var(--c); }
.gm-mixer { background: var(--c); box-shadow: inset 0 0 0 4px var(--card); outline: 1px dashed var(--line-2); outline-offset: 4px; }
.gm-rails { display: grid; gap: 10px; width: 90px; }
.gm-rails i { position: relative; display: block; height: 2px; background: var(--line-2); }
.gm-rails i::after { content: ""; position: absolute; top: -6px; left: 70%; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
/* where your season lives: dots on a ring that turns */
.gm-prev--space { perspective: 600px; }
.gm-orbit { position: relative; width: 160px; height: 110px; transform-style: preserve-3d; transform: rotateX(64deg); }
.gm-orbit i { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: var(--c); transform: rotateZ(var(--r)) translateX(70px) rotateX(-64deg) translateY(var(--y)); }
@media (prefers-reduced-motion: no-preference) {
  .live .lab .gm-cards.gm-cards--live.is-in .gm-flip { animation: gm-swing 2.6s var(--ease) .3s 2 both; }
  .live .lab .gm-cards.gm-cards--live .gm-card:hover .gm-flip { animation: gm-swing 2.6s var(--ease) infinite; }
  .live .lab .gm-cards.gm-cards--live.is-in .gm-mixer { animation: gm-mix 3.2s var(--ease) .3s 1 both; }
  .live .lab .gm-cards.gm-cards--live .gm-card:hover .gm-mixer { animation: gm-mix 3.2s var(--ease) infinite; }
  .live .lab .gm-cards.gm-cards--live.is-in .gm-rails i::after { animation: gm-rail 3.2s var(--ease) .3s 1 both; }
  .live .lab .gm-cards.gm-cards--live .gm-rails i:nth-child(2)::after { animation-delay: .5s; }
  .live .lab .gm-cards.gm-cards--live .gm-rails i:nth-child(3)::after { animation-delay: .7s; }
  .live .lab .gm-cards.gm-cards--live.is-in .gm-orbit { animation: gm-orbit 6s linear .3s 1 both; }
  .live .lab .gm-cards.gm-cards--live .gm-card:hover .gm-orbit { animation: gm-orbit 6s linear infinite; }
}
@keyframes gm-swing { 0% { transform: translateX(0) rotate(0); background: var(--a); } 30% { transform: translateX(-46px) rotate(-8deg); background: var(--a); } 50% { transform: translateX(0) rotate(0); background: var(--b); } 80% { transform: translateX(46px) rotate(8deg); background: var(--b); } 100% { transform: none; background: var(--a); } }
@keyframes gm-mix { 0% { background: var(--a); } 50% { background: var(--b); } 100% { background: var(--c); } }
@keyframes gm-rail { from { left: 8%; } to { left: 70%; } }
@keyframes gm-orbit { from { transform: rotateX(64deg) rotateZ(0deg); } to { transform: rotateX(64deg) rotateZ(360deg); } }
@media (min-width: 900px) {
  .lab .gm-cards.gm-cards--live { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; }
  .lab .gm-cards.gm-cards--live .gm-card:first-child { grid-row: 1 / span 2; min-height: 460px; }
  .lab .gm-cards.gm-cards--live .gm-card:first-child .gm-prev { height: 240px; }
  .lab .gm-cards.gm-cards--live .gm-card:first-child { padding-top: 290px; }
  .lab .gm-cards.gm-cards--live .gm-card:first-child .gm-flip { width: 110px; height: 150px; }
}

/* ---------- every article, the journal, about, method, the skin pages: the cover runs off the page and is laid in a wash ---------- */
@media (min-width: 900px) {
  .ft-hero .ph-hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
  .ft-hero .ft-cover { margin-right: calc(-1 * var(--gut)); }
  .ft-hero .ft-cover-img, .ft-hero .ft-code { aspect-ratio: 5 / 4; border-radius: var(--r-sm) 0 0 var(--r-sm); }
  .ft-hero h1 { font-size: clamp(46px, 5.8vw, 92px); line-height: .96; }
}
/* a device, a picture or a table breaks out of the reading column on a wide screen */
@media (min-width: 1100px) {
  .ft-col > .ft-pull { margin-left: -6rem; margin-right: -2rem; max-width: none; border: 0; padding: var(--s5) 0 var(--s5) var(--s6); }
  .ft-col > .ft-pull p { font-size: clamp(34px, 3.4vw, 54px); line-height: 1.08; max-width: 24ch; }
  /* up to 10rem each side, never past the page's gutter (at 1280 the column is already 64rem and a full 10rem ran 32 px off the page) */
  .ft-col > figure, .ft-col > .art-embed-slot, .ft-col > [data-sort-undertone], .ft-col > .sort-undertone { margin-left: max(-10rem, calc((100% - 100vw) / 2 + var(--gut) + 8px)); margin-right: max(-10rem, calc((100% - 100vw) / 2 + var(--gut) + 8px)); }
}
.ft-pull { position: relative; isolation: isolate; }
.ft-pull::before { content: "\201C"; position: absolute; left: -.06em; top: -.32em; z-index: -1; font: italic 400 clamp(140px, 16vw, 260px)/1 var(--serif); color: var(--ft-a, var(--berry)); opacity: .14; }

/* ---------- the journal: one lead story, its cover running off the page with the title laid over it; then a two column spread ---------- */
.ix-lead { padding-top: var(--s5); padding-bottom: var(--s4); }
.ix-lead-grid { position: relative; display: grid; }
.ix-lead-pic { margin: 0 calc(-1 * var(--gut)); }
.ix-lead-pic img, .ix-lead-pic .ft-code { aspect-ratio: 16 / 10; border-radius: 0; }
.ix-lead-card { position: relative; z-index: 2; display: grid; gap: var(--s3); margin: -64px 0 0; padding: var(--s4) var(--s4) var(--s4) 0; background: var(--paper); border-radius: 0 var(--r-md) 0 0; }
.ix-lead-card h2 { font-size: clamp(38px, 5vw, 76px); line-height: .98; letter-spacing: -.02em; max-width: 14ch; }
.ix-lead-card h2 a { color: inherit; text-decoration: none; }
.ix-lead-card h2 a:hover { color: var(--berry); }
.ix-lead-line { max-width: 40ch; font-size: var(--fs-4); line-height: 1.45; }
.ix-list-head { display: grid; gap: var(--s3); margin-bottom: var(--s5); max-width: 760px; }
.ix-list-head h2 { font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.ix-spread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5) var(--s4); }
.ix-spread .ix-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "art tag" "art title" "art line"; align-content: start; gap: 6px var(--s3); padding: 0; color: var(--ink); text-decoration: none; }
.ix-spread .ix-tag { grid-area: tag; grid-row: auto; padding: 0; }
.ix-spread .ix-title { grid-area: title; font-size: clamp(22px, 2.2vw, 30px); }
.ix-spread .ix-line { grid-area: line; }
.ix-cover { grid-area: art; position: relative; display: block; overflow: hidden; aspect-ratio: 1; border-radius: var(--r-sm); background: var(--paper-2); }
.ix-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.ix-cover .ft-code { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; padding: 14% 10%; }
.ix-row:hover .ix-cover img { transform: scale(1.04); }
@media (min-width: 720px) {
  .ix-spread { display: block; columns: 2; column-gap: clamp(32px, 5vw, 80px); }
  .ix-spread > li { break-inside: avoid; margin-bottom: var(--s5); }
  .ix-spread .ix-item--big .ix-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "tag" "title" "line"; }
  .ix-spread .ix-item--big .ix-cover { aspect-ratio: 16 / 11; margin-bottom: var(--s2); }
  .ix-spread .ix-item--big .ix-title { font-size: clamp(28px, 2.8vw, 40px); }
}
@media (min-width: 900px) {
  .ix-lead-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .ix-lead-pic { grid-column: 2; grid-row: 1; margin: 0 calc(-1 * var(--gut)) 0 0; }
  .ix-lead-pic img, .ix-lead-pic .ft-code { aspect-ratio: 4 / 3; border-radius: var(--r-sm) 0 0 var(--r-sm); }
  .ix-lead-card { grid-column: 1 / span 1; grid-row: 1; align-self: center; margin: 0 -22% 0 0; padding: var(--s5) var(--s5) var(--s5) 0; border-radius: 0 var(--r-md) var(--r-md) 0; }
}

/* ---------- /about: her photos placed like a scrapbook letter, overlapping, in their real colors ---------- */
.ft--letter .lt-pics { position: relative; display: grid; }
.ft--letter .lt-photo { margin: 0; padding: 8px 8px 12px; background: #fff; box-shadow: 0 1px 0 rgba(43, 34, 48, .12), 0 30px 44px -28px rgba(43, 34, 48, .6); rotate: -2.2deg; }
.ft--letter .lt-photo::before { content: ""; position: absolute; left: 50%; top: -12px; width: 92px; height: 24px; margin-left: -46px; background: rgba(232, 167, 181, .62); transform: rotate(3deg); }
.ft--letter .lt-photo + .lt-photo { rotate: 2.6deg; translate: 0 18px; z-index: 2; }
.ft--letter .lt-photo + .lt-photo::before { background: rgba(185, 163, 208, .6); transform: rotate(-4deg); }
.ft--letter .lt-pair--r .lt-photo { rotate: 1.8deg; }
.ft--letter .lt-pair--r .lt-photo + .lt-photo { justify-self: start; rotate: -2.8deg; }
.ft--letter .lt-photo figcaption { font: 400 19px/1.25 var(--hand) !important; color: var(--ink) !important; letter-spacing: 0 !important; text-transform: none !important; }
.ft--letter .lt-pull { font-size: clamp(40px, 5vw, 72px); line-height: 1; }
@media (min-width: 900px) {
  .ft--letter .lt-pics { margin-inline: -6%; }
  .ft--letter .lt-pics .lt-photo { width: 76%; padding: 10px 10px 14px; }
  .ft--letter .lt-pics .lt-photo + .lt-photo { justify-self: end; margin-top: -26%; rotate: 2.6deg; translate: none; }
  .ft--letter .lt-pair--r .lt-pics .lt-photo + .lt-photo { justify-self: start; margin-top: -40%; rotate: -2.8deg; }
}

/* ---------- /method: the season color space as the device ---------- */
.lv-space { display: grid; gap: var(--s3); margin-top: var(--s6); }
.lv-space h2 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1; }
.lv-space > p:not(.label) { max-width: 52ch; font-size: var(--fs-3); line-height: 1.6; }
.lv-space .lv-space-box { margin-top: var(--s3); }
.js .lv-space-still { display: none; }
.lv-space-still { padding: var(--s4); border-radius: var(--r-md); background: var(--paper-2); font-size: var(--fs-3); }
@media (min-width: 1100px) { .ft-col > .lv-space { max-width: none !important; margin-left: -3rem; margin-right: -3rem; } }

@media (prefers-reduced-motion: reduce) {
  .ix-cover img { transition: none; }
  html:not([data-tp="run"]) .tp-table .tp-app { transform: none; }
}

@media (max-width: 899px) {
  .hr-wash, .st-wash, .mk-hero .lv-wash--hero { opacity: .26; top: -14%; }
}

/* the family word of the hubs, huge and faint behind the family name */
.sh-word, .hr-word, .mh-word { position: absolute; left: -.04em; top: calc(var(--s5) - .3em); z-index: -1; font-size: clamp(72px, 12vw, 168px); }
.mh-group { isolation: isolate; }
