/* Phone layout for the pricing page and the homepage. Below 640px only;
   desktop is untouched. Every word and every row is still on the page —
   this changes width, order of attention, and what is folded away. */

.plan-picker,
.mc-toggle { display: none; }

@media (max-width: 640px) {

  /* ── Width ───────────────────────────────────────────────────────────
     Section, container and card each added their own side padding, so a
     line of plan text got about 244px of a 390px screen. The container's
     layer was redundant inside sections that already pad. */
  .pricing-section .container,
  .faq-section .container,
  [data-section] .container { padding-left: 0; padding-right: 0; }
  .pricing-section .plan-card { padding: 1.5rem 1.25rem; }
  .pricing-section .trial-banner { padding: 1.1rem 1.15rem; }
  .bolt-card { padding: 1.25rem 1.1rem !important; }

  /* ── Plan picker: all three prices side by side, one card below ────── */
  .plan-picker {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
    background: #fff; border: 1.5px solid #E5E7EB; border-radius: 1.1rem;
    padding: .35rem; margin: .75rem 0 1.5rem;
  }
  .pp-opt {
    -webkit-appearance: none; appearance: none; border: 0; background: transparent;
    font: inherit; cursor: pointer; position: relative; border-radius: .8rem;
    min-height: 70px; padding: .75rem .2rem .6rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    color: #374151; transition: background .2s ease, color .2s ease;
  }
  .pp-opt[aria-pressed="true"] { background: #1E5C3A; color: #fff; box-shadow: 0 6px 16px -6px rgba(30,92,58,.55); }
  .pp-opt:focus-visible { outline: 2px solid #1E5C3A; outline-offset: 2px; }
  .pp-name { font-size: .85rem; font-weight: 600; }
  .pp-price { font-family: 'Plus Jakarta Sans', Inter, sans-serif; font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
  .pp-unit { font-size: .74rem; opacity: .8; }
  .pp-tag {
    position: absolute; top: -.6rem; left: 50%; transform: translateX(-50%);
    background: #F59E0B; color: #0a0f0d; font-size: .62rem; font-weight: 700;
    padding: .12rem .5rem; border-radius: 999px; white-space: nowrap;
  }
  .pricing-cards.has-plan-picker { gap: 0; }
  .pricing-cards.has-plan-picker > .plan-card:not(.pp-selected) { display: none; }
  .pricing-cards.has-plan-picker > .plan-card { margin-top: .6rem; }
  .pricing-cards.has-plan-picker .plan-card-popular { display: none; }   /* the picker already says it */

  /* ── Fold-away sections: long reference lists open on a tap ──────────── */
  .mc-toggle {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; min-height: 50px; padding: .8rem 1rem;
    background: #fff; border: 1.5px solid #D1D5DB; border-radius: .9rem;
    font: inherit; font-weight: 600; font-size: .95rem; color: #1E5C3A; cursor: pointer;
  }
  .mc-toggle::after {
    content: ''; width: .5rem; height: .5rem; margin-top: -.2rem;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .2s ease, margin .2s ease;
  }
  .mc-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: .25rem; }
  .compare-table-wrap .mc-toggle { border: 0; border-radius: 0; }
  /* The legend explains the table, so it only shows once the table is open. */
  .compare-table-wrap:has(#compare-rows.mc-collapsed) .compare-table-header { display: none; }
  .compare-table-wrap .mc-toggle[aria-expanded="true"] { border-bottom: 1px solid #E5E7EB; }
  .compare-table-header { flex-direction: column; align-items: flex-start; }
  .compare-table-header .compare-table-pill { border-radius: .6rem; line-height: 1.45; padding: .4rem .7rem; }
  .bolt-card .mc-toggle { margin-top: 1rem; }
  .mc-collapsed { display: none !important; }

  /* ── Homepage hero: the trial leads, nothing wraps raggedly ───────────── */
  #announce-bar p { font-size: .82rem; text-wrap: balance; }
  .hero-section .hero-tags { gap: .35rem 1.1rem; margin-bottom: 1.25rem; }
  .hero-section .hero-tags a { font-size: .84rem; }
  .hero-section .hero-tags a::after { display: none; }   /* the "·" separators dangled at line ends */
  .hero-section .hero-trial-badge {
    background: none; border: 0; padding: 0; margin: 0 0 .85rem;
    font-size: .88rem; display: block; text-align: center; text-wrap: balance;
  }
  /* align-self: the hero column centres its children, which shrank this row to 199px. */
  .hero-section .hero-ctas { flex-direction: column; align-items: stretch; align-self: stretch; gap: .25rem; }
  .hero-section .hero-ctas .btn-primary { width: 100%; justify-content: center; min-height: 54px; font-size: 1.05rem; }
  .hero-section .hero-ctas .btn-outline,
  .hero-section .hero-ctas .btn-ghost {
    background: none; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    min-height: 44px; padding: .55rem; justify-content: center;
    font-size: .95rem; color: #1E5C3A;
  }
}
