.migration-page {
  --cm5: #f1a2b5;
  --cm5-soft: rgb(241 162 181 / 9%);
  --wire: #7dd3fc;
  --wire-soft: rgb(125 211 252 / 9%);
  --cm6: #4ade80;
  --cm6-soft: rgb(74 222 128 / 8%);
  --ledger-line: rgb(100 116 139 / 54%);
  background:
    radial-gradient(circle at 84% 4%, rgb(74 222 128 / 7%), transparent 28rem),
    radial-gradient(circle at 14% 9%, rgb(241 162 181 / 7%), transparent 24rem),
    var(--page);
}

.migration-page :not(pre) > code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.migration-page .site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px);
}

.migration-page .site-header .nav-source {
  margin-left: 4px;
  border: 1px solid rgb(125 211 252 / 38%);
  color: var(--wire);
}

.migration-page .site-header .nav-source:hover {
  border-color: var(--wire);
  background: var(--wire-soft);
  color: #e0f2fe;
}

.migration-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  min-height: 680px;
  align-items: center;
  padding-block: 94px;
  gap: 72px;
}

.migration-hero-copy {
  max-width: 680px;
}

.migration-hero h1 {
  max-width: 760px;
  margin-bottom: 26px;
  font-size: clamp(52px, 6.7vw, 88px);
}

.migration-hero .hero-summary {
  max-width: 660px;
  margin-bottom: 28px;
}

.migration-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.audience-note {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.audience-note a {
  color: var(--wire);
  text-underline-offset: 3px;
}

.audience-note code {
  white-space: normal;
}

.migration-ledger {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ledger-heading {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ledger-heading span:last-child {
  color: var(--wire);
}

.ledger-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.82fr) minmax(0, 1fr);
  min-height: 310px;
  align-items: stretch;
  padding: 24px;
  background:
    linear-gradient(var(--ledger-line) 1px, transparent 1px) 0 50% / 100% 1px no-repeat,
    linear-gradient(135deg, rgb(255 255 255 / 2%), transparent 50%),
    var(--page-raised);
  gap: 14px;
}

.ledger-node,
.ledger-wire {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.ledger-node {
  margin-block: 38px;
  padding: 24px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: rgb(15 23 42 / 96%);
}

.ledger-node::after {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-top: 1px solid currentcolor;
  border-right: 1px solid currentcolor;
  content: "";
}

.ledger-cm5 {
  border-color: rgb(241 162 181 / 34%);
  color: var(--cm5);
  box-shadow: inset 0 3px 0 var(--cm5);
}

.ledger-cm5::after {
  right: -27px;
  transform: rotate(45deg);
}

.ledger-cm6 {
  border-color: rgb(74 222 128 / 34%);
  color: var(--cm6);
  box-shadow: inset 0 3px 0 var(--cm6);
}

.ledger-cm6::after {
  left: -27px;
  transform: rotate(225deg);
}

.ledger-tag {
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ledger-node strong {
  margin-bottom: 12px;
  color: currentcolor;
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.ledger-node code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
  white-space: normal;
}

.ledger-node small {
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.ledger-wire {
  padding: 18px 6px;
  color: var(--wire);
}

.ledger-wire::before,
.ledger-wire::after {
  position: absolute;
  top: 50%;
  width: 50%;
  height: 1px;
  background: var(--wire);
  content: "";
  opacity: 0.42;
}

.ledger-wire::before {
  right: 72%;
}

.ledger-wire::after {
  left: 72%;
}

.ledger-wire span,
.ledger-wire small {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-wire span {
  color: var(--muted);
  font-size: 9px;
}

.ledger-wire strong {
  margin-block: 12px;
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.ledger-wire small {
  color: var(--wire);
  font-size: 8px;
}

.migration-ledger figcaption {
  padding: 15px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  text-align: center;
}

.migration-ledger figcaption span:first-child {
  color: var(--cm5);
}

.migration-ledger figcaption span:last-child {
  color: var(--cm6);
}

.no-transform {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(250px, auto);
  align-items: center;
  margin-bottom: 82px;
  padding: 28px 30px;
  border: 1px solid rgb(125 211 252 / 34%);
  border-radius: var(--radius-medium);
  background:
    linear-gradient(90deg, var(--wire-soft), transparent 60%),
    var(--surface);
  box-shadow: inset 3px 0 0 var(--wire);
  gap: 22px;
}

.callout-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--wire);
  border-radius: 50%;
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
}

.callout-label {
  margin: 0 0 5px;
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.no-transform h2 {
  margin-bottom: 7px;
  font-size: clamp(24px, 2.6vw, 34px);
}

.no-transform p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.no-transform .callout-code {
  display: block;
  padding: 11px 13px;
  border-color: rgb(125 211 252 / 24%);
  color: var(--wire);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.guide-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
  padding-bottom: 110px;
  gap: 64px;
}

.guide-index {
  position: sticky;
  top: 98px;
  padding-top: 7px;
}

.guide-index > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-index nav {
  display: grid;
  border-top: 1px solid var(--border);
}

.guide-index a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 42px;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 1px solid rgb(51 65 85 / 62%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  gap: 7px;
}

.guide-index a span {
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 9px;
}

.guide-index a:hover {
  border-color: var(--wire);
  color: var(--text);
}

.migration-guide {
  min-width: 0;
  border-top: 1px solid var(--border);
}

.guide-section {
  position: relative;
  padding: 76px 0 82px 38px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 86px;
}

.guide-section::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(var(--ledger-line), transparent 88%);
  content: "";
}

.guide-section::after {
  position: absolute;
  top: 82px;
  left: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--wire);
  background: var(--page);
  content: "";
  transform: rotate(45deg);
}

.section-header {
  max-width: 880px;
  margin-bottom: 26px;
}

.section-number {
  display: block;
  margin-bottom: 14px;
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-section h2 {
  max-width: 900px;
  margin-bottom: 0;
  font-size: clamp(34px, 4.2vw, 54px);
}

.guide-section h3 {
  margin-top: 48px;
  font-size: clamp(23px, 2.5vw, 30px);
}

.guide-section > p,
.section-lede {
  max-width: 850px;
  color: var(--muted);
  font-size: 16px;
}

.section-lede {
  margin-bottom: 30px;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.65;
}

.guide-section > p:last-child {
  margin-bottom: 0;
}

.contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 32px 24px;
  border-block: 1px solid var(--border);
}

.contract-grid article {
  padding: 24px 20px;
  border-right: 1px solid var(--border);
}

.contract-grid article:last-child {
  border-right: 0;
}

.contract-grid span,
.track-label {
  display: block;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contract-grid article:nth-child(1) span {
  color: var(--cm5);
}

.contract-grid article:nth-child(2) span {
  color: var(--cm6);
}

.contract-grid article:nth-child(3) span {
  color: var(--wire);
}

.contract-grid strong {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 17px;
}

.contract-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.contract-note {
  padding: 14px 16px;
  border-left: 2px solid var(--wire);
  background: var(--wire-soft);
  color: var(--text-soft) !important;
  font-size: 13px !important;
}

.contract-note p {
  margin-top: 0;
}

.contract-note ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 28px;
  gap: 16px;
}

.install-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
}

.install-cm5 {
  border-color: rgb(241 162 181 / 30%);
  box-shadow: inset 0 3px 0 var(--cm5);
}

.install-cm6 {
  border-color: rgb(74 222 128 / 30%);
  box-shadow: inset 0 3px 0 var(--cm6);
}

.install-card > div {
  min-height: 118px;
  padding: 24px 22px 18px;
}

.install-card .track-label {
  margin-bottom: 20px;
}

.install-cm5 .track-label {
  color: var(--cm5);
}

.install-cm6 .track-label {
  color: var(--cm6);
}

.install-card strong {
  display: block;
  color: var(--text-soft);
  font-size: 16px;
}

.install-card pre {
  display: flex;
  min-height: 88px;
  align-items: center;
  margin: 0;
  overflow: auto;
  padding: 16px 20px;
  border-block: 1px solid var(--border);
  border-radius: 0;
  background: var(--page-raised);
}

.install-card pre code {
  color: var(--wire);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

.install-card > a {
  display: flex;
  min-height: 50px;
  align-items: center;
  padding: 10px 20px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.install-card > a:hover {
  color: var(--wire);
}

.code-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
}

.code-column {
  min-width: 0;
}

.code-column + .code-column {
  border-left: 1px solid var(--border);
}

.code-column header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}

.code-column header span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-before header span {
  color: var(--cm5);
}

.code-after header span {
  color: var(--cm6);
}

.code-column header strong {
  color: var(--text-soft);
  font-size: 12px;
}

.code-column pre {
  min-height: 640px;
  margin: 0;
  overflow: auto;
  padding: 22px 18px 28px;
  background: var(--page-raised);
  color: #dbeafe;
  font-size: 11px;
  line-height: 1.75;
}

.code-before pre {
  box-shadow: inset 0 3px 0 rgb(241 162 181 / 30%);
}

.code-after pre {
  box-shadow: inset 0 3px 0 rgb(74 222 128 / 30%);
}

.guide-section > pre,
.wire-example {
  max-width: 920px;
  margin: 28px 0;
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--page-raised);
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.75;
}

.table-region {
  max-width: 960px;
  margin-block: 30px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.table-region:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 3px;
}

.table-region table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.table-region th,
.table-region td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.table-region tbody tr:last-child th,
.table-region tbody tr:last-child td {
  border-bottom: 0;
}

.table-region thead th {
  background: var(--page-raised);
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.table-region tbody th {
  width: 23%;
  color: var(--text-soft);
  font-size: 12px;
}

.table-region td {
  color: var(--muted);
}

.table-region td code {
  white-space: normal;
}

.mapping-table td:first-child {
  width: 39%;
  color: var(--cm5);
}

.mapping-table td:last-child {
  color: var(--cm6);
}

.mapping-table td code {
  border: 0;
  background: transparent;
  color: inherit;
}

.option-list {
  max-width: 960px;
  margin-block: 24px 30px;
  border-block: 1px solid var(--border);
}

.option-list > div {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  min-height: 54px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  gap: 18px;
}

.option-list > div:last-child {
  border-bottom: 0;
}

.option-list code {
  justify-self: start;
  color: var(--wire);
  white-space: normal;
}

.option-list span {
  color: var(--muted);
  font-size: 13px;
}

.position-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 960px;
  margin-block: 26px;
  border-block: 1px solid var(--border);
}

.position-note > div {
  padding: 22px 18px;
}

.position-note > div + div {
  border-left: 1px solid var(--border);
}

.position-note span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.position-note > div:first-child span {
  color: var(--cm5);
}

.position-note > div:last-child span {
  color: var(--wire);
}

.position-note strong {
  color: var(--text-soft);
  font-size: 13px;
}

.intent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 960px;
  margin-block: 30px;
  border-block: 1px solid var(--border);
}

.intent-list article {
  min-width: 0;
  padding: 22px 18px;
  border-right: 1px solid var(--border);
}

.intent-list article:last-child {
  border-right: 0;
}

.intent-list span {
  display: block;
  margin-bottom: 16px;
  color: var(--cm6);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.intent-list code {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
  color: var(--wire);
  font-size: 10px;
  white-space: normal;
}

.intent-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.wire-example {
  border-color: rgb(125 211 252 / 30%) !important;
  color: #bbf7d0 !important;
  box-shadow: inset 3px 0 0 var(--wire);
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 960px;
  margin-block: 28px;
  gap: 16px;
}

.direction-grid article {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.direction-grid article:first-child {
  border-color: rgb(241 162 181 / 30%);
}

.direction-grid article:last-child {
  border-color: rgb(74 222 128 / 30%);
}

.direction-marker {
  display: block;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cm5-marker {
  color: var(--cm5);
}

.cm6-marker {
  color: var(--cm6);
}

.direction-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text-soft);
}

.direction-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.procedure-list {
  max-width: 960px;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.procedure-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 102px;
  align-items: start;
  padding: 22px 12px;
  border-bottom: 1px solid var(--border);
  gap: 18px;
}

.procedure-list > li > span {
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.procedure-list strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
}

.procedure-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.verification-section {
  margin-top: 0;
  background:
    linear-gradient(90deg, var(--cm6-soft), transparent 70%);
}

.verification-section::after {
  border-color: var(--cm6);
}

.verification-list {
  display: grid;
  max-width: 960px;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.verification-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  padding: 18px 12px;
  border-bottom: 1px solid var(--border);
  gap: 15px;
}

.verification-list > li > span {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  border: 1px solid var(--cm6);
  background: var(--page-raised);
}

.verification-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 14px;
}

.verification-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 960px;
  margin: 30px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.source-list li {
  border-bottom: 1px solid var(--border);
}

.source-list li:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.source-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 62px;
  align-items: center;
  padding: 11px 14px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
  gap: 10px;
}

.source-list a:hover {
  background: var(--wire-soft);
  color: var(--wire);
}

.source-list span {
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.migration-footer {
  padding-block: 42px;
  border-top: 1px solid var(--border);
  background: var(--page-raised);
}

.migration-footer .page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.migration-footer strong {
  color: var(--text-soft);
}

.migration-footer p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.migration-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.migration-footer nav a {
  min-height: 44px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}

.migration-footer nav a:hover {
  color: var(--wire);
}

@media (max-width: 1120px) {
  .migration-page .site-header nav a:not(.nav-home):not(.nav-source) {
    display: none;
  }

  .migration-hero {
    grid-template-columns: minmax(0, 0.8fr) minmax(430px, 1.2fr);
    gap: 42px;
  }

  .guide-shell {
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 38px;
  }

  .guide-section {
    padding-left: 30px;
  }
}

@media (max-width: 900px) {
  .migration-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 78px;
  }

  .migration-hero-copy {
    max-width: 780px;
  }

  .migration-ledger {
    width: 100%;
  }

  .no-transform {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .no-transform .callout-code {
    grid-column: 2;
    justify-self: start;
  }

  .guide-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-index {
    position: static;
    padding: 0;
  }

  .guide-index nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-index a {
    border-right: 1px solid var(--border);
  }

  .contract-grid,
  .intent-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .contract-grid article,
  .intent-list article {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .contract-grid article:last-child,
  .intent-list article:last-child {
    border-bottom: 0;
  }

  .contract-grid span {
    margin-bottom: 12px;
  }
}

@media (max-width: 760px) {
  .install-grid,
  .code-diff,
  .direction-grid,
  .source-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-column + .code-column {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .code-column pre {
    min-height: auto;
  }

  .source-list li:nth-child(odd) {
    border-right: 0;
  }

  .migration-footer .page-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .migration-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .migration-page .page-shell {
    width: min(1240px, calc(100% - 28px));
  }

  .migration-page .header-content {
    gap: 8px;
  }

  .migration-page .site-header nav {
    gap: 3px;
  }

  .migration-page .site-header nav a {
    padding-inline: 9px;
    font-size: 12px;
  }

  .migration-page .site-header .nav-source {
    margin-left: 0;
  }

  .migration-hero {
    min-height: auto;
    padding-block: 62px;
    gap: 44px;
  }

  .migration-hero h1 {
    font-size: clamp(44px, 15vw, 64px);
  }

  .migration-actions,
  .migration-actions .button {
    width: 100%;
  }

  .migration-actions .text-link {
    width: 100%;
    text-align: center;
  }

  .ledger-heading {
    padding-inline: 14px;
  }

  .ledger-track {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    background:
      linear-gradient(90deg, transparent calc(50% - 0.5px), var(--ledger-line) 50%, transparent calc(50% + 0.5px)) 0 0 / 100% 100% no-repeat,
      var(--page-raised);
    gap: 4px;
  }

  .ledger-node {
    width: min(280px, 100%);
    min-height: 170px;
    margin: 0 auto;
  }

  .ledger-node::after {
    top: auto;
    right: auto;
    left: 50%;
  }

  .ledger-cm5::after {
    bottom: -25px;
    transform: translateX(-50%) rotate(135deg);
  }

  .ledger-cm6::after {
    top: -25px;
    transform: translateX(-50%) rotate(315deg);
  }

  .ledger-wire {
    min-height: 112px;
  }

  .ledger-wire::before,
  .ledger-wire::after {
    left: 50%;
    width: 1px;
    height: 35%;
  }

  .ledger-wire::before {
    top: 0;
    right: auto;
  }

  .ledger-wire::after {
    top: auto;
    bottom: 0;
  }

  .no-transform {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 64px;
    padding: 24px;
  }

  .no-transform .callout-code {
    grid-column: 1;
    justify-self: stretch;
  }

  .guide-shell {
    padding-bottom: 80px;
    gap: 46px;
  }

  .guide-index nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-section {
    padding: 60px 0 64px 18px;
    scroll-margin-top: 78px;
  }

  .guide-section::after {
    top: 66px;
  }

  .guide-section h2 {
    font-size: clamp(31px, 10vw, 44px);
  }

  .section-lede {
    font-size: 17px;
  }

  .install-card pre,
  .guide-section > pre,
  .wire-example,
  .code-column pre {
    font-size: 10px;
  }

  .option-list > div,
  .position-note {
    grid-template-columns: minmax(0, 1fr);
  }

  .option-list > div {
    align-items: start;
    padding-block: 15px;
    gap: 8px;
  }

  .position-note > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .procedure-list li {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .migration-footer nav a {
    padding-inline: 6px;
  }
}

@media (max-width: 430px) {
  .migration-page .brand {
    font-size: 13px;
  }

  .migration-page .site-header nav {
    display: none;
  }

  .migration-ledger figcaption {
    font-size: 9px;
  }

  .guide-index nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-region table {
    min-width: 650px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
