/* Shared form recipe approved by Adir 2026-10-23. All colors derive from house tokens. */
.cxp-form-system { --form-ink:var(--portal-heading,var(--foreground)); --form-muted:var(--portal-muted,var(--muted-foreground)); --form-border:var(--portal-border,var(--border)); --form-surface:var(--portal-surface,var(--background)); max-width:68rem; color:var(--form-ink); }
.cxp-form-system .cxp-form-icon { width:1.15rem; height:1.15rem; flex:none; stroke-width:1.7; }
.cxp-form-system .cxp-form-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1.25rem; }
.cxp-form-system .cxp-form-header h1 { margin:0; font-size:1.75rem; line-height:1.25; font-weight:700; color:var(--form-ink); }
.cxp-form-system .cxp-form-header p { margin:.25rem 0 0; font-size:.875rem; color:var(--form-muted); }
.cxp-form-system .cxp-form-identity { display:flex; align-items:center; gap:.7rem; max-width:23rem; padding:.65rem .8rem; border:1px solid var(--form-border); border-radius:.7rem; background:var(--form-surface); font-size:.875rem; }
.cxp-form-system .cxp-form-identity > .cxp-form-icon { width:2rem; height:2rem; padding:.3rem; border-radius:50%; background:color-mix(in srgb,var(--color-blue-500) 12%,transparent); color:var(--color-blue-600); }
.cxp-form-system .cxp-form-identity > span { min-width:0; overflow-wrap:anywhere; }
.cxp-form-system .cxp-form-tabs { display:flex; gap:1rem; border-bottom:1px solid var(--form-border); margin-bottom:1.25rem; }
.cxp-form-system .cxp-form-tab { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; padding:.65rem .75rem; min-height:44px; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--form-ink); font-size:.875rem; cursor:pointer; }
.cxp-form-system .cxp-form-tab[aria-selected="true"] { border-color:var(--color-pink-500); color:color-mix(in srgb,var(--color-pink-500) 78%,var(--form-ink)); font-weight:600; }
.cxp-form-system .cxp-form-tab:hover { background:color-mix(in srgb,var(--color-blue-500) 5%,transparent); }
.cxp-form-system :is(button,a,input,textarea,select):focus-visible { outline:2px solid var(--portal-primary,var(--primary)); outline-offset:3px; }
.cxp-form-system .cxp-form-stack { display:grid; gap:1rem; }
.cxp-form-system .cxp-form-section { --form-tone:var(--color-blue-500); border:1px solid var(--form-border); border-radius:.75rem; padding:3px; background:var(--form-surface); box-shadow:0 2px 9px color-mix(in srgb,var(--color-blue-500) 5%,transparent); min-width:0; }
.cxp-form-system .cxp-form-section[data-tone="pink"] { --form-tone:var(--color-pink-500); }
.cxp-form-system .cxp-form-section[data-tone="mint"] { --form-tone:var(--color-emerald-500); }
.cxp-form-system .cxp-form-section[data-tone="amber"] { --form-tone:var(--color-amber-500); }
.cxp-form-system .cxp-form-section[data-tone="violet"] { --form-tone:var(--color-violet-500); }
/* Business Profile: one brand family, pink to purple, light to dark down the page. */
.cxp-form-system .cxp-form-section[data-tone="brand-1"] { --form-tone:var(--color-pink-500); --form-tint-a:7%; --form-tint-b:4%; }
.cxp-form-system .cxp-form-section[data-tone="brand-2"] { --form-tone:color-mix(in srgb,var(--color-pink-500) 75%,var(--color-indigo-500)); --form-tint-a:11%; --form-tint-b:6%; }
.cxp-form-system .cxp-form-section[data-tone="brand-3"] { --form-tone:color-mix(in srgb,var(--color-pink-500) 50%,var(--color-indigo-500)); --form-tint-a:15%; --form-tint-b:8%; }
.cxp-form-system .cxp-form-section[data-tone="brand-4"] { --form-tone:color-mix(in srgb,var(--color-pink-500) 25%,var(--color-indigo-500)); --form-tint-a:19%; --form-tint-b:10%; }
.cxp-form-system .cxp-form-section[data-tone="brand-5"] { --form-tone:var(--color-indigo-500); --form-tint-a:23%; --form-tint-b:12%; }
.cxp-form-system .cxp-form-section-heading { margin:0; }
.cxp-form-system .cxp-form-section-toggle { display:flex; align-items:center; width:100%; min-height:62px; gap:1rem; padding:.4rem .7rem; border:0; border-radius:.5rem; color:var(--form-ink); background:linear-gradient(100deg,color-mix(in srgb,var(--form-tone) var(--form-tint-a,11%),var(--form-surface)),color-mix(in srgb,var(--form-tone) var(--form-tint-b,6%),var(--form-surface))); text-align:left; cursor:pointer; }
.cxp-form-system .cxp-form-section-symbol { display:grid; place-items:center; width:48px; height:48px; flex:none; border-radius:50%; background:color-mix(in srgb,var(--form-tone) 14%,var(--form-surface)); color:color-mix(in srgb,var(--form-tone) 88%,var(--form-ink)); }
.cxp-form-system .cxp-form-section-symbol svg { width:27px; height:27px; stroke-width:2; }
.cxp-form-system .cxp-form-section-copy { display:grid; gap:.1rem; flex:1; min-width:0; }
.cxp-form-system .cxp-form-section-copy strong { font-size:1.125rem; line-height:1.3; font-weight:700; }
.cxp-form-system .cxp-form-section-copy > span { font-size:.75rem; line-height:1.4; font-weight:400; color:var(--form-muted); }
.cxp-form-system .cxp-form-chevron { width:1rem; height:1rem; transition:transform .15s; }
.cxp-form-system .cxp-form-chevron.is-open { transform:rotate(180deg); }
.cxp-form-system .cxp-form-section-body { padding:1.15rem .85rem 1rem; }
.cxp-form-system .cxp-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:1.1rem 1.25rem; }
.cxp-form-system .cxp-form-grid-three { display:grid; grid-template-columns:minmax(7rem,.85fr) repeat(2,minmax(0,1fr)); gap:1rem; grid-column:1/-1; }
.cxp-form-system .cxp-form-field { display:grid; align-content:start; gap:.35rem; min-width:0; }
.cxp-form-system .cxp-form-label { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; font-size:.875rem; line-height:1.4; font-weight:600; color:var(--cxs-ink,var(--form-ink)); }
.cxp-form-system .cxp-form-required,.cxp-form-system .cxp-form-error { color:var(--destructive); }
.cxp-form-system .cxp-form-control { position:relative; min-width:0; }
.cxp-form-system .cxp-form-control-icon > .cxp-form-icon { position:absolute; z-index:1; top:13px; left:12px; pointer-events:none; color:var(--form-ink); }
.cxp-form-system .cxp-form-control .kt-input,.cxp-form-system .cxp-form-input { display:block; width:100%; min-width:0; min-height:44px; box-sizing:border-box; border:1px solid var(--form-border); border-radius:.45rem; padding:.6rem .75rem; color:var(--form-ink); background:var(--form-surface); font:inherit; font-size:.875rem; line-height:1.4; }
.cxp-form-system .cxp-form-control-icon .kt-input { padding-left:2.5rem; }
.cxp-form-system .cxp-form-control textarea.kt-input { height:auto; min-height:112px; max-height:24rem; resize:vertical; field-sizing:content; line-height:1.5; }
.cxp-form-system .cxp-form-control input::placeholder,.cxp-form-system textarea::placeholder { color:var(--form-muted); opacity:.8; }
.cxp-form-system .cxp-form-field-short .cxp-form-control { max-width:8rem; }
.cxp-form-system .cxp-form-control:has(input[type="tel"]) { max-width:19rem; }
.cxp-form-system .cxp-form-field-help { display:flex; justify-content:space-between; gap:.5rem; font-size:.75rem; line-height:1.35; }
.cxp-form-system .cxp-form-field-help:empty { display:none; }
.cxp-form-system .cxp-form-counter { margin-left:auto; color:var(--form-muted); font-variant-numeric:tabular-nums; }
.cxp-form-system .cxp-form-hint { color:var(--form-muted); font-size:.75rem; font-weight:400; }
.cxp-form-system .cxp-form-actions { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; padding:.75rem 0; }
.cxp-form-system .cxp-form-actions .kt-btn { min-height:44px; } /* size only: colour, gradient and radius come from the house button (portal-brand-shell.css 2) */
.cxp-form-system .cxp-form-actions-spacer { flex:1; }
.cxp-form-system :disabled { opacity:.65; cursor:not-allowed; }
.cxp-form-system .cxp-form-inline-notice { padding:.75rem 1rem; border:1px solid var(--form-border); border-radius:.5rem; font-size:.8125rem; background:var(--form-surface); }
.cxp-form-system .cxp-form-schedule-trigger { display:flex; align-items:flex-start; gap:.65rem; min-height:70px; width:100%; padding:.65rem .75rem; text-align:left; border:1px solid var(--form-border); border-radius:.45rem; background:var(--form-surface); color:var(--form-ink); cursor:pointer; font-size:.875rem; }
.cxp-form-system .cxp-form-schedule-trigger > span { flex:1; }
.cxp-form-system .cxp-form-city { position:relative; }
.cxp-form-system .cxp-form-city-options { position:absolute; z-index:40; top:100%; left:0; right:0; margin:.25rem 0 0; padding:.25rem; max-height:15rem; overflow:auto; list-style:none; border:1px solid var(--form-border); border-radius:.5rem; background:var(--form-surface); box-shadow:0 8px 20px color-mix(in srgb,var(--form-ink) 12%,transparent); }
.cxp-form-system .cxp-form-city-option { display:flex; flex-direction:column; justify-content:center; min-height:44px; padding:.5rem .65rem; font-size:.875rem; cursor:pointer; border-radius:.3rem; }
.cxp-form-system .cxp-form-city-option[aria-selected="true"] { background:color-mix(in srgb,var(--color-blue-500) 12%,var(--form-surface)); }
.cxp-form-system .cxp-form-city-option small { color:var(--form-muted); font-size:.75rem; }
.cxp-form-system .cxp-form-chips { display:flex; flex-wrap:wrap; gap:.35rem; }
.cxp-form-system .cxp-form-chip { display:inline-flex; align-items:center; gap:.3rem; min-width:0; max-width:100%; padding:0 .5rem 0 .65rem; border:1px solid var(--form-border); border-radius:.45rem; font-size:.8125rem; background:color-mix(in srgb,var(--color-blue-500) 5%,var(--form-surface)); }
.cxp-form-system .cxp-form-chip > span { overflow-wrap:anywhere; }
.cxp-form-system .cxp-form-chip button { display:grid; place-items:center; flex:none; min-width:32px; min-height:44px; border:0; background:none; cursor:pointer; }
.cxp-form-system .cxp-form-dialog { width:min(42rem,calc(100vw - 2rem)); max-height:85vh; overflow:auto; border:1px solid var(--form-border); border-radius:.85rem; padding:1.25rem; background:var(--form-surface); color:var(--form-ink); }
.cxp-form-system .cxp-form-dialog::backdrop { background:color-mix(in srgb,var(--form-ink) 40%,transparent); }
.cxp-form-system .cxp-form-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.cxp-form-system .cxp-form-dialog-head h3 { margin:0; font-size:1.2rem; font-weight:700; }
.cxp-form-system .cxp-form-hours-row { display:grid; grid-template-columns:5.5rem 8rem minmax(0,1fr) minmax(0,1fr); align-items:start; gap:.65rem; padding:.7rem 0; border-bottom:1px solid var(--form-border); }
.cxp-form-system .cxp-form-hours-day { padding-top:.65rem; font-size:.875rem; font-weight:600; }
.cxp-form-system .cxp-form-hours-row label { display:grid; gap:.3rem; min-width:0; font-size:.75rem; }
.cxp-form-system .cxp-form-hours-row .cxp-form-input { padding:.5rem; }
.cxp-form-system .cxp-form-hours-copy { margin:.65rem 0; }
.cxp-form-system .cxp-form-dialog-foot { display:flex; justify-content:flex-end; gap:.6rem; padding-top:1rem; }
@media(max-width:640px) {
 .cxp-form-system .cxp-form-header { flex-direction:column; }
 .cxp-form-system .cxp-form-identity { max-width:100%; }
 .cxp-form-system .cxp-form-tabs { gap:0; }
 .cxp-form-system .cxp-form-tab { flex:1; padding:.65rem .45rem; font-size:.8125rem; gap:.4rem; }
 .cxp-form-system .cxp-form-grid,.cxp-form-system .cxp-form-grid-three { grid-template-columns:minmax(0,1fr); gap:1rem; }
 .cxp-form-system .cxp-form-section-toggle { gap:.6rem; padding:.5rem; }
 .cxp-form-system .cxp-form-section-symbol { width:42px; height:42px; }
 .cxp-form-system .cxp-form-section-copy strong { font-size:1rem; }
 .cxp-form-system .cxp-form-section-body { padding:1rem .75rem; }
 .cxp-form-system .cxp-form-control .kt-input,.cxp-form-system .cxp-form-input { font-size:1rem; }
 .cxp-form-system .cxp-form-actions-spacer { display:none; }
 .cxp-form-system .cxp-form-actions .kt-btn { flex:1 1 auto; justify-content:center; }
 .cxp-form-system .cxp-form-dialog { padding:1rem; }
 .cxp-form-system .cxp-form-hours-row { grid-template-columns:1fr 1fr; gap:.5rem; }
 .cxp-form-system .cxp-form-hours-day { align-self:center; padding:0; }
}
@media(prefers-reduced-motion:reduce) { .cxp-form-system * { transition:none !important; } }

/* Reference body refinements; scoped so existing dashboard and account controls keep their recipe. */
.cxp-form-system .cxp-form-header > div:first-child { min-width:0; flex:1; }
.cxp-form-system .cxp-form-header h1 { color:var(--cxs-ink,var(--form-ink)) !important; }
.cxp-form-system .cxp-form-identity { max-width:17rem; flex:none; gap:.5rem; padding:.5rem .6rem; }
.cxp-form-system .cxp-form-business-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cxp-form-system .cxp-form-status { flex:none; padding:.2rem .4rem; font-size:.75rem; border-radius:1rem; background:color-mix(in srgb,var(--color-emerald-500) 12%,var(--form-surface)); color:color-mix(in srgb,var(--color-emerald-500) 55%,var(--form-ink)); white-space:nowrap; }
.cxp-form-system .cxp-form-status::before { content:'•'; margin-right:.2rem; }
.cxp-form-system .cxp-form-status[data-active="false"] { background:var(--form-border); color:var(--form-muted); }
.cxp-form-system .cxp-form-chip button { min-width:44px; }
@media(max-width:640px) {
 .cxp-form-system .cxp-form-identity { max-width:100%; width:100%; }
 .cxp-form-system .cxp-form-business-name { white-space:normal; }
 .cxp-form-system .cxp-form-tab { white-space:nowrap; padding:.65rem .2rem; gap:.3rem; font-size:.75rem; }
 .cxp-form-system .cxp-form-tab .cxp-form-icon { width:1rem; height:1rem; }
}

.cxp-form-system .cxp-form-dialog-head .kt-btn { min-width:44px; min-height:44px; }

.cxp-form-system .cxp-form-dialog:has(.cxp-form-dialog-scroll) { overflow:hidden; }
.cxp-form-system .cxp-form-dialog-scroll { max-height:calc(85dvh - 10rem); overflow:auto; padding-right:.25rem; overscroll-behavior:contain; }
.cxp-form-system .cxp-form-hours-row label { position:relative; }
.cxp-form-system .cxp-form-select-chevron { position:absolute; right:.65rem; bottom:.9rem; width:.85rem; height:.85rem; pointer-events:none; }
.cxp-form-system select.kt-input,.cxp-form-system select.cxp-form-input { padding-right:2rem; }

.cxp-form-system .cxp-form-section-copy > span,.cxp-form-system .cxp-form-header p { text-wrap:pretty; }

/* Room for long content and clear, accessible field actions. */
.cxp-form-system .cxp-form-control textarea.kt-input[rows="6"] { min-height:160px; }
.cxp-form-system .cxp-form-label-row { display:flex; align-items:center; justify-content:space-between; gap:.5rem; min-height:32px; }
.cxp-form-system .cxp-form-label-row .cxp-form-label { min-width:0; }
.cxp-form-system .cxp-form-field-actions { display:flex; align-items:center; flex:none; gap:.25rem; }
.cxp-form-system :is(.cxp-form-regenerate,.cxp-form-undo) { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; padding:.35rem; border:1px solid var(--form-border); border-radius:.4rem; background:color-mix(in srgb,var(--color-blue-500) 5%,var(--form-surface)); color:var(--portal-primary,var(--primary)); cursor:pointer; }
.cxp-form-system :is(.cxp-form-regenerate,.cxp-form-undo):hover:not(:disabled) { background:color-mix(in srgb,var(--color-blue-500) 12%,var(--form-surface)); border-color:var(--portal-primary,var(--primary)); }
.cxp-form-system .cxp-form-generation-status { color:var(--form-muted); font-size:.75rem; line-height:1.4; }
@media(max-width:640px) {
 .cxp-form-system .cxp-form-label-row { min-height:44px; }
 .cxp-form-system :is(.cxp-form-regenerate,.cxp-form-undo) { width:44px; height:44px; }
}

/* Inner-accordion body (Adir 2026-10-29 reference, built 2026-10-31): compact cards, paired rows share one height,
   expandable text, chips and checked rows. Reusable: x-forms.text-card / chip-list / check-list inside .cxp-form-grid-compact. */
.cxp-form-system .cxp-form-grid-compact { gap:.85rem 1.25rem; align-items:stretch; }
.cxp-form-system .cxp-form-grid-compact > .cxp-form-hint { grid-column:1/-1; margin-top:-.25rem; }
.cxp-form-system .cxp-form-grid-compact .cxp-form-grid-three { align-items:start; }
.cxp-form-system .cxp-form-field-card { grid-template-columns:minmax(0,1fr); grid-template-rows:auto 1fr auto; align-content:stretch; gap:.3rem; }
.cxp-form-system .cxp-form-field-card.is-compact { align-self:start; grid-template-rows:auto auto auto; }
.cxp-form-system .cxp-form-field-card > .cxp-card-box { width:100%; box-sizing:border-box; }
.cxp-form-system .cxp-form-field-card .cxp-form-label-row { min-height:28px; }
.cxp-form-system .cxp-form-field-card .cxp-form-field-help:empty { display:none; }
.cxp-form-system .cxp-card-box { display:flex; flex-direction:column; min-width:0; min-height:9rem; border:1px solid color-mix(in srgb,var(--color-blue-500) 10%,var(--form-border)); border-radius:.6rem; background:color-mix(in srgb,var(--color-blue-500) 3.5%,var(--form-surface)); }
.cxp-form-system .cxp-card-box:focus-within { border-color:var(--color-pink-500); box-shadow:0 0 0 1px var(--color-pink-500); }
.cxp-form-system .cxp-card-box.is-compact { min-height:2.9rem; justify-content:center; }
/* Text card */
.cxp-form-system .cxp-text-card { justify-content:space-between; }
.cxp-form-system .cxp-text-card-input { flex:none; display:block; width:100%; height:calc(4 * 1.5em + .7rem); box-sizing:border-box; padding:.7rem .85rem 0; border:0; border-radius:.6rem .6rem 0 0; background:transparent; color:var(--form-ink); font:inherit; font-size:.875rem; line-height:1.5; resize:none; overflow:auto; field-sizing:fixed; outline:0; }
.cxp-form-system .cxp-text-card.is-open .cxp-text-card-input { height:16rem; }
.cxp-form-system .cxp-text-card-foot { display:flex; align-items:center; justify-content:space-between; gap:.75rem; min-height:2.5rem; padding:0 .85rem; border-top:1px solid var(--form-border); }
.cxp-form-system .cxp-text-card-toggle { display:inline-flex; align-items:center; gap:.45rem; min-height:44px; padding:0; border:0; background:none; color:var(--form-ink); font-size:.8125rem; cursor:pointer; }
.cxp-form-system .cxp-text-card-toggle .cxp-form-icon { width:1rem; height:1rem; color:var(--portal-primary,var(--primary)); }
.cxp-form-system .cxp-text-card-foot .cxp-form-counter { margin-left:0; font-size:.8125rem; }
/* Chips */
.cxp-form-system .cxp-chip-box { padding:.6rem; }
.cxp-form-system .cxp-chip-box.is-compact { padding:.35rem .6rem; }
.cxp-form-system .cxp-chip-list { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; margin:0; padding:0; list-style:none; }
.cxp-form-system .cxp-chip { min-height:34px; padding:0 .25rem 0 .75rem; gap:.15rem; border-radius:999px; font-size:.875rem; background:color-mix(in srgb,var(--color-pink-500) 7%,var(--form-surface)); }
.cxp-form-system .cxp-chip button { position:relative; min-width:28px; min-height:28px; width:28px; height:28px; border-radius:50%; color:var(--form-muted); }
.cxp-form-system .cxp-chip button::after { content:''; position:absolute; inset:-8px; }
.cxp-form-system .cxp-chip button:hover { color:var(--form-ink); }
.cxp-form-system .cxp-chip button .cxp-form-icon { width:.85rem; height:.85rem; }
.cxp-form-system .cxp-chip-add { display:inline-flex; }
.cxp-form-system .cxp-add-button { display:inline-flex; align-items:center; gap:.5rem; min-height:44px; padding:0 1rem; border:1px dashed var(--form-border); border-radius:.6rem; background:var(--form-surface); color:var(--form-ink); font-size:.875rem; cursor:pointer; }
.cxp-form-system .cxp-add-button .cxp-form-icon { color:var(--color-pink-500); }
.cxp-form-system .cxp-add-button:hover { border-color:var(--color-pink-500); }
.cxp-form-system .cxp-chip-input { min-width:12rem; min-height:34px; padding:0 .75rem; border:1px solid var(--color-pink-500); border-radius:999px; background:var(--form-surface); color:var(--form-ink); font:inherit; font-size:.875rem; outline:0; }
/* Checked rows */
.cxp-form-system .cxp-tick-box { padding:0; overflow:hidden; }
.cxp-form-system .cxp-tick-list { margin:0; padding:0; list-style:none; }
.cxp-form-system .cxp-tick-row,.cxp-form-system .cxp-tick-add { display:flex; align-items:center; gap:.6rem; min-height:2.25rem; padding:0 .75rem; border-bottom:1px solid var(--form-border); }
.cxp-form-system .cxp-tick-add { border-bottom:0; color:var(--form-muted); }
.cxp-form-system .cxp-tick-row:last-child { border-bottom:0; }
.cxp-form-system .cxp-tick-list:not(:empty) + .cxp-tick-add { border-top:1px solid var(--form-border); }
.cxp-form-system .cxp-tick-row.is-dragging { opacity:.5; }
.cxp-form-system .cxp-tick-mark { color:var(--color-pink-500); width:1.35rem; height:1.35rem; }
.cxp-form-system .cxp-tick-add .cxp-form-icon { width:1.1rem; height:1.1rem; flex:none; }
.cxp-form-system .cxp-row-input { flex:1; min-width:0; min-height:2rem; padding:0; border:0; background:transparent; color:var(--form-ink); font:inherit; font-size:.875rem; outline:0; text-overflow:ellipsis; }
.cxp-form-system .cxp-row-handle,.cxp-form-system .cxp-row-remove { display:grid; place-items:center; flex:none; position:relative; width:28px; align-self:stretch; min-height:2.25rem; border:0; background:none; color:var(--form-muted); cursor:pointer; }
.cxp-form-system :is(.cxp-row-handle,.cxp-row-remove)::after { content:''; position:absolute; inset:-4px -2px; }
.cxp-form-system .cxp-row-handle { cursor:grab; }
.cxp-form-system .cxp-row-handle svg { width:.8rem; height:.8rem; }
.cxp-form-system .cxp-row-remove .cxp-form-icon { width:.9rem; height:.9rem; }
.cxp-form-system .cxp-row-remove { opacity:0; }
.cxp-form-system .cxp-tick-row:hover .cxp-row-remove,.cxp-form-system .cxp-tick-row:focus-within .cxp-row-remove { opacity:1; }
@media (hover:none) { .cxp-form-system .cxp-row-remove { opacity:1; } }
@media(max-width:640px) {
 .cxp-form-system .cxp-form-grid-compact { gap:.85rem; }
 .cxp-form-system .cxp-card-box { min-height:7.5rem; }
 .cxp-form-system .cxp-text-card-input,.cxp-form-system .cxp-row-input,.cxp-form-system .cxp-chip-input { font-size:1rem; }
 .cxp-form-system .cxp-chip-input { min-width:0; width:100%; }
}
/* Tinted fields (not white on white) and one calm pink focus ring everywhere in the form system. */
.cxp-form-system .cxp-form-control .kt-input,.cxp-form-system .cxp-form-input,.cxp-form-system .cxp-form-schedule-trigger { border-color:color-mix(in srgb,var(--color-blue-500) 10%,var(--form-border)); background:color-mix(in srgb,var(--color-blue-500) 3.5%,var(--form-surface)); }
.cxp-form-system .cxp-form-control .kt-input:focus,.cxp-form-system .cxp-form-control .kt-input:focus-visible,.cxp-form-system .cxp-form-input:focus-visible { outline:0; border-color:var(--color-pink-500); box-shadow:0 0 0 1px var(--color-pink-500); }
.cxp-form-system .cxp-card-box :is(textarea,input):focus,.cxp-form-system .cxp-card-box :is(textarea,input):focus-visible { outline:0; box-shadow:none; }
.cxp-form-system .cxp-chip-input { background:var(--form-surface); }
.cxp-form-system .cxp-text-card-foot,.cxp-form-system .cxp-tick-row,.cxp-form-system .cxp-tick-list:not(:empty) + .cxp-tick-add { border-color:color-mix(in srgb,var(--color-blue-500) 12%,var(--form-border)); }
/* Tighter, aligned label rows for every field in the form system (labels, regenerate buttons and inputs share baselines). */
.cxp-form-system .cxp-form-label-row { min-height:28px; }
.cxp-form-system :is(.cxp-form-regenerate,.cxp-form-undo) { width:28px; height:28px; padding:.3rem; }
.cxp-form-system .cxp-form-grid-compact .cxp-form-field { gap:.3rem; }
.cxp-form-system .cxp-form-grid-compact .cxp-form-grid-three { align-items:start; gap:.85rem 1rem; }
.cxp-form-system .cxp-form-grid-compact .cxp-form-field-help { min-height:0; }
@media(max-width:640px) {
 .cxp-form-system .cxp-form-label-row { min-height:44px; }
 .cxp-form-system :is(.cxp-form-regenerate,.cxp-form-undo) { width:44px; height:44px; }
}
/* Long lists scroll inside the box instead of stretching the whole row. */
.cxp-form-system .cxp-chip-box,.cxp-form-system .cxp-tick-box { max-height:15rem; overflow-y:auto; overscroll-behavior:contain; }
/* Custom label blocks (category, city, areas, social) share the same label height so columns line up. */
.cxp-form-system .cxp-form-field > .cxp-form-label { min-height:28px; }
.cxp-form-system .cxp-form-chips .cxp-form-chip { min-height:34px; padding:0 .25rem 0 .75rem; border-radius:999px; font-size:.875rem; background:color-mix(in srgb,var(--color-pink-500) 7%,var(--form-surface)); }
.cxp-form-system .cxp-form-chips .cxp-form-chip button { min-width:28px; min-height:28px; width:28px; height:28px; border-radius:50%; color:var(--form-muted); }
/* Short-fact row: the year box fills its own narrow column (no dead gap), the counter lives inside the field. */
.cxp-form-system .cxp-form-grid-compact .cxp-form-grid-three { grid-template-columns:9rem minmax(0,1fr) minmax(0,1fr); }
.cxp-form-system .cxp-form-grid-compact .cxp-form-field-short .cxp-form-control { max-width:none; }
.cxp-form-system .cxp-form-counter-inline { position:absolute; right:.75rem; top:50%; transform:translateY(-50%); margin:0; font-size:.75rem; pointer-events:none; }
.cxp-form-system .cxp-form-control:has(.cxp-form-counter-inline) .kt-input { padding-right:4.5rem; }
@media(max-width:640px) {
 .cxp-form-system .cxp-form-grid-compact .cxp-form-grid-three { grid-template-columns:minmax(0,1fr); }
}
