/* ---------------------------------------------------------------------------
   app.css: behaviour layer for the Casa replica.

   assets/css/casa.css is Casa's own compiled stylesheet (their Tailwind build
   plus CSS modules) and carries the entire design system. Nothing in there is
   modified.

   This file only re-creates the handful of states that the real site applies
   from JavaScript at runtime, so the static copy behaves identically.

   NOTE: every pixel length written in this file is re-declared, scaled, by
   assets/css/scale.css. Change one here and re-run
   `npx tsx scripts/landing-v3-scale.ts`, or the generated override keeps
   serving the old number.

   AND EVERY PALETTE COLOUR HERE IS WRITTEN AS `var(--casa-<token>, <literal>)`,
   not as the literal. The hex is Casa's original, kept as the fallback so this
   file still says which token it meant; the value that paints comes from
   theme-bridge.css's `:root`, which is Casa's palette with the brand override in
   `scripts/landing-v3-brand.ts` applied. A literal written bare here is a
   section that stays behind when the brand moves, which is how the page ends up
   in two colour schemes at once, most of it retinted and the hand-written
   sections still olive. Alpha variants use `color-mix(… , transparent)` for the
   same reason, and the two `:hover` lifts are mixed FROM the token rather than
   picked beside it.
   --------------------------------------------------------------------------- */

/* The page's size ---------------------------------------------------------
   Casa's build has `--spacing: 1px`, so every size on this page (type,
   gutters, card padding, icon boxes, max-widths, radii) is a raw pixel
   literal in a utility class. There is no base unit to turn down, and the
   usual shortcuts do not survive contact with this layout: `zoom` scales the
   content but not the viewport it is measured against, so the page renders
   short of the right edge; `transform: scale()` leaves the taller page's
   scroll height behind.

   So scale.css re-declares every length-bearing rule in casa.css and app.css
   with its pixel literals multiplied by this number. Viewport units,
   breakpoints and border widths are deliberately left out of it: the hero
   stays exactly one screen tall, three columns still arrive at 800px, and a
   hairline stays a hairline.

   Three values rather than one because the crowding is not the same at every
   width: a phone is short of room and loses least by shrinking, a large
   desktop had the most air to begin with. Turn these; nothing else. */
:root { --v3-scale: .94; }
@media (min-width: 800px)  { :root { --v3-scale: .92; } }
@media (min-width: 1200px) { :root { --v3-scale: .90; } }

/* Rotating text ("Lewis can you …") ---------------------------------------- */
.rotating-text-track { transition: transform 650ms cubic-bezier(0.25, 1, 0.5, 1); }

/* The hero's "Built for" pill ----------------------------------------------
   The slot is as wide as the widest audience (app.js), so a shorter one sat
   flush left with a gap before the arrow. Centred, every word sits in the
   middle of the same slot.

   And the three pieces of text share ONE baseline. They are three fonts at two
   sizes, each centred by its line box, and a line box puts the baseline wherever
   that font's ascent and descent say: measured at 3x, the uppercase label sat on
   102.0, the audience on 103.0 and the serif link on 103.7, so the lowercase
   read as dropped below the label beside it. The nudges lift both onto the
   label's baseline, which is also the one that puts the lowercase x-height on
   the pill's centre line (98.8). In em, because the gap is a property of the
   fonts and scales with them, at every breakpoint and every --v3-scale. */
[data-audience-item] { justify-content: center; }
[data-audience-ticker] { top: -0.08em; }
[data-audience-pill] .font-serif { position: relative; top: -0.13em; }

/* FAQ accordion ------------------------------------------------------------ */
.faq-panel { transition: height 450ms cubic-bezier(0.25, 1, 0.5, 1), opacity 450ms cubic-bezier(0.25, 1, 0.5, 1); }
.faq-icon  { transition: transform 450ms cubic-bezier(0.25, 1, 0.5, 1); }
.faq-panel a { text-decoration: underline; text-underline-offset: 2px; }

/* Header dropdown ---------------------------------------------------------- */
.header-dropdown { transition: opacity 275ms cubic-bezier(0.25, 1, 0.5, 1), clip-path 275ms cubic-bezier(0.25, 1, 0.5, 1); }

/* Lead sorter -------------------------------------------------------------
   The stacked cards in "Every draft, held for you" used to be one flat webp of
   Casa's own maintenance tasks. They are real elements now so the pile can
   actually sort itself, which is the claim the section is making.

   Geometry and state only. Every colour and radius below is a casa.css token
   (off-white-01/02/04, green-02/04, rounded-24), so the cards read as the same
   furniture as the benefit cards further down rather than as a widget that
   wandered in. The two states differ by TRANSFORM alone: same five nodes,
   never two drawings that have to be kept in step.

   The card type scales with the CARD, not the viewport: the box is a fixed
   ratio whatever the column does, so container units are the only honest
   choice.

   ONE RHYTHM, and it is the fix for what shipped before it. The ranked slots
   used to be five hand-written `--sy` values in the markup while the card's
   height came from its own contents, so the two could disagree, and they did:
   the slot pitch was 13.2cqh and the card was 16.8cqh, which put every card a
   fifth of its height under the next one. What that looks like is not "a
   pile": it is five rows with their bottom corners sliced off, no gap between
   them, and the last one tucked under the button. The card's height is now
   declared, both states are derived from it, and a slot too small for its card
   is no longer expressible. */
[data-sorter] {
  container-type: size;
  /* The box owns its own ratio rather than carrying `aspect-5/6` in the markup,
     because it is not one ratio. On a phone the box is as wide as the screen
     and portrait is the only way five rows fit; beside a column of copy it was
     626px of box against 380px of text, which is the section reading tall for
     no reason. Square there. */
  aspect-ratio: 5 / 6;
  /* The three numbers the ranked state is made of. */
  --row: 11.4cqh;
  --row-gap: 2.2cqh;
  --stack-top: 16.5cqh;
  /* …and the two the pile is. Tighter pitch, so it reads as a heap of paper
     rather than a list that has been nudged. */
  --pile-top: 28cqh;
  --pile-pitch: 7.5cqh;
}
@media (min-width: 1000px) { [data-sorter] { aspect-ratio: 1 / 1; } }
.sorter-stack { position: absolute; inset: 0; z-index: 1; }

.sorter-card {
  position: absolute;
  left: 7cqw; right: 7cqw;
  top: 0;
  height: var(--row);
  display: flex; align-items: center; gap: 3.5cqw;
  padding: 0 4cqw;
  background: #fff;
  /* Proportional, because the card is. A fixed 24px corner is Casa's rounded-24
     on a 105px card and a pill on the 46px one the same box produces in a
     narrow column: the radius has to know how tall the thing is. */
  border-radius: calc(var(--row) * .23);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 30px rgba(0,0,0,.08);
  /* Both states, from --i alone. --my is still measured FROM the ranked slot,
     so the pile follows the list rather than being kept in step by hand. */
  --sy: calc(var(--stack-top) + var(--i) * (var(--row) + var(--row-gap)));
  --my: calc(var(--pile-top) + var(--i) * var(--pile-pitch) - var(--sy));
  transform: translate(var(--mx), calc(var(--sy) + var(--my))) rotate(var(--mr));
  transition: transform 760ms cubic-bezier(.22,.61,.36,1), opacity 420ms ease;
  transition-delay: calc(var(--i) * 70ms);
  will-change: transform;
}
/* Later cards sit on top in the pile and underneath once ranked, so the stack
   reads as a pile one way and a list the other. */
.sorter-card:nth-child(1) { z-index: 5 } .sorter-card:nth-child(2) { z-index: 4 }
.sorter-card:nth-child(3) { z-index: 3 } .sorter-card:nth-child(4) { z-index: 2 }
.sorter-card:nth-child(5) { z-index: 1 }

[data-sorter][data-sorted="true"] .sorter-card { transform: translate(0, var(--sy)) rotate(0deg); }
/* Not a rejection: it is the one the product declines to text, and saying so
   quietly is the point. */
[data-sorter][data-sorted="true"] .sorter-card[data-skip] { opacity: .45; }

/* Sized off the ROW, not the box width: the row is the thing it has to sit
   inside, and keying it to cqw is how it used to grow past its own card. */
.sorter-card__av {
  height: 62%; width: auto; aspect-ratio: 1; flex: none;
  border-radius: 24%;                       /* the same corner as the card */
  display: grid; place-items: center;
  font-size: clamp(10px, 2.6cqw, 14px); font-weight: 500; letter-spacing: 0;
}
.sorter-card__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* text-label-medium / text-body-small, at the scale the card can carry. */
.sorter-card__who b {
  font-size: clamp(13px, 3.1cqw, 17px); font-weight: 500;
  line-height: 125%; letter-spacing: 0;
}
.sorter-card__who i {
  font-style: normal; font-size: clamp(10px, 2.3cqw, 13px);
  line-height: 140%; letter-spacing: .02em; color: #8e8f84;   /* off-white-04 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* The rank only exists after he has ranked them. */
.sorter-card__rank {
  flex: none; height: 38%; width: auto; aspect-ratio: 1;
  border-radius: 999px; display: grid; place-items: center;
  background: var(--casa-green-02, #f0f3a2); color: var(--casa-green-04, #444835);      /* green-02 on green-04 */
  font-size: clamp(10px, 2.3cqw, 13px); font-weight: 500;
  opacity: 0; transform: scale(.5);
  transition: opacity 300ms ease, transform 300ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(340ms + var(--i) * 70ms);
}
[data-sorter][data-sorted="true"] .sorter-card__rank { opacity: 1; transform: none; }
[data-sorter][data-sorted="true"] .sorter-card[data-skip] .sorter-card__rank {
  background: #ebebe4; color: #8e8f84;      /* off-white-02 / -04 */
}

/* The count, in the eyebrow chip the rest of the page uses. */
.sorter-pill {
  position: absolute; left: 50%; top: 5cqh; transform: translateX(-50%);
  z-index: 6; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 6px;   /* rounded-6, like .text-eyebrow chips */
  background: var(--casa-green-01, #fbfbe3); color: var(--casa-green-04, #444835);      /* green-01 / green-04 */
  font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
  white-space: nowrap;
}
.sorter-pill__dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .5; }

/* Always visible, and it is the only control in the box: the state it puts you
   in is the whole point of the section, so hiding it after one press would make
   the pile a thing you saw once. It toggles instead. */
.sorter-go {
  position: absolute; left: 50%; bottom: 5cqh; transform: translateX(-50%);
  z-index: 6; height: 48px; padding: 0 24px;
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; border-radius: 999px;
  background: var(--casa-green-04, #444835); color: #f8f8f1;      /* green-04 / off-white-01 */
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: .02em;
  cursor: pointer; white-space: nowrap;
  transition: background-color 275ms cubic-bezier(.25,1,.5,1), color 275ms cubic-bezier(.25,1,.5,1);
}
.sorter-go:hover { background: color-mix(in oklab, var(--casa-green-04, #444835) 88%, var(--casa-off-white-01, #f8f8f1)); }
.sorter-go__ico { transition: transform 620ms cubic-bezier(.22,.61,.36,1); }
/* Once ranked it becomes the way back, and looks like the page's outline button. */
[data-sorter][data-sorted="true"] .sorter-go {
  background: #ebebe4; color: var(--casa-green-04, #444835);      /* off-white-02 */
}
[data-sorter][data-sorted="true"] .sorter-go:hover { background: #c7c7bd; }
[data-sorter][data-sorted="true"] .sorter-go__ico { transform: rotate(-180deg); }

/* Somebody who cannot see the motion still gets both states, just instantly. */
@media (prefers-reduced-motion: reduce) {
  .sorter-card, .sorter-card__rank, .sorter-go__ico { transition-duration: 1ms; transition-delay: 0ms; }
}

/* Hero thread -------------------------------------------------------------
   A three-beat exchange under the headline, built out of the .im-* kit above
   so it is a real iMessage bubble rather than a brand-coloured lozenge: same
   17pt on 21.5pt, same 18pt corner, same tail. It sits on a video, which is
   exactly why the tail had to become a mask.

   Pure CSS. A JS loop would be three lines of state for something with none,
   and it would need tearing down when the hero leaves the viewport. */
.hero-thread {
  display: flex; flex-direction: column; gap: 3px;
  width: min(360px, 82vw); margin-top: 6px;
}
.hero-thread .im-row { animation: heroBeat 18s cubic-bezier(.22,.61,.36,1) infinite; opacity: 0; }
.hero-thread .im-row { animation-delay: calc(var(--n) * .95s); }
.hero-thread .im-row.turn { margin-top: 7px; }
/* Slightly translucent so the painting behind still reads, without giving up
   the grey: a fully opaque chip on a hero looks pasted on. */
.hero-thread .im-b--in { background-color: rgba(233,233,235,.94); }

/* Appear, hold most of the cycle, leave. The hold is what makes it readable: a
   bubble that fades the moment it lands is decoration.

   THE HOLD IS ARITHMETIC, not taste, and every bubble added has to redo it.
   Every row runs the same keyframes on its own clock, offset by `--n`, so the
   last row's exit finishes at `(n * delay) + (exit% * duration)` and the first
   row's next entry begins at `duration`. With three rows the old 11s/1.35s pair
   left 0.3s of slack; a fourth pushed the last exit 1.6s PAST the restart, so
   for a second every cycle the panel showed bubble one and bubble four with two
   blank gaps between them. There are SIX now (the exchange runs all the way to
   the send, which is the product's actual loop), and six will not fit a 13s
   cycle at any hold worth reading: the stagger alone is 5s, so `exit%` would
   have to drop under 62% and the first bubble would be gone before the last
   arrived. The cycle is 18s and the delay .95s, which puts the last exit at
   5 x .95 + .73 x 18 = 17.89 against 18 — inside a crossfade, the same margin
   the four-bubble version had. A seventh needs this done again. */
@keyframes heroBeat {
  0%   { opacity: 0; transform: translateY(9px) scale(.94); }
  4%   { opacity: 1; transform: none; }
  67%  { opacity: 1; transform: none; }
  73%  { opacity: 0; transform: translateY(-5px) scale(.98); }
  100% { opacity: 0; transform: translateY(9px) scale(.94); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-thread .im-row { animation: none; opacity: 1; }
}
/* SIX BUBBLES COST 115px, AND MOST LAPTOPS DO NOT HAVE IT. The exchange runs
   all the way to the send because that is the loop the product actually
   performs, but the hero's "try it on your list" pill is anchored to the bottom
   edge while the stack is centred, so the two close on each other at half the
   rate the window shrinks: 32px of clearance at 880 tall, 12px at 840, and an
   overlap by 800 — which is an ordinary 13" laptop with a browser's chrome on
   it. So the SEND EXCHANGE is what a short window loses, not the whole motif:
   four bubbles is the version that already fit down to 700, and the ask ("who's
   next?", answered with a name and a draft) survives without it. The four-row
   clock comes back with it, because 18s paced for six leaves two seconds of
   blank hero every cycle with four. 3 x 1.15 + .73 x 13 = 12.94 against 13s. */
@media (max-height: 869px) {
  .hero-thread .im-row:nth-child(n+5) { display: none; }
  .hero-thread .im-row { animation-duration: 13s; animation-delay: calc(var(--n) * 1.15s); }
}
/* The hero is tight on a short laptop; the motif is the first thing to go. */
@media (max-height: 700px), (max-width: 480px) { .hero-thread { display: none; } }

/* iMessage kit ------------------------------------------------------------
   One implementation of the bubble, used by the hero motif and the copilot
   thread. Everything here is Apple's geometry rather than this brand's (17pt
   body on 21.5pt, an 18pt corner, a 262pt max width) because a bubble that
   splits the difference with the design system reads as neither.

   THE TAIL IS A MASK, and that is the load-bearing part. The usual CSS trick
   draws it as a coloured square with one rounded corner plus a
   BACKGROUND-COLOURED square notched over its outer half, which needs to know
   what is behind it, so it cannot go on a video, a photograph or a gradient.
   The same silhouette as an SVG <mask> (white outer, black cutout, true
   subtraction) composites over anything. (evenodd is NOT a substitute: it is
   XOR, so the cutout's overhang survives as a sliver down the bubble's side.) */
.im-b {
  position: relative;
  max-width: 262px;
  padding: 8.5px 13.5px 9.5px;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 21.5px; letter-spacing: -.022em;
  text-align: left; word-break: break-word;
  -webkit-font-smoothing: antialiased;
}
.im-b::after {
  content: ""; position: absolute; bottom: 0;
  width: 16px; height: 15px;
  background-color: inherit;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;   mask-size: 100% 100%;
}
.im-b--in  { background-color: #E9E9EB; color: #000; }
.im-b--out { background-color: #248BF5; color: #fff; }
.im-b--in::after  { left: -7px;  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='0' y='0' width='16' height='15'%3E%3Cpath fill='%23fff' d='M2,0 H16 V4 A11,11 0 0 1 5,15 H2 Z'/%3E%3Cpath fill='%23000' d='M0,0 H7 V8 A7,7 0 0 1 0,15 H0 Z'/%3E%3C/mask%3E%3Crect width='16' height='15' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E");  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='0' y='0' width='16' height='15'%3E%3Cpath fill='%23fff' d='M2,0 H16 V4 A11,11 0 0 1 5,15 H2 Z'/%3E%3Cpath fill='%23000' d='M0,0 H7 V8 A7,7 0 0 1 0,15 H0 Z'/%3E%3C/mask%3E%3Crect width='16' height='15' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E"); }
.im-b--out::after { right: -7px; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='0' y='0' width='16' height='15'%3E%3Cpath fill='%23fff' d='M14,0 H0 V4 A11,11 0 0 0 11,15 H14 Z'/%3E%3Cpath fill='%23000' d='M16,0 H9 V8 A7,7 0 0 0 16,15 H16 Z'/%3E%3C/mask%3E%3Crect width='16' height='15' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cmask id='m' maskUnits='userSpaceOnUse' x='0' y='0' width='16' height='15'%3E%3Cpath fill='%23fff' d='M14,0 H0 V4 A11,11 0 0 0 11,15 H14 Z'/%3E%3Cpath fill='%23000' d='M16,0 H9 V8 A7,7 0 0 0 16,15 H16 Z'/%3E%3C/mask%3E%3Crect width='16' height='15' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E"); }

/* A run of bubbles from one side is tight; a change of speaker is not. */
.im-thread { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.im-row { display: flex; width: 100%; }
.im-row--out { justify-content: flex-end; }
.im-row + .im-row.turn { margin-top: 6px; }

/* ONLY THE LAST BUBBLE OF A RUN GETS A TAIL. iOS gives a tail to the final
   message from a speaker and leaves the ones above it plain, which is why a
   run reads as one utterance broken up rather than as three separate texts.
   `.turn` marks a change of speaker, so a row whose NEXT sibling is not a turn
   is mid-run. The typing row is excluded: it is not a message, and counting it
   would strip the tail off the last real bubble every time it appeared. */
.im-row:has(+ .im-row:not(.turn):not([data-typing])) .im-b::after { display: none; }

/* The date marker, in iOS's own secondaryLabel. */
.im-meta {
  align-self: center; padding: 2px 0 6px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 12.5px; line-height: 15.5px; letter-spacing: -.01em; color: #8E8E93;
}
.im-meta b { font-weight: 600; }

/* Three dots in the bubble iOS gives them, with the detached double tail. */
.im-typing {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  background: #E9E9EB; border-radius: 17px; padding: 11px 15px;
}
.im-typing i {
  width: 8.5px; height: 8.5px; border-radius: 999px; background: #9E9EA3;
  animation: imDot 1.15s infinite ease-in-out;
}
.im-typing i:nth-child(2) { animation-delay: .18s }
.im-typing i:nth-child(3) { animation-delay: .36s }
.im-typing::before, .im-typing::after {
  content: ""; position: absolute; border-radius: 999px; background: #E9E9EB;
}
.im-typing::before { left: -1px; bottom: -1.5px; width: 10px; height: 10px; }
.im-typing::after  { left: -6px; bottom: -6px;   width: 5px;  height: 5px; }
@keyframes imDot {
  0%, 60%, 100% { opacity: .38; transform: translateY(0) }
  30%           { opacity: 1;   transform: translateY(-8%) }
}
@media (prefers-reduced-motion: reduce) { .im-typing i { animation: none; opacity: .55 } }

/* Copilot thread ----------------------------------------------------------
   The section's picture used to be a flat webp of Casa's own support chat
   ("my laundry washer is showing error OE"). It is a real thread now, in the
   .im-* kit, showing the thing the heading claims: a permission granted in one
   sentence, work happening without you, and an escalation that carries a FACT
   the lead said rather than a status line.

   Bubbles are laid out bottom-up so the thread grows off the composer edge the
   way a real one does: a thread that fills from the top reads as a transcript. */
[data-copilot] { container-type: inline-size; }
.cp-thread {
  position: absolute; left: 7cqw; right: 7cqw; bottom: 7cqw;
  /* No gap: a collapsed row must contribute NOTHING, and flex gap is applied
     between items regardless of their height. The spacing rides on --h. */
  gap: 0;
}
.cp-thread .im-b { font-size: clamp(12px, 3.15cqw, 17px); line-height: 1.29; max-width: 84%; }
/*
  A message ARRIVES: the row grows from zero height and everything above it
  rises, because the thread is anchored to its bottom edge. That rise is the
  whole tell: a bubble that merely fades in where it was always going to sit
  reads as a slide, not as a conversation.

  The height is measured in JS and written to --h rather than animated to
  `auto` (which does not interpolate) or clamped with max-height (which makes
  the easing arrive early and then wait). Overflow stays VISIBLE throughout: the
  tail hangs 7px outside the bubble, so anything that clips would clip it off.
*/
.cp-thread .im-row {
  height: 0;
  overflow: visible;
  transition: height .46s cubic-bezier(.22,.61,.36,1);
}
.cp-thread .im-row > .im-b,
.cp-thread .im-row > .im-typing {
  opacity: 0;
  transform: translateY(8px) scale(.94);
  transform-origin: left bottom;
  transition: opacity .26s ease, transform .4s cubic-bezier(.22,.61,.36,1);
}
.cp-thread .im-row--out > .im-b { transform-origin: right bottom; }
.cp-thread .im-row.is-in { height: var(--h, auto); }
.cp-thread .im-row.is-in > .im-b,
.cp-thread .im-row.is-in > .im-typing { opacity: 1; transform: none; }
/* The typing row is measured the same way but is shown and hidden by the
   driver rather than by the sequence, so it carries its own flag. */
.cp-thread .im-row[data-typing] { transition: height .3s cubic-bezier(.22,.61,.36,1); }
.cp-typing-row .im-typing { transform: scale(clamp(.68, .062cqw + .55, 1)); transform-origin: left bottom; }

/* Says which mode you are in, in the eyebrow chip the page already uses. */
.cp-head {
  position: absolute; left: 7cqw; top: 6cqw; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 6px;
  background: var(--casa-green-01, #fbfbe3); color: var(--casa-green-04, #444835);
  font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
}
.cp-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; animation: cpPulse 2s ease-in-out infinite; }
@keyframes cpPulse { 0%,100% { opacity: .35 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .cp-dot { animation: none; opacity: .7 } }

/* Tab rule on the top edge ------------------------------------------------
   casa.css is a COMPILED Tailwind build: only the utilities Casa's own pages
   actually used are in it. `border-b-2` is there because the engine tabs used
   it; `border-t-2` is not, so moving the rule to the top edge silently dropped
   the line and the active bar with it. Declared here rather than reverting,
   with the same shape the compiled `.border-b-2` has. */
.border-t-2 { border-top-style: var(--tw-border-style); border-top-width: 2px; }

/* Engine tab panels -------------------------------------------------------
   Six of the seven were Casa's own interior photography, which said nothing
   about what the tab above them names. They are product views now: every one
   shows the thing its icon claims, using the same tokens as the rest of the
   page (off-white-01/02/04, green, clay, blue, rounded-32) and the .im-* kit
   for anything that is actually a message.

   Fixed 16:9 like the photo they replaced, so switching tabs never reflows the
   section. Type scales with the CARD, not the viewport, for the same reason the
   lead sorter does: the box is a fixed ratio whatever the column is doing. */
.pv { container-type: size; background: #f8f8f1; }
/* 16:9 is a photo's ratio and these stopped being photos. At 337px of column
   it buys 190px of height while the panels need 203-251px once the type hits
   its 12px floor (2.35cqw is ~8px at this width), so six of the seven had
   their last row sliced off by the overflow clip above. `!important` because
   the ratio is an INLINE style on each panel, which no stylesheet rule beats.

   These are the `.pv--auto` declarations, which already exist a few hundred
   lines down for the single panels on the benefit pages: same problem, same
   answer, and the long comment there explains why `container-type` has to
   become `inline-size` and why every cqh underneath is restated in pixels.
   They are repeated rather than shared because the two cases are selected by
   a class and by a media query, and CSS cannot put those in one rule. EDIT
   BOTH. No ratio is guessed here, so no content length can clip again.

   Tabs still do not reflow the section: all seven panels are in one
   `grid-contain` cell whatever their height, so the cell is always the
   tallest of them and switching only changes which one is opaque. */
@media (max-width: 767px) {
  .pv { aspect-ratio: auto !important; container-type: inline-size; }
  .pv .pv-pad { position: static; padding: 30px 26px; gap: 12px; }
  .pv .pv-rows { gap: 12px; }
  .pv .pv-row { padding: 16px 18px; }
  .pv .pv-foot { margin-top: 10px; padding-inline: 0; }
  .pv .pv-half { gap: 10px; }
  .pv .pv-price { padding: 16px 18px; }
  .pv .pv-log-head, .pv .pv-log-row { padding: 11px 0; }
}
.pv-pad {
  position: absolute; inset: 0;
  padding: 7cqh 6cqw;
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.6cqh;
  font-size: clamp(12px, 2.35cqw, 19px);
  /* The section is text-center; a panel is a laid-out thing, not a caption. */
  text-align: left;
}
.pv-rows { gap: 1.6cqh; }

/* Each row is a surface, so the verdict chips read as labels ON something
   rather than as three coloured words floating beside three sentences. */
.pv-row {
  display: flex; align-items: center; gap: 1.8cqw; min-width: 0;
  background: #fff; border-radius: 14px; padding: 2.6cqh 2.4cqw;
}
.pv-row--dead { opacity: .55; }
.pv-line { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-line em { font-style: normal; color: #8e8f84; }

/* The three verdicts, in three families the design system already has, except OK
   reads from `positive` rather than from the brand, because "it went out" is a
   state. On an olive brand the two were the same colour by coincidence, and the
   coincidence broke the first time the brand moved: at brick the tint landed
   next to `clay-01` and OK and BLOCKED stopped being two chips. `positive` is a
   colour the brand cannot move, which is the property this row needs. Same call
   as `.ft-verdict--supp`. */
.pv-chip {
  flex: none; padding: .55em .9em; border-radius: 6px;
  font-size: .8em; font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
  background: #ebebe4; color: #8e8f84;
}
.pv-chip--ok    { background: color-mix(in oklab, var(--casa-positive, #637525) 18%, var(--casa-off-white-01, #f8f8f1)); color: var(--casa-positive, #637525); }
.pv-chip--hold  { background: #ffe39d; color: #c07907; }
.pv-chip--block { background: #ffe3c9; color: #7e2e1a; }
.pv-tag { flex: none; font-size: .78em; color: #8e8f84; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.pv-foot { margin-top: 1.2cqh; padding-inline: .4cqw; font-size: .82em; line-height: 1.45; color: #8e8f84; }
.pv-eyebrow { font-size: .78em; letter-spacing: .02em; text-transform: uppercase; color: #8e8f84; }
.pv-note { font-size: .84em; color: #8e8f84; line-height: 1.4; }

/* Taste: a sentence on the left, what it turned into on the right. */
.pv-split { flex-direction: row; align-items: center; gap: 3cqw; }
.pv-half { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.4cqh; }
.pv-arrow { flex: none; font-size: 1.6em; color: #c7c7bd; }
.pv-said { font-size: 1em !important; line-height: 1.35 !important; align-self: flex-start; }
.pv-pills { display: flex; flex-wrap: wrap; gap: .5em; }
.pv-pills b {
  padding: .5em .9em; border-radius: 999px; font-weight: 500;
  background: #fff; border: 1px solid #ebebe4;
}

/* Proximity + watches share the big-number treatment. */
.pv-metric { display: flex; align-items: baseline; gap: .6em; }
.pv-metric b { font-size: 2.4em; font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.pv-metric span { color: #8e8f84; }
.pv-price { display: flex; align-items: center; justify-content: space-between; gap: 2cqw;
  background: #fff; border-radius: 16px; padding: 2.4cqh 2.4cqw; }
.pv-half2 { display: flex; flex-direction: column; gap: .25em; min-width: 0; }
.pv-half2 b { font-weight: 500; }
.pv-half2 i { font-style: normal; font-size: .84em; color: #8e8f84; }
.pv-nums { display: flex; align-items: baseline; gap: .6em; flex: none; }
.pv-nums s { color: #c7c7bd; }
.pv-nums b { font-size: 1.5em; font-weight: 500; letter-spacing: -.02em; }
.pv-nums em { font-style: normal; color: var(--casa-green-04, #444835); background: var(--casa-green-02, #f0f3a2); border-radius: 6px; padding: .3em .6em; font-size: .82em; }

/* Groups: who is in the room, and a reply that names one of them. */
.pv-who { display: flex; align-items: center; gap: .5em; }
.pv-av { width: 2.2em; height: 2.2em; border-radius: 999px; display: grid; place-items: center;
  font-size: .86em; font-weight: 500; }
.pv-who .pv-note { margin-left: .4em; }
.pv-quote { display: block; font-style: normal; font-size: .88em; color: #6a6a70;
  border-left: 2px solid #c7c7bd; padding-left: .7em; margin-bottom: .45em; }

/* Event log: the spine, as rows. */
.pv-log { gap: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(9px, 1.8cqw, 14px); }
.pv-log-head, .pv-log-row {
  display: grid; grid-template-columns: 1.5fr 1.2fr .8fr; gap: 1.5cqw;
  padding: 1.5cqh 0; border-bottom: 1px solid #ebebe4;
}
.pv-log-head { color: #8e8f84; font-size: .82em; letter-spacing: .04em; text-transform: uppercase; }
.pv-log-row:last-of-type { border-bottom: 0; }
.pv-log-row span:nth-child(2), .pv-log-row span:nth-child(3) { color: #8e8f84; }
.pv-log .pv-foot { font-family: var(--font-sans, inherit); }

/* Every panel opens on what it claims. Each used to name, in .pv-src, the source
   file that had to be true for the claim to hold; those files belonged to the
   engine Lewis v2 replaced and the names went with it. The style stays for when
   the panels point at v2. */
.pv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 2cqw; margin-bottom: .8cqh; }
.pv-head b { font-weight: 500; letter-spacing: -.01em; }
.pv-src {
  flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72em; color: #8e8f84;
  background: #fff; border: 1px solid #ebebe4; border-radius: 6px; padding: .4em .7em;
}

/* Three across: a transport, the brain, the other transport. Same row the taste
   panel uses for said/arrow/became, so a panel that needs a middle term does not
   invent a second layout for it. */
.pv-3 { display: flex; align-items: center; gap: 2.6cqw; min-width: 0; }
.pv-3 > .pv-half { flex: 1; }
.pv-brain {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: .2em;
  padding: 1.6cqh 1.6cqw; border-radius: 12px;
  background: var(--casa-green-01, #e5f3f8); color: var(--casa-green-04, #194d5a);
}
.pv-brain b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; font-size: .9em; }
.pv-brain i { font-style: normal; font-size: .74em; opacity: .7; }

/* The deck ----------------------------------------------------------------
   Seven panels in one grid cell, one of them shown.

   THE TABS USED TO DO NOTHING. Seven buttons, seven panels stacked in
   `grid-contain`, six of them `style="opacity:0"`, and no handler anywhere in
   app.js: clicking moved neither the panel nor the rule. It is the quietest
   possible failure, because the section still looks finished. Visibility is
   toggled here rather than in the driver so nothing flashes all seven before
   the script lands, and `visibility` rather than `display` because a hidden
   panel still has to hold the cell's height. */
[data-panel] { grid-area: 1 / 1; width: 100%; }
[data-panel]:not([data-on]) {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px);
}
[data-panel] { transition: opacity .3s ease, transform .34s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce) { [data-panel] { transition: none; } }

/* The rule that follows the selected tab. It used to be a div INSIDE the first
   button, which is why it could never move. */
/* `top: 0`, not `-2px`. The dead version of this element sat two pixels ABOVE
   the row, where the nearest `overflow-hidden` ancestor clipped it: the tab
   would select correctly and the rule would simply never be seen. The buttons
   draw their hairline as their own `border-top-2`, so a 2px bar at the row's
   top edge lands exactly on it. */
.tabs-bar {
  position: absolute; top: 0; left: 0; height: 2px; width: 0;
  background: var(--casa-off-black-02, #282828); z-index: 2; pointer-events: none;
  transition: transform .34s cubic-bezier(.22,.61,.36,1), width .34s cubic-bezier(.22,.61,.36,1);
}

/* The .im-* bubbles inside a panel scale with the card like everything else. */
.pv .im-b { font-size: clamp(12px, 2.35cqw, 19px); line-height: 1.35; max-width: 88%; }
.pv .im-row { display: flex; }

/* FAQ ---------------------------------------------------------------------
   The questions used to be a single centred column with no heading, which is
   the shape of a support page rather than of the last thing somebody reads
   before deciding. The accordion items themselves are untouched: initAccordion
   keys off the h3 text and requires each `.rounded-40` to have exactly one
   child, a <button>, so only the frame around them changed. */
.faq-split {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.faq-aside {
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  max-width: 420px;
  /* Sticky, so the heading is still there on the fourth question. */
  position: sticky; top: 120px;
}
.faq-list { display: flex; flex-direction: column; gap: 10px; }
/* The row lifts on hover so it reads as pressable: the chevron alone did not. */
.faq-list > .rounded-40 { transition: background-color .275s cubic-bezier(.25,1,.5,1); }
.faq-list > .rounded-40:hover { background-color: #f0f0e8; }

@media (max-width: 900px) {
  .faq-split { grid-template-columns: 1fr; }
  .faq-aside { position: static; max-width: none; }
}

/* Pricing -----------------------------------------------------------------
   Three tiers where there used to be one number. Geometry only: every colour,
   radius and type size below is either a casa.css utility applied in the
   markup or the literal that utility resolves to (off-white-01/02/03/04,
   green-01/02/04, rounded-40), so a plan card is the same furniture as a
   benefit card rather than a pricing widget that wandered in.

   The featured tier is green-01 rather than a bigger box, because scaling one
   card up is what breaks the row's baseline on the two widths where the
   feature lists are different lengths. */
.plans {
  width: 100%; max-width: 1040px; margin: 0 auto;
  display: grid; gap: 20px;
}
@media (min-width: 768px) { .plans { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* On a phone the three tiers are a SWIPE, not a stack. Stacked, comparing
   $79 against $189 meant scrolling a full screen between them, which is the
   one thing a pricing table exists to make easy, and the section ran to
   ~2500px on its own. Side by side with the next card peeking, the compare
   is a thumb movement and the peek is the only affordance needed.

   Two things here are load-bearing. The cards are a fixed 84% so the fourth
   edge is always visible: at 100% the row looks like a stack that has
   stopped scrolling. And .plans needs top padding because .plan__badge sits
   at -13px, outside the box: overflow-x:auto forces overflow-y to auto, so
   without the padding the "Most agents" chip is clipped off the featured
   card. Scroll-padding matches so a snapped card is not jammed to the edge. */
@media (max-width: 767px) {
  .plans {
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    padding-top: 16px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .plans::-webkit-scrollbar { display: none; }
  .plan { scroll-snap-align: start; }
}

.plan {
  position: relative;
  display: flex; flex-direction: column; gap: 24px;
  padding: 32px 28px;
  background: #f8f8f1;                       /* off-white-01 */
  border-radius: 40px;                       /* rounded-40 */
  transition: background-color 275ms cubic-bezier(.25,1,.5,1);
}
@media (min-width: 768px) { .plan { padding: 40px 32px; } }
.plan--featured {
  background: var(--casa-green-01, #fbfbe3);                       /* green-01 */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--casa-green-04, #444835) 12%, transparent);
}

/* The chip sits ON the card's top edge, in the same lozenge the eyebrows use. */
.plan__badge {
  position: absolute; top: -13px; left: 32px;
  padding: 7px 12px; border-radius: 6px;
  background: var(--casa-green-02, #f0f3a2); color: var(--casa-green-04, #444835);       /* green-02 on green-04 */
  white-space: nowrap;
}

/* Baseline-aligned so "$189" and "/mo per agent" sit on one line of type. */
.plan__price { display: flex; align-items: flex-end; gap: 8px; margin-top: auto; }
.plan__amount {
  display: inline-flex; align-items: flex-start;
  font-family: var(--casa-font-heading, Georgia, serif);   /* same token .text-h* reads */
  font-size: 56px; line-height: .92; letter-spacing: -.02em; font-weight: 400;
}
@media (min-width: 768px) { .plan__amount { font-size: 64px; } }
.plan__currency { font-size: .48em; line-height: 1; margin-top: .18em; margin-right: .06em; }
.plan__per { line-height: 1.15; padding-bottom: 4px; }
.plan__bill { margin-top: -14px; }

/* The number is the only thing that changes on a toggle, so it is the only
   thing that moves: swapping the whole card would read as a page change. */
[data-price] { display: inline-block; transition: opacity 140ms ease, transform 140ms ease; }
[data-price].is-swapping { opacity: 0; transform: translateY(-6px); }

.plan__feats {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0; padding: 20px 0 0; list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--casa-green-04, #444835) 10%, transparent);
}
.plan__feat { display: flex; align-items: flex-start; gap: 10px; }
.plan__tick { flex: none; width: 12px; height: auto; margin-top: .45em; color: var(--casa-green-04, #444835); }

/* Monthly / Annual ---------------------------------------------------------
   A real segmented control: the knob is one element that slides, so the two
   states cannot drift apart the way two separately-styled buttons do. */
.plan-switch {
  position: relative; display: inline-flex; align-items: center;
  padding: 4px; border-radius: 999px; background: #ebebe4;   /* off-white-02 */
}
.plan-switch__knob {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: 50%;                                /* JS writes the measured width */
  border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
  transform: translateX(0);
  transition: transform 420ms cubic-bezier(.22,.61,.36,1), width 420ms cubic-bezier(.22,.61,.36,1);
}
.plan-switch__opt {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 20px; border: 0; background: none;
  font: inherit; font-weight: 500; color: #8e8f84;           /* off-white-04 */
  cursor: pointer; white-space: nowrap;
  transition: color 275ms cubic-bezier(.25,1,.5,1);
}
.plan-switch__opt[aria-pressed="true"] { color: #000; }
.plan-switch__save {
  padding: 4px 8px; border-radius: 6px;
  background: var(--casa-green-02, #f0f3a2); color: var(--casa-green-04, #444835);       /* green-02 on green-04 */
  font-size: 11px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
  .plan-switch__knob, [data-price] { transition-duration: 1ms; }
}

/* The ladder --------------------------------------------------------------
   Three numbers and two arrows. STILL USED, by /how-it-works and
   /use-cases/database-reactivation through `ladder()` in landing-v3-site.ts;
   the home page trades it for the two-lane band below, which is the same
   arithmetic with the work shown. Deleting these rules is how those two pages
   silently lose their layout, since a class in no stylesheet renders as
   nothing in particular rather than as an error.

   A grid rather than flex, so the three steps are equal width and the
   description under a long label does not make its column wider while the next
   one shrinks underneath it. The arrow turns a quarter on mobile because a row
   that stacks and keeps a sideways arrow reads as a broken layout. */
.ladder {
  display: grid; gap: 16px; align-items: stretch;
  grid-template-columns: 1fr;
  max-width: 450px; margin: 0 auto;
}
@media (min-width: 768px) {
  .ladder {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 8px; max-width: 1040px;
  }
}
.ladder__step {
  display: flex; flex-direction: column; gap: 10px;
  padding: 32px 28px;
  background: #f8f8f1; border-radius: 40px;  /* off-white-01 / rounded-40 */
}
@media (min-width: 768px) { .ladder__step { padding: 40px 32px; } }
.ladder__n { color: #000; }
/* Declared rather than left as a bare hook. It carried no rule of its own and
   survived the class audit only because index.html happened to use it, so the
   moment the home page traded the ladder for the two-lane band it became a
   class in no stylesheet: inert, invisible, and exactly what that audit is for.
   The value is the one it was already inheriting. */
.ladder__label { color: var(--casa-off-black-02, #282828); }
.ladder__arrow {
  display: grid; place-items: center; color: #c7c7bd;         /* off-white-03 */
  transform: rotate(90deg);
}
@media (min-width: 768px) { .ladder__arrow { transform: none; padding: 0 4px; } }
.ladder__chev { width: 18px; height: auto; }

/* What qualifying a list costs ------------------------------------------
   THE WASTED THING IS TIME, AND TIME WAS THE ONE QUANTITY THE SECTION NEVER
   DREW.

   This band has been a two-lane comparison, a one-rail toggle, and a full
   width table, and each failed differently. The first two showed 412, 137 and
   3, which are the same numbers on both sides of the argument, so the picture
   never changed and the claim lived in a caption you had to click for. The
   table fixed the quantity and broke the reading: 1168px across, four pieces
   of text per row, and a whole column of the word "none" repeated five times.
   Twenty-four cells to carry one idea.

   ONE BAR NOW, AND THE BAR IS THE TABLE. The four jobs are segments of the
   same rail in the order you actually do them, so the thing you cannot help
   noticing is that the LAST one is more than half of it: reading replies and
   writing the next message is 14h 16m of the 27h 25m. That is the number the
   old table had in row five of seven, where nobody read it, and it is exactly
   the job this product does.

   Then the sliver underneath at the same scale, and a legend narrow enough
   that a task and its hours are the same glance. 720px is the constraint that
   does the most work here: at full content width the label was a thousand
   pixels from its own figure.

   The receipt survives as ONE line of small print rather than twelve cells.
   The rates are ours and it says so, because a reader who wants to argue
   should be arguing with 45 seconds a note, not with the conclusion. */
.tw { display: flex; flex-direction: column; gap: 40px; max-width: 720px; margin: 0 auto; }

.tw-row { display: flex; flex-direction: column; gap: 12px; }
.tw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.tw-who { color: var(--casa-off-white-04, #8e8f84); }
.tw-tot { color: var(--casa-clay-04, #7e2e1a); }
.tw-row--lewis .tw-tot { color: var(--casa-green-04, #194d5a); }

/* The track is the FULL 27h 25m on both rows, which is what makes the second
   one legible as a quantity rather than as an empty control. */
.tw-track {
  display: flex; width: 100%; height: 34px; overflow: hidden;
  border-radius: 999px; background: var(--casa-off-white-02, #ebebe4);
}
.tw-seg {
  width: var(--w, 0%); height: 100%;
  box-shadow: 1px 0 0 var(--casa-white, #fff) inset, -1px 0 0 var(--casa-white, #fff) inset;
}
/* Light to dark in the order the evening actually goes. The ramp is the four
   real clay tokens, so the segments cannot drift from the brand. */
.tw-seg--a { background: var(--casa-clay-01, #ffe3c9); }
.tw-seg--b { background: var(--casa-clay-02, #fa9a67); }
.tw-seg--c { background: var(--casa-clay-03, #d2593a); }
.tw-seg--d { background: var(--casa-clay-04, #7e2e1a); }
.tw-seg--l { background: var(--casa-green-04, #194d5a); min-width: 6px; }

/* Grown once on the way in. The width lives in the markup and the CSS renders
   it full by default, so a failed script is a static chart, not an empty one. */
.tw--anim .tw-seg { width: 0; transition: width .9s cubic-bezier(.25,1,.5,1); }
.tw--anim.is-in .tw-seg { width: var(--w, 0%); }
.tw--anim.is-in .tw-seg--b { transition-delay: .07s; }
.tw--anim.is-in .tw-seg--c { transition-delay: .14s; }
.tw--anim.is-in .tw-seg--d { transition-delay: .21s; }
.tw--anim.is-in .tw-seg--l { transition-delay: .5s; }
@media (prefers-reduced-motion: reduce) {
  .tw--anim .tw-seg { width: var(--w, 0%); transition: none; }
}

.tw-key { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.tw-key__i {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 9px 0 9px 22px; position: relative;
}
.tw-key__i + .tw-key__i { border-top: 1px solid var(--casa-off-white-02, #ebebe4); }
/* The swatch is what ties a row to its slice. Without it the legend is in an
   order the reader has to trust rather than one they can check. */
.tw-key__i::before {
  content: ""; position: absolute; left: 0; top: .95em;
  width: 10px; height: 10px; border-radius: 3px;
}
.tw-key__i--a::before { background: var(--casa-clay-01, #ffe3c9); }
.tw-key__i--b::before { background: var(--casa-clay-02, #fa9a67); }
.tw-key__i--c::before { background: var(--casa-clay-03, #d2593a); }
.tw-key__i--d::before { background: var(--casa-clay-04, #7e2e1a); }
.tw-key__t { color: var(--casa-off-black-02, #282828); }
.tw-key__n { color: #000; white-space: nowrap; }
/* The one that is more than half the bar says so in the legend too. */
.tw-key__i--d .tw-key__t, .tw-key__i--d .tw-key__n { font-weight: 500; }

.tw-say { color: var(--casa-off-black-02, #282828); margin: 6px 0 0; max-width: 560px; }
.tw-foot { color: var(--casa-off-white-04, #8e8f84); margin: 0; }

@media (max-width: 700px) {
  .tw { gap: 32px; }
  .tw-track { height: 26px; }
  .tw-key__i { padding-top: 8px; padding-bottom: 8px; }
}


/* An underline that means it. The step-three card promises that anything a
   licence has to answer always comes back to you, and "always" is the load
   bearing word in that sentence rather than a decoration on it. */
.v3-u { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* text-h1 is 68px, and "Finding the three people in a list of 412" needs more
   than the 900px the other headings are capped at: under that cap the explicit
   break is overruled by a wrap and the line lands mid-phrase. */
.wide-head { max-width: 1160px; }

/* Closing ask + footer ----------------------------------------------------
   Rebuilt again, to the shape of the chosen reference: a fixed brand
   column on the left, five link columns on the right, one hairline, and a
   wordmark cut in half by the bottom edge of the page.

   Three things about it are deliberate rather than copied.

   THE WORDMARK IS FILLED WITH THE HERO PAINTING. The reference sets its at 7%
   white, which is a watermark. Ours is the same image that fills the first
   screen, clipped to the shape of the word, so the last thing on the page is
   the first thing on it. `background-clip: text` needs a transparent fill on
   BOTH properties (`color` for the standard, `-webkit-text-fill-color` for
   WebKit) or Safari paints the text over its own background and the effect
   vanishes without an error.

   THE PROMISES BAND IS GONE, and it was three real facts. They said Held,
   Blocked and Suppressed, which is the engine's own vocabulary, and every one
   of them is still made twice on the page above: by the guardrails panel, which
   shows the same three verdicts on real drafts, and by the trust pages the
   Legal column links to. A footer is navigation. Making it also the third
   statement of the safety argument is what left the brand column sitting beside
   430px of nothing in the first place.

   THERE ARE NO SOCIAL ICONS. The reference has three. Lewis has no accounts, and
   three icons pointing at profiles that do not exist is precisely the plausible
   placeholder the copy rules exist to stop. The subscribe row holds the slot. */
.ft-cta { padding-block: clamp(80px, 14vh, 180px) clamp(56px, 9vh, 110px); }

.ft-btn {
  height: 56px; padding: 0 32px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  transition: background-color .275s cubic-bezier(.25,1,.5,1), color .275s cubic-bezier(.25,1,.5,1), border-color .275s;
}
.ft-btn--primary { background: var(--casa-green-04, #444835); color: #f8f8f1; }
.ft-btn--primary:hover { background: color-mix(in oklab, var(--casa-green-04, #444835) 88%, var(--casa-off-white-01, #f8f8f1)); }
.ft-btn--ghost { border: 1px solid #c7c7bd; color: #282828; }
.ft-btn--ghost:hover { background: #ebebe4; border-color: #ebebe4; }

/* `--space-l` is Casa's own section rhythm and is already scaled by scale.css
   at the :root that declares it, so the gap above the footer is stated here
   rather than inherited from a wrapper that no longer contains it: the closing
   CTA and the footer are both siblings of `main`, not children of the page's
   `py-l` stack. `overflow: hidden` is load-bearing now, because it is what cuts
   the wordmark. */
.ft {
  position: relative; overflow: hidden;
  background: var(--casa-green-04, #444835); color: #c7c7bd; margin-top: var(--space-l);
  /* "It worked" is a STATE, not the brand, and the two used to be the same
     colour only because the brand happened to be green. `positive` is the token
     for it and the brand palette deliberately leaves it alone; it is lifted
     towards paper here because #637525 on a dark ground is dark on dark. A green
     dot for "operational" is also the only thing anybody reads a status dot as. */
  --v3-ok: color-mix(in oklab, var(--casa-positive, #637525) 35%, var(--casa-off-white-01, #f8f8f1));
}
.ft-inner { position: relative; z-index: 1; padding-block: clamp(56px, 8vh, 96px) 26px; }

/* Brand + links ------------------------------------------------------------
   A fixed left column rather than a fraction, so the brand can never be given
   more room than it uses. */
.ft-top {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  padding-bottom: clamp(44px, 6vh, 76px);
}
.ft-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.ft-logo { display: inline-flex; }
.ft-mark { height: 20px; width: auto; color: #f8f8f1; }
.ft-blurb { max-width: 300px; font-size: 14px; line-height: 1.55; color: rgba(248,248,241,.6); }

.ft-sub { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 10px; }
.ft-sub-label { font-size: 11px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: rgba(248,248,241,.45); }
.ft-sub-row {
  display: flex; align-items: center; gap: 4px;
  border: 1px solid rgba(248,248,241,.32); border-radius: 999px; padding: 4px 4px 4px 18px;
  transition: border-color .2s ease;
}
.ft-sub-row:focus-within { border-color: rgba(248,248,241,.7); }
.ft-input {
  flex: 1; min-width: 0; height: 38px; background: transparent; border: 0; outline: 0;
  font: inherit; font-size: 14px; color: #f8f8f1;
}
.ft-input::placeholder { color: rgba(248,248,241,.45); }
.ft-sub-go {
  flex: none; height: 38px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--casa-green-02, #f0f3a2); color: var(--casa-green-04, #444835);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: opacity .2s ease;
}
.ft-sub-go:hover { opacity: .88; }

/* Five columns, because the site is five groups: what it does, what running a
   list looks like, the pages that explain it, the company, and the legal set.
   Twenty-four links do not fit in four, and a link a crawler cannot find from
   the footer is a page nobody arrives at. */
.ft-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 44px); }
.ft-col { display: flex; flex-direction: column; gap: 16px; }
.ft-head {
  font-size: 11px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(248,248,241,.45);
}
.ft-list { display: flex; flex-direction: column; gap: 12px; }
.ft-link { display: inline-flex; font-size: 14px; color: #f8f8f1; }
/* A rule that grows under the word, rather than a colour change. It needs the
   inner span: the anchor is inline-flex and stretches to the column, so an
   underline on it would run past the end of the label. */
.ft-link > span { position: relative; display: inline-block; }
.ft-link > span::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 0;
  background: var(--casa-green-03, #86bfd4);
  transition: width .28s cubic-bezier(.25,1,.5,1);
}
.ft-link:hover > span::after { width: 100%; }

/* Made with love in Boston -------------------------------------------------
   Two map tiles, fanned, each with a marker on the neighbourhood it is centred
   on. The tiles are raster basemap PNGs rather than an embedded map: this is a
   signature, and a signature does not need to pan, zoom, or load a mapping
   library on every page of the site. */
.ft-love {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: clamp(30px, 4.5vh, 52px) 0;
  border-top: 1px solid rgba(248,248,241,.14);
  text-align: center;
}
.ft-tiles { position: relative; display: block; width: 184px; height: 84px; }
.ft-tile {
  position: absolute; top: 12px; width: 60px; height: 60px;
  border-radius: 15px; overflow: hidden;
  background: #e8eef2; border: 1.5px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 20px rgba(0,0,0,.3);
  transform-origin: center center;
  transition: transform .38s cubic-bezier(.22,1.2,.36,1), box-shadow .38s cubic-bezier(.22,1.2,.36,1);
}
.ft-tile img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.ft-tile--fenway  { left: 30px;  z-index: 2; transform: rotate(-13deg) translateY(2px); }
.ft-tile--seaport { right: 30px; z-index: 1; transform: rotate(13deg) translateY(2px); }
@media (hover: hover) and (pointer: fine) {
  .ft-tile--fenway:hover  { z-index: 5; transform: translateX(-9px) translateY(-5px) rotate(-20deg) scale(1.14); }
  .ft-tile--seaport:hover { z-index: 5; transform: translateX(9px)  translateY(-5px) rotate(20deg)  scale(1.14); }
  .ft-tile:hover .ft-pulse { transform: scale(1.35); opacity: .85; }
}
.ft-pulse {
  position: absolute; inset: 50% auto auto 50%; width: 23px; height: 23px; margin: -11.5px 0 0 -11.5px;
  border-radius: 999px; background: color-mix(in srgb, var(--casa-green-03, #86bfd4) 45%, transparent);
  pointer-events: none; transition: transform .38s cubic-bezier(.22,1.2,.36,1), opacity .38s ease;
}
.ft-dot {
  position: absolute; inset: 50% auto auto 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 999px; background: var(--casa-green-04, #194d5a); border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); pointer-events: none;
}
.ft-love-copy { margin: 0; font-size: 14px; line-height: 1.4; color: rgba(248,248,241,.6); }
@media (prefers-reduced-motion: reduce) { .ft-tile, .ft-pulse { transition: none; } }

/* The bottom rule ----------------------------------------------------------
   The AI disclosure is a real product behaviour (its own bubble, ahead of any
   work), so it belongs with the copyright rather than in a legal page nobody
   opens. */
.ft-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px;
  padding-top: 24px; border-top: 1px solid rgba(248,248,241,.14);
  font-size: 12.5px; color: rgba(248,248,241,.45);
}
.ft-start { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.ft-note { color: rgba(248,248,241,.4); }
.ft-end { display: inline-flex; align-items: center; gap: 24px; }
.ft-status { display: inline-flex; align-items: center; gap: 8px; }
.ft-status i { width: 7px; height: 7px; border-radius: 999px; background: var(--v3-ok); }
.ft-up { display: inline-flex; align-items: center; gap: 8px; color: rgba(248,248,241,.45); transition: color .2s ease; }
.ft-up:hover { color: #f8f8f1; }
.ft-up svg { transition: transform .3s cubic-bezier(.22,.61,.36,1); }
.ft-up:hover svg { transform: translateY(-3px); }

/* The signature ------------------------------------------------------------
   Half on the page and half off it. `text-box: trim-both cap alphabetic` is
   what makes that fraction predictable: without it the translate is measured
   against a line box whose leading changes with the font, so the crop moves
   whenever the type does. Behind everything (z-index 0 against .ft-inner's 1)
   and pointer-events: none, so it can sit under the bottom rule without eating
   a click on Back to top. */
.ft-sign {
  position: absolute; left: 0; right: 0; z-index: 0;
  /* The stretch (app.js) grows the footer's bottom padding by --v3-stretch and
     lifts the word by the same amount, so the word holds still against the
     footer's content while the clip edge under it moves down and uncovers the
     rest of the letters. Unset, both are 0 and this is the resting page. */
  bottom: var(--v3-stretch, 0);
  display: flex; justify-content: center; pointer-events: none;
  /* A little more of the word on the page. */
  transform: translateY(36%);
}
.ft-word {
  display: block; white-space: nowrap;
  font-size: clamp(120px, 26vw, 360px);
  font-weight: 700; letter-spacing: -.055em; line-height: 1;
  text-box: trim-both cap alphabetic;
  background-image: url("/landing-v3/assets/img/coastal-cottage-painting.webp");
  /* `cover` on a box that is ~4.5:1 against a 1.8:1 painting crops a horizontal
     band out of the middle of it, so this number chooses WHICH band. 44% was the
     sea horizon, which is the palest strip in the picture and made the word read
     as flat grey; 68% is the cottage and the grass under it. */
  background-size: cover; background-position: 50% 68%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  /* The fade has to FINISH inside the visible part. At translateY(45%) only the
     top 55% of the glyph is on the page, so a gradient reaching black at 54% is
     a word that is fading in for the whole of its visible height and solid for
     none of it: it reads as a smudge rather than as a wordmark being cut. */
  opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 32%);
  user-select: none;
}

@media (max-width: 1280px) {
  .ft-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 24px; }
}
@media (max-width: 900px) {
  .ft-top { grid-template-columns: 1fr; }
  .ft-brand { max-width: 460px; }
  .ft-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .ft-bottom { justify-content: flex-start; }
  .ft-word { opacity: .3; }
}
/* Two columns hold down to a 360px phone: every label fits, and twenty-four
   links in a single file is 1,800px of footer to scroll past. */
@media (max-width: 360px) { .ft-cols { grid-template-columns: 1fr; } }

/* What a rubber band shows --------------------------------------------------
   Pulled past either end on a trackpad, the page slides and the browser shows
   what is behind it, which was the white of `html`: a white bar over the sky,
   and another under the blue footer. Measured in Chrome on a Mac, with a
   synthetic trackpad gesture and frames read off the compositor: the gap shows
   a `position: fixed` layer sitting behind the page, it does NOT show anything
   positioned above the top of the document (that is never painted there), and
   the fixed header holds still while the page moves. So whatever fills the gap
   has to be fixed and hold still too.

   Each end therefore gets a fixed layer at z-index -1. That paints above the
   root's background and below `body`'s own white, so everywhere the page is,
   which is everywhere until it is pulled, the page covers it and nothing about
   the resting state changes. That only holds while `body` is NOT a stacking
   context: give it a z-index, a transform, a filter or an opacity and these
   paint on top of its background, over the whole page.

   THE TOP is the painting's sky, cut off above the tallest tree (row 374 of 931
   is the first with a tree in it, so the cut is at 360) and flipped, at exactly
   the scale and centring `object-cover` gives the hero's image: `--sky-s` is
   that scale in px per painting pixel, off the same 100vw by 100svh box. Under
   the same darkening, too: `opacity-70` on `bg-black` is the image times .7,
   which is what a 30% black layer over it is. It can hold still because the sky
   is one colour from the top of the picture to the trees (every row averages
   rgb(214 232 239)), so which row of it meets the hero's edge changes nothing
   but the paper grain, and the grain runs vertically. Past the strip, on a very
   tall pull, is that average colour. It is the hero's own file, so it costs no
   request.

   THE BOTTOM is the footer's blue, on every page that has the footer. With a
   trackpad or a mouse it is never reached: the bottom bounce there is the
   footer's own stretch (app.js, `v3-stretchy`), which brings up the rest of the
   "lewis" signature, and that needs the browser's bounce switched off for the
   bottom half of the page so the two do not run at once. The blue is for touch
   and for /demo, which keep the browser's bounce. The letters themselves cannot
   be drawn in that gap: a fixed layer cannot move with the bounce, so the bottom
   half of the word drawn there would meet the half on the page at a different
   height on every frame of it. A colour has no seam to miss.

   Safari may paint the gap with the root's background colour instead, so that
   is set too: the darkened sky on the home page, the footer blue once the page
   is scrolled past halfway (`v3-past-half`, app.js). */
body:has(.hero--full)::before,
body:has(.ft)::after {
  content: ""; position: fixed; z-index: -1; left: 0;
  width: 100vw; height: 50vh;
  pointer-events: none;
}
body:has(.hero--full)::before {
  --sky-s: max(100vw / 1689, 100svh / 931);
  top: 0;
  background:
    linear-gradient(rgb(0 0 0 / .3), rgb(0 0 0 / .3)),
    url("/landing-v3/assets/img/coastal-cottage-painting.webp") 50% calc(50vh - 360 * var(--sky-s)) / calc(1689 * var(--sky-s)) auto no-repeat,
    rgb(214 232 239);
  /* Rows 0 to 360 are placed at the bottom of the layer and then flipped, so
     the top of the window shows the sky just under the treetops, mirrored, and
     the sky carries on upwards out of the hero. */
  transform: scaleY(-1);
}
body:has(.ft)::after { bottom: 0; background: var(--casa-green-04, #444835); }
.ft { padding-bottom: var(--v3-stretch, 0); }
:root.v3-stretchy.v3-past-half { overscroll-behavior-y: none; }
:root:has(.hero--full) { background-color: rgb(150 162 167); }
:root.v3-past-half:has(.ft) { background-color: var(--casa-green-04, #444835); }



/* ===========================================================================
   The rest of the site
   ---------------------------------------------------------------------------
   Everything above this line styles `/` and `/demo`, which are hand-written.
   Everything below styles the forty-odd pages emitted by
   `scripts/landing-v3-pages.ts`: the benefit pages, the comparisons, the trust
   and legal pages, the use cases.

   Every colour here is `var(--casa-<name>, <literal>)` rather than the literal
   on its own, which is deliberately one step better than the footer above it:
   the value is identical until the mood board sets a variable, and then these
   rules move with the page instead of staying behind on the old palette. Sizes
   are px so `scale.css` reaches them: run `npx tsx scripts/landing-v3-scale.ts`
   after touching anything down here.
   =========================================================================== */

/* A keyboard user's first tab stop, and the one thing on the page that must be
   invisible until it has focus. It cannot be `display:none`: a hidden element
   is not focusable, so the shortcut would not exist at all. */
.v3-skip {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--casa-off-black-02, #282828); color: var(--casa-white, #fff);
  font-size: 14px; font-weight: 500;
  transform: translateY(-200%);
  transition: transform 200ms cubic-bezier(.25,1,.5,1);
}
.v3-skip:focus-visible { transform: translateY(0); }

/* The top of a subpage, under a fixed header.
   Not a utility class, because the right one does not exist: Casa's build emits
   `pt-100` and `pt-160` but no `md:pt-*` above 24, so "100 on a phone, 160 on a
   desktop" is not expressible in their vocabulary. /demo carries
   `pt-100 md:pt-120` and the second half of that has quietly never done
   anything. */
.v3-page-top { padding-top: 104px; }
@media (min-width: 800px) { .v3-page-top { padding-top: 168px; } }

/* Long-form body copy -----------------------------------------------------
   The measure is the point. `site-grid--content` is ten of twelve columns,
   which on a desktop is about 1,100px: fine for three cards side by side and
   roughly twice the line length anybody reads comfortably. A benefit page is
   mostly sentences, so it gets a column. */
.v3-prose { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.v3-prose > h2 { margin-top: 22px; }
.v3-prose > h2:first-child { margin-top: 0; }
.v3-prose > h3 { margin-top: 10px; }
/* Every link in generated body copy, wherever it sits.
   Scoped to `.v3-prose` first, which missed the three places a link also
   appears outside it: a table's footnote, a tile's blurb, a ladder note. An
   unstyled link in Casa's palette is body-coloured and has no underline, so it
   is not a link that is hard to see: it is a link that is invisible. */
.v3-prose a,
.v3-note a,
.v3-table + p a,
.v3-table-wrap ~ p a,
.v3-tile__body a,
.ladder__note a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.v3-prose a:hover,
.v3-note a:hover,
.v3-table-wrap ~ p a:hover,
.v3-tile__body a:hover { color: var(--casa-off-white-04, #8e8f84); }

.v3-list { padding-left: 24px; gap: 8px; max-width: 700px; }
.v3-list::marker { color: var(--casa-off-white-03, #c7c7bd); }

/* A note is an aside, not a quote: the copy that qualifies the paragraph above
   it. The rule down the left is the whole treatment; a tinted box would read as
   a callout and pull the eye off the argument. */
.v3-note {
  border-left: 2px solid var(--casa-green-03, #acc064);
  padding: 2px 0 2px 18px;
  color: var(--casa-off-white-04, #8e8f84);
  max-width: 660px;
}

.v3-code {
  font-family: var(--font-mono);
  font-size: .9em;
  padding: 2px 6px; border-radius: 5px;
  background: var(--casa-off-white-02, #ebebe4);
}

/* Breadcrumbs -------------------------------------------------------------
   The visible half of the page's BreadcrumbList. The separator is generated
   rather than typed so it can be hidden from a screen reader, which otherwise
   reads "Home slash Benefits slash" out loud. */
.v3-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v3-crumbs li { display: flex; align-items: center; gap: 8px; color: var(--casa-off-white-04, #8e8f84); }
.v3-crumbs li + li::before { content: "/"; color: var(--casa-off-white-03, #c7c7bd); }
.v3-crumbs a { color: inherit; }
.v3-crumbs a:hover { color: var(--casa-off-black-02, #282828); text-decoration: underline; text-underline-offset: 2px; }

/* Comparison tables -------------------------------------------------------
   A real table, so it can be read a row at a time. The wrapper scrolls rather
   than the columns collapsing: a three-column comparison squeezed onto a 360px
   phone is three words per line and unreadable, and a table you can push
   sideways is at least still a table. `tabindex` makes that scroll reachable
   from a keyboard, which is the part that is usually forgotten. */
.v3-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Nothing on screen used to say the table scrolls, so a cut-off third column
   read as a broken page. The fade hints there is more past the edge; the
   hint text underneath says it outright, and only shows once the table is
   actually wider than its wrapper (min-width: 620px vs. a narrow phone). */
.v3-table-hint { display: none; }
@media (max-width: 660px) {
  .v3-table-wrap {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .v3-table-hint {
    display: block; margin-top: 10px; font-size: 13px;
    color: var(--casa-off-white-04, #8e8f84); text-align: right;
  }
}
.v3-table {
  width: 100%; min-width: 620px; border-collapse: separate; border-spacing: 0;
  background: var(--casa-off-white-01, #f8f8f1);
  border-radius: 24px; overflow: hidden;
  font-size: 16px; line-height: 1.45;
}
.v3-table th, .v3-table td {
  padding: 18px 22px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--casa-off-white-02, #ebebe4);
}
.v3-table thead th {
  font-weight: 500; font-size: 14px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--casa-off-white-04, #8e8f84);
  background: var(--casa-off-white-02, #ebebe4);
  border-bottom-color: var(--casa-off-white-03, #c7c7bd);
}
.v3-table tbody tr:last-child th, .v3-table tbody tr:last-child td { border-bottom: 0; }
.v3-table__rowhead { font-weight: 500; color: var(--casa-off-black-02, #282828); }
.v3-table tbody th.v3-table__rowhead { width: 34%; }
/* The Lewis column. Reading a comparison means finding one column and staying
   in it, and a tint does that in a way a bold heading does not. */
.v3-table tbody td:first-of-type { background: color-mix(in srgb, var(--casa-green-02, #f0f3a2) 28%, transparent); }
.v3-table thead th:nth-child(2) { background: var(--casa-green-02, #f0f3a2); color: var(--casa-green-04, #444835); }

/* The engine tab rail -----------------------------------------------------
   Seven tabs measure ~630px and the rail is the viewport, so on a phone the
   last three were not merely cut off: the wrapper was `overflow-hidden` and
   the driver only ever moved the underline, so there was no gesture and no
   control that could reach them. Three of the seven features simply did not
   exist on mobile, and the autoplay would still select them, sliding the
   underline off-screen under a row that had stopped changing.

   `overflow-hidden` is a Tailwind utility and therefore layered, so this
   unlayered rule wins on the x axis without touching the y axis, which still
   has to clip the underline. `showTab` in app.js does the other half and
   keeps the active tab scrolled into view. */
/* Deliberately NOT scroll-behavior: smooth. With it set, the scrollLeft the
   driver assigns is animated by the engine, and anywhere that animation is
   switched off (reduced motion, embedded webviews, automation) the scroll
   silently does not happen at all and the tab is unreachable again. A snap is
   the honest failure mode: it always moves. */
.tabs-rail { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tabs-rail::-webkit-scrollbar { display: none; }
@media (max-width: 1023px) {
  .tabs-rail {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
  }
}

/* Clauses a phone does without ----------------------------------------------
   Not a second copy of the paragraph: one paragraph, with the elaborating
   clauses wrapped so a phone gets the claim and the payoff and skips the
   middle. Two copies would be the same prose twice in the markup, which is
   what a crawler reads. The sentences either side have to stand alone with
   this removed, so check the read before wrapping anything new. */
.v3-wide-only { display: none; }
@media (min-width: 768px) { .v3-wide-only { display: inline; } }

/* Link tiles --------------------------------------------------------------
   The internal-linking surface. Four of these at the bottom of a page is the
   difference between forty pages and forty orphans. */
.v3-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; }
.v3-tile {
  display: flex; flex-direction: column; gap: 8px;
  height: 100%; padding: 26px 26px 22px;
  background: var(--casa-off-white-01, #f8f8f1);
  border-radius: 24px;
  transition: background 275ms cubic-bezier(.5,1,.89,1);
}
.v3-tile:hover { background: var(--casa-off-white-02, #ebebe4); }
.v3-tile__title { font-weight: 500; }
.v3-tile__body { flex: 1; }
.v3-tile__go { margin-top: 10px; color: var(--casa-off-white-04, #8e8f84); }
.v3-tile:hover .v3-tile__go { color: var(--casa-off-black-02, #282828); }
@media (max-width: 1000px) { .v3-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .v3-tiles { grid-template-columns: 1fr; } }

/* An iMessage exchange on a page that is not the hero. The hero's `.hero-thread`
   is sized against a full-bleed photograph; this one sits in a column. */
.v3-thread { width: 100%; max-width: 460px; }

/* `pv` panels off the landing page ---------------------------------------
   There the five panels crossfade inside one box, so they all carry the same
   16:9 and have to. A single panel on a benefit page does not, and keeping the
   ratio would leave a band of empty green under three rows of text. */
/* `container-type: size` is size containment on BOTH axes, which means the
   panel's height cannot come from its contents, so dropping the aspect ratio
   and nothing else collapsed it to zero pixels tall, with three rows of markup
   inside it and no error anywhere. It has to become `inline-size` containment:
   the width is still queryable (the type scale is `2.35cqw` and that is the
   whole reason these panels read as one object at any column width), the height
   comes from the rows, and every `cqh` length underneath (which would otherwise
   resolve against the VIEWPORT once its container stops offering a block axis)
   is restated as a pixel value. Those pixels are scaled by scale.css like every
   other length here. */
/* Repeated inside a max-width: 767px query up by `.pv` for the landing
   page's tab panels, for the same reason. EDIT BOTH. */
.pv--auto { aspect-ratio: auto !important; container-type: inline-size; }
.pv--auto .pv-pad { position: static; padding: 30px 26px; gap: 12px; }
.pv--auto .pv-rows { gap: 12px; }
.pv--auto .pv-row { padding: 16px 18px; }
.pv--auto .pv-foot { margin-top: 10px; padding-inline: 0; }
.pv--auto .pv-half { gap: 10px; }
.pv--auto .pv-price { padding: 16px 18px; }
.pv--auto .pv-log-head, .pv--auto .pv-log-row { padding: 11px 0; }

/* The accordion, server-rendered ----------------------------------------
   `.faq-panel` on the landing page is created by app.js with its height and
   opacity set inline. Here the panel is in the HTML, which is the whole point:
   the answers are the most searchable prose on the site, so the closed state
   has to be expressible in CSS as well as inline, or the page flashes every
   answer open before the script runs. */
[data-faq] .faq-panel { height: 0; opacity: 0; }
[data-faq] .faq-panel[data-open="true"] { opacity: 1; }

/* ===========================================================================
   Sections that exist so the pages are not all one page

   Forty pages built from hero / prose / card grid / FAQ, in that order, is a
   site that reads as a template with the words changed. These six give a page
   a shape that carries something: faces on a company page, a spec list on a
   policy page, a rail with dates on a history page, and one sentence alone on
   the screen where a page has exactly one claim to make.
   =========================================================================== */

/* Faces -------------------------------------------------------------------
   Two per row, and no more, whatever the count: three headshots across a
   1,100px column is a staff directory, and the point of the block is that
   there are two people and you can read a paragraph about each. */
.v3-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .v3-people { grid-template-columns: 1fr; } }

.v3-person {
  display: flex; flex-direction: column; gap: 20px;
  padding: 32px 30px 34px; border-radius: 40px;
  background: var(--casa-off-white-01, #f8f8f1);
}
@media (min-width: 768px) { .v3-person { padding: 40px 36px 42px; } }

.v3-person__pic {
  width: 88px; height: 88px; border-radius: 999px; overflow: hidden; flex: none;
  background: var(--casa-off-white-02, #ebebe4);
}
.v3-person__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A missing headshot has to look like a decision rather than like a 404, so the
   fallback is a monogram in the brand's own chip colours. It is what renders
   until somebody drops a file in and names it. */
.v3-person__mono {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: var(--casa-green-01, #e5f3f8); color: var(--casa-green-04, #194d5a);
  font-size: 30px; font-weight: 500; letter-spacing: -.02em;
}
.v3-person__text { display: flex; flex-direction: column; gap: 8px; }
.v3-person__name { color: var(--casa-off-black-02, #282828); }
.v3-person__role { color: var(--casa-off-white-04, #8e8f84); font-size: 15px; }
.v3-person__body { margin-top: 8px; }
.v3-person__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.v3-person__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--casa-off-white-03, #c7c7bd);
  font-size: 14px; color: var(--casa-off-black-02, #282828);
  transition: background-color .2s ease, border-color .2s ease;
}
.v3-person__link:hover { background: var(--casa-off-white-02, #ebebe4); border-color: var(--casa-off-white-02, #ebebe4); }

/* One sentence, alone --------------------------------------------------- */
.v3-statement { padding-block: 8px; }
.v3-statement .site-grid--content {
  background: var(--casa-green-04, #194d5a); color: var(--casa-off-white-01, #f8f8f1);
  border-radius: 40px; padding: 60px 32px 64px;
}
@media (min-width: 768px) { .v3-statement .site-grid--content { padding: 96px 64px 100px; } }
.v3-statement__line { max-width: 900px; }
.v3-statement__foot { color: rgba(248,248,241,.66); }
.v3-statement a { color: var(--casa-green-02, #c9e3ec); text-decoration: underline; text-underline-offset: 2px; }

/* A painting, in the column -------------------------------------------- */
.v3-figure { width: 100%; max-width: 880px; border-radius: 32px; overflow: hidden; background: var(--casa-off-white-01, #f8f8f1); }
.v3-figure img { display: block; width: 100%; height: auto; }

/* Prose beside a short list -------------------------------------------- */
.v3-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .v3-split { grid-template-columns: 1fr; gap: 24px; } }
/* `order` rather than a second grid definition, so the SOURCE order is always
   prose-then-list and a screen reader gets the argument before the summary of
   it, whichever side the summary is drawn on. */
.v3-split--flip .v3-split__text { order: 2; }
.v3-split--flip .v3-aside { order: 1; }
.v3-split__text { max-width: none; }
.v3-aside {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 30px; border-radius: 32px;
  background: var(--casa-off-white-01, #f8f8f1);
  position: sticky; top: 120px;
}
@media (max-width: 900px) { .v3-aside { position: static; } }
.v3-aside__title {
  font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--casa-off-white-04, #8e8f84);
}
.v3-aside__list { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 0; }
.v3-aside__list li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.v3-aside__list li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 999px;
  background: var(--casa-green-03, #86bfd4);
}
.v3-aside__foot { font-size: 14px; line-height: 1.5; color: var(--casa-off-white-04, #8e8f84); padding-top: 4px; }
.v3-aside a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* Dated entries down a rule -------------------------------------------- */
.v3-tl { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.v3-tl__item { position: relative; padding: 0 0 34px 32px; }
.v3-tl__item::before {
  content: ""; position: absolute; left: 5px; top: 12px; bottom: -6px; width: 1px;
  background: var(--casa-off-white-03, #c7c7bd);
}
.v3-tl__item:last-child::before { display: none; }
.v3-tl__item::after {
  content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 999px;
  background: var(--casa-green-03, #86bfd4);
}
.v3-tl__when {
  display: block; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--casa-off-white-04, #8e8f84); margin-bottom: 6px;
}
.v3-tl__title { margin-bottom: 6px; }
.v3-tl__body { color: var(--casa-off-black-02, #282828); }
.v3-tl__body a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* Term and value ------------------------------------------------------- */
.v3-defs { display: flex; flex-direction: column; gap: 0; margin: 0; max-width: 880px; }
.v3-def {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px 32px;
  padding: 20px 0; border-top: 1px solid var(--casa-off-white-02, #ebebe4);
}
.v3-def:last-child { border-bottom: 1px solid var(--casa-off-white-02, #ebebe4); }
@media (max-width: 700px) { .v3-def { grid-template-columns: 1fr; gap: 6px; } }
.v3-def dt { font-weight: 500; color: var(--casa-off-black-02, #282828); }
.v3-def dd { margin: 0; color: var(--casa-off-white-04, #8e8f84); line-height: 1.55; }
.v3-def dd a { color: var(--casa-off-black-02, #282828); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* The contact form ---------------------------------------------------------
   The only place on the marketing site that takes input. Fields are Casa-shaped
   (a 999px pill for one line, a 24px radius for the box) but the type is the
   browser's default 16px and not the design system's 15: on iOS anything under
   16px in a focused input triggers a zoom, and a page that zooms when you tap a
   field is a page you have to pinch back out of before you can read your own
   answer. */
.v3-form {
  display: flex; flex-direction: column; gap: 28px;
  max-width: 880px; padding: 36px 30px 38px; border-radius: 40px;
  background: var(--casa-off-white-01, #f8f8f1);
}
@media (min-width: 768px) { .v3-form { padding: 48px 44px 50px; } }
.v3-form__head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.v3-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 700px) { .v3-form__grid { grid-template-columns: 1fr; } }
.v3-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.v3-field--wide { grid-column: 1 / -1; }
.v3-label { font-size: 14px; font-weight: 500; color: var(--casa-off-black-02, #282828); }
.v3-label em { font-style: normal; font-weight: 400; color: var(--casa-off-white-04, #8e8f84); }

.v3-input {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--casa-off-black-02, #282828);
  background: var(--casa-white, #fff);
  border: 1px solid var(--casa-off-white-03, #c7c7bd); border-radius: 999px;
  padding: 0 18px; height: 50px; outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.v3-input::placeholder { color: var(--casa-off-white-04, #8e8f84); }
.v3-input:focus-visible {
  border-color: var(--casa-green-04, #194d5a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--casa-green-03, #86bfd4) 40%, transparent);
}
/* The one field that is not one line stops being a pill: a 999px radius on a
   seven-row box is a lozenge with text in it. */
.v3-textarea { height: auto; border-radius: 24px; padding: 16px 18px; line-height: 1.5; resize: vertical; min-height: 150px; }
.v3-select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 13' fill='none'%3E%3Cpath d='M5.756 9.334 9.028 6.063l1.029 1.028L5.028 12.12 0 7.091l1.028-1.028 3.273 3.271V0h1.455v9.334Z' fill='%238e8f84'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 11px 13px; }

.v3-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.v3-form__go {
  flex: none; height: 50px; padding: 0 30px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--casa-off-black-02, #282828); color: var(--casa-white, #fff);
  font: inherit; font-size: 16px; font-weight: 500;
  transition: background-color .275s cubic-bezier(.25,1,.5,1), opacity .2s ease;
}
.v3-form__go:hover { background: var(--casa-off-black-01, #444); }
.v3-form__go[disabled] { opacity: .55; cursor: default; }
.v3-form__note { flex: 1; min-width: 220px; font-size: 14px; line-height: 1.5; color: var(--casa-off-white-04, #8e8f84); }
.v3-form__note a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* Empty until there is something to say. `role="status"` means a screen reader
   is told the outcome without the focus moving, which is the difference between
   a form that answered and a form that appeared to do nothing. */
.v3-form__status:empty { display: none; }
.v3-form__status {
  padding: 14px 18px; border-radius: 16px; font-size: 15px; line-height: 1.45;
  background: var(--casa-clay-01, #ffe3c9); color: var(--casa-clay-04, #7e2e1a);
}
.v3-form__status[data-ok="true"] { background: var(--casa-green-01, #e5f3f8); color: var(--casa-green-04, #194d5a); }

/* The two heroes, and the one axis --------------------------------------
   Every generated page used to open on a left-aligned block in a column two
   thirds the width of the content area, with four hundred pixels of nothing
   beside it, and then continue with a left-aligned reading column that left the
   same hole all the way down. Forty of those is not a layout, it is a default.

   So: a page is either CENTRED on the same axis the home page's bands use, or
   it is genuinely two columns with something in the second one. Nothing sits
   left with a void to its right. */
/* The shared base is a real rule rather than a bare hook: a class in no
   stylesheet is inert, and the audit is right to fail on one. */
.v3-hero { width: 100%; }
.v3-hero--centre {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 20px; max-width: 850px; margin-inline: auto;
}
@media (min-width: 768px) { .v3-hero--centre { gap: 24px; } }
.v3-hero--centre .v3-crumbs ol { justify-content: center; }
/* `eyebrow()` carries `self-start`, which is right in every other block it
   appears in and pins the chip to the left edge here. */
.v3-hero--centre .text-eyebrow { align-self: center; }
.v3-hero--centre p { max-width: 650px; }
.v3-hero--centre > div:last-child { justify-content: center; }

/* Title against the left edge, the reason to read on beside it. Baseline-ish
   alignment (`end`) rather than `start`, so a two-line title and a three-line
   lede finish together instead of starting together and drifting. */
.v3-hero--split {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px clamp(32px, 5vw, 88px); align-items: end;
}
.v3-hero__lead { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.v3-hero__side { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-bottom: 4px; }
@media (max-width: 900px) {
  .v3-hero--split { grid-template-columns: 1fr; align-items: start; gap: 24px; }
}

/* The reading column is CENTRED, not left. Its width is the measure and always
   was; what was wrong was where the measure sat. */
.v3-prose,
.v3-defs,
.v3-tl,
.v3-form { margin-inline: auto; }
/* A prose section that follows a centred hero keeps its own left-aligned text:
   centring the WORDS of a long-form paragraph is the other way to make a page
   unreadable. Only the column moves. */

/* Inside the centred table block, the table keeps the full column and the
   footnote keeps a measure. Text alignment inside cells is untouched: a
   comparison row centred is a comparison nobody can scan down. */
.v3-table-wrap { align-self: stretch; }
.v3-table th, .v3-table td { text-align: left; }
