/* ============================================
   ARSES Terms of Service — Page Styles
   Premium legal page for the ARSES marketplace
   ============================================ */

.ts {
  padding-top: var(--header-height);
}

.ts strong {
  color: var(--text);
  font-weight: 600;
}

.ts a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.ts a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================================
   SECTION 1 — HERO
   ============================================================ */

.ts-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-6) 0 var(--space-5);
}

.ts-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ts-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.ts-hero__glow--a {
  width: 460px;
  height: 460px;
  top: -140px;
  right: -60px;
  background: radial-gradient(circle, rgba(31, 122, 92, 0.22) 0%, transparent 70%);
}

.ts-hero__glow--b {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(55, 130, 246, 0.14) 0%, transparent 70%);
}

.ts-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 122, 92, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 122, 92, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.ts-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.ts-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ts-hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 122, 92, 0.15);
}

.ts-hero__title {
  color: var(--text);
  margin-bottom: var(--space-2);
}

.ts-hero__subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: var(--space-4);
}

.ts-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

.ts-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.ts-hero__meta-item strong {
  color: var(--text);
}

.ts-hero__meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-light);
  flex-shrink: 0;
}

/* ============================================================
   SECTION 2 — LEGAL SUMMARY CARDS
   ============================================================ */

.ts-summary {
  padding-top: var(--space-4);
}

.ts-summary__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.ts-summary__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.ts-summary__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(31, 122, 92, 0.3);
}

.ts-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-light);
}

.ts-summary__card p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

/* ============================================================
   SECTION 3 + 4 — TOC + CONTENT LAYOUT
   ============================================================ */

.ts-body {
  padding-top: var(--space-3);
}

.ts-body__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

/* Table of contents */
.ts-toc {
  display: none;
}

.ts-toc__inner {
  position: sticky;
  top: calc(var(--header-height) + var(--space-2));
  padding: var(--space-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--header-height) - var(--space-4));
  overflow-y: auto;
}

.ts-toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.ts-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ts-toc__link {
  display: block;
  padding: 7px 10px 7px 12px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted) !important;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all var(--transition);
}

.ts-toc__link:hover {
  color: var(--text) !important;
  background: var(--background);
  text-decoration: none !important;
}

.ts-toc__link.is-active {
  color: var(--primary) !important;
  background: var(--primary-light);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Content */
.ts-content {
  min-width: 0;
}

.ts-doc {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

.ts-doc__head {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.ts-doc__title {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.ts-doc__meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.ts-doc__intro {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

/* Individual content sections */
.ts-section {
  padding-top: var(--space-3);
  scroll-margin-top: calc(var(--header-height) + var(--space-3));
}

.ts-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1875rem;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.ts-section__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 8px;
}

.ts-section p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.ts-section p:last-child {
  margin-bottom: 0;
}

.ts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 var(--space-2);
  padding-left: 0;
}

.ts-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.ts-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.5;
}

/* Contact card inside section 22 */
.ts-section--contact .ts-contact-card {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-3);
  margin: var(--space-2) 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ts-contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 12px;
}

.ts-contact-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px !important;
}

.ts-contact-card__email {
  font-size: 1.0625rem;
  font-weight: 600;
}

.ts-contact-card__org {
  margin-top: var(--space-2);
  font-size: 0.875rem;
  line-height: 1.6;
}

.ts-legal-note {
  font-size: 0.8125rem !important;
  font-style: italic;
  color: var(--muted);
  padding-top: var(--space-2);
  margin-top: var(--space-2);
  border-top: 1px solid var(--border);
}

/* Update notice */
.ts-update-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(90deg, rgba(31, 122, 92, 0.08), rgba(55, 130, 246, 0.05));
  border: 1px solid rgba(31, 122, 92, 0.2);
  border-radius: var(--radius);
}

.ts-update-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.ts-update-notice p {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 600px) {
  .ts-summary__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .ts-doc {
    padding: var(--space-4);
  }

  .ts-doc__title {
    font-size: 1.75rem;
  }
}

@media (min-width: 960px) {
  .ts-summary__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .ts-body__layout {
    grid-template-columns: 280px 1fr;
    gap: var(--space-5);
  }

  .ts-toc {
    display: block;
  }
}
