/* ==========================================================================
   Resell RX — responsive layer
   --------------------------------------------------------------------------
   The page markup was exported from a 1440px desktop design with inline
   styles. This file adapts it for smaller screens WITHOUT touching the
   desktop: every layout rule lives inside a max-width media query, and
   `!important` is used because the rules have to beat inline style="".
   The only rules outside media queries hide the mobile-only elements
   (hamburger button + extra menu links) that do not exist on desktop.

   Breakpoints
     <= 1279px  small laptop  : tighter gutters, scaled artwork
     <= 1023px  tablet        : hamburger menu, multi-column rows stack
     <=  640px  phone         : single column, compact type and spacing
     <=  380px  small phone   : last-mile squeezes for 320–380px screens

   Hook classes (added to the HTML, all prefixed "r-"):
     r-nav, r-navlinks, r-login, r-navcta, r-burger, r-mobile-only ... nav
     r-sec / r-sec-tail ............ section padding
     r-split, r-head-row ........... two-column rows that stack
     r-h1 / r-h2 / r-h3 / r-lead .... type scale
     r-grid3, r-grid2, r-compare .... grids
     r-hero*, r-webart, r-art-box ... artwork / mockups
     r-step, r-shot, r-phone ........ user-guide step rows + screenshots
     r-footer* ...................... footer
   ========================================================================== */

/* ---- Mobile-only elements: hidden on desktop (they are display:none, so
        they take no space and never affect the desktop layout) ---------- */
.r-burger,
.r-mobile-only { display: none; }


/* ==========================================================================
   SMALL LAPTOP  (<= 1279px)
   ========================================================================== */
@media (max-width: 1279.98px) {
  /* Nav: tighten spacing so all links still fit on one line at 1024px */
  .r-nav { padding: 0 32px !important; gap: 20px !important; }
  .r-navlinks { gap: 20px !important; margin-left: 4px !important; }
  .r-navlinks a, .r-login, .r-navcta { font-size: 14px !important; }
  .r-navcta { padding: 12px 18px !important; white-space: nowrap; }
  .r-navlinks a { white-space: nowrap; }

  /* Section gutters 80px -> 48px */
  .r-sec, .r-sec-tail, .r-strip, .r-footer, .r-contact-sec,
  .r-contact-hero { padding-left: 48px !important; padding-right: 48px !important; }
  .r-hero { padding-left: 48px !important; padding-right: 48px !important; }

  .r-split { gap: 56px !important; }
  .r-h1 { font-size: 60px !important; }
  .r-h2 { font-size: 46px !important; }

  /* Index hero: shrink the two-phone composition */
  .r-hero { gap: 32px !important; }
  .r-hero-art { zoom: 0.74; }
  .r-trial { flex-wrap: wrap; gap: 6px 16px !important; }
  .r-stores { flex-wrap: wrap; }

  /* "Built for" strip: let the names wrap under the label */
  .r-strip { flex-wrap: wrap; gap: 16px 32px; }
  .r-strip-names { flex-wrap: wrap; gap: 8px 24px !important; font-size: 20px !important; }

  .r-card { padding: 28px !important; }
  .r-regcard { width: 400px !important; padding: 40px !important; }
  .r-art-box { width: 440px !important; }
  .r-webart { zoom: 0.72; }
  .r-pricing-main { padding: 40px !important; }
  .r-checks { gap: 12px 20px !important; font-size: 15px !important; }
  .r-pricing-side { width: 380px !important; padding: 40px 36px !important; }
  .r-faq { gap: 56px !important; }
  .r-faq-head { width: 320px !important; }
  .r-footer-cols { gap: 56px !important; }

  /* User guide */
  .r-ug-hero { gap: 56px !important; }
  .r-toc { width: 360px !important; }
  .r-step { gap: 48px !important; }
  .r-shot { width: 460px !important; gap: 18px !important; }
  .r-h3 { font-size: 34px !important; }
  .r-ctabox { padding: 56px !important; gap: 40px !important; }

  /* Contact */
  .r-aside { width: 360px !important; }
  .r-form { padding: 40px !important; }
  .r-submit { white-space: nowrap; flex-shrink: 0; }
}


/* ==========================================================================
   TABLET  (<= 1023px)
   ========================================================================== */
@media (max-width: 1023.98px) {
  /* ---- Navigation: collapse links into a hamburger menu -------------- */
  .r-nav { position: relative; height: 72px !important; padding: 0 24px !important; gap: 12px !important; }
  .r-login { display: none !important; }
  .r-navcta { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }

  .r-burger {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; padding: 0; margin-right: -6px;
    background: transparent; border: 0; border-radius: 10px; cursor: pointer; color: #fff;
  }
  .r-burger span {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .r-burger:focus-visible { outline: 2px solid #8FB4FF; outline-offset: 2px; }
  .r-nav.is-open .r-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .r-nav.is-open .r-burger span:nth-child(2) { opacity: 0; }
  .r-nav.is-open .r-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* The link row becomes a drop-down panel under the bar */
  .r-navlinks {
    display: none !important;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    flex-direction: column; gap: 0 !important; margin: 0 !important;
    padding: 8px 24px 24px; background: rgb(10, 22, 48);
    border-bottom: 1px solid rgb(28, 44, 82);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
  }
  .r-nav.is-open .r-navlinks { display: flex !important; }
  .r-navlinks a {
    display: flex; align-items: center; min-height: 52px;
    font-size: 17px !important; border-bottom: 1px solid rgb(28, 44, 82);
  }
  .r-navlinks a.r-mobile-only { display: flex; }
  .r-menu-login { color: #fff !important; font-weight: 700; border-bottom: 0 !important; }
  .r-menu-cta { display: none !important; }

  /* ---- Section spacing ---------------------------------------------- */
  .r-sec { padding: 88px 40px !important; gap: 48px !important; }
  .r-sec-tail { padding: 0 40px 88px !important; }
  .r-strip, .r-footer { padding-left: 40px !important; padding-right: 40px !important; }

  .r-h1 { font-size: 60px !important; }
  .r-h2 { font-size: 42px !important; }
  .r-h3 { font-size: 34px !important; }
  .r-lead { font-size: 18px !important; }

  /* ---- Two-column rows stack ----------------------------------------- */
  .r-split, .r-head-row, .r-pricing, .r-footer-row, .r-ug-hero, .r-contact-sec {
    flex-direction: column !important;
  }
  .r-split { align-items: stretch !important; gap: 48px !important; }
  .r-split > div { max-width: none !important; }
  /* Check-mark icons must not shrink when their label wraps */
  .r-sec svg { flex-shrink: 0; }
  .r-head-row { align-items: flex-start !important; gap: 16px !important; }

  /* ---- Index hero ---------------------------------------------------- */
  .r-hero { flex-direction: column; align-items: stretch !important; padding: 56px 40px 0 !important; gap: 8px !important; }
  .r-hero-text { padding-bottom: 24px !important; }
  .r-hero-art { zoom: 0.9; align-self: center; }

  .r-strip { flex-direction: column; align-items: flex-start !important; padding-top: 28px !important; padding-bottom: 28px !important; gap: 12px; }

  .r-regcard { width: 100% !important; }
  .r-art-box { width: 100% !important; }
  .r-webart { zoom: 1; align-self: center; }

  /* Who / features grids: 2 columns; a lone last card spans the row */
  .r-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .r-grid3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* Pricing: plans sit side by side under the feature list */
  .r-pricing-main { padding: 40px !important; }
  .r-pricing-side {
    width: 100% !important; padding: 32px 40px 40px !important;
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 16px !important;
  }
  .r-pricing-side > a { grid-column: 1 / -1; }

  .r-faq { gap: 32px !important; }
  .r-faq-head { width: auto !important; }

  .r-footer-row { gap: 40px !important; }
  .r-footer-brand { max-width: none !important; }

  /* ---- User guide ---------------------------------------------------- */
  .r-ug-hero { padding: 56px 40px 64px !important; gap: 48px !important; }
  .r-toc { width: 100% !important; }
  /* Step rows keep text + screenshot side by side (alternating like the
     desktop) with a narrower screenshot card; rows that show two phones
     stack, with the screenshots under the text. */
  .r-step { gap: 40px !important; }
  .r-shot { width: 290px !important; height: auto !important; padding: 24px 20px; }
  .r-step:has(.r-phone + .r-phone) { flex-direction: column !important; align-items: stretch !important; gap: 32px !important; }
  .r-step:has(.r-phone + .r-phone) .r-shot { order: 2; width: 100% !important; }
  .r-phone-screen > img { height: 100% !important; object-fit: cover; object-position: center top; }
  .r-ctabox { flex-direction: column; align-items: flex-start !important; padding: 48px 40px !important; gap: 28px !important; }

  /* ---- Contact ------------------------------------------------------- */
  .r-contact-hero { padding: 56px 40px 152px !important; }
  .r-contact-sec { padding: 0 40px 88px !important; align-items: stretch !important; gap: 24px !important; }
  .r-form { flex-basis: auto !important; }
  .r-aside {
    width: 100% !important;
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 20px !important;
  }
  .r-aside > :last-child { grid-column: 1 / -1; }
}


/* ==========================================================================
   PHONE  (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  /* Long words / emails never force sideways scrolling */
  h1, h2, h3, p, a, span { overflow-wrap: break-word; }

  /* ---- Nav ------------------------------------------------------------ */
  .r-nav { height: 64px !important; padding: 0 16px 0 20px !important; }
  .r-brand { gap: 10px !important; min-height: 44px; }
  .r-brand > div { width: 36px !important; height: 36px !important; font-size: 13px !important; }
  .r-brand > span { font-size: 20px !important; }
  .r-navcta { padding: 0 16px !important; }
  .r-navlinks { padding: 4px 20px 20px; }

  /* ---- Spacing & type ------------------------------------------------- */
  .r-sec { padding: 64px 20px !important; gap: 36px !important; }
  .r-sec-tail { padding: 0 20px 64px !important; }
  .r-strip, .r-footer { padding-left: 20px !important; padding-right: 20px !important; }

  .r-h1 { font-size: clamp(38px, 11vw, 48px) !important; letter-spacing: -1px !important; }
  .r-h2 { font-size: clamp(30px, 8.6vw, 36px) !important; letter-spacing: -0.5px !important; }
  .r-h3 { font-size: 28px !important; letter-spacing: -0.5px !important; }
  .r-lead { font-size: 17px !important; }
  .r-sec p, .r-sec-tail p { font-size: 16px !important; }
  .r-split { gap: 36px !important; }

  /* ---- Index hero ----------------------------------------------------- */
  .r-hero { padding: 40px 20px 0 !important; }
  .r-hero-text { gap: 22px !important; padding-bottom: 16px !important; }
  .r-stores { gap: 10px !important; }
  .r-stores > a { flex: 1 1 140px; justify-content: center; gap: 8px !important; padding: 10px 12px !important; }
  .r-stores > a > svg { width: 22px; height: 22px; }
  .r-stores > a > span > span:last-child { font-size: 17px !important; }
  .r-trial { font-size: 13px !important; gap: 4px 14px !important; }
  .r-dot { display: none; }
  /* Enlarge the hit area of the small price link without moving anything */
  .r-trial > a { display: inline-block; padding: 13px 0; margin: -13px 0; }

  /* Single phone that rises out of the bottom of the hero; the secondary
     "mileage" phone is hidden on small screens for a cleaner look. */
  .r-hero-art {
    zoom: 1; width: 100% !important; height: 400px !important;
    overflow: hidden; display: flex; justify-content: center;
  }
  .r-hero-back { display: none !important; }
  .r-hero-front {
    position: relative !important; left: auto !important; top: 16px !important;
    width: 260px !important; height: 540px !important; border-radius: 42px !important;
  }
  .r-hero-front > div { border-radius: 32px !important; }

  /* Strip names become soft pills; the "/" separators are dropped */
  .r-strip-names { font-size: 16px !important; gap: 8px !important; }
  .r-strip-names > span:nth-child(even) { display: none; }
  .r-strip-names > span:nth-child(odd) {
    padding: 5px 12px; border: 1px solid rgb(230, 225, 214); border-radius: 999px; background: rgb(246, 244, 239);
  }

  /* ---- Register ------------------------------------------------------- */
  .r-regcard { padding: 28px 24px !important; border-radius: 24px !important; }
  .r-price { font-size: 44px !important; }

  /* ---- Cards & grids -------------------------------------------------- */
  .r-grid3 { grid-template-columns: 1fr !important; gap: 16px !important; }
  .r-card { padding: 24px !important; }

  .r-art-box { height: 400px !important; border-radius: 22px !important; }
  .r-art-box > div { width: 190px !important; height: 356px !important; border-radius: 34px !important; }
  .r-art-box > div > div { border-radius: 26px !important; }

  /* Laptop + phone composition scaled to fit (620px wide at 1x) */
  .r-webart { zoom: 0.52; margin-left: 12px; }

  /* Old way vs Resell RX comparison: tighter cells */
  .r-compare { border-radius: 18px !important; }
  .r-compare > div { padding: 14px 14px !important; font-size: 14px !important; line-height: 1.45; }
  .r-compare > div:nth-child(-n+2) { font-size: 11px !important; letter-spacing: 0.8px !important; }

  /* ---- Pricing -------------------------------------------------------- */
  .r-pricing { border-radius: 22px !important; }
  .r-pricing-main { padding: 28px 22px !important; gap: 22px !important; }
  .r-checks { grid-template-columns: 1fr !important; gap: 12px !important; font-size: 15px !important; }
  .r-pricing-side { grid-template-columns: 1fr; padding: 24px 20px 28px !important; }
  .r-plan { padding: 20px 22px !important; }

  /* ---- FAQ ------------------------------------------------------------ */
  .r-faq h3 { font-size: 18px !important; }
  .r-faq > div > div { padding: 22px 0 !important; }

  /* ---- Footer: three compact link columns, roomy tap targets ---------- */
  .r-footer { padding-top: 48px !important; padding-bottom: 32px !important; gap: 32px !important; }
  .r-footer-row { gap: 28px !important; }
  .r-footer-cols { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px !important; }
  .r-footer-cols > div { gap: 0 !important; }
  .r-footer-cols > div > span { padding-bottom: 6px; }
  .r-footer-cols a { display: flex; align-items: center; min-height: 44px; }

  /* ---- User guide ----------------------------------------------------- */
  .r-ug-hero { padding: 40px 20px 48px !important; gap: 40px !important; }
  .r-btnrow { flex-wrap: wrap; }
  .r-btnrow > a { flex: 1 1 160px; text-align: center; }
  .r-toc > a { padding: 16px 0 !important; }
  .r-step { flex-direction: column !important; align-items: stretch !important; gap: 24px !important; }
  .r-step-text { flex-basis: auto !important; }
  .r-shot { order: 2; width: 100% !important; }
  .r-stepnum { font-size: 44px !important; }
  .r-shot { padding: 24px 16px; gap: 12px !important; border-radius: 22px !important; }
  /* Phone frames scale with the box and keep their 210:440 proportions */
  .r-phone {
    width: 62% !important; max-width: 220px; height: auto !important;
    aspect-ratio: 210 / 440; border-radius: 34px !important; padding: 8px !important;
  }
  .r-phone + .r-phone, .r-shot > .r-phone:first-child:nth-last-child(2) { width: calc(50% - 6px) !important; border-radius: 28px !important; padding: 7px !important; }
  .r-phone-screen { border-radius: 26px !important; }
  .r-phone + .r-phone .r-phone-screen,
  .r-shot > .r-phone:first-child:nth-last-child(2) .r-phone-screen { border-radius: 21px !important; }
  .r-ctabox { padding: 36px 24px !important; border-radius: 22px !important; }
  .r-ctabox > a { align-self: stretch; text-align: center; }

  /* ---- Contact -------------------------------------------------------- */
  .r-contact-hero { padding: 40px 20px 128px !important; gap: 16px !important; }
  .r-contact-sec { padding: 0 16px 64px !important; }
  .r-form { padding: 28px 20px !important; border-radius: 22px !important; gap: 20px !important; }
  .r-form-title { font-size: 28px !important; }
  .r-grid2 { grid-template-columns: 1fr !important; }
  .r-form-foot { flex-direction: column-reverse; align-items: stretch !important; gap: 16px !important; text-align: center; }
  .r-submit { width: 100%; }
  .r-form-foot a, .r-aside a[href="user-guide.html"], .r-email-big { display: inline-block; padding: 13px 0; }
  .r-email-big { padding: 8px 0; }
  .r-aside { grid-template-columns: 1fr; gap: 16px !important; }
  .r-aside > div { padding: 24px !important; border-radius: 22px !important; }
  .r-email-big { font-size: 21px !important; }
  .r-social { flex-wrap: wrap; }
  .r-social > a { flex: 1 1 140px; justify-content: center; }
}


/* ==========================================================================
   SMALL PHONE  (<= 380px)
   ========================================================================== */
@media (max-width: 380px) {
  .r-navcta { display: none !important; }
  .r-menu-cta {
    display: flex !important; justify-content: center; margin-top: 12px;
    background: #fff; color: rgb(10, 22, 48) !important; font-weight: 800;
    border-radius: 999px; border-bottom: 0 !important;
  }
  .r-burger { margin-left: auto; }

  .r-webart { zoom: 0.44; }
  .r-compare > div { padding: 12px 10px !important; font-size: 13px !important; }
  .r-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-hero-front { width: 240px !important; height: 500px !important; }
}

/* ---- Sign-up card Monthly/Annual toggle (phones) ---------------------- */
@media (max-width: 640px) {
  .r-int { font-size: 14px !important; padding: 6px 4px !important; }
  .r-int span { display: block !important; width: max-content; margin: 4px auto 0 !important; font-size: 11px !important; }
}

/* ==========================================================================
   Header + hero: web/app-agnostic (2026-10-08)
   - Desktop: "Log in" link + "Start free trial" button.
   - Tablet/phone: the top bar shows a "Log in" pill; "Start free trial" lives
     in the hamburger menu as a full-width button.
   ========================================================================== */
@media (max-width: 1023.98px) {
  .r-navcta { display: none !important; }
  .r-login {
    display: inline-flex !important; align-items: center; justify-content: center;
    margin-left: auto; min-height: 44px; box-sizing: border-box; padding: 0 20px;
    border-radius: 999px; background: #fff; color: rgb(10, 22, 48) !important;
    font-size: 15px !important; font-weight: 800 !important; white-space: nowrap;
  }
  .r-menu-login { display: none !important; }
  .r-menu-cta {
    display: flex !important; justify-content: center; margin-top: 16px;
    background: rgb(46, 107, 240); color: #fff !important; font-weight: 800;
    border-radius: 999px; border-bottom: 0 !important;
  }
}
@media (max-width: 640px) {
  .r-hero-cta { flex-direction: column; align-items: stretch !important; gap: 12px !important; }
  .r-hero-cta > a { width: 100%; box-sizing: border-box; }
  .r-hero-also { margin-bottom: -8px !important; }
}
@media (max-width: 380px) {
  .r-burger { margin-left: 0 !important; }
  .r-login { padding: 0 16px; }
}
