/* ==========================================================================
   Evidence website - PALETTE EDITOR chrome (palette.js).
   A floating paintbrush expands into the pairing editor. Slate stays fixed;
   only the five colour pairings are editable. 4px grid per the brand rule.
   ========================================================================== */
.pal-fab{position:fixed;right:16px;bottom:16px;z-index:80;width:48px;height:48px;border:0;border-radius:var(--radius-pill);background:var(--forest);color:var(--lime);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 12px 28px -10px rgba(15,23,42,0.4);transition:transform .15s ease;}
.pal-fab:hover{transform:translateY(-2px);}
.pal-fab svg{width:24px;height:24px;stroke-width:2.4;}

/* the editor is a full-height drawer from the right, scrollable however long it grows
   (data-lenis-prevent keeps the page's smooth scroll out of it) */
.pal{position:fixed;top:0;right:0;bottom:0;z-index:84;width:400px;max-width:calc(100vw - 64px);overflow-y:auto;overscroll-behavior:contain;background:#fff;border-radius:24px 0 0 24px;padding:24px;box-shadow:-24px 0 48px -16px rgba(15,23,42,0.28);font-family:var(--font-body);color:var(--ink);transform:translateX(105%);transition:transform .35s var(--ease-silk);}
.pal--open{transform:translateX(0);}
@media(prefers-reduced-motion:reduce){.pal{transition:none;}}
.pal__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.pal__title{font-family:var(--font-display);font-weight:700;font-size:20px;letter-spacing:-0.01em;}
.pal__close{border:0;background:var(--fill-2);color:var(--ink);width:28px;height:28px;border-radius:var(--radius-pill);font-size:16px;line-height:1;cursor:pointer;}
.pal__selrow{display:flex;gap:8px;margin-bottom:16px;}
.pal__select{flex:1;min-width:0;border:0;background:var(--fill-2);color:var(--ink);font-family:var(--font-body);font-size:14px;font-weight:600;padding:12px;border-radius:12px;}
.pal__delbtn{flex:none;width:44px;border:0;background:var(--fill-2);color:var(--grapefruit-companion);border-radius:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.pal__delbtn:hover{background:var(--grapefruit);}
.pal__delbtn svg{width:20px;height:20px;stroke-width:2.2;}
.pal__rows{display:flex;flex-direction:column;gap:12px;}
.pal__fam{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.pal__famlab{font-size:14px;font-weight:600;}
.pal__chips{display:flex;gap:8px;}
.pal__chip{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:14px;color:var(--slate-600);}
.pal__chip input{width:44px;height:32px;border:0;padding:0;background:transparent;border-radius:8px;cursor:pointer;}
.pal__chip input::-webkit-color-swatch-wrapper{padding:0;}
.pal__chip input::-webkit-color-swatch{border:0;border-radius:8px;}
.pal__import{display:flex;gap:8px;margin-top:16px;}
.pal__import .pal__in{flex:1;}
.pal__coolors{border:0;background:var(--fill-2);color:var(--ink);font-family:var(--font-body);font-weight:600;font-size:14px;padding:12px 16px;border-radius:var(--radius-pill);cursor:pointer;}
.pal__coolors:hover{background:var(--lime-100);}
.pal__impnote{font-size:14px;color:var(--slate-600);margin:8px 0 0;line-height:1.4;}
/* the imported colours, reorderable by drag: first chip = the leading (primary) colour */
.pal__strip{display:flex;gap:8px;margin-top:12px;}
.pal__chipdrag{flex:1;height:36px;border-radius:8px;cursor:grab;position:relative;box-shadow:inset 0 0 0 1px rgba(15,23,42,0.12);}
.pal__chipdrag:active{cursor:grabbing;}
.pal__chipdrag--lead::after{content:"lead";position:absolute;left:50%;bottom:-20px;transform:translateX(-50%);font-size:14px;font-weight:600;color:var(--slate-600);}
.pal__strip:has(.pal__chipdrag--lead){margin-bottom:20px;}
.pal__savebox{margin-top:16px;display:flex;flex-direction:column;gap:8px;}
.pal__in{border:0;background:var(--fill-2);color:var(--ink);font-family:var(--font-body);font-size:14px;padding:12px;border-radius:12px;}
.pal__in:focus{outline:3px solid var(--lime);}
.pal__btns{display:flex;gap:8px;}
.pal__save{flex:1;border:0;background:var(--forest);color:var(--lime);font-family:var(--font-body);font-weight:600;font-size:14px;padding:12px;border-radius:var(--radius-pill);cursor:pointer;}
.pal__save:hover{background:var(--green-900);}
.pal__reset{border:0;background:var(--fill-2);color:var(--ink);font-family:var(--font-body);font-weight:600;font-size:14px;padding:12px 16px;border-radius:var(--radius-pill);cursor:pointer;}
.pal__note{font-size:14px;color:var(--slate-600);margin:12px 0 0;line-height:1.4;}
