/* Automation & code generation page: a compact, high-contrast model-to-build story. */
body.page-codegen .codegen-cycle-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(24px, 3vw, 38px) !important;
  border: 1px solid #244e65 !important;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 92% 0%, rgb(0 184 239 / 14%), transparent 34%),
    linear-gradient(128deg, #071724 0%, #0b2639 52%, #0a1d2d 100%) !important;
  box-shadow: 0 18px 46px rgb(5 23 36 / 12%);
}
body.page-codegen .codegen-cycle-section::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .2;
  background-image:
    linear-gradient(rgb(0 184 239 / 12%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(0 184 239 / 12%) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(110deg, transparent 3%, #000 48%, #000 100%);
}
body.page-codegen .codegen-cycle-section .sectionhead {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, .72fr);
  align-items: end;
  gap: clamp(22px, 4vw, 58px);
  margin: 0 0 22px !important;
}
body.page-codegen .codegen-cycle-section .sectionhead .mono {
  margin: 0 0 10px;
  color: #47c9f3 !important;
  font: 700 10px/1.3 "DM Mono", ui-monospace, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.page-codegen .codegen-cycle-section .sectionhead h2 {
  margin: 0 !important;
  color: #f1f7fa !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.045em;
}
body.page-codegen .codegen-cycle-section .sectionhead p {
  max-width: 560px;
  margin: 0 0 3px !important;
  color: #bdcdd7 !important;
  font-size: clamp(13px, 1.05vw, 15px) !important;
  line-height: 1.58 !important;
}
body.page-codegen .codegen-cycle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border: 0 !important;
}
body.page-codegen .codegen-cycle::before {
  position: absolute;
  z-index: 0;
  top: 27px;
  left: 6%;
  right: 6%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, #00b8ef 0%, #3c91bb 55%, #f2aa16 100%);
  opacity: .5;
}
body.page-codegen .codegen-cycle article,
body.page-codegen .codegen-cycle article:first-child {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0 !important;
  padding: 15px !important;
  border: 1px solid #28536b !important;
  border-radius: 13px;
  background: linear-gradient(155deg, #102e42 0%, #0b2132 100%) !important;
  box-shadow: inset 0 1px rgb(255 255 255 / 3%), 0 9px 22px rgb(2 13 21 / 15%);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.page-codegen .codegen-cycle article:hover {
  transform: translateY(-3px);
  border-color: #3a9fc4 !important;
  box-shadow: inset 0 1px rgb(255 255 255 / 4%), 0 14px 28px rgb(2 13 21 / 25%);
}
body.page-codegen .codegen-cycle-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 26px;
}
body.page-codegen .codegen-cycle-meta > b {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #1a819f;
  border-radius: 50%;
  background: #0d4056;
  color: #7fe1fb;
  font: 700 9px/1 "DM Mono", ui-monospace, monospace;
}
body.page-codegen .codegen-cycle-meta > span {
  color: #8caebe;
  font: 700 8px/1.3 "DM Mono", ui-monospace, monospace;
  letter-spacing: .12em;
}
body.page-codegen .codegen-step-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 82px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid #22485c;
  border-radius: 9px;
  background: linear-gradient(145deg, #071925 0%, #0a2030 100%);
}
body.page-codegen .codegen-visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgb(140 174 190 / 17%);
  color: #c5d9e2;
  font: 600 8px/1.2 "DM Mono", ui-monospace, monospace;
  white-space: nowrap;
}
body.page-codegen .codegen-visual-head small {
  color: #4dd4f4;
  font: inherit;
  font-size: 7px;
}
body.page-codegen .schema-map {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 7px;
}
body.page-codegen .schema-map i {
  padding: 5px 7px;
  border: 1px solid #2b657b;
  border-radius: 5px;
  background: #0e3244;
  color: #d8e9ef;
  font: normal 600 7px/1 "DM Mono", ui-monospace, monospace;
}
body.page-codegen .schema-map i:last-child { border-color: #167d9c; color: #58d4f5; }
body.page-codegen .schema-map span { height: 1px; background: #15a6cb; }
body.page-codegen .validation-lines,
body.page-codegen .diff-lines,
body.page-codegen .package-lines {
  display: grid;
  gap: 4px;
  color: #b5c9d3;
  font: 500 7px/1.25 "DM Mono", ui-monospace, monospace;
}
body.page-codegen .validation-lines span { display: flex; align-items: center; gap: 6px; }
body.page-codegen .validation-lines i {
  display: inline-grid;
  width: 11px;
  height: 11px;
  place-items: center;
  border-radius: 50%;
  background: #0b665f;
  color: #9df4db;
  font: normal 700 7px/1 Arial, sans-serif;
}
body.page-codegen .diff-lines i { overflow: hidden; color: #a9c0cb; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
body.page-codegen .diff-lines i:first-child,
body.page-codegen .diff-lines i:nth-child(2) { color: #67dfb7; }
body.page-codegen .package-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.page-codegen .package-lines span { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.page-codegen .package-lines i {
  display: grid;
  flex: 0 0 auto;
  width: 21px;
  height: 15px;
  place-items: center;
  border-radius: 3px;
  background: #123a50;
  color: #71d8f3;
  font: normal 700 6px/1 "DM Mono", ui-monospace, monospace;
}
body.page-codegen .codegen-cycle-copy h3 {
  margin: 0 0 6px !important;
  color: #eff7fa !important;
  font-size: clamp(14px, 1.1vw, 16px) !important;
  line-height: 1.25 !important;
  letter-spacing: -.02em;
}
body.page-codegen .codegen-cycle-copy p {
  margin: 0 !important;
  color: #b3c6d0 !important;
  font-size: clamp(11px, .9vw, 13px) !important;
  line-height: 1.5 !important;
}

body.page-codegen .codegen-related-section {
  padding-top: 20px !important;
  padding-bottom: clamp(28px, 3.5vw, 46px) !important;
}
body.page-codegen .codegen-related {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(22px, 4vw, 56px);
  padding: clamp(22px, 3.4vw, 38px) !important;
  overflow: hidden;
  border: 1px solid #b9d4e0 !important;
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 2% 100%, rgb(0 184 239 / 10%), transparent 38%),
    linear-gradient(118deg, #e5f0f5 0%, #f7fafc 54%, #e9f4f8 100%) !important;
  box-shadow: 0 14px 32px rgb(16 37 54 / 6%);
}
body.page-codegen .codegen-related > div:first-child { position: relative; z-index: 1; }
body.page-codegen .codegen-related > div:first-child .mono {
  color: #087fae !important;
  font: 700 9px/1.4 "DM Mono", ui-monospace, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.page-codegen .codegen-related h2 {
  max-width: 520px;
  margin: 9px 0 11px !important;
  color: #102536 !important;
  font-size: clamp(27px, 3vw, 38px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.045em;
}
body.page-codegen .codegen-related > div:first-child > p {
  max-width: 430px;
  margin: 0 !important;
  color: #526779 !important;
  font-size: clamp(13px, 1vw, 15px) !important;
  line-height: 1.55 !important;
}
body.page-codegen .codegen-related-links {
  display: grid;
  gap: 9px;
}
body.page-codegen .codegen-related-links > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 15px !important;
  border: 1px solid #d2e0e7 !important;
  border-left: 3px solid #079bc8 !important;
  border-radius: 9px !important;
  background: rgb(255 255 255 / 88%) !important;
  color: #102536 !important;
  box-shadow: 0 4px 12px rgb(16 37 54 / 4%);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.page-codegen .codegen-related-links > a:hover {
  transform: translateX(3px);
  border-color: #72bfd7 !important;
  box-shadow: 0 8px 18px rgb(16 37 54 / 9%);
}
body.page-codegen .codegen-related-links small {
  grid-column: 1 / -1;
  color: #087fae !important;
  font: 700 8px/1.35 "DM Mono", ui-monospace, monospace;
  letter-spacing: .09em;
}
body.page-codegen .codegen-related-links b {
  color: #142f41 !important;
  font-size: clamp(13px, 1vw, 15px) !important;
  line-height: 1.3 !important;
}
body.page-codegen .codegen-related-links span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #536b7c !important;
  font-size: clamp(10px, .8vw, 12px) !important;
  line-height: 1.35 !important;
  text-align: right;
}
body.page-codegen .codegen-related-links span i { color: #078fbe !important; font-style: normal; font-size: 15px; }

@media (max-width: 900px) {
  body.page-codegen .codegen-cycle-section .sectionhead { grid-template-columns: 1fr; gap: 10px; }
  body.page-codegen .codegen-cycle-section .sectionhead p { max-width: 700px; }
  body.page-codegen .codegen-cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-codegen .codegen-cycle::before { display: none; }
  body.page-codegen .codegen-related { grid-template-columns: 1fr; gap: 18px; }
  body.page-codegen .codegen-related > div:first-child > p { max-width: 700px; }
}
@media (max-width: 560px) {
  body.page-codegen .codegen-cycle-section { padding: 20px 15px !important; border-radius: 14px; }
  body.page-codegen .codegen-cycle-section .sectionhead { margin-bottom: 16px !important; }
  body.page-codegen .codegen-cycle-section .sectionhead h2 { font-size: 27px !important; }
  body.page-codegen .codegen-cycle { grid-template-columns: 1fr; gap: 9px; }
  body.page-codegen .codegen-cycle article,
  body.page-codegen .codegen-cycle article:first-child { gap: 9px; padding: 12px !important; }
  body.page-codegen .codegen-step-visual { min-height: 72px; }
  body.page-codegen .codegen-related { padding: 20px 15px !important; border-radius: 14px; }
  body.page-codegen .codegen-related h2 { font-size: 27px !important; }
  body.page-codegen .codegen-related-links > a { grid-template-columns: 1fr auto; padding: 11px 12px !important; }
  body.page-codegen .codegen-related-links span { grid-column: 1 / -1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  body.page-codegen .codegen-cycle article,
  body.page-codegen .codegen-related-links > a { transition: none; }
  body.page-codegen .codegen-cycle article:hover,
  body.page-codegen .codegen-related-links > a:hover { transform: none; }
}
/* Refined step layout: one clean desktop row, then a balanced two-by-two grid. */
body.page-codegen .codegen-cycle {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}
body.page-codegen .codegen-cycle::before { display: none; }
body.page-codegen .codegen-cycle article,
body.page-codegen .codegen-cycle article:first-child {
  display: grid;
  grid-template-rows: auto 64px 1fr;
  align-content: start;
  gap: 13px;
  min-height: 232px !important;
  padding: 16px !important;
  border-top: 2px solid #159fc7 !important;
  border-radius: 12px;
  background: linear-gradient(160deg, #102d40 0%, #0b2132 100%) !important;
}
body.page-codegen .codegen-cycle article:nth-child(3) { border-top-color: #27b9d8 !important; }
body.page-codegen .codegen-cycle article:nth-child(4) { border-top-color: #55a9d0 !important; }
body.page-codegen .codegen-cycle-meta { min-height: 28px; gap: 10px; }
body.page-codegen .codegen-cycle-meta > b { width: 28px; height: 28px; }
body.page-codegen .codegen-cycle-meta > span { font-size: 8px; }
body.page-codegen .codegen-step-visual {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 64px;
  height: 64px;
  padding: 8px 10px;
  border-color: #244b60;
  background: linear-gradient(110deg, rgb(5 23 35 / 78%), rgb(12 42 59 / 72%));
}
body.page-codegen .codegen-step-visual svg {
  display: block;
  flex: 0 0 54px;
  width: 54px;
  height: 42px;
  overflow: visible;
  fill: none;
  stroke: #49c8ed;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.page-codegen .codegen-step-visual svg rect { fill: rgb(17 65 85 / 52%); }
body.page-codegen .codegen-step-visual span {
  color: #c1d3dc;
  font: 600 9px/1.35 "DM Mono", ui-monospace, monospace;
  letter-spacing: .015em;
}
body.page-codegen .codegen-cycle-copy { align-self: start; }
body.page-codegen .codegen-cycle-copy h3 {
  margin: 0 0 7px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
}
body.page-codegen .codegen-cycle-copy p {
  font-size: 12px !important;
  line-height: 1.5 !important;
}
@media (max-width: 1080px) {
  body.page-codegen .codegen-cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-codegen .codegen-cycle article,
  body.page-codegen .codegen-cycle article:first-child { min-height: 216px !important; }
}
@media (max-width: 560px) {
  body.page-codegen .codegen-cycle { grid-template-columns: 1fr; }
  body.page-codegen .codegen-cycle article,
  body.page-codegen .codegen-cycle article:first-child {
    grid-template-rows: auto auto 1fr;
    min-height: 0 !important;
  }
  body.page-codegen .codegen-step-visual { min-height: 58px; height: 58px; }
  body.page-codegen .codegen-step-visual svg { flex-basis: 48px; width: 48px; height: 38px; }
}
