/* Four illustrated Codex steps. Copy stays in HTML; desktop demos use SVG and phone demos use HTML/CSS. */
.cx {
  --cx-ink: #111b4c;
  --cx-text: #505c7c;
  --cx-accent: #087dff;
  padding: 38px clamp(20px, 1.75vw, 36px);
  background: #fff;
  color: var(--cx-ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.5;
  text-align: left;
  scroll-margin-top: 76px;
}

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

:where(.cx) :is(h2, h3, p) { margin: 0; }
:where(.cx) a { text-decoration: none; }
:where(.cx) svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cx__inner { width: 92%; max-width: 1500px; margin: 0 auto; }

.cx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cx-head__text { min-width: 0; }
.cx-eyebrow {
  color: #6878b5;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.cx-title {
  margin-top: 14px;
  color: var(--cx-ink);
  font-size: clamp(36px, 3.1vw, 54px);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.035em;
}

.cx-title em { color: var(--cx-accent); font-style: normal; }
.cx-lead {
  margin-top: 18px;
  color: var(--cx-text);
  font-size: clamp(18px, 1.2vw, 21px);
  font-weight: 500;
  line-height: 1.75;
}
.cx-lead__mobile-break { display: none; }

.cx-head__art {
  display: flex;
  flex: 0 0 300px;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cx-head__art img {
  display: block;
  width: 156px;
  height: auto;
  filter: drop-shadow(0 12px 26px rgba(80, 76, 234, 0.16));
}

.cx-detailsLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  color: #4557d7;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.cx-detailsLink:hover { text-decoration: underline; text-underline-offset: 5px; }

.cx-steps { position: relative; margin-top: 36px; container-type: inline-size; }

.cx-steps__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  color: #087dff;
  stroke-width: 4.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.cx-steps__defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.cx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: clamp(16px, .92cqw, 19px) clamp(17px, 1.35cqw, 27px) clamp(34px, 2.45cqw, 49px);
  text-align: center;
}

.cx-card__heading {
  display: flex;
  align-items: flex-start;
  align-self: stretch;
  gap: clamp(5px, .4cqw, 8px);
  min-height: clamp(74px, 5.1cqw, 100px);
  text-align: left;
}

.cx-card__num {
  flex: 0 0 auto;
  color: #087dff;
  font-family: "Inter", Arial, sans-serif;
  font-size: clamp(50px, 4.2cqw, 80px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.045em;
}

.cx-card__title {
  min-width: 0;
  padding-top: .55cqw;
  color: var(--cx-ink);
  font-size: clamp(19px, 1.63cqw, 32px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.055em;
}

.cx-card__visual {
  display: block;
  flex: 0 0 auto;
  width: 90%;
  height: auto;
  margin-top: clamp(9px, .85cqw, 17px);
  overflow: visible;
}
.cx-mini { display: none; }

.cx-demo { font-family: "Noto Sans JP", system-ui, sans-serif; stroke: none; }
.cx-demo text { fill: #17234f; stroke: none; font-size: 14px; }
.cx-demo g.cx-demo__light text { fill: #fff; }
.cx-demo .cx-demo__small { font-size: 12px; }
.cx-demo .cx-demo__copy { font-size: 16px; }
.cx-demo .cx-demo__heading { font-size: 18px; }
.cx-demo .cx-demo__counter { font-size: 20px; }
.cx-demo .cx-demo__light { fill: #fff; }
.cx-demo .cx-demo__muted { fill: #7083ae; }
.cx-demo .cx-demo__blue { fill: #087dff; }
.cx-demo__spark { fill: none; stroke: #087dff; stroke-width: 2; stroke-linecap: round; }

.cx-card__body {
  max-width: 100%;
  margin: clamp(22px, 1.5cqw, 30px) auto 0;
  color: #607296;
  font-size: clamp(15px, 1.07cqw, 21px);
  font-weight: 400;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.cx-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 28px;
  padding: 22px 28px;
  border-radius: 20px;
  background: #f0f3ff;
}

.cx-band__message {
  color: var(--cx-ink);
  font-size: clamp(23px, 1.65vw, 29px);
  font-weight: 700;
  line-height: 1.5;
}

.cx-band__actions { display: flex; align-items: center; gap: 28px; }
.cx-band__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 60px;
  padding: 14px 28px;
  border-radius: 12px;
  background: #4858eb;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  transition: background 0.2s;
}

.cx-band__btn:hover { background: #3544d2; }
.cx-band__download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #4557d7;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.cx a:focus-visible { outline: 3px solid #5076ff; outline-offset: 5px; }

@media (max-width: 1279px) {
  .cx { padding: 42px 32px; }
  .cx-head { gap: 24px; }
  .cx-head__art { flex-basis: 250px; }
  .cx-head__art img { width: 140px; }
  .cx-detailsLink { font-size: 17px; }
  .cx-title { font-size: 38px; }
  .cx-steps { margin-top: 36px; }
  .cx-steps__frame { display: none; }
  .cx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .cx-card { border: 3px solid #087dff; border-radius: 12px; padding: 22px 24px 30px; }
  .cx-card__heading { min-height: 84px; }
  .cx-card__num { font-size: clamp(50px, 6.5vw, 68px); }
  .cx-card__title { padding-top: 7px; font-size: clamp(20px, 2.7vw, 27px); }
  .cx-card__visual { width: 88%; margin-top: 10px; }
  .cx-card__body { margin-top: 22px; font-size: clamp(16px, 2vw, 18px); }
  .cx-band { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px 28px; }
}

@media (max-width: 900px) {
  .cx-head { display: block; }
  .cx-head__art { align-items: flex-start; margin-top: 10px; }
  .cx-head__art img { display: none; }
  .cx-detailsLink { font-size: 18px; }
}

@media (max-width: 767px) {
  .cx { padding: 36px 20px; }
  .cx__inner { width: 100%; }
  .cx-eyebrow { font-size: 16px; }
  .cx-title { margin-top: 12px; font-size: clamp(29px, 7.4vw, 38px); line-height: 1.4; }
  .cx-lead { margin-top: 16px; font-size: 17px; line-height: 1.8; }
  .cx-detailsLink { font-size: 16px; }
  .cx-steps { margin-top: 28px; }
  .cx-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cx-card { padding: 16px 16px 20px; }
  .cx-card__heading { min-height: 68px; }
  .cx-card__num { font-size: clamp(48px, 12vw, 60px); }
  .cx-card__title { padding-top: 5px; font-size: clamp(18px, 5.25vw, 24px); }
  .cx-card__visual { width: min(88%, 360px); margin-top: 6px; }
  .cx-card__body { margin-top: 12px; font-size: 16px; }
  .cx-band { gap: 18px; margin-top: 20px; padding: 20px; border-radius: 18px; }
  .cx-band__message { font-size: 23px; }
  .cx-band__actions { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
  .cx-band__btn { min-height: 56px; padding: 14px 12px; font-size: 17px; gap: 10px; }
  .cx-band__download { justify-content: center; font-size: 17px; }
}

@media (max-width: 767px) {
  .cx-head { position: relative; }
  .cx-eyebrow { padding-right: 80px; }
  .cx-title { margin-top: 8px; font-size: clamp(22px, 6.2vw, 27px); line-height: 1.32; }
  .cx-lead { margin-top: 9px; font-size: 15px; line-height: 1.55; }
  .cx-lead__mobile-break { display: initial; }
  .cx-head__art { display: block; margin-top: 7px; }
  .cx-head__art img { position: absolute; top: -8px; right: 0; display: block; width: clamp(54px, 15vw, 66px); }
  .cx-head__art::before {
    position: absolute;
    top: -9px;
    right: -6px;
    width: 24px;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22' fill='none' stroke='%23087dff' stroke-linecap='round' stroke-width='1.8'%3E%3Cpath d='M5 1 3 7M13 3l-1 6M20 9l-5 3'/%3E%3C/svg%3E") center / contain no-repeat;
    content: "";
    pointer-events: none;
  }
  .cx-detailsLink { justify-content: flex-start; min-height: 44px; gap: 8px; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
  .cx-steps { margin-top: 13px; }
  .cx-grid { gap: 0; }
  .cx-card {
    display: grid;
    grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
    align-items: center;
    gap: 6px 15px;
    padding: 11px 3px 15px;
    border: 0;
    border-top: 1px solid #dce6f6;
    border-radius: 0;
    text-align: left;
  }
  .cx-card__heading { grid-column: 1 / -1; align-items: center; gap: 11px; min-height: 0; }
  .cx-card__num { font-size: 43px; line-height: 1; }
  .cx-card__title { padding: 0; font-size: clamp(17px, 4.6vw, 20px); line-height: 1.32; }
  .cx-card__visual { display: none; }
  .cx-card__body { grid-column: 2; margin: 0; color: #607296; font-size: clamp(12px, 3.5vw, 15px); line-height: 1.65; overflow-wrap: normal; }
  .cx-card__body br { display: none; }
  .cx-mini { display: block; grid-column: 1; width: 100%; max-width: 260px; aspect-ratio: 1.88; overflow: hidden; border: 1px solid #c9dbf9; border-radius: 7px; background: #fff; box-shadow: 0 5px 12px rgba(42,83,154,.08); color: #14234c; font-size: 10px; line-height: 1.25; }
  .cx-mini__chrome { position: relative; display: flex; align-items: center; justify-content: center; height: 17%; border-bottom: 1px solid #dce9ff; background: #f4f8ff; color: #7082aa; font-size: 9px; }
  .cx-mini__chrome--dark { border: 0; background: #152757; color: #fff; }
  .cx-mini__dots { position: absolute; left: 7px; display: flex; gap: 3px; }
  .cx-mini__dots i { width: 4px; height: 4px; border-radius: 50%; background: #79adff; }
  .cx-mini__prompt { display: flex; align-items: center; justify-content: space-between; height: 27%; margin: 4% 4% 0; padding: 0 6%; border-radius: 5px; background: #1d315d; color: #fff; font-size: clamp(9px, 2.7vw, 12px); font-weight: 700; }
  .cx-mini__prompt span { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #087dff; }
  .cx-mini__flow { display: grid; grid-template-columns: 32% 12% 56%; align-items: center; height: 50%; padding: 3% 5%; }
  .cx-mini__files { display: flex; align-items: center; }
  .cx-mini__files i { display: grid; place-items: center; flex: none; width: 22px; height: 27px; margin-right: -10px; border: 1px solid #77aaff; background: #f3f8ff; color: #087dff; font-size: 10px; font-style: normal; font-weight: 800; }
  .cx-mini__files i:nth-child(2) { transform: translateY(5px); }
  .cx-mini__files i:nth-child(3) { transform: translateY(10px); }
  .cx-mini__flow-arrow { color: #087dff; font-size: 19px; text-align: center; }
  .cx-mini__report { display: grid; align-content: center; gap: 4px; height: 86%; padding: 5px 7px; border: 1px solid #d4e3fb; border-radius: 5px; background: #fff; }
  .cx-mini__report strong { margin: -5px -7px 1px; padding: 3px 7px; background: #edf4ff; font-size: 9px; }
  .cx-mini__report i { width: 84%; height: 4px; border-radius: 4px; background: linear-gradient(90deg,#cddaf0 56%,transparent 56% 68%,#398dff 68%); }
  .cx-mini__report i:nth-child(3) { width: 70%; }
  .cx-mini__report i:nth-child(4) { width: 94%; }
  .cx-mini__app-layout, .cx-mini__test-layout { display: grid; grid-template-columns: 43% 1fr; gap: 5%; height: 83%; padding: 6%; }
  .cx-mini__code { display: grid; align-content: center; gap: 5px; padding: 10px 7px; border-radius: 5px; background: #1d315d; }
  .cx-mini__code i { width: 75%; height: 3px; border-radius: 3px; background: linear-gradient(90deg,#68a7ff 30%,#a8bfe7 30%); }
  .cx-mini__code i:nth-child(even) { width: 92%; }
  .cx-mini__code i:nth-child(3) { width: 54%; }
  .cx-mini__app-screen { overflow: hidden; border: 1px solid #cbdcf7; border-radius: 5px; }
  .cx-mini__app-screen strong { display: block; padding: 6px; background: #087dff; color: #fff; font-size: 10px; }
  .cx-mini__app-screen p { display: flex; align-items: center; justify-content: space-between; padding: 5px 4px; border-top: 1px solid #e3ebf8; color: #566581; font-size: 8px; white-space: nowrap; }
  .cx-mini__app-screen p span { border-radius: 9px; padding: 2px 3px; background: #eaf3ff; color: #2378e5; }
  .cx-mini--test .cx-mini__test-layout { height: 69%; padding-bottom: 2%; }
  .cx-mini__test-layout ul { display: grid; align-content: center; gap: 5px; margin: 0; padding: 0; list-style: none; }
  .cx-mini__test-layout li { display: flex; align-items: center; gap: 5px; color: #172551; font-size: 9px; font-weight: 700; white-space: nowrap; }
  .cx-mini__test-layout li::before { display: grid; place-items: center; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #087dff; color: #fff; content: "✓"; font-size: 9px; }
  .cx-mini__progress { display: flex; align-items: center; gap: 7px; height: 14%; padding: 0 7%; color: #087dff; }
  .cx-mini__progress span { flex: 1; height: 7px; border-radius: 7px; background: #087dff; }
  .cx-mini__progress strong { font-size: 11px; white-space: nowrap; }
  .cx-mini__diff { display: grid; gap: 4px; padding: 4% 5%; }
  .cx-mini__diff p { display: flex; align-items: center; gap: 5px; min-height: 18px; padding: 2px 5px; border: 1px solid #d9e7fa; border-radius: 4px; color: #7082aa; font-size: 9px; }
  .cx-mini__diff p:nth-child(2) { background: #edf5ff; color: #087dff; }
  .cx-mini__diff p b { flex: none; }
  .cx-mini__diff p span { overflow: hidden; color: #9bb6df; white-space: nowrap; }
  .cx-mini__diff p:nth-child(2) span { color: #67a8ff; }
  .cx-mini__diff > div { padding: 4px 6px; border-radius: 4px; background: #edf4ff; color: #315387; font-size: 9px; font-weight: 700; }
  .cx-band { align-items: center; gap: 6px; margin-top: 12px; padding: 13px 12px 10px; border-radius: 15px; text-align: center; }
  .cx-band__message { font-size: clamp(18px, 4.7vw, 21px); line-height: 1.4; }
  .cx-band__actions { gap: 2px; }
  .cx-band__btn { position: relative; width: 100%; min-height: 48px; padding: 8px 30px; border-radius: 8px; background: linear-gradient(100deg,#4758ed,#405af4); font-size: 15px; }
  .cx-band__btn span { position: absolute; right: 12px; }
  .cx-band__download { min-height: 28px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
}

@media (max-width: 359px) {
  .cx-head__art img { top: -24px; }
  .cx-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 6px 9px; }
  .cx-card__heading { grid-column: 1 / -1; }
  .cx-mini { grid-column: 1; max-width: none; }
  .cx-mini--review { aspect-ratio: 1.65; }
  .cx-card__body { grid-column: 2; font-size: 12.5px; line-height: 1.55; }
}

@media (prefers-reduced-motion: no-preference) {
  .cx-grid.is-motion-ready .cx-card {
    transition: opacity 0.65s ease var(--step-delay, 0ms), transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) var(--step-delay, 0ms);
  }
  .cx-grid.is-motion-ready .cx-card:not(.is-visible) { opacity: 0; transform: translateY(24px); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cx-card:hover .cx-card__visual { transform: translateY(-4px); }
  .cx-card__visual { transition: transform .25s ease; }
}

@media (prefers-reduced-motion: reduce) {
  .cx a, .cx-card, .cx-card * { animation: none !important; transition: none !important; }
}

@media (max-width: 767px) {
  .cx-grid.is-motion-ready .cx-card:not(.is-visible) {
    opacity: 1;
    transform: none;
  }
}
