/* Voyageur · vitrine — couche « instruments »
 *
 * Se charge APRES styles.css et n'en redefinit rien : tokens, nav, footer,
 * boutons, .container, .section, .eyebrow, .split viennent du design system
 * partage. Ici uniquement les modules vivants (tour de controle, medaillon,
 * fan-out, palette, overlay, synchro, skills, machine a ecrire).
 *
 * NOMMAGE : les familles qui collisionnaient avec styles.css ont ete renommees
 * pour que les deux feuilles ne se battent pas. `.pal-*` (palette factice de
 * l'ancienne maquette) est devenue `.qp-*`, `.srv-*` est devenue `.env-*`.
 *
 * MOUVEMENT : les lunes tournent lentement (ambiance), seule l'alerte respire
 * (signal). Rien ne bouge pour decorer. Tout se gele sous prefers-reduced-motion.
 */

/* --cloud manque a styles.css : c'est la teinte « heberge / a distance » des
   tokens de l'app, utilisee par la carte de serveur hebergé. */
:root {
  --cloud: oklch(0.76 0.115 305);
}

/* `hidden` est un display:none de la feuille UA : n'importe quelle regle
   d'auteur posant un display le bat (c'est ce qui affichait le bandeau
   « version gardee » avant tout choix). Garde-fou global. */
[hidden] {
  display: none !important;
}

/* ============================================================ AMBIANCE */
/* Le fond etait des grandes ellipses lentes. Le heros porte maintenant les
   orbites elliptiques : deux jeux d'ellipses se seraient concurrences. Le fond
   passe donc en champ d'etoiles + auroras diffuses, qui laissent les orbites
   du heros seules a porter cette forme. */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sky canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.aurora {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.42;
  border-radius: 50%;
}
.aurora.a1 {
  width: 52vw;
  height: 38vw;
  left: -12vw;
  top: -10vw;
  background: radial-gradient(
    circle,
    oklch(0.6 0.13 215 / 0.42),
    transparent 66%
  );
}
.aurora.a2 {
  width: 44vw;
  height: 34vw;
  right: -10vw;
  top: 18vh;
  background: radial-gradient(
    circle,
    oklch(0.62 0.12 75 / 0.28),
    transparent 66%
  );
}
.aurora.a3 {
  width: 56vw;
  height: 40vw;
  left: 14vw;
  bottom: -20vw;
  background: radial-gradient(
    circle,
    oklch(0.55 0.13 268 / 0.34),
    transparent 68%
  );
}
body > *:not(.sky):not(.aurora) {
  position: relative;
  z-index: 1;
}

/* ============================================================ UTILITAIRES */
.lede {
  color: var(--text-muted);
  font-size: clamp(16px, 1.35vw, 18.5px);
  max-width: 62ch;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  display: inline-block;
  animation: beat 1.9s ease-in-out infinite;
}
.split.is-rev > *:first-child {
  order: 2;
}
.facts {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.facts li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 15px;
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms var(--ease),
    transform 620ms var(--ease);
}
[data-reveal][data-in="1"] {
  opacity: 1;
  transform: none;
}

/* ============================================================ LE MODULE */
/* Un instrument, pas une capture. Barre de titre en mono avec un etat reel,
   comme le bandeau au-dessus d'un panneau dans l'app. */
.mod {
  background: var(--encre);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -32px oklch(0.1 0.03 268 / 0.7);
}
.mod-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  height: 32px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--surface) 55%, var(--encre));
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.mod-bar .grow {
  margin-left: auto;
}
.mod-bar b {
  color: var(--text-muted);
  font-weight: 500;
}
.mod-bar .sep {
  opacity: 0.5;
}
.mod-body {
  padding: clamp(16px, 2.4vw, 26px);
}
.mod-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.mod-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ================================================ LA SCENE ORBITALE */
/* Chaque projet est un satellite sur sa propre ellipse inclinee ; le noyau
   ambre au centre, c'est TOI. La position est calculee en JS (une seule boucle
   rAF pour toute la scene), la CSS ne fait que l'habillage.
   Geometrie : viewBox 640x500, centre 320/250. */
/* Le ratio suit le viewBox serre (520x340) : pas de letterboxing. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 520 / 360;
}
.stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* « toi » sous le noyau : c'est ce qui fait basculer la lecture de
   « des points qui tournent » a « ces agents tournent autour de moi ». */
.core-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 24px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--claude);
  pointer-events: none;
  white-space: nowrap;
}
.orb {
  cursor: pointer;
}
.orb circle {
  transition: r 160ms var(--ease);
}
.orb:focus-visible {
  outline: none;
}
.orb:focus-visible .orb-dot {
  stroke: var(--text);
  stroke-width: 2;
}

.tip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -136%) scale(0.96);
  transition:
    opacity 130ms var(--ease),
    transform 130ms var(--ease);
  background: color-mix(in oklch, var(--surface) 96%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 11px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.tip.is-on {
  opacity: 1;
  transform: translate(-50%, -124%) scale(1);
}
.tip .n {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}
.tip .s {
  font-family: var(--font-mono);
  font-size: 10.5px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tip .s i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}

@keyframes orbPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ================================================ LA TOUR (signature) */
/* La scene orbitale ne vit PAS dans un panneau. Encadree, avec une barre de
   titre « claude-dev · 5 workspaces », elle se lisait comme une capture de
   l'app posee dans la page. Sans cadre, les satellites tournent dans le ciel du
   site : le champ d'etoiles et les auroras passent derriere les orbites, et la
   constellation appartient a la page. C'est tout l'effet cherche.
   Seule la file d'attention garde un panneau, translucide, pour rester lisible. */
.tower {
  position: relative;
  background: none;
  border: 0;
  box-shadow: none;
}

.tower-stage-wrap {
  position: relative;
}

/* la notification hors-bande, posee sur le ciel au-dessus de la scene */
.notify {
  position: absolute;
  right: 0;
  top: 2%;
  width: min(320px, 92%);
  background: color-mix(in oklch, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in oklch, var(--warn) 48%, var(--border));
  border-radius: 12px;
  padding: 11px 13px;
  z-index: 7;
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition:
    opacity 340ms var(--ease),
    transform 340ms var(--ease);
}
.notify.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.notify-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warn);
}
.notify-head .live-dot {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
}
.notify-ws {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}
.notify-q {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 3px 0 9px;
}

/* la file : un panneau translucide, le ciel reste devine derriere */
.attn {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--nuit) 72%, transparent);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.attn-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.attn-head b {
  color: var(--warn);
  font-weight: 500;
}
.attn-head .grow {
  margin-left: auto;
}
.attn-head .clock {
  text-transform: none;
  letter-spacing: 0;
}
.tower-queue {
  display: flex;
  flex-direction: column;
}

.q-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 15px;
  border-top: 1px solid color-mix(in oklch, var(--border) 55%, transparent);
}
.q-row:first-child {
  border-top: 0;
}
.q-row[data-glyph="questionBlocking"] {
  background: color-mix(in oklch, var(--warn) 10%, transparent);
}
.q-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.q-dot[data-pulse="1"] {
  animation: orbPulse 1.4s var(--ease) infinite;
}
.q-answer {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: var(--warn);
  color: oklch(0.18 0.03 268);
  white-space: nowrap;
}
.q-answer:hover {
  background: oklch(0.85 0.14 55);
}
.q-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.q-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}
.q-detail {
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.q-row[data-glyph="running"] .q-pill {
  color: var(--claude);
}
.q-row[data-glyph="thinking"] .q-pill {
  color: var(--accent);
}

.tower-note {
  padding: 10px 15px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  min-height: 2.4em;
  margin: 0;
}

/* ================================================ ORBITES · anatomie */
.anat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(22px, 3.5vw, 46px);
  align-items: center;
}
.anat-stage {
  display: grid;
  place-items: center;
  min-width: 232px;
  min-height: 232px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in oklch, var(--surface) 70%, transparent),
    transparent 68%
  );
}
.anat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.anat-btn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 6px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 130ms var(--ease),
    border-color 130ms var(--ease),
    background 130ms var(--ease);
}
.anat-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.anat-btn[aria-pressed="true"] {
  background: color-mix(in oklch, var(--warn) 16%, var(--surface));
  border-color: var(--warn);
  color: var(--warn);
}
.anat-readout {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.anat-line {
  display: grid;
  grid-template-columns: 14px 92px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  font-size: 13px;
}
.anat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.anat-dot.is-cluster {
  background: none;
  box-shadow:
    0 -4px 0 -2.5px var(--claude),
    3.4px 2px 0 -2.5px var(--claude),
    -3.4px 2px 0 -2.5px var(--claude);
}
.anat-k {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.anat-v {
  color: var(--text-muted);
}
.anat-total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ================================================ FAN-OUT */
.fan-stage {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  min-height: 96px;
}
.fan-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 96px;
  transition:
    opacity 320ms var(--ease),
    transform 320ms var(--ease),
    filter 320ms var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.fan-cell[data-on="0"] {
  opacity: 0.16;
  transform: scale(0.9);
  filter: grayscale(1);
}
.fan-name {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  text-align: center;
}
.fan-ctl {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.fan-ctl input[type="range"] {
  accent-color: var(--accent);
  width: 190px;
}
.fan-alt {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ================================================ PANES · overlay Quake */
.quake-frame {
  position: relative;
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--encre);
  border: 1px solid var(--border);
}
.quake-under {
  position: absolute;
  inset: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.quake-under .row {
  display: flex;
  gap: 10px;
  padding: 2px 0;
}
.quake-over {
  position: absolute;
  inset: 0 0 auto;
  height: 72%;
  background: color-mix(in oklch, var(--encre) 96%, black);
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 20px 50px -14px oklch(0.08 0.03 268 / 0.95);
  transform: translateY(-101%);
  transition: transform 320ms var(--ease);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.quake-over[data-open="1"] {
  transform: none;
}
.quake-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--text-dim);
}
.quake-tab {
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}
.quake-line {
  color: var(--text);
}
.quake-line::after {
  content: "▌";
  color: var(--accent);
  animation: blink 530ms steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ================================================ SERVEURS (env-*) */
.env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.env {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tone);
  transition:
    transform 160ms var(--ease),
    border-color 160ms var(--ease);
}
.env:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklch, var(--tone) 50%, var(--border));
}
.env[data-tone="local"] {
  --tone: var(--ok);
}
.env[data-tone="ssh"] {
  --tone: var(--claude);
}
.env[data-tone="hosted"] {
  --tone: var(--cloud);
}
.env-ini {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--tone);
  border: 1px solid color-mix(in oklch, var(--tone) 45%, transparent);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  display: inline-block;
  margin-bottom: 11px;
}
.env h3 {
  margin: 0 0 4px;
}
.env-kind {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.env-line {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  align-items: center;
}
.env-line .live-dot {
  background: var(--tone);
  box-shadow: 0 0 7px var(--tone);
}

/* ================================================ SYNCHRO */
.sync-rig {
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  gap: 14px;
  align-items: center;
}
.sync-end {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.sync-end .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sync-end .v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  margin-top: 4px;
}
.sync-track {
  position: relative;
  height: 108px;
  overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--encre) 70%, black);
  border: 1px solid var(--border);
}
.sync-track::before,
.sync-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.sync-track::before {
  top: 34%;
}
.sync-track::after {
  top: 66%;
}
.sync-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: color-mix(in oklch, var(--accent) 15%, var(--encre));
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  color: var(--accent);
  animation: chipDown 2.6s linear forwards;
}
.sync-chip[data-dir="up"] {
  background: color-mix(in oklch, var(--claude) 15%, var(--encre));
  border-color: color-mix(in oklch, var(--claude) 40%, transparent);
  color: var(--claude);
  animation-name: chipUp;
}
@keyframes chipDown {
  from {
    top: 28%;
    left: -30%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  to {
    top: 28%;
    left: 108%;
    opacity: 0;
  }
}
@keyframes chipUp {
  from {
    top: 60%;
    left: 108%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  to {
    top: 60%;
    left: -30%;
    opacity: 0;
  }
}
[data-paused="1"] .sync-chip {
  animation-play-state: paused;
}
.sync-ctl {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.sync-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ================================================ SKILLS */
.sk-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sk-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(96px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 8px 11px;
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--surface) 45%, var(--encre));
}
.sk-row.is-head {
  background: none;
  padding-block: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sk-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.sk-name b {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sk-name i {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-style: normal;
  color: var(--text-dim);
}
.sk-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}
.sk-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sk-pill[data-st="sync"] {
  color: var(--ok);
  background: color-mix(in oklch, var(--ok) 13%, transparent);
}
.sk-pill[data-st="ahead"] {
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 13%, transparent);
}
.sk-pill[data-st="behind"] {
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 9%, transparent);
}
.sk-pill[data-st="diverged"] {
  color: var(--warn);
  background: color-mix(in oklch, var(--warn) 15%, transparent);
}
.sk-pill[data-st="absent"] {
  color: var(--text-dim);
  border: 1px dashed var(--border);
}
.sk-fix {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warn);
  color: oklch(0.18 0.03 268);
  border: 0;
  cursor: pointer;
  font-weight: 500;
}
.sk-fix:hover {
  background: oklch(0.85 0.14 55);
}

.merge {
  margin-top: 18px;
  border: 1px solid color-mix(in oklch, var(--warn) 40%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--warn) 5%, var(--encre));
  padding: 16px;
}
.merge-head {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warn);
  margin-bottom: 4px;
}
.merge-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.merge-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 11px;
}
.merge-card {
  text-align: left;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  color: var(--text-muted);
  transition:
    border-color 140ms var(--ease),
    background 140ms var(--ease);
}
.merge-card:hover {
  border-color: var(--text-dim);
}
.merge-card[aria-pressed="true"] {
  border-color: var(--ok);
  background: color-mix(in oklch, var(--ok) 9%, var(--surface));
}
.merge-card .who {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.merge-card .who::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.merge-card[data-side="theirs"] .who::before {
  background: var(--claude);
}
.merge-card .txt {
  font-size: 13px;
  line-height: 1.5;
  display: block;
}
.merge-card ins {
  background: color-mix(in oklch, var(--accent) 22%, transparent);
  text-decoration: none;
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
}
.merge-card[data-side="theirs"] ins {
  background: color-mix(in oklch, var(--claude) 22%, transparent);
}
.merge-foot {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.merge-kept {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ok);
}

/* ================================================ CLAUDE.MD */
.type-file {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--encre) 80%, black);
}
.type-path {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.type-state {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.type-state[data-st="writing"] {
  color: var(--accent);
}
.type-state[data-st="done"] {
  color: var(--ok);
}
.type-out {
  margin: 0;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
  white-space: pre-wrap;
  min-height: 232px;
  max-height: 232px;
  overflow: auto;
}
.type-out[data-writing="1"]::after {
  content: "▌";
  color: var(--accent);
}
.type-ctl {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}

/* ================================================ PALETTE (qp-*) */
.qp {
  max-width: 560px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: color-mix(in oklch, var(--surface) 60%, var(--encre));
  box-shadow: 0 34px 70px -28px oklch(0.09 0.03 268 / 0.9);
}
.qp-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 15px 17px;
  outline: none;
}
.qp-input::placeholder {
  color: var(--text-dim);
}
.qp-list {
  max-height: 300px;
  overflow: auto;
  padding: 6px;
}
.qp-group {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 11px 10px 5px;
}
.qp-row {
  display: grid;
  grid-template-columns: 11px minmax(0, auto) minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
}
.qp-row:hover {
  background: var(--surface-2);
}
.qp-row[data-k="questionBlocking"] {
  background: color-mix(in oklch, var(--warn) 8%, transparent);
}
.qp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.qp-t {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.qp-d {
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qp-age {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.qp-empty {
  padding: 22px 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.qp-foot {
  display: flex;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.qp-foot .grow {
  margin-left: auto;
}

/* ================================================ LE MEDAILLON */
/* Porte de l'app : docs/design_handoff_pastille_palette + Medallion.module.css.
   Meme geometrie (52/26/21), memes durees. */
.med {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--med-size);
  height: var(--med-size);
  flex: none;
}
.med svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
}
.med-tile {
  position: relative;
  z-index: 2;
  width: calc(30 / 52 * var(--med-size));
  height: calc(30 / 52 * var(--med-size));
  border-radius: calc(var(--med-size) / 6.5);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: calc(10 / 52 * var(--med-size));
  background: var(--encre);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.med[data-alert="1"] .med-tile {
  border-color: color-mix(in oklch, var(--warn) 55%, var(--border));
  color: var(--text);
}
.med-spin {
  transform-box: view-box;
  transform-origin: center;
  animation: medOrbit 17s linear infinite;
}
.med-wash {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle,
    color-mix(in oklch, var(--warn), transparent 30%),
    transparent 60%
  );
  animation: medWash 1.3s var(--ease) infinite;
}
.med-beat,
.med-lead,
.med-flare {
  animation: beat 1.3s ease-in-out infinite;
}
.med-flare {
  animation-duration: 1.15s;
}
.med-cluster {
  filter: drop-shadow(0 0 2px var(--claude));
}
@keyframes medOrbit {
  to {
    transform: rotate(360deg);
  }
}
@keyframes medWash {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.66;
  }
}
@keyframes beat {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

/* ================================================ RESPONSIVE */
@media (max-width: 1000px) {
  .anat {
    grid-template-columns: minmax(0, 1fr);
  }
  .anat-stage {
    min-height: 190px;
  }
  .sync-rig {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .split.is-rev > *:first-child {
    order: 0;
  }
}
@media (max-width: 720px) {
  .sk-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(74px, 1fr));
    gap: 6px;
    padding: 7px 8px;
  }
  .sk-pill {
    font-size: 9px;
    padding: 2px 6px;
  }
  .q-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }
  .q-pill {
    display: none;
  }
}

/* ================================================ MOUVEMENT COUPE */
/* On gele, on ne supprime pas : la page reste complete et lisible. Les lunes se
   garent a un angle deliberé, comme dans l'app. */
@media (prefers-reduced-motion: reduce) {
  .q-dot[data-pulse="1"] {
    animation: none;
  }
  .med-spin,
  .med-wash,
  .med-beat,
  .med-lead,
  .med-flare,
  .live-dot,
  .quake-line::after {
    animation: none;
  }
  .med-spin {
    transform: rotate(-38deg);
  }
  .sync-chip {
    animation: none;
    opacity: 1;
    top: 28%;
    left: 12%;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .quake-over {
    transition: none;
  }
}
