/* Tactile controls: gel pills, chrome rings, sunken tracks, droplet menus.
 * Loaded after the platform's styles. It changes controls only: pages, layout,
 * cards, sidebar and colours stay the platform's own. */

:root {
  --gel-base: #ffffff; --gel-spec: rgba(255, 255, 255, 0.85); --shade: 6 33 41;
  --g-ok: #1db583; --g-ok-ink: #05573d;
  --g-info: #2b82d9; --g-info-ink: #0c4a87;
  --g-wait: #f08a3c; --g-wait-ink: #8a3e09;
  --g-miss: #df5a4e; --g-miss-ink: #8c2219;
  --g-none: #7c9098; --g-none-ink: #2c3f46;
  --well: #dfe7e4; --well-2: #e9efec;
  --raised: #ffffff; --raised-2: #f6faf8;
  --chrome-1: #fbfdfc; --chrome-2: #a7b2ae; --chrome-3: #eef2f0; --chrome-4: #8f9a96;
  --face-1: #f1f5f3; --face-2: #e3e9e6;
  --sphere-1: #6a818c; --sphere-2: #223a44; --sphere-3: #062129; --sphere-ink: #f5faf8;
  --sh-raise: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 1px rgb(var(--shade) / 0.06), 0 8px 14px -9px rgb(var(--shade) / 0.3);
  --sh-well: inset 0 1.5px 3px rgb(var(--shade) / 0.13), inset 0 0 0 1px rgb(var(--shade) / 0.03), 0 1px 0 rgba(255, 255, 255, 0.75);
  --sh-float: inset 0 0 0 1px rgba(255, 255, 255, 0.7), inset 0 1px 0 #fff, 0 2px 4px rgb(var(--shade) / 0.06), 0 34px 60px -22px rgb(var(--shade) / 0.42);
  --ease-spring: cubic-bezier(0.2, 1.3, 0.3, 1);
  /* Select arrows: the SPS caret (icons.js), drawn as a background because a
   * native select cannot hold markup; it flips when the list is open. */
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7178' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 10.5l4 4 4-4'/%3E%3C/svg%3E");
  --chev-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f8f68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 13.5l4-4 4 4'/%3E%3C/svg%3E");
}
html[data-theme="dark"] {
  --gel-base: #0b2129; --gel-spec: rgba(255, 255, 255, 0.2); --shade: 0 6 9;
  --g-ok: #27cf98; --g-ok-ink: #8cf2cf;
  --g-info: #4a9cf0; --g-info-ink: #a9d2ff;
  --g-wait: #f49a50; --g-wait-ink: #ffc796;
  --g-miss: #f0746a; --g-miss-ink: #ffb6af;
  --g-none: #7f98a2; --g-none-ink: #c9d8dc;
  --well: #031014; --well-2: #071a20;
  --raised: #17353e; --raised-2: #12303a;
  --chrome-1: #89a0aa; --chrome-2: #1d2f36; --chrome-3: #5f757e; --chrome-4: #15242a;
  --face-1: #1a343e; --face-2: #122a33;
  --sphere-1: #9db7c1; --sphere-2: #38535e; --sphere-3: #0d2029; --sphere-ink: #f5faf8;
  --sh-raise: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 1px rgb(var(--shade) / 0.3), 0 8px 14px -8px rgb(var(--shade) / 0.7);
  --sh-well: inset 0 1.5px 3px rgb(var(--shade) / 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 1px 0 rgba(255, 255, 255, 0.05);
  --sh-float: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 34px 60px -22px rgb(var(--shade) / 0.9);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239db4b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 10.5l4 4 4-4'/%3E%3C/svg%3E");
  --chev-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235ce0b4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 13.5l4-4 4 4'/%3E%3C/svg%3E");
}

/* ---------- Buttons: a soft press ---------- */
.btn { transition: background var(--m-100) var(--ease), opacity var(--m-100) var(--ease), box-shadow var(--m-100) var(--ease), transform 0.5s var(--ease-spring); }
.btn:active { opacity: 1; transform: scale(0.95); transition-duration: 0.08s, 0.08s, 0.08s, 0.08s; }
.btn[data-drop] { position: relative; background: transparent; box-shadow: none; color: var(--label-2); }
.btn[data-drop]:not([data-dash]) { box-shadow: inset 0 0 0 1px var(--sep-2); }
.btn[data-drop]:hover { background: var(--fill-3); color: var(--label); }
.gel-dash { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.gel-dash rect { fill: none; stroke: var(--sep-3); stroke-width: 1.5; stroke-dasharray: 1.5 1.1; }
.btn[data-drop]:hover .gel-dash rect { stroke: var(--label-3); animation: gel-march 2.8s linear infinite; }
@keyframes gel-march { to { stroke-dashoffset: -26; } }
/* The icon answers the pointer with its own move (frame.css, "Living icons"). */

/* ---------- Gel status pills ---------- */
.status, .pill-tag, .status-select { --g: var(--g-none); --gi: var(--g-none-ink); }
.pill-tag.ok, .status[data-status="valide"], .status-select.tone-ok { --g: var(--g-ok); --gi: var(--g-ok-ink); }
.pill-tag.info, .status[data-status="soumis"], .status[data-status="en_revue"], .status-select.tone-info { --g: var(--g-info); --gi: var(--g-info-ink); }
.pill-tag.wait, .status-select.tone-wait { --g: var(--g-wait); --gi: var(--g-wait-ink); }
.pill-tag.miss, .status[data-status="a_corriger"], .status-select.tone-miss { --g: var(--g-miss); --gi: var(--g-miss-ink); }
.status, .pill-tag {
  position: relative; isolation: isolate; gap: 0.4em; min-height: 22px; padding: 0.22em 0.72em 0.22em 0.55em; border-radius: 999px; font-size: var(--t-foot); font-weight: 600; color: var(--gi);
  background:
    radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g) 46%, transparent), transparent 74%),
    linear-gradient(180deg, color-mix(in oklab, var(--g) 12%, var(--gel-base)), color-mix(in oklab, var(--g) 24%, var(--gel-base)));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--g) 32%, transparent), inset 0 1.5px 1px var(--gel-spec), inset 0 -5px 8px -5px color-mix(in oklab, var(--g) 60%, transparent), 0 6px 12px -9px color-mix(in oklab, var(--g) 85%, transparent);
  transition: color 0.3s;
}
.status::before, .pill-tag::before { content: ""; flex: none; width: 6px; height: 6px; margin-inline: 0.2em 0.05em; border-radius: 50%; background: currentColor; }
.pill-tag.ok::before, .status[data-status="valide"]::before, .pill-tag.wait::before, .status[data-status="en_revue"]::before, .pill-tag.miss::before, .status[data-status="a_corriger"]::before { width: 15px; height: 15px; margin: 0; border-radius: 0; -webkit-mask: var(--pill-ic) center / contain no-repeat; mask: var(--pill-ic) center / contain no-repeat; }
/* Status marks from the SPS family (icons.js): the logo's softened hexagon with
 * its soft tint, then a check (validated), clock hands (in review, still: the
 * mark waits, it does not spin) or a stroke and point (to correct). */
.pill-tag.ok::before, .status[data-status="valide"]::before { --pill-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill='%23000' fill-opacity='.22' d='M10.41 3.72Q12 2.8 13.59 3.72L18.37 6.48Q19.97 7.4 19.97 9.24L19.97 14.76Q19.97 16.6 18.37 17.52L13.59 20.28Q12 21.2 10.41 20.28L5.63 17.52Q4.03 16.6 4.03 14.76L4.03 9.24Q4.03 7.4 5.63 6.48Z'/%3E%3Cpath d='M8.7 12.3l2.2 2.2 4.4-4.6'/%3E%3C/svg%3E"); }
.pill-tag.wait::before, .status[data-status="en_revue"]::before { --pill-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill='%23000' fill-opacity='.22' d='M10.41 3.72Q12 2.8 13.59 3.72L18.37 6.48Q19.97 7.4 19.97 9.24L19.97 14.76Q19.97 16.6 18.37 17.52L13.59 20.28Q12 21.2 10.41 20.28L5.63 17.52Q4.03 16.6 4.03 14.76L4.03 9.24Q4.03 7.4 5.63 6.48Z'/%3E%3Cpath d='M12 8.2V12l2.6 1.7'/%3E%3C/svg%3E"); }
.pill-tag.miss::before, .status[data-status="a_corriger"]::before { --pill-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill='%23000' fill-opacity='.22' d='M10.41 3.72Q12 2.8 13.59 3.72L18.37 6.48Q19.97 7.4 19.97 9.24L19.97 14.76Q19.97 16.6 18.37 17.52L13.59 20.28Q12 21.2 10.41 20.28L5.63 17.52Q4.03 16.6 4.03 14.76L4.03 9.24Q4.03 7.4 5.63 6.48Z'/%3E%3Cpath d='M12 7.9v4.7M12 16.1h.01'/%3E%3C/svg%3E"); }
.status.gel-flood, .pill-tag.gel-flood { position: absolute; inset: 0; z-index: -1; padding: 0; min-height: 0; box-shadow: none; animation: none; }
.status.gel-flood::before, .pill-tag.gel-flood::before { display: none; }
.gel-status-l { display: inline-block; position: relative; white-space: nowrap; }
.gel-rolling { display: inline-block; position: relative; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
@keyframes gel-pop { from { opacity: 0; transform: scale(0.7); } }
.status-select {
  border-radius: 999px; color: var(--gi); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--g) 32%, transparent), inset 0 1.5px 1px var(--gel-spec), inset 0 -5px 8px -5px color-mix(in oklab, var(--g) 60%, transparent);
  background-image: var(--chev), radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g) 46%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in oklab, var(--g) 12%, var(--gel-base)), color-mix(in oklab, var(--g) 24%, var(--gel-base)));
  background-repeat: no-repeat; background-position: right 0.45rem center, 0 0, 0 0; background-size: 14px, auto, auto;
}
.status-select.tone-ok, .status-select.tone-wait, .status-select.tone-miss, .status-select.tone-info { color: var(--gi); background-color: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--g) 32%, transparent), inset 0 1.5px 1px var(--gel-spec), inset 0 -5px 8px -5px color-mix(in oklab, var(--g) 60%, transparent); background-image: var(--chev), radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g) 46%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in oklab, var(--g) 12%, var(--gel-base)), color-mix(in oklab, var(--g) 24%, var(--gel-base))); }
select.status-select, select.status-select.tone-ok, select.status-select.tone-wait, select.status-select.tone-miss, select.status-select.tone-info { padding-left: 0.75rem; background-repeat: no-repeat; background-position: right 0.5rem center, 0 0, 0 0; background-size: 14px, auto, auto; }
.side-count, .side-new { color: var(--g-wait-ink); background: radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g-wait) 46%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in oklab, var(--g-wait) 12%, var(--gel-base)), color-mix(in oklab, var(--g-wait) 24%, var(--gel-base))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--g-wait) 32%, transparent), inset 0 1px 1px var(--gel-spec); }
.side-item.is-active .side-count { background: radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g-wait) 46%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in oklab, var(--g-wait) 12%, var(--gel-base)), color-mix(in oklab, var(--g-wait) 24%, var(--gel-base))); }

/* ---------- Tabs and filters: a sunken track with a liquid selection ---------- */
[role="tablist"] { position: relative; }
.seg, .window-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; border: 0; border-radius: 17px;
  background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well);
}
.window-tabs { margin: 0.85rem 0.9rem 0.1rem; }
.seg button, .window-tabs button { position: relative; z-index: 1; height: 32px; border-radius: 13px; box-shadow: none; color: var(--label-2); transition: color 0.2s, transform 0.5s var(--ease-spring); }
.seg button:hover, .window-tabs button:hover { color: var(--label); background: transparent; }
.seg button:active, .window-tabs button:active { transform: scale(0.96); transition-duration: 0.08s; }
.seg button[aria-selected="true"], .window-tabs button[aria-selected="true"] { color: var(--label); background: linear-gradient(180deg, var(--raised), var(--raised-2)); box-shadow: var(--sh-raise); }
.tab-ghost { border-radius: 13px; background: linear-gradient(180deg, var(--raised), var(--raised-2)); box-shadow: var(--sh-raise), 0 0 14px -6px var(--g-ok); will-change: transform; }
[role="tablist"] > button.tab-arriving-text { color: var(--label) !important; }
.gel-tabrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.gel-tabrow > .window-tabs { margin-right: 0; }
.gel-tabrow .gel-filter { margin-top: 0.75rem; }
.gel-tabrow > .seg { margin-bottom: 0; }
.seg + .gel-filter { margin-bottom: 1rem; }

/* Filter chip */
.gel-filter { display: inline-flex; align-items: center; gap: 0.45rem; height: 40px; padding: 0 0.55rem 0 0.8rem; border-radius: 15px; font-size: var(--t-callout); font-weight: 560; color: var(--label-2); background: linear-gradient(180deg, var(--raised), var(--raised-2)); box-shadow: var(--sh-raise); }
.gel-filter.is-new { animation: gel-chip-in 0.6s var(--ease-spring); }
.gel-filter .i { color: var(--label-3); }
.gel-filter b { color: var(--g-info-ink); font-weight: 650; }
.gel-filter-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--label-4); }
.gel-filter-sep { width: 1px; height: 18px; margin-left: 0.15rem; background: var(--sep); }
.gel-filter-x { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--label-3); cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.5s var(--ease-spring); }
.gel-filter-x:hover { background: var(--fill-2); color: var(--label); transform: rotate(90deg); }
@keyframes gel-chip-in { from { opacity: 0; transform: scale(0.7) translateX(-10px); } }

/* ---------- Sidebar: the highlight moves like liquid ---------- */
.side-item.is-active, .side-ghost { background: radial-gradient(90% 110% at 50% 122%, color-mix(in oklab, var(--g-ok) 26%, transparent), transparent 72%), var(--surface); box-shadow: inset 0 0 0 1px var(--sep), 0 6px 12px -9px rgb(var(--shade) / 0.5); }
.side-ghost { will-change: transform; }
.sidebar { contain: layout style; }
.side-item.is-active.side-arriving { background: transparent; box-shadow: none; }
.side-item > * { position: relative; z-index: 1; }

/* ---------- Search ---------- */
.search-field { height: 36px; padding: 0 4px 0 0.85rem; border-radius: 15px; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); }
.search-field:hover { background: linear-gradient(180deg, var(--well), var(--well-2)); }
.search-field span { color: var(--label-2); }
.search-field kbd { order: 2; background: transparent; border: 0; box-shadow: none; color: var(--label-3); }
.search-field .i { order: 3; width: 28px; height: 28px; padding: 7px; border-radius: 50%; color: var(--label-2); background: linear-gradient(180deg, var(--raised), var(--raised-2)); box-shadow: var(--sh-raise); transition: transform 0.5s var(--ease-spring); }
.search-field:hover .i { transform: scale(1.07); }
@media screen and (max-width: 1400px) {
  .search-field, .search-field:hover { width: 36px; height: 36px; padding: 0; justify-content: center; background: none; box-shadow: none; }
}

/* ---------- Dropdowns ---------- */
select.input { border-radius: 999px; padding-left: 0.85rem; padding-right: 1.8rem; background-image: var(--chev); background-position: right 0.55rem center; background-size: 15px; cursor: pointer; transition: box-shadow 0.2s, background-color 0.2s; }
select.input:hover:not(:disabled) { box-shadow: inset 0 0 0 1.25px color-mix(in oklab, var(--g-ok) 62%, transparent), 0 6px 12px -9px var(--g-ok); }
select.gel-select-open, select.gel-select-open:hover, select.input:focus.gel-select-open { background-image: var(--chev-up), radial-gradient(82% 110% at 50% 122%, color-mix(in oklab, var(--g-ok) 30%, transparent), transparent 72%); background-repeat: no-repeat; background-position: right 0.55rem center, 0 0; background-size: 15px, auto; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--g-ok) 82%, transparent), 0 8px 16px -10px var(--g-ok); }
.gel-pop { position: fixed; z-index: 1000; overflow: hidden; color: var(--label); font-size: var(--t-callout); background: linear-gradient(180deg, var(--raised), var(--surface-2)); box-shadow: var(--sh-float); will-change: transform, opacity; }
.gel-pop-in { display: grid; gap: 8px; padding: 10px; }
.gel-field { display: flex; align-items: center; gap: 0.4rem; height: 42px; padding: 0 0.85rem; border-radius: 999px; background: var(--raised); box-shadow: 0 0 0 1px color-mix(in oklab, var(--g-ok) 38%, transparent), 0 0 12px -3px color-mix(in oklab, var(--g-ok) 50%, transparent), inset 0 1px 2px rgb(var(--shade) / 0.06); }
.gel-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-weight: 520; color: inherit; }
.gel-field input::placeholder { color: var(--label-3); }
.gel-field .i { color: var(--label-3); }
.gel-opts { display: grid; gap: 6px; overflow-y: auto; overscroll-behavior: contain; padding: 1px; scrollbar-width: thin; }
.gel-opt { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 40px; padding: 0.4rem 0.9rem; border: 0; border-radius: 999px; text-align: left; font: inherit; font-weight: 500; color: var(--label-2); cursor: pointer; background: linear-gradient(180deg, var(--raised), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--sep), inset 0 1px 0 rgba(255, 255, 255, 0.5); transition: color 0.15s, box-shadow 0.2s; }
.gel-opt[hidden] { display: none; }
.gel-opt:disabled { opacity: 0.45; cursor: default; }
.gel-opt-t { flex: 1; min-width: 0; line-height: 1.3; }
.gel-opt-check { color: var(--g-ok); opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.5s var(--ease-spring); }
.gel-opt[aria-selected="true"] { color: var(--label); font-weight: 600; }
.gel-opt[aria-selected="true"] .gel-opt-check { opacity: 1; transform: none; }
.gel-opt.is-cursor { color: var(--label); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--g-ok) 62%, transparent), 0 6px 12px -9px var(--g-ok); }
.gel-opt-group { padding: 0.45rem 0.8rem 0.05rem; font-size: var(--t-cap); font-weight: 600; color: var(--label-3); }
.gel-opt-group[hidden] { display: none; }
.gel-opt-none { padding: 0.6rem 0.8rem; color: var(--label-3); }

/* ---------- Chrome ring ---------- */
.gel-chrome { display: block; position: relative; padding: 3.5px; border-radius: 999px; background: radial-gradient(220px 16px at var(--lx, 30%) 0, var(--chrome-1), transparent 100%), radial-gradient(220px 14px at var(--lx, 30%) 100%, var(--chrome-1), transparent 100%), linear-gradient(180deg, var(--chrome-2) 0%, var(--chrome-3) 34%, var(--chrome-1) 58%, var(--chrome-4) 100%); box-shadow: 0 14px 22px -14px rgb(var(--shade) / 0.55), 0 2px 5px rgb(var(--shade) / 0.12); }
.gel-face { display: flex; align-items: center; border-radius: inherit; background: linear-gradient(180deg, var(--face-1), var(--face-2)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 2px rgb(var(--shade) / 0.07); }

/* Bilan state: a regular button with a status dot */
.gel-state { --gi: var(--g-ok-ink); }
.gel-state[data-tone="info"] { --gi: var(--g-info-ink); }
.gel-state[data-tone="wait"] { --gi: var(--g-wait-ink); }
.gel-state[data-tone="lock"] { --gi: var(--g-none-ink); }
.gel-state-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gi); }
.gel-state small { color: var(--label-3); font-size: var(--t-foot); font-weight: 400; }
.gel-state .gel-filter-sep { margin-inline: 0.15rem; }
.gel-state .gel-go { color: var(--label-3); transition: transform 0.55s var(--ease-spring); }
.gel-state:hover .gel-go { transform: translateX(3px); }

.gel-head-tools { display: flex; flex: none; align-items: center; gap: 0.75rem; }
@media screen and (max-width: 860px) { .gel-head-tools { flex: 1 1 100%; flex-wrap: wrap; } }

/* Task stack */
.task-group + .task-group { margin-top: 0.85rem; }
.gel-stack { position: relative; display: block; width: 100%; padding: 0 0 18px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: padding 0.5s var(--ease-spring), transform 0.55s var(--ease-spring); }
.gel-stack:active { transform: scale(0.99); transition-duration: 0.08s; }
.gel-stack .gel-chrome { z-index: 3; }
.gel-stack .gel-face { gap: 0.75rem; padding: 0.45rem 0.55rem 0.45rem 1rem; font-size: var(--t-title-2); font-weight: 600; letter-spacing: -0.01em; }
.gel-stack .gel-face > .i { color: var(--label-3); width: 22px; height: 22px; }
.gel-stack-t { flex: 1; min-width: 0; }
.gel-stack-l { position: absolute; left: 6%; right: 6%; bottom: 7px; height: 34px; border-radius: 0 0 22px 22px; z-index: 2; background: linear-gradient(180deg, var(--face-2), var(--chrome-3)); box-shadow: inset 0 0 0 1px var(--sep), 0 10px 14px -10px rgb(var(--shade) / 0.45); transition: transform 0.65s var(--ease-spring), opacity 0.25s; }
.gel-stack-l.l3 { left: 16%; right: 16%; bottom: 0; z-index: 1; }
.gel-stack:hover .gel-stack-l.l2 { transform: translateY(2px); }
.gel-stack:hover .gel-stack-l.l3 { transform: translateY(5px); }
.gel-stack[aria-expanded="true"] { padding-bottom: 8px; }
.gel-stack[aria-expanded="true"] .gel-stack-l { transform: translateY(-18px) scaleX(0.9); opacity: 0; }
.gel-stack .gel-chev { width: 18px; height: 18px; color: var(--label-3); transition: transform 0.6s var(--ease-spring); }
.gel-stack[aria-expanded="true"] .gel-chev { transform: rotate(180deg); }
.gel-badge { --g: var(--g-wait); --gi: var(--g-wait-ink); display: inline-flex; align-items: center; height: 30px; padding: 0 0.8rem; border-radius: 999px; font-size: var(--t-callout); font-weight: 600; letter-spacing: 0; white-space: nowrap; color: var(--gi); background: radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g) 46%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in oklab, var(--g) 12%, var(--gel-base)), color-mix(in oklab, var(--g) 24%, var(--gel-base))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--g) 32%, transparent), inset 0 1.5px 1px var(--gel-spec), inset 0 -5px 8px -5px color-mix(in oklab, var(--g) 60%, transparent); }
.gel-badge[data-tone="miss"] { --g: var(--g-miss); --gi: var(--g-miss-ink); }
.gel-badge[data-tone="info"] { --g: var(--g-info); --gi: var(--g-info-ink); }
.gel-badge[data-tone="none"] { --g: var(--g-none); --gi: var(--g-none-ink); }
.gel-deck { overflow: hidden; }
.gel-deck[hidden] { display: none; }
.gel-deck > .row-list { padding: 0 0.15rem 0.5rem; }

/* ---------- Theme switch ---------- */
.gel-lens { position: relative; display: flex; align-items: center; justify-content: space-between; isolation: isolate; border-radius: 999px; background: linear-gradient(180deg, var(--raised-2), var(--fill-2)); box-shadow: var(--sh-raise); }
.gel-lens button { position: relative; z-index: 1; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--label-2); cursor: pointer; transition: color 0.2s; }
.gel-lens button .i { position: relative; z-index: 1; transition: transform 0.8s var(--ease-spring); }
.gel-lens button:hover { color: var(--label); }
.gel-lens button[aria-checked="true"] { color: var(--label); }
.gel-lens button[aria-checked="true"] .i { transform: rotate(35deg); }
.gel-lens button[aria-checked="true"]::before, .gel-lens-ghost { content: ""; position: absolute; inset: 0; border-radius: 999px; background: linear-gradient(180deg, var(--well), var(--well-2)) padding-box, conic-gradient(from var(--la, 20deg), var(--chrome-1), var(--chrome-2) 25%, var(--chrome-3) 50%, var(--chrome-4) 75%, var(--chrome-1)) border-box; border: 2.5px solid transparent; box-shadow: inset 0 2px 4px rgb(var(--shade) / 0.24), 0 9px 13px -7px rgb(var(--shade) / 0.5), 0 1px 3px rgb(var(--shade) / 0.15); }
.gel-lens button.tab-arriving[aria-checked="true"]::before { opacity: 0; }
.gel-lens-ghost { position: absolute; inset: auto; z-index: 0; pointer-events: none; will-change: transform; }
.gel-lens-l { width: min(100%, 15.5rem); height: 70px; padding: 0 9px; }
.gel-lens-l button { width: 52px; height: 52px; }
.gel-lens-l button .i { width: 24px; height: 24px; stroke-width: 1.5px; }
.gel-theme-row { display: flex; align-items: center; gap: 0.9rem; }
.gel-theme-name { min-width: 5.5rem; font-size: var(--t-callout); font-weight: 560; color: var(--label-2); text-align: right; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- Slider ---------- */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 30px; background: transparent; cursor: grab; }
input[type="range"]:active { cursor: grabbing; }
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 38px; height: 26px; margin-top: -8px; border-radius: 999px; border: 2.5px solid transparent; background: linear-gradient(180deg, var(--face-1), var(--face-2)) padding-box, conic-gradient(from 20deg, var(--chrome-1), var(--chrome-2) 25%, var(--chrome-3) 50%, var(--chrome-4) 75%, var(--chrome-1)) border-box; box-shadow: 0 9px 12px -6px rgb(var(--shade) / 0.5), 0 1px 3px rgb(var(--shade) / 0.18); transform: scale(var(--sx, 1), var(--sy, 1)); }
input[type="range"]::-moz-range-thumb { width: 33px; height: 21px; border-radius: 999px; border: 2.5px solid transparent; background: linear-gradient(180deg, var(--face-1), var(--face-2)) padding-box, conic-gradient(from 20deg, var(--chrome-1), var(--chrome-2) 25%, var(--chrome-3) 50%, var(--chrome-4) 75%, var(--chrome-1)) border-box; box-shadow: 0 9px 12px -6px rgb(var(--shade) / 0.5), 0 1px 3px rgb(var(--shade) / 0.18); transform: scale(var(--sx, 1), var(--sy, 1)); }


/* ---------- Droplet menu ---------- */
.gel-drops { position: relative; width: 40px; height: 40px; flex: none; z-index: 40; }
.gel-goo { position: absolute; top: -8px; right: -8px; width: 330px; height: 220px; pointer-events: none; }
.gel-goo.is-gooey { filter: url(#gel-goo); }
.gel-sphere, .gel-drop { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--sphere-ink); pointer-events: auto; cursor: pointer; will-change: transform; background: radial-gradient(70% 62% at 50% 16%, var(--sphere-1), transparent 72%), radial-gradient(90% 90% at 50% 100%, var(--sphere-2), transparent 70%), var(--sphere-3); }
.gel-sphere { z-index: 2; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.55), 0 12px 18px -7px rgb(var(--shade) / 0.65), inset 0 -2px 5px rgba(255, 255, 255, 0.1); }
.gel-sphere .i { width: 20px; height: 20px; stroke-width: 1.8px; will-change: transform; }
.gel-drop { visibility: hidden; box-shadow: 0 10px 14px -7px rgb(var(--shade) / 0.65); }
.gel-drops.is-open .gel-drop, .gel-drops.is-moving .gel-drop { visibility: visible; }
.gel-drop-l { position: absolute; right: calc(100% + 7px); top: 50%; transform: translateY(-50%) translateX(6px); padding: 0.28rem 0.7rem; border-radius: 999px; font-size: var(--t-foot); font-weight: 580; color: var(--label); white-space: nowrap; background: linear-gradient(180deg, var(--raised), var(--raised-2)); box-shadow: var(--sh-raise); opacity: 0; transition: opacity 0.2s, transform 0.5s var(--ease-spring); pointer-events: none; }
.gel-drops.is-settled .gel-drop-l { opacity: 1; transform: translateY(-50%); }

/* ---------- Figures on rollers ---------- */
.gel-od-c { position: relative; display: inline-block; }
.gel-od-w { visibility: hidden; }
.gel-od-clip { position: absolute; left: -0.08em; right: -0.08em; top: 0; height: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); }
.gel-od-s { display: block; will-change: transform; }
.gel-od-s i { display: block; height: var(--od-h); line-height: var(--od-h); font-style: normal; text-align: center; }
.gel-od-t { white-space: pre; }

/* The wave replaces the old whole-page slide and tab fade; inner animations stay. */
#page.page-enter, .swap-enter { animation: none; }

/* ---------- On/off switches: the knob stretches like liquid, the gel floods the track ---------- */
.switch > span { width: 46px; height: 28px; flex: none; overflow: hidden; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); transition: none; }
.switch > span::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(80% 110% at 50% 120%, color-mix(in oklab, var(--g-ok) 70%, var(--gel-base)), transparent 80%), linear-gradient(180deg, color-mix(in oklab, var(--g-ok) 62%, var(--gel-base)), var(--g-ok)); box-shadow: inset 0 1px 1px var(--gel-spec); clip-path: circle(0px at 13px 50%); transition: clip-path 0.34s cubic-bezier(0.4, 0, 0.6, 1); }
.switch > span::after { top: 3px; bottom: 3px; left: 3px; right: 21px; width: auto; height: auto; border-radius: 999px; background: linear-gradient(180deg, var(--face-1), var(--face-2)) padding-box, conic-gradient(from 20deg, var(--chrome-1), var(--chrome-2) 25%, var(--chrome-3) 50%, var(--chrome-4) 75%, var(--chrome-1)) border-box; border: 2px solid transparent; box-shadow: 0 3px 6px -1px rgb(var(--shade) / 0.45); transform: none; transition: left 0.42s var(--ease-spring), right 0.62s var(--ease-spring); }
.switch input:checked + span { background: linear-gradient(180deg, var(--well), var(--well-2)); }
.switch input:checked + span::before { clip-path: circle(46px at 13px 50%); transition: clip-path 0.42s cubic-bezier(0.3, 0.75, 0.25, 1); }
.switch input:checked + span::after { left: 21px; right: 3px; transform: none; transition: right 0.42s var(--ease-spring), left 0.62s var(--ease-spring); }
.switch:active > span::after { right: 15px; }
.switch:active input:checked + span::after { left: 15px; right: 3px; }
.switch em { transition: color 0.25s; }

/* Checkboxes and radios */
input[type="checkbox"]:not(.switch input), input[type="radio"] { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 19px; height: 19px; margin: 0 0.4rem 0 0; vertical-align: -4px; border-radius: 50%; cursor: pointer; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); transition: box-shadow 0.25s, transform 0.5s var(--ease-spring); }
input[type="checkbox"]:not(.switch input)::before, input[type="radio"]::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(180deg, color-mix(in oklab, var(--g-ok) 62%, var(--gel-base)), var(--g-ok)); box-shadow: inset 0 1px 1px var(--gel-spec), 0 3px 8px -3px var(--g-ok); opacity: 0; transform: scale(0.3); transition: opacity 0.16s, transform 0.5s var(--ease-spring); }
input[type="checkbox"]:not(.switch input)::after { content: ""; position: absolute; left: 3.5px; top: 3.5px; width: 12px; height: 12px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; transform: scale(0) rotate(-30deg); transition: transform 0.5s var(--ease-spring) 0.04s; }
input[type="radio"]::after { content: ""; position: absolute; left: 6px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform 0.5s var(--ease-spring) 0.04s; }
input[type="checkbox"]:checked:not(.switch input)::before, input[type="radio"]:checked::before { opacity: 1; transform: none; }
input[type="checkbox"]:checked:not(.switch input)::after, input[type="radio"]:checked::after { transform: none; }
input[type="checkbox"]:not(.switch input):hover, input[type="radio"]:hover { box-shadow: var(--sh-well), 0 0 0 3px color-mix(in oklab, var(--g-ok) 18%, transparent); }
input[type="checkbox"]:not(.switch input):active, input[type="radio"]:active { transform: scale(0.88); transition-duration: 0.08s; }
.choice input[type="radio"], .choice input[type="checkbox"] { position: absolute; left: 0.85rem; top: 0.95rem; margin: 0; }
.choice { transition: box-shadow 0.25s, background 0.2s, transform 0.5s var(--ease-spring); }
.choice:active { transform: scale(0.985); transition-duration: 0.08s; }
.choice:has(input:checked), .choice.is-on { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--g-ok) 78%, transparent), 0 8px 16px -12px var(--g-ok); background: radial-gradient(80% 90% at 50% 118%, color-mix(in oklab, var(--g-ok) 14%, transparent), transparent 74%); }

/* ---------- Menus: the same liquid selection ---------- */
.lib-nav { position: relative; } /* .settings-nav is sticky (app.css): positioned too, so its liquid tab sits right */
.settings-link, .lib-tab { position: relative; z-index: 1; transition: background var(--m-100) var(--ease), color 0.2s, transform 0.5s var(--ease-spring); }
.settings-link:active, .lib-tab:active, .side-item:active { transform: scale(0.975); transition-duration: 0.08s; }
.side-item { transition: background var(--m-100) var(--ease), transform 0.5s var(--ease-spring); }
/* While the liquid tab travels, the arriving item stays a plain item: readable label, no colour
 * flash (no transition), so only one highlight is ever on screen. It takes its colour as the ghost lands. */
.settings-link.tab-arriving, .lib-tab.tab-arriving { background: transparent !important; color: var(--label); transition: none; }
.gel-nav-ghost { border-radius: 9px; box-shadow: 0 6px 12px -8px rgb(var(--shade) / 0.5); }
a.row-item, .ledger-row, .help-card { transition: background var(--m-100) var(--ease), box-shadow var(--m-100) var(--ease), transform 0.5s var(--ease-spring); }
a.row-item:active, .ledger-row:active, .help-card:active { transform: scale(0.99); transition-duration: 0.08s; }

/* ---------- Fields ---------- */
.input:focus, textarea.input:focus { box-shadow: inset 0 0 0 1.25px var(--accent-text), 0 0 0 3px color-mix(in oklab, var(--g-ok) 22%, transparent), 0 0 14px -4px var(--g-ok); }
input[type="search"].input { border-radius: 999px; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); }
input[type="search"].input:focus { background: var(--surface); box-shadow: inset 0 0 0 1.25px var(--accent-text), 0 0 0 3px color-mix(in oklab, var(--g-ok) 22%, transparent), 0 0 14px -4px var(--g-ok); }
.lib-search .i, .picker-search .i { left: auto; right: 4px; width: 26px; height: 26px; padding: 6px; border-radius: 50%; color: var(--label-2); background: linear-gradient(180deg, var(--raised), var(--raised-2)); box-shadow: var(--sh-raise); }
.lib-search .input, .picker-search .input { height: 36px; padding-left: 0.9rem; padding-right: 2.3rem; border-radius: 999px; background: linear-gradient(180deg, var(--well), var(--well-2)); box-shadow: var(--sh-well); }

/* ---------- Bars fill like liquid, with a small overshoot ---------- */
.rankbars-bar, .progress > span, .pareto-bar > span { transform-origin: left center; }
.page-enter .rankbars-bar, .page-enter .progress > span, .page-enter .pareto-bar > span, .swap-enter .pareto-bar > span, .swap-enter .progress > span { animation: gel-fill 1s var(--ease-spring) both; animation-delay: calc(0.12s + var(--i, 0) * 45ms); }
@keyframes gel-fill { from { transform: scaleX(0); } }
.page-enter .journey li { animation: gel-step 0.7s var(--ease-spring) both; animation-delay: calc(0.08s + var(--i, 0) * 55ms); }
@keyframes gel-step { from { opacity: 0; transform: translateY(8px) scale(0.86); } }

/* ---------- Dialogs, popovers, toasts ---------- */
.dialog[open]:not(.is-closing):not(.closing) { animation: none; }
.popover:not(.is-leaving) { animation: none; }
.toast:not(.out) { animation: gel-toast 0.62s var(--ease-spring) backwards; }
@keyframes gel-toast { from { opacity: 0; transform: translateY(14px) scale(0.86); } }
.drop-card { animation: gel-chip-in 0.6s var(--ease-spring); }

/* The add bead: an icon tile in viridian (to act), like the other tiles (frame.css). */
.btn-add .i { width: 22px; height: 22px; padding: 4px; border-radius: 7px; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 18%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .status[data-status="en_revue"]::before { animation: none; }
  .page-enter .status, .page-enter .pill-tag, .gel-filter { animation: none; }
}
html.reduce-motion .status[data-status="en_revue"]::before, html.reduce-motion .page-enter .status, html.reduce-motion .page-enter .pill-tag, html.reduce-motion .gel-filter { animation: none; }

/* ---------- Details ---------- */
.detail { animation-duration: 0.55s; animation-timing-function: var(--ease-spring); }
.good.is-on { color: var(--g-ok-ink); background: radial-gradient(72% 95% at 50% 118%, color-mix(in oklab, var(--g-ok) 46%, transparent), transparent 74%), linear-gradient(180deg, color-mix(in oklab, var(--g-ok) 12%, var(--gel-base)), color-mix(in oklab, var(--g-ok) 24%, var(--gel-base))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--g-ok) 32%, transparent), inset 0 1.5px 1px var(--gel-spec); }
.deliverable { transition: background var(--m-100) var(--ease), box-shadow var(--m-100) var(--ease), transform 0.5s var(--ease-spring); }
a.deliverable:active, button.deliverable:active { transform: scale(0.985); transition-duration: 0.08s; }
.btn-icon.is-on { color: var(--g-ok-ink); }

