/* Ritaj Simsim: content pages (about, contact, policies). */

.rs-page {
  padding-block-end: 64px;
}

/* Header band */
.rs-page__hero {
  position: relative;
  overflow: hidden;
  padding-block: 40px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, #fffaf0, transparent 70%),
    linear-gradient(180deg, var(--rs-sand-100), var(--rs-bg));
  border-block-end: 1px solid var(--rs-line);

  .rs-page__hero-inner {
    position: relative;
    display: grid;
    justify-items: center;
  }
}

/* Star pattern fading out from the middle (page header, about page header and ending) */
.rs-page__pattern {
  position: absolute;
  inset: 0;
  background-image: var(--rs-star);
  background-size: 56px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 40%, black, transparent 72%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

.rs-page__crumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--rs-muted);

  a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--rs-primary);
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  span {
    display: inline-flex;
    align-items: center;
  }
}

.rs-page__title {
  margin-block-start: 4px;
  font-weight: 700;
  font-size: clamp(28px, 1.2rem + 2vw, 42px);
  line-height: 1.35;
  text-wrap: balance;
}

.rs-page__lead {
  max-width: 560px;
  margin-block-start: 8px;
  font-size: 18px;
  color: var(--rs-gold);
  font-weight: 600;
}

.rs-page__divider {
  width: 220px;
  margin-block: 14px 0;
}

/* Body: text, with a table of contents beside it on policy pages */
.rs-page__body {
  display: grid;
  gap: 24px;
  margin-block-start: 36px;
}

.rs-page__toc {
  padding: 18px 20px;
  border-radius: var(--rs-radius);
  background-color: var(--rs-surface);
  border: 1px solid var(--rs-line);

  .rs-page__toc-title {
    font-weight: 700;
    margin-block-end: 6px;
  }

  ol {
    display: grid;
    gap: 2px;
    list-style: none;
    counter-reset: toc;
  }

  li {
    counter-increment: toc;
  }

  a {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding-inline: 8px;
    border-radius: 10px;
    color: var(--rs-text);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    transition:
      background-color 0.2s,
      color 0.2s;

    &::before {
      content: counter(toc);
      display: grid;
      place-items: center;
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      font-size: 13px;
      font-weight: 700;
      color: var(--rs-primary);
      background-color: var(--rs-sand-100);
    }

    &:hover,
    &.is-current {
      background-color: var(--rs-sand-100);
      color: var(--rs-primary);
    }
  }
}

/* Contact */
.rs-contact {
  display: grid;
  gap: 16px;
  margin-block-start: 32px;
}

.rs-contact__card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px 22px;
  border-radius: var(--rs-radius-lg);
  background-color: var(--rs-surface);
  border: 1px solid var(--rs-line);

  h2 {
    font-size: 21px;
    font-weight: 700;
  }

  p {
    color: var(--rs-muted);
    line-height: 1.85;
  }
}

.rs-contact__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--rs-primary);
  background-color: var(--rs-sand-100);
  border-radius: 50% 50% 16px 16px;
}

.rs-contact__points {
  display: grid;
  gap: 8px;

  li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.7;
  }

  .rs-icon {
    margin-block-start: 3px;
    padding: 2px;
    border-radius: 50%;
    color: var(--rs-bg);
    background-color: var(--rs-primary);
  }
}

.rs-contact__links {
  display: grid;
  gap: 8px;

  a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding-inline: 14px;
    border-radius: 14px;
    border: 1px solid var(--rs-line);
    color: var(--rs-text);
    font-weight: 600;
    text-decoration: none;
    transition:
      border-color 0.2s,
      background-color 0.2s,
      transform 0.3s var(--rs-ease);

    .rs-icon {
      color: var(--rs-primary);
    }

    &:hover {
      border-color: var(--rs-primary);
      background-color: var(--rs-sand-100);
      transform: translateY(-2px);
    }
  }
}

/* FAQ page: the topic bar under the header, and the topics a little closer together than story chapters */
.rs-faq-nav {
  margin-block-start: 28px;

  .rs-read__chips {
    justify-content: center;
  }
}

.rs-read--faq {
  gap: clamp(40px, 5vw, 64px);
}

.rs-faq-topic {
  scroll-margin-top: 110px;

  > .rs-read__chips {
    margin-block-start: 18px;
  }
}

/* Contact page: the FAQ hint under the two cards */
.rs-contact__faq {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-block-start: 28px;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  color: var(--rs-muted);

  .rs-icon {
    color: var(--rs-gold);
  }

  a {
    font-weight: 700;
    color: var(--rs-primary);
    text-underline-offset: 5px;
  }
}

/* The form box inside the "write to us" chapter */
.rs-read__body .rs-contact-form {
  max-width: none;
  margin-block-start: 1.2em;
}

.rs-contact-form {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-block-start: 40px;
  padding: 26px 22px;
  border-radius: var(--rs-radius-lg);
  background-color: var(--rs-surface);
  border: 1px solid var(--rs-line);

  h2 {
    font-size: 22px;
    font-weight: 700;
  }

  > p {
    color: var(--rs-muted);
  }

  form {
    display: grid;
    gap: 14px;
    margin-block-start: 8px;
  }

  .fields {
    display: grid;
    gap: 14px;
  }

  .field {
    display: grid;
    gap: 6px;

    label {
      font-weight: 600;
      font-size: 15px;
    }

    input,
    textarea {
      width: 100%;
      min-height: 50px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--rs-sand-200);
      background-color: var(--rs-bg);
      font: 400 16px/1.6 var(--font-family);
      color: var(--rs-text);
      transition:
        border-color 0.2s,
        box-shadow 0.2s;

      &:focus {
        outline: none;
        border-color: var(--rs-primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary) 20%, transparent);
      }
    }
  }

  button[type="submit"] {
    justify-self: start;
    min-height: 50px;
    padding-inline: 28px;
    border: none;
    border-radius: 999px;
    font: 600 16px/1 var(--font-family);
    color: var(--rs-bg);
    background-color: var(--rs-primary);
    cursor: pointer;

    &:hover {
      background-color: color-mix(in srgb, var(--rs-primary) 86%, black);
    }
  }

  .success,
  .error {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
  }

  .success {
    background-color: #e7f3e9;
    color: #1e5a2c;
  }

  .error {
    background-color: #f9e3e1;
    color: #8c1d18;
  }
}

/* Reviews page */
.rs-review-page {
  display: grid;
  gap: 56px;
  margin-block-start: 36px;

  .rs-reviews__wall {
    display: grid;
    gap: 20px;
    text-align: center;
  }

  .rs-reviews__list {
    text-align: start;
  }
}

.rs-review-card {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding: 26px 20px;
  border-radius: var(--rs-radius-lg);
  background:
    linear-gradient(180deg, #fffdf8, var(--rs-surface));
  border: 1.5px solid color-mix(in srgb, var(--rs-accent) 70%, transparent);
  box-shadow: var(--rs-shadow);
}

.rs-review-form {
  display: grid;
  gap: 18px;

  h2 {
    font-size: 23px;
    font-weight: 700;
  }

  .rs-review-form__lead {
    margin-block-start: -8px;
    color: var(--rs-muted);
    line-height: 1.8;
  }

  .rs-review-form__row {
    display: grid;
    gap: 18px;
  }

  .rs-review-form__field {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;

    > label,
    legend {
      padding: 0;
      font-size: 15px;
      font-weight: 600;
    }

    small {
      font-size: 13px;
      color: var(--rs-muted);
    }

    input,
    select,
    textarea {
      width: 100%;
      min-height: 52px;
      padding: 12px 14px;
      border-radius: 14px;
      border: 1px solid var(--rs-sand-200);
      background-color: var(--rs-bg);
      font: 400 16px/1.6 var(--font-family);
      color: var(--rs-text);
      transition:
        border-color 0.2s,
        box-shadow 0.2s;

      &:focus {
        outline: none;
        border-color: var(--rs-primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary) 18%, transparent);
      }
    }

    input,
    select {
      height: 52px;
    }

    textarea {
      resize: vertical;
    }
  }

  .rs-review-form__status {
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    color: #8c1d18;
    background-color: #f9e3e1;
  }

  .rs-btn {
    justify-self: stretch;
  }

  .rs-btn[data-loading] {
    pointer-events: none;
    opacity: 0.7;
  }

  .rs-review-form__note {
    font-size: 13.5px;
    line-height: 1.7;
    text-align: center;
    color: var(--rs-muted);
  }
}

/* Star rating: the radios are listed 5 to 1 and shown 1 to 5, so a choice lights up the stars before it. */
.rs-review-form .rs-rating__stars {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;

  input {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
  }

  label {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    font-size: 34px;
    line-height: 1;
    color: var(--rs-sand-200);
    cursor: pointer;
    transition:
      color 0.15s,
      transform 0.2s var(--rs-ease);
  }

  label:hover,
  label:hover ~ label,
  input:checked ~ label {
    color: var(--rs-gold);
  }

  label:hover {
    transform: scale(1.12);
  }

  input:focus-visible + label {
    outline: 2px solid var(--rs-primary);
    outline-offset: 2px;
    border-radius: 10px;
  }
}

.rs-review-done {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-block: 20px;
  text-align: center;

  &:focus {
    outline: none;
  }

  h2 {
    font-size: 24px;
    font-weight: 700;
  }

  p {
    max-width: 460px;
    color: var(--rs-muted);
    line-height: 1.8;
  }
}

.rs-review-done__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: var(--rs-primary);
  background-color: var(--rs-sand-100);
  border-radius: 50% 50% 18px 18px;
}

/* Reading pages built by the theme: about (snippet rs-about) and payment (snippet rs-payment) */
.rs-page:has(> .rs-read-end) {
  padding-block-end: 0;
}

.rs-read-hero {
  position: relative;
  overflow: hidden;
  padding-block: 8px 44px;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, #fffaf0, transparent 70%),
    linear-gradient(180deg, var(--rs-sand-100), var(--rs-bg));
  border-block-end: 1px solid var(--rs-line);

  .rs-page__crumbs {
    justify-content: flex-start;
  }

  .rs-divider {
    margin-block: 16px 18px;
  }
}

.rs-read-hero__inner {
  position: relative;
  display: grid;
  gap: 28px;
  align-items: center;
}

.rs-read-hero__title {
  margin-block-start: 4px;
  font-weight: 700;
  font-size: clamp(34px, 1.1rem + 3.6vw, 62px);
  line-height: 1.25;
  text-wrap: balance;
}

.rs-read-hero__intro {
  max-width: 34em;
}

.rs-read-hero__media {
  margin: 0;
  padding: 8px;
  border-radius: 22px;
  background-color: var(--rs-surface);
  box-shadow: var(--rs-shadow);

  img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    animation: rs-read-open 1.5s var(--rs-ease) 0.15s backwards;
  }
}

/* The photo of the gate opens from the middle, like its two leaves (off with reduced motion: data-rs-motion).
   No fill once it has played, so the whole photo stays visible without any clip. */
@keyframes rs-read-open {
  from {
    clip-path: inset(0 44% round 14px);
  }
  to {
    clip-path: inset(0 round 14px);
  }
}

.rs-read {
  display: grid;
  /* One column that never grows past the screen (2026-11-11): on the live contact page the captcha of the form,
     302 px wide in its card, made every part of the page 380 px wide on a 360 px phone. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(56px, 7vw, 96px);
  padding-block: clamp(48px, 6vw, 88px) clamp(64px, 8vw, 112px);
}

.rs-read__single,
.rs-read__split {
  max-width: calc(720px + 2 * var(--rs-gutter));
}

.rs-read__single > * + *,
.rs-read__body > * + * {
  margin-block-start: 1em;
}

.rs-read__h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 18px;
  font-weight: 700;
  font-size: clamp(24px, 1.05rem + 1.3vw, 34px);
  line-height: 1.4;
  text-wrap: balance;

  .rs-icon {
    color: var(--rs-gold);
  }
}

/* Long paragraphs are justified on every screen here, as the owner asked for this page. */
.rs-read__p {
  font-size: clamp(17px, 1rem + 0.15vw, 18px);
  line-height: 1.95;
  color: color-mix(in srgb, var(--rs-text) 88%, var(--rs-bg));
  text-align: justify;
  text-align-last: start;
  /* English words break at syllables instead of stretching the spaces; no effect on Arabic. */
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* A paragraph holding an e-mail address: the address cannot break, so justification would open wide gaps. */
.rs-read__p--start {
  text-align: start;
}

.rs-read__ask {
  font-size: 18px;
  font-weight: 700;
}

.rs-read__questions {
  padding: 0;
  list-style: none;

  li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-block: 14px;
    font-size: clamp(17px, 1rem + 0.3vw, 19px);
    font-weight: 600;
    line-height: 1.75;

    & + li {
      border-block-start: 1px solid var(--rs-line);
    }
  }

  .rs-icon {
    margin-block-start: 0.3em;
    color: var(--rs-gold);
  }
}

.rs-read__born,
.rs-read__lead {
  font-size: clamp(20px, 1rem + 0.8vw, 25px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--rs-primary);
}

/* Chapters with a photo: title, photo, text on phones; text beside the photo on computers. */
.rs-read__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "media"
    "body";

  > .rs-read__h2 {
    grid-area: head;
  }

  .rs-read__body {
    grid-area: body;
  }

  .rs-read__figure {
    grid-area: media;
    margin-block-end: 30px;
  }
}

/* Thin brass frame set behind the photo, like the trim around the gate. */
.rs-read__figure {
  position: relative;
  isolation: isolate;
  margin: 0;
  margin-inline-end: 12px;

  &::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block: 12px -12px;
    inset-inline: 12px -12px;
    border: 1px solid var(--rs-accent);
    border-radius: 18px;
  }

  img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: var(--rs-shadow);
  }
}

.rs-read__quote {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-block: 1.6em;
  padding-block: 22px;
  text-align: center;
  border-block: 1px solid var(--rs-line);

  img {
    width: 58px;
    height: auto;
  }

  p {
    font-size: clamp(22px, 1rem + 1.3vw, 30px);
    font-weight: 700;
    line-height: 1.5;
    color: var(--rs-primary);
    text-wrap: balance;
  }
}

.rs-read__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;

  a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding-inline: 18px;
    border-radius: 999px;
    border: 1px solid var(--rs-line);
    background-color: var(--rs-surface);
    color: var(--rs-text);
    font-weight: 600;
    font-size: 15.5px;
    text-decoration: none;
    transition:
      border-color 0.2s,
      background-color 0.2s,
      transform 0.3s var(--rs-ease);

    .rs-icon {
      color: var(--rs-primary);
    }

    &:hover {
      border-color: var(--rs-primary);
      background-color: var(--rs-sand-100);
      transform: translateY(-2px);
    }
  }
}

/* Night band (values on the about page, safety on the payment page) */
.rs-read-night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 104px);
  color: var(--rs-bg);
  text-align: center;
  background:
    radial-gradient(ellipse 55% 65% at 50% 0%, color-mix(in srgb, var(--rs-accent) 26%, var(--rs-dark)), transparent 72%),
    var(--rs-dark);
}

.rs-read-night__pattern {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: var(--rs-star);
  background-size: 64px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black, transparent 75%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

.rs-read-night__title {
  font-weight: 700;
  font-size: clamp(26px, 1.1rem + 1.6vw, 40px);
  line-height: 1.35;
  color: var(--rs-bg);
  text-wrap: balance;
}

.rs-read-night__intro {
  max-width: 36em;
  margin: 12px auto 0;
  font-size: clamp(16px, 0.95rem + 0.3vw, 18px);
  line-height: 1.9;
  color: color-mix(in srgb, var(--rs-bg) 80%, var(--rs-dark));
}

.rs-read-values__list {
  display: grid;
  column-gap: 40px;
  margin-block-start: clamp(32px, 5vw, 56px);
  padding: 0;
  list-style: none;
  text-align: start;

  li {
    display: grid;
    gap: 10px;
    align-content: start;
    padding-block: 24px;
    border-block-start: 1px solid color-mix(in srgb, var(--rs-accent) 35%, transparent);
  }

  h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--rs-bg);
  }

  p {
    font-size: 16px;
    line-height: 1.85;
    color: color-mix(in srgb, var(--rs-bg) 78%, var(--rs-dark));
  }
}

.rs-read-values__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--rs-accent);
  border: 1px solid color-mix(in srgb, var(--rs-accent) 55%, transparent);
}

/* Ending: where we are heading, and the invitation */
.rs-read-end {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 104px);
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, #fffaf0, transparent 70%),
    linear-gradient(180deg, var(--rs-bg), var(--rs-sand-100));
}

.rs-read-end__inner {
  position: relative;
  display: grid;
  justify-items: center;
  max-width: calc(720px + 2 * var(--rs-gutter));

  .rs-read__h2 {
    justify-content: center;
  }
}

.rs-read-end__text {
  max-width: 36em;
  font-size: clamp(17px, 1rem + 0.15vw, 18px);
  line-height: 1.95;
  color: color-mix(in srgb, var(--rs-text) 88%, var(--rs-bg));
}

.rs-read-end__line {
  margin-block: 22px 28px;
  font-size: clamp(26px, 1rem + 2.4vw, 44px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--rs-primary);
  text-wrap: balance;
}

.rs-read-end__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Payment page: the three steps, on a numbered path */
.rs-read__steps {
  padding: 0;
  list-style: none;
  counter-reset: rs-step;

  li {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 4px;
    padding-block-end: 28px;
    counter-increment: rs-step;

    &::before {
      content: counter(rs-step);
      grid-row: 1 / span 2;
      display: grid;
      place-items: center;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      font-size: 20px;
      font-weight: 700;
      color: var(--rs-bg);
      background-color: var(--rs-primary);
      box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--rs-primary) 90%, transparent);
    }

    /* The thread from one number to the next */
    &:not(:last-child)::after {
      content: "";
      position: absolute;
      inset-block: 56px 6px;
      inset-inline-start: 23.5px;
      width: 1px;
      background: linear-gradient(180deg, var(--rs-accent), transparent);
    }

    &:last-child {
      padding-block-end: 0;
    }
  }

  h3 {
    align-self: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
  }

  p {
    grid-column: 2;
  }
}

/* Payment page: price + delivery = the amount confirmed by phone */
.rs-read__equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rs-read__term {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--rs-line);
  background-color: var(--rs-surface);
  font-weight: 600;
  line-height: 1.5;

  &.is-total {
    border-color: var(--rs-primary);
    color: var(--rs-bg);
    background-color: var(--rs-primary);
  }
}

.rs-read__op {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--rs-primary);
}

/* Payment page: what the team never asks, on the night band */
.rs-read-night__inner {
  display: grid;
  justify-items: center;
}

.rs-read-night__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-block-end: 16px;
  border-radius: 50%;
  color: var(--rs-accent);
  border: 1px solid color-mix(in srgb, var(--rs-accent) 55%, transparent);
}

.rs-read-night__list {
  display: grid;
  width: 100%;
  margin-block: clamp(28px, 4vw, 44px);
  padding: 0;
  list-style: none;
  text-align: start;

  li {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-block: 18px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.7;
    color: var(--rs-bg);
    border-block-start: 1px solid color-mix(in srgb, var(--rs-accent) 35%, transparent);
  }

  .rs-icon {
    padding: 8px;
    border-radius: 50%;
    color: var(--rs-dark);
    background-color: var(--rs-accent);
    box-sizing: content-box;
  }
}

.rs-read-night__end {
  max-width: 36em;
  margin-block-end: 20px;
  font-size: 17px;
  line-height: 1.9;
  color: color-mix(in srgb, var(--rs-bg) 80%, var(--rs-dark));
}

/* Questions that open one by one (native details: works without script, keyboard and screen readers included) */
.rs-read__faq {
  border-block-start: 1px solid var(--rs-line);

  details {
    border-block-end: 1px solid var(--rs-line);
  }

  summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding-block: 14px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
    list-style: none;
    cursor: pointer;
    transition: color 0.2s;

    &::-webkit-details-marker {
      display: none;
    }

    .rs-icon {
      color: var(--rs-gold);
      transition: transform 0.3s var(--rs-ease);
    }

    &:hover {
      color: var(--rs-primary);
    }
  }

  details[open] summary .rs-icon {
    transform: rotate(180deg);
  }

  .rs-read__p {
    padding-block-end: 18px;
  }
}

/* Payment page: a quiet note on the methods to come */
.rs-read__note {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border-radius: var(--rs-radius);
  background-color: var(--rs-sand-100);

  h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;

    .rs-icon {
      color: var(--rs-primary);
    }
  }
}

/* Delivery page: what the price includes */
.rs-read__checks {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;

  li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.7;
  }

  .rs-icon {
    box-sizing: content-box;
    margin-block-start: 0.3em;
    padding: 4px;
    border-radius: 50%;
    color: var(--rs-bg);
    background-color: var(--rs-primary);
  }
}

/* A short question and its answer inside a chapter */
.rs-read__qa {
  padding-block-start: 16px;
  border-block-start: 1px solid var(--rs-line);

  h3 {
    margin-block-end: 4px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
  }
}

/* Delivery page: the countries served */
.rs-read__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;

  li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 999px;
    border: 1px solid var(--rs-line);
    background-color: var(--rs-surface);
    font-size: 15.5px;
    font-weight: 600;
  }

  .rs-icon {
    color: var(--rs-primary);
  }
}

/* The map is wider than the reading column on computers (see the 1025 px rule). */
.rs-read__figure--wide {
  margin-block-start: 28px;
}

/* Delivery page: the order's way, from the call to the door */
.rs-read__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block-end: 8px;
  padding: 0;
  list-style: none;
  text-align: center;

  li {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;

    /* Thread from the previous step: from its icon's edge to this one's */
    & + li::before {
      content: "";
      position: absolute;
      inset-block-start: 28px;
      inset-inline-start: calc(-50% + 26px);
      width: calc(100% - 60px);
      height: 1px;
      background-color: var(--rs-accent);
    }
  }
}

.rs-read__track-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--rs-primary);
  background-color: var(--rs-surface);
  border: 1px solid var(--rs-line);
}

/* Legal pages: date of the last update, under the title */
.rs-read-hero__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--rs-line);
  background-color: var(--rs-surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--rs-muted);

  .rs-icon {
    color: var(--rs-primary);
  }
}

/* Legal pages (terms, privacy): numbered sections, every paragraph and item justified (as asked for these pages) */
.rs-prose.rs-legal {
  counter-reset: rs-legal;

  h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block-start: 0;
    counter-increment: rs-legal;

    &::before {
      content: counter(rs-legal);
      position: static;
      display: grid;
      place-items: center;
      flex-shrink: 0;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      font-size: 16px;
      font-weight: 700;
      line-height: 1;
      color: var(--rs-bg);
      background: var(--rs-primary);
    }
  }

  p,
  li {
    text-align: justify;
    text-align-last: start;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .rs-read__figure {
    margin-block: 1.4em 1.8em;
  }

  /* A commitment that closes a section ("we do not sell your data") */
  .rs-legal__strong {
    font-weight: 700;
    text-align: start;
    color: var(--rs-primary);
  }

  .rs-legal__plain {
    text-align: start;
  }

  /* Numbered steps (how to request a return), aligned to the start: they hold an e-mail address */
  .rs-legal__steps {
    display: grid;
    gap: 14px;
    padding: 0;
    list-style: none;
    counter-reset: rs-legal-step;

    li {
      position: relative;
      min-height: 34px;
      padding-inline-start: 48px;
      text-align: start;
      counter-increment: rs-legal-step;

      &::before {
        content: counter(rs-legal-step);
        position: absolute;
        inset-block-start: 0.15em;
        inset-inline-start: 0;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 15px;
        font-weight: 700;
        color: var(--rs-primary);
        background-color: var(--rs-sand-100);
        border: 1px solid var(--rs-line);
      }
    }
  }

  /* Closing reminder of the consumer's rights */
  .rs-legal__note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-block-start: 2em;
    padding: 16px 20px;
    border-radius: var(--rs-radius);
    background-color: var(--rs-sand-100);
    font-weight: 600;
    text-align: start;

    .rs-icon {
      flex-shrink: 0;
      margin-block-start: 0.3em;
      color: var(--rs-primary);
    }
  }
}

/* Legal pages: the essentials, each linked to its section (inside .rs-prose, so its list and links styles are overridden) */
.rs-prose .rs-legal__key {
  padding: 20px 22px;
  border-radius: var(--rs-radius);
  background-color: var(--rs-sand-100);

  .rs-legal__key-title {
    margin-block-end: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--rs-text);
  }

  ul {
    display: grid;
    gap: 2px;
    padding: 0;
  }

  li {
    padding-inline-start: 0;

    &::before {
      content: none;
    }
  }

  a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--rs-text);
    text-decoration: none;
    transition: color 0.2s;

    &:hover {
      color: var(--rs-primary);
    }
  }

  .rs-icon {
    box-sizing: content-box;
    padding: 4px;
    border-radius: 50%;
    color: var(--rs-bg);
    background-color: var(--rs-primary);
  }
}

.rs-read__aside {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--rs-muted);

  .rs-icon {
    margin-block-start: 0.3em;
    color: var(--rs-gold);
  }
}

@media (min-width: 768px) {
  .rs-page__hero {
    padding-block: 56px 40px;
  }

  .rs-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rs-contact-form {
    margin-inline: auto;
    padding: 34px 36px;

    .fields {
      grid-template-columns: repeat(2, minmax(0, 1fr));

      .field:last-child {
        grid-column: 1 / -1;
      }
    }
  }

  .rs-read-values__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rs-legal__key ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .rs-read-night__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0;

    li {
      flex-direction: column;
      gap: 12px;
      padding-inline: 24px;
      text-align: center;
      border-block-start: 0;

      & + li {
        border-inline-start: 1px solid color-mix(in srgb, var(--rs-accent) 35%, transparent);
      }
    }
  }

  .rs-review-card {
    padding: 36px 40px;
  }

  .rs-review-form .rs-review-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rs-review-form .rs-btn {
    justify-self: start;
  }
}

@media (min-width: 1025px) {
  /* The column is reserved from the start so the contents appearing does not shift the text. */
  .rs-read-hero {
    padding-block: 28px 72px;
  }

  /* 940 px wide around the 720 px reading column (12 px kept on the end side for the brass frame) */
  .rs-read__figure--wide {
    margin-inline: -110px -98px;
  }

  .rs-read-hero__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(40px, 5vw, 72px);
  }

  /* The empty rows above and below keep the text centred beside the photo. */
  .rs-read__split {
    max-width: 1232px;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".    media"
      "head media"
      "body media"
      ".    media";
    column-gap: clamp(48px, 5vw, 80px);

    .rs-read__figure {
      align-self: center;
      margin-block-end: 12px;
    }
  }

  .rs-read__split--flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas:
      "media .   "
      "media head"
      "media body"
      "media .   ";
  }

  .rs-read-values__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 0;

    li {
      padding-inline: 28px;
      border-block-start: 0;

      & + li {
        border-inline-start: 1px solid color-mix(in srgb, var(--rs-accent) 35%, transparent);
      }

      &:first-child {
        padding-inline-start: 0;
      }

      &:last-child {
        padding-inline-end: 0;
      }
    }
  }

  .rs-page__body.has-toc {
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 48px;

    .rs-prose {
      margin-inline: 0;
    }

    .rs-page__toc {
      position: sticky;
      inset-block-start: 110px;
    }
  }
}
