/* Shared source palettes: internal practice cards, previews and submission forms.
   Scoped to opt-in containers; library tiles and the site shell keep their colours. */
.source-identity[data-source-identity="nskv"]{
  --violet:#146b68;--violet-d:#104b50;--violet-l:#e9f5f1;--violet-l2:#f1faf6;
  --orange:#16877b;--orange-d:#126557;--orange-l:#e9f7f2;--orange-b:#c5e7dc;
  --line:#cce3dc;--line-2:#dcece7;--mut:#596c70;--ink-2:#39474f;
  --bg-2:#f4f9f7;--lavender:#90bbb0;
  --grad-veil-orange:linear-gradient(110deg,#edf8ef,#eaf6fa);
  --shadow-panel:0 1px 2px #123d3110,0 24px 60px -28px #12665126;
  --ring:0 0 0 3px #16877b33;
  --source-stripe:linear-gradient(90deg,#31ab63,#16a294 50%,#0096c8);
  --source-header:linear-gradient(110deg,#e9f6ef,#e7f5fa);
  --source-button-shadow:0 4px 14px #16877b26;
}
.source-identity[data-source-identity="dobrino"]{
  --violet:#005842;--violet-d:#003024;--violet-l:#eaf4ef;--violet-l2:#f4f8f6;
  --orange:#d84d0a;--orange-d:#ae3c06;--orange-l:#edf6f1;--orange-b:#d5e6dc;
  --line:#d8e5de;--line-2:#e0eae5;--mut:#5b7066;--ink-2:#35463c;
  --bg-2:#f5f9f7;--lavender:#9fbdae;
  --grad-veil-orange:linear-gradient(110deg,#edf6f1,#f5faf7);
  --practice-section-accent:#bbec55;
  --shadow-panel:0 1px 2px #0030240c,0 24px 60px -28px #00302436;
  --ring:0 0 0 3px #00584233;
  --source-stripe:linear-gradient(90deg,#bbec55 0%,#bbec55 58%,#ff6619 100%);
  --source-header:linear-gradient(110deg,#003024,#005842);
  --source-button-shadow:0 4px 14px #d84d0a26;
}

/* Fields stay mounted when their source changes. Only the paint transitions. */
.practice-add{--source-pad-x:32px;--source-pad-y:30px;isolation:isolate}
.practice-add h2{min-width:0}
.practice-add-header{position:relative;isolation:isolate}
.practice-add-header::before,.practice-add-header::after{
  content:"";position:absolute;inset:calc(-1 * var(--source-pad-y)) calc(-1 * var(--source-pad-x)) -6px;
  z-index:-1;pointer-events:none;opacity:0;transition:opacity .6s ease;
}
.practice-add:not([data-source-identity="base"]) .practice-add-header::before{background:var(--source-header);opacity:1}
.practice-add[data-source-identity="nskv"] .practice-add-header::after{
  background:url('../img/source-identity/nskv-pattern.svg') right center / auto 100% no-repeat;opacity:.3;
}
.practice-add[data-source-identity="dobrino"] .practice-add-header::after{
  background:url('../img/source-identity/dobrino-loop.svg') right center / auto 100% no-repeat;opacity:.16;
}
.practice-add:not([data-source-identity="base"])::before{background:var(--source-stripe);z-index:2}
.practice-add[data-source-identity="dobrino"] .practice-add-header h2{color:#fff9ee}
.practice-add[data-source-identity="dobrino"] .practice-add-header p{color:#d7e3cf!important}
.practice-add[data-source-identity="dobrino"] .practice-add-header a{color:#d7e3cf}
.practice-add :is(h2,label,.note){transition:color .4s ease}
.practice-add :is(input,select,textarea){min-width:0;max-width:100%;transition:border-color .4s ease,background-color .4s ease,box-shadow .25s ease}
.practice-add .opt,.practice-add .opt span{min-width:0;overflow-wrap:anywhere}
/* Each column flows independently, so a wrapped label cannot add a gap opposite it. */
.practice-add .practice-clusters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.practice-add .practice-clusters-column{display:flex;flex-direction:column;gap:2px;min-width:0}
.practice-add .practice-clusters .opt{padding:3px 4px}
.practice-add .practice-clusters .opt span{font-size:13px}
.practice-add .ap-field-label,.practice-add .ap-consents legend{font-size:12px;font-weight:700;color:var(--violet)}
.practice-add .ap-field-hint{font-size:12px;line-height:1.5;color:var(--mut);margin:1px 0 5px}
.practice-add .ap-consents{min-width:0;margin:24px 0 10px;padding:14px 0 0;border:0;border-top:1px solid var(--line)}
.practice-add .ap-consents legend{padding:0 12px 0 0}
.practice-add .ap-consents .opt{font-size:13px;color:var(--ink-2);padding:7px 4px}
.practice-add [aria-invalid="true"]{border-color:var(--err)!important;outline:2px solid var(--err);outline-offset:2px}
.practice-add .savemsg{color:var(--err);font-size:12px;line-height:1.5}
.practice-add:not([data-source-identity="base"]) :is(input:not([type="checkbox"]),select,textarea){background:var(--bg-2);color:var(--ink-2)}
.practice-add:not([data-source-identity="base"]) :is(input,select,textarea):focus{border-color:var(--violet);box-shadow:var(--ring);outline:none}
.practice-add:not([data-source-identity="base"]) .btn{box-shadow:var(--source-button-shadow)}
.practice-add:not([data-source-identity="base"]) .btn:active{box-shadow:none}
@media(max-width:900px){.practice-add{--source-pad-x:20px;--source-pad-y:22px}}
@media(prefers-reduced-motion:reduce){
  .practice-add *,.practice-add *::before,.practice-add *::after{transition:none!important;animation:none!important}
}
@media print{
  .practice-add-header::after{display:none}
  .practice-add *,.practice-add *::before,.practice-add *::after{animation:none!important;transition:none!important}
}
