/* ==========================================================================
   Icebreakers CRM · Login v2 + Welcome hero
   Depends on ../tokens.css (all colours, type, radii, shadows, easing come from it).
   Everything is namespaced `ib-` so it can sit next to shared/css/app.css.
   Motion rule: only `transform` and `opacity` are animated/transitioned.
   The constellation is drawn on <canvas> by login-v2.js.
   ========================================================================== */

/* ---------- Local tokens (derived from tokens.css, login/hero only) ---------- */
:root {
  /* Hero line of the login art panel: the one place we go above --fs-3xl. */
  --ib-fs-hero: clamp(40px, 4.3vw, 64px);
  --ib-fs-hero-sm: clamp(26px, 7.4vw, 34px);

  /* Art panel (always ink, in both themes: it is the brand side) */
  --ib-art-bg: #0B0B0B;
  --ib-art-ink: #F4F3F1;
  --ib-art-ink-2: rgba(244,243,241,.66);   /* ~7:1 on ink  */
  --ib-art-ink-3: rgba(244,243,241,.50);   /* ~4.9:1 on ink */
  --ib-art-ink-4: rgba(244,243,241,.42);   /* large text only (~3.9:1) */
  --ib-art-line: rgba(244,243,241,.10);

  /* Constellation colours (read by login-v2.js from the canvas element) */
  --ib-c-node: #F4F3F1;
  --ib-c-line: rgba(244,243,241,.16);
  --ib-c-accent: #7C7BFF;   /* = --accent-fill */
  --ib-c-halo: .55;         /* accent/founder glow strength */

  --ib-rot-interval: 4000ms;
}

/* ==========================================================================
   LOGIN
   ========================================================================== */
.ib-login {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 1fr);
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-ui);
}
.ib-login *, .ib-login *::before, .ib-login *::after,
.ib-hero *, .ib-hero *::before, .ib-hero *::after { box-sizing: border-box; }

/* ---------- Left: art / vision panel ---------- */
.ib-art {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ib-art-bg); color: var(--ib-art-ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--s-12) 56px;
  min-height: 100%;
}
.ib-art > * { position: relative; z-index: 2; }
.ib-art > .ib-constellation,
.ib-art > .ib-aurora,
.ib-art > .ib-grain,
.ib-art > .ib-art__shade { position: absolute; z-index: 0; }

.ib-constellation { inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.ib-art > .ib-constellation { z-index: 1; opacity: 0; animation: ib-fade 900ms var(--ease-out) 120ms both; }

/* Aurora: two blurred indigo/violet fields, drifting with transform only */
.ib-aurora { inset: -25%; pointer-events: none; }
.ib-aurora::before, .ib-aurora::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform;
}
.ib-aurora::before {
  width: 62%; height: 58%; left: 38%; top: 8%;
  background: radial-gradient(closest-side, rgba(124,123,255,.42), rgba(91,90,230,.16) 55%, transparent);
  animation: ib-aurora-a 22s var(--ease-in-out) infinite alternate;
}
.ib-aurora::after {
  width: 55%; height: 50%; left: 8%; top: 34%;
  background: radial-gradient(closest-side, rgba(139,92,246,.26), rgba(91,90,230,.08) 60%, transparent);
  animation: ib-aurora-b 28s var(--ease-in-out) infinite alternate;
}
/* Film grain kills gradient banding on big dark fields (static) */
.ib-grain {
  inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Legibility shade behind the story block */
.ib-art__shade {
  left: 0; right: 0; bottom: 0; height: 62%; pointer-events: none; z-index: 1;
  background: linear-gradient(to top, rgba(11,11,11,.92) 0%, rgba(11,11,11,.72) 45%, rgba(11,11,11,0) 100%);
}

/* Brand */
.ib-brand { display: flex; align-items: center; gap: 12px; color: var(--ib-art-ink); text-decoration: none; }
.ib-mark { width: 17px; height: 20px; flex: none; display: block; }
.ib-mark rect { fill: currentColor; }
.ib-brand__name { font: 600 17px/1 var(--font-display); letter-spacing: -0.02em; }
.ib-brand__sep { width: 1px; height: 14px; background: var(--ib-art-line); }
.ib-brand__product { font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ib-art-ink-3); }

/* Story */
.ib-story { max-width: 620px; }
.ib-tagline {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: var(--ib-fs-hero); line-height: 1.02; letter-spacing: -0.035em;
  color: var(--ib-art-ink); text-wrap: balance;
}
.ib-tagline > span { display: block; }
.ib-tagline > span + span { color: var(--ib-art-ink-4); }
.ib-tagline-sub {
  margin: var(--s-5) 0 0; max-width: 30em;
  font: 400 17px/1.55 var(--font-ui); color: var(--ib-art-ink-2); text-wrap: pretty;
}

/* Rotating proof points */
.ib-rotator { margin-top: var(--s-8); display: flex; align-items: center; gap: var(--s-4); min-height: 24px; }
.ib-rotator__bar { width: 16px; height: 2px; border-radius: 2px; background: var(--ib-c-accent); flex: none; }
.ib-rotator__lines { display: grid; margin: 0; padding: 0; list-style: none; flex: 1; min-width: 0; }
.ib-rotator__lines > li {
  grid-area: 1 / 1; font: 500 14px/24px var(--font-ui); color: var(--ib-art-ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(6px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.ib-rotator__lines > li.is-active { opacity: 1; transform: none; transition-delay: 180ms; }
.ib-rotator__lines > li.is-leaving { opacity: 0; transform: translateY(-6px); transition-duration: 360ms; transition-delay: 0ms; }
.ib-rotator__ctrl { display: flex; align-items: center; gap: 6px; flex: none; }
.ib-rotator__ticks { display: flex; gap: 4px; }
.ib-rotator__ticks > span { position: relative; width: 18px; height: 2px; border-radius: 2px; background: var(--ib-art-line); overflow: hidden; }
.ib-rotator__ticks > span::after {
  content: ""; position: absolute; inset: 0; background: var(--ib-art-ink-3);
  transform: scaleX(0); transform-origin: left;
}
.ib-rotator__ticks > span.is-done::after { transform: scaleX(1); opacity: .5; }
.ib-rotator__ticks > span.is-active::after { animation: ib-tick var(--ib-rot-interval) linear both; }
.ib-rotator[data-paused] .ib-rotator__ticks > span.is-active::after { animation-play-state: paused; }
.ib-rotator[data-static] .ib-rotator__ticks > span.is-active::after { animation: none; transform: scaleX(1); }
.ib-iconbtn-art {
  width: 24px; height: 24px; display: grid; place-items: center; border: 0; padding: 0; border-radius: var(--r-xs);
  background: transparent; color: var(--ib-art-ink-3); cursor: pointer;
}
.ib-iconbtn-art:hover { color: var(--ib-art-ink); }
.ib-iconbtn-art svg { width: 12px; height: 12px; }
.ib-iconbtn-art .i-play { display: none; }
.ib-rotator[data-paused-by-user] .ib-iconbtn-art .i-play { display: block; }
.ib-rotator[data-paused-by-user] .ib-iconbtn-art .i-pause { display: none; }
.ib-rotator[data-static] .ib-iconbtn-art { display: none; }

/* Live stats */
.ib-stats { margin: var(--s-10) 0 0; padding: var(--s-6) 0 0; border-top: 1px solid var(--ib-art-line); }
.ib-stats__list { display: flex; align-items: flex-end; gap: var(--s-10); flex-wrap: wrap; margin: var(--s-5) 0 0; }
.ib-stats__label { display: flex; align-items: center; gap: 8px; margin: 0;
  font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ib-art-ink-3); }
.ib-live-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.ib-live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ib-live 2.4s var(--ease-out) infinite; }
.ib-stat { display: flex; flex-direction: column-reverse; gap: 6px; margin: 0; }
.ib-stat dt { font: 400 13px/1 var(--font-ui); color: var(--ib-art-ink-3); }
.ib-stat dd { margin: 0; font: 600 26px/1 var(--font-display); letter-spacing: -0.02em; color: var(--ib-art-ink); font-variant-numeric: tabular-nums; min-width: 2ch; }

/* ---------- Right: form panel ---------- */
.ib-panel {
  position: relative; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg); padding: var(--s-6) var(--s-8);
  min-width: 0;
}
[data-theme="dark"] .ib-panel { background: var(--surface); box-shadow: inset 1px 0 0 var(--line); }
.ib-panel__top { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-3); min-height: 36px; }
.ib-panel__body { align-self: center; justify-self: center; width: 100%; max-width: 368px; padding: var(--s-10) 0;
  animation: ib-rise var(--d-page) var(--ease-out) 80ms both; }

.ib-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--s-5);
  font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); }
.ib-kicker__dot { width: 6px; height: 6px; border-radius: 2px; background: var(--accent-fill); }
.ib-title { margin: 0; font: 600 var(--fs-3xl)/1.08 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.ib-lede { margin: var(--s-3) 0 0; font: 400 var(--fs-md)/1.5 var(--font-ui); color: var(--ink-3); }

.ib-form { margin-top: var(--s-8); display: grid; gap: var(--s-5); }
.ib-field { display: grid; gap: 8px; }
.ib-field > label, .ib-field__label { font: 500 13px/1 var(--font-ui); color: var(--ink-2); }
.ib-input-wrap { position: relative; }
.ib-input {
  width: 100%; height: 44px; padding: 0 var(--s-4); margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font: 400 15px/1 var(--font-ui); box-shadow: var(--sh-1);
  -webkit-appearance: none; appearance: none;
}
[data-theme="dark"] .ib-input { background: var(--bg); box-shadow: none; }
.ib-input::placeholder { color: var(--ink-4); }
.ib-input:hover { border-color: var(--ink-4); }
.ib-input:focus, .ib-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--sh-focus); border-radius: var(--r-sm); }
.ib-input[aria-invalid="true"] { border-color: var(--danger); }
.ib-input--pw { padding-right: 48px; letter-spacing: .02em; }
.ib-pw-toggle {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-xs); background: transparent; color: var(--ink-3); cursor: pointer; padding: 0;
}
.ib-pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
[data-theme="dark"] .ib-pw-toggle:hover { background: var(--surface); }
.ib-pw-toggle svg { width: 18px; height: 18px; }
.ib-pw-toggle .i-eye-off { display: none; }
.ib-pw-toggle[aria-pressed="true"] .i-eye { display: none; }
.ib-pw-toggle[aria-pressed="true"] .i-eye-off { display: block; }

.ib-form__meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-top: calc(var(--s-1) * -1); }
.ib-check { display: inline-flex; align-items: center; gap: 10px; font: 400 13.5px/1 var(--font-ui); color: var(--ink-2); cursor: pointer; user-select: none; }
.ib-check input {
  -webkit-appearance: none; appearance: none; margin: 0; width: 16px; height: 16px; flex: none;
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); display: grid; place-items: center; cursor: pointer;
}
[data-theme="dark"] .ib-check input { background: var(--bg); }
.ib-check input::after {
  content: ""; width: 9px; height: 5px; border: solid var(--surface); border-width: 0 0 1.75px 1.75px;
  transform: translateY(-1px) rotate(-45deg) scale(0); opacity: 0;
  transition: transform var(--d-base) var(--ease-spring), opacity var(--d-fast) var(--ease-out);
}
[data-theme="dark"] .ib-check input::after { border-color: #0B0B0B; }
.ib-check input:checked { background: var(--ink); border-color: var(--ink); }
.ib-check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); opacity: 1; }
.ib-check input:focus-visible { outline: none; box-shadow: var(--sh-focus); border-radius: 4px; }

.ib-link { font: 500 13.5px/1 var(--font-ui); color: var(--accent); text-decoration: none; border-radius: 4px; }
.ib-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ib-link:focus-visible { outline: none; box-shadow: var(--sh-focus); }

.ib-form__error {
  margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger);
  font: 500 13px/1.4 var(--font-ui); animation: ib-rise var(--d-slow) var(--ease-out) both;
}
.ib-form__error[hidden] { display: none; }

/* Primary button: ink, overlay-opacity hover, press scale, loading cross-fade */
.ib-btn-primary {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; width: 100%; height: 44px; margin-top: var(--s-1);
  border: 1px solid var(--ink); border-radius: var(--r-sm); background: var(--ink); color: var(--surface);
  font: 500 15px/1 var(--font-ui); cursor: pointer; box-shadow: var(--sh-2);
  transition: transform var(--d-fast) var(--ease-out);
}
[data-theme="dark"] .ib-btn-primary { color: #0B0B0B; }
.ib-btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; opacity: 0; transition: opacity var(--d-fast) var(--ease-out); }
[data-theme="dark"] .ib-btn-primary::before { background: #000; }
.ib-btn-primary:hover::before { opacity: .10; }
.ib-btn-primary:active { transform: scale(.98); }
.ib-btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); border-radius: var(--r-sm); }
[data-theme="dark"] .ib-btn-primary:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.ib-btn__state { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out); }
.ib-btn__state svg { width: 16px; height: 16px; transition: transform var(--d-base) var(--ease-out); }
.ib-btn-primary:hover .ib-btn__state--idle svg { transform: translateX(2px); }
.ib-btn__state--busy { opacity: 0; transform: translateY(6px); }
.ib-btn-primary.is-loading { pointer-events: none; }
.ib-btn-primary.is-loading .ib-btn__state--idle { opacity: 0; transform: translateY(-6px); }
.ib-btn-primary.is-loading .ib-btn__state--busy { opacity: 1; transform: none; }
.ib-spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.75px solid currentColor; border-right-color: transparent; opacity: .9; animation: spin .7s linear infinite; }

.ib-help { margin: var(--s-6) 0 0; font: 400 13px/1.5 var(--font-ui); color: var(--ink-3); }

.ib-panel__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap;
  font: 400 12.5px/1.4 var(--font-ui); color: var(--ink-3); }
.ib-panel__foot a { color: inherit; text-decoration: none; border-radius: 4px; }
.ib-panel__foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ib-panel__foot a:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.ib-secure { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.ib-secure svg { width: 12px; height: 12px; }

/* Theme toggle (shared by login + hero) */
.ib-theme-toggle {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2);
  box-shadow: var(--sh-1); cursor: pointer;
}
[data-theme="dark"] .ib-panel .ib-theme-toggle { background: var(--bg); }
.ib-theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.ib-theme-toggle:focus-visible { outline: none; box-shadow: var(--sh-focus); border-radius: var(--r-pill); }
.ib-theme-toggle svg { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity var(--d-base) var(--ease-out), transform var(--d-slow) var(--ease-out); }
.ib-theme-toggle .i-moon { opacity: 0; transform: rotate(-45deg) scale(.6); }
[data-theme="dark"] .ib-theme-toggle .i-sun { opacity: 0; transform: rotate(45deg) scale(.6); }
[data-theme="dark"] .ib-theme-toggle .i-moon { opacity: 1; transform: none; }

.ib-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Responsive: art panel collapses to a top band ---------- */
@media (max-width: 1080px) {
  .ib-art { padding: var(--s-10) var(--s-10); }
  .ib-stats__list { gap: var(--s-8); }
}
@media (max-width: 900px) {
  .ib-login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; max-width: 100%; overflow-x: hidden; }
  .ib-input { font-size: 16px; }
  .ib-theme-toggle { width: 44px; height: 44px; }
  .ib-panel { padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); padding-left: calc(var(--s-6) + env(safe-area-inset-left)); padding-right: calc(var(--s-6) + env(safe-area-inset-right)); }
  .ib-art { min-height: 0; height: 236px; padding: var(--s-5) var(--s-6) var(--s-6); }
  .ib-art__shade { height: 100%; background: linear-gradient(to top, rgba(11,11,11,.85), rgba(11,11,11,.2) 70%, rgba(11,11,11,0)); }
  .ib-tagline { font-size: var(--ib-fs-hero-sm); line-height: 1.05; letter-spacing: -0.03em; }
  .ib-tagline-sub, .ib-rotator, .ib-stats { display: none; }
  .ib-brand__name { font-size: 16px; }
  .ib-panel { padding: var(--s-4) var(--s-6) var(--s-6); }
  [data-theme="dark"] .ib-panel { box-shadow: inset 0 1px 0 var(--line); }
  .ib-panel__top { position: absolute; top: calc(-236px + var(--s-4)); right: var(--s-5); z-index: 3; }
  .ib-panel__top .ib-theme-toggle { background: rgba(244,243,241,.08); border-color: rgba(244,243,241,.14); color: var(--ib-art-ink); box-shadow: none; backdrop-filter: blur(8px); }
  .ib-panel__body { padding: var(--s-8) 0 var(--s-10); max-width: 440px; }
  .ib-title { font-size: var(--fs-2xl); }
  .ib-panel__foot { justify-content: center; text-align: center; }
  .ib-secure { display: none; }
}

/* ==========================================================================
   WELCOME HERO (post-login dashboard)
   ========================================================================== */
.ib-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--sh-1); padding: var(--s-8) var(--s-8) var(--s-6);
  font-family: var(--font-ui); color: var(--ink-2);
  --ib-c-node: #0B0B0B;
  --ib-c-line: rgba(11,11,11,.09);
  --ib-c-accent: #7C7BFF;
  --ib-c-halo: .16;
  animation: ib-rise var(--d-page) var(--ease-out) both;
}
[data-theme="dark"] .ib-hero { --ib-c-node: #F4F3F1; --ib-c-line: rgba(244,243,241,.12); --ib-c-halo: .4; }
.ib-hero__bg {
  position: absolute; z-index: -1; top: 0; right: 0; width: 58%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 35%);
  mask-image: linear-gradient(to right, transparent 0%, #000 35%);
}
.ib-hero__bg .ib-constellation { opacity: 0; animation: ib-fade 900ms var(--ease-out) 200ms both; }
.ib-hero__glow { position: absolute; z-index: -2; right: -10%; top: -40%; width: 60%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124,123,255,.10), transparent); }
[data-theme="dark"] .ib-hero__glow { background: radial-gradient(closest-side, rgba(124,123,255,.16), transparent); }

.ib-hero__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-8); }
.ib-hero__date { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 var(--s-4);
  font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); }
.ib-hero__date .ib-kicker__dot { flex: none; }
.ib-hero__greeting { margin: 0; font: 600 44px/1.05 var(--font-display); letter-spacing: -0.035em; color: var(--ink); }
.ib-hero__greeting [data-greeting-name] { color: var(--ink); }
.ib-hero__greeting [data-greeting-word] { color: var(--ink-3); }
.ib-hero__line { margin: var(--s-3) 0 0; max-width: 40em; font: 400 var(--fs-md)/1.5 var(--font-ui); color: var(--ink-3); }

/* Placeholder slot styling (visible only while data-placeholder is present) */
[data-slot][data-placeholder] {
  display: inline-block; padding: 2px 8px; margin-left: -8px; border-radius: var(--r-xs);
  outline: 1px dashed var(--line-strong); outline-offset: 0; color: var(--ink-3);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0;
}

/* Team block */
.ib-team { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-6); flex-wrap: wrap; }
.ib-team__label { font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); }
.ib-team__label b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ib-team__row { display: flex; align-items: center; gap: var(--s-3); }
.ib-avatars { display: flex; margin: 0; padding: 0 0 0 8px; list-style: none; }
.ib-avatars li {
  width: 34px; height: 34px; margin-left: -8px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-sunken); color: var(--ink-2); box-shadow: 0 0 0 2px var(--surface);
  font: 600 11.5px/1 var(--font-ui); letter-spacing: .01em;
  animation: ib-pop var(--d-slow) var(--ease-spring) both; animation-delay: calc(400ms + var(--i, 0) * 60ms);
}
.ib-avatars li:nth-child(1) { background: var(--ink); color: var(--surface); }
.ib-avatars li:nth-child(3) { background: var(--accent-soft); color: var(--accent); }
.ib-avatars li.ib-avatars__more { background: var(--surface); color: var(--ink-3); box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px var(--line-strong); font-family: var(--font-mono); font-weight: 500; font-size: 11px; }
.ib-avatars li.has-photo, .ib-avatars li:has(img) { padding: 0; overflow: hidden; background: var(--surface); color: transparent; }
.ib-avatars li img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ib-grow {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px; border-radius: var(--r-pill);
  border: 1px dashed var(--line-strong); background: transparent; color: var(--ink); text-decoration: none;
  font: 500 13px/1 var(--font-ui); white-space: nowrap; cursor: pointer;
  transition: transform var(--d-base) var(--ease-out);
}
.ib-grow svg { width: 14px; height: 14px; transition: transform var(--d-slow) var(--ease-out); }
.ib-grow:hover { border-style: solid; border-color: var(--ink-4); transform: translateY(-1px); }
.ib-grow:hover svg { transform: rotate(90deg); }
.ib-grow:focus-visible { outline: none; box-shadow: var(--sh-focus); border-radius: var(--r-pill); }

/* Today's focus */
.ib-focus { margin-top: var(--s-10); }
.ib-focus__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-3); }
.ib-focus__title { margin: 0; font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); }
.ib-focus__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.ib-focus-card {
  position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: var(--s-3);
  padding: var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(6px);
  color: inherit; text-decoration: none; height: 100%;
  transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out);
  animation: ib-rise var(--d-slow) var(--ease-out) both; animation-delay: calc(180ms + var(--i, 0) * var(--stagger) * 2);
}
.ib-focus-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.ib-focus-card:focus-visible { outline: none; box-shadow: var(--sh-focus); border-radius: var(--r-lg); }
.ib-focus-card__label { grid-column: 1; display: flex; align-items: center; gap: 10px; font: 500 13px/1.2 var(--font-ui); color: var(--ink-2); }
.ib-focus-card__icon { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--bg-sunken); color: var(--ink-2); flex: none; }
.ib-focus-card__icon svg { width: 15px; height: 15px; }
.ib-focus-card__go { grid-column: 2; grid-row: 1; align-self: center; width: 16px; height: 16px; color: var(--ink-4);
  opacity: 0; transform: translateX(-4px); transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out); }
.ib-focus-card:hover .ib-focus-card__go, .ib-focus-card:focus-visible .ib-focus-card__go { opacity: 1; transform: none; }
.ib-focus-card__num { grid-column: 1 / -1; margin: var(--s-5) 0 0; font: 600 var(--fs-3xl)/1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ib-focus-card__sub { grid-column: 1 / -1; margin: var(--s-2) 0 0; display: flex; align-items: center; gap: 8px; font: 400 13px/1.4 var(--font-ui); color: var(--ink-3); }
.ib-focus-card__sub .chip { height: 20px; font-size: 11.5px; }

@media (max-width: 900px) {
  .ib-hero { overflow: hidden; padding: 20px 16px 16px; border-radius: 16px; }
  .ib-hero__bg, .ib-hero__glow { display: none; }
  .ib-hero__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .ib-hero__greeting { font-size: 28px; line-height: 1.15; }
  .ib-team { position: relative; z-index: 1; width: 100%; gap: 12px; margin-top: 16px; }
  .ib-avatars li { width: 40px; height: 40px; }
  .ib-grow { min-height: 44px; height: auto; padding: 10px 14px; }
  .ib-focus { margin-top: 16px; width: 100%; }
  .ib-focus__grid { grid-template-columns: 1fr; gap: 12px; width: 100%; }
  .ib-focus-card { border-radius: 16px; padding: 16px; height: auto; min-width: 0; width: 100%; }
  .ib-focus-card__label, .ib-focus-card__sub { white-space: normal; overflow-wrap: anywhere; }
}

/* ---------- Keyframes (transform / opacity only) ---------- */
@keyframes ib-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ib-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ib-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ib-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ib-live { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3); opacity: 0; } }
@keyframes ib-aurora-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-8%,6%,0) scale(1.08); } }
@keyframes ib-aurora-b { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(10%,-6%,0) scale(.95); } }

/* ---------- Reduced motion: kill switch ---------- */
@media (prefers-reduced-motion: reduce) {
  .ib-login *, .ib-login *::before, .ib-login *::after,
  .ib-hero *, .ib-hero *::before, .ib-hero *::after, .ib-hero {
    animation: none !important; transition: none !important;
  }
  .ib-art > .ib-constellation, .ib-hero__bg .ib-constellation { opacity: 1; }
  .ib-rotator__lines > li.is-active { opacity: 1; transform: none; }
  .ib-btn-primary.is-loading .ib-spinner { opacity: 1; }
}
