/* The top-page flow: four operations, one shared infrastructure. */
.rgi-interactive { padding: 112px 0 88px; background: #f7f9fb; }
.rgi-interactive .rgi-head { max-width: none; display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: end; }
.rgi-interactive .rgi-ttl { font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -.035em; }
.rgi-interactive .rgi-lead { max-width: 450px; margin: 0 0 4px; font-size: 15px; color: #536472; }
.rgi-interactive .rgi-lead strong { color: #102a43; font-weight: 700; }
.rgi-system { margin-top: 44px; padding: 24px 32px 0; background: #fff; border: 1px solid #dfe8ec; border-radius: 28px; box-shadow: 0 20px 70px #102a4306; }
.rgi-system-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 24px; }
.rgi-system-top > p { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: .025em; }
.rgi-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #087f8c; box-shadow: 0 0 0 4px #087f8c0c; flex: none; }
.rgi-motion-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e4ebee; border-radius: 20px; background: #fff; font: inherit; color: #536472; font-size: 13px; cursor: pointer; white-space: nowrap; }
.rgi-motion-toggle[hidden] { display: none; }
.rgi-motion-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.rgi-motion-toggle:hover { border-color: #087f8c; color: #087f8c; }
.rgi-system-grid { display: grid; grid-template-columns: minmax(130px,.85fr) minmax(0,2.8fr) minmax(130px,.85fr); gap: 32px; align-items: center; }
.rgi-lane-label { color: #102a43; font-size: 16px; font-weight: 800; line-height: 1.7; }
.rgi-lane-label > span { display: block; font-family: var(--f-en); font-size: 11px; font-weight: 600; color: #087f8c; letter-spacing: .16em; margin-bottom: 4px; }
.rgi-source, .rgi-result { position: relative; }
.rgi-rule-sheet { position: relative; margin: 24px 12px 22px 0; padding: 18px 17px 24px; width: min(100%,150px); background: linear-gradient(145deg,#fff,#f2f6f8); border: 1px solid #dfe7ec; border-radius: 5px 16px 5px 5px; box-shadow: 6px 6px 0 #f0f5f7; transform: rotate(-4deg); }
.rgi-rule-sheet > svg { width: 31px; height: 31px; fill: none; stroke: #087f8c; stroke-width: 1.5; stroke-linejoin: round; }
.rgi-rule-sheet > span { display: block; font-family: var(--f-en); color: #536472; font-size: 11px; font-weight: 700; letter-spacing: .03em; margin: 13px 0 15px; }
.rgi-rule-sheet > i { display: block; height: 3px; background: #dbe5eb; margin-top: 7px; border-radius: 4px; }
.rgi-rule-sheet > i:last-of-type { width: 67%; }
.rgi-sheet-seal { position: absolute; bottom: -10px; right: -9px; width: 30px; height: 30px; background: #fff; border: 1px solid #bddcde; border-radius: 50%; display: grid; place-items: center; }
.rgi-sheet-seal svg { width: 20px; fill: none; stroke: #087f8c; stroke-width: 1.5; }
.rgi-source-tags { display: grid; gap: 10px; font-size: 14px; line-height: 1.6; color: #536472; }
.rgi-source-tags li { display: flex; align-items: center; gap: 7px; }
.rgi-source-tags li::before { content: ''; width: 3px; height: 3px; background: #087f8c; border-radius: 50%; flex: none; }
.rgi-transfer { position: absolute; top: 45%; width: 32px; height: 24px; right: -32px; color: #087f8c; overflow: hidden; }
.rgi-result > .rgi-transfer { right: auto; left: -32px; }
.rgi-transfer svg { position: absolute; top: 0; width: 24px; height: 24px; fill: none; stroke: #b7d5d9; stroke-width: 1.2; }
.rgi-transfer > span { position: absolute; top: 11px; left: 0; width: 8px; height: 2px; background: #21b6c7; border-radius: 2px; animation: rgiPacket 2.2s ease-in-out infinite; animation-play-state: paused; }
.rgi-engine { position: relative; isolation: isolate; padding: 28px 24px 22px; border-radius: 20px; overflow: hidden; color: #fff; background: linear-gradient(125deg,#102a43,#123f51); box-shadow: 0 15px 35px #102a4315; }
.rgi-engine-grid { position: absolute; inset: 0; z-index: -1; opacity: .3; background-image: linear-gradient(#72c5cd15 1px,transparent 1px),linear-gradient(90deg,#72c5cd15 1px,transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(140deg,transparent 5%,#000 100%); }
.rgi-engine::after { content: ''; position: absolute; right: -30px; top: -70px; width: 180px; height: 180px; border: 1px solid #21b6c724; border-radius: 50%; z-index: -1; box-shadow: 0 0 0 24px #21b6c70a,0 0 0 48px #21b6c706; }
.rgi-engine-brand { display: flex; align-items: center; gap: 13px; }
.rgi-engine-logo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 7px; border-radius: 12px; background: #f7f9fb; }
.rgi-engine-logo img { width: 100%; height: auto; }
.rgi-engine-brand p { font-family: var(--f-en); font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #9eced4; }
.rgi-engine-brand h3 { margin-top: 5px; font-size: clamp(20px,1.7vw,25px); font-weight: 700; letter-spacing: -.02em; color: #fff; }
.rgi-engine-orbit { display: flex; gap: 4px; margin-left: auto; align-self: start; padding-top: 4px; }
.rgi-engine-orbit i { width: 4px; height: 4px; border-radius: 50%; background: #21b6c7; animation: rgiSignal 3.6s ease-in-out infinite; animation-play-state: paused; }
.rgi-engine-orbit i:nth-child(2) { animation-delay: .3s; }
.rgi-engine-orbit i:nth-child(3) { animation-delay: .6s; }
.rgi-engine-intro { margin-top: 17px; color: #bcd1dc; font-size: 15px; line-height: 1.8; }
.rgi-stages { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 23px; }
.rgi-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 153px; padding: 12px 6px 14px; border: 1px solid #aacfd42b; border-radius: 10px; color: #b8cdd6; background: #ffffff05; cursor: pointer; font: inherit; transition: color .25s, background-color .25s, border-color .25s, transform .25s; }
.rgi-stage + .rgi-stage::before { content: '›'; position: absolute; left: -8px; top: 51px; color: #67cbd3; font-size: 14px; width: 8px; text-align: center; }
.rgi-stage.is-current { border-color: #66d4d8; background: #087f8c; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 18px #00000014; }
.rgi-stage:hover { border-color: #66d4d8; color: #fff; }
.rgi-step-no { align-self: start; font-family: var(--f-en); font-size: 12px; letter-spacing: .08em; color: #99bdc9; }
.rgi-stage.is-current .rgi-step-no { color: #c2f3f5; }
.rgi-stage > svg { width: 33px; height: 33px; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.rgi-stage strong { font-size: 20px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.rgi-step-en { font-family: var(--f-en); font-size: 11px; letter-spacing: .08em; opacity: .7; }
.rgi-stage::after { content: ''; position: absolute; height: 2px; bottom: 0; left: 10px; right: 10px; background: #88edf0; border-radius: 4px; transform: scaleX(0); transform-origin: left; }
.rgi-enhanced .rgi-stage.is-current::after { animation: rgiProgress 5s linear both; animation-play-state: paused; }
.rgi-step-detail { display: flex; gap: 15px; align-items: start; padding: 23px 0 22px; min-height: 108px; }
.rgi-detail-number { flex: none; padding-top: 5px; font-family: var(--f-en); font-size: 12px; letter-spacing: .04em; color: #75d4db; }
.rgi-step-detail h4 { color: #fff; font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.65; }
.rgi-step-detail p { margin-top: 6px; color: #bdd0d8; font-size: 15px; line-height: 1.8; }
.rgi-engine-products { display: flex; gap: 20px; border-top: 1px solid #b0d0d323; padding-top: 16px; }
.rgi-engine-products > span { font-family: var(--f-en); font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.rgi-engine-products small { display: block; font-family: var(--f-jp); font-weight: 500; font-size: 12px; color: #a2bdca; line-height: 1.7; margin-top: 4px; letter-spacing: 0; }
.rgi-evidence { position: relative; width: min(100%,157px); margin: 24px 0 23px; padding-right: 6px; }
.rgi-evidence-back { position: absolute; inset: 1px -2px 0 8px; transform: rotate(5deg); border: 1px solid #dbe8eb; background: #f0f6f7; border-radius: 7px; }
.rgi-evidence-front { position: relative; background: #fff; border: 1px solid #d9e6e9; padding: 15px 13px 12px; border-radius: 7px; box-shadow: 0 6px 15px #102a4305; }
.rgi-evidence-front > span { font-family: var(--f-en); letter-spacing: .12em; color: #536472; font-size: 11px; font-weight: 700; }
.rgi-evidence-front > svg { display: block; width: 27px; height: 27px; margin: 15px 0; fill: none; stroke: #087f8c; stroke-width: 1.3; stroke-linejoin: round; }
.rgi-evidence-front > div { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.5; margin-top: 8px; }
.rgi-evidence-front b { font-weight: 500; }
.rgi-evidence-front i { position: relative; flex: none; width: 11px; height: 11px; border-radius: 50%; background: #edf7f7; }
.rgi-evidence-front i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 5px; height: 3px; border-left: 1px solid #087f8c; border-bottom: 1px solid #087f8c; transform: rotate(-45deg); }
.rgi-evidence-front > p { font-size: 12px; color: #087f8c; border-top: 1px solid #e5eeee; margin-top: 14px; padding-top: 8px; }
.rgi-result-message { font-size: 15px; line-height: 1.9; color: #536472; }
.rgi-result-message strong { font-size: 17px; color: #102a43; font-weight: 800; }
.rgi-system-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid #e7eef0; margin-top: 28px; padding: 20px 0; }
.rgi-system-bottom > p { display: flex; gap: 8px; align-items: center; color: #536472; font-size: 14px; line-height: 1.8; }
.rgi-system-bottom > p svg { width: 18px; height: 18px; fill: none; stroke: #087f8c; stroke-width: 1.2; flex: none; }
.rgi-system-bottom > a { font-size: 14px; font-weight: 700; color: #087f8c; white-space: nowrap; text-underline-offset: 4px; }
.rgi-system-bottom > a:hover { text-decoration: underline; }
.rgi-system-bottom > a span { margin-left: 6px; font-size: 15px; }
.rgi-standards { margin-top: 18px; color: #536472; font-size: 14px; }
.rgi-standards summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; list-style: none; }
.rgi-standards summary::-webkit-details-marker { display: none; }
.rgi-standards summary > span { font-size: 17px; color: #087f8c; transition: transform .2s; }
.rgi-standards[open] summary > span { transform: rotate(45deg); }
.rgi-standards ul { display: flex; gap: 8px 24px; flex-wrap: wrap; padding: 12px 2px 8px; border-top: 1px solid #e1e9ed; line-height: 1.9; }
.rgi-system :is(button,a):focus-visible, .rgi-standards summary:focus-visible { outline: 2px solid #21b6c7; outline-offset: 4px; }
.rgi-system.is-playing .rgi-transfer > span, .rgi-system.is-playing .rgi-engine-orbit i, .rgi-system.is-playing .rgi-stage.is-current::after { animation-play-state: running; }
@keyframes rgiPacket { 0% { transform: translateX(-9px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(25px); opacity: 0; } }
@keyframes rgiSignal { 0%,100% { opacity: .4; transform: scale(.8); } 35% { opacity: 1; transform: scale(1.25); } }
@keyframes rgiProgress { to { transform: scaleX(1); } }
@media (max-width: 1100px) {
  .rgi-system { padding-inline: 24px; }
  .rgi-system-grid { grid-template-columns: minmax(112px,.8fr) minmax(0,2.8fr) minmax(112px,.8fr); gap: 24px; }
  .rgi-transfer { right: -24px; width: 24px; }
  .rgi-result > .rgi-transfer { left: -24px; }
  .rgi-engine { padding: 23px 18px 19px; }
  .rgi-stage strong { font-size: 17px; }
  .rgi-engine-products { gap: 12px; }
}
@media (max-width: 900px) {
  .rgi-interactive { padding: 80px 0 60px; }
  .rgi-interactive .rgi-head { grid-template-columns: 1fr; gap: 20px; }
  .rgi-interactive .rgi-lead { max-width: 620px; font-size: 14px; }
  .rgi-system-grid { grid-template-columns: 1fr; gap: 24px; }
  .rgi-source { display: flex; align-items: center; gap: 26px; padding: 0 4px; }
  .rgi-rule-sheet { display: none; }
  .rgi-source-tags { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1; }
  .rgi-source > .rgi-transfer { top: auto; bottom: -24px; right: calc(50% - 12px); transform: rotate(90deg); }
  .rgi-result { display: flex; align-items: center; gap: 24px; padding: 4px; }
  .rgi-result > .rgi-transfer { top: -24px; left: calc(50% - 12px); transform: rotate(90deg); }
  .rgi-result .rgi-lane-label { flex: 1; }
  .rgi-evidence { display: none; }
  .rgi-result-message { text-align: right; }
  .rgi-engine { padding: 28px; }
  .rgi-engine-brand h3 { font-size: 22px; }
  .rgi-stage strong { font-size: 17px; }
  .rgi-step-detail { min-height: 104px; }
  .rgi-engine-products small { font-size: 12px; }
  .rgi-system-bottom { flex-wrap: wrap; gap: 10px; margin-top: 22px; }
}
@media (max-width: 480px) {
  .rgi-interactive { padding-top: 64px; }
  .rgi-interactive .rgi-ttl { font-size: clamp(25px,6.3vw,30px); line-height: 1.5; }
  .rgi-system { padding: 19px 14px 0; border-radius: 20px; margin-top: 30px; }
  .rgi-system-top { align-items: start; padding-bottom: 23px; gap: 8px; }
  .rgi-system-top > p { font-size: 14px; gap: 7px; line-height: 1.7; }
  .rgi-status-dot { width: 5px; height: 5px; }
  .rgi-motion-toggle { padding: 6px 8px; font-size: 11px; }
  .rgi-motion-toggle svg { width: 10px; height: 10px; }
  .rgi-source { gap: 15px; align-items: start; }
  .rgi-lane-label { font-size: 14px; }
  .rgi-source-tags { display: grid; gap: 5px; font-size: 13px; }
  .rgi-engine { padding: 20px 13px 18px; border-radius: 15px; }
  .rgi-engine-logo { width: 38px; height: 38px; border-radius: 9px; }
  .rgi-engine-brand { gap: 9px; }
  .rgi-engine-brand p { font-size: 10px; }
  .rgi-engine-brand h3 { font-size: 18px; }
  .rgi-engine-orbit { gap: 3px; }
  .rgi-engine-orbit i { width: 3px; height: 3px; }
  .rgi-engine-intro { font-size: 14px; margin-top: 13px; }
  .rgi-stages { gap: 6px; margin-top: 20px; }
  .rgi-stage { min-height: 124px; padding: 9px 3px 11px; gap: 7px; border-radius: 8px; }
  .rgi-stage + .rgi-stage::before { left: -6px; width: 6px; top: 44px; font-size: 11px; }
  .rgi-stage > svg { width: 25px; height: 25px; }
  .rgi-stage strong { font-size: clamp(12px,3.65vw,15px); }
  .rgi-step-no { font-size: 10px; padding-left: 4px; }
  .rgi-step-en { font-size: 8px; }
  .rgi-step-detail { padding: 20px 0; gap: 10px; min-height: 114px; }
  .rgi-detail-number { font-size: 10px; padding-top: 4px; }
  .rgi-step-detail h4 { font-size: 18px; }
  .rgi-step-detail p { font-size: 14px; }
  .rgi-engine-products { flex-direction: column; gap: 12px; }
  .rgi-engine-products > span { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 7px; font-size: 14px; }
  .rgi-engine-products small { font-size: 12px; margin-top: 0; }
  .rgi-result { gap: 12px; }
  .rgi-result-message { font-size: 13px; }
  .rgi-result-message strong { font-size: 14px; }
  .rgi-system-bottom > p { font-size: 13px; align-items: start; }
  .rgi-system-bottom > a { font-size: 14px; }
  .rgi-standards { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .rgi-system *, .rgi-system *::before, .rgi-system *::after { animation: none !important; transition: none !important; }
  .rgi-transfer > span { display: none; }
  .rgi-stage.is-current { transform: none; }
}
/* Give each operation enough room to read on a phone. */
@media (max-width: 480px) {
  .rgi-stages { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .rgi-stage { min-height: 132px; padding: 11px 8px 13px; }
  .rgi-stage strong { font-size: 17px; }
  .rgi-step-en { font-size: 10px; }
  .rgi-stage + .rgi-stage::before { display: none; }
  .rgi-step-detail { flex-direction: column; gap: 6px; min-height: 149px; }
  .rgi-source { flex-wrap: wrap; gap: 12px; }
  .rgi-source-tags { grid-template-columns: 1fr; flex: auto; }
  .rgi-engine-products > span { flex-direction: column; }
  .rgi-system-top { flex-wrap: wrap; }
}
/* Reserve the longest explanation so automatic changes do not move the page. */
.rgi-step-detail { min-height: 150px; }
@media (max-width: 480px) { .rgi-step-detail { min-height: 220px; } }

/* Explain the actual work before asking visitors to follow the animation. */
.rgi-interactive .rgi-lead { font-size: 17px; line-height: 1.9; max-width: 480px; }
.rgi-engine-brand p { letter-spacing: .02em; font-family: var(--f-jp); font-size: 13px; }
.rgi-engine-brand h3 { font-size: clamp(20px,1.65vw,25px); line-height: 1.5; }
.rgi-engine-intro { font-size: 16px; line-height: 1.8; }
.rgi-stage { min-height: 216px; padding: 14px 10px 16px; gap: 8px; }
.rgi-stage strong { font-size: 18px; line-height: 1.45; white-space: normal; }
.rgi-stage-desc { font-size: 14px; line-height: 1.65; color: #c2d6df; }
.rgi-stage.is-current .rgi-stage-desc { color: #f3fcfc; }
.rgi-step-detail { min-height: 140px; margin-top: 18px; padding: 18px 16px; border-radius: 12px; background: #ffffff06; }
.rgi-detail-number { font-family: var(--f-jp); font-size: 13px; padding-top: 4px; }
.rgi-step-detail h4 { font-size: 19px; line-height: 1.6; }
.rgi-step-detail p { font-size: 16px; line-height: 1.8; }
.rgi-engine-products { margin-top: 18px; }
.rgi-system-bottom > p { font-size: 15px; }
@media (max-width: 1100px) and (min-width: 901px) {
  .rgi-system-grid { grid-template-columns: minmax(100px,.7fr) minmax(0,3fr) minmax(100px,.7fr); gap: 20px; }
  .rgi-stages { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .rgi-stage { min-height: 192px; }
  .rgi-stage + .rgi-stage::before { display: none; }
}
@media (max-width: 900px) {
  .rgi-interactive .rgi-lead { font-size: 16px; }
  .rgi-engine-brand h3 { font-size: 21px; }
}
@media (max-width: 600px) {
  .rgi-stages { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .rgi-stage { min-height: 208px; padding: 12px 8px; }
  .rgi-stage strong { font-size: 16px; }
  .rgi-stage-desc { font-size: 13px; }
  .rgi-stage + .rgi-stage::before { display: none; }
  .rgi-step-detail { flex-direction: column; min-height: 190px; gap: 6px; padding: 16px 14px; }
  .rgi-step-detail h4 { font-size: 18px; }
  .rgi-step-detail p { font-size: 15px; }
  .rgi-engine-brand h3 { font-size: 19px; }
  .rgi-engine-intro { font-size: 15px; }
  .rgi-system-bottom > p { font-size: 14px; }
}
@media (max-width: 359px) {
  .rgi-engine-brand { flex-direction: column; align-items: flex-start; }
  .rgi-stages { grid-template-columns: 1fr; }
  .rgi-stage { display: grid; grid-template-columns: 28px 1fr; min-height: 132px; text-align: left; column-gap: 12px; }
  .rgi-step-no { grid-column: 1 / -1; }
  .rgi-stage > svg { grid-column: 1; grid-row: 2; }
  .rgi-stage strong { grid-column: 2; grid-row: 2; font-size: 16px; }
  .rgi-stage-desc { grid-column: 2; grid-row: 3; }
  .rgi-step-detail { min-height: 216px; }
}
