/* CraveSorted on phones and tablets (12 Nov 2026). Loaded after site.css; desktop is untouched. */
@media (max-width: 980px) {
  html { -webkit-text-size-adjust: 100%; }
  html, body { overflow-x: clip; }
  body { -webkit-tap-highlight-color: transparent; }
  a, button, summary, label { touch-action: manipulation; }

  /* header: stays within reach, steps away while reading down, returns on the way up */
  .top { position: sticky; top: 0; transition: translate .32s cubic-bezier(.2,.8,.2,1), background-color .25s ease, color .25s ease; }
  .top-in { min-height: 60px; }
  html.top-away:not(.m-open) .top { translate: 0 -101%; }
  .jumpbar { top: 60px; transition: top .32s cubic-bezier(.2,.8,.2,1); }
  html.top-away .jumpbar { top: 0; }
  .top .brand, .foot .brand { min-height: 44px; display: inline-flex; align-items: center; }
  .menu-b { min-height: 44px; padding: 0 18px; font-size: 15px; align-items: center; }

  /* menu: a full screen of its own */
  html.m-open { overflow: hidden; }
  html.m-open .top { background: var(--roast); color: var(--cream); border-color: rgba(251,241,236,.14); --wm1: var(--cream); --wm2: var(--sand); }
  html.m-open .pill { opacity: 0; pointer-events: none; }
  .mnav:not([hidden]) { position: fixed; z-index: 19; left: 0; right: 0; top: 61px; bottom: 0; display: flex; flex-direction: column; gap: 0;
    background: var(--roast); color: var(--cream); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px max(24px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); }
  .mnav a { font-family: var(--display); font-size: clamp(30px, 8.4vw, 40px); line-height: 1.05; text-transform: uppercase; padding: 17px 0; border-bottom: 1px solid rgba(251,241,236,.14); color: inherit; }
  .mnav a[href*="/get-started/"] { order: 10; margin-top: 30px; min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 0 24px; border: 0; border-radius: 999px;
    background: var(--cream); color: var(--roast); font: 500 17px/1 var(--body); text-transform: none; }
  .mnav a[href*="/cafe-login/"] { order: 11; margin-top: 12px; min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid rgba(251,241,236,.4); border-radius: 999px;
    font: 500 16px/1 var(--body); text-transform: none; }
  .mnav a.region { order: 12; align-self: center; margin-top: 24px; display: inline-flex; padding: 0; border: 1px solid rgba(251,241,236,.5); border-radius: 999px; font: 500 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: 1; }
  .mnav a.region span { padding: 15px 20px; }
  .mnav a.region .r-on, .page .mnav a.region .r-on { background: var(--cream); color: var(--roast); }
  .mnav:not([hidden]) a { animation: m-in .5s cubic-bezier(.2,.8,.2,1) both; }
  .mnav a:nth-child(2) { animation-delay: .04s; } .mnav a:nth-child(3) { animation-delay: .08s; } .mnav a:nth-child(4) { animation-delay: .12s; }
  .mnav a:nth-child(5) { animation-delay: .16s; } .mnav a:nth-child(6) { animation-delay: .2s; } .mnav a:nth-child(7) { animation-delay: .24s; } .mnav a:nth-child(8) { animation-delay: .28s; }
  @keyframes m-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  /* everything you tap is at least 44px tall */
  .foot-cols > div { gap: 0; font-size: 16px; }
  .foot-cols a { display: flex; align-items: center; min-height: 44px; }
  .foot-cols p:not(.mono) { padding-block: 10px; }
  .foot-cols .mono { margin-bottom: 4px; }
  .foot-top [role="group"] a { min-height: 44px; display: inline-flex; align-items: center; }
  .foot-biz { font-size: 14px; line-height: 1.6; }
  .feat-index a, .jumpbar a { min-height: 46px; }
  .seg-chips button { min-height: 44px; padding: 0 15px; font-size: 14px; }
  .check { grid-template-columns: 28px 1fr; gap: 12px; font-size: 15px; line-height: 1.5; }
  .check input { width: 24px; height: 24px; margin-top: 0; }
  :not(p):not(li):not(span) > a[href^="tel:"], :not(p):not(li):not(span) > a[href^="mailto:"] { display: inline-flex; align-items: center; min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .fine { font-size: 14.5px; line-height: 1.5; }

  /* the Café Studio preview fits the screen */
  .sb-shot { max-width: 100%; }
  .sb-main { min-width: 0; }
}

@media (max-width: 640px) {
  /* feature cards: a swipe row with no dead space under it */
  .hgal { min-height: 0; display: block; padding-top: 64px; padding-bottom: 72px; }
  .hgal-track { scroll-padding-left: 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-right: 20px; }
  .hgal-track::-webkit-scrollbar { display: none; }
  .hgal-track > * { scroll-snap-align: start; }

  .sb-body { grid-template-columns: 78px minmax(0, 1fr); min-height: 0; }
  .sb-side { padding: 12px 6px; }
  .sb-side b { padding: 7px 8px; font-size: 11.5px; }
  .sb-main { padding: 12px; }
  .sb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sb-bars { height: 110px; gap: 6px; }

  .pill { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 52px; }
  .foot { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
}

/* short phones: the headline, the cards and the main button share the first screen */
@media (max-width: 640px) and (max-height: 760px) {
  .hero { padding-top: 28px; }
  .hero .hero-t { font-size: 38px; }
  .ring-stage { height: 232px; margin-bottom: 30px; }
  .hero .kicker { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .top, .jumpbar { transition: none; }
  .mnav:not([hidden]) a { animation: none; }
}

/* Features page on phones: each feature is a short card, details open on tap (12 Nov 2026) */
.m-more-b { display: none; }
@media (max-width: 640px) {
  .feat-head { gap: 16px; padding-top: 44px; }
  .feat-index { flex-wrap: nowrap; overflow-x: auto; margin: 6px -20px 0; padding: 2px 20px 10px; scroll-snap-type: x proximity; scrollbar-width: none; scroll-padding-left: 20px; }
  .feat-index::-webkit-scrollbar { display: none; }
  .feat-index a { flex: none; scroll-snap-align: start; white-space: nowrap; font-size: 15px; padding: 0 16px; }
  .fchap { padding-block: 52px 56px; }
  .fchap-n { margin-bottom: 10px; }
  .fchap .lede { margin: 14px 0 20px; font-size: 17px; }
  .fchap.m-fold .fchap-vis { min-height: 340px; margin-top: 4px; }
  .fchap.m-fold .photo, .fchap.m-fold.alt .photo { inset: 0 0 24% 0; border-radius: 20px; }
  .fchap.m-fold:not(.m-more) .fchap-cols { display: none; }
  .fchap.m-more .fchap-cols { margin-bottom: 26px; animation: m-in .4s cubic-bezier(.2,.8,.2,1) both; }
  .fchap-cols ol, .fchap-cols ul { font-size: 16px; gap: 10px; }
  .m-more-b { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 22px; padding: 0 20px;
    font: 500 15.5px/1.2 var(--body); color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; text-align: left; }
  .fchap.alt .m-more-b { background: rgba(255,255,255,.55); }
  .m-more-b svg { width: 18px; height: 18px; flex: none; transition: transform .3s ease; }
  .fchap.m-more .m-more-b svg { transform: rotate(180deg); }
  .m-more-b:focus-visible { outline: 3px solid #1C5CC7; outline-offset: 2px; }
  .cta2-photo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .m-more-b svg { transition: none; }
  .fchap.m-more .fchap-cols { animation: none; }
}

/* feature cards strip: let the row scroll sideways (it was as wide as its cards, so it could not move) */
@media (max-width: 899px) {
  .hgal-track { align-self: stretch; max-width: 100%; overscroll-behavior-x: contain; }
}

/* phones: headings and intros are fully readable at once instead of fading in letter by letter while scrolling */
@media (max-width: 640px) {
  [data-split="scrub"] .c, [data-words] .wd { opacity: 1 !important; }
}
