/* TrustMeet — premium legal pages */
.tm-page--legal-premium {
  --tm-legal-bg: #070b14;
  --tm-legal-card: rgba(15, 23, 42, 0.72);
  --tm-legal-border: rgba(148, 163, 184, 0.18);
  --tm-legal-text: #e2e8f0;
  --tm-legal-muted: #94a3b8;
  --tm-legal-accent: #38bdf8;
  --tm-legal-accent-2: #818cf8;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(129, 140, 248, 0.14), transparent 50%),
    var(--tm-legal-bg);
  color: var(--tm-legal-text);
}

.tm-legal-premium {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px 64px;
  position: relative;
}

.tm-legal-premium__glow {
  position: absolute;
  inset: 0 0 auto;
  height: 280px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), transparent);
  pointer-events: none;
}

.tm-legal-premium__hero {
  position: relative;
  padding: 28px 24px 22px;
  border-radius: 20px;
  border: 1px solid var(--tm-legal-border);
  background: var(--tm-legal-card);
  backdrop-filter: blur(16px);
  margin-bottom: 22px;
}

.tm-legal-premium__kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tm-legal-accent);
  font-weight: 700;
}

.tm-legal-premium__title {
  margin: 0 0 10px;
  font-family: Montserrat, Plus Jakarta Sans, Inter, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  background: linear-gradient(135deg, #f8fafc, #bae6fd 45%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tm-legal-premium__lede {
  margin: 0 0 14px;
  color: var(--tm-legal-muted);
  line-height: 1.65;
  max-width: 68ch;
}

.tm-legal-premium__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.88rem;
  color: var(--tm-legal-muted);
  margin-bottom: 18px;
}

.tm-legal-premium__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-legal-premium__tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--tm-legal-border);
  color: var(--tm-legal-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tm-legal-premium__tab:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
  transform: translateY(-1px);
}

.tm-legal-premium__tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.35));
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.18);
}

.tm-legal-premium__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 960px) {
  .tm-legal-premium__grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

.tm-legal-sidebar {
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid var(--tm-legal-border);
  background: var(--tm-legal-card);
  backdrop-filter: blur(14px);
}

@media (min-width: 960px) {
  .tm-legal-sidebar {
    position: sticky;
    top: 88px;
  }
}

.tm-legal-sidebar__title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tm-legal-accent);
  font-weight: 700;
}

.tm-legal-sidebar__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-legal-sidebar__link {
  display: block;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 10px;
  color: var(--tm-legal-muted);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
  transition: background 0.2s, color 0.2s;
}

.tm-legal-sidebar__link:hover,
.tm-legal-sidebar__link.is-active {
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
}

.tm-legal-sidebar__top {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--tm-legal-accent);
  text-decoration: none;
}

.tm-legal-premium__content {
  padding: 24px 22px 28px;
  border-radius: 18px;
  border: 1px solid var(--tm-legal-border);
  background: var(--tm-legal-card);
  backdrop-filter: blur(14px);
}

.tm-legal-section {
  scroll-margin-top: 96px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.tm-legal-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tm-legal-section h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: #f8fafc;
}

.tm-legal-section p,
.tm-legal-section li {
  color: var(--tm-legal-muted);
  line-height: 1.7;
}

.tm-legal-section ul,
.tm-legal-section ol {
  margin: 10px 0 0;
  padding-left: 1.25rem;
}

.tm-legal-section li + li {
  margin-top: 8px;
}

.tm-legal-section a {
  color: #7dd3fc;
  text-decoration: none;
}

.tm-legal-section a:hover {
  text-decoration: underline;
}

.tm-legal-premium__foot {
  margin-top: 24px;
  text-align: center;
  color: var(--tm-legal-muted);
  font-size: 0.92rem;
}

.tm-legal-premium__foot a {
  color: #7dd3fc;
}

.tm-legal-premium__foot-muted {
  margin-top: 6px;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* Legal doc modal */
.tm-legal-modal[hidden] {
  display: none !important;
}

.tm-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tm-legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.tm-legal-modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 40px rgba(56, 189, 248, 0.12);
  overflow: hidden;
}

.tm-legal-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.tm-legal-modal__title {
  margin: 0;
  font-size: 1rem;
  color: #f8fafc;
}

.tm-legal-modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-legal-modal__open {
  font-size: 0.82rem;
  color: #7dd3fc;
  text-decoration: none;
}

.tm-legal-modal__close {
  border: 0;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.tm-legal-modal__close:hover {
  background: rgba(56, 189, 248, 0.2);
}

.tm-legal-modal__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0b1220;
  min-height: 420px;
}

html {
  scroll-behavior: smooth;
}
