/* ==========================================================================
   INNO BRAIN — components: cards, tiles, charts, forms, chat, overlays
   ========================================================================== */

/* --- cards ---------------------------------------------------------------- */

.card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(168deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
  transition: border-color var(--quick), transform var(--quick), box-shadow var(--quick);
}
.card.hoverable:hover { border-color: var(--panel-3); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card.flush { padding: 0; overflow: hidden; }
.card.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--accent), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: .55;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 11.5px; color: var(--ink-3); }
.card-head .spacer { margin-left: auto; }

/* --- KPI tiles ------------------------------------------------------------ */

.tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--quick), border-color var(--quick);
}
.tile:hover { transform: translateY(-2px); border-color: var(--panel-3); }
.tile-top { display: flex; align-items: center; gap: 9px; }
.tile-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.tile-icon svg { width: 15px; height: 15px; }
.tile-label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tile-value { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.tile-value.sm { font-size: 21px; }
.tile-foot { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }

.delta { font-size: 11.5px; font-weight: 640; padding: 1px 7px; border-radius: 99px; }
.delta.up   { background: rgba(45,212,167,.14); color: var(--mint); }
.delta.down { background: rgba(255,107,107,.14); color: var(--coral); }
.delta.flat { background: var(--panel-3); color: var(--ink-3); }

/* --- buttons -------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 580;
  overflow: hidden;
  transition: background var(--quick), border-color var(--quick), transform var(--quick), color var(--quick);
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--panel-3); border-color: var(--panel-3); }
.btn:active { transform: scale(.975); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -12px var(--accent);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--ink); }
.btn.danger { color: var(--coral); border-color: rgba(255,107,107,.3); background: rgba(255,107,107,.08); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.icon { padding: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Ripple, drawn from the click point (see ui.js). */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: .22;
  pointer-events: none;
  animation: ripple 560ms var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
  transition: background var(--quick), color var(--quick), border-color var(--quick);
}
button.chip:hover { background: var(--panel-3); color: var(--ink); }
.chip.is-on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: .02em;
}
.pill.p1 { background: rgba(255,107,107,.15); color: var(--coral); }
.pill.p2 { background: rgba(245,181,68,.15);  color: var(--amber); }
.pill.p3 { background: rgba(91,157,255,.15);  color: var(--blue); }
.pill.ok { background: rgba(45,212,167,.15);  color: var(--mint); }
.pill.mute { background: var(--panel-3); color: var(--ink-3); }

/* --- forms ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color var(--quick), background var(--quick), box-shadow var(--quick);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.select { appearance: none; background-image: none; cursor: pointer; }
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row > * { flex: 1 1 150px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 21px;
  border-radius: 99px;
  background: var(--panel-3);
  position: relative;
  transition: background var(--quick);
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--ink-2);
  transition: transform var(--quick), background var(--quick);
}
.switch input:checked + .track { background: var(--accent-soft); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--accent); }

/* --- lists ---------------------------------------------------------------- */

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--quick);
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: rgba(255,255,255,.015); }
.list-row.is-done .row-title { color: var(--ink-4); text-decoration: line-through; }
.row-main { min-width: 0; flex: 1; }
.row-title { font-size: 13.5px; font-weight: 550; }
.row-meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { display: flex; gap: 6px; opacity: 0; transition: opacity var(--quick); }
.list-row:hover .row-actions, .list-row:focus-within .row-actions { opacity: 1; }

/* A phone cannot hover, so every one of these would be invisible and the row
   would look like it had no actions at all. Show them, and give them a target
   a thumb can actually hit. */
@media (hover: none) {
  .row-actions { opacity: 1; }
  .btn.icon { padding: 11px; }
  .btn.icon svg { width: 18px; height: 18px; }
  .btn.icon.sm { padding: 9px; }
  .btn.icon.sm svg { width: 17px; height: 17px; }
  .btn.sm { padding: 9px 14px; font-size: 13px; }
}

.tickbox {
  width: 19px; height: 19px;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid var(--ink-4);
  background: transparent;
  display: grid;
  place-items: center;
  transition: border-color var(--quick), background var(--quick), transform var(--quick);
}
.tickbox:hover { border-color: var(--accent); transform: scale(1.1); }
.tickbox svg { width: 11px; height: 11px; opacity: 0; transform: scale(.4); transition: opacity var(--quick), transform var(--quick); }
.tickbox.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tickbox.is-on svg { opacity: 1; transform: none; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.empty svg { width: 26px; height: 26px; opacity: .4; }

/* --- tables --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background var(--quick); }
table.data tbody tr:hover { background: rgba(255,255,255,.02); }
/* Qualified, because plain `th.num` loses to `table.data th` above and the
   numeric headings were drifting left of their own columns. */
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- charts --------------------------------------------------------------- */

.donut { display: block; }
.donut .track { stroke: var(--panel-3); }
.donut .seg {
  stroke-linecap: round;
  transition: opacity var(--quick), stroke-width var(--quick);
  /* drawn by ui.js: dasharray set, dashoffset animated from full to target */
  animation: draw 900ms var(--ease) backwards;
}
.donut .seg:hover { stroke-width: 15; }
.donut.dim .seg { opacity: .35; }
.donut.dim .seg.active { opacity: 1; }

@keyframes draw { from { stroke-dashoffset: var(--len); } }

.donut-mid { text-anchor: middle; }
.donut-mid .big { font-size: 21px; font-weight: 700; fill: var(--ink); }
.donut-mid .small { font-size: 9.5px; fill: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }

.legend { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.legend-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; cursor: default; }
.legend-item .swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend-item .name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-item .val { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

/* stretch, not flex-end: the columns must be full height so the stack inside
   them has room to grow. The bars themselves sit at the bottom of the stack. */
.bars { display: flex; align-items: stretch; gap: 8px; height: 132px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.bar-stack { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.bar {
  width: 100%;
  border-radius: 5px 5px 3px 3px;
  background: var(--accent);
  transform-origin: bottom;
  animation: grow-bar 700ms var(--ease) backwards;
  transition: filter var(--quick);
  min-height: 2px;
}
.bar:hover { filter: brightness(1.2); }
.bar.ghost { background: var(--panel-3); }
.bar-label { font-size: 10.5px; color: var(--ink-3); }

@keyframes grow-bar { from { transform: scaleY(0); opacity: .3; } }

.spark { display: block; width: 100%; height: auto; overflow: visible; }
.spark .line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw-line 1100ms var(--ease) forwards;
}
/* fill-opacity keeps the wash light; the element opacity is what fades in,
   so the animation cannot override the intended transparency. */
.spark .area { fill-opacity: .13; opacity: 0; animation: fade-in 700ms var(--ease) 420ms forwards; }
.spark .pt { opacity: 0; animation: pop 320ms var(--ease) forwards; }
.spark .grid-line { stroke: var(--line-soft); stroke-width: 1; }

@keyframes draw-line { to { stroke-dashoffset: 0; } }

.meter { height: 7px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.meter > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  width: 0;
  transition: width 900ms var(--ease);
}
.meter.over > span { background: var(--coral); }

.ring { display: block; }
.ring .track { stroke: var(--panel-3); }
.ring .fill {
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 900ms var(--ease);
}

/* --- calendar ------------------------------------------------------------- */

.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.cal-head > div {
  padding: 6px 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.cal-cell {
  min-height: 92px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--quick), background var(--quick), transform var(--quick);
  animation: pop 320ms var(--ease) backwards;
}
.cal-cell:hover { border-color: var(--panel-3); transform: translateY(-1px); cursor: pointer; }
.cal-cell.is-out { opacity: .35; }
.cal-cell.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.cal-date { font-size: 12px; font-weight: 620; color: var(--ink-2); }
.cal-cell.is-today .cal-date { color: var(--accent); }
.cal-pip {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--panel-2);
  border-left: 2px solid var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- habit grid ----------------------------------------------------------- */

.habit-days { display: flex; gap: 5px; flex-wrap: wrap; }
.hday {
  width: 17px; height: 17px;
  border-radius: 5px;
  background: var(--panel-3);
  border: 0;
  padding: 0;
  transition: transform var(--quick), background var(--quick);
  animation: pop 260ms var(--ease) backwards;
}
.hday:hover { transform: scale(1.22); }
.hday.on { background: var(--accent); box-shadow: 0 0 10px -2px var(--accent); }
.hday.today { outline: 1.5px solid var(--ink-2); outline-offset: 1px; }

.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 10px); gap: 3px; overflow-x: auto; padding-bottom: 6px; }
.heat i {
  width: 10px; height: 10px;
  border-radius: 2.5px;
  background: var(--panel-2);
  display: block;
}
.heat i[data-n="1"] { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.heat i[data-n="2"] { background: color-mix(in srgb, var(--accent) 58%, transparent); }
.heat i[data-n="3"] { background: color-mix(in srgb, var(--accent) 82%, transparent); }
.heat i[data-n="4"] { background: var(--accent); }

/* --- assistant ------------------------------------------------------------ */

.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 18px;
}
.msg { display: flex; gap: 11px; max-width: 760px; animation: rise 400ms var(--ease) backwards; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-body {
  padding: 11px 15px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.me .msg-body {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 520;
}
.msg-avatar {
  width: 28px; height: 28px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: var(--accent-ink);
}
.msg-avatar svg { width: 15px; height: 15px; }
.msg.me .msg-avatar { background: var(--panel-3); color: var(--ink-2); }

.did {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}
.did .chip { font-size: 10.5px; background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: bounce 1.1s var(--ease) infinite;
}
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

.composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.composer .textarea { min-height: 44px; max-height: 190px; border: 0; background: transparent; padding: 8px 4px; }
.composer .textarea:focus { box-shadow: none; }

.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* --- insight cards -------------------------------------------------------- */

.insight {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  transition: transform var(--quick), border-color var(--quick);
}
.insight:hover { transform: translateX(2px); }
.insight.warning { border-left-color: var(--coral); }
.insight.question { border-left-color: var(--amber); }
.insight.win { border-left-color: var(--lime); }
.insight h4 { font-size: 13.5px; margin-bottom: 3px; }
.insight p { font-size: 12.5px; color: var(--ink-2); }
.insight-actions { display: flex; gap: 6px; margin-top: 9px; }

/* --- overlays ------------------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 16, .66);
  backdrop-filter: blur(4px);
  animation: fade-in 180ms var(--ease);
}
.modal {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: modal-in 280ms var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal h3 { font-size: 17px; margin-bottom: 4px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.toasts {
  position: fixed;
  z-index: 95;
  right: 18px; bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 36px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: toast-in 320ms var(--ease);
}
.toast.out { animation: toast-out 240ms var(--ease) forwards; }
.toast .bar { width: 3px; align-self: stretch; border-radius: 99px; background: var(--accent); }
.toast.bad .bar { background: var(--coral); }
.toast.warn .bar { background: var(--amber); }

@keyframes toast-in  { from { opacity: 0; transform: translateX(28px) scale(.96); } }
@keyframes toast-out { to   { opacity: 0; transform: translateX(28px) scale(.96); } }

/* --- loading -------------------------------------------------------------- */

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 37%, var(--panel-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s linear infinite;
  min-height: 14px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid var(--panel-3);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* The thin progress line under the topbar while the brain is working. */
.working {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  overflow: hidden;
}
.working::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 1.1s var(--ease) infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* --- sign in -------------------------------------------------------------- */

.gate {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(400px, 100%);
  padding: 32px 28px;
  border-radius: 22px;
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: rise 560ms var(--ease);
}
.gate-mark {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: var(--accent-ink);
  box-shadow: 0 0 34px -8px var(--accent);
  animation: pulse-mark 4s var(--ease) infinite;
}
.gate-mark svg { width: 27px; height: 27px; }
.gate h2 { text-align: center; font-size: 21px; letter-spacing: .04em; }
.gate h2 span { color: var(--accent); }
.gate .tagline { text-align: center; color: var(--ink-3); font-size: 12.5px; margin: 6px 0 24px; }
.gate .field { margin-bottom: 14px; }
.gate .error {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: var(--radius-xs);
  background: rgba(255,107,107,.1);
  border: 1px solid rgba(255,107,107,.28);
  color: #ffb4b4;
  font-size: 12.5px;
  animation: shake 420ms var(--ease);
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(4px); }
  50%      { transform: translateX(-4px); }
}
.gate-foot { margin-top: 20px; text-align: center; font-size: 11.5px; color: var(--ink-4); }

/* --- misc ----------------------------------------------------------------- */

.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.pair-code {
  font-family: var(--mono);
  font-size: 38px;
  letter-spacing: .28em;
  text-align: center;
  padding: 18px 0 10px;
  color: var(--accent);
  text-shadow: 0 0 26px var(--accent-soft);
}

.kbd {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
}

.fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 40;
  width: 54px; height: 54px;
  border-radius: 18px;
  border: 0;
  display: none;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: var(--accent-ink);
  box-shadow: 0 16px 34px -14px var(--accent);
  transition: transform var(--quick);
}
.fab:hover { transform: translateY(-2px) scale(1.04); }
.fab svg { width: 23px; height: 23px; }
@media (max-width: 900px) { .fab { display: grid; } }
