/* Frame each half of the supplied artwork without changing the source images. */
.rm--learning-art .rm-pill {
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-height: 52px;
  margin-left: auto;
  padding: 12px 28px;
  gap: 14px;
  font-size: 16px;
}

.rm--learning-art .rm-days {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 34px;
}

.rm--learning-art .rm-card {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 1px solid #dbe3ff;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.rm-card--learning-basic {
  --rm-art: url("/assets/roadmap-learning-days-01-02.png");
  --rm-art-ratio: 722 / 1030;
  --rm-art-width: 209.4183%;
  --rm-art-left: -3.0471%;
  --rm-art-top: -.9709%;
  --rm-art-position: 2.7848%;
}
.rm-card--learning-basic.rm-card--learning-right {
  --rm-art-ratio: 721 / 1030;
  --rm-art-width: 209.7087%;
  --rm-art-left: -106.6574%;
  --rm-art-position: 97.2187%;
}
.rm-card--learning-standard {
  --rm-art: url("/assets/roadmap-learning-days-03-04.png");
  --rm-art-ratio: 732 / 1016;
  --rm-art-width: 209.8361%;
  --rm-art-left: -3.0055%;
  --rm-art-top: -.7874%;
  --rm-art-position: 2.7363%;
}
.rm-card--learning-standard.rm-card--learning-right {
  --rm-art-left: -106.8306%;
  --rm-art-position: 97.2637%;
}

.rm--learning-art .rm-card__art {
  position: relative;
  aspect-ratio: var(--rm-art-ratio);
  overflow: hidden;
  border-radius: inherit;
}
.rm--learning-art .rm-card__art img {
  position: absolute;
  top: var(--rm-art-top);
  left: var(--rm-art-left);
  display: block;
  width: var(--rm-art-width);
  max-width: none;
  height: auto;
}

/* Omit the circles baked into the edges of the reference images. */
.rm--learning-art .rm-card__art {
  clip-path: polygon(0 0, 100% 0, 100% 50%, 94% 50%, 94% 63%, 100% 63%, 100% 100%, 0 100%, 0 63%, 4% 63%, 4% 50%, 0 50%);
}

/* Render the day label as text so it stays sharp and uses single-digit numbers. */
.rm--learning-art .rm-card__head {
  position: absolute;
  z-index: 1;
  inset: 0;
  clip-path: inset(0 64% 75% 0);
  background: #fff;
  pointer-events: none;
}

/* Retain the card copy for screen readers alongside the supplied artwork. */
.rm--learning-art .rm-card > :not(.rm-card__art, .rm-card__head),
.rm--learning-art .rm-card__head > * {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rm--learning-art .rm-card__head .rm-card__day {
  position: absolute;
  top: 5%;
  left: 7%;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  color: #111c4a;
  font-size: clamp(32px, 2.5vw, 38px);
  font-weight: 800;
  line-height: 1;
  white-space: normal;
}
.rm--learning-art .rm-card__head .rm-card__day small {
  margin-bottom: 4px;
  color: #5b73d8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
}
.rm--learning-art .rm-card__head .rm-card__day::after {
  content: "";
  display: block;
  width: 17px;
  height: 3px;
  margin-top: 8px;
  background: #377bff;
}

.rm.rm--learning-art .rm-mb { display: none; }

/* Plain dotted-tail arrow, matching the user's arrow reference. */
.rm--learning-art .rm-card + .rm-card::before {
  display: block;
  top: 56%;
  left: -33px;
  width: 32px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 32'%3E%3Cpath fill='%2322b8bb' d='M0 13h4v6H0zM8 13h6v6H8zM18 13h23l-9-9 4-4 17 16-17 16-4-4 9-9H18z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
}

.rm--learning-art #rm-course-basic:checked ~ .rm-days .rm-card--std::after {
  inset: 25% 3% 2%;
}

@media (min-width: 768px) and (max-width: 1100px) {
  .rm--learning-art .rm-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm--learning-art .rm-card:nth-child(3)::before { display: none; }
}

.rm-mb__course-note { display: none; }

@media (max-width: 767px) {
  .mirror-home-page .contents .rm.rm--learning-art {
    padding: 34px 18px 42px;
    background: #f6f8ff;
  }

  .mirror-home-page .rm--learning-art .rm-title {
    font-size: clamp(17px, 4.75vw, 22px);
    line-height: 1.34;
  }

  .mirror-home-page .rm--learning-art .rm-tabs {
    gap: 0;
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #a6baff;
    border-radius: 6px;
    background: #fff;
  }

  .mirror-home-page .rm--learning-art .rm-tabs label {
    min-height: 44px;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 3px;
    border-radius: 0;
    color: #5a668c;
    font-size: 15px;
    box-shadow: none;
  }

  .mirror-home-page .rm--learning-art .rm-tabs label + label { border-left: 1px solid #e0e7fb; }
  .mirror-home-page .rm--learning-art .rm-tabs__days { font-size: 15px; }
  .mirror-home-page .rm--learning-art .rm-tabs__note { display: none; }

  .mirror-home-page .rm--learning-art #rm-course-basic:checked ~ .rm-tabs label[for="rm-course-basic"],
  .mirror-home-page .rm--learning-art #rm-course-std:checked ~ .rm-tabs label[for="rm-course-std"] {
    background: #fff;
    color: #1452e8;
    box-shadow: inset 0 -3px 0 #225cff;
  }

  .mirror-home-page .rm--learning-art .rm-mb__course-note {
    display: grid;
    place-items: center;
    min-height: 24px;
    margin: 5px 0 0;
    border-radius: 5px;
    background: #e9efff;
    color: #2854d3;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
  }

  .mirror-home-page .rm--learning-art .rm-mb__course-note span { display: none; }
  .mirror-home-page .rm--learning-art #rm-course-basic:checked ~ .rm-mb__course-note span:first-child,
  .mirror-home-page .rm--learning-art #rm-course-std:checked ~ .rm-mb__course-note span:last-child { display: inline; }

  .mirror-home-page .rm.rm--learning-art .rm-days { display: none; }
  .mirror-home-page .rm.rm--learning-art .rm-mb {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 0;
  }

  .mirror-home-page .rm--learning-art .rm-mb__day {
    position: relative;
    display: block;
    min-width: 0;
    padding: 12px 12px 11px;
    border: 1px solid #d9e3ff;
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
  }

  .mirror-home-page .rm--learning-art .rm-mb__num {
    position: absolute;
    top: 16px;
    left: 13px;
    display: block;
    width: 40px;
    height: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #101b4c;
    font-family: "Inter", sans-serif;
    font-size: 39px;
    font-weight: 800;
    line-height: .98;
  }

  .mirror-home-page .rm--learning-art .rm-mb__num small {
    display: block;
    margin-bottom: 3px;
    color: #527bf1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.2;
  }

  .mirror-home-page .rm--learning-art .rm-mb__num::after {
    display: block;
    width: 17px;
    height: 3px;
    margin-top: 7px;
    background: #3575ff;
    content: "";
  }

  .mirror-home-page .rm--learning-art .rm-mb__body {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .mirror-home-page .rm--learning-art .rm-mb__top {
    position: relative;
    display: block;
    min-height: 78px;
    margin-left: 53px;
    padding: 2px 91px 0 0;
  }

  .mirror-home-page .rm--learning-art .rm-mb__top h3 {
    position: relative;
    z-index: 1;
    color: #111d4c;
    font-size: clamp(14px, 4vw, 17px);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.045em;
  }

  .mirror-home-page .rm--learning-art .rm-mb__desc {
    position: relative;
    z-index: 1;
    display: block;
    max-width: calc(100% - 10px);
    margin-top: 6px;
    color: #607092;
    font-size: 11.5px;
    line-height: 1.5;
  }

  /* Each cropped source image supplies the same isometric artwork as desktop. */
  .mirror-home-page .rm--learning-art .rm-mb__art {
    position: absolute;
    top: -7px;
    right: -5px;
    display: block;
    width: 104px;
    height: 94px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 0 90%, transparent 100%);
    mask-image: linear-gradient(#000 0 90%, transparent 100%);
    pointer-events: none;
  }

  .mirror-home-page .rm--learning-art .rm-mb__art::after {
    position: absolute;
    right: 43%;
    bottom: 0;
    left: 0;
    height: 25px;
    background: linear-gradient(90deg, #fff 70%, #fff0);
    content: "";
  }

  .mirror-home-page .rm--learning-art .rm-mb__art img {
    position: absolute;
    top: -4px;
    display: block;
    width: 454px;
    max-width: none;
    height: auto;
  }

  .mirror-home-page .rm--learning-art .rm-mb__art--day1 img,
  .mirror-home-page .rm--learning-art .rm-mb__art--day3 img { left: -106px; }
  .mirror-home-page .rm--learning-art .rm-mb__art--day2 img,
  .mirror-home-page .rm--learning-art .rm-mb__art--day4 img { left: -335px; }

  .mirror-home-page .rm--learning-art .rm-mb__checks {
    display: grid;
    gap: 3px;
    margin: 1px 0 0;
    padding: 0;
    list-style: none;
  }

  .mirror-home-page .rm--learning-art .rm-mb__checks li {
    position: relative;
    min-height: 18px;
    padding-left: 31px;
    color: #111d4c;
    font-size: 12.7px;
    font-weight: 700;
    line-height: 1.35;
  }

  .mirror-home-page .rm--learning-art .rm-mb__checks li::before {
    position: absolute;
    top: 1px;
    left: 2px;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #2455ee;
    box-shadow: 0 2px 4px #2455ee25;
    color: #fff;
    content: "✓";
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
  }

  .mirror-home-page .rm--learning-art .rm-mb__foot {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    margin-top: 8px;
    padding: 5px 9px;
    border-radius: 6px;
    background: #f1f5ff;
    color: #1253ee;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
  }

  .mirror-home-page .rm--learning-art .rm-mb__foot svg {
    flex: none;
    width: 25px;
    height: 25px;
    padding: 2px;
    border: 2px solid #2370ff;
    border-radius: 5px;
    color: #2370ff;
    stroke-width: 2;
  }

  .mirror-home-page .rm--learning-art .rm-mb__foot-arrow {
    margin-left: auto;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
  }

  .mirror-home-page .rm--learning-art .rm-mb__foot:focus-visible {
    outline: 2px solid #2455ee;
    outline-offset: 2px;
  }

  /* Basic course keeps DAY 03–04 behind the existing mosaic. */
  .mirror-home-page .rm--learning-art #rm-course-basic:checked ~ .rm-mb .rm-mb__day--std {
    height: auto;
    overflow: hidden;
    opacity: 1;
  }

  .mirror-home-page .rm--learning-art #rm-course-basic:checked ~ .rm-mb .rm-mb__day--std .rm-mb__body {
    filter: blur(6px);
  }

  .mirror-home-page .rm--learning-art #rm-course-basic:checked ~ .rm-mb .rm-mb__day--std::after {
    inset: 55px 10px 10px;
    border: 1px solid #dde3fb;
    border-radius: 7px;
    background: repeating-conic-gradient(#f5f6ffe5 0% 25%, #e8edffdc 0% 50%) 0 0 / 12px 12px;
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 359px) {
  .mirror-home-page .rm--learning-art .rm-mb__top { padding-right: 77px; }
  .mirror-home-page .rm--learning-art .rm-mb__art { right: -7px; width: 89px; }
  .mirror-home-page .rm--learning-art .rm-mb__foot { font-size: 11.5px; }
}
