/* ─────────────────────────────────────────────
   Voltra · Components & layout
   ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  line-height: 1.45;
  color: var(--text-1);
  background: var(--bg-page);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Atmospheric page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(47, 227, 189, 0.03), transparent 60%),
    radial-gradient(700px 600px at -10% 110%, rgba(255, 255, 255, 0.02), transparent 55%);
}
/* Fine grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

svg {
  display: block;
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--acc-400);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: rgba(47, 227, 189, 0.28); }

/* ══════════ Tooltips (data-tip) ══════════ */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  translate: -50% 4px;
  padding: 5px 9px;
  font-size: var(--fs-11);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--text-1);
  background: var(--bg-elevated);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) ease, translate var(--t-med) var(--ease-out-expo);
  z-index: 60;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  opacity: 1;
  translate: -50% 0;
  transition-delay: 350ms;
}
.rail [data-tip]::after {
  left: calc(100% + 10px);
  bottom: auto;
  top: 50%;
  translate: -4px -50%;
}
.rail [data-tip]:hover::after, .rail [data-tip]:focus-visible::after {
  translate: 0 -50%;
}

/* ══════════ Left rail ══════════ */
.rail {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 22px;
  background: var(--bg-rail);
  border-right: 1px solid var(--line-1);
}
.rail__logo {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--acc-400), var(--acc-600));
  color: var(--acc-ink);
  transition: scale var(--t-med) var(--ease-out-back);
}
.rail__logo svg { width: 22px; height: 22px; }
.rail__logo:hover { scale: 1.07; }
.rail__logo:active { scale: 0.96; }

.rail__group { display: flex; flex-direction: column; gap: 6px; }
.rail__group--bottom { margin-top: auto; align-items: center; }

.rail__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  color: var(--text-3);
  transition: color var(--t-fast) ease, background var(--t-fast) ease;
}
.rail__btn:hover { color: var(--text-1); background: var(--bg-chip); }
.rail__btn.is-active {
  color: var(--text-1);
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px var(--line-1);
}
.rail__btn--dot::before {
  content: "";
  position: absolute;
  top: 9px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc-400);
  border: 2px solid var(--bg-rail);
}
.rail__avatar {
  width: 36px; height: 36px;
  margin-top: 4px;
  border-radius: 50%;
  font-size: var(--fs-12);
  font-weight: 600;
  color: hsl(210 60% 80%);
  background: hsl(210 35% 22%);
  border: 1px solid var(--line-2);
  transition: scale var(--t-fast) var(--ease-out-back);
}
.rail__avatar:hover { scale: 1.06; }
.rail__avatar:hover::after { scale: calc(1 / 1.06); }

/* ══════════ Frame / topbar ══════════ */
.frame {
  position: relative;
  z-index: 1;
  height: 100%;
  margin-left: var(--rail-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6) 0 var(--sp-4);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--line-1);
}

.tabs { display: flex; align-items: center; gap: 4px; height: 100%; }
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 var(--sp-4);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text-3);
  transition: color var(--t-fast) ease;
}
.tab::after {
  content: "";
  position: absolute;
  left: var(--sp-4); right: var(--sp-4); bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--acc-400);
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--t-slow) var(--ease-out-expo);
}
.tab.is-active { color: var(--text-1); }
.tab.is-active::after { scale: 1 1; }
.tab:not(.is-active):not(.is-disabled):hover { color: var(--text-2); }
.tab.is-disabled { color: var(--text-disabled); cursor: not-allowed; }
.tab__count {
  display: grid;
  place-items: center;
  min-width: 22px; height: 20px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 500;
  border-radius: var(--r-full);
  color: var(--text-2);
  background: var(--bg-chip);
  border: 1px solid var(--line-1);
}
.tab.is-active .tab__count {
  color: var(--acc-ink);
  background: var(--acc-500);
  border-color: transparent;
}
.topbar__gear {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: color var(--t-fast), background var(--t-fast);
}
.topbar__gear svg { transition: rotate 600ms var(--ease-out-expo); }
.topbar__gear:hover { color: var(--text-1); background: var(--bg-chip); }
.topbar__gear:hover svg { rotate: 60deg; }

/* ══════════ Main / request header ══════════ */
.main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6) 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 220px),
    var(--bg-board);
}

.req {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: 0 var(--sp-8);
  flex-wrap: wrap;
}
.req__crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-13);
}
.req__id {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-chip);
  border: 1px solid var(--line-2);
  padding: 2px 8px;
  border-radius: var(--r-xs);
}
.req__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.req__client { color: var(--text-2); font-weight: 500; }

.req__title {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(var(--fs-32), 3.4vw, var(--fs-40));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.req__count { margin: 0; color: var(--text-3); font-size: var(--fs-13); }
.req__count strong {
  color: var(--text-1);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-14);
}

.req__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.req__toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  font-size: var(--fs-13);
  font-weight: 500;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.chip--outline {
  color: var(--acc-300);
  border: 1px solid rgba(47, 227, 189, 0.3);
  background: transparent;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease;
}
.chip--outline:hover {
  background: var(--acc-soft);
  border-color: var(--line-accent);
}
.chip__icon { width: 15px !important; height: 15px !important; }

.team { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.team__label {
  font-size: var(--fs-10);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.team__stack { display: flex; align-items: center; }
.mini-avatar {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: var(--fs-10);
  font-weight: 600;
  color: hsl(var(--h) 55% 78%);
  background: hsl(var(--h) 32% 21%);
  border: 2px solid var(--bg-board);
  margin-right: -7px;
  transition: translate var(--t-fast) var(--ease-out-back);
}
.team__stack:hover .mini-avatar { translate: 0 -2px; }
.mini-add {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  margin-left: 11px;
  border-radius: 50%;
  color: var(--text-3);
  border: 1px dashed var(--line-3);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.mini-add svg { width: 13px; height: 13px; transition: rotate var(--t-med) var(--ease-out-back); }
.mini-add:hover { color: var(--acc-300); border-color: var(--line-accent); }
.mini-add:hover svg { rotate: 90deg; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  border: 1px solid var(--line-2);
  background: var(--bg-chip);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.icon-btn:hover { color: var(--text-1); border-color: var(--line-3); background: var(--bg-elevated); }
.icon-btn svg { width: 15px; height: 15px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--acc-ink);
  background: var(--acc-500);
  border-radius: var(--r-full);
  transition: background var(--t-fast) ease, scale var(--t-fast) var(--ease-out-back);
}
.status-pill:hover { background: var(--acc-400); }
.status-pill:active { scale: 0.97; }
.status-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-ink); opacity: 0.8; }
.status-pill__chev { width: 14px !important; height: 14px !important; stroke-width: 2 !important; }

.req__brief {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t-fast) ease;
}
.req__brief svg { width: 14px; height: 14px; transition: translate var(--t-med) var(--ease-out-back); }
.req__brief:hover { color: var(--acc-300); }
.req__brief:hover svg { translate: 0 2px; }

/* ══════════ Controls row ══════════ */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-8) var(--sp-4);
}
.controls__right { display: flex; align-items: center; gap: var(--sp-5); }

/* Quick-add morphing combobox */
.qadd { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; }
.qadd__btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  color: var(--acc-ink);
  background: var(--acc-500);
  transition: scale var(--t-med) var(--ease-out-back), background var(--t-fast) ease,
              opacity var(--t-fast) ease;
}
.qadd__btn svg { stroke-width: 2.2; transition: rotate var(--t-med) var(--ease-out-back); }
.qadd__btn:hover { background: var(--acc-400); scale: 1.06; }
.qadd__btn:hover svg { rotate: 90deg; }
.qadd__btn:active { scale: 0.95; }
.qadd__hint {
  font-size: var(--fs-13);
  color: var(--text-3);
  opacity: 0;
  translate: -6px 0;
  transition: opacity var(--t-med) ease, translate var(--t-med) var(--ease-out-expo);
  pointer-events: none;
}
.qadd:hover .qadd__hint { opacity: 1; translate: 0 0; }

.qadd__field {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-2);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: width var(--t-slow) var(--ease-out-expo), opacity var(--t-fast) ease,
              border-color var(--t-fast) ease;
}
.qadd__plus { flex: 0 0 auto; width: 16px; height: 16px; color: var(--acc-300); stroke-width: 2.2; }
.qadd__field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  font-size: var(--fs-14);
}
.qadd__field input::placeholder { color: var(--text-3); }
.qadd__close {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  transition: color var(--t-fast), background var(--t-fast);
}
.qadd__close svg { width: 14px; height: 14px; }
.qadd__close:hover { color: var(--text-1); background: var(--bg-chip); }

.qadd.is-open .qadd__btn { opacity: 0; scale: 0.6; pointer-events: none; }
.qadd.is-open .qadd__hint { display: none; }
.qadd.is-open .qadd__field {
  width: 420px;
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-accent);
  box-shadow: 0 0 0 3px var(--acc-soft), 0 12px 32px rgba(0, 0, 0, 0.4);
}

.qadd__list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 420px;
  max-height: 332px;
  overflow-y: auto;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  translate: 0 -6px;
  scale: 0.98;
  pointer-events: none;
  transform-origin: top left;
  transition: opacity var(--t-fast) ease, translate var(--t-med) var(--ease-out-expo),
              scale var(--t-med) var(--ease-out-expo);
  z-index: 50;
}
.qadd.is-open .qadd__list.has-items { opacity: 1; translate: 0 0; scale: 1; pointer-events: auto; }

.qadd__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  transition: background var(--t-fast) ease;
}
.qadd__item.is-hl, .qadd__item:hover { background: var(--acc-soft); }
.qadd__item-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }
.qadd__item-main { min-width: 0; }
.qadd__item-name { font-weight: 600; font-size: var(--fs-14); }
.qadd__item-name mark {
  background: none;
  color: var(--acc-300);
}
.qadd__item-sub {
  display: flex;
  gap: 8px;
  font-size: var(--fs-12);
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qadd__item-sub .mono { font-family: var(--font-mono); }
.qadd__item-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: var(--fs-11);
  font-weight: 600;
  color: hsl(var(--h) 55% 78%);
  background: hsl(var(--h) 32% 21%);
}
.qadd__empty {
  padding: 18px 16px;
  font-size: var(--fs-13);
  color: var(--text-3);
  text-align: center;
}

/* Switch */
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  position: relative;
  width: 40px; height: 22px;
  border-radius: var(--r-full);
  background: var(--bg-chip);
  border: 1px solid var(--line-2);
  transition: background var(--t-med) ease, border-color var(--t-med) ease;
}
.switch__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: translate var(--t-med) var(--ease-out-back), background var(--t-med) ease, width var(--t-fast) ease;
}
.switch:active .switch__thumb { width: 20px; }
.switch input:checked + .switch__track { background: var(--acc-500); border-color: transparent; }
.switch input:checked + .switch__track .switch__thumb { translate: 18px 0; background: var(--acc-ink); }
.switch:active input:checked + .switch__track .switch__thumb { translate: 14px 0; }
.switch__label { font-size: var(--fs-13); font-weight: 500; color: var(--text-2); }
.switch input:checked ~ .switch__label { color: var(--text-1); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--acc-400); outline-offset: 2px; }

/* Board search */
.bsearch {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 230px;
  height: 40px;
  padding: 0 13px;
  border-radius: var(--r-md);
  background: var(--bg-input);
  border: 1px solid var(--line-1);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-med) ease, width var(--t-slow) var(--ease-out-expo);
}
.bsearch svg { width: 15px; height: 15px; color: var(--text-3); flex: 0 0 auto; }
.bsearch input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  font-size: var(--fs-13);
}
.bsearch input::placeholder { color: var(--text-3); }
.bsearch:focus-within {
  width: 280px;
  border-color: var(--line-accent);
  box-shadow: 0 0 0 3px var(--acc-soft);
}

/* ══════════ Board ══════════ */
.board-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 var(--sp-8) var(--sp-8);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.board-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.board-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 4px; }
.board-scroll::-webkit-scrollbar-track { background: transparent; }

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--col-w);
  gap: var(--sp-4);
  align-items: start;
  width: max-content;
  min-width: 100%;
}

.col {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--bg-column);
  border: 1px solid var(--line-1);
  transition: background var(--t-slow) ease, border-color var(--t-slow) ease;
  min-height: 220px;
}
.col__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 16px 10px;
}
.col__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-15);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.col__hint { font-size: var(--fs-11); color: var(--text-3); font-style: italic; }
.col__count {
  margin-left: auto;
  display: grid;
  place-items: center;
  min-width: 24px; height: 22px;
  padding: 0 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-chip);
  border: 1px solid var(--line-1);
  border-radius: var(--r-full);
  transition: scale var(--t-med) var(--ease-out-back);
}
.col__count.is-bump { animation: bump 420ms var(--ease-out-back); }
@keyframes bump {
  0% { scale: 1; }
  35% { scale: 1.35; background: var(--acc-soft); color: var(--acc-300); }
  100% { scale: 1; }
}

.col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 10px 12px;
  min-height: 60px;
}

/* Drop-target state */
.col.is-over {
  background: var(--acc-soft);
  border-color: var(--line-accent);
}

/* Archived mode keeps the board neutral — no red/green washes */

/* ══════════ Card ══════════ */
.card {
  position: relative;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  padding: 12px 14px 12px;
  cursor: grab;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease,
              box-shadow var(--t-med) ease, opacity var(--t-med) ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.card:hover .card__menu-btn { opacity: 1; }

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: var(--fs-11);
  color: var(--text-3);
}
.card__meta-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card__menu-btn {
  display: grid; place-items: center;
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  opacity: 0;
  transition: opacity var(--t-fast) ease, color var(--t-fast), background var(--t-fast);
}
.card__menu-btn:hover, .card__menu-btn[aria-expanded="true"] { color: var(--text-1); background: var(--bg-chip); opacity: 1; }
.card__menu-btn svg { width: 15px; height: 15px; }

.card__who { display: flex; align-items: center; gap: 11px; }
.card__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px; height: 38px;
  border-radius: 12px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: hsl(var(--h) 55% 78%);
  background: linear-gradient(145deg, hsl(var(--h) 34% 24%), hsl(var(--h) 30% 16%));
  border: 1px solid hsl(var(--h) 30% 30% / 0.5);
}
.card__linked {
  position: absolute;
  right: -4px; bottom: -4px;
  display: grid;
  place-items: center;
  width: 15px; height: 15px;
  border-radius: 5px;
  background: var(--acc-500);
  color: var(--acc-ink);
  border: 2px solid var(--bg-card);
}
.card__linked svg { width: 8px; height: 8px; stroke-width: 3; }
.card__name { margin: 0; font-size: var(--fs-14); font-weight: 600; letter-spacing: -0.005em; }
.card__avail { font-size: var(--fs-12); color: var(--text-3); }
.card__avail strong { color: var(--text-2); font-weight: 500; font-family: var(--font-mono); font-size: var(--fs-11); }

.card__rates {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line-1);
}
.rate { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rate__label {
  font-size: var(--fs-10);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.rate__val {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.rate__val.is-empty { color: var(--text-3); }
.rate--margin .rate__val { color: var(--text-1); }

.card__profile {
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: var(--fs-11);
  font-weight: 600;
  border-radius: var(--r-full);
  color: var(--acc-300);
  background: var(--acc-soft);
  border: 1px solid rgba(47, 227, 189, 0.22);
  transition: background var(--t-fast) ease;
}
.card__profile svg { width: 12px; height: 12px; }
.card__profile:hover { background: rgba(47, 227, 189, 0.16); }
.card__profile.is-none {
  color: var(--text-3);
  background: var(--bg-chip);
  border-color: var(--line-1);
  cursor: default;
}
.card__profile.is-none:hover { box-shadow: none; }

.card__cta {
  display: block;
  width: 100%;
  margin-top: 11px;
  padding: 8px 0;
  text-align: center;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--acc-ink);
  background: var(--acc-500);
  border-radius: var(--r-sm);
  transition: background var(--t-fast) ease;
}
.card__cta:hover { background: var(--acc-400); }

/* Dragging states */
body.is-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.card.is-drag {
  position: fixed;
  z-index: 100;
  cursor: grabbing;
  box-shadow: var(--shadow-drag);
  background: var(--bg-elevated);
  transition: none;
  pointer-events: none;
}
.card.is-search-miss {
  opacity: 0.18;
  scale: 0.97;
  filter: saturate(0.4);
  pointer-events: none;
}

.drop-slot {
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line-accent);
  background: var(--acc-soft);
  transition: height var(--t-med) var(--ease-out-expo);
}

/* Archived card variant */
.card--archived { cursor: grab; }
.card--archived .card__avatar { filter: saturate(0.35); opacity: 0.85; }
.card--archived .card__name { color: var(--text-2); }
.card--archived .card__meta { color: var(--text-3); }
.card__x {
  position: absolute;
  left: 34px; top: 34px;
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-2);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--line-2);
}
.card__x svg { width: 8px; height: 8px; stroke-width: 3; }

/* ══════════ Graveyard (archived row) ══════════ */
.graveyard {
  margin-top: var(--sp-6);
  overflow: hidden;
}
.col--ghost {
  background: transparent;
  border: 1px dashed var(--line-1);
  min-height: 96px;
  transition: background var(--t-med) ease, border-color var(--t-med) ease;
}
.col--ghost .col__list { padding-top: 10px; }
.col--ghost.is-over { background: var(--acc-soft); border-color: var(--line-accent); border-style: solid; }
.graveyard__hint {
  margin: 0 0 0 2px;
  font-size: var(--fs-12);
  color: var(--text-3);
}
.graveyard__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-4) 2px;
  border-top: 1px solid var(--line-1);
}
.graveyard__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-15);
  font-weight: 600;
}
.graveyard__count {
  display: grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  border-radius: var(--r-full);
  color: var(--text-2);
  background: var(--bg-chip);
  border: 1px solid var(--line-2);
}
.link-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t-fast) ease;
}
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { color: var(--acc-300); }

/* ══════════ Popover menu ══════════ */
.popover {
  position: fixed;
  z-index: 90;
  min-width: 190px;
  padding: 5px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  scale: 0.92;
  translate: 0 -4px;
  transform-origin: top right;
  transition: opacity var(--t-fast) ease, scale var(--t-med) var(--ease-out-back), translate var(--t-med) var(--ease-out-back);
  pointer-events: none;
}
.popover.is-open { opacity: 1; scale: 1; translate: 0 0; pointer-events: auto; }
.popover__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  font-size: var(--fs-13);
  font-weight: 500;
  border-radius: var(--r-sm);
  text-align: left;
  color: var(--text-1);
  transition: background var(--t-fast) ease;
}
.popover__item svg { width: 15px; height: 15px; color: var(--text-2); }
.popover__item:hover { background: var(--bg-chip); }
.popover__item--danger { color: var(--danger-400); }
.popover__item--danger svg { color: var(--danger-400); }
.popover__item--danger:hover { background: var(--danger-soft); }
.popover__rule { height: 1px; margin: 4px 6px; background: var(--line-1); }

/* ══════════ Toasts ══════════ */
.toasts {
  position: fixed;
  z-index: 200;
  bottom: 24px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: var(--fs-13);
  font-weight: 500;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-toast);
}
.toast svg { width: 15px; height: 15px; color: var(--text-1); stroke-width: 2.2; }
.toast--danger svg { color: var(--danger-400); }
.toast strong { font-weight: 600; }

/* ══════════ Disclaimer ══════════ */
.disclaimer {
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 5;
  font-size: var(--fs-10);
  letter-spacing: 0.04em;
  color: var(--text-3);
  opacity: 0.7;
  pointer-events: none;
}

/* ══════════ Entrance choreography ══════════ */
[data-enter] { opacity: 0; }
.no-anim [data-enter], [data-enter].is-in { opacity: 1; }

/* ══════════ Reduced motion ══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-enter] { opacity: 1; }
}

/* ══════════ Responsive ══════════ */
@media (max-width: 900px) {
  .req { flex-direction: column; align-items: flex-start; }
  .req__right { align-items: flex-start; }
  .req__brief { display: none; }
  .controls { flex-wrap: wrap; }
  .qadd.is-open .qadd__field, .qadd__list { width: min(420px, calc(100vw - var(--rail-w) - 48px)); }
}
