/* ---------- The problems, after Qoves's "Life-changing Transformations" (the founder, 20 Nov 2026), as his pick "Five"
   (21 Nov 2026): the heading, a row of characters and a numbered list of five problems at the left, with Start my plan
   at its foot; one large before-and-after of the chosen problem's room at the right, the same room from the same
   camera, on a dark blue base with what Snuug finds and the change. Then "Studies link…" (below).

   One system (the founder, 22 Nov 2026: "more cohesive & clean ... different typographies, spacing, colours"), the
   page's own:
     type     Inter at three sizes: the heading (.val .title, as every section's), the body (--fb: the page's .lede size,
              17 to 20 px) for the lines, the card's words, the button's line and the pills; and one small label, the
              page's .label (mono, 11 px, capitals) for the numbers, Before, After and Try.
     colour   ink, one grey (--muted), the page's blue (the heading's second tone, the field behind a picture) and the
              floating bar's dark blue under the picture. The chosen character is the one colour accent.
     space    one scale: 8, 16, 24, 32 and 48 px. The heading's cap line meets the picture's top, the list starts at the
              heading's left edge, and the foot of Start my plan's line meets the card's foot.
     shape    the card's 20 px corner; pills (999 px) for the button, the labels on the picture and the phone's lines;
              circles for the characters and the seam's handle. ---------- */
.feelings { --fb: clamp(17px, 1.4vw, 20px); display: grid; gap: 24px; align-items: stretch; }
.fside { display: grid; align-content: start; gap: 32px; }
.val .title { font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -0.045em; line-height: 1.06; text-box: trim-start cap alphabetic; }

/* The list: numbered, each line in quotation marks. The number is the small label in a 24 px circle of its own; the
   chosen line's circle fills with ink (the founder, 20 Nov 2026: "make it really show that it's selected"). Every
   line keeps one box whether it is chosen or not, so choosing a line moves nothing: the founder's recording of
   22 Nov 2026 showed the list and the button jump by about 16 px, because the old disc was taller than the line's
   number and grew the chosen line. The chosen line is ink, the rest the page's light grey (--soft), as far from ink as the founder asked. */
.flist { display: grid; justify-items: start; counter-reset: feel; }
.flist button { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: baseline; padding: 8px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: var(--fb); font-weight: 400; letter-spacing: -0.015em; line-height: 1.35; color: var(--soft);
  transition: color var(--t-fast, 0.18s) var(--ease-out, ease), translate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.flist button::before { counter-increment: feel; content: counter(feel); align-self: start; display: grid; place-items: center; width: 24px; height: 24px;
  margin-top: calc((var(--fb) * 1.35 - 24px) / 2); border-radius: 50%; font: 500 11px/1 var(--mono); color: inherit; transition: background-color var(--t-fast, 0.18s), color var(--t-fast, 0.18s); }
.flist button[aria-pressed="true"]::before { background: var(--ink); color: #FFF; }
.flist q { quotes: "\201C" "\201D"; text-wrap: pretty; }
.flist button:hover { color: var(--ink); }
/* A mouse over a line nudges it forward a little, as if it leans in to be picked: `translate`, so nothing is laid out. */
@media (hover: hover) { .flist button:not([aria-pressed="true"]):hover { translate: 4px 0; } }
.flist button[aria-pressed="true"] { color: var(--ink); }

/* Five of the founder's own characters (assets/people/ch-*.webp, Ashore's portraits), overlapping as a stack of
   avatars just above the list they speak, one per line in order. No count and no claim beside them. 58 cells at 44 px
   is not a whole-number scale, so the browser's smooth downscale draws them (from 3 x nearest-neighbour files).
   feelings.js gives the chosen line's .on: it comes to the front, in colour, a little larger and lifted; the others are
   grey and faded, still recognisable. Grey is a filter, switched at once; only opacity, translate and scale move, which
   the compositor draws without painting the characters again. The lift is `translate` and `scale`, so it never fights
   the settle's `transform`: each settles into place, one after another, as the row scrolls into view (a scroll-driven
   animation: no script, no timer, nothing at rest). Reduce Motion: neither. */
.fpeople { display: flex; }
.fpeople img { position: relative; width: 44px; height: 44px; border-radius: 50%; background: rgb(var(--glow, 208 224 238)); box-shadow: 0 0 0 3px #FFF;
  filter: grayscale(1); opacity: 0.55; }
.fpeople img.on { z-index: 1; filter: none; opacity: 1; translate: 0 -3px; scale: 1.08; }
.fpeople img + img { margin-left: -10px; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .fpeople img { animation: fp-settle linear both; animation-timeline: view(); animation-range: entry 20% cover 35%; }
    .fpeople img:nth-child(2) { animation-range: entry 30% cover 38%; } .fpeople img:nth-child(3) { animation-range: entry 40% cover 41%; }
    .fpeople img:nth-child(4) { animation-range: entry 50% cover 44%; } .fpeople img:nth-child(5) { animation-range: entry 60% cover 47%; }
  }
  .fpeople img { transition: opacity 0.32s var(--ease), translate 0.32s var(--ease), scale 0.32s var(--ease); }
}
@keyframes fp-settle { from { transform: translateY(8px) scale(0.92); } }

/* The card keeps its own height (the picture at 4:3, then the words) and sits at the top of its column: where the
   left column is taller (about 900 px wide) the space falls under the card, in white, not as a dark empty slab inside
   it (22 Nov 2026). Where the card is the taller, the left column's foot meets the card's foot.
   The picture and its finding are one object: the card's dark blue base runs under the picture box, with the same
   corners and width (the founder, 21 Nov 2026: "the base of it in dark blue"). The blue is the floating bar's (front.css
   .fr-ground: --g-deep into --g-dark-solid); white reads about 10 : 1 on it. */
.fcard { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-self: start; overflow: hidden; border-radius: 20px; color: #FFF;
  background: linear-gradient(110deg, rgb(var(--g-deep, 30 38 43)) 10%, var(--g-dark-solid, #2E4252)); }

/* Before and after: the same room from the same camera, 4:3 (assets/feelings/, 1600 x 1200), so the seam shows only
   the change. Both pictures fill the box edge to edge; the seam cuts them where the line is drawn (clip-path, no layout).
   Behind them, the hero's own field (front.css .fr-bg-mist: its wash --c1 to --c2 and the light --glow): a full-frame
   picture covers it. */
.ba { position: relative; aspect-ratio: 4 / 3; --seam: 50%; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize;
  background: radial-gradient(60% 65% at 50% 48%, rgb(var(--glow, 208 224 238) / 0.7), rgb(var(--glow, 208 224 238) / 0) 75%), linear-gradient(100deg, var(--c1, #6A8BA4), var(--c2, #A8C3D7)); }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ba .after { clip-path: inset(0 0 0 var(--seam)); }
/* Clip the before too, so a picture with a clear background never shows through the other. */
.ba .before { clip-path: inset(0 calc(100% - var(--seam)) 0 0); }
/* Before and After: the page's small label on a white pill, 16 px in, over the seam line (the opening glide starts at
   88 %, where the line crossed "After"). */
.ba .chip { z-index: 1; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; background: #FFF; color: var(--ink); font: 500 11px/1 var(--mono); letter-spacing: 0.08em;
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.ba .l { left: 16px; top: 16px; } .ba .r { right: 16px; top: 16px; }
/* The seam and its knob, as in the hero: press and the knob springs up, its shadow lifts; release and it springs back.
   The seam is a layer as wide as the picture, moved by transform (a translate of its own width is the picture's width),
   with the line and the knob at its left edge: a glide or a drag then lays nothing out. Placed by `left`, both were laid
   out again on every frame (about 60 layouts a glide, measured 22 Nov 2026). */
.ba-seam { position: absolute; inset: 0; transform: translateX(var(--seam)); pointer-events: none; }
.ba-seam::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #FFF; }
.ba-knob { position: absolute; left: 0; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 7px; pointer-events: none;
  background: #FFF; box-shadow: 0 2px 4px rgb(20 20 18 / 0.08), 0 8px 20px -6px rgb(20 20 18 / 0.3);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ba-knob svg { width: 7px; height: 12px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ba:hover .ba-knob { transform: scale(1.06); }
.ba.drag { cursor: grabbing; }
.ba.drag .ba-knob { transform: scale(1.16); transition-duration: 0.35s; }
.ba:hover .ba-knob svg:first-child, .ba.drag .ba-knob svg:first-child { transform: translateX(-2px); }
.ba:hover .ba-knob svg:last-child, .ba.drag .ba-knob svg:last-child { transform: translateX(2px); }
/* The range input is for the keyboard (arrows) and screen readers only; the pointer drags the whole picture. */
.ba-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ba:has(.ba-input:focus-visible) .ba-knob { outline: 2px solid var(--ink); outline-offset: 3px; }

/* The words: what Snuug finds, then Try and the change, at one size and one weight, as a statement and its answer.
   Only the small Try sets the answer apart. */
.fbody { display: grid; align-content: start; gap: 8px; padding: 24px; }
.ff, .fx { font-size: var(--fb); font-weight: 400; letter-spacing: -0.015em; line-height: 1.35; text-wrap: pretty; }
.ftry { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: baseline; }
.ff { padding-left: 32px; }   /* the finding and the change share one left edge, the label's column before them */
.ftry .label { color: rgb(255 255 255 / 0.6); }
.fx { color: rgb(255 255 255 / 0.78); }

/* One height for the card: every problem's words lie unseen in the card's text cell (feelings.js, .fghost), so the
   cell is as tall as the longest at every width, and the card never grows or shrinks when the problem changes (BUG-354). */
.fcard > .ba { grid-area: 1 / 1; }
.fcard > .fbody { grid-area: 2 / 1; }
.fcard > .fghost { visibility: hidden; pointer-events: none; }

/* Start my plan, with its line under it. */
.fcta { display: grid; gap: 16px; justify-items: stretch; margin-top: 24px; }
.fcta .fr-btn { height: 52px; background: var(--ink); color: #FFF; font-size: 16px; }
.fcta p { font-size: var(--fb); line-height: 1.45; color: var(--muted); text-align: center; text-wrap: balance; }

/* Phones: the lines become one row of pills that scrolls sideways, right above the card, so a tap changes the card in
   view. The row runs to the screen's edges and fades there, to show that it scrolls; feelings.js keeps the chosen pill
   in view. A pill keeps one line (nowrap), so it never changes height. */
@media (max-width: 719px) {
  .feelings { --fb: 16px; gap: 16px; }
  .fside { gap: 0; }
  .fside .title { margin-bottom: 24px; }
  .fpeople { margin-bottom: 16px; }
  .fpeople img { width: 36px; height: 36px; box-shadow: 0 0 0 2px #FFF; }
  .fpeople img + img { margin-left: -8px; }
  .flist { display: flex; gap: 8px; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); }
  .flist::-webkit-scrollbar { display: none; }
  .flist button::before { display: none; }   /* the numbers are the wide list's */
  .flist button { display: inline-flex; align-items: center; flex: none; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); white-space: nowrap;
    transition: color 0.25s, background-color 0.25s; }
  .flist button[aria-pressed="true"] { background: var(--ink); color: #FFF; }
  .fbody { padding: 16px 16px 24px; }
  .ftry, .ff { padding-left: 0; }
  .ftry { grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; }
  .fcta { margin-top: 8px; }
}
/* Wider screens: the heading at the top of the left column, the characters, the list and Start my plan at its foot,
   the foot of the button's line level with the card's foot. */
@media (min-width: 720px) {
  .feelings { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: 1fr auto; column-gap: clamp(32px, 4vw, 64px); row-gap: 0; }
  .fside { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 0; }
  .fside .title { margin-bottom: 32px; }   /* at least this much air under the heading when the column is full (about 900 px wide) */
  .fpeople { margin: auto 0 16px; }
  .fcard { grid-area: 1 / 2 / 3; }
  .fcta { grid-area: 2 / 1; justify-items: start; gap: 8px; margin-top: 32px; }
  .fcta .fr-btn { height: 48px; font-size: 16px; }
  .fcta p { max-width: 24em; font-size: var(--fb); text-align: left; text-wrap: balance; }
}

/* ---------- Studies link…: the six goals as tabs (studies.js: arrows, Home and End), each over three claim cards.
   A card is one graded claim from knowledge/, said as its grade allows, with its paper at the foot. The cards stand
   in cells with hairlines between them, as Qoves's do. A card under the pointer, chosen with a tap or holding the
   keyboard's focus takes a soft Mist gradient, after Qoves's chosen card, with white words; only its opacity
   changes, so nothing is laid out again. ---------- */
.studies .title { max-width: 17em; font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -0.045em; line-height: 1.06; }
.st-tabs { display: flex; width: fit-content; max-width: 100%; gap: 2px; margin-top: var(--head); padding: 5px; border: 1px solid var(--line); border-radius: 999px; }
.st-tabs button { flex: none; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 15.5px; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  transition: color 0.2s, background-color 0.25s; }
.st-tabs button:hover { color: var(--ink); }
.st-tabs button[aria-selected="true"] { background: #1E272C; color: #FFF; }
.st-tabs button:focus-visible { outline-offset: 1px; border-radius: 999px; }
.st-panel { display: grid; margin-top: clamp(32px, 3.4vw, 48px); border-block: 1px solid var(--line); }
.st-panel[hidden] { display: none; }
.st-panel:focus-visible { outline-offset: 6px; }
.claim { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: clamp(260px, 24vw, 340px); padding: calc(var(--ci) + 26px) calc(var(--ci) + 26px) calc(var(--ci) + 24px); --ci: clamp(12px, 1.4vw, 20px); cursor: default; }
/* The card's face (::before) and its chosen look (::after), inset in the cell. */
.claim::before, .claim::after { content: ""; position: absolute; z-index: -1; inset: var(--ci); border-radius: 18px; pointer-events: none; }
.claim::before { background: #F8F9F9; box-shadow: inset 0 0 0 1px #ECEEEE; }
.claim::after { opacity: 0; transition: opacity 0.45s var(--ease);
  background: radial-gradient(46% 38% at 54% 46%, rgb(176 150 140 / 0.55), rgb(176 150 140 / 0) 100%),
    radial-gradient(70% 50% at 24% 92%, rgb(44 62 78 / 0.7), rgb(44 62 78 / 0) 100%),
    radial-gradient(60% 50% at 88% 12%, rgb(208 224 238 / 0.55), rgb(208 224 238 / 0) 100%),
    linear-gradient(165deg, #8DA6B7 0%, #6A8BA4 38%, #4B6478 72%, #34495A 100%);
  box-shadow: 0 30px 50px -28px rgb(30 38 43 / 0.55); }
.claim h3 { font-size: clamp(24px, 2.1vw, 30px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.15; color: #1E272C; transition: color 0.3s; }
.claim h3 .soft { color: #93A0A8; transition: color 0.3s; }
.claim p { margin-top: 16px; max-width: 26em; font-size: 16px; line-height: 1.45; color: #2E383D; text-wrap: pretty; transition: color 0.3s; }
.claim .src { display: block; margin-top: auto; padding-top: 28px; font-size: 13px; line-height: 1.45; color: #7D888E; text-decoration: none; transition: color 0.3s; }
.claim .src i { font-style: normal; }
.claim .src svg { display: block; width: 12px; height: 14px; margin-bottom: 12px; }
.claim .src:hover { text-decoration: underline; text-underline-offset: 3px; }
.claim .src:focus-visible { outline: 0; }
@media (hover: hover) { .claim:hover::after { opacity: 1; } .claim:hover :is(h3, p) { color: #FFF; } .claim:hover h3 .soft { color: rgb(255 255 255 / 0.62); } .claim:hover .src { color: rgb(255 255 255 / 0.72); } }
.claim.on::after, .claim:focus-within::after { opacity: 1; }
.claim:is(.on, :focus-within) :is(h3, p) { color: #FFF; }
.claim:is(.on, :focus-within) h3 .soft { color: rgb(255 255 255 / 0.62); }
.claim:is(.on, :focus-within) .src { color: rgb(255 255 255 / 0.72); }
.claim:has(.src:focus-visible)::after { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (min-width: 900px) {
  .st-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .claim + .claim { border-left: 1px solid var(--line); }
}
/* A phone: the tabs are one row that scrolls sideways (it fades at the edges); the cards stack. */
@media (max-width: 899px) {
  .claim + .claim { border-top: 1px solid var(--line); }
  .claim { min-height: 0; --ci: 0px; padding: 26px 22px 22px; margin-block: 12px; }
}
/* ---------- BUG-2491: the selected goal's picture from the iPhone app (goal-tile.js) and its crop in the selected tab
   (the founder, 21 Nov 2026). Only with data-goals="on" (the build has the pictures): otherwise the box is not drawn and
   the section is as it was. The box is in the first layout, so nothing moves when the picture arrives. A cell of the
   app's 170 x 128 is a whole number of device pixels where it can be (3 at 2x on a laptop, 2 at 3x on a phone), drawn
   nearest-neighbour. On a laptop the tile fills the heading's empty right, from the heading's top to the tabs' foot, its
   right edge on the third card's. Below 1170 px the tile would come within 48 px of the tabs' end, so there it leads the
   section, above the heading, on its left edge, and as far above it as the tabs are below (--head, to the baseline). Only opacity and transform animate. */
.st-pic { display: none; }
.studies[data-goals="on"] .st-pic { display: block; position: relative; width: calc(170px * var(--k)); aspect-ratio: 170 / 128; margin-bottom: var(--head);
  --k: 1; border-radius: 18px; overflow: hidden; background: #F8F9F9; box-shadow: inset 0 0 0 1px #ECEEEE; }
.studies .st-pic canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.studies .st-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06); pointer-events: none; }
@media (max-width: 719px) {
  .studies[data-goals="on"] .st-pic { --k: 0.75; }
}
@media (max-width: 719px) and (min-resolution: 3dppx) { .studies[data-goals="on"] .st-pic { --k: calc(2 / 3); } }
@media (min-width: 1170px) {
  .studies[data-goals="on"] .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; }
  .studies[data-goals="on"] .wrap > :not(.st-pic) { grid-column: 1 / -1; }
  .studies[data-goals="on"] .wrap > .title, .studies[data-goals="on"] .wrap > .st-tabs { grid-column: 1; }
  /* The head block's height, so the tile spans it exactly (the founder, 21 Nov 2026: it hung below the heading's top):
     its top on the heading's first line's ink (0.16 em under the line box at line-height 1.06), its foot on the tabs'
     foot. The heading is two lines here (17 em wide), its gap --head, the tab row 56 px. A cell is then 1.5 to 1.6 px,
     3 or 4 device pixels at 2x, still drawn nearest-neighbour. */
  .studies[data-goals="on"] .st-pic { --fs: clamp(34px, 3.6vw, 52px); --k: calc((1.96 * var(--fs) + var(--head) + 56px) / 128px);
    width: calc((1.96 * var(--fs) + var(--head) + 56px) * 170 / 128);
    grid-column: 2; grid-row: 1 / 3; align-self: end; margin: 0 calc(clamp(12px, 1.4vw, 20px) - 32px) 0 0; }
}
/* The selected tab: a crop of its goal's still under a scrim of the goal's darkest ink, as strong as the white word needs
   for 4.5 to 1 on the lightest ink (goal-tile.js sets --pill and --scrim). It fades in over the ink pill; a tab left
   fades out. --pk: the crop's cell, 3 device pixels at 2x, 4 at 3x. */
.studies[data-goals="on"] .st-tabs button { position: relative; isolation: isolate; --pk: 1.5px; }
@media (min-resolution: 3dppx) { .studies[data-goals="on"] .st-tabs button { --pk: calc(4px / 3); } }
.studies[data-goals="on"] .st-tabs button[aria-selected="true"] { transition: none; }
.studies[data-goals="on"] .st-tabs button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; pointer-events: none;
  background: linear-gradient(var(--scrim, transparent), var(--scrim, transparent)), var(--pill, none) var(--pos, 50% 50%) / calc(170 * var(--pk)) auto no-repeat;
  image-rendering: pixelated; transition: opacity 0.3s var(--ease); }
.studies[data-goals="on"] .st-tabs button.pic[aria-selected="true"]::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .studies[data-goals="on"] .st-tabs button::before { transition: none; } }

@media (max-width: 719px) {
  .st-tabs { width: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter); border: 0; border-radius: 0; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); }
  .st-tabs::-webkit-scrollbar { display: none; }
  .st-tabs button { background: var(--surface); }
  .st-panel { margin-top: 20px; }
}
