/* Legal rules page — scoped lm-legal-* */

body.lm-legal-active .site-content,
body.lm-legal-active .elementor-section-wrap,
body.lm-legal-active .elementor-widget-shortcode {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body .lm-legal-page {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  background: #f7f9fc;
  color: #0b2447;
}

@media (min-width: 1025px) {
  body .lm-legal-page {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

body .lm-legal-page *,
body .lm-legal-page *::before,
body .lm-legal-page *::after {
  box-sizing: border-box;
}

.lm-legal-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.lm-legal-hero {
  position: relative;
  padding: 44px 0 36px;
  background: #f3f5f8;
  border-bottom: 1px solid rgba(11, 36, 71, 0.08);
}

.lm-legal-hero__icon {
  position: absolute;
  top: 50%;
  color: #94a3b8;
  opacity: 0.55;
  transform: translateY(-50%);
  pointer-events: none;
}

.lm-legal-hero__icon--left {
  left: max(12px, calc(50% - 620px));
}

.lm-legal-hero__icon--right {
  right: max(12px, calc(50% - 620px));
}

.lm-legal-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
}

.lm-legal-hero__badge {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lm-legal-hero__title {
  margin: 0 0 14px;
  color: #0b2447;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lm-legal-hero__intro {
  margin: 0 0 12px;
  color: #334155;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  font-weight: 500;
}

.lm-legal-hero__note {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;
}

/* Layout */
.lm-legal-layout {
  padding: 28px 0 36px;
  background: #fff;
}

.lm-legal-layout__grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Sidebar TOC */
.lm-legal-toc {
  position: sticky;
  top: 24px;
}

.lm-legal-toc__title {
  margin: 0 0 14px;
  color: #0b2447;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
}

.lm-legal-toc__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.lm-legal-toc__link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  color: #2563eb;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  text-decoration: none;
}

.lm-legal-toc__link:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.lm-legal-toc__arrow {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1;
}

.lm-legal-toc__card {
  padding: 16px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(11, 36, 71, 0.08);
}

.lm-legal-toc__card-title {
  margin: 0 0 8px;
  color: #0b2447;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.lm-legal-toc__card-text {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
}

.lm-legal-toc__card-link {
  color: #2563eb;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  text-decoration: none;
}

.lm-legal-toc__card-link:hover {
  color: #1d4ed8;
  text-decoration: none;
}

/* Accordion */
.lm-legal-accordion {
  border-top: 1px solid rgba(11, 36, 71, 0.08);
}

.lm-legal-accordion__item {
  border-bottom: 1px solid rgba(11, 36, 71, 0.08);
}

.lm-legal-accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: #0b2447;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.lm-legal-accordion__summary::-webkit-details-marker {
  display: none;
}

.lm-legal-accordion__chevron {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  position: relative;
}

.lm-legal-accordion__chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.lm-legal-accordion__item[open] .lm-legal-accordion__chevron::before {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.lm-legal-accordion__body {
  padding: 0 0 18px;
}

.lm-legal-accordion__paragraph {
  margin: 0 0 12px;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
}

.lm-legal-accordion__paragraph:last-child {
  margin-bottom: 0;
}

/* Bottom notice */
.lm-legal-bottom {
  padding: 0 0 44px;
  background: #fff;
}

.lm-legal-bottom__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f3f5f8;
  border: 1px solid rgba(11, 36, 71, 0.08);
}

.lm-legal-bottom__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(11, 58, 117, 0.08);
  color: #0b3a75;
}

.lm-legal-bottom__text {
  flex: 1 1 auto;
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
}

.lm-legal-bottom__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  background: #0b2447;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.lm-legal-bottom__btn:hover {
  background: #082342;
  color: #fff;
  text-decoration: none;
}

/* Tablet / mobile */
@media (max-width: 1024px) {
  .lm-legal-layout__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .lm-legal-toc {
    position: static;
  }

  .lm-legal-toc__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
  }
}

@media (max-width: 768px) {
  .lm-legal-hero {
    padding: 32px 0 28px;
  }

  .lm-legal-hero__icon {
    display: none;
  }

  .lm-legal-toc__nav {
    grid-template-columns: 1fr;
  }

  .lm-legal-bottom__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .lm-legal-bottom__btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .lm-legal-inner {
    padding: 0 16px;
  }

  .lm-legal-accordion__summary {
    font-size: 16px;
  }
}
