/* ==========================================================================
   Initio app — design system
   The marketing site's language (initiochat.com) translated for a tool people
   work in all day: the stickers, the lime, the ink, the bouncy easing live on
   the chrome and the moments; the working surfaces (threads, tables, forms)
   stay calm, flat and dense.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* the palette, exactly the site's */
  --page: #e7f8dc;         /* pale lime page */
  --paper: #ffffff;        /* cards, stickers */
  --paper-2: #f4f7f0;      /* quiet inset surfaces */
  --lime: #9fe870;
  --lime-deep: #7fd24a;
  --ink: #0b0b0b;
  --ink-soft: #14141a;
  --fg: #0b0b0b;
  --fg-muted: #55555f;
  --fg-faint: #8b8b95;
  --on-dark: #f7f7f4;
  --on-dark-muted: #a6a6a0;
  --line: rgba(11, 11, 11, 0.12);
  --line-strong: rgba(11, 11, 11, 0.24);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  /* status hues: same family as the site's accent set */
  --rose: #ef5b8b; --amber: #f6a44b; --sky: #5b9bf5; --violet: #8b7cf6; --green: #22c55e;
  /* sticker geometry: chrome and moments only */
  --shadow-ink: var(--ink);
  --sticker-border: 2px solid var(--ink);
  --sticker-shadow: 4px 4px 0 var(--shadow-ink);
  --sticker-shadow-sm: 3px 3px 0 var(--shadow-ink);
  --sticker-shadow-hover: 6px 7px 0 var(--shadow-ink);
  /* quiet surfaces: where you read and work. A hairline and depth, no ink. */
  --hair: rgba(11, 11, 11, 0.09);
  --hair-strong: rgba(11, 11, 11, 0.16);
  --depth: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px -12px rgba(11, 11, 11, 0.18);
  --depth-hover: 0 2px 4px rgba(11, 11, 11, 0.05), 0 14px 32px -14px rgba(11, 11, 11, 0.24);
  /* type */
  --font: "Bricolage Grotesque", "Bricolage Grotesque Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.8rem; --fs-sm: 0.9rem; --fs-body: 0.975rem; --fs-md: 1.05rem; --fs-lg: 1.35rem; --fs-xl: 1.9rem; --fs-2xl: 2.6rem;
  /* motion, measured from the site */
  --ease-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-bounce: cubic-bezier(0.34, 1.57, 0.64, 1);
  --ease-soft-bounce: cubic-bezier(0.34, 1.17, 0.64, 1);
  --jig-ease-bounce: cubic-bezier(0.34, 2.27, 0.64, 1);
  --dur-fast: 0.18s; --dur-base: 0.4s; --dur-slow: 0.7s;
  /* shape */
  --r-pill: 999px; --r-lg: 22px; --r-md: 14px; --r-sm: 9px;
  /* layout */
  --rail-w: 84px; --rail-w-open: 236px; --top-h: 64px; --gutter: clamp(1rem, 0.5rem + 1.5vw, 2rem);
}
html[data-theme="dark"] {
  --page: #0b0b0b; --paper: #16161a; --paper-2: #1e1e24;
  --fg: #f7f7f4; --fg-muted: #a6a6a0; --fg-faint: #6f6f78;
  --line: rgba(255, 255, 255, 0.12); --line-strong: rgba(255, 255, 255, 0.24);
  --shadow-ink: var(--lime);
  --sticker-border: 2px solid rgba(255, 255, 255, 0.16);
  --hair: rgba(255, 255, 255, 0.08); --hair-strong: rgba(255, 255, 255, 0.14);
  --depth: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --depth-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 36px -14px rgba(0, 0, 0, 0.7);
}

/* ---------- font ---------- */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

/* ---------- reset the parts of the old shell we keep loading for its JS ---------- */
html, body { margin: 0; padding: 0; background: var(--page); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- typography ---------- */
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.02em; color: var(--fg-muted); }
.kicker-caps { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.kicker.on-dark { color: var(--on-dark-muted); }
.display { font-size: var(--fs-2xl); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; }
.title { font-size: var(--fs-xl); font-weight: 800; line-height: 1; letter-spacing: -0.035em; }
.h { font-size: var(--fs-lg); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.num { font-variant-numeric: tabular-nums; }
/* the lime highlighter swipe behind a word */
.mark { position: relative; display: inline-block; padding: 0 0.18em; color: var(--ink); isolation: isolate; }
.mark::before { content: ""; position: absolute; inset: 0.08em -0.05em 0.04em; background: var(--lime); border-radius: 0.18em; z-index: -1; transform: scaleX(var(--swipe, 1)); transform-origin: 0 50%; transition: transform var(--dur-base) var(--ease-smooth); rotate: -1deg; }
html[data-theme="dark"] .mark { color: var(--ink); }

/* ---------- stickers (cards) ---------- */
.stk { position: relative; background: var(--paper); border: var(--sticker-border); border-radius: var(--r-lg); box-shadow: var(--sticker-shadow); }
.stk-sm { border-radius: var(--r-md); box-shadow: var(--sticker-shadow-sm); }
.stk-flat { box-shadow: none; }
.stk-ink { background: var(--ink); color: var(--on-dark); border-color: var(--ink); --shadow-ink: var(--lime); }
.stk-lime { background: var(--lime); color: var(--ink); border-color: var(--ink); --shadow-ink: var(--ink); }
html[data-theme="dark"] .stk-ink { background: var(--ink-soft); border-color: rgba(255,255,255,0.16); }
.stk-hover { transition: translate var(--dur-base) var(--ease-bounce), box-shadow var(--dur-base) var(--ease-bounce), rotate var(--dur-base) var(--ease-bounce); }
.stk-hover:hover { translate: 0 -3px; box-shadow: var(--sticker-shadow-hover); }
.stk-tilt-l { rotate: -1.2deg; } .stk-tilt-r { rotate: 1.2deg; }
.stk-head { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.15rem 0.7rem; }
.stk-head .h { flex: 1; min-width: 0; }
.stk-body { padding: 0.6rem 1.15rem 1.15rem; }
.stk-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.7rem 1.15rem 1rem; border-top: 1.5px dashed var(--line); }
/* quiet working surface: hairline + depth — the thread, lists, tables, forms, side panels */
.surface { background: var(--paper); border: 1px solid var(--hair-strong); border-radius: var(--r-lg); box-shadow: var(--depth); }
.surface-hover { transition: box-shadow var(--dur-base) var(--ease-smooth), translate var(--dur-base) var(--ease-bounce), border-color var(--dur-fast); }
.surface-hover:hover { box-shadow: var(--depth-hover); translate: 0 -2px; }
.divider { border: 0; border-top: 1px solid var(--hair); margin: 0; }

/* ---------- buttons: the site's, with the jig ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 0.55em; padding: 0.62em 1.15em; border-radius: var(--r-pill); font-weight: 800; font-size: var(--fs-sm); line-height: 1; white-space: nowrap; border: 2.5px solid var(--ink); background: var(--paper); color: var(--ink); transition: translate var(--dur-base) var(--jig-ease-bounce), rotate var(--dur-base) var(--jig-ease-bounce), box-shadow var(--dur-base) var(--jig-ease-bounce), background-color var(--dur-fast), color var(--dur-fast); }
.btn .btn__label { display: inline-block; transition: transform var(--dur-base) var(--jig-ease-bounce); }
.btn .btn__ico { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; transition: transform var(--dur-base) var(--jig-ease-bounce); }
.btn .btn__ico svg { width: 0.85em; height: 0.85em; }
.btn:hover { translate: 0.05em -0.12em; rotate: -1.2deg; }
.btn:hover .btn__label { transform: rotate(-3deg) translate(-0.04em, -0.05em); }
.btn:hover .btn__ico { transform: rotate(-14deg) scale(1.15); }
.btn:active { translate: 0 2px; rotate: 0deg; transition-duration: 0.08s; }
.btn-lime { background: var(--lime); box-shadow: 4px 4px 0 var(--ink); }
.btn-lime:hover { box-shadow: 6px 7px 0 var(--ink); }
.btn-lime:active { box-shadow: 2px 2px 0 var(--ink); }
.btn-lime .btn__ico { background: var(--ink); color: var(--lime); }
.btn-ink { background: var(--ink); color: var(--on-dark); box-shadow: 4px 4px 0 var(--lime); }
.btn-ink:hover { box-shadow: 6px 7px 0 var(--lime); }
.btn-ink:active { box-shadow: 2px 2px 0 var(--lime); }
.btn-ink .btn__ico { background: var(--lime); color: var(--ink); }
.btn-paper { box-shadow: 4px 4px 0 var(--ink); }
.btn-paper:hover { box-shadow: 6px 7px 0 var(--ink); }
.btn-paper:active { box-shadow: 2px 2px 0 var(--ink); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--paper-2); color: var(--fg); rotate: 0deg; translate: 0; }
.btn-danger { background: var(--rose); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-sm { padding: 0.45em 0.9em; font-size: var(--fs-xs); }
.btn-lg { padding: 0.75em 1.4em; font-size: var(--fs-body); }
.btn-icon { padding: 0; width: 2.4rem; height: 2.4rem; justify-content: center; border-radius: 50%; }
.btn-icon svg { width: 1.05rem; height: 1.05rem; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }
html[data-theme="dark"] .btn { border-color: rgba(255,255,255,0.18); background: var(--paper); color: var(--fg); }
html[data-theme="dark"] .btn-lime { background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: 4px 4px 0 rgba(255,255,255,0.18); }
html[data-theme="dark"] .btn-ink { background: var(--paper-2); box-shadow: 4px 4px 0 var(--lime); }
html[data-theme="dark"] .btn-paper { box-shadow: 4px 4px 0 var(--lime); }

/* ---------- pills, chips, badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.3em 0.75em; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; white-space: nowrap; border: 1.5px solid var(--hair-strong); background: var(--paper); color: var(--fg); }
.pill-lime { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.pill-ink { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.pill-soft { border-color: transparent; background: color-mix(in srgb, var(--pill-hue, var(--lime)) 22%, transparent); color: var(--fg); }
.pill-rose { --pill-hue: var(--rose); } .pill-amber { --pill-hue: var(--amber); } .pill-sky { --pill-hue: var(--sky); } .pill-violet { --pill-hue: var(--violet); } .pill-green { --pill-hue: var(--green); }
.pill .dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; }
.pill .dot.live { background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,0.5); animation: pulse-dot 1.8s ease-out infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
html[data-theme="dark"] .pill { border-color: rgba(255,255,255,0.18); background: var(--paper-2); color: var(--fg); }
html[data-theme="dark"] .pill-lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
html[data-theme="dark"] .pill-ink { background: var(--ink); color: var(--on-dark); }
/* the tiny lime count pip (unread) */
.pip { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 0.35em; border-radius: var(--r-pill); background: var(--lime); color: var(--ink); border: 1.5px solid var(--ink); font-size: 0.7rem; font-weight: 800; line-height: 1; }
.pip.is-new { animation: pip-in var(--dur-slow) var(--ease-bounce); }
@keyframes pip-in { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }

/* ---------- avatars ---------- */
.ava { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(11,11,11,0.12); background: var(--ava-bg, var(--lime)); color: var(--ink); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.02em; flex: none; position: relative; }
.ava-sm { width: 1.85rem; height: 1.85rem; font-size: 0.66rem; }
.ava-lg { width: 3.4rem; height: 3.4rem; font-size: 1.05rem; }
.ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ava .presence { position: absolute; right: -3px; bottom: -3px; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 2.5px solid var(--paper); background: var(--fg-faint); }
.ava .presence.online { background: var(--green); } .ava .presence.away { background: var(--amber); }
html[data-theme="dark"] .ava { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.ava-stack { display: inline-flex; } .ava-stack .ava { margin-left: -0.6rem; box-shadow: 0 0 0 2px var(--paper); } .ava-stack .ava:first-child { margin-left: 0; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field > label { font-size: var(--fs-xs); font-weight: 700; color: var(--fg-muted); }
.input { width: 100%; padding: 0.7em 0.95em; border-radius: var(--r-md); border: 1.5px solid var(--hair-strong); background: var(--paper); color: var(--fg); font-size: var(--fs-body); transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-bounce), translate var(--dur-base) var(--ease-bounce); }
.input::placeholder { color: var(--fg-faint); }
.input:hover { border-color: var(--fg-muted); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 45%, transparent); }
html[data-theme="dark"] .input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(159,232,112,0.25); }
.input.is-invalid { border-color: var(--rose); animation: shake 0.4s var(--ease-smooth); }
@keyframes shake { 10%, 90% { translate: -2px 0; } 30%, 70% { translate: 3px 0; } 50% { translate: -3px 0; } }
textarea.input { resize: vertical; min-height: 6rem; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 0.9rem; top: 50%; translate: 0 -50%; width: 1rem; height: 1rem; color: var(--fg-faint); pointer-events: none; }
.input-wrap > .input { padding-left: 2.6rem; }
/* switch: lime knob pops across on the bounce */
.switch { position: relative; display: inline-block; width: 3rem; height: 1.7rem; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); border: 2.5px solid var(--ink); background: var(--paper); transition: background-color var(--dur-fast); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.7rem - 9px); height: calc(1.7rem - 9px); border-radius: 50%; background: var(--ink); transition: translate var(--dur-base) var(--ease-bounce), background-color var(--dur-fast); }
.switch input:checked + i { background: var(--lime); }
.switch input:checked + i::after { translate: 1.3rem 0; }
.switch input:active + i::after { scale: 1.15 0.9; }
html[data-theme="dark"] .switch i { border-color: rgba(255,255,255,0.2); background: var(--paper-2); } html[data-theme="dark"] .switch i::after { background: var(--fg); } html[data-theme="dark"] .switch input:checked + i::after { background: var(--ink); }

/* ---------- segmented tabs: a rail of pills, the active one lime and sliding ---------- */
.seg { position: relative; display: inline-flex; gap: 0.2rem; padding: 0.25rem; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--hair-strong); }
.seg > button, .seg > a { position: relative; z-index: 1; padding: 0.45em 0.95em; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 800; color: var(--fg-muted); transition: color var(--dur-fast); display: inline-flex; align-items: center; gap: 0.45em; }
.seg > .is-active { color: var(--ink); }
.seg > button:hover:not(.is-active) { color: var(--fg); }
.seg .seg-ink { position: absolute; z-index: 0; top: 0.3rem; bottom: 0.3rem; left: 0; width: 0; border-radius: var(--r-pill); background: var(--lime); transition: left var(--dur-base) var(--ease-bounce), width var(--dur-base) var(--ease-bounce); }
html[data-theme="dark"] .seg { border-color: var(--hair-strong); background: var(--paper-2); } html[data-theme="dark"] .seg > .is-active { color: var(--ink); }

/* ---------- tables: the working surface ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; padding: 0.7rem 1rem; font-size: var(--fs-xs); font-weight: 700; color: var(--fg-muted); border-bottom: 1px solid var(--hair-strong); }
.tbl td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--hair); vertical-align: middle; font-size: var(--fs-sm); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color var(--dur-fast); }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--lime) 12%, transparent); }
.tbl tbody tr.is-new { animation: row-in var(--dur-slow) var(--ease-bounce); }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- lists of stickers ---------- */
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- icon tiles: square, tinted, the site's accent set ---------- */
.tile { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; border: 1px solid rgba(11,11,11,0.1); background: color-mix(in srgb, var(--tile-hue, var(--lime)) 30%, var(--paper)); color: var(--ink); flex: none; }
.tile svg, .tile img { width: 1.3rem; height: 1.3rem; }
.tile-lime { --tile-hue: var(--lime); } .tile-rose { --tile-hue: var(--rose); } .tile-amber { --tile-hue: var(--amber); } .tile-sky { --tile-hue: var(--sky); } .tile-violet { --tile-hue: var(--violet); }
.tile-lg { width: 3.4rem; height: 3.4rem; border-radius: 16px; } .tile-lg svg, .tile-lg img { width: 1.8rem; height: 1.8rem; }
html[data-theme="dark"] .tile { border-color: rgba(255,255,255,0.1); color: var(--fg); background: color-mix(in srgb, var(--tile-hue, var(--lime)) 22%, var(--paper-2)); }

/* ---------- the stamp (Closed / Resolved) ---------- */
.stamp { display: inline-block; padding: 0.15em 0.5em; border: 3px solid currentColor; border-radius: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose); rotate: -8deg; opacity: 0.92; mix-blend-mode: multiply; }
.stamp-lime { color: #2f8f3e; }
.stamp.is-in { animation: stamp-in 0.5s var(--ease-bounce); }
@keyframes stamp-in { 0% { transform: scale(2.4) rotate(6deg); opacity: 0; } 60% { transform: scale(0.94) rotate(-9deg); opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }
html[data-theme="dark"] .stamp { mix-blend-mode: screen; }

/* ---------- toasts: a sticker that pops up bottom-centre ---------- */
.toasts { position: fixed; left: 50%; bottom: 1.4rem; translate: -50% 0; z-index: 4000; display: flex; flex-direction: column; gap: 0.6rem; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1rem 0.7rem 0.8rem; border-radius: var(--r-pill); background: var(--ink); color: var(--on-dark); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--lime); font-weight: 700; font-size: var(--fs-sm); max-width: min(92vw, 34rem); animation: toast-in var(--dur-slow) var(--ease-bounce); }
.toast .tile { width: 1.9rem; height: 1.9rem; border-radius: 8px; border-color: transparent; }
.toast.is-out { animation: toast-out 0.35s var(--ease-smooth) forwards; }
@keyframes toast-in { from { transform: translateY(40px) scale(0.8) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(30px) scale(0.85); opacity: 0; } }

/* ---------- empty states: an illustration and a line in the site's voice ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.6rem; padding: 2.5rem 1.5rem; }
.empty img { width: clamp(120px, 22vw, 200px); height: auto; margin-bottom: 0.4rem; }
.empty .h { max-width: 24ch; } .empty p { max-width: 36ch; color: var(--fg-muted); font-size: var(--fs-sm); }
/* generated art: pops in with a bounce, idles on a slow float, tilts toward the pointer */
.empty-art, .art { display: block; height: auto; user-select: none; -webkit-user-drag: none; }
.empty .empty-art { width: clamp(96px, 14vw, 150px); margin-bottom: 0.2rem; animation: art-in 0.7s var(--ease-bounce) both, art-float 5s ease-in-out 0.7s infinite; transition: transform var(--dur-base) var(--ease-bounce); }
.empty:hover .empty-art { transform: rotate(-5deg) scale(1.06); }
@keyframes art-in { from { opacity: 0; transform: translateY(14px) scale(0.8) rotate(6deg); } }
@keyframes art-float { 50% { translate: 0 -5px; } }
/* icons: the line glyph by default; the clay render only where it's big enough to read */
svg.has-3d .ico-3d { display: none; }
:is(.rail-ico, .tile, .big-ico) > svg.has-3d { overflow: visible; transition: transform var(--dur-base) var(--ease-bounce); }
:is(.rail-ico, .tile, .big-ico) > svg.has-3d .ico-line { display: none; }
:is(.rail-ico, .tile, .big-ico) > svg.has-3d .ico-3d { display: inline; }
:is(button, a):hover .tile > svg.has-3d, .tile:hover > svg.has-3d { transform: rotate(-8deg) scale(1.1); }
:is(button, a):active .tile > svg.has-3d { transform: scale(0.9); }
/* a render in a tile needs no tinted box behind it: the tile turns into a soft plate */
.tile:has(> svg.has-3d) { background: var(--paper-2); border-color: var(--hair); }
.tile:has(> svg.has-3d) > svg { width: 1.55rem; height: 1.55rem; }
.tile-lg:has(> svg.has-3d) > svg { width: 2.1rem; height: 2.1rem; }

/* ---------- reveal (pop-in on the bouncy ease, staggered by --i) ---------- */
[data-pop] { opacity: 0; transform: translateY(14px) scale(0.96); }
[data-pop].is-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-smooth), transform var(--dur-slow) var(--ease-bounce); transition-delay: calc(var(--i, 0) * 60ms); }

/* ---------- skeleton ---------- */
.skel { position: relative; overflow: hidden; background: var(--paper-2); border-radius: 8px; color: transparent; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lime) 25%, transparent), transparent); animation: skel 1.4s linear infinite; }
@keyframes skel { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- scrollbars: ours, drawn (shell.js vbar) ----------
   .scroll hides the native bar; a thin track with an ink thumb is drawn
   inside the box, fades in on hover or while scrolling, and can be dragged. */
.scroll { overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.scroll::-webkit-scrollbar { display: none; }
.vbar-host { position: relative; }
.vbar { position: absolute; top: 6px; bottom: 6px; right: 3px; width: 6px; border-radius: 6px; opacity: 0; transition: opacity var(--dur-base), width var(--dur-fast); z-index: 4; touch-action: none; }
.vbar i { position: absolute; left: 0; right: 0; top: 0; min-height: 24px; border-radius: 6px; background: var(--fg); opacity: 0.28; transition: opacity var(--dur-fast), background-color var(--dur-fast); }
.vbar-host:hover .vbar, .vbar.is-live { opacity: 1; }
.vbar:hover, .vbar.is-drag { width: 9px; } .vbar:hover i { opacity: 0.45; }
.vbar.is-drag i { background: var(--lime); opacity: 1; box-shadow: 0 0 0 1.5px var(--ink); }
.vbar.is-off { display: none; }

/* ---------- utilities ---------- */
.row { display: flex; align-items: center; gap: 0.6rem; } .row-between { justify-content: space-between; } .row-wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 0.3rem; }
.grow { flex: 1; min-width: 0; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- modals (shared) ---------- */
.modal { position: fixed; inset: 0; z-index: 3200; display: grid; place-items: center; padding: 1rem; }
.modal-scrim { position: absolute; inset: 0; background: rgba(11,11,11,0.4); opacity: 0; transition: opacity var(--dur-base); }
.modal-panel { position: relative; width: min(34rem, 100%); transform: translateY(24px) scale(0.92) rotate(-1deg); opacity: 0; transition: transform var(--dur-slow) var(--ease-bounce), opacity var(--dur-fast); }
.modal-sm { width: min(26rem, 100%); }
.modal.is-open .modal-scrim { opacity: 1; } .modal.is-open .modal-panel { transform: none; opacity: 1; }
.modal[hidden] { display: none; }

/* a stored colour (tag, department) is only ever a small dot, never a fill */
.cdot { display: inline-block; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c, var(--lime)); box-shadow: inset 0 0 0 1px rgba(11,11,11,0.15); }

/* ---------- custom select (shell.js upgradeSelect) ---------- */
.sel { position: relative; display: inline-block; min-width: 10rem; }
.field .sel, .ws-form .sel { display: block; width: 100%; }
.sel-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; }
.sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; text-align: left; cursor: pointer; background-image: none !important; }
.sel-btn.input-sm { padding: 0.45em 0.7em 0.45em 0.85em; }
.sel-btn svg { width: 0.95rem; height: 0.95rem; flex: none; color: var(--fg-muted); transition: transform var(--dur-base) var(--ease-bounce); }
.sel.is-open .sel-btn { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 45%, transparent); }
html[data-theme="dark"] .sel.is-open .sel-btn { border-color: var(--lime); }
.sel.is-open .sel-btn svg { transform: rotate(90deg); }
.sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-pop { position: absolute; left: 0; right: 0; top: calc(100% + 0.4rem); z-index: 60; min-width: 12rem; padding: 0.35rem; background: var(--paper); border: 1px solid var(--hair-strong); border-radius: var(--r-md); box-shadow: var(--depth-hover); transform-origin: 50% 0; opacity: 0; transform: scale(0.94) translateY(-4px); transition: opacity var(--dur-fast), transform var(--dur-base) var(--ease-bounce); }
.sel-pop.is-up { top: auto; bottom: calc(100% + 0.4rem); transform-origin: 50% 100%; }
.sel.is-open .sel-pop { opacity: 1; transform: none; }
.sel-search { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.5rem 0.5rem; border-bottom: 1px solid var(--hair); margin-bottom: 0.3rem; }
.sel-search svg { width: 0.9rem; height: 0.9rem; color: var(--fg-faint); } .sel-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: var(--fs-sm); }
.sel-list { max-height: 16rem; display: flex; flex-direction: column; gap: 0.05rem; }
.sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0.5rem 0.65rem; border-radius: var(--r-sm); text-align: left; font-size: var(--fs-sm); font-weight: 600; transition: background-color var(--dur-fast); }
.sel-opt svg { width: 0.9rem; height: 0.9rem; flex: none; }
.sel-opt:hover, .sel-opt.is-hi { background: var(--paper-2); }
.sel-opt.is-sel { background: color-mix(in srgb, var(--lime) 30%, var(--paper)); color: var(--ink); }
html[data-theme="dark"] .sel-opt.is-sel { color: var(--fg); background: color-mix(in srgb, var(--lime) 20%, var(--paper-2)); }
.sel-empty { padding: 0.8rem; font-size: var(--fs-xs); color: var(--fg-faint); text-align: center; }

/* Tiles are one quiet style. Colour on an icon tile was decoration, not
   information; lime stays for the page's primary tile, rose for danger. */
.tile, .tile-sky, .tile-amber, .tile-violet { --tile-hue: var(--fg); background: var(--paper-2); color: var(--fg); border-color: var(--hair); }
.tile-lime { background: color-mix(in srgb, var(--lime) 35%, var(--paper)); color: var(--ink); border-color: color-mix(in srgb, var(--lime) 60%, transparent); }
.tile-rose { background: color-mix(in srgb, var(--rose) 14%, var(--paper)); color: var(--rose); border-color: color-mix(in srgb, var(--rose) 35%, transparent); }
html[data-theme="dark"] .tile, html[data-theme="dark"] .tile-sky, html[data-theme="dark"] .tile-amber, html[data-theme="dark"] .tile-violet { background: var(--paper-2); color: var(--fg); }
html[data-theme="dark"] .tile-lime { background: color-mix(in srgb, var(--lime) 22%, var(--paper-2)); color: var(--lime); }

/* ---------- one language per surface ----------
   Inside a quiet surface every control is quiet: no ink border, no hard
   offset shadow. The sticker treatment is reserved for the page header's
   primary action and the chrome. */
.surface .btn-paper, .surface .btn-ink:not(.is-primary), .modal-panel .btn-paper { border: 1px solid var(--hair-strong); box-shadow: none; background: var(--paper); color: var(--fg); }
.surface .btn-paper:hover, .modal-panel .btn-paper:hover { box-shadow: var(--depth); rotate: 0deg; translate: 0 -1px; }
.surface .btn-lime:not(.is-primary) { border: 1px solid color-mix(in srgb, var(--lime) 70%, var(--ink)); box-shadow: none; }
.surface .btn-lime:not(.is-primary):hover { box-shadow: var(--depth); rotate: 0deg; translate: 0 -1px; }
.surface .btn-icon.btn-paper, .surface .btn-icon.btn-lime { border-radius: var(--r-md); }
html[data-theme="dark"] .surface .btn-paper, html[data-theme="dark"] .surface .btn-lime:not(.is-primary) { box-shadow: none; }
/* segmented controls hug their content, even inside a field */
.field .seg, .ws-form .seg { display: inline-flex; align-self: flex-start; width: auto; }

/* ---------- the initio wordmark (resources/views/ui/logo.blade.php) ---------- */
.lg { display: block; overflow: visible; }
.lg .lg-lines { color: var(--ink); }
.lg-l, .lg-bubble, .lg-line { transform-box: fill-box; }
.lg-l { transform-origin: 50% 100%; } .lg-bubble { transform-origin: 8% 100%; } .lg-line { transform-origin: 0% 50%; }
/* .lg-enter plays it in once (letters hop up in turn, bubble pops, lines type); hovering a link around it replays the site's hop */
.lg-enter .lg-l { animation: lg-in 0.62s var(--ease-bounce) calc(0.06s + var(--i) * 0.045s) both; }
.lg-enter .lg-bubble { animation: lg-pop-in 0.8s var(--ease-bounce) 0.2s both; }
.lg-enter .lg-line { animation: lg-type 0.45s var(--ease-bounce) calc(0.5s + var(--i) * 0.14s) both; }
a:hover > .lg-hover .lg-l { animation: lg-hop 0.7s var(--ease-bounce) calc(var(--i) * 0.06s) both; }
a:hover > .lg-hover .lg-bubble { animation: lg-pop 0.9s var(--ease-bounce) 0.15s both; }
@keyframes lg-in { 0% { opacity: 0; transform: translateY(70%) scaleY(0.6); } 60% { opacity: 1; transform: translateY(-10%) scaleY(1.08) scaleX(0.95); } 100% { transform: none; } }
@keyframes lg-pop-in { 0% { opacity: 0; transform: scale(0) rotate(-30deg); } 55% { opacity: 1; transform: scale(1.18) rotate(8deg); } 80% { transform: scale(0.96) rotate(-3deg); } 100% { transform: none; } }
@keyframes lg-type { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes lg-hop { 0% { transform: none; } 35% { transform: translateY(-14%) scaleY(1.08) scaleX(0.94); } 65% { transform: translateY(2%) scaleY(0.94) scaleX(1.06); } 100% { transform: none; } }
@keyframes lg-pop { 0% { transform: none; } 25% { transform: scale(1.22) rotate(-10deg); } 50% { transform: scale(1.1) rotate(8deg); } 72% { transform: scale(1.04) rotate(-4deg); } 100% { transform: none; } }
.tile-rose:has(> svg.has-3d) { background: color-mix(in srgb, var(--rose) 14%, var(--paper)); border-color: color-mix(in srgb, var(--rose) 35%, transparent); }
