/* Terms and Conditions page — mobile-only layout (max-width: 768px) */

@media (max-width: 768px) {
  body.terms-page {
    --trm-sticky-top: 80px;
    scroll-padding-top: var(--trm-sticky-top);
  }

  body.terms-page .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* ── Hero ─────────────────────────────────────────────────── */
  body.terms-page .trm-hero {
    padding: 18px 0 32px;
  }

  .trm-breadcrumb {
    margin-bottom: 14px;
    font-size: 0.76rem;
  }

  .trm-hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
  }

  .trm-hero-copy h1 {
    font-size: 1.55rem;
    margin-bottom: 10px;
    line-height: 1.15;
  }

  .trm-hero-lead {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 14px;
    max-width: none;
  }

  .trm-hero-meta {
    gap: 8px;
    margin-bottom: 18px;
  }

  .trm-hero-meta span {
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  .trm-hero-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .trm-hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }

  .trm-hero-panel {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .trm-hero-panel-head {
    margin-bottom: 12px;
    padding-bottom: 12px;
    font-size: 0.66rem;
  }

  /* Order steps — horizontal scroll */
  .trm-hero-steps {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -4px;
    scrollbar-width: none;
  }

  .trm-hero-steps::-webkit-scrollbar {
    display: none;
  }

  .trm-step {
    flex: 0 0 min(68vw, 220px);
    scroll-snap-align: start;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .trm-step span {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 0.72rem;
  }

  .trm-step em {
    font-size: 0.76rem;
  }

  /* Pillars — see css/pillars-mobile.css */

  /* ── Main layout — nav first ──────────────────────────────── */
  .trm-main {
    padding: 20px 0 40px;
  }

  .trm-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .trm-sidebar {
    order: 1;
    gap: 12px;
  }

  .trm-content {
    order: 2;
    gap: 0;
  }

  .trm-side-card {
    padding: 20px 18px;
    border-radius: 14px;
  }

  .trm-side-head {
    font-size: 0.72rem;
    margin-bottom: 12px;
  }

  /* TOC — horizontal scroll chips */
  .trm-toc {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -4px;
    scrollbar-width: none;
  }

  .trm-toc::-webkit-scrollbar {
    display: none;
  }

  .trm-toc a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 0.76rem;
  }

  .trm-checklist li {
    font-size: 0.84rem;
  }

  .trm-related-link {
    padding: 10px 12px;
  }

  .trm-related-link strong {
    font-size: 0.8rem;
  }

  .trm-side-link {
    padding: 12px 14px;
  }

  .trm-side-link strong {
    font-size: 0.8rem;
  }

  .trm-side-link em {
    font-size: 0.74rem;
  }

  /* ── Terms panel ────────────────────────────────────────── */
  .trm-terms-panel {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .trm-panel-head {
    margin-bottom: 18px;
  }

  .trm-panel-head h2 {
    font-size: 1.32rem;
    margin-bottom: 8px;
  }

  .trm-panel-head p {
    font-size: 0.86rem;
    max-width: none;
  }

  .trm-terms-body {
    font-size: 0.88rem;
    line-height: 1.7;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trm-terms-body h2 {
    font-size: 1.08rem;
    margin-top: 24px;
    scroll-margin-top: var(--trm-sticky-top);
  }

  .trm-terms-body h3 {
    font-size: 0.98rem;
  }

  .trm-terms-body h4 {
    font-size: 0.92rem;
  }

  .trm-terms-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
  }

  .trm-panel-footer {
    margin-top: 22px;
    padding-top: 16px;
    font-size: 0.84rem;
  }

  .trm-panel-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
  }

  .trm-panel-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }

  /* ── Info cards ───────────────────────────────────────────── */
  .trm-info {
    margin-top: 24px;
  }

  .trm-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trm-info-card {
    padding: 20px 18px;
    border-radius: 14px;
  }

  .trm-info-card > i {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .trm-info-card h3 {
    font-size: 0.92rem;
  }

  .trm-info-card p {
    font-size: 0.84rem;
  }

  /* ── FAQ ──────────────────────────────────────────────────── */
  .trm-faq {
    margin-top: 24px;
  }

  .trm-section-head {
    margin-bottom: 14px;
  }

  .trm-section-head h2 {
    font-size: 1.22rem;
  }

  .trm-section-head p {
    font-size: 0.84rem;
  }

  .trm-faq-item {
    border-radius: 12px;
  }

  .trm-faq-item summary {
    padding: 16px 18px;
    font-size: 0.88rem;
    gap: 12px;
  }

  .trm-faq-item p {
    padding: 0 18px 16px;
    font-size: 0.86rem;
  }

  /* ── CTA ──────────────────────────────────────────────────── */
  .trm-cta {
    padding: 36px 0 48px;
  }

  .trm-cta-grid {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .trm-cta-main {
    padding: 28px 20px 24px;
  }

  .trm-cta-main h2 {
    font-size: 1.45rem;
    margin-bottom: 12px;
  }

  .trm-cta-main p {
    font-size: 0.9rem;
    margin-bottom: 22px;
    max-width: none;
  }

  .trm-cta-actions {
    flex-direction: column;
    gap: 10px;
  }

  .trm-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .trm-cta-side {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 16px 24px;
    gap: 10px;
  }

  .trm-cta-contact {
    padding: 14px 16px;
    min-height: 0;
  }

  .trm-cta-contact i {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .trm-cta-contact strong {
    font-size: 0.88rem;
  }

  .trm-cta-contact em {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .trm-hero-copy h1 {
    font-size: 1.42rem;
  }

  .trm-step {
    flex: 0 0 72vw;
  }
}
