/* Phone fixes layered on top of the Claude Design export.
   Injected into every page by build.py; x-* classes are added to the
   source markup by build.py PATCHES. Selectors are prefixed with
   "html body" so they win over the pages' own !important rules. */

/* Pricing: the Midsize "Get in touch" button is white on a white card */
html body .x-gti { box-shadow: inset 0 0 0 1.5px #0b0d17; }

/* Press: announcement thumbnails are mostly logos; cover-cropping cut them to "Technol" / "tive" */
html body .x-annc > div:first-child img { object-fit: contain !important; padding: 16px; box-sizing: border-box; }

@media (max-width: 900px) {
  /* Home: product card screenshot was offset by a leftover top:50% */
  html body .r-pshot { top: auto !important; left: auto !important; }
}

/* User guide (design export rules): one column + hidden sidebar on tablets/phones */
@media (max-width: 1000px) {
  html body .ug-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; }
  html body .ug-toc { display: none !important; }
}
@media (max-width: 760px) {
  html body .ug-grid article h2 { font-size: 30px !important; }
}
/* Home hero, comp-cycle slide: drop the Dept and Band columns so the table fits a phone */
@media (max-width: 560px) {
  html body .x-ccy { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr) 58px !important; column-gap: 8px !important; }
  html body .x-ccy-opt { display: none !important; }
  html body .x-ccy-foot { grid-template-columns: minmax(0, 1fr) !important; }
  /* Hero slides: let names and pool lines wrap instead of cutting off with "…" */
  html body [aria-label$=" of 4"] [style*="text-overflow: ellipsis"] { white-space: normal !important; overflow: visible !important; }
}
/* Security page: "Responsible AI and safety" section moved over from the home page */
@media (max-width: 900px) {
  html body .x-rai-split { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; }
  html body .x-rai-card { padding: 20px 16px !important; gap: 20px !important; }
}
/* One heading style site-wide, matching the home page (all screen sizes):
   - the highlighted words in every h1/h2 use the same purple gradient, on dark and light sections
   - heading text is #e2e8f0 on dark sections and #151722 on light ones
   - headings are weight 400 */
html body h1 .k-grad, html body h2 .k-grad, html body h1 .k-grad2, html body h2 .k-grad2,
html body h1 span[style*="background-clip: text"], html body h2 span[style*="background-clip: text"] {
  background-image: linear-gradient(135deg, #a855f7, #c084fc) !important;
}
html body [style*="#06060f"] h1, html body [style*="#06060f"] h2,
html body [style*="rgb(6, 6, 15)"] h1, html body [style*="rgb(6, 6, 15)"] h2,
html body #latest .np-split h2, html body section[aria-label="Careers"] h2 { color: #e2e8f0 !important; }
html body h1, html body h2 { font-weight: 400 !important; }
/* Big gradient figures (Security: AES-256, SSL 4096): the tight letter-spacing pushed the last digit
   past the gradient's box, so its right edge wasn't painted */
html body span.k-grad[style*="font-size: 72px"] { padding-right: 0.12em; }
@media (max-width: 400px) { html body span.k-grad[style*="font-size: 72px"] { font-size: 60px !important; } }
/* Phone header: logo, Book a Demo and the menu button all fit inside the screen, as on the home page */
@media (max-width: 480px) {
  html body .n-bar { gap: 16px !important; }
  html body .n-bar .n-logo { width: 110px !important; height: 27px !important; }
  html body .n-bar .n-cta { font-size: 13.5px !important; padding: 9px 14px !important; white-space: nowrap !important; }
}
/* Phones: the shared ".c-wrap{padding:0 20px}" rule also wiped the top and bottom spacing of
   sections that keep it on the wrapper (About's closing call to action), so put it back */
@media (max-width: 760px) {
  html body section > .c-wrap[style*="padding: 72px 32px"], html body section > .c-wrap[style*="padding: 80px 32px"],
  html body section > .c-wrap[style*="padding: 96px 32px"], html body section > .c-wrap[style*="padding: 120px 32px"] {
    padding-top: 64px !important; padding-bottom: 64px !important;
  }
  html body section > .c-wrap[style*="padding: 40px 32px 64px"] { padding-top: 32px !important; padding-bottom: 56px !important; }
  html body section > .c-wrap[style*="padding: 48px 32px 72px"] { padding-top: 32px !important; padding-bottom: 56px !important; }
  html body footer > .c-wrap.f-wrap[style*="padding: 64px 32px 28px"] { padding-top: 64px !important; padding-bottom: 28px !important; }
  html body a[href="/careers"] { white-space: nowrap; }
}
/* Product pages on phones: 3-up value boxes (Increase / New salary / Compa-ratio, Minimum / Midpoint /
   Maximum) pushed their figures past the box edge; the P60 range label sat on top of P50 and P75;
   the reward-statement deck is scaled to 0.88 but kept its full 560px box, leaving a gap under it */
@media (max-width: 480px) {
  html body :is([style*="repeat(3, minmax(0px, 1fr)); gap: 10px"], [style*="repeat(3, minmax(0, 1fr)); gap: 10px"]) > [style*="padding: 14px; border-radius: 14px"] {
    padding: 12px 9px !important; min-width: 0;
  }
  html body :is([style*="repeat(3, minmax(0px, 1fr)); gap: 10px"], [style*="repeat(3, minmax(0, 1fr)); gap: 10px"]) > [style*="padding: 14px; border-radius: 14px"] > :is([style*="font-size: 22px"], [style*="font-size: 24px"]) {
    font-size: 18px !important; white-space: nowrap;
  }
  html body [style*="left: 37.5%; top: 30px"][style*="gap: 30px"] { gap: 46px !important; }
  /* Compensation Planning budget roll-up: Country / Department / Manager */
  html body :is([style*="repeat(3, minmax(0px, 1fr)); gap: 10px; width: 100%"], [style*="repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%"]) { gap: 6px !important; }
  html body :is([style*="repeat(3, minmax(0px, 1fr)); gap: 10px; width: 100%"], [style*="repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%"]) > * { padding: 10px 7px !important; }
  html body :is([style*="repeat(3, minmax(0px, 1fr)); gap: 10px; width: 100%"], [style*="repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%"]) > * > :first-child { font-size: 9.5px !important; letter-spacing: 0.04em !important; }
  html body :is([style*="repeat(3, minmax(0px, 1fr)); gap: 10px; width: 100%"], [style*="repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%"]) > * > :last-child { font-size: 12.5px !important; line-height: 1.3; }
  html body .np-deck { height: 480px !important; }
  /* AI Job Matching card: the P25 / P50 / P75 boxes ran past the card edge */
  html body :is([style*="grid-template-columns: 112px minmax(0px, 1fr)"], [style*="grid-template-columns: 112px minmax(0, 1fr)"]) {
    gap: 14px !important; padding: 18px !important;
  }
  html body [style*="flex-direction: column; padding: 8px 10px; border-radius: 10px"] { padding: 6px !important; min-width: 0; }
  html body [style*="flex-direction: column; padding: 8px 10px; border-radius: 10px"] > :last-child { font-size: 12px !important; }
  /* Market pricing agent answer: "Independent" ran into the next box */
  html body .k-in[style*="padding: 10px; border-radius: 12px"] { padding: 8px !important; min-width: 0; }
  html body .k-in[style*="padding: 10px; border-radius: 12px"] > [style*="font-size: 16px"] { font-size: 13px !important; overflow-wrap: anywhere; }
  /* AI Compensation Agent offer card: Base / Bonus / Equity figures touched the box edge */
  html body .k-in[style*="padding: 14px; border-radius: 14px"] { padding: 10px 8px !important; min-width: 0; }
  html body .k-in[style*="padding: 14px; border-radius: 14px"] > [style*="font-size: 17px"] { font-size: 14.5px !important; white-space: nowrap; }
  /* "Rollout in 2 weeks": 14 day labels nearly touched */
  html body .np-days { gap: 5px !important; }
  html body .np-days > * > span:last-child { font-size: 9.5px !important; letter-spacing: -0.02em; }
}
/* Home banner dots: the design's 40px tap-target rule for tabs stretched the 8px dots into 40px-tall
   blocks. Keep the 40px tap area but paint only the 8px bar in its middle. */
@media (max-width: 760px) {
  html body section[aria-label="Stello AI"] button[aria-label^="Go to slide"] {
    box-sizing: content-box !important; height: 8px !important; min-height: 0 !important;
    padding: 16px 0 !important; background-clip: content-box !important;
  }
}
/* Home banner: every slide's card is a card-motion video (build.py banner_videos) */
html body section[aria-label="Stello AI"] .r-v3:has(> .x-mpvid) { padding-top: 0 !important; }
/* The videos' own backdrop is a little lighter than the banner (up to rgb 24,24,51 vs 6,6,15), so
   a framed box showed. No frame or shadow: the edges fade into the banner, and the video is 8% wider
   than its column so the fade falls on the empty margin around the card, not on the card. */
html body section[aria-label="Stello AI"] .x-mpvid {
  width: 108% !important; max-width: none; margin: -3% -4%; border-radius: 0 !important;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent),
                      linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent),
              linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}
@media (max-width: 760px) {
  /* the 4 slides share the tallest slide's height; centring them made the headline jump between
     slides and the gap above the card vary from 32px to 138px. Pin every slide to the top. */
  html body section[aria-label="Stello AI"] .r-h3 { align-content: start !important; align-items: start !important; }
  /* phones only: the banner video floats, with a soft purple glow behind it that breathes with it
     (a shadow on the video itself would be cut off by its edge fade) */
  @keyframes x-hero-panel { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
  @keyframes x-hero-glow { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.9; } }
  html body section[aria-label="Stello AI"] .x-mpvid { position: relative; animation: x-hero-panel 5s ease-in-out infinite; }
  html body section[aria-label="Stello AI"] .r-v3:has(> .x-mpvid)::before {
    content: ""; position: absolute; inset: 10% 5% 0; pointer-events: none;
    background: radial-gradient(ellipse 60% 55% at 50% 60%, rgba(117, 100, 216, 0.45), transparent 70%);
    filter: blur(18px); animation: x-hero-glow 5s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body section[aria-label="Stello AI"] .x-mpvid,
  html body section[aria-label="Stello AI"] .r-v3::before { animation: none; }
}
/* Home "Customer stories", minimal slides (client's reference, 2026-11-13): square photo beside the quote;
   stacked under 900px, the photo still square. The four quotes differ in length, so each width range
   reserves the tallest slide's height and the page below doesn't jump when the slide changes. */
@media (min-width: 901px) {
  html body section[aria-label="Customer stories"] .x-story { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) !important; gap: clamp(48px, 6.5vw, 96px) !important; }
  html body section[aria-label="Customer stories"] .r-csimg { aspect-ratio: 1 / 1 !important; height: auto !important; width: 100% !important; max-width: none !important; }
}
@media (max-width: 900px) {
  html body section[aria-label="Customer stories"] .x-story { grid-template-columns: minmax(0, 1fr) !important; gap: 32px !important; }
  html body section[aria-label="Customer stories"] .r-csimg { aspect-ratio: 1 / 1 !important; height: auto !important; width: 100% !important; max-width: 520px; }
  html body section[aria-label="Customer stories"] .x-story-text { justify-content: flex-start !important; gap: 32px !important; padding: 0 !important; }
  html body section[aria-label="Customer stories"] .x-story-text figcaption { gap: 32px !important; }
  /* tabs above the slide on stacked layouts, so the height kept for the longest quote sits at the bottom of
     the section instead of as a gap between a short quote and the tabs */
  html body section[aria-label="Customer stories"] > .c-wrap { display: flex; flex-direction: column; }
  html body section[aria-label="Customer stories"] .x-csnav { order: -1; margin: 0 0 32px !important; }
}
@media (max-width: 480px) {
  html body section[aria-label="Customer stories"] .x-story-text blockquote { font-size: 19px !important; }
}
@media (min-width: 641px) and (max-width: 900px) { html body section[aria-label="Customer stories"] .x-story-text { min-height: 326px; } }
@media (min-width: 481px) and (max-width: 640px) { html body section[aria-label="Customer stories"] .x-story-text { min-height: 410px; } }
@media (min-width: 400px) and (max-width: 480px) { html body section[aria-label="Customer stories"] .x-story-text { min-height: 370px; } }
@media (min-width: 360px) and (max-width: 399px) { html body section[aria-label="Customer stories"] .x-story-text { min-height: 422px; } }
@media (max-width: 359px) { html body section[aria-label="Customer stories"] .x-story-text { min-height: 472px; } }
/* Home hero buttons, smaller (client, 2026-11-12): the page's own phone rule made them 15px/24px padding */
@media (max-width: 760px) {
  html body section[aria-label="Stello AI"] .m-cta > a { padding: 12px 20px !important; font-size: 15px !important; }
}
/* Home customer logos at getstello.ai's size (client, 2026-11-16: "keep current website size and format"): about 3-4
   large logos across a desktop, up to ~280px wide or ~140px tall, under its "Trusted by ..." heading. Each logo is
   trimmed to its drawn area (assets/logos/strip/) and sized by build.py _logo_box. Phones: .x-hlogos */
html body section[aria-label="Customers"] .k-marq { gap: 96px !important; }
html body section[aria-label="Customers"] .k-marq > div { width: auto !important; height: 150px !important; }
/* each logo carries its own balanced size (--w/--h, set in build.py _logo_box: equal area, capped) */
html body section[aria-label="Customers"] .k-marq img { width: var(--w) !important; height: var(--h) !important; max-width: none !important; max-height: none !important; }
/* larger logos and gaps make the loop longer, so it runs slower to keep the same scrolling speed */
html body section[aria-label="Customers"] .k-marq { animation-duration: 96s !important; }
/* the other pages' strips (aria-label="Proof"): same 13 logos and same format as the home page (2026-11-17) */
html body section[aria-label="Proof"] .k-marq { gap: 96px !important; animation-duration: 96s !important; }
html body section[aria-label="Proof"] .k-marq > div { width: auto !important; height: 150px !important; }
html body section[aria-label="Proof"] .k-marq img { width: var(--w) !important; height: var(--h) !important; max-width: none !important; max-height: none !important; }
/* Home hero text at the sizes getstello.ai uses (client, 2026-11-13): headings 54px, 36px up to 991px
   wide and 28px up to 400px, all at 1.2 line height; 16.5px subtext everywhere */
html body section[aria-label="Stello AI"] .h3-h1 { font-size: 54px !important; line-height: 1.2 !important; }
html body section[aria-label="Stello AI"] .r-htxt > p { font-size: 16.5px !important; }
@media (max-width: 991px) {
  html body section[aria-label="Stello AI"] .h3-h1 { font-size: 36px !important; letter-spacing: 0 !important; }
}
@media (max-width: 400px) {
  html body section[aria-label="Stello AI"] .h3-h1 { font-size: 28px !important; }
}
/* Customers "Customer stories" cards on phones: the 44px inner padding wrapped the "Read full case study"
   button onto two lines and "ADP Integration" too; the Syner-G photo panel kept a 440px desktop height
   around a 260px round photo, leaving a gap */
@media (max-width: 480px) {
  html body #stories .np-split > div:last-child { padding: 32px 24px !important; }
  html body #stories .np-split > div:last-child > a { padding: 15px 26px !important; font-size: 16px !important; }
  html body #stories .x-sg-photo { min-height: 330px !important; align-items: flex-start !important; padding-top: 28px; box-sizing: border-box; }
  html body #stories .x-sg-photo > span:first-child { width: 220px !important; height: 220px !important; }
  html body #stories .x-os-logo { min-height: 200px !important; }
}
/* Outschool and Syner-G case studies: word stats ("Leadership Team", "ADP Integration") broke onto two
   oversized lines on phones */
@media (max-width: 480px) {
  html body :is(section[aria-label="Outschool case study"], section[aria-label="Syner-G Biopharma case study"]) .k-glass .k-grad { font-size: 34px !important; letter-spacing: -0.03em !important; }
  html body :is(section[aria-label="Outschool case study"], section[aria-label="Syner-G Biopharma case study"]) .k-glass { min-height: 120px !important; }
}
/* Syner-G case study: the quote box's 64px padding left the long quote a narrow column on phones */
@media (max-width: 600px) {
  html body figure.x-cs-quote { padding: 36px 24px !important; gap: 22px !important; }
}
/* AI Market Pricing, "Market Data library": on phones the P25/P50/P75 figures ran together and into the
   score ring, so they move under the survey name and the ring takes the right column */
@media (max-width: 480px) {
  html body :is([style*="minmax(0, 1.4fr) minmax(0, 1fr) 64px"], [style*="minmax(0px, 1.4fr) minmax(0px, 1fr) 64px"]) {
    grid-template-columns: minmax(0, 1fr) 50px !important; row-gap: 10px !important;
  }
  html body :is([style*="minmax(0, 1.4fr) minmax(0, 1fr) 64px"], [style*="minmax(0px, 1.4fr) minmax(0px, 1fr) 64px"]) > :nth-child(2) { grid-column: 1; grid-row: 2; gap: 2px !important; }
  html body :is([style*="minmax(0, 1.4fr) minmax(0, 1fr) 64px"], [style*="minmax(0px, 1.4fr) minmax(0px, 1fr) 64px"]) > :nth-child(2) > span { justify-content: flex-start !important; gap: 14px; }
  html body :is([style*="minmax(0, 1.4fr) minmax(0, 1fr) 64px"], [style*="minmax(0px, 1.4fr) minmax(0px, 1fr) 64px"]) > :nth-child(2) > span > span { min-width: 38px; }
  html body :is([style*="minmax(0, 1.4fr) minmax(0, 1fr) 64px"], [style*="minmax(0px, 1.4fr) minmax(0px, 1fr) 64px"]) > :nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
}
/* Blog: on phones the featured cover sits above the text at its own 16:9 shape */
@media (max-width: 760px) {
  html body #latest .np-split > div:first-child { order: -1 !important; min-height: 0 !important; aspect-ratio: 16 / 9; }
}
/* Careers page */
@media (max-width: 960px) {
  html body .x-car-2col { grid-template-columns: minmax(0, 1fr) !important; gap: 40px !important; }
  html body .x-car-team { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
  /* names are in the team section below; the label is too cramped on a phone-size collage */
  html body .x-car-collage figcaption { display: none !important; }
  html body .x-car-team { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  html body section[aria-label="Careers"], html body section[aria-label="Our mission"], html body section#team,
  html body section#roles { padding-top: 64px !important; padding-bottom: 64px !important; }
}
@media (max-width: 960px) {
  /* Home hero slides: text and product card had 0 gap once stacked */
  html body .r-h3 { row-gap: 32px !important; }
}

/* Touch screens keep :hover after a tap; don't lift the product shot into the button */
@media (hover: none) {
  html body .r-pcard:hover .r-pshot { transform: none !important; }
}

@media (max-width: 760px) {
  /* Home: hide the product walkthrough video under the hero on phones (client request) */
  html body section[aria-label="Stello product video"] { display: none !important; }

  /* Home: customer logo strip used 180px slots, 40px-tall logos and a 120px edge fade,
     so a phone showed ~1.5 logos in a tall white band. Tighten to match the product pages. */
  html body .x-hlogos { padding: 20px 0 !important; }
  html body .x-hlogos .k-fade {
    margin: 0 -20px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%) !important;
    mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%) !important;
  }
  html body .x-hlogos .k-marq { gap: 44px !important; padding: 0 16px; }
  html body section.x-hlogos .k-marq > div { width: auto !important; height: 110px !important; }
  html body section.x-hlogos .k-marq div > img { width: calc(var(--w) * 0.72) !important; height: calc(var(--h) * 0.72) !important; }
  html body .x-trusted { font-size: 19px !important; margin-bottom: 20px !important; }
  /* Home: breathing room between the card button and its product shot */
  html body .r-pshot { margin-top: 36px !important; }

  /* Home: show the desktop integrations orbit instead of the plain list.
     The rotating pills sweep ~650px wide; at 0.5 they keep ~20px clear of both edges of a phone. */
  html body .r-orbwrap { display: block !important; height: 285px !important; margin: 0 -20px; }
  html body .r-orbbox { transform: scale(0.5) !important; }
  /* the two logo rings turn in opposite directions; squeezed onto a phone, their chips slid over
     each other every few seconds. Some logos sit only 115-190px from a neighbour (chips are 140-150px
     wide), so even turning both rings together made them touch. On phones the rings hold still in
     their resting layout (no overlaps) and each logo floats gently instead. */
  @keyframes x-orb-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
  html body .r-orbbox :is(.k-o1, .k-o2) { animation: none !important; }
  /* at rest the top logo (HiBob) sat 1px above the clipped area; 8px down leaves room for its float */
  html body .r-orbbox { top: 8px !important; }
  html body .r-orbbox :is(.k-o1r, .k-o2r) { animation: x-orb-bob 4s ease-in-out infinite !important; }
  html body .r-orbbox .k-o2r { animation-delay: -2s !important; }
  html body .r-orblist { display: none !important; }

  /* Product heroes: the tall 60%-wide glow read as a rounded pillar; spread it across */
  html body .x-phero {
    background-image: radial-gradient(150% 38% at 50% 0%, rgba(117, 100, 216, 0.5) 0%, rgba(117, 100, 216, 0) 70%) !important;
  }

  /* Product heroes: 2624x1360 video shrank to ~200px with fades covering most of it.
     Crop in so the app UI is legible, and shorten the fades. */
  html body .x-pvid { overflow: hidden; margin-top: 4px !important; }
  /* whole frame visible: at 112% the floating cards at both edges were cut off */
  html body .x-pvid > video { width: 100% !important; max-width: 100%; margin-left: 0; }
  /* product heroes: compact buttons, the tour label on one line */
  html body .x-phero .m-cta { gap: 10px !important; flex-direction: column !important; align-items: center !important; width: 100% !important; align-self: stretch !important; }
  html body .x-phero .m-cta > a, html body .x-phero .m-cta > button {
    width: 100% !important; max-width: 320px !important; box-sizing: border-box !important; justify-content: center !important;
  }
  html body .x-phero .m-cta > a, html body .x-phero .m-cta > button {
    font-size: 16px !important; padding: 14px 16px !important; gap: 8px !important; white-space: nowrap !important;
  }
  html body .x-pvid > div:nth-child(1) { height: 40px !important; }
  html body .x-pvid > div:nth-child(2) { height: 36px !important; }

  /* Home: the three agent tabs scrolled sideways (only 1.5 visible); stack them */
  html body .m-agtabs { flex-direction: column !important; overflow: visible !important; }
  html body .m-agtabs > button { flex: 0 0 auto !important; padding: 12px 16px !important; }
  /* Pricing compare table: label on its own line, plans side by side */
  html body section[aria-label="Compare plans"] .a-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 16px !important;
    row-gap: 6px !important;
  }
  html body section[aria-label="Compare plans"] .a-row > span:first-child { grid-column: 1 / -1; }
  html body section[aria-label="Compare plans"] .a-row:first-child > span:first-child { display: none; }

  /* Partners: photos under each program card were 420px tall */
  html body .np-split > div:has(> img:only-child) { min-height: 240px !important; }

  /* Product pages: security feature cards had a tall empty gap */
  html body .x-feat { min-height: 0 !important; gap: 16px !important; }
}

@media (max-width: 560px) {
  /* Customer logo strip (product, pricing, customers, implementation pages):
     the desktop 176x72 bordered cards looked heavy on a phone; show plain
     logos like the home page strip */
  html body section[aria-label="Proof"] { padding: 28px 0 !important; gap: 6px !important; }
  html body section[aria-label="Proof"] .k-marq { gap: 44px !important; padding: 4px 16px !important; }
  html body section[aria-label="Proof"] .k-marq > * {
    width: auto !important; height: 110px !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
  }
  html body section[aria-label="Proof"] .k-marq img { width: calc(var(--w) * 0.72) !important; height: calc(var(--h) * 0.72) !important; max-width: none !important; max-height: none !important; }

  /* About: hero numbers row — three even columns, "2 weeks" fits */
  html body .x-nums { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html body .x-nums .k-grad { font-size: 22px !important; line-height: 28px !important; letter-spacing: -0.03em !important; }
  html body .x-nums > div { padding-right: 10px !important; margin-right: 10px !important; }
  html body .x-nums > div:last-child { border-right: 0 !important; padding-right: 0 !important; margin-right: 0 !important; }
  html body .x-nums > div > span:last-child { font-size: 13px !important; line-height: 18px !important; }

  /* Stacked full-width hero buttons are block links: center their labels */
  html body .m-cta > a, html body .m-cta > button { text-align: center !important; }

  /* About: WSJ feature card kept 56px desktop padding and a 40px headline */
  html body .x-wsj { padding: 28px 22px !important; gap: 28px !important; }
  html body .x-wsj h3 { font-size: 28px !important; line-height: 33px !important; }

  /* Product pages: AI agent card header — the "who is asking" switch was 200px wide
     and its labels overlapped; give it its own full-width row */
  html body div:has(> [aria-label="Who is asking"]) { flex-wrap: wrap !important; }
  html body [aria-label="Who is asking"] { width: 100% !important; flex: 1 1 100% !important; }
  html body [aria-label="Who is asking"] button {
    white-space: normal !important; line-height: 1.2 !important; text-align: center !important;
    font-size: 12.5px !important; padding-left: 6px !important; padding-right: 6px !important;
  }

  /* Home hero: "8–12 weeks in spreadsheets" bar was too narrow for its 15px label */
  html body .x-cyc { grid-template-columns: 22% 28px minmax(0, 1fr) !important; gap: 8px !important; }
  html body .x-cyc > span:last-child { font-size: 12px !important; padding: 0 10px !important;
  }

  /* Press: announcement cards squeezed text beside a 180px image */
  html body .x-annc { grid-template-columns: minmax(0, 1fr) !important; }
  html body .x-annc > div:first-child { min-height: 170px !important; }

  /* Security: privacy accordion — body spans the full card width */
  html body .x-acc {
    grid-template-columns: 40px minmax(0, 1fr) 28px !important;
    gap: 14px 12px !important;
    padding: 18px !important;
  }
  html body .x-acc > span:first-child { width: 40px !important; height: 40px !important; border-radius: 12px !important; }
  html body .x-acc > div { display: contents !important; }
  html body .x-acc > div > :first-child { grid-column: 2; grid-row: 1; }
  html body .x-acc > div > :not(:first-child) { grid-column: 1 / -1; }
  html body .x-acc > span:last-child { grid-column: 3; grid-row: 1; }

  /* Compensation planning: equity orbit (440px) was wider than the screen */
  html body .x-orbit { zoom: 0.62; }
}
/* Customers page story cards (client's reference, 2026-11-13): photo zooms slightly on hover; one per row on
   phones with the logo and headline closer to the edges */
html body .x-ccard:hover .x-ccard-img { transform: scale(1.03); }
html body .x-ccard:hover .x-ccard-more { background: #ffffff; color: #151722; border-color: #ffffff; }
@media (min-width: 761px) and (max-width: 1080px) {
  html body .x-ccard { aspect-ratio: 1 / 1 !important; }
}
@media (max-width: 760px) {
  html body .x-cgrid { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
}
@media (max-width: 480px) {
  html body .x-ccard-logo { left: 24px !important; top: 24px !important; }
  html body .x-ccard-text { left: 24px !important; right: 24px !important; bottom: 24px !important; }
  html body .x-ccard { aspect-ratio: 4 / 5 !important; }
  html body .x-ccard-img { object-position: center top; }
  html body .x-ccard-title { font-size: 18px !important; }
}
/* Customers page results row: two by two on tablets and phones, lines between the pairs */
@media (max-width: 900px) {
  html body .x-res { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 40px; }
  html body .x-res-cell:nth-child(3) { border-left: 0 !important; }
  html body .x-res-cell:nth-child(n+3) { padding-top: 40px !important; border-top: 1px solid #dcdce4; }
}
@media (max-width: 480px) {
  html body .x-res { margin: 0 !important; row-gap: 32px; }
  html body .x-res-cell { padding: 4px 16px 0 !important; }
  html body .x-res-cell:nth-child(odd) { padding-left: 0 !important; }
  html body .x-res-cell:nth-child(n+3) { padding-top: 32px !important; }
  html body .x-res-cell > span:first-child { font-size: 52px !important; }
  html body .x-res-cell > span:nth-child(2) { font-size: 14.5px !important; line-height: 21px !important; }
  html body .x-res-cell > img { padding-top: 24px !important; }
}
/* About page team: square cards (2026-11-14), three per row with the last two centred; two, then one as it narrows.
   Smaller (client, 2026-11-17: "make employee photos smaller"): the grid is capped at 900px. */
html body .x-team { width: 100%; max-width: 1176px; margin: 0 auto; }
/* client, 2026-11-17: three on row one (Jacob, Aviral, Clare), the other five on row two; .x-team-br ends row one */
html body .x-team > .x-flip { width: calc((100% - 64px) / 5); }
html body .x-team > .x-team-br { flex-basis: 100%; height: 0; margin-top: -16px; }
/* at five across the cards are ~220px: names one size down, the Bio chip as just its icon, so names stay on one line */
@media (min-width: 1001px) {
  html body .x-team .x-flip-front > div > div > span:first-child { font-size: 16px !important; white-space: nowrap; }
  html body .x-team .x-flip-front > div { left: 16px !important; right: 12px !important; bottom: 14px !important; }
  html body .x-team .x-flip-hint { font-size: 0 !important; gap: 0 !important; padding: 7px !important; }
}
@media (max-width: 1000px) {
  html body .x-team > .x-flip { width: calc((100% - 32px) / 3); }
}
@media (max-width: 760px) {
  html body .x-team > .x-team-br { display: none; }
  html body .x-team > .x-flip { width: calc((100% - 16px) / 2); }
}
@media (max-width: 520px) {
  html body .x-team > .x-flip { width: 100%; max-width: 260px; }
}
/* About page advisors (2026-11-17): small photo beside the text; one per row on narrow screens */
@media (max-width: 900px) {
  html body .x-adv { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 520px) {
  html body .x-adv > div { gap: 16px !important; padding: 18px !important; }
  html body .x-adv img { width: 88px !important; height: 88px !important; border-radius: 14px !important; }
}
/* Case study pages on phones (2026-11-14): the 18px desktop paragraphs made the full client text very long,
   and the 56px column gap was left between each heading and its text once they stack */
@media (max-width: 600px) {
  html body:has(section[aria-label$="case study"]) p[style*="font-size: 18px; line-height: 30px"] { font-size: 16.5px !important; line-height: 27px !important; }
  html body:has(section[aria-label$="case study"]) .r-sec .r-split.m-g1 { row-gap: 20px !important; }
  html body:has(section[aria-label$="case study"]) .r-sec .r-split.m-g1 > span:empty { display: none; }
  html body .x-cb-article p { font-size: 16.5px !important; line-height: 28px !important; }
  html body .x-cb-article blockquote { font-size: 20px !important; line-height: 30px !important; }
  html body .x-cb-article figure > div { padding: 14px !important; }
  /* Homeward's quote: name beside the photo, not under it */
  html body:has(section[aria-label="Homeward Health case study"]) figure.x-cs-quote figcaption { flex-wrap: nowrap !important; }
  html body:has(section[aria-label="Homeward Health case study"]) ul.g-2 { gap: 10px !important; }
  html body:has(section[aria-label="Homeward Health case study"]) ul.g-2 > li { padding: 16px 18px !important; gap: 12px !important; }
  html body:has(section[aria-label="Homeward Health case study"]) ul.g-2 > li > span:last-child { font-size: 15.5px !important; line-height: 24px !important; }
}
/* About page team flip cards (client, 2026-11-14): photo on the front, full bio on the back. Mouse: hover
   flips. Touch and keyboard: tapping/focusing the card flips it, tapping elsewhere turns it back. */
@media (hover: hover) {
  html body .x-flip:hover .x-flip-in { transform: rotateY(180deg); }
}
html body .x-flip:focus .x-flip-in, html body .x-flip:focus-within .x-flip-in { transform: rotateY(180deg); }
html body .x-flip:focus-visible .x-flip-back { box-shadow: 0 0 0 3px #c7b7ff; }
html body .x-flip-bio::-webkit-scrollbar { width: 4px; }
html body .x-flip-bio::-webkit-scrollbar-thumb { background: rgba(199,183,255,0.4); border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  html body .x-flip-in { transition: none !important; }
}
@media (max-width: 520px) {
  html body .x-flip-bio { font-size: 13.5px !important; line-height: 20px !important; }
}
/* Product page banner videos looked soft (client, 2026-11-16): the 2624px recordings were stretched across the
   whole window, so on high-density screens anything over 1312px wide was upscaled. Cap them at 1312px (sharp at
   2x) and fade the sides into the page once the window is wider than that. */
@media (min-width: 761px) {
  html body .x-pvid > video { max-width: 1312px !important; margin-left: auto !important; margin-right: auto !important; }
}
@media (min-width: 1313px) {
  html body .x-pvid > video {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  }
}
/* About banner without photos (2026-11-17): on phones the three number cards stay in a row, smaller */
@media (max-width: 560px) {
  html body .x-ahero .c-wrap { padding: 48px 16px 56px !important; gap: 18px !important; }
  html body .x-ahero p { font-size: 16.5px !important; line-height: 26px !important; }
  html body .x-ahero-nums { gap: 8px !important; margin-top: 16px !important; }
  html body .x-ahero-nums > div { padding: 16px 6px !important; border-radius: 16px !important; }
  html body .x-ahero-nums > div > span:first-child { font-size: 26px !important; line-height: 30px !important; }
  html body .x-ahero-nums > div > span:last-child { font-size: 12.5px !important; line-height: 17px !important; }
}
/* Spreadsheets vs Stello AI tables on the SEO pages (2026-11-17): on phones each row stacks, the row name on top and the
   two answers side by side under it, each with its column name */
@media (max-width: 560px) {
  html body .x-cmp table, html body .x-cmp tbody { display: block; }
  html body .x-cmp thead { display: none; }
  html body .x-cmp tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid #ebe9f5; }
  html body .x-cmp tbody tr:first-child { border-top: 0; }
  html body .x-cmp tbody th { grid-column: 1 / -1; border-top: 0 !important; padding: 16px 16px 6px !important; font-size: 15.5px !important; }
  html body .x-cmp td { border-top: 0 !important; padding: 8px 16px 16px !important; font-size: 14.5px !important; line-height: 21px !important; }
  html body .x-cmp td svg { display: none; }
  html body .x-cmp td::before { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
  html body .x-cmp td:nth-of-type(1)::before { content: "Spreadsheets"; }
  html body .x-cmp td:nth-of-type(2)::before { content: "Stello AI"; color: #7564d8; }
  html body .x-hchips li { font-size: 13px !important; padding: 7px 12px !important; }
}
/* SEO pages (2026-11-17, tools/seo_kit.py): the hero video card has less space around it on narrow screens, and the
   two-column "need / how Stello handles it" tables stack, label above text */
@media (max-width: 760px) {
  html body .x-hcard { margin: 28px auto 48px !important; border-radius: 16px !important; }
  html body .x-spec thead { display: none; }
  html body .x-spec tr, html body .x-spec th, html body .x-spec td { display: block; width: auto !important; }
  html body .x-spec th { padding: 18px 18px 6px !important; }
  html body .x-spec td { border-top: 0 !important; padding: 0 18px 18px 50px !important; font-size: 15.5px !important; }
  /* 2026-11-18 redesign: the need / how-Stello-handles-it cards go to one column */
  html body .x-specg-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html body .x-step, html body .x-card { padding: 24px 22px !important; }
  /* banner video on phones (2026-11-18): the clip has only ~18px of dark under its app panel at this size, so the 36px
     white fade covered the panel's bottom row; 20px of dark under the clip keeps the fade below the panel */
  html body .x-hvid { padding-bottom: 20px !important; }
}
/* All 8 product pages (2026-11-18: "reduce the white shadow gap between banner and logos"): the white fade under the
   banner video is 56px instead of 120px on desktop (phones keep 36px, above), and the logo heading sits 24px under the
   banner instead of 44px. */
@media (min-width: 761px) {
  html body .x-pvid > div:nth-child(2) { height: 56px !important; }
}
html body section:has(.x-pvid) + section[aria-label="Proof"] { padding-top: 24px !important; }
/* The 5 new pages (2026-11-18: "banner and video is too much gap"): each clip opens with ~52px of empty dark before its
   first floating label and ~130px before the app panel (at 1312px). On desktop the clip moves up by 5.8% of its width,
   over the banner's own dark, so the label sits ~24px under the text; the top fade would dim that label, so it goes. */
@media (min-width: 761px) {
  html body .x-hvid > video { margin-top: calc(min(100vw, 1312px) * -0.058) !important; position: relative; pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 calc(min(100vw, 1312px) * 0.034)) !important;
    mask-image: linear-gradient(180deg, transparent 0, #000 calc(min(100vw, 1312px) * 0.034)) !important; }
  html body .x-hvid > div:nth-child(1) { display: none !important; }
  /* the need / how-Stello-handles-it grid: an odd last card takes the full row */
  html body .x-specg-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* "Who uses" cards (2026-11-17): drop the desktop min-height on phones so the text sits under the icon */
@media (max-width: 760px) {
  html body div[style*="min-height: 230px"][style*="flex-direction: column"] { min-height: 0 !important; }
  html body div[style*="min-height: 230px"][style*="flex-direction: column"] > span[style*="margin-top: auto"] { margin-top: 6px !important; }
}
/* 4G Clinical story card (2026-11-18): full row, no photo; never forced square like the photo cards */
html body .x-ccard-wide { aspect-ratio: auto !important; }
@media (max-width: 760px) {
  html body .x-ccard-wide { min-height: 0 !important; padding: 26px !important; gap: 24px !important; }
  html body .x-ccard-wide .x-ccard-title { font-size: 21px !important; }
  /* phones: Michael's photo across the top of the card, the text under it */
  html body .x-ccard-wphoto { position: static !important; width: calc(100% + 52px) !important; height: auto !important; aspect-ratio: 4 / 3;
    margin: -26px -26px 0; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%) !important;
    mask-image: linear-gradient(180deg, #000 70%, transparent 100%) !important; }
  html body .x-ccard-wtext { max-width: 100% !important; }
}
/* Home customer stories carousel (2026-11-18): round arrows; on phones the counter and arrows share the top row and
   the story segments run full width under them */
.x-csarrow { width: 48px; height: 48px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: #ffffff;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.x-csarrow:hover { background: #ffffff; color: #06060f; border-color: #ffffff; }
.x-csarrow:focus-visible { outline: 2px solid #2ecec2; outline-offset: 3px; }
@media (max-width: 640px) {
  html body .x-csnav { flex-wrap: wrap; gap: 6px 16px !important; }
  html body .x-csnav-count { min-width: 0 !important; flex: 1; }
  html body .x-csnav-arrows { order: 2; }
  html body .x-csnav-bars { order: 3; flex-basis: 100% !important; }
  html body .x-csarrow { width: 42px; height: 42px; }
}


/* Clean white case studies (all six; tools/case_clean.py) */
.x-csw-main > :first-child { margin-top: 0 !important; }
@media (max-width: 960px) {
  html body .x-csw-cols { grid-template-columns: 1fr !important; gap: 48px !important; }
  html body .x-csw-feature { grid-template-columns: 220px minmax(0, 1fr) !important; gap: 36px !important; }
}
@media (max-width: 640px) {
  html body .x-csw .c-wrap { padding: 0 20px !important; }
  html body .x-csw-feature { grid-template-columns: 1fr !important; gap: 24px !important; padding: 32px 0 !important; margin-top: 32px !important; }
  html body .x-csw-feature > img { max-width: 200px; justify-self: start; }
  /* phone sizes as on the homepage (h2 28-30px) */
  html body .x-csw-main h2 { font-size: 30px !important; line-height: 1.15 !important; margin-top: 36px !important; }
  html body .x-csw-main h3 { font-size: 21px !important; line-height: 1.3 !important; }
  html body .x-csw-main p.x-lead { font-size: 18px !important; line-height: 1.55 !important; }
  html body .x-csw-main figure blockquote { font-size: 20px !important; }
  html body .x-csw-side { gap: 32px !important; }
  html body .x-csw-stat { padding: 14px 0 !important; }
  html body .x-csw-stat:first-child { padding-top: 0 !important; }
}

/* AI Offer Builder pictures (tools/make_offer_builder.py) */
@media (max-width: 640px) {
  html body .x-obp { padding: 18px !important; border-radius: 20px !important; }
  html body .x-obp .x-obg2 { grid-template-columns: 1fr !important; }
  html body .x-obrule { flex-wrap: wrap; }
  html body .x-obats { flex-direction: column; }
  html body .x-obats .x-obarrow { transform: rotate(90deg); }
  html body .x-obwhy { padding: 18px !important; }
  html body .x-obsheet { font-size: 11.5px !important; }
  html body .x-obsheet > span { padding: 7px 7px !important; }
  html body .x-obstat { min-width: 0 !important; padding: 12px !important; }
  html body .x-obhead { flex-wrap: wrap; }
  html body .x-obhead > span:nth-child(2) { flex: 1 1 calc(100% - 58px) !important; }
  html body .x-obhead > span:last-child:not(:nth-child(2)) { margin-left: 58px; }
}

/* AI Offer Builder approval workflow picture */
@media (max-width: 1024px) {
  html body .x-wf { grid-template-columns: 1fr !important; gap: 14px !important; }
  html body .x-wf .x-wfarrow span { transform: rotate(90deg); }
  html body .x-wfcards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
  html body .x-wfcards { grid-template-columns: 1fr !important; }
}

/* Phone menu: on short screens (e.g. 667px tall) the list ran past the bottom with no way to reach About, Contact and
   Log in, since the header is sticky. It now scrolls inside itself when it is taller than the screen. */
html body details.n-burger > div {
  max-height: calc(100vh - 92px);
  max-height: calc(100dvh - 92px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Mobile QA 2026-11-21: iPhone Safari zooms into any form field under 16px when tapped (Contact, Partners) */
@media (max-width: 900px) {
  html body input:not([type=checkbox]):not([type=radio]):not([type=range]),
  html body select,
  html body textarea { font-size: 16px !important; }
}
