/* v157 public site on phones and tablets: loaded last on every site page. Keeps the current look; fixes fit,
   and gives the menu a proper sheet. Every rule is inside a max-width query, so desktop is unchanged. */

/* ---------- menu sheet (whenever the links fold into the menu button: up to 1320px) ---------- */
@media (max-width: 1320px) {
  .lp.site .nav-drop:not([hidden]) {
    display: flex !important; flex-direction: column; gap: 6px;
    position: fixed; z-index: 70; top: 84px; left: auto; right: 16px; bottom: auto; width: min(380px, calc(100vw - 32px));
    max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px; border-radius: 28px; border: 0;
    background: rgb(255 255 255 / .97); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgb(1 21 55 / .07), 0 30px 70px -20px rgb(1 21 55 / .45);
    transform-origin: top right; animation: ndIn .32s cubic-bezier(.2, .9, .3, 1.12) both;
  }
  @keyframes ndIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
  .lp.site .nav-drop .nd-links { display: grid; gap: 2px; }
  .lp.site .nav-drop .nd-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 14px 0 18px; border: 0; border-radius: 18px; font: 600 17.5px var(--font); color: var(--ink); text-decoration: none; transition: background .15s; }
  .lp.site .nav-drop .nd-links a svg { color: #a4aec0; flex: 0 0 auto; transition: transform .2s, color .2s; }
  .lp.site .nav-drop .nd-links a:active { background: rgb(1 21 55 / .05); }
  .lp.site .nav-drop .nd-links a[aria-current=page] { background: #eef4ff; color: var(--accent); }
  .lp.site .nav-drop .nd-links a[aria-current=page] svg { color: var(--accent); }
  .lp.site .nav-drop .nd-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 4px 4px; margin-top: 4px; border-top: 1px solid rgb(1 21 55 / .07); }
  .lp.site .nav-drop .nd-foot .b { justify-content: center; min-height: 52px; width: 100%; font-size: 16px; }
  .lp.site .nav-drop .nd-foot .b:only-child { grid-column: 1 / -1; }
  .lp.site .nav-scrim:not([hidden]) { position: fixed; inset: 0; z-index: 60; background: rgb(6 16 36 / .28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: ndFade .25s ease both; }
  @keyframes ndFade { from { opacity: 0; } }
  html.nav-open, html.nav-open body { overflow: hidden; }
  .lp.site .nav { z-index: 80; }
}
@media (max-width: 760px) {
  .lp.site .nav-drop:not([hidden]) { top: 74px; left: 10px; right: 10px; width: auto; max-height: calc(100dvh - 88px); border-radius: 26px; }
  .lp.site .nav-drop .nd-links a { min-height: 52px; font-size: 17px; }
}

/* ---------- fit fixes on phones ---------- */
@media (max-width: 760px) {
  html, body.lp { overflow-x: clip; }
  .lp img, .lp video, .lp canvas, .lp iframe { max-width: 100%; }
  .lp h1, .lp h2, .lp h3 { overflow-wrap: break-word; text-wrap: balance; }
  .lp p, .lp li { text-wrap: pretty; }
  .lp input, .lp select, .lp textarea { font-size: 16px; }
  .lp pre, .lp code { white-space: pre-wrap; overflow-wrap: anywhere; }
  /* footer: columns can't be wider than the screen; the newsletter row stacks under 360px */
  .lp .site-foot > .wrap:first-child { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .lp .site-foot > .wrap:first-child > * { min-width: 0; }
  .lp .sf-news, .lp .sf-news label { min-width: 0; max-width: 100%; }
  .lp .sf-col a { display: flex; align-items: center; min-height: 40px; }
  /* sideways rows scroll edge to edge, inside the page */
  .lp .blog-chips, .lp .blog-row { margin-inline: calc(-1 * var(--m, 16px)) !important; padding-inline: var(--m, 16px) !important; scroll-padding-inline: var(--m, 16px); }
  /* the chat bubble keeps clear of the edge */
  .lp-chat-btn { right: 14px !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; }
  /* tap targets */
  .lp .faq summary, .lp details > summary { min-height: 52px; }
  .lp .b { min-height: 48px; }
  .lp .b-sm { min-height: 40px; }
}
@media (max-width: 360px) {
  .lp .sf-news-row { flex-direction: column; border-radius: 22px; padding: 6px; }
  .lp .sf-news-row input { padding: 0 10px; }
  .lp .sf-news-row .b { width: 100%; justify-content: center; }
  .lp .site-foot > .wrap:first-child { grid-template-columns: minmax(0, 1fr) !important; }
  .lp.site .nav > .wrap { padding-left: 10px; }
  .lp.site .nav .auth .b { padding-left: 12px; padding-right: 12px; }
}

/* ---------- legal, login and other plain pages (styles.css pages) ---------- */
@media (max-width: 760px) {
  .site-nav .container { gap: 10px; padding: 0 14px; height: 60px; }
  .site-nav .container .btn { flex: 0 0 auto; }
  .site-nav .logo img, .site-nav .logo .logo-img { height: 24px; max-width: 170px; }
  .legal, .legal-body { overflow-wrap: break-word; }
}
html.nav-open .lp-chat-btn { opacity: 0; pointer-events: none; }
@media (max-width: 1320px) { html.nav-open .lp.site .nav > .wrap { position: relative; z-index: 75; } }

/* How it works: the week of scheduled posts reads as a list on phones */
@media (max-width: 760px) {
  .lp .x-cal-days { display: none; }
  .lp .x-cal-grid { display: grid; grid-template-columns: 1fr !important; gap: 8px; min-height: 0; padding: 0; background: none; }
  .lp .x-ev { grid-column: auto !important; grid-row: auto; margin: 0 !important; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 8px; }
  .lp .x-ev > canvas, .lp .x-ev > .x-ev-vid { grid-row: 1 / 3; width: 48px; }
  .lp .x-ev b { font-size: 14px; align-self: end; } .lp .x-ev small { display: block !important; font-size: 12.5px; align-self: start; }
  .lp .x-ev:nth-child(1)::before, .lp .x-ev:nth-child(2)::before, .lp .x-ev:nth-child(3)::before, .lp .x-ev:nth-child(4)::before { content: none; }
}

/* Pricing on phones: the side cards fade at the screen edges; plan buttons are full width */
@media (max-width: 760px) {
  .lp .plans.rail { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent); }
  .lp .plan .b, .lp .plan .plan-cta { width: 100%; justify-content: center; }
}

/* Marketers: brand pairs never wider than their card (tablet and phone) */
@media (max-width: 1000px) {
  .lp .x-brand-row figure { min-width: 0; }
  .lp .x-pair { min-width: 0; width: 100%; }
  .lp .x-pair canvas:first-child { max-width: min(62%, 200px); }
  .lp .x-pair canvas:last-child { max-width: min(32%, 112px); }
}

/* ================= v157 compression pass: phones only ================= */
@media (max-width: 760px) {
  /* swipe rows get slim dots */
  .lp .rail-dots.show { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .lp .rail-dots.show button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgb(1 21 55 / .18); cursor: pointer; transition: width .3s cubic-bezier(.16,1,.3,1), background .2s; position: relative; }
  .lp .rail-dots.show button::before { content: ""; position: absolute; inset: -12px -6px; } /* bigger tap area */
  .lp .rail-dots.show button.on { width: 22px; background: var(--accent); }
  .lp .rail { -webkit-mask-image: none; mask-image: none; }
  .lp .blog-latest .post-grid.rail > *, .lp .blog-row.rail > * { flex-basis: 82%; }
  .lp .x-kit-grid.rail > * { flex-basis: 74%; }
  .lp .x-kit-grid.rail .x-k-art { min-height: 250px; }
  .lp .x-brand-row.rail { gap: 12px; }
  .lp .x-brand-row.rail > * { flex-basis: 64%; }
  .lp .x-brand-row.three.rail > * { flex-basis: 84%; }
  .lp .post-card .pc-body { padding: 16px 18px 18px; }
  .lp .post-card h3 { font-size: 18px; }
  .lp .post-card p { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lp .post-card .pc-img { aspect-ratio: 16 / 9; }

  /* icon cards become compact rows: icon on the left, words on the right */
  .lp .path-row, .lp .cr-cards { gap: 10px !important; }
  .lp .path.bezel { padding: 4px; }
  .lp .path .core { display: grid !important; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px 16px 16px 14px !important; }
  .lp .path .core > * { grid-column: 2; }
  .lp .path .core > .path-ic { grid-column: 1; grid-row: 1 / span 5; width: 40px; height: 40px; border-radius: 12px; margin: 0; }
  .lp .path .core > .path-ic svg { width: 20px; height: 20px; }
  .lp .path h3 { font-size: 17.5px; margin: 1px 0 4px; }
  .lp .path p { font-size: 15px; line-height: 1.5; }
  .lp .path-k { font-size: 11.5px; margin-bottom: 4px; }
  .lp .path-go { padding-top: 8px; font-size: 15px; }
  .lp .path-go i { width: 26px; height: 26px; }
  .lp .cr-cards .path .core { grid-template-columns: minmax(0, 1fr); }
  .lp .cr-cards .path .core > * { grid-column: 1; }
  .lp .cr-big { margin: 2px 0 4px; }

  /* the three steps read as one tight numbered list */
  .lp .s3-row { gap: 0 !important; background: #fff; border-radius: 24px; box-shadow: 0 0 0 1px var(--hair), 0 24px 50px -36px rgb(1 21 55 / .35); overflow: hidden; }
  .lp .s3-row > li.bezel { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .lp .s3-row > li + li { border-top: 1px solid var(--hair); }
  .lp .s3-row .core { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; padding: 16px 18px !important; box-shadow: none !important; border-radius: 0 !important; }
  .lp .s3-row .core > * { grid-column: 2; }
  .lp .s3-row .s3-n { grid-column: 1; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 12px; font-size: 16px; margin: 0; }
  .lp .s3-row h3 { font-size: 17.5px; margin: 0 0 3px; }
  .lp .s3-row p { font-size: 15px; line-height: 1.5; }

  /* features page: each feature is shorter: tighter list, smaller picture */
  .lp .feat { padding-top: 44px !important; padding-bottom: 44px !important; }
  .lp .feat-grid { gap: 22px !important; }
  .lp .feat-list { gap: 8px !important; margin-top: 16px !important; }
  .lp .feat-list li { font-size: 15.5px; line-height: 1.45; }
  .lp .feat-copy .sub { font-size: 16px; }

  /* pricing: the credits table shows one plan at a time, one line per row */
  .lp .cr-table-head { padding: 20px 18px 14px; }
  .lp .cr-table-head h3 { font-size: 20px; }
  .lp .cr-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; padding: 4px; border-radius: 14px; background: #eef2f8; }
  .lp .cr-pick button { min-height: 40px; border: 0; border-radius: 10px; background: none; font: 700 15px var(--font); color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
  .lp .cr-pick button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -3px rgb(1 21 55 / .25); }
  .lp .cr-table .cr-th { display: none !important; }
  .lp .cr-table .cr-row { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; gap: 12px !important; padding: 12px 18px !important; align-items: center; }
  .lp .cr-table .cr-row > span:not(:first-child) { display: none !important; text-align: right; align-items: flex-end; }
  .lp .cr-table[data-show="0"] .cr-row > span:nth-child(2),
  .lp .cr-table[data-show="1"] .cr-row > span:nth-child(3),
  .lp .cr-table[data-show="2"] .cr-row > span:nth-child(4) { display: flex !important; }
  .lp .cr-table .cr-row > span:not(:first-child)::before { content: none !important; }
  .lp .cr-table .cr-row > span:first-child { grid-column: auto; }
  .lp .cr-row > span:first-child b { font-size: 15.5px; }
  .lp .cr-row > span:first-child small { font-size: 13px; }
  .lp .cr-foot { padding: 14px 18px 18px; font-size: 14px; }
  .lp .cr-more { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }

  /* footer: shorter link rows */
  .lp .sf-col a { min-height: 36px; }
  .lp .site-foot > .wrap:first-child { row-gap: 22px !important; }
}
@media (min-width: 761px) { .lp .cr-pick { display: none; } }
@media (max-width: 760px) { .lp .plans.rail { align-items: flex-start; transition: height .35s cubic-bezier(.16,1,.3,1); } }
@media (max-width: 760px) {
  .lp .x-tiles { gap: 10px !important; }
  .lp .x-tile.bezel { padding: 4px; }
  .lp .x-tile .core { display: grid !important; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px !important; }
  .lp .x-tile .core > * { grid-column: 2; }
  .lp .x-tile .core > .x-tic { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; margin: 0; }
  .lp .x-tile .core > :not(.x-tic):not(h3):not(p) { grid-column: 1 / -1; margin-top: 10px; }
  .lp .x-tile h3 { font-size: 17.5px; margin: 1px 0 4px; }
  .lp .x-tile p { font-size: 15px; line-height: 1.5; }
}
