/* AI v12: Leads-style step pages. Layout only: DS classes and tokens supply every look. Loaded last.
   Structure from the Leads "Set up asset delivery" frame, mirrored: a WIDE settings card (left) and a NARROW sticky preview card (right). */

/* page */
.v12-page { padding-bottom: 64px; }
.v12 { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.v12 > .rs-head { margin-bottom: 0; }

/* stepper card: 46px, steps inline with 32px connectors (DS-GAP: connector line; the numbered circle is the DS .stepnum) */
.v12-stp { height: 46px; display: flex; align-items: center; padding: 0 16px; min-width: 0; }
.v12-stp__l { list-style: none; display: flex; align-items: center; flex-wrap: nowrap; min-width: 0; }
.v12-stp__i { display: flex; align-items: center; flex: none; }
.v12-stp__c { width: 32px; height: 1px; margin: 0 12px; background: var(--stroke-secondary); flex: none; }
.v12-stp__b { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px; border: 0; background: transparent; border-radius: var(--radius-4); font: 500 14px/1 var(--font); color: var(--type-tertiary); cursor: pointer; white-space: nowrap; }
.v12-stp__b:disabled { cursor: default; }
.v12-stp__b:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; }
.v12-stp__i.is-cur .v12-stp__b { color: var(--type-primary); }
.v12-stp__i.is-done .v12-stp__b { color: var(--type-secondary); }
.v12-stp__i.is-done .stepnum { color: var(--type-tertiary); }
.v12-stp__i.is-done .stepnum .fa { font-size: 10px; }
.v12-stp__i.is-done .v12-stp__b:hover { color: var(--type-primary); }
.v12-stp__m { display: none; }
.v12-stp--tabs { padding: 0 16px; overflow: hidden; }
.v12-stp--tabs .ds-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
.v12-stp--tabs .ds-tabs-list { border-bottom: 0; gap: 28px; white-space: nowrap; height: 46px; align-items: stretch; }
.v12-stp--tabs .ds-tabs-list > li { margin: 0; }
.v12-stp--tabs .ds-tabs-list > li > button { height: 46px; }

/* two cards: wide settings (left), narrow sticky preview (right). The preview is about a third of the settings width. */
.v12-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 32%, 460px); gap: 20px; align-items: start; min-width: 0; }
.v12-set { padding: 0; min-width: 0; }
.v12-set__h { padding: 24px 24px 20px; display: grid; gap: 4px; border-bottom: 1px solid var(--stroke-tertiary); }
.v12-set__t { font: var(--heading-md); } .v12-set__t:focus, .v12-set__t:focus-visible { outline: none; }
.v12-set__d { font: var(--body-md); color: var(--type-secondary); }
.v12-set__b { padding: 4px 24px 8px; display: grid; gap: 0; min-width: 0; }
.v12-set__f { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-top: 1px solid var(--stroke-tertiary); }
.v12-set__fa { display: flex; align-items: center; gap: 12px; }
.v12-set__b > .ds-note { margin-top: 20px; }
.v12-set__b > .isec:first-of-type { border-top: 0; }

/* sub-sections: 14/500 title, muted helper, hairline dividers, label-left rows */
.v12 .isec { padding: 24px 0; gap: 16px; }
.v12 .isec + .isec { border-top: 1px solid var(--stroke-tertiary); }
.v12 .isec__t { font: var(--heading-xs); } .v12 .isec__d { margin-top: -12px; }
.v12 .isec__b { gap: 16px; }
.v12 .rs > .r { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); align-items: start; gap: 8px 24px; padding: 12px 0; }
.v12 .rs > .r .r__t { padding-top: 6px; }
.v12 .rs > .r .r__c { flex: 1; justify-content: flex-start; flex-wrap: wrap; min-width: 0; }
.v12 .rs > .r .ds-select { min-width: 220px; }
.v12 .rs > .r .tog { margin-top: 4px; }
.v12 .rs > .r:first-child { padding-top: 0; } .v12 .rs > .r:first-child .r__t { padding-top: 6px; }
.v12 .r.sub, .v12 .sub { margin-left: 264px; }
/* nested bordered list: only where a group is a distinct object (capture fields, page rules) */
.v12 .rs--box { border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); padding: 0 16px; }
.v12 .rs--box > .r { padding: 10px 0; align-items: center; } .v12 .rs--box > .r .r__t { padding-top: 0; }
.v12 .rs--box > .r:first-child { padding-top: 10px; }
.v12 .pgs--box { gap: 0; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); padding: 0 16px; }
.v12 .pgs--box > * { padding: 10px 0; } .v12 .pgs--box > * + * { border-top: 1px solid var(--stroke-tertiary); }
.v12 .pgs--box > .field-error { border-top: 0; padding-top: 0; }
.v12 .dw { margin-top: 0; }
.v12 .try { gap: 8px; }
.v12 .lks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v12 .lk { padding: 8px; }
.v12 .lk__th { height: 56px; }
.v12 .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v12 .urls .url { flex-wrap: nowrap; }
.v12 .ds-note.draft { margin: 20px 0 0; }
.v12 .field-label.sr-only + .inp { margin-top: 0; }

/* preview card: sticky, hugs its content, never taller than the window */
.v12-pv { position: sticky; top: 48px; padding: 0; min-width: 0; max-height: calc(100vh - 64px); overflow: auto; scrollbar-width: thin; }
.pv__h { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; flex-wrap: wrap; }
.pv__t { font: var(--heading-xs); margin-right: auto; }
.pv__tg { display: none; }
.pv__b { padding: 0 16px 16px; display: grid; gap: 12px; }
.pv__f { display: flex; justify-content: flex-start; }
.pv__st { display: grid; gap: 12px; min-width: 0; }

/* preview pieces (all natural size, no scaling) */
.pvs { display: grid; place-items: center; padding: 16px; border-radius: var(--radius-8); background: var(--surface-overlay-1); border: 1px solid var(--stroke-tertiary); }
.pvs .win, .pvf .win { width: min(304px, 100%); }
.pvs .win__b, .pvf .win__b { height: 168px; }
.pvf { border: 1px solid var(--stroke-secondary); border-radius: var(--radius-8); overflow: hidden; background: var(--surface-screen); }
.pvf__bar { height: 28px; display: flex; align-items: center; gap: 5px; padding: 0 10px; background: var(--neutral-50); border-bottom: 1px solid var(--stroke-tertiary); }
.pvf__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--stroke-secondary); }
.pvf__url { margin-left: 8px; font: var(--body-sm); color: var(--type-tertiary); display: inline-flex; gap: 4px; align-items: center; }
.pvf__pg { position: relative; height: 420px; overflow: hidden; contain: paint; background: var(--surface-screen); }
.pvf__in { padding: 0 20px; display: grid; gap: 10px; align-content: start; }
.pvf__nav { display: flex; align-items: center; gap: 12px; height: 40px; } .pvf__nav b { font-weight: 500; margin-right: auto; }
.pvf__nav span { width: 28px; height: 6px; border-radius: 3px; background: var(--neutral-75); }
.pvf__h { font: 500 20px/1.2 var(--font); padding-top: 12px; }
.pvf__plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 6px; } .pvf__plans i { height: 70px; border-radius: var(--radius-8); border: 1px solid var(--stroke-tertiary); background: var(--neutral-25); }
.pvf--m { width: 232px; margin-inline: auto; border-radius: var(--radius-16); border-width: 4px; border-color: var(--neutral-600); }
.pvf--m .pvf__pg { height: 380px; }
.pvf--m .fab { transform: scale(.7); } .pvf--m .fab.is-r { transform-origin: bottom right; } .pvf--m .fab.is-l { transform-origin: bottom left; }
.pvf .fab { bottom: var(--oy, 16px); }
.pvf .fab.is-r { right: min(var(--ox, 16px), 20px); } .pvf .fab.is-l { left: min(var(--ox, 16px), 20px); }
.pv__st .tlw { width: 100%; padding: 12px 14px 10px; }
.pv__st .tlw__top { flex-wrap: wrap; gap: 8px 12px; }
.pv__st .fr { height: auto; grid-template-columns: 1fr; gap: 16px; }
.pv__st .fr__bg { min-height: 0; padding: 16px; }
.pv__st .fr__bg--e { padding: 12px; }

.pvw__s { font: var(--body-sm); color: var(--type-secondary); }
.pvw { list-style: none; display: grid; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); padding: 0 12px; }
.pvw li + li { border-top: 1px solid var(--stroke-tertiary); }
.pvw__r { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 0; border: 0; background: transparent; cursor: pointer; text-align: left; font: var(--body-md); color: var(--type-primary); min-height: 34px; }
.pvw__r:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; border-radius: 4px; }
.pvw__r:not(.is-on) .pvw__n { opacity: .6; }
.pvw__n { display: flex; align-items: baseline; gap: 8px; margin-right: auto; min-width: 0; flex-wrap: wrap; } .pvw__n b { font-weight: 500; } .pvw__n small { font: var(--body-sm); color: var(--type-secondary); }
.pvw__g { color: var(--type-secondary); }
.pvw__n2 { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; font: var(--body-sm); color: var(--type-secondary); }

/* unsaved bar (Phase 1 .set-foot, floating inside the page column) */
.v12-ubar { --set-pad: 16px; border-radius: var(--radius-12); border: 1px solid var(--stroke-tertiary); bottom: 16px; padding-block: 12px; }
.v12-ubar .ubar__a { display: flex; gap: 8px; }

/* review + live */
.v12 .sum__l .icotile { --icotile-size: 36px; }
.v12 .sum__l li:first-child { padding-top: 20px; }
.v12-live .live__a { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); background: transparent; text-align: left; font: var(--body-md); color: var(--type-primary); text-decoration: none; cursor: pointer; width: 100%; }
.v12-live .live__a:hover { border-color: var(--brand-100); }
.v12-live .live__a b { font-weight: 500; display: block; } .v12-live .live__a small { display: block; font: var(--body-sm); color: var(--type-secondary); }
.v12-live .live__a--c { cursor: default; } .v12-live .live__a--c:hover { border-color: var(--stroke-tertiary); }
.v12-live .v12-set__b.live__g { padding: 20px 24px; gap: 12px; display: grid; }
.v12-live .inp-act { display: flex; align-items: center; gap: 8px; margin-top: 6px; } .v12-live .inp-act .inp { flex: 1; min-width: 0; }
.v12-live .live__a--c > span:last-child { display: block; min-width: 0; }

/* manage: kebab sits inside the status card */
.sr1-stat__acts .ds-ctxwrap { position: relative; }

/* narrower windows */
@media (max-width: 1239px) {
  .v12-stp__i:not(.is-cur) .v12-stp__t { display: none; }
  .v12-stp__c { margin: 0 8px; }
}
@media (max-width: 1099px) {
  .v12-grid { grid-template-columns: 1fr; }
  .v12-pv { position: static; max-height: none; overflow: visible; order: -1; }
  .pv__tg { display: inline-flex; margin-left: auto; } .pv__tg .fa { transition: transform var(--m-base) var(--m-ease); }
  .v12-pv:not(.is-shut) .pv__tg .fa { transform: rotate(180deg); }
  .pv__t { margin-right: 0; }
  .pv__h .ds-seg { margin-left: auto; } .pv__h .ds-seg + .pv__tg { margin-left: 0; }
  .v12-pv.is-shut .pv__b { display: none; }
  .v12-pv.is-shut .pv__h { padding-bottom: 16px; }
  .pv__b { grid-template-columns: minmax(0, 1fr); justify-items: center; } .pv__b > * { width: 100%; max-width: 560px; }
  .pvf__pg { height: 340px; }
  .v12 .lks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .v12 .rs > .r { grid-template-columns: 1fr; gap: 4px; } .v12 .rs > .r .r__t { padding-top: 0; }
  .v12 .sub, .v12 .r.sub { margin-left: 0; }
  .v12 .rs--box > .r { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 600px) {
  .v12-stp { height: auto; flex-direction: column; align-items: stretch; padding: 10px 16px 12px; gap: 8px; }
  .v12-stp__l { display: none; }
  .v12-stp__m { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
  .v12-stp__s { font: var(--body-md); color: var(--type-secondary); } .v12-stp__s b { color: var(--type-primary); font-weight: 500; }
  .v12-stp__p { grid-column: 1 / -1; height: 4px; border-radius: var(--radius-full); background: var(--surface-overlay-2); overflow: hidden; }
  .v12-stp__p i { display: block; height: 100%; border-radius: inherit; background: var(--action-primary); transition: width var(--m-slow) var(--m-ease); }
  .v12-stp--tabs { height: 46px; padding: 0 12px; }
  .v12-pv:not(#pv-sh) { display: none; }
  .v12-set__h, .v12-set__f { padding-inline: 16px; } .v12-set__b { padding-inline: 16px; }
  .v12-set__f { flex-wrap: wrap; } .v12-set__fa { margin-left: auto; }
  .v12 .lks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v12 .two { grid-template-columns: 1fr; }
  .v12 .urls .url { flex-wrap: wrap; }
  .v12-live .v12-set__b.live__g { padding: 16px; }
}
.ais-sheet__b .v12-pv--sheet, .v12-pv--sheet { position: static; border: 0; box-shadow: none; max-height: none; overflow: visible; display: block; }
.v12-pv--sheet .pv__h { padding-inline: 0; } .v12-pv--sheet .pv__t, .v12-pv--sheet .pv__tg { display: none; } .v12-pv--sheet .pv__b { padding-inline: 0; }

.pvf--when .pvf__pg { height: 200px; }
.v12 .trg .k { align-items: center; }

.td .tl__b { display: inline-flex; gap: 8px; margin-left: 12px; }
@media (max-width: 600px) { .v12 .trg:has(.inp) { flex-wrap: wrap; } .v12 .trg:has(.inp) .trg__u { white-space: normal; } .v12 .k__u { overflow-wrap: anywhere; } }

/* card pickers: one calm signal. The radio shows the choice; the card only gets a soft tint (no full orange border on top of the orange radio) */
.v12 .lk.is-on { border-color: var(--stroke-secondary); box-shadow: none; background: var(--brand-10); }
.v12 .lk.is-on .lk__th { background: var(--surface-screen); }
.v12 .ps.is-on { border-color: var(--stroke-secondary); box-shadow: none; background: var(--brand-10); }
.v12 .ps.is-on .ps__s { background: var(--surface-screen); }
/* preview window: scaled to fit inside the page area, anchored above the launcher at the chosen corner */
.pvf .fab { transform: scale(.8); }
.pvf .fab.is-r { transform-origin: bottom right; } .pvf .fab.is-l { transform-origin: bottom left; }
.pvf--m .fab { transform: scale(.6); }
