/* Legal article typography. The outer page width remains theme-owned. */
.riko-legal h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 2.7vw, 2.15rem);
  font-weight: 700;
  line-height: 1.22;
}

.riko-legal h2 {
  margin: 1.8rem 0 .75rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
}

.riko-legal h3 {
  margin: 1.4rem 0 .6rem;
  font-size: 1.075rem;
  font-weight: 600;
  line-height: 1.4;
}

.riko-legal p,
.riko-legal li {
  line-height: 1.75;
}

.riko-legal a {
  text-decoration: underline;
  text-underline-offset: .16em;
  overflow-wrap: anywhere;
}

.riko-legal summary {
  display: list-item;
  padding-block: .45rem;
  color: var(--riko-link);
  font-weight: 600;
  cursor: pointer;
  list-style-type: disclosure-closed;
}

.riko-legal details[open] > summary {
  list-style-type: disclosure-open;
}

.riko-legal summary::-webkit-details-marker {
  display: inline;
}

.riko-legal summary:focus-visible,
.riko-legal a:focus-visible {
  outline: 2px solid var(--riko-focus);
  outline-offset: 3px;
}

.riko-legal nav ul {
  margin: .5rem 0 1rem;
  padding-left: 1.25rem;
}

.riko-legal__guarantee,
.riko-legal__form-model {
  margin-block: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--riko-line);
}

.riko-legal__guarantee > :first-child,
.riko-legal__form-model > :first-child {
  margin-top: 0;
}

.riko-legal__guarantee > :last-child,
.riko-legal__form-model > :last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  /* The article template nests two .tm-article wrappers. Keep the page gutter
     instead of adding the theme's mobile card padding to both wrappers. */
  body.riko-component-content.riko-page-inner #tm-content .tm-article:has(.riko-legal) {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}
