/* ai-shared.css: components both AI flows use (iv-next, finder-next). Prefix .ais-*. Owner: the iv-next builder.
   Layout and the few looks the Ovation CSS DS lacks (each tagged DS-GAP). Everything else is a DS component (btn-wp, btn-wpo, ds-tabs, ds-select, inp, tog, ds-seg).
   Needs the DS tokens.css, components.css, icons.css. Rubik 500 or below; radius 2/4/8/10/12/16/24/full only. See README.md. */

/* ---- ais-head: page header (title, lead, Watch tutorial) ---- */
.ais-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 16px; }
.ais-head__t { min-width: 0; display: grid; gap: 2px; }
.ais-head__h { margin: 0; font: 500 20px/28px var(--font); color: var(--type-primary); }
.ais-head__l { margin: 0; font: 400 14px/20px var(--font); color: var(--type-secondary); }
.ais-head__w { flex: none; }

/* ---- ais-strip: the strip on top of the main card. The strip's bottom hairline IS the progress bar (2px orange fill). ---- */
.ais-strip { position: relative; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 16px 24px; border-bottom: 1px solid var(--stroke-tertiary); }
.ais-strip__n { margin: 0; font: 500 18px/26px var(--font); color: var(--type-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ais-strip__k { margin: 0; flex: none; font: 500 13px/20px var(--font); color: var(--type-secondary); }
.ais-strip__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.ais-strip__bar b { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--brand-100); border-radius: 0 var(--radius-full) var(--radius-full) 0; transition: width var(--m-slow, 400ms) var(--m-ease); }

/* ---- ais-card: section card with a hairline under the header when open (note 1). Panels are not clipped once settled (menus open freely, note 4). ---- */
.ais-card { min-width: 0; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-12); background: var(--surface-screen); }
.ais-card__h { margin: 0; font: inherit; border-bottom: 1px solid transparent; border-radius: var(--radius-12) var(--radius-12) 0 0; transition: border-color var(--m-base) var(--m-ease); }
.ais-card:not(.is-open) .ais-card__h { border-radius: var(--radius-12); }
.ais-card.is-open .ais-card__h { border-bottom-color: var(--stroke-tertiary); }
.ais-card__b { display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: inherit; transition: background-color var(--m-fast) var(--m-ease); }
.ais-card__b:hover { background: var(--neutral-25); }
.ais-card__b:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: -3px; }
.ais-card__b .set-collapse { pointer-events: none; }
.ais-card__b:hover .set-collapse.icon-only { background: var(--surface-overlay-1); }
.ais-card:not(.is-open) .set-collapse .fa { transform: rotate(180deg); }
.ais-card__t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ais-card__t > b { font: 500 16px/24px var(--font); color: var(--type-primary); }
.ais-card__lead, .ais-card__sum { font: 400 13px/20px var(--font); color: var(--type-secondary); min-width: 0; }
.ais-card__sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ais-card:not(.is-open) .ais-card__lead, .ais-card.is-open .ais-card__sum { display: none; }
.ais-card__p { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows var(--m-base) var(--m-ease), opacity var(--m-base) var(--m-ease), visibility 0s var(--m-base); }
.ais-card.is-open .ais-card__p { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition: grid-template-rows var(--m-base) var(--m-ease), opacity var(--m-base) var(--m-ease), visibility 0s; }
.ais-card__i { min-height: 0; overflow: hidden; border-radius: 0 0 var(--radius-12) var(--radius-12); }
.ais-card.is-open.is-settled .ais-card__i { overflow: visible; }
.ais-card__bd { display: grid; gap: 20px; min-width: 0; padding: 20px; }
.ais-card--tint > .ais-card__h { background: var(--neutral-50); border-radius: var(--radius-12) var(--radius-12) 0 0; }
.ais-card--tint:not(.is-open) > .ais-card__h { border-radius: var(--radius-12); }
.ais-card--tint .ais-card__b:hover { background: var(--neutral-75); }

/* ---- ais-grp: field groups inside a section, split by hairlines (note 16) ---- */
.ais-grp { display: grid; gap: 12px; min-width: 0; align-content: start; }
.ais-grp + .ais-grp { padding-top: 20px; border-top: 1px solid var(--stroke-tertiary); }
.ais-grp__t { display: grid; gap: 2px; }
.ais-grp__t > b { font: 500 14px/20px var(--font); color: var(--type-primary); }
.ais-grp__t > span { font: 400 13px/20px var(--font); color: var(--type-secondary); }
.ais-grp--dep { padding: 16px; border-radius: var(--radius-12); background: var(--neutral-25); }
.ais-grp--dep + .ais-grp, .ais-grp + .ais-grp--dep { border-top: 0; padding-top: 16px; }
/* r9: no highlight flash when a dependent group changes (is-flash is now a no-op) */
.ais-grp--dep.is-flash { animation: none; }

/* ---- ais-tile: modern choice tile (note 13): borderless soft canvas, index + title + description under it, selected = 2px orange ring + check ---- */
.ais-tiles { display: grid; gap: 20px 16px; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.ais-tiles--2 { --cols: 2; max-width: 480px; }
.ais-tile { position: relative; display: grid; gap: 10px; align-content: start; min-width: 0; cursor: pointer; }
.ais-tile__in { position: absolute; z-index: 2; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ais-tile__cv { position: relative; display: grid; place-items: center; height: 112px; overflow: hidden; border-radius: var(--radius-16); background: var(--neutral-75); color: var(--type-secondary); transition: box-shadow var(--m-fast) var(--m-ease), background-color var(--m-fast) var(--m-ease); }
.ais-tile:hover .ais-tile__cv { background: var(--neutral-50); }
.ais-tile.is-on .ais-tile__cv { box-shadow: 0 0 0 2px var(--brand-100); }
.ais-tile:has(.ais-tile__in:focus-visible) .ais-tile__cv { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 3px; }
.ais-tile__k { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--brand-100); color: #fff; font-size: 10px; opacity: 0; transform: scale(.6); transition: opacity var(--m-fast) var(--m-ease), transform var(--m-base) var(--m-ease); }
.ais-tile.is-on .ais-tile__k { opacity: 1; transform: none; }
.ais-tile__m { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 0; align-items: baseline; }
.ais-tile__x { font: 400 12px/20px var(--font); color: var(--type-tertiary); font-variant-numeric: tabular-nums; }
.ais-tile__ti { font: 500 14px/20px var(--font); color: var(--type-primary); }
.ais-tile__d { grid-column: 2; font: 400 13px/20px var(--font); color: var(--type-secondary); }
@media (max-width: 700px) { .ais-tiles { --cols: 2; } }
@media (max-width: 420px) { .ais-tile__cv { height: 96px; } }

/* ---- ais-sw / ais-color: squarish swatches (8 radius, 32px, soft inner border, selected = 2px offset ring + check) and the custom colour popover (DS-GAP: no colour picker) ---- */
.ais-color { position: relative; display: grid; gap: 8px; min-width: 0; }
.ais-color__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 4px; }
.ais-sw { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-8); cursor: pointer; }
.ais-sw__in { position: absolute; z-index: 2; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ais-sw__c { position: absolute; inset: 0; border-radius: var(--radius-8); background: var(--c); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .14); transition: transform var(--m-fast) var(--m-ease); }
.ais-sw::after { content: ''; position: absolute; inset: -4px; border-radius: var(--radius-12); box-shadow: 0 0 0 2px var(--brand-100); opacity: 0; transition: opacity var(--m-fast) var(--m-ease); pointer-events: none; }
.ais-sw.is-on::after { opacity: 1; }
.ais-sw:hover .ais-sw__c { transform: scale(1.06); }
.ais-sw__k { position: relative; z-index: 1; font-size: 12px; color: var(--ck, #fff); opacity: 0; transition: opacity var(--m-fast) var(--m-ease); pointer-events: none; }
.ais-sw.is-on .ais-sw__k { opacity: 1; }
.ais-sw:has(:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 6px; }
.ais-sw--custom { width: auto; min-width: 32px; padding: 0 10px 0 6px; gap: 6px; display: inline-flex; align-items: center; justify-content: center; height: 32px; font: 500 13px/20px var(--font); color: var(--type-primary); border: 0; background: transparent; }
.ais-sw--custom .ais-sw__c { position: static; flex: none; width: 20px; height: 20px; border-radius: var(--radius-4); }
.ais-sw--custom::after { inset: -4px; border-radius: var(--radius-12); }
.ais-sw--custom .ais-sw__k { display: none; }
.ais-sw--custom[aria-expanded="true"]::after { opacity: 1; }
.ais-sw--custom:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 6px; }
.ais-sw--custom.is-empty .ais-sw__c { background: conic-gradient(from 0deg, #f44, #fc4, #4d8, #4af, #a4f, #f44); }
.ais-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: min(288px, calc(100vw - 32px)); box-sizing: border-box; display: grid; gap: 12px; padding: 12px; border-radius: var(--radius-12); background: var(--surface-screen); box-shadow: 0 0 0 1px var(--stroke-tertiary), 0 16px 36px -10px rgba(16, 24, 40, .3); animation: aisIn var(--m-base) var(--m-ease); }
.ais-pop[hidden] { display: none; }
.ais-pop__sv { position: relative; height: 150px; border-radius: var(--radius-8); background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, hsl(var(--h, 20), 100%, 50%)); touch-action: none; cursor: crosshair; }
.ais-pop__sv:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; }
.ais-pop__kn { position: absolute; left: calc(var(--s, 1) * 100%); top: calc((1 - var(--v, 1)) * 100%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: var(--radius-full); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .4); pointer-events: none; }
.ais-pop__hue { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 0; border-radius: var(--radius-full); background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); cursor: pointer; }
.ais-pop__hue::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: var(--radius-full); background: #fff; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .45); border: 0; }
.ais-pop__hue::-moz-range-thumb { width: 14px; height: 14px; border-radius: var(--radius-full); background: #fff; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .45); border: 0; }
.ais-pop__hue:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 3px; }
.ais-pop__pr { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.ais-pop__p { position: relative; aspect-ratio: 1; width: 100%; padding: 0; border: 0; border-radius: var(--radius-4); background: var(--c); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .14); cursor: pointer; }
.ais-pop__p:hover { transform: scale(1.1); }
.ais-pop__p:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; }
.ais-pop__hx { display: flex; align-items: center; gap: 8px; }
.ais-pop__hx .ais-pop__sw { flex: none; width: 28px; height: 28px; border-radius: var(--radius-4); background: var(--c, transparent); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .14); }
.ais-pop__hx .inp { flex: 1; min-width: 0; width: auto; }
.ais-pop__er { margin: 0; font: 400 13px/18px var(--font); color: var(--action-error); }
.ais-pop__er[hidden] { display: none; }

/* ---- ais-rows: list box rows with an icon tile (note 3: tiles use FA solid) ---- */
.ais-rows { list-style: none; margin: 0; padding: 0; background: var(--surface-screen); border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); }
.ais-row { display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 64px; min-width: 0; }
.ais-row + .ais-row, .ais-rows > .ais-tv + .ais-tv { border-top: 1px solid var(--stroke-tertiary); }
.ais-row__x, .ais-row__s { flex: none; display: inline-flex; align-items: center; }
.ais-rt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.ais-rt > b { font: 500 14px/20px var(--font); color: var(--type-primary); }
.ais-rt > span { font: 400 13px/20px var(--font); color: var(--type-secondary); }

/* ---- ais-tv: toggle with value. Title + description left, switch right; when on, a compact inline sentence ("Pause for [30] days") (note 20) ---- */
.ais-tv { display: grid; gap: 10px; padding: 12px 16px; min-width: 0; }
.ais-tv__top { display: flex; align-items: center; gap: 16px; }
.ais-tv__top .ais-rt { flex: 1; }
.ais-tv:not(.is-on) { gap: 0; }
.ais-tv:not(.is-on) .ais-tv__v { display: none; }
.ais-tv.is-on .ais-tv__s { animation: aisIn var(--m-base) var(--m-ease); }
.ais-tv__s { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 2px; font: 400 14px/20px var(--font); color: var(--type-primary); }
.ais-tv__s .inp { width: 72px; flex: none; text-align: center; }
.ais-tv__s .ais-tv__u { color: var(--type-secondary); }

/* ---- ais-tabs: a mode picker = the DS segmented control (joined bordered segments, selected white with brand text) + a one-line description + a panel that reveals per segment (notes 6, 18, 19, 21) ---- */
.ais-tabs { display: grid; gap: 12px; min-width: 0; justify-items: start; }
.ais-tabs > * { max-width: 100%; }
.ais-seg { max-width: 100%; }
.ais-seg > label { flex: 0 1 auto; }
.ais-seg .seg-in { height: auto; min-height: 36px; padding: 8px 16px; text-align: center; white-space: normal; }
.ais-tabs__d { margin: 0; font: 400 13px/20px var(--font); color: var(--type-secondary); }
.ais-tabs__d[hidden], .ais-tabs__p[hidden] { display: none; }
.ais-tabs__p { display: grid; gap: 12px; min-width: 0; width: 100%; animation: aisIn var(--m-base) var(--m-ease); }
@keyframes aisIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .ais-seg { display: flex; flex-direction: column; width: 100%; } .ais-seg > label { border-inline-start: 0; border-top: 1px solid var(--stroke-secondary); } .ais-seg > label:first-of-type { border-top: 0; } .ais-seg .seg-in { justify-content: flex-start; text-align: left; } }

/* ---- ais-rules: rule builder (note 22): header row, aligned columns, icon-only delete ---- */
.ais-rules { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.ais-rules__box { width: 100%; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); background: var(--surface-screen); }
.ais-rules__h, .ais-rules__r { display: grid; grid-template-columns: 120px 140px minmax(0, 1fr) 32px; gap: 8px; align-items: center; padding: 8px 12px; }
.ais-rules__h { padding-block: 8px; background: var(--neutral-25); border-radius: var(--radius-8) var(--radius-8) 0 0; border-bottom: 1px solid var(--stroke-tertiary); font: 500 12px/16px var(--font); color: var(--type-secondary); }
.ais-rules__r + .ais-rules__r { border-top: 1px solid var(--stroke-tertiary); }
.ais-rules .ds-select { width: 100%; min-width: 0; }
.ais-rules .inp { width: 100%; min-width: 0; max-width: none; }
.ais-rules__e { margin: 0; padding: 16px 12px; font: 400 13px/20px var(--font); color: var(--type-secondary); }
@media (max-width: 640px) {
  .ais-rules__h { display: none; }
  .ais-rules__r { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .ais-rules__r > :nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
  .ais-rules__r > :nth-child(4) { grid-column: 3; grid-row: 1; }
}

/* ---- DS-GAP: filled select caret (note 4). The DS select draws the regular chevron; the Ovation selects use the filled caret ---- */
.ds-select .arrow .fa-chevron-down { -webkit-mask-image: var(--fa-caret-s, url(../../04-onboarding/ds/icons/fa/solid/caret-down.svg)); mask-image: var(--fa-caret-s, url(../../04-onboarding/ds/icons/fa/solid/caret-down.svg)); width: .625em; }
.ds-select .arrow { transition: transform var(--m-base) var(--m-ease); }

/* ---- ais-foot: sticky footer bar (note 5: Back = outline neutral, Save and exit = outline WP blue, Continue = solid WP blue) ---- */
.ais-foot { position: sticky; bottom: 0; z-index: 30; margin: auto calc(-1 * var(--ais-px, 40px)) 0; padding: 0 var(--ais-px, 40px); background: var(--surface-screen); border-top: 1px solid var(--stroke-tertiary); box-shadow: 0 -8px 20px -12px rgba(16, 24, 40, .22); }
.ais-foot__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.ais-foot__l, .ais-foot__r { display: flex; align-items: center; gap: 8px; }
.ais-foot__k { font: 400 13px/20px var(--font); color: var(--type-secondary); padding-left: 8px; border-left: 1px solid var(--stroke-tertiary); margin-left: 4px; }
@media (max-width: 640px) { .ais-foot__in { padding: 10px 0; } .ais-foot__k { display: none; } }

/* ---- ais-win: preview frame (note 14), three looks via .ais-pvf--1..3 on the window. Desktop (.ais-win--d) and phone (.ais-win--m). No strokes. ---- */
.ais-win { position: relative; box-sizing: border-box; width: 100%; max-width: 520px; }
.ais-win--m { width: 280px; max-width: 100%; }
.ais-win .ivs-pg { background: var(--surface-screen); }
.ais-win__bar { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; }
.ais-win__dots { display: inline-flex; gap: 6px; flex: none; }
.ais-win__dots i { width: 10px; height: 10px; border-radius: var(--radius-full); display: block; }
.ais-win__url { flex: 1; max-width: 240px; margin: 0 auto; transform: translateX(-23px); display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 22px; border-radius: var(--radius-full); background: var(--surface-screen); font: 400 11px/1 var(--font); color: var(--type-secondary); }
.ais-win__n { display: block; width: 56px; height: 6px; margin: 0 auto; border-radius: var(--radius-full); background: var(--neutral-100); }
.ais-sk { position: absolute; inset: 0; display: grid; align-content: start; gap: 8px; padding: 14px 16px; pointer-events: none; }
.ais-sk i { display: block; height: 8px; border-radius: var(--radius-full); background: var(--neutral-75); }
.ais-sk .n { display: flex; align-items: center; gap: 8px; height: 18px; margin-bottom: 8px; background: none; }
.ais-sk .n b { display: block; height: 8px; width: 16%; border-radius: var(--radius-full); background: var(--neutral-100); opacity: .6; }
.ais-sk .n b:first-child { width: 12%; background: var(--neutral-200); opacity: .5; }
.ais-sk .h1 { height: 14px; width: 62%; margin-top: 6px; background: var(--neutral-100); opacity: .55; }
.ais-sk .h2 { height: 14px; width: 40%; background: var(--neutral-100); opacity: .55; }
.ais-sk .p { width: 78%; } .ais-sk .p2 { width: 56%; }
.ais-sk .b { height: 20px; width: 22%; margin-top: 6px; border-radius: var(--radius-full); background: var(--neutral-100); opacity: .55; }
/* 1 grey window */
.ais-pvf--1.ais-win--d { padding: 0 8px 8px; border-radius: var(--radius-12); background: var(--neutral-75); }
.ais-pvf--1.ais-win--d .ivs-pg { border-radius: var(--radius-8); }
.ais-pvf--1.ais-win--m { padding: 10px 8px 8px; border-radius: var(--radius-24); background: var(--neutral-75); }
.ais-pvf--1.ais-win--m .ivs-pg { border-radius: var(--radius-16); }
.ais-pvf--1 .ais-sk, .ais-pvf--3 .ais-sk { display: none; }
/* 2 flat stage */
.ais-pvf--2 { background: var(--neutral-75); border-radius: var(--radius-12); overflow: hidden; }
.ais-pvf--2.ais-win--m { border-radius: var(--radius-24); }
.ais-pvf--2 .ais-win__bar { display: none; }
.ais-pvf--2 .ivs-pg { background: transparent; }
/* 3 device silhouette */
.ais-pvf--3.ais-win--d { padding: 8px 8px 12px; border-radius: var(--radius-16); background: var(--neutral-600); box-shadow: 0 18px 36px -16px rgba(16, 24, 40, .45); }
.ais-pvf--3.ais-win--d .ais-win__bar { height: 12px; justify-content: center; padding: 0; }
.ais-pvf--3.ais-win--d .ais-win__bar > * { display: none; }
.ais-pvf--3.ais-win--d .ais-win__bar::after { content: ''; width: 4px; height: 4px; border-radius: var(--radius-full); background: var(--neutral-300); }
.ais-pvf--3.ais-win--d .ivs-pg { background: var(--neutral-50); border-radius: var(--radius-4); }
.ais-pvf--3.ais-win--m { padding: 8px; border-radius: var(--radius-24); background: var(--neutral-600); box-shadow: 0 18px 36px -16px rgba(16, 24, 40, .45); }
.ais-pvf--3.ais-win--m .ais-win__bar { height: 10px; margin-bottom: 4px; align-items: center; }
.ais-pvf--3.ais-win--m .ais-win__n { background: var(--neutral-300); width: 48px; height: 5px; }
.ais-pvf--3.ais-win--m .ivs-pg { background: var(--neutral-50); border-radius: var(--radius-16); }

/* ---- ais-play: the small attention-effect preview note ---- */
.ais-fxn { margin: 0; font: 400 13px/20px var(--font); color: var(--type-secondary); }
.ais-fxn[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ais-card__p, .ais-card__h, .ais-tile__cv, .ais-tile__k, .ais-sw__c, .ais-sw::after, .ais-strip__bar b { transition: none; }
  .ais-pop, .ais-tabs__p, .ais-grp--dep.is-flash, .ais-tv.is-on .ais-tv__s { animation: none; }
}

/* ======== round 7 ======== */
/* list-row icon tiles = the DS .icotile (sm); on = light orange (DS default), off = the Settings grey combo */
.ais-it > .fa { font-size: 16px; }
.ais-it.is-off { background: var(--neutral-50); color: var(--neutral-600); box-shadow: inset 0 0 0 1px var(--neutral-75); }
.ais-it, .ais-it.is-off { transition: background-color var(--m-base) var(--m-ease), color var(--m-base) var(--m-ease); }
/* DS-GAP: square 32px icon-only button, light grey 1px outline, 2px radius (the attention preview) */
.ais-iconbtn { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--stroke-secondary); border-radius: var(--radius-2); background: var(--surface-screen); color: var(--neutral-600); cursor: pointer; transition: border-color var(--m-fast) var(--m-ease), color var(--m-fast) var(--m-ease), background-color var(--m-fast) var(--m-ease); }
.ais-iconbtn:hover { border-color: var(--brand-100); color: var(--brand-300); }
.ais-iconbtn:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; }
.ais-iconbtn .fa { font-size: 12px; }
/* footer gate message */
.ais-foot__g { flex: 1; min-width: 0; margin: 0; text-align: right; font: 400 13px/20px var(--font); color: var(--type-secondary); }
@media (max-width: 760px) { .ais-foot__g { display: none; } }
/* a wide tile row (ais-tiles--2 without the 480px cap) */
.ais-tiles--wide { max-width: none; }
/* selects open upward near the bottom of the viewport */
.ds-select.is-up [role=listbox] { inset-block-start: auto; inset-block-end: 100%; }
.ds-select.is-up[data-expanded=true] [role=combobox] { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
/* swatch names: hidden for squares, shown on cards */
.ais-sw__n { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.ais-sw--custom .ais-sw__n { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
/* colour picker design 2: palette cards (Theme Builder brand colours) */
.ais-color--cards .ais-color__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; padding: 4px; }
.ais-color--cards .ais-sw, .ais-color--cards .ais-sw--custom { display: grid; gap: 8px; width: auto; height: auto; padding: 10px; justify-items: stretch; border-radius: var(--radius-8); background: var(--surface-screen); box-shadow: inset 0 0 0 1px var(--stroke-tertiary); }
.ais-color--cards .ais-sw::after { inset: 0; border-radius: var(--radius-8); box-shadow: inset 0 0 0 2px var(--brand-100); }
.ais-color--cards .ais-sw__c, .ais-color--cards .ais-sw--custom .ais-sw__c { position: static; width: auto; height: 40px; border-radius: var(--radius-4); }
.ais-color--cards .ais-sw__n { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; font: 500 13px/20px var(--font); color: var(--type-primary); text-align: left; }
.ais-color--cards .ais-sw__k { position: absolute; top: 16px; right: 16px; z-index: 2; }
.ais-color--cards .ais-sw--custom { font: inherit; }
/* colour picker design 4: one colour button (swatch + name) that opens the popover */
.ais-color--button .ais-sw:not(.ais-sw--custom) { display: none; }
.ais-color--button .ais-sw--custom { height: 36px; padding: 0 12px 0 8px; border-radius: var(--radius-4); box-shadow: inset 0 0 0 1px var(--stroke-secondary); background: var(--surface-screen); }
.ais-color--button .ais-sw--custom .ais-sw__c { background: var(--c); }
.ais-color--button .ais-sw--custom.is-empty .ais-sw__c { background: var(--c, #9C4E0E); }
.ais-color--button .ais-sw--custom::after { inset: 0; border-radius: var(--radius-4); box-shadow: inset 0 0 0 2px var(--brand-100); }
/* colour picker design 5: compact row of small squares */
.ais-color--row .ais-color__row { gap: 8px; padding: 2px; }
.ais-color--row .ais-sw:not(.ais-sw--custom) { width: 24px; height: 24px; border-radius: var(--radius-4); }
.ais-color--row .ais-sw__c { border-radius: var(--radius-4); }
.ais-color--row .ais-sw::after { inset: -3px; border-radius: var(--radius-8); }
.ais-color--row .ais-sw__k { font-size: 10px; }
.ais-color--row .ais-sw--custom { height: 24px; padding: 0 8px 0 4px; font-size: 12px; }
.ais-color--row .ais-sw--custom .ais-sw__c { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .ais-iconbtn, .ais-it { transition: none; } }

.ais-color--button .ais-sw--custom.is-empty .ais-sw__c { background: var(--c); }
.ais-color--button .ais-sw--custom .ais-sw__c { border-radius: var(--radius-4); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .14); }

/* ======== round 8 (2026-11-16, BRIEF-r8): the Leads grammar. Everything below is generic: finder-next can adopt it. ======== */

/* select menus that open upward: a full 1px border all round, top corners rounded, a soft shadow (note 1). Downward menus get the same shadow. */
.ds-select [role=listbox] { box-shadow: 0 10px 20px -10px rgba(16, 24, 40, .22); }
.ds-select.is-up [role=listbox] { inset-block-start: auto; inset-block-end: calc(100% - 1px); border: 1px solid var(--stroke-secondary); border-radius: var(--radius-sm) var(--radius-sm) 0 0; box-shadow: 0 -10px 20px -10px rgba(16, 24, 40, .22); }
.ds-select.is-up[data-expanded=true] [role=combobox] { border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); }

/* section card, Leads style: a tinted header strip with a small icon chip + title (DS-GAP: header icon chip). Pass icon:'name', tint:'brand'. */
/* 2026-11-16 Rijul: no header icons on section cards */
.ais-card__ic { display: none !important; }
/* 2026-11-16 Rijul: no tinted header strip. brand cards keep the approved section-card look (white header + hairline), only the icon chip is added, styled like the Phase 1 Settings section icotile. */
.ais-card--brand > .ais-card__h, .ais-card--brand.ais-card--tint > .ais-card__h { background: transparent; }
.ais-card--brand .ais-card__b:hover { background: var(--neutral-25); }
.ais-card--brand .ais-card__lead, .ais-card--brand .ais-card__sum { color: var(--type-secondary); }
.ais-card--brand.is-open > .ais-card__h { border-bottom-color: var(--stroke-tertiary); }
.ais-card--brand .set-collapse.icon-only { background: transparent; }
.ais-card--brand .ais-card__b:hover .set-collapse.icon-only { background: var(--surface-screen); }

/* card tile (note 5): ONE style for every visual choice: a bordered card, a canvas on top, the title under it inside the card.
   Opt in with tile({ card:true }) and tiles(label, html, cols, { card:true }). Orange border on hover = 1px, selected = 1px + 1.5px inside (2.5px, was 3px). */
.ais-tiles--card { max-width: none; gap: 12px; }
.ais-tiles--card.ais-tiles--2 { max-width: 480px; }
.ais-tile--card { gap: 10px; padding: 8px 8px 12px; border: 1px solid var(--stroke-tertiary); border-radius: var(--radius-8); background: var(--surface-screen); transition: border-color var(--m-fast) var(--m-ease), box-shadow var(--m-fast) var(--m-ease); }
.ais-tile--card:hover { border-color: var(--brand-100); }
.ais-tile--card.is-on { border-color: var(--brand-100); box-shadow: inset 0 0 0 1.5px var(--brand-100); }
.ais-tile--card .ais-tile__cv { height: 88px; border-radius: var(--radius-4); box-shadow: none; }
.ais-tile--card.is-on .ais-tile__cv { box-shadow: none; }
.ais-tile--card:hover .ais-tile__cv { background: var(--neutral-75); }
.ais-tile--card:has(.ais-tile__in:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; }
.ais-tile--card:has(.ais-tile__in:focus-visible) .ais-tile__cv { outline: 0; }
.ais-tile--card .ais-tile__k { top: 6px; right: 6px; }
.ais-tile--card .ais-tile__m { display: block; padding: 0 4px; }
.ais-tile--card .ais-tile__x, .ais-tile--card .ais-tile__d { display: none; }

/* row grammar (Leads display rules): toggle left of the title, grey description under it, the value control at the far right */
.ais-sets { display: grid; min-width: 0; }
.ais-set { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 20px 0; min-width: 0; }
.ais-set:first-child { padding-top: 0; }
.ais-set:last-child { padding-bottom: 0; }
.ais-set + .ais-set { border-top: 1px solid var(--stroke-tertiary); }
.ais-set__t { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.ais-set__h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ais-set__h b { font: 500 14px/20px var(--font); color: var(--type-primary); }
.ais-set__d { margin: 0; font: 400 13px/20px var(--font); color: var(--type-secondary); }
.ais-set__c { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; max-width: 100%; margin-left: auto; }
.ais-set__x { flex: 1 0 100%; }
.ais-set.is-off .ais-set__h b { color: var(--type-secondary); }
/* OR separator (Leads): a short line, OR, a long line */
.ais-or { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; }
.ais-or i { display: block; height: 0; border-top: 1px solid var(--stroke-tertiary); }
.ais-or i:first-child { width: 34px; }
.ais-or i:last-child { flex: 1; }
.ais-or span { font: 500 12px/20px var(--font); color: var(--type-tertiary); letter-spacing: .02em; }
.ais-or + .ais-set, .ais-set + .ais-or { border-top: 0; }
/* inset note row: a nested option under its row (DS-GAP: a note row that carries a control) */
.ais-inset { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; padding: 12px 16px; border-radius: var(--radius-8); background: var(--neutral-25); box-shadow: inset 0 0 0 1px var(--stroke-tertiary); animation: aisIn var(--m-base) var(--m-ease); }
.ais-inset__t { display: grid; gap: 0; min-width: 0; }
.ais-inset__t b { font: 500 14px/20px var(--font); color: var(--type-primary); }
.ais-inset__t span { font: 400 13px/20px var(--font); color: var(--type-secondary); }
/* input group with a unit suffix: the DS .inp-act (input + .act). Fixed widths so the units line up */
.ais-ig { width: 150px; flex: none; }
.ais-ig .inp { text-align: left; }
.ais-ig .act { min-width: 0; padding: 0 12px; white-space: nowrap; }
/* inline checkboxes in a row (Show on devices) */
.ais-chks { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ais-chk { display: inline-flex; align-items: center; gap: 10px; font: 400 14px/20px var(--font); color: var(--type-secondary); cursor: pointer; }
.ais-chk:has(input:checked) { color: var(--type-primary); font-weight: 500; }
/* compact colour swatches (28px) for dense rows */
.ais-color--sm .ais-color__row { gap: 10px; padding: 2px; }
.ais-color--sm .ais-sw:not(.ais-sw--custom) { width: 28px; height: 28px; border-radius: var(--radius-4); }
.ais-color--sm .ais-sw__c { border-radius: var(--radius-4); }
.ais-color--sm .ais-sw::after { inset: -3px; border-radius: var(--radius-8); box-shadow: 0 0 0 1.5px var(--brand-100); }
.ais-color--sm .ais-sw__k { font-size: 11px; }
.ais-color--sm .ais-sw--custom { height: 28px; padding: 0 8px 0 4px; font-size: 13px; }
.ais-color--sm .ais-sw--custom .ais-sw__c { width: 20px; height: 20px; }
.ais-color--sm .ais-pop { left: auto; right: 0; }
@media (max-width: 640px) {
  .ais-set { flex-direction: column; align-items: stretch; }
  .ais-set__t { flex: 0 0 auto; }
  .ais-set__c { justify-content: flex-start; margin-left: 0; flex-wrap: wrap; }
  .ais-or i:first-child { width: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ais-tile--card, .ais-inset { transition: none; animation: none; } }
/* input group: the input keeps a fixed width, the unit sizes to its text (never clipped) */
.ais-ig { width: auto !important; max-width: 100%; }
.ais-ig .inp { flex: none; width: 76px; }
.ais-set__t { flex: 1 1 220px; }
@media (max-width: 640px) { .ais-set__t { flex: 0 0 auto; } .ais-ig { max-width: 100%; } }
.ais-set__x { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .ais-set__x { flex: 0 0 auto; width: 100%; } }

/* ================= Round 9 (2026-11-16): additive, backward compatible ================= */
/* R2: a card with one action in its header (AISH.card({head}) and AISH.tabs({card})). The header is not a button, there is no caret. */
.ais-card__b--slot { cursor: default; flex-wrap: wrap; row-gap: 12px; }
.ais-card__b--slot:hover, .ais-card--brand .ais-card__b--slot:hover, .ais-card--tint .ais-card__b--slot:hover { background: transparent; }
.ais-card--head > .ais-card__h { border-radius: var(--radius-12); }
.ais-card--head.is-open > .ais-card__h { border-radius: var(--radius-12) var(--radius-12) 0 0; }
.ais-card.ais-card--head .ais-card__lead { display: block; }
.ais-card--head .ais-card__lead [hidden] { display: none; }
.ais-card__x { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; max-width: 100%; margin-left: auto; }
.ais-card--head .ais-card__t { flex: 1 1 220px; }
.ais-card--head .ais-seg { max-width: 100%; }
.ais-card--head .ais-seg .seg-in { white-space: nowrap; }
/* R1: a toggle that reveals nothing sits at the far right (set --togr) */
.ais-set--togr .ais-set__c { gap: 0; }
/* R3: tab row = description at the left, segmented control at the far right, then a divider and the panel */
.ais-tabs--row { gap: 0; justify-items: stretch; }
.ais-tabs__r { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ais-tabs__ds { flex: 1 1 220px; min-width: 0; }
.ais-tabs__r > .ais-seg { flex: none; margin-left: auto; }
.ais-tabs--row > .ais-tabs__p { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--stroke-tertiary); }
.ais-tabs--row .ais-tabs__p > .ais-sets .ais-set:first-child { padding-top: 16px; }
/* auto-width input (hugs its text, set by AISH.fitAuto) */
.inp.ais-auto { box-sizing: border-box; min-width: 0; }
/* progress (loading state): DS-GAP, the Phase 1 build card. Progress bar and spinner are not in the DS. */
.ais-prog { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.ais-prog__disc { position: relative; width: 72px; height: 72px; margin: 0 0 20px; isolation: isolate; }
.ais-prog__disc::before { content: ""; position: absolute; inset: -8px; z-index: -1; border-radius: var(--radius-full); background: radial-gradient(circle, rgba(250, 136, 49, .25) 0, rgba(250, 136, 49, .12) 35%, rgba(250, 136, 49, 0) 70%); animation: aisGlow 2.4s ease-in-out infinite; }
.ais-prog__svg { position: relative; display: block; width: 72px; height: 72px; animation: aisBreathe 2.4s ease-in-out infinite; }
.ais-sp { transform-box: fill-box; transform-origin: center; animation: aisSpark 1.8s ease-in-out infinite; }
.ais-sp.sp-sm1 { animation-delay: .3s; } .ais-sp.sp-sm2 { animation-delay: .9s; }
.ais-prog__disc i { position: absolute; width: 4px; height: 4px; border-radius: var(--radius-full); background: var(--brand-100); opacity: .7; animation: aisTwinkle 1.6s ease-in-out infinite; }
.ais-prog__disc i:nth-of-type(1) { top: -8px; left: 4px; } .ais-prog__disc i:nth-of-type(2) { top: -6px; left: 69px; width: 3px; height: 3px; animation-delay: .4s; }
.ais-prog__disc i:nth-of-type(3) { top: 71px; left: 8px; width: 5px; height: 5px; animation-delay: .8s; } .ais-prog__disc i:nth-of-type(4) { top: 71px; left: 65px; width: 3px; height: 3px; animation-delay: 1.2s; }
.ais-prog .ais-prog__t { margin: 0; font: var(--heading-lg); color: var(--type-primary); outline: none; }
.ais-prog .ais-prog__l, .tpldialog .ais-prog .ais-prog__l { margin: 4px 0 24px; font: var(--body-md); color: var(--type-secondary); }
.ais-prog__bar { height: 4px; margin: 0 0 20px; border-radius: var(--radius-4); background: var(--neutral-75); overflow: hidden; }
.ais-prog__bar span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; border-radius: inherit; background: linear-gradient(90deg, var(--brand-100), var(--brand-50, #FDB57A)); transition: transform 400ms var(--m-ease); }
.ais-prog__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ais-prog__row { display: flex; align-items: center; gap: 8px; min-height: 20px; font: var(--body-md); color: var(--type-tertiary); transition: color var(--m-base) var(--m-ease); }
.ais-prog__row[data-state="working"], .ais-prog__row[data-state="done"] { color: var(--type-primary); }
.ais-prog__row > .stepnum, .ais-prog__row > .ais-prog__spin { flex: none; width: 20px; height: 20px; box-sizing: border-box; display: inline-grid; place-items: center; }
.ais-prog__row > [hidden] { display: none; }
.ais-prog__row .stepnum svg { width: 10px; height: 10px; }
.ais-prog__row[data-state="pending"] .stepnum { background: var(--surface-overlay-2, #EAEFEF); border: .9px solid rgba(205, 211, 216, .3); }
.ais-prog__spin { color: var(--brand-100); }
.ais-prog__spinner { width: 18px; height: 18px; animation: aisDash 1s steps(8) infinite; }
.ais-prog .ais-prog__go { margin: 24px 0 0; }
.ais-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes aisBreathe { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.06) rotate(-4deg); } }
@keyframes aisGlow { 0%, 100% { opacity: .6; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes aisTwinkle { 0%, 100% { opacity: .2; transform: scale(.6) translateY(0); } 50% { opacity: 1; transform: scale(1.3) translateY(-3px); } }
@keyframes aisSpark { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 40% { transform: scale(.7) rotate(-20deg); opacity: .6; } 70% { transform: scale(1.15) rotate(10deg); opacity: 1; } }
@keyframes aisDash { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ais-prog__disc::before, .ais-prog__svg, .ais-sp, .ais-prog__disc i, .ais-prog__spinner { animation: none; } .ais-prog__bar span { transition: none; } }
@media (max-width: 640px) {
  .ais-card__b--slot { padding: 16px; }
  .ais-card__x { flex: 1 0 100%; justify-content: flex-start; margin-left: 0; }
  .ais-card--head .ais-seg { width: 100%; } .ais-card--head .ais-seg > label { flex: 1 1 auto; } .ais-card--head .ais-seg .seg-in { white-space: normal; padding-inline: 10px; }
  .ais-tabs__r > .ais-seg { width: 100%; margin-left: 0; } .ais-tabs__r > .ais-seg > label { flex: 1 1 auto; } .ais-tabs__r > .ais-seg .seg-in { white-space: normal; padding-inline: 10px; }
}

/* ===== round 10 ===== */
/* DS-GAP: the DS banner has only warning and danger variants. .ais-bn is the neutral info banner (grey fill, brand tile), the same .ds-banner anatomy: tile + message. Rounded 8 because it sits inside a card body. */
.ds-banner.ais-bn { --bn-tile: var(--brand-100); --bn-glyph: var(--type-on-surface, #fff); background: var(--neutral-25); border-radius: var(--radius-8); min-height: 0; padding: 12px 16px; align-items: flex-start; }
.ds-banner.ais-bn .tile { width: 24px; height: 24px; color: #fff; }
.ds-banner.ais-bn .msg { font: 400 14px/24px var(--font); color: var(--type-primary); }
.ds-banner.ais-bn .msg b { font-weight: 500; }
/* toggles at the far right when the sub-state opens below (AISH.cfg.togRight) */
.ais-set--togr .ais-set__c { gap: 16px; }
.ais-inset--r { justify-content: space-between; }
.ais-inset--r .ais-inset__t { flex: 1 1 auto; }
.ais-inset--r > .tog { flex: none; }
@media (max-width: 640px) { .ais-set--togr:not(:has(.ais-ig, .ds-select, .ivs-f)) { flex-direction: row; align-items: center; } .ais-set--togr:not(:has(.ais-ig, .ds-select, .ivs-f)) .ais-set__t { flex: 1 1 0; } .ais-set--togr:not(:has(.ais-ig, .ds-select, .ivs-f)) .ais-set__c { margin-left: auto; flex-wrap: nowrap; } }
/* tab row with a field label (label UI: 14/20 Medium) and optional help text under the row */
.ais-tabs__lb { flex: 1 1 220px; min-width: 0; font: 500 14px/20px var(--font); color: var(--type-primary); }
.ais-tabs__hp { margin-top: 8px; }
.ais-tabs__hp .ais-tabs__d { margin: 0; }
.ais-tabs--row > .ais-tabs__hp + .ais-tabs__p { margin-top: 16px; }
.ais-tabs__ll { display: block; }
/* grey tag with a lock for "Not used" (DS neutral chip) */
.chip.grey.ais-lockchip { gap: 4px; }
/* attention effect preview: orange-filled square icon button (brand-100, white glyph, radius 2, 32px) */
.ais-iconbtn--fx { background: var(--brand-100); border-color: var(--brand-100); color: #fff; }
.ais-iconbtn--fx:hover { background: var(--brand-200); border-color: var(--brand-200); color: #fff; }
.ais-svgi{flex:none}
/* r10b: lockTag = DS .chip (grey default) with a 12px lock, 4px gap */
.chip.ais-lock { gap: 4px; }
/* 2026-11-16: AISH.banner renders the DS neutral note; the action sits at the right */
.ds-note.ais-note { width: 100%; box-sizing: border-box; }
.ds-note.ais-note .ais-note__act { flex: none; margin-left: auto; }
/* 2026-11-16 Rijul: list-row icon tiles 2px larger (32 to 34), icon stays 16px */
.icotile.ais-it { --icotile-size: 34px; width: 34px; height: 34px; }
.icotile.ais-it > .fa, .icotile.ais-it > svg { font-size: 16px; }
/* 2026-11-16 Rijul: list-row icon tiles are always the grey combo, on or off */
.icotile.ais-it, .icotile.ais-it.is-off { background: var(--neutral-50); color: var(--neutral-600); box-shadow: inset 0 0 0 1px var(--neutral-75); }
