/* ==========================================================================
   conv-b — migration.html + affiliate.html (prefix: mg-)
   ========================================================================== */

/* ---------- shared bits ---------- */
.mg-opt { font-weight: 400; color: var(--faint); font-size: 0.8rem; margin-left: 4px; }
.mg-footnote { margin-top: 14px; font-size: 0.86rem; color: var(--muted); max-width: 820px; }

/* ---------- Migration hero: job card ---------- */
.mg-hero__vis { position: relative; padding: 34px 0 40px; }
.mg-job {
  position: relative; border-radius: 22px; overflow: hidden; color: #d8def5; font-size: 0.9rem;
  background: radial-gradient(110% 70% at 85% -10%, rgba(90, 120, 255, 0.34), transparent 60%), linear-gradient(180deg, #0b1230 0%, #070a17 100%);
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: var(--shadow-lg);
}
.mg-job__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mg-job__bar > i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.mg-job__bar > span { margin-left: 8px; font-family: var(--mono); font-size: 0.74rem; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-job__state { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #9db0ff; background: rgba(123, 140, 255, 0.12); }
.mg-job__pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: mgPulse 1.4s ease-in-out infinite; }
.mg-job__state.is-wait { color: #f2c46d; background: rgba(242, 196, 109, 0.12); }
.mg-job__state.is-ok { color: #6fe3a8; background: rgba(60, 207, 138, 0.12); }
@keyframes mgPulse { 50% { opacity: 0.25; } }

.mg-job__route { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 10px; padding: 18px 18px 4px; }
.mg-job__node { min-width: 0; padding: 11px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.mg-job__node small { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.42); }
.mg-job__node strong { display: block; color: #fff; font-size: 0.98rem; font-weight: 560; letter-spacing: -0.02em; margin-top: 2px; }
.mg-job__node span { display: block; font-family: var(--mono); font-size: 0.7rem; color: rgba(255, 255, 255, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-job__node--to { border-color: rgba(123, 140, 255, 0.45); background: rgba(123, 140, 255, 0.1); }
.mg-job__wire { position: relative; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 4px, transparent 4px 8px); }
.mg-job__wire i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: #9db0ff; box-shadow: 0 0 10px #9db0ff; opacity: 0; animation: mgPacket 1.8s linear infinite; }
.mg-job__wire i:nth-child(2) { animation-delay: 0.6s; }
.mg-job__wire i:nth-child(3) { animation-delay: 1.2s; }
.mg-job.is-paused .mg-job__wire i { animation-play-state: paused; }
@keyframes mgPacket { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }

.mg-job__steps { list-style: none; margin: 0; padding: 10px 18px 2px; }
.mg-step { display: grid; grid-template-columns: 24px 1fr auto; column-gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); }
.mg-step:last-child { border-bottom: 0; }
.mg-step__ic { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.2); display: grid; place-items: center; transition: background 0.3s, border-color 0.3s; }
.mg-step__ic svg { width: 12px; height: 12px; opacity: 0; transition: opacity 0.3s; }
.mg-step strong { display: block; color: rgba(255, 255, 255, 0.5); font-weight: 520; font-size: 0.9rem; letter-spacing: -0.01em; transition: color 0.3s; }
.mg-step small { display: block; font-family: var(--mono); font-size: 0.68rem; color: rgba(255, 255, 255, 0.38); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-step > div { min-width: 0; }
.mg-step em { font-style: normal; font-family: var(--mono); font-size: 0.7rem; color: rgba(255, 255, 255, 0.36); min-width: 4.5ch; text-align: right; }
.mg-step__bar { grid-column: 2 / -1; height: 3px; margin-top: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; display: none; }
.mg-step__bar span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, #7b8cff, #a57bff); }
.mg-step.is-active .mg-step__bar { display: block; }
.mg-step.is-active .mg-step__ic { border-color: #9db0ff; border-top-color: transparent; animation: mgSpin 0.9s linear infinite; }
.mg-step.is-active strong { color: #fff; }
.mg-step.is-active em { color: #9db0ff; }
.mg-step.is-done .mg-step__ic { background: #3ccf8a; border-color: #3ccf8a; color: #052414; }
.mg-step.is-done .mg-step__ic svg { opacity: 1; }
.mg-step.is-done strong { color: rgba(255, 255, 255, 0.86); }
.mg-step.is-done em { color: #6fe3a8; }
.mg-step.is-wait .mg-step__ic { border-color: #f2c46d; background: rgba(242, 196, 109, 0.14); }
.mg-step.is-wait strong { color: #fff; }
.mg-step.is-wait em { color: #f2c46d; }
@keyframes mgSpin { to { transform: rotate(360deg); } }

.mg-job__foot { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 14px 18px 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.mg-job__total { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mg-job__total span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, #3ccf8a, #7b8cff); }
.mg-job__foot b { min-width: 4ch; text-align: right; color: #fff; font-weight: 500; letter-spacing: 0; }

.mg-float { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.86rem; font-weight: 560; color: var(--ink); white-space: nowrap; animation: bob 7s ease-in-out infinite; }
.mg-float small { display: block; font-family: var(--mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.mg-float > svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.mg-float .live-dot { margin: 0 4px; }
.mg-float--a { top: -16px; right: 22px; }
.mg-float--b { bottom: -2px; left: -26px; animation-delay: -3s; }

/* ---------- At a glance ---------- */

/* ---------- What we move ---------- */
.mg-tile .feature__link { margin-top: auto; }
.mg-tile a.link { font-weight: 560; }
.mg-pkg { display: grid; gap: 12px; }
.mg-pkg__file { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); }
.mg-pkg__file svg { width: 18px; height: 18px; color: var(--accent); }
.mg-pkg__file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-pkg__file b { font-weight: 500; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 999px; }
.mg-pkg__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mg-pkg__list li { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 0.84rem; color: var(--ink-2); }
.mg-pkg__list svg { width: 14px; height: 14px; flex: none; color: var(--green); }
.mg-note-list { display: grid; gap: 8px; margin-top: 4px; }
.mg-note-list li { position: relative; padding-left: 18px; font-size: 0.93rem; color: var(--ink-2); }
.mg-note-list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ---------- How it works ---------- */
.mg-how { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }
.mg-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.mg-flow__step { position: relative; display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.mg-flow__step:not(:last-child)::after { content: ""; position: absolute; top: 44px; right: -20px; width: 10px; height: 10px; border-top: 1.5px solid var(--line-2); border-right: 1.5px solid var(--line-2); transform: rotate(45deg); }
.mg-flow__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.mg-flow__num { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 0.88rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); }
.mg-flow__step:nth-child(3) .mg-flow__num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.mg-flow__when { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mg-flow__step h3 { font-size: 1.3rem; letter-spacing: -0.03em; font-weight: 580; margin-bottom: 8px; }
.mg-flow__step > p { color: var(--muted); font-size: 0.94rem; }
.mg-flow__mock { margin-top: auto; padding-top: 22px; }
.mg-mini { padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 8px; font-size: 0.84rem; }
.mg-mini__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mg-mini__row b { flex: 1; min-width: 0; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-mini__row em { font-style: normal; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); }
.mg-mini__row svg { width: 15px; height: 15px; flex: none; color: var(--green); }
.mg-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--line-2); }
.mg-dot--on { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mg-mini__url { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 2px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.mg-mini__url svg { width: 13px; height: 13px; color: var(--accent); }
.mg-mini--code { font-family: var(--mono); font-size: 0.76rem; background: var(--space); border-color: rgba(255, 255, 255, 0.06); color: #c9d1f0; }
.mg-mini--code > div { display: grid; grid-template-columns: 34px 46px auto auto; gap: 8px; align-items: center; justify-content: start; white-space: nowrap; }
.mg-mini--code span { color: rgba(201, 209, 240, 0.55); }
.mg-mini--code s { color: #ff8c8f; text-decoration-color: rgba(255, 140, 143, 0.6); }
.mg-mini--code b { color: #6fe3a8; font-weight: 500; }

.mg-timeline { margin-top: 56px; display: grid; grid-template-columns: 0.32fr 1fr; gap: 32px; align-items: start; }
.mg-timeline__head h3 { font-size: 1.4rem; letter-spacing: -0.03em; font-weight: 580; }
.mg-timeline__head p { margin-top: 8px; color: var(--muted); font-size: 0.94rem; }
.mg-timeline .mg-footnote { grid-column: 2; margin-top: -18px; }
.mg-table-wrap { box-shadow: var(--shadow-sm); }
.mg-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.mg-table th, .mg-table td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.mg-table thead th { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); background: var(--bg); }
.mg-table tbody tr:last-child td { border-bottom: 0; }
.mg-table td:first-child { color: var(--ink); font-weight: 560; }
/* the turnaround pill column takes only its own width; the scheduling note gets the rest */
.mg-timeline .mg-table th:first-child { width: 30%; }
.mg-timeline .mg-table th:nth-child(2), .mg-timeline .mg-table td:nth-child(2) { width: 1%; white-space: nowrap; }
.mg-time { display: inline-block; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; color: var(--accent); background: var(--accent-soft); }

/* ---------- Sources ---------- */
.mg-sources-split { align-items: start; }
/* below 1000px the host cards need the full width for two columns of readable text */
@media (max-width: 1000px) {
  .split-section.mg-sources-split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
.mg-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-src { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.3s var(--ease); }
.mg-src:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mg-src__mark { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; font-weight: 500; color: var(--ink); }
.mg-src:first-child .mg-src__mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.mg-src strong { display: block; font-size: 0.98rem; letter-spacing: -0.015em; }
.mg-src small { display: block; color: var(--muted); font-size: 0.84rem; line-height: 1.45; margin-top: 2px; }

/* ---------- Checklist ---------- */
.mg-check-section { padding-top: 48px; }
.mg-check-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.mg-check-intro { position: sticky; top: calc(var(--nav-h) + 70px); margin-bottom: 0; }
.mg-check-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.mg-reset { font-size: 0.92rem; }
.mg-checkcard { border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.mg-checkcard__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mg-checkcard__head small { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.mg-checkcard__head strong { font-size: 1.15rem; letter-spacing: -0.02em; }
.mg-progress { width: 160px; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.mg-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width 0.5s var(--ease); }
.mg-checklist { list-style: none; margin: 0; padding: 8px; counter-reset: mgc; }
.mg-checklist li { counter-increment: mgc; }
.mg-checklist li + li { border-top: 1px solid var(--line); }
.mg-checklist label { display: grid; grid-template-columns: 24px 1fr; gap: 16px; padding: 18px 16px; border-radius: 14px; cursor: pointer; transition: background 0.2s; }
.mg-checklist label:hover { background: var(--bg); }
.mg-checklist input { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border-radius: 7px; border: 1.5px solid color-mix(in srgb, var(--faint) 55%, var(--line-2)); background: var(--card); display: grid; place-items: center; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.mg-checklist input::after { content: ""; width: 10px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform 0.25s var(--ease); }
.mg-checklist input:checked { background: var(--green); border-color: var(--green); }
.mg-checklist input:checked::after { transform: rotate(-45deg) scale(1); }
.mg-checklist input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mg-checklist strong { display: block; font-size: 1.02rem; letter-spacing: -0.015em; transition: color 0.2s; }
.mg-checklist strong::before { content: counter(mgc, decimal-leading-zero); margin-right: 10px; font-family: var(--mono); font-size: 0.74rem; font-weight: 500; color: var(--faint); }
.mg-checklist small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.91rem; line-height: 1.55; }
.mg-checklist li:has(input:checked) strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.mg-checkcard__foot { display: none; }

/* ---------- Request form ---------- */
.mg-request { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.mg-next { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 0; }
.mg-next li { position: relative; display: grid; gap: 2px; padding: 0 0 20px 30px; }
.mg-next li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.mg-next li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 2px; width: 1px; background: var(--line-2); }
.mg-next b { color: var(--ink); font-weight: 580; letter-spacing: -0.01em; }
.mg-next span { color: var(--muted); font-size: 0.92rem; }
.mg-aside-note { color: var(--muted); font-size: 0.92rem; }
.mg-form { box-shadow: var(--shadow); }
.mg-form__head { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.mg-form__head > svg { width: 40px; height: 40px; padding: 10px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.mg-form__head strong { display: block; font-size: 1.08rem; letter-spacing: -0.02em; }
.mg-form__head small { color: var(--muted); font-size: 0.84rem; }
.mg-form .field textarea { min-height: 120px; }
.mg-fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.mg-fieldset legend { padding: 0; margin-bottom: 7px; font-size: 0.86rem; font-weight: 520; color: var(--ink-2); }
.mg-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-seg label { position: relative; display: inline-flex; }
.mg-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mg-seg span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 0.93rem; color: var(--ink-2); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s; }
.mg-seg input:checked + span { border-color: var(--accent); background: var(--card); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.mg-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mg-seg--checks span::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 4px; border: 1.5px solid var(--line-2); background: var(--card); transition: background 0.2s, border-color 0.2s; }
.mg-seg--checks input:checked + span::before { background: var(--accent) 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='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; border-color: var(--accent); }
.mg-consent { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 22px; font-size: 0.88rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.mg-consent input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--accent); }

/* ---------- Reviews + FAQ extras ---------- */
.mg-reviews .reviews:empty { display: none; }
.mg-kb { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.mg-kb__label { display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.mg-kb:has([data-kb-related]:empty) { display: none; }

/* ---------- Print: only the checklist (when printed from its button) ---------- */
@media print {
  html.mg-printing { --ink: #0b0b0d; --ink-2: #34343a; --muted: #55555c; --faint: #8a8a92; --card: #fff; --bg: #fff; --line: #d9d8d2; --line-2: #c9c8c1; --green: #0f9f58; }
  html.mg-printing body { background: #fff; }
  html.mg-printing body > :not(main), html.mg-printing main > :not(#checklist) { display: none !important; }
  html.mg-printing #checklist { padding: 0 !important; }
  html.mg-printing .mg-check-grid { display: block; padding: 0; }
  html.mg-printing .mg-check-intro { display: none; }
  html.mg-printing #checklist-card { opacity: 1 !important; transform: none !important; box-shadow: none; border-color: #ccc; }
  html.mg-printing .mg-checklist input { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.mg-printing .mg-checklist li { break-inside: avoid; }
  html.mg-printing .mg-checkcard__foot { display: block; padding: 12px 24px; font-size: 10pt; color: #666; }
  html.mg-printing .mg-progress { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mg-float--b { left: -8px; }
  .mg-float--a { right: -4px; }
  .mg-pkg__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .mg-flow { grid-template-columns: 1fr; gap: 14px; max-width: 620px; margin: 0 auto; }
  .mg-flow__step:not(:last-child)::after { display: none; }
  .mg-timeline { grid-template-columns: 1fr; gap: 18px; }
  .mg-timeline .mg-footnote { grid-column: auto; margin-top: 0; }
  .mg-check-grid, .mg-request { grid-template-columns: 1fr; gap: 36px; }
  .mg-check-intro { position: static; }
}
@media (max-width: 820px) {
  .mg-hero__vis { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .mg-hero__vis { padding: 0; }
  .mg-float { position: static; margin-top: 10px; animation: none; white-space: normal; }
  .mg-float--a { display: none; }
  .mg-job__route { grid-template-columns: 1fr 34px 1fr; padding: 14px 14px 2px; }
  .mg-job__steps { padding: 8px 14px 0; }
  .mg-job__foot { padding: 12px 14px 14px; }
  .mg-job__bar > span { display: none; }
  .mg-step small { white-space: normal; }
  .mg-pkg__list { grid-template-columns: 1fr 1fr; }
  .mg-pkg__list li { font-size: 0.8rem; padding: 8px 10px; }
  .mg-sources { grid-template-columns: 1fr; }
  .mg-table thead { display: none; }
  .mg-table, .mg-table tbody, .mg-table tr, .mg-table td { display: block; width: 100%; }
  .mg-table tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .mg-table tbody tr:last-child { border-bottom: 0; }
  .mg-table td { padding: 3px 0; border: 0; }
  .mg-table td:first-child { font-size: 1rem; margin-bottom: 4px; }
  .mg-checkcard__head { padding: 16px 18px; }
  .mg-progress { width: 90px; }
  .mg-checklist { padding: 4px; }
  .mg-checklist label { gap: 12px; padding: 16px 12px; }
  .mg-mini--code > div { grid-template-columns: 30px 44px auto auto; gap: 6px; }
}

/* ==========================================================================
   affiliate.html
   ========================================================================== */
.mg-login { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }

/* hero dashboard mock */
.mg-dash__tag { flex: none; margin-left: 8px; padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--line-2); font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.mg-dash__link small { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.mg-dash__link > div { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.mg-dash__link svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.mg-dash__link code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: 0.8rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-dash__copy { flex: none; padding: 6px 12px; border-radius: 8px; background: var(--inv-bg); color: var(--inv-ink); font-size: 0.76rem; font-weight: 560; }
.mg-dash .res strong { font-size: 1.2rem; }
.mg-dash__list { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.mg-dash__head, .mg-dash__row { display: grid; grid-template-columns: 1fr 64px 118px; gap: 10px; align-items: center; padding: 9px 14px; }
.mg-dash__head { background: var(--bg); font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.mg-dash__head span:last-child { grid-column: 3; }
.mg-dash__row { border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--muted); }
.mg-dash__row b { color: var(--ink); font-weight: 560; }
.mg-dash__row em { font-style: normal; font-family: var(--mono); font-size: 0.82rem; color: var(--ink); text-align: right; }
.mg-dash__row.is-muted { opacity: 0.6; }
.mg-pill { justify-self: start; font-style: normal; display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 560; white-space: nowrap; background: var(--bg-2); color: var(--muted); }
.mg-pill--ok { background: var(--green-soft); color: var(--green); }
.mg-pill--hold { background: color-mix(in srgb, var(--amber) 16%, transparent); color: color-mix(in srgb, var(--amber) 70%, var(--ink)); }
.mg-dash__foot { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink-2); font-size: 0.84rem; }
.mg-dash__foot svg { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* how it works: editorial numbered row */
.mg-how-head { margin-bottom: 48px; max-width: 640px; }
.mg-numbered { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.mg-numbered li { position: relative; padding-top: 28px; border-top: 1px solid var(--line-2); }
.mg-numbered li::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 2px; background: var(--accent); }
.mg-numbered__n { position: absolute; top: 24px; right: 0; font-family: var(--serif); font-style: italic; font-size: 3.6rem; line-height: 1; color: var(--line-2); }
.mg-numbered__ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.mg-numbered__ic svg { width: 21px; height: 21px; }
.mg-numbered h3 { font-size: 1.4rem; letter-spacing: -0.03em; font-weight: 580; margin-bottom: 10px; }
.mg-numbered p { color: var(--muted); font-size: 0.97rem; max-width: 340px; }

/* commission table */
.mg-commission { background: linear-gradient(180deg, transparent, var(--bg-2) 16%, var(--bg-2) 84%, transparent); }
.mg-ctable td { vertical-align: middle; }
.mg-ctable td small { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.mg-ctable td:first-child a { color: var(--ink); font-weight: 580; }
.mg-ctable td:first-child a:hover { color: var(--accent); }
.mg-ctable td:nth-child(3) small, .mg-ctable td:nth-child(5) small { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }
.mg-rate { display: inline-grid; place-items: center; min-width: 58px; height: 34px; padding: 0 10px; border-radius: 10px; font-family: var(--mono); font-size: 0.96rem; font-weight: 500; color: var(--accent-ink, #fff); background: var(--accent); }
.mg-rate--mid { background: color-mix(in srgb, var(--accent) 72%, var(--card)); }
.mg-rate--low { background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--accent); }
.mg-rate--off { background: var(--bg-2); color: var(--faint); }
[data-theme="dark"] .mg-rate--low { color: var(--accent-2); }
[data-theme="dark"] .mg-rate--off { color: var(--faint); }
.mg-earn { font-size: 1.35rem; font-weight: 560; letter-spacing: -0.03em; color: var(--ink); }
.mg-ctable__off { background: var(--bg); }
.mg-ctable__off td { color: var(--muted); }
.mg-table.mg-ctable .mg-ctable__off td:first-child { color: var(--muted); }
.mg-commission__notes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.mg-commission__notes p { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 0.9rem; color: var(--muted); }
.mg-commission__notes svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }

/* estimator */
.mg-calc { display: grid; grid-template-columns: 1fr 340px; gap: 14px; padding: 14px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mg-calc__main { padding: 22px 18px 10px; min-width: 0; }
.mg-calc__intro { max-width: 560px; margin-bottom: 22px; }
.mg-calc__intro h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.04em; margin: 14px 0 10px; }
.mg-calc__intro p { color: var(--muted); font-size: 0.96rem; }
.mg-calc__rows { display: grid; }
.mg-calc__row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto 92px; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.mg-calc__prod strong { display: block; font-size: 0.98rem; letter-spacing: -0.015em; color: var(--ink); }
.mg-calc__prod small { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); white-space: nowrap; }
.mg-calc__sel { width: 100%; min-width: 0; height: 44px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--line); outline: none; font-size: 0.9rem; color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b73' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; transition: border-color 0.2s, box-shadow 0.2s; }
.mg-calc__sel:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.mg-stepper { display: inline-flex; align-items: center; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.mg-stepper button { width: 38px; height: 100%; font-size: 1.1rem; color: var(--ink-2); transition: background 0.2s, color 0.2s; }
.mg-stepper button:hover { background: var(--bg-2); color: var(--ink); }
.mg-stepper input { width: 46px; height: 100%; padding: 0; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; background: var(--card); text-align: center; font-family: var(--mono); font-size: 0.95rem; color: var(--ink); outline: none; -moz-appearance: textfield; appearance: textfield; }
.mg-stepper input::-webkit-outer-spin-button, .mg-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mg-stepper input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.mg-calc__out { text-align: right; font-family: var(--mono); font-size: 1rem; color: var(--ink); }
.mg-calc__sum { display: flex; flex-direction: column; padding: 28px; border-radius: 20px; background: var(--inv-bg); color: var(--inv-muted); }
.mg-calc__sum > small { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.mg-calc__sum > strong { display: flex; align-items: baseline; gap: 2px; margin: 10px 0 20px; color: var(--inv-ink); font-size: clamp(2.6rem, 4vw, 3.3rem); font-weight: 520; letter-spacing: -0.06em; line-height: 1; }
.mg-calc__cur { font-size: 0.5em; align-self: flex-start; margin-top: 0.2em; letter-spacing: 0; }
.mg-calc__per { font-size: 0.32em; letter-spacing: 0; color: var(--inv-muted); margin-left: 4px; }
.mg-calc__lines { display: grid; gap: 10px; padding: 16px 0; border-top: 1px dashed color-mix(in srgb, var(--inv-ink) 20%, transparent); border-bottom: 1px dashed color-mix(in srgb, var(--inv-ink) 20%, transparent); font-size: 0.9rem; }
.mg-calc__lines div { display: flex; justify-content: space-between; gap: 10px; }
.mg-calc__lines b { font-family: var(--mono); font-weight: 500; color: var(--inv-ink); }
.mg-calc__sum p { margin: 16px 0 22px; font-size: 0.82rem; line-height: 1.55; }
.mg-calc__sum .btn { margin-top: auto; }

/* terms sheet */
.mg-terms-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.mg-terms { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.mg-terms > div { padding: 20px 0; border-top: 1px solid var(--line); }
.mg-terms dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.mg-terms dd { margin: 6px 0 0; }
.mg-terms dd strong { display: block; font-size: 1.3rem; font-weight: 560; letter-spacing: -0.03em; }
.mg-terms dd span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* tools */
.mg-tool .tile__visual { margin-top: auto; }
.mg-linkbox { display: grid; gap: 8px; }
.mg-linkbox__label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.mg-linkbox code { display: block; padding: 12px 14px; border-radius: 12px; font-size: 0.82rem; background: var(--bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-linkbox code b { color: var(--accent); font-weight: 600; }
.mg-linkbox__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mg-linkbox__meta span { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
.mg-linkbox__meta b { display: block; font-size: 0.92rem; font-weight: 560; color: var(--ink); letter-spacing: -0.01em; }
.mg-how-aff { padding-bottom: 72px; }
/* one grid for the four sizes: the 160 × 600 skyscraper runs down the right, the leaderboard
   across the top, the medium rectangle and the mobile banner share the second row */
.mg-banners { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 72px; grid-template-areas: "lb lb sky" "mr mob sky"; gap: 8px; align-items: center; }
.mg-banners__row { display: contents; }
.mg-banner--lb { grid-area: lb; }
.mg-banner--mr { grid-area: mr; }
.mg-banner--sky { grid-area: sky; align-self: stretch; }
.mg-banner--mob { grid-area: mob; }
.mg-banner { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; border-radius: 8px; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #3f5bff, transparent 60%), linear-gradient(135deg, #0c1640, #050913); }
.mg-banner b { font-size: 0.82rem; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.mg-banner span { font-size: 0.68rem; color: rgba(255, 255, 255, 0.7); }
.mg-banner i { position: absolute; right: 8px; bottom: 6px; font-style: normal; font-family: var(--mono); font-size: 0.58rem; color: rgba(255, 255, 255, 0.55); }
.mg-banner--lb { height: 46px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
.mg-banner--lb i { top: 50%; bottom: auto; transform: translateY(-50%); }
.mg-banner--mr { height: 104px; justify-content: flex-start; padding-top: 12px; }
.mg-banner--sky { height: auto; min-height: 158px; align-items: center; justify-content: flex-start; padding: 12px 4px; }
.mg-banner--sky i { left: 0; right: 0; text-align: center; }
.mg-banner--mob { height: 34px; justify-content: center; }
.mg-banner--mob i { top: 50%; bottom: auto; transform: translateY(-50%); }
.mg-deeplinks { display: grid; gap: 6px; }
.mg-deeplinks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.mg-deeplinks code { min-width: 0; padding: 0; border: 0; background: none; font-size: 0.78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-deeplinks span { flex: none; font-size: 0.78rem; color: var(--muted); }
.mg-coupon { display: flex; align-items: stretch; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line-2)); background: var(--accent-soft); overflow: hidden; }
.mg-coupon__code { flex: 1; padding: 14px 18px; }
.mg-coupon small, .mg-coupon__meta span { display: block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mg-coupon__code b { font-family: var(--mono); font-size: 1.3rem; font-weight: 500; letter-spacing: 0.08em; color: var(--accent); }
.mg-coupon__meta { padding: 14px 18px; border-left: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line-2)); display: flex; flex-direction: column; justify-content: center; }
.mg-coupon__meta b { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; color: var(--ink); }

/* customer referral band */
.mg-refer { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding: 64px; border-radius: 32px; color: rgba(255, 255, 255, 0.72); background: radial-gradient(70% 90% at 100% 0%, rgba(80, 110, 255, 0.4), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(120, 70, 240, 0.25), transparent 60%), linear-gradient(160deg, #0b1230, #05070f); border: 1px solid rgba(255, 255, 255, 0.06); }
.mg-refer .eyebrow { color: rgba(255, 255, 255, 0.55); }
.mg-refer h2 { margin: 18px 0 14px; color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.05em; line-height: 1.04; }
.mg-refer h2 em { color: #9fb0ff; }
.mg-refer__text > p { font-size: 1.05rem; max-width: 460px; }
.mg-refer__steps { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; gap: 12px; }
.mg-refer__steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.95rem; color: rgba(255, 255, 255, 0.82); }
.mg-refer__steps b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); font-family: var(--mono); font-size: 0.78rem; font-weight: 500; color: #fff; }
.mg-refer__ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mg-refer__ctas span { font-size: 0.84rem; color: rgba(255, 255, 255, 0.55); max-width: 260px; }
.mg-refer__vis { position: relative; display: grid; gap: 14px; justify-items: center; }
.mg-ticket { position: relative; width: min(300px, 100%); padding: 22px 26px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); rotate: -3deg; animation: bob 7s ease-in-out infinite; }
.mg-ticket::before, .mg-ticket::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #070b1a; }
.mg-ticket::before { left: -10px; }
.mg-ticket::after { right: -10px; }
.mg-ticket small { display: block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.mg-ticket strong { display: block; margin: 4px 0 2px; color: #fff; font-size: 3rem; font-weight: 520; letter-spacing: -0.05em; line-height: 1; }
.mg-ticket span { font-size: 0.88rem; color: rgba(255, 255, 255, 0.7); }
.mg-ticket--alt { rotate: 3deg; background: rgba(123, 140, 255, 0.16); border-color: rgba(157, 176, 255, 0.4); animation-delay: -3.5s; }
.mg-refer__plus { position: relative; z-index: 1; width: 44px; height: 44px; margin: -26px 0; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #2b4bff; box-shadow: 0 10px 30px -8px rgba(80, 110, 255, 0.7); }
.mg-refer__plus svg { width: 20px; height: 20px; }

/* rules */
.mg-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1000px; margin: 0 auto; }
.mg-rules__col { padding: 30px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.mg-rules__col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; letter-spacing: -0.02em; font-weight: 580; margin-bottom: 18px; }
.mg-rules__col h3 svg { width: 22px; height: 22px; }
.mg-rules__col--do h3 svg { color: var(--green); }
.mg-rules__col--dont h3 svg { color: var(--red); }
.mg-rules__col li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--line); font-size: 0.94rem; color: var(--ink-2); }
.mg-rules__col li::before { content: ""; position: absolute; left: 2px; top: calc(11px + 0.78em); width: 8px; height: 2px; border-radius: 2px; background: var(--green); }
.mg-rules__col--dont li::before { background: var(--red); }
.mg-rules__col--dont { background: color-mix(in srgb, var(--red) 3%, var(--card)); }

/* apply */
.mg-apply { padding-top: 40px; }
.mg-look { display: grid; gap: 14px; margin-bottom: 22px; }
.mg-look li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.93rem; color: var(--muted); }
.mg-look svg { width: 19px; height: 19px; flex: none; margin-top: 2px; color: var(--accent); }
.mg-look strong { color: var(--ink); }

@media (max-width: 1100px) {
  .mg-calc { grid-template-columns: 1fr; }
  .mg-calc__sum .btn { margin-top: 0; }
}
@media (max-width: 980px) {
  .mg-numbered { grid-template-columns: 1fr; gap: 28px; max-width: 620px; }
  .mg-terms-grid { grid-template-columns: 1fr; gap: 32px; }
  .mg-refer { grid-template-columns: 1fr; padding: 48px 36px; gap: 40px; }
  .mg-refer__vis { grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: stretch; gap: 0; }
  .mg-refer__plus { margin: 0 -10px; }
  .mg-ticket { width: auto; }
}
/* tablets: the five-column commission table becomes one block per product: name and rate on
   top, then the example, the commission and the range side by side with their labels */
@media (max-width: 900px) {
  .mg-ctable thead { display: none; }
  .mg-ctable, .mg-ctable tbody, .mg-ctable td { display: block; width: 100%; }
  .mg-ctable tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 18px; row-gap: 10px; align-items: start; padding: 18px 20px; border-bottom: 1px solid var(--line); }
  .mg-ctable tbody tr:last-child { border-bottom: 0; }
  .mg-ctable td { padding: 0; border: 0; }
  .mg-ctable td:first-child { grid-column: 1 / 3; grid-row: 1; }
  .mg-ctable td:nth-child(2) { grid-column: 3; grid-row: 1; justify-self: end; }
  .mg-ctable td:nth-child(n+3)::before { content: attr(data-label); display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
  .mg-ctable td[colspan] { grid-column: 1 / -1; }
  .mg-ctable td[colspan]::before { display: none; }
}
@media (max-width: 640px) {
  .mg-dash__head, .mg-dash__row { grid-template-columns: 1fr 50px 92px; padding: 8px 10px; gap: 8px; }
  .mg-dash__row { font-size: 0.78rem; }
  .mg-dash .res-row { gap: 6px; }
  .mg-dash .res { padding: 10px; }
  .mg-dash .res small { font-size: 0.58rem; letter-spacing: 0.04em; }
  .mg-dash .res strong { font-size: 1rem; }
  .mg-dash__tag { display: none; }
  .mg-pill__x { display: none; }
  .mg-ctable tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
  .mg-ctable td:first-child { grid-column: 1; }
  .mg-ctable td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .mg-ctable td:nth-child(n+3) { grid-column: 1 / -1; }
  .mg-ctable td:nth-child(n+3)::before { content: attr(data-label); display: block; margin-top: 6px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
  .mg-commission__notes { grid-template-columns: 1fr; }
  .mg-calc { padding: 8px; border-radius: 22px; }
  .mg-calc__main { padding: 16px 10px 6px; }
  .mg-calc__row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .mg-calc__prod { grid-column: 1; grid-row: 1; }
  .mg-calc__out { grid-column: 2; grid-row: 1; }
  .mg-calc__sel { grid-column: 1; grid-row: 2; padding: 0 28px 0 12px; font-size: 0.86rem; background-position: right 10px center; }
  .mg-stepper { grid-column: 2; grid-row: 2; }
  .mg-stepper button { width: 32px; }
  .mg-stepper input { width: 36px; }
  .mg-calc__sum { padding: 22px; }
  .mg-terms { grid-template-columns: 1fr; }
  .mg-banners { grid-template-columns: minmax(0, 1fr) 60px; grid-template-areas: "lb sky" "mr sky" "mob sky"; }
  .mg-banner--sky { min-height: 0; }
  .mg-refer { padding: 40px 22px; border-radius: 24px; }
  .mg-refer__vis { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .mg-refer__plus { margin: -26px 0; }
  .mg-ticket { width: min(280px, 100%); }
  .mg-rules { grid-template-columns: 1fr; }
  .mg-rules__col { padding: 22px; }
}

/* ---------- Migration: "what we move" as a lead card plus a ruled spec list ---------- */
.mg-manifest { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px 56px; align-items: start; }
.mg-manifest__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.mg-manifest__side > * { grid-column: 1 / -1; }
.mg-manifest__lead { gap: 12px; }
.mg-manifest__lead .tile__visual { min-width: 0; }
.mg-manifest__lead .mg-pkg { grid-template-columns: minmax(0, 1fr); }
.mg-manifest__lead .mg-pkg__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mg-manifest__note { padding: 20px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: var(--bg-2); }
.mg-manifest__note h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.98rem; font-weight: 580; letter-spacing: -0.02em; }
.mg-manifest__note h3 svg { width: 18px; height: 18px; color: var(--amber); }
.mg-manifest__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.mg-manifest__list > li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.mg-manifest__k { padding-top: 4px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.mg-manifest__list h3 { margin-bottom: 6px; font-size: 1.08rem; font-weight: 580; letter-spacing: -0.02em; }
.mg-manifest__list p { font-size: 0.93rem; line-height: 1.6; color: var(--muted); }
.mg-manifest__list .link { font-weight: 560; white-space: nowrap; }
@media (max-width: 980px) {
  .mg-manifest { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .mg-manifest__list > li { grid-template-columns: 1fr; gap: 6px; padding: 18px 0 20px; }
  .mg-manifest__k { padding-top: 0; }
}

/* ---------- visual QA pass ---------- */
/* source-host cards: no lone last word ("…FTP or / SSH") */
.mg-src strong { text-wrap: balance; }
/* a choice row that shares a form row with a select sits at the select's full height */
.form__row .mg-seg span { min-height: 53px; }
/* affiliate: customer-referral heading and section intros without a lone last word */
.mg-refer h2 { text-wrap: balance; }
.mg-terms-grid .section-head p, #rules .section-head p { text-wrap: balance; }
.mg-checklist strong { text-wrap: balance; }
/* stacked form rows on phones: fields keep one 16px rhythm instead of alternating 30px / 16px */
@media (max-width: 640px) {
  .mg-form .form__row { row-gap: 0; }
}
/* affiliate banner mock: the 728×90 size label sits in the flow, so on narrow cards the tagline truncates instead of running under it */
.mg-banner--lb b, .mg-banner--lb i { flex: none; }
.mg-banner--lb span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mg-banner--lb i { position: static; transform: none; margin-left: auto; }
.mg-src small { text-wrap: pretty; }
.mg-terms dd span { text-wrap: pretty; }
/* three-step cards between tablet and desktop: tighter cards, and the mock rows wrap instead of cutting words off with "…" */
@media (min-width: 981px) and (max-width: 1200px) {
  .mg-flow { gap: 20px; }
  .mg-flow__step { padding: 22px 20px; }
  .mg-flow__step:not(:last-child)::after { right: -15px; }
  .mg-mini { padding: 10px 12px; }
  .mg-mini__row { align-items: flex-start; }
  .mg-mini__row b { white-space: normal; overflow: visible; line-height: 1.35; }
  .mg-mini__row .mg-dot, .mg-mini__row svg { margin-top: 3px; }
  .mg-mini__url { white-space: nowrap; }
}
