/* Now page — layout, TOC, timeline, stats, lessons */

body.now-page {
  scroll-padding-top: 5.5rem;
}

.now-hero.uses-hero {
  background: linear-gradient(145deg, #5a52d8 0%, #7c6ae8 42%, #6b4d9a 100%);
}

.now-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.92;
  position: relative;
  animation: fadeInUp 0.6s ease 0.22s both;
}

.now-hero-badge span {
  background: rgba(255, 255, 255, 0.14);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.now-toc-wrap {
  position: sticky;
  top: 4.25rem;
  z-index: 50;
  margin: -1rem 0 2.5rem;
  padding: 0.75rem 0;
  background: linear-gradient(180deg, var(--light) 70%, transparent);
  border-bottom: 1px solid rgba(108, 99, 255, 0.1);
}

.now-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.now-toc-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  width: 100%;
  text-align: center;
  margin-bottom: 0.15rem;
}

@media (min-width: 720px) {
  .now-toc-label {
    width: auto;
    margin-bottom: 0;
    margin-right: 0.35rem;
  }
}

.now-toc a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark-light);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--white);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.now-toc a:hover {
  color: var(--primary);
  border-color: rgba(108, 99, 255, 0.25);
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.12);
}

.now-toc a.is-active {
  color: #fff;
  background: var(--gradient-1);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.now-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 6rem;
}

.now-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.now-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.now-section-head h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
}

.now-section-head p {
  color: var(--dark-light);
  line-height: 1.65;
  max-width: 62ch;
}

.now-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.now-stat {
  background: var(--white);
  border-radius: 16px;
  padding: 1.15rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.now-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(108, 99, 255, 0.12);
}

.now-stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.now-stat-label {
  font-size: 0.82rem;
  color: var(--dark-light);
  margin-top: 0.35rem;
  line-height: 1.35;
}

.now-cred-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.now-cred {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(108, 99, 255, 0.09);
  color: var(--dark);
  border: 1px solid rgba(108, 99, 255, 0.12);
}

.now-credentials-api {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.now-cred--api {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  max-width: 100%;
}

.now-cred--api .now-cred-text {
  line-height: 1.35;
}

.now-cred-verify {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.now-cred-verify:hover {
  text-decoration: underline;
}

.now-cred-empty {
  margin: 0 !important;
}

.now-prose {
  color: var(--dark-light);
  line-height: 1.75;
  max-width: 68ch;
}

.now-prose p + p {
  margin-top: 1rem;
}

.now-prose ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.now-prose li + li {
  margin-top: 0.45rem;
}

.now-timeline {
  position: relative;
  margin: 1.5rem 0 0;
  padding-left: 0;
  list-style: none;
}

.now-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(108, 99, 255, 0.2) 100%);
}

.now-timeline li {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 1.75rem;
}

.now-timeline li:last-child {
  padding-bottom: 0;
}

.now-timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(108, 99, 255, 0.2);
}

.now-timeline h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.now-timeline p {
  font-size: 0.95rem;
  color: var(--dark-light);
  line-height: 1.65;
}

.now-highlight-box {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.07) 0%, rgba(118, 75, 162, 0.06) 100%);
  border: 1px solid rgba(108, 99, 255, 0.14);
}

.now-highlight-box h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.65rem;
}

.now-table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.now-service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
  min-width: 520px;
}

.now-service-table th,
.now-service-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: top;
}

.now-service-table th {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(108, 99, 255, 0.06);
}

.now-service-table tr:last-child td {
  border-bottom: none;
}

.now-service-table td:first-child {
  font-weight: 700;
  color: var(--dark);
}

.now-lessons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.now-lesson {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.now-lesson summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--dark);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  user-select: none;
}

.now-lesson summary::-webkit-details-marker {
  display: none;
}

.now-lesson summary::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.now-lesson[open] summary {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(108, 99, 255, 0.04);
}

.now-lesson-body {
  padding: 1rem 1.15rem 1.15rem;
  color: var(--dark-light);
  line-height: 1.7;
  font-size: 0.95rem;
}

.now-lesson-body p + p {
  margin-top: 0.75rem;
}

.now-code {
  margin: 0.85rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: #1e1e2e;
  color: #e0e0f0;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
}

.now-code code {
  white-space: pre;
  background: none;
  color: inherit;
  padding: 0;
}

.now-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.now-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.now-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(108, 99, 255, 0.1);
}

.now-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.45rem;
}

.now-card p {
  font-size: 0.92rem;
  color: var(--dark-light);
  line-height: 1.65;
}

.now-card-footer {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.now-card-footer a {
  color: var(--primary);
  text-decoration: none;
}

.now-card-footer a:hover {
  text-decoration: underline;
}

.now-cta-band {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border-radius: 20px;
  text-align: center;
  background: var(--gradient-1);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.now-cta-band p {
  opacity: 0.95;
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 1.25rem;
}

.now-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.now-cta-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.now-cta-actions a:first-child {
  background: #fff;
  color: var(--primary);
}

.now-cta-actions a:last-child {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.now-cta-actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.now-footnote {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--gray);
  text-align: center;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.now-footnote a {
  color: var(--primary);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .now-stat,
  .now-card,
  .now-cta-actions a,
  .now-toc a {
    transition: none;
  }
  .now-stat:hover,
  .now-card:hover,
  .now-cta-actions a:hover {
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  .now-toc-wrap {
    background: linear-gradient(180deg, var(--dark) 70%, transparent);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  .now-toc a {
    background: var(--dark-light);
    color: var(--light);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .now-toc a:hover {
    border-color: rgba(108, 99, 255, 0.4);
  }
  .now-stat,
  .now-lesson,
  .now-card,
  .now-service-table {
    background: var(--dark-light);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .now-service-table th {
    background: rgba(108, 99, 255, 0.12);
  }
  .now-service-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  .now-section-head h2,
  .now-timeline h3,
  .now-card h3,
  .now-lesson summary {
    color: var(--light);
  }
  .now-stat-label,
  .now-prose,
  .now-timeline p,
  .now-lesson-body,
  .now-card p {
    color: rgba(245, 247, 250, 0.85);
  }
  .now-cred {
    background: rgba(108, 99, 255, 0.15);
    color: var(--light);
    border-color: rgba(108, 99, 255, 0.25);
  }
  .now-cred-verify {
    color: #c4bfff;
  }
  .now-stat-value {
    color: #b8b0ff;
  }
  .now-service-table td:first-child {
    color: var(--light);
  }
}

@media (max-width: 768px) {
  .now-toc {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .now-toc a {
    flex-shrink: 0;
  }
}
