/* Homepage 研修ロードマップ (.rm), per the supplied design.
   Desktop: header + course tabs + four day cards joined by arrow connectors + gradient band (one screen).
   Phone: stacked cards with downward connectors. Course tabs switch the highlighted days via radio inputs. */

.rm {
  --ink: #0f1a4d;
  --text: #3a4468;
  --muted: #7a82a3;
  --accent: #3b5bf6;
  --accent-soft: #e8ecff;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(160, 175, 240, 0.35);
  --dark: #1b2248;
  --green: #22c55e;
  position: relative;
  overflow: hidden;
  padding: 36px 32px 28px;
  background: #eef1ff;
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.6;
  text-align: left;
  isolation: isolate;
}

:where(.rm) *, :where(.rm) *::before, :where(.rm) *::after {
  box-sizing: border-box;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: normal;
}

:where(.rm) :is(h2, h3, p, ul, ol, dl, dd, pre) { margin: 0; padding: 0; }
:where(.rm) :is(ul, ol) { list-style: none; }
:where(.rm) a { text-decoration: none; }

:where(.rm) svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.rm__inner { max-width: 1440px; margin: 0 auto; }

/* ---------- header ---------- */
.rm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }

.rm-eyebrow { color: #6d7cc0; font-size: 14px; font-weight: 500; letter-spacing: 0.08em; line-height: 1.6; }
.rm-eyebrow small { display: block; color: #6d7cc0; font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; }

.rm-title { margin-top: 14px; color: #1e2447; font-size: clamp(30px, 2.8vw, 44px); font-weight: 800; line-height: 1.35; letter-spacing: 0.01em; }
.rm-title .nb { display: inline-block; }

.rm-title em {
  font-style: normal;
  background: linear-gradient(90deg, #3b8cf6, #4f6bf0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rm-head__side { flex: none; width: min(540px, 40%); padding-top: 38px; }
.rm-lead { color: #6a7296; font-size: 14px; line-height: 1.95; }

.rm-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 24px;
  border: 1px solid #aab6ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #3345b8;
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.2s;
}

.rm-pill:hover { background: #fff; }

/* ---------- course tabs ---------- */
.rm-radio { position: absolute; opacity: 0; pointer-events: none; }

.rm-tabs { display: flex; margin-top: 26px; border-bottom: 1px solid #c9d0ee; }

.rm-tabs label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px 14px;
  border-radius: 14px 14px 0 0;
  color: #3a4468;
  font-size: 20px;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 transparent;
  transition: background 0.2s, box-shadow 0.2s;
}

.rm-tabs label b { font-weight: 700; }
.rm-tabs__days { font-weight: 500; }

.rm-tabs__note {
  margin-left: 8px;
  padding: 3px 12px;
  border: 1px solid #c6cdea;
  border-radius: 999px;
  color: #6a7296;
  font-size: 12px;
  font-weight: 500;
}

#rm-course-basic:checked ~ .rm-tabs label[for="rm-course-basic"],
#rm-course-std:checked ~ .rm-tabs label[for="rm-course-std"] {
  background: rgba(255, 255, 255, 0.75);
  color: #2436a8;
  box-shadow: inset 0 -3px 0 var(--accent);
}

#rm-course-basic:checked ~ .rm-tabs label[for="rm-course-basic"] .rm-tabs__note,
#rm-course-std:checked ~ .rm-tabs label[for="rm-course-std"] .rm-tabs__note {
  border-color: transparent;
  background: var(--accent-soft);
  color: #2f45c9;
}

.rm-radio:focus-visible ~ .rm-tabs { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- day cards ---------- */
.rm-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px; margin-top: 22px; }

.rm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 26px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 16px 40px rgba(70, 90, 200, 0.08);
  backdrop-filter: blur(10px);
  transition: opacity 0.25s;
}

/* Arrow connector between cards. */
.rm-card + .rm-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -34px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1.5px solid #9fb0f3;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bf6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 7 5 5-5 5'/%3E%3C/svg%3E") center / 16px no-repeat,
    #fff;
  transform: translate(0, -50%);
}

.rm-card__head { display: flex; align-items: flex-start; justify-content: space-between; }
.rm-card__day { color: var(--ink); font-family: "Inter", sans-serif; font-size: 34px; font-weight: 600; line-height: 1; }
.rm-card__day small { display: block; margin-bottom: 4px; color: #5b73d8; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; }

.rm-card__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(145deg, #eef1ff, #dfe5ff);
  color: #6f86f0;
}

.rm-card__icon svg { width: 30px; height: 30px; }
.rm-card__icon svg rect { fill: currentColor; stroke: none; }

.rm-card__title { margin-top: 14px; color: var(--ink); font-size: clamp(17px, 1.3vw, 19px); font-weight: 800; line-height: 1.4; }
.rm-card__body { margin-top: 8px; min-height: 3.6em; color: #5d6689; font-size: 13px; line-height: 1.8; }

.rm-card__checks { display: grid; gap: 4px; margin-top: 14px; }
.rm-card__checks li { position: relative; padding-left: 24px; color: var(--text); font-size: 13.5px; font-weight: 500; }

.rm-card__checks li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-8.5'/%3E%3C/svg%3E") center / 10px no-repeat,
    #2f45c9;
}

.rm-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #eef1fd;
  color: #2f45c9;
  font-size: 13px;
  font-weight: 700;
}

.rm-card__foot svg { flex: none; width: 16px; height: 16px; }

/* ---------- card mocks ---------- */
.rm-m { position: relative; height: 112px; margin-top: 14px; overflow: hidden; border-radius: 10px; font-size: 11.5px; }

/* 01 prompt */
.rm-m--prompt { padding: 8px 12px 10px; background: var(--dark); color: #fff; }
.rm-m__label { color: rgba(255, 255, 255, 0.75); font-size: 11px; }
.rm-m__input { position: relative; height: 70px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
.rm-m__input p { font-size: 11.5px; line-height: 1.55; }

.rm-m__send {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3b82f6;
  font-size: 13px;
  font-weight: 700;
}

/* 02 editor */
.rm-m--editor { border: 1px solid var(--line); background: #fff; }
.rm-m__tabs { display: flex; gap: 2px; padding: 4px 6px 0; border-bottom: 1px solid #eceff8; background: #f6f7fc; font-size: 11px; }
.rm-m__tabs span { padding: 4px 10px; color: var(--muted); }
.rm-m__tabs span.is-on { border-radius: 6px 6px 0 0; background: #fff; color: var(--ink); font-weight: 700; }

.rm-m__code {
  padding: 6px 10px;
  color: #3a4468;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  white-space: pre;
}

.rm-m__code i { display: inline-block; width: 1.8em; color: #a8afc9; font-style: normal; }
.rm-m__code .k { color: #2f45c9; }
.rm-m__code .f { color: #0f1a4d; }
.rm-m__code .s { color: #4f6bf0; }
.rm-m__code .c { color: #8a93b8; }

.rm-m__run {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
}

/* 03 pull request */
.rm-m--pr { padding: 10px 14px; border: 1px solid var(--line); background: #fff; }
.rm-m__prhead { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 13px; font-weight: 700; }
.rm-m__prhead span { padding: 1px 10px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; }
.rm-m--pr ul { display: grid; gap: 4px; margin-top: 10px; }
.rm-m--pr li { position: relative; padding-left: 22px; color: var(--text); font-size: 12px; }

.rm-m--pr li::before {
  content: "";
  position: absolute;
  top: 0.25em;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-8.5'/%3E%3C/svg%3E") center / 9px no-repeat;
}

/* 04 impact */
.rm-m--impact { padding: 10px 14px; border: 1px solid var(--line); background: #fff; }
.rm-m__ihead { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 11.5px; font-weight: 700; }
.rm-m__ihead span { padding: 1px 8px; border-radius: 5px; background: #f1f3fb; color: var(--muted); font-size: 10px; font-weight: 500; }
.rm-m__ibody { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.rm-m__ibody small { display: block; color: var(--muted); font-size: 10.5px; }
.rm-m__ibody b { display: block; color: var(--ink); font-family: "Inter", sans-serif; font-size: 26px; font-weight: 700; line-height: 1.2; }
.rm-m__bars { display: flex; align-items: flex-end; gap: 7px; height: 56px; }
.rm-m__bars i { display: block; width: 14px; border-radius: 2px 2px 0 0; background: linear-gradient(#5b8cff, #8fb0ff); }

/* ---------- band ---------- */
.rm-band {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  padding: 16px 26px;
  border-radius: 14px;
  background: linear-gradient(90deg, #26359e 0%, #2f47cf 50%, #3d5ce0 100%);
  color: #fff;
  box-shadow: 0 16px 40px rgba(40, 55, 190, 0.25);
}

.rm-band__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5d7bff, #3f5ee8);
  color: #fff;
}

.rm-band__icon svg { width: 26px; height: 26px; }

.rm-band__facts { display: flex; flex: 1; align-items: center; }
.rm-band__facts > div { padding: 0 28px; }
.rm-band__facts > div:first-child { padding-left: 0; }
.rm-band__facts > div + div { border-left: 1px solid rgba(255, 255, 255, 0.25); }
.rm-band__facts dt { color: rgba(255, 255, 255, 0.8); font-size: 13px; }
.rm-band__facts dd { margin-top: 2px; font-size: 17px; font-weight: 700; white-space: nowrap; }

.rm-band__btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 28px;
  border-radius: 10px;
  background: #fff;
  color: #2436a8;
  font-size: 14.5px;
  font-weight: 700;
  transition: transform 0.2s;
}

.rm-band__btn:hover { transform: translateY(-1px); }
.rm-band__btn svg { width: 18px; height: 18px; }
.rm-band__btn--ghost { border: 1px solid rgba(255, 255, 255, 0.75); background: transparent; color: #fff; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) and (min-width: 768px) {
  .rm { padding: 64px 28px 56px; }
  .rm-head { flex-direction: column; gap: 12px; }
  .rm-head__side { width: 100%; padding-top: 0; }
  .rm-days { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .rm-card:nth-child(3)::before { display: none; }
  .rm-band { flex-wrap: wrap; }
  .rm-band__facts { flex-basis: calc(100% - 80px); }
  .rm-band__btn { flex: 1; }
}

/* ---------- phone ---------- */
@media (max-width: 767px) {
  .rm { padding: 56px 16px 48px; }
  .rm-head { flex-direction: column; gap: 12px; }
  .rm-title { margin-top: 10px; font-size: clamp(22px, 6.3vw, 28px); line-height: 1.45; }
  .rm-head__side { width: 100%; padding-top: 0; }
  .rm-lead { font-size: 13px; line-height: 1.8; }
  .rm-lead br { display: none; }
  .rm-pill { margin-top: 14px; padding: 9px 18px; font-size: 13px; }

  .rm-tabs { margin-top: 22px; }
  .rm-tabs label { flex: 1; flex-wrap: wrap; justify-content: center; gap: 2px 6px; padding: 10px 6px; font-size: 16px; text-align: center; }
  .rm-tabs__note { flex-basis: 100%; margin: 4px 0 0; padding: 2px 6px; font-size: 10px; }

  .rm-days { grid-template-columns: 1fr; gap: 30px; margin-top: 18px; }
  .rm-card { padding: 20px 18px 16px; }

  .rm-card + .rm-card::before {
    top: -32px;
    left: 50%;
    width: 30px;
    height: 30px;
    background-size: 14px;
    transform: translate(-50%, 0) rotate(90deg);
  }

  .rm-card__day { font-size: 30px; }
  .rm-card__icon { width: 50px; height: 50px; }
  .rm-card__icon svg { width: 26px; height: 26px; }
  .rm-card__title { font-size: 18px; }
  .rm-card__body { min-height: 0; }
  .rm-card__body br { display: none; }

  .rm-band { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 18px; }
  .rm-band__icon { display: none; }
  .rm-band__facts { flex-direction: column; align-items: stretch; gap: 10px; }
  .rm-band__facts > div { padding: 0; }
  .rm-band__facts > div + div { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.25); border-left: 0; }
  .rm-band__facts dd { font-size: 15px; white-space: normal; }
  .rm-band__btn { height: 50px; }
}

/* ---------- desktop: fit one screen (~850px at 1280–1440 wide) ---------- */
@media (min-width: 1101px) {
  .rm { padding: 26px 32px 22px; }
  .rm-title { margin-top: 8px; font-size: clamp(28px, 2.5vw, 42px); line-height: 1.3; }
  .rm-head__side { padding-top: 26px; }
  .rm-lead { font-size: 13.5px; line-height: 1.85; }
  .rm-pill { margin-top: 12px; padding: 8px 22px; }

  .rm-tabs { margin-top: 16px; }
  .rm-tabs label { padding: 10px 24px; font-size: 18px; }
  .rm-days { margin-top: 16px; }
  .rm-card { padding: 16px 22px 14px; }
  .rm-card__day { font-size: 30px; }
  .rm-card__icon { width: 52px; height: 52px; }
  .rm-card__icon svg { width: 26px; height: 26px; }
  .rm-card__title { margin-top: 8px; }
  .rm-card__body { margin-top: 4px; font-size: 12.5px; line-height: 1.7; }
  .rm-card__checks { gap: 2px; margin-top: 10px; }
  .rm-card__checks li { font-size: 13px; }
  .rm-card__foot { margin-top: 10px; padding: 6px 12px; font-size: 12.5px; }

  .rm-m { height: 108px; margin-top: 10px; }
  .rm-m__code { padding: 4px 10px; font-size: 10px; line-height: 1.45; }
  .rm-m--pr ul { gap: 2px; margin-top: 8px; }
  .rm-m--pr li { font-size: 11.5px; line-height: 1.5; }

  .rm-band { margin-top: 16px; padding: 12px 24px; }
  .rm-band__icon { width: 48px; height: 48px; }
  .rm-band__btn { height: 46px; }
}

@media (min-width: 1101px) {
  .rm-m { height: 116px; }
}

@media (max-width: 1100px) {
  .rm-m { height: auto; min-height: 112px; padding-bottom: 10px; }
  .rm-m--editor { padding-bottom: 0; }
  .rm-m__input { height: auto; min-height: 70px; }
}

@media (max-width: 767px) {
  .rm-tabs__note { padding: 2px 4px; font-size: 9.5px; letter-spacing: -0.03em; white-space: nowrap; }
}
