:root { --sidebar: 252px; }

.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.language-control { display:inline-flex; align-items:center; gap:7px; color:var(--muted);
  font-size: 12px; font-weight: 700; white-space:nowrap; }
.language-control select { height:40px; padding:0 28px 0 10px; border:1px solid var(--line);
  border-radius:9px; color:var(--ink); background:var(--surface); font-size: 16px; cursor:pointer; }
.language-control-mobile { display:none; }
/* #165 : langue en bouton compact (drapeau rond + code) ; la liste native,
   transparente par-dessus, garde les noms complets. */
.language-pick { position:relative; display:inline-flex; flex:none; }
.language-face { display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 10px; border:1px solid var(--line);
  border-radius:9px; color:var(--ink); background:var(--surface); font-size:14px; font-weight:700; letter-spacing:.03em; }
.language-face::after { content:""; width:6px; height:6px; margin:-3px 2px 0 2px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); opacity:.7; }
.language-flag { width:18px; height:18px; flex:none; border-radius:50%; background:center/cover no-repeat var(--surface-muted); box-shadow:0 0 0 1px rgba(37,35,28,.16); }
.language-flag[data-lang="fr"] { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect width='1' height='2' fill='%23002395'/%3E%3Crect x='1' width='1' height='2' fill='%23fff'/%3E%3Crect x='2' width='1' height='2' fill='%23ED2939'/%3E%3C/svg%3E"); }
.language-flag[data-lang="en"] { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='t'%3E%3Cpath d='M30,15h30v15zv15h-30zh-30v-15zv-15h30z'/%3E%3C/clipPath%3E%3Cpath d='M0,0v30h60v-30z' fill='%23012169'/%3E%3Cpath d='M0,0L60,30M60,0L0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0L60,30M60,0L0,30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30,0v30M0,15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0v30M0,15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E"); }
.language-control .language-pick select { position:absolute; inset:0; width:100%; height:100%; padding:0; border:0; opacity:0; cursor:pointer; }
.language-pick:focus-within .language-face { outline:3px solid var(--accent, #254EBC); outline-offset:2px; }
:lang(zh-Hans) { line-height:1.6; }
:lang(zh-Hans) .eyebrow, :lang(zh-Hans) .nav-label, :lang(zh-Hans) .data-table th {
  letter-spacing:0; text-transform:none;
}
:lang(zh-Hans) .status-pill, :lang(zh-Hans) .micro-badge { white-space:normal; }

* { box-sizing: border-box; }

html { min-width: 320px; overflow-x: hidden; background: var(--canvas); }
html.console-modal-open { overflow: hidden; overscroll-behavior: none; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: `hidden` turned body into a scroll container, so the
     sticky mobile header scrolled away with the page (#165). */
  overflow-x: hidden;
  overflow-x: clip;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.console-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 22px 14px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.brand-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

/* MeshLite identity from todalabs-home: Archivo 500, -.011em tracking,
   with the website logo scaled to the Console sidebar. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--stone-900);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.011em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
}

.version-pill,
.env-badge,
.status-pill,
.micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.version-pill { padding: 6px 8px; color: var(--brand); background: var(--accent-soft); }

.primary-nav { margin-top: 24px; overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
.nav-label {
  margin: 0 10px 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.nav-label-spaced { margin-top: 26px; }

.nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.nav-item:hover { color: var(--ink); background: var(--surface-soft); }
.nav-item.active { color: var(--brand); background: var(--accent-soft); font-weight: 700; }
.nav-item svg,
.workspace-card svg,
.topbar svg,
.icon-button svg,
.button svg,
.inline-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-count {
  min-width: 21px;
  margin-left: auto;
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--soft);
  background: var(--line-strong);
  font-size: 12px;
  text-align: center;
}

.sidebar-bottom { margin-top: auto; flex: 0 0 auto; padding-top: 8px; padding-bottom: env(safe-area-inset-bottom); }

.workspace-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.workspace-card:hover { border-color: var(--line-strong); box-shadow: 0 3px 12px rgba(0,0,0,.04); }
.workspace-avatar,
.avatar-button {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
  font-size: 14px;
  font-weight: 700;
}
.workspace-copy { display: grid; min-width: 0; gap: 2px; }
.workspace-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card > svg { width: 16px; margin-left: auto; color: var(--muted); }

.app-column { min-width: 0; flex: 1; margin-left: var(--sidebar); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid rgba(226, 227, 222, .85);
  background: rgba(245, 245, 242, .88);
  backdrop-filter: blur(16px);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.env-badge { padding: 7px 9px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.75); }
.env-badge b { font: inherit; }
.env-badge i { width: 6px; height: 6px; border-radius: 50%; background: #4ab379; box-shadow: 0 0 0 3px #e1f4e8; }
.text-button,
.icon-button,
.avatar-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.text-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.text-button:hover { background: var(--surface-muted); color: var(--ink); }
.text-button svg { width: 16px; height: 16px; }
.avatar-button { border: 0; }
.mobile-header { display: none; }
.sidebar-scrim { display: none; }

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 22px;
  border-bottom: 1px solid var(--action-line);
  color: var(--brand);
  background: var(--accent-soft);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.preview-banner strong { white-space: nowrap; }

/* Bandeau d'emprunt. Il doit se distinguer du bandeau d'information : la
   couleur est le seul rappel permanent qu'on agit dans l'espace de quelqu'un
   d'autre, et qu'aucun geste n'y est anodin. */
.banner-support { gap: 12px; border-bottom-color: #e8c2c2; color: #7b2525; background: #fdecec; }
.banner-support .button { flex: none; padding: 4px 10px; font-size: 12px; }

.page-outlet { width: min(1240px, 100%); margin: 0 auto; padding: 34px 34px 72px; outline: none; }
.login-card { width:min(430px,100%); margin:9vh auto 0; padding:30px; border:1px solid var(--line);
              border-radius:18px; background:var(--surface); box-shadow:var(--shadow); }
body.login-mode .sidebar, body.login-mode .topbar, body.login-mode .mobile-header,
body.login-mode .preview-banner { display:none; }
body.login-mode .app-column { margin-left:0; }
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-title { margin: 0; font-size: clamp(27px, 3vw, 38px); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; }
.page-subtitle { max-width: 680px; margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.header-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: var(--cta); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.button-primary:hover:not(:disabled) { background: var(--cta-hover); }
.button-accent { color: #fff; background: var(--cta); box-shadow: 0 5px 14px rgba(0,0,0,.12); }
.button-accent:hover:not(:disabled) { background: var(--cta-hover); }
.button-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.button-secondary:hover { background: var(--surface-soft); }
.button-ghost { color: var(--muted); background: transparent; }
.button-ghost:hover { background: var(--surface-soft); }
.button-danger { color: var(--danger); border-color: #f0c9c5; background: #fff8f7; }
.button-small { min-height: 36px; padding: 0 11px; border-radius: 8px; font-size: 14px; }
.button[disabled] { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }

.grid { display: grid; gap: 16px; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-column { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.two-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-stack { display: grid; gap: 18px; }

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0,0,0,.015);
}
.card-pad { padding: 20px; }
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}
.card-header + .card-body { padding-top: 14px; }
.card-body { padding: 20px; }
.card-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.card-description { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.section-heading { margin: 30px 0 14px; font-size: 16px; letter-spacing: -.02em; }

.metric-card { min-height: 142px; padding: 17px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: var(--muted); font-size: 14px; font-weight: 600; }
.metric-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--muted); background: var(--surface-soft); }
.metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-value { margin-top: 19px; font-size: 28px; font-weight: 700; letter-spacing: -.045em; }
.metric-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 12px; }
.trend-up { color: var(--green); font-weight: 700; }

.progress-track { overflow: hidden; height: 7px; border-radius: 999px; background: var(--surface-muted); }
/* Carte de fabrication : le pourcentage se lit de loin, le chiffre est
   tabulaire pour ne pas sautiller a chaque rafraichissement. */
.build-percent { font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress-accent > span { background: var(--accent); }
.progress-green > span { background: #45a875; }
.metric-progress { margin-top: 12px; }

.onboarding-card { overflow: hidden; }
.onboarding-lead {
  position: relative;
  overflow: hidden;
  padding: 25px;
  color: #fff;
  background: var(--ink);
}
.onboarding-lead::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -45px;
  bottom: -110px;
  border: 28px solid var(--accent);
  border-radius: 50%;
  opacity: .9;
}
.onboarding-lead h2 { max-width: 440px; margin: 0; font-size: 23px; letter-spacing: -.035em; }
.onboarding-lead p { max-width: 540px; margin: 9px 0 0; color: var(--stone-200); font-size: 14px; line-height: 1.55; }
.onboarding-progress { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.onboarding-progress .progress-track { width: min(300px, 65%); background: #3B3830; }
.onboarding-progress .progress-track span { background: var(--accent); }
.onboarding-progress small { color: var(--line-strong); font-size: 12px; }
.checklist { display: grid; padding: 8px 20px 16px; }
.check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; }
.check-dot { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; background: #fff; }
.check-dot.done { color: #fff; border-color: var(--green); background: var(--green); }
.check-dot svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.check-copy strong { display: block; font-size: 14px; }
.check-copy small { color: var(--muted); font-size: 14px; }
.inline-action { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 6px 0;
  border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.inline-action:hover { color: var(--accent-dark); }
.inline-action svg { width: 13px; height: 13px; }

.release-card { display: grid; gap: 18px; }
.release-head { display: flex; align-items: center; gap: 11px; }
.release-logo { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #fff; background: var(--ink); font-size: 15px; font-weight: 700; }
.release-head strong { display: block; font-size: 15px; }
.release-head small { color: var(--muted); font-size: 12px; }
.status-pill { padding: 6px 8px; }
.status-success { color: var(--green); background: var(--green-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }
.status-neutral { color: var(--muted); background: var(--surface-muted); }
.status-blue { color: var(--blue); background: var(--blue-soft); }
.release-list { display: grid; gap: 10px; }
.release-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.release-line strong { color: var(--ink); font-weight: 600; }

.avatar-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 300px)); justify-content:start; }
.avatar-card { overflow: hidden; }
.avatar-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.15 / 1;
  background: #ddd8d1;
}
.avatar-visual video { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.avatar-visual .avatar-preview-poster { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.avatar-visual video { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.avatar-visual.is-preview-playing video { opacity: 1; }
.avatar-visual:focus-visible { outline: 3px solid var(--blue, #2454de); outline-offset: -3px; }
.avatar-visual::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.42)); pointer-events: none; }
.avatar-visual .status-pill { position: absolute; z-index: 2; top: 12px; left: 12px; }
.avatar-initials { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.68); font-size: 50px; font-weight: 700; letter-spacing: -.08em; }
.avatar-coming-2 { background: #b9c8d8; }
.avatar-coming-3 { background: #d9c4b3; }
.avatar-noise { position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(circle at 30% 20%, #fff 0 1px, transparent 1px), radial-gradient(circle at 70% 65%, #fff 0 1px, transparent 1px); background-size: 17px 17px, 23px 23px; }
.avatar-card-body { padding: 17px; }
.avatar-card-body h3 { margin: 0; font-size: 16px; }
.avatar-card-body p { min-height: 34px; margin: 5px 0 15px; color: var(--muted); font-size: 14px; line-height: 1.5; }
/* `wrap` parce qu'entre 601 et 900 px la carte fait 211 px et porte trois
   commandes : sans lui, la derniere sortait de 49 px et se faisait couper
   par le rognage de la carte. Constate en telephone couche. */
/* Les badges de diffusion vivent sur la vignette, en face de la pastille d'etat : ils
   qualifient l'avatar lui-meme et n'ont rien a faire dans la barre d'actions, ou ils
   entraient en concurrence avec des verbes. */
.avatar-badges { position: absolute; z-index: 2; top: 12px; right: 12px; display: flex; gap: 6px; }
.avatar-badge { cursor: pointer; border: 1px solid rgba(255,255,255,.55); border-radius: 999px;
  padding: 4px 10px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .02em;
  color: #fff; background: rgba(20,20,18,.42); backdrop-filter: blur(6px);
  transition: background .15s ease, border-color .15s ease, opacity .15s ease; }
.avatar-badge:hover { background: rgba(20,20,18,.68); }
/* Pose ou non : la difference se lit sans lire le texte. Un badge eteint reste visible,
   sinon on ne saurait pas qu'on peut le poser. */
.avatar-badge.is-on { background: #fff; color: var(--ink); border-color: #fff; }
.avatar-badge:not(.is-on) { opacity: .72; }
.avatar-badge:disabled { cursor: default; opacity: .45; }

.avatar-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
/* L'action principale a sa propre ligne, pleine largeur : c'est elle qu'on cherche, et
   elle etait noyee au milieu de six boutons fantomes de meme taille. */
.avatar-card-primary { margin-bottom: 9px; }
.avatar-card-primary .button { width: 100%; justify-content: center; }
.avatar-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.avatar-id { color: var(--soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.custom-avatar-banner { position: relative; overflow: hidden; padding: 25px; color: #fff; background: var(--ink); }
.custom-avatar-banner::before { content: ""; position: absolute; width: 230px; height: 230px; right: -75px; top: -90px; border-radius: 50%; background: var(--accent); }
.custom-avatar-banner > * { position: relative; z-index: 1; }
.custom-avatar-banner h2 { max-width: 520px; margin: 0; font-size: 21px; letter-spacing: -.03em; }
.custom-avatar-banner p { max-width: 570px; margin: 8px 0 18px; color: var(--stone-200); font-size: 14px; line-height: 1.55; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); }
.tab { flex: 1; min-height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 700; cursor: pointer; }
.tab.active { color: var(--brand); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.code-card { overflow: hidden; border: 1px solid #3B3830; border-radius: 13px; background: var(--ink); color: var(--paper); }
.code-toolbar { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid #3B3830; color: var(--stone-200); font-size: 12px; }
.code-dots { display: flex; gap: 5px; }
.code-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.copy-code { min-height: 30px; padding: 0 6px; border: 0; color: var(--stone-200); background: transparent; font-size: 12px; cursor: pointer; }
.copy-code:hover { color: #fff; }
pre { overflow: auto; max-width: 100%; margin: 0; padding: 18px; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
/* Sans cette borne, la plus longue ligne du snippet fixe la largeur du bloc,
   et c'est la page entiere qui s'elargit derriere elle. */
pre code { display: block; min-width: 0; }
.code-card { overflow: hidden; }
.code-accent { color: var(--action-on-dark); }
.code-blue { color: #A9C2FA; }
.code-green { color: #9adaab; }
.architecture-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-items: stretch; }
.flow-node { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.flow-node:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; z-index: 2; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 14px; transform: translateY(-50%); }
.flow-node strong { display: block; font-size: 14px; }
.flow-node small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Entre 601 px et environ 1100 px, la carte est trop etroite pour les cinq
   colonnes des comptes : le tableau demande 812 px et n'en recevait que 509.
   Il etait coupe net — les dernieres colonnes, donc les actions, n'existaient
   plus. Il defile desormais dans sa carte. En dessous de 601 px la question
   ne se pose pas : chaque ligne y devient une petite fiche empilee. */
.card:has(> .data-table) { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.empty-table { padding: 34px 20px; color: var(--muted); text-align: center; font-size: 14px; }

.form-grid { display: grid; gap: 15px; }
.form-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field label { color: var(--ink); font-size: 15px; font-weight: 700; }
.field-hint { margin: -2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.input, .select { min-height: 44px; height: auto; padding: 10px 12px; font-size: 16px; }
.textarea { min-height: 92px; padding: 11px 12px; font-size: 16px; line-height: 1.5; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,78,188,.12); }
.input::placeholder, .textarea::placeholder { color: var(--soft); }
/* Zone de depot du portrait. L'`input type=file` nu affichait le bouton du
   systeme — gris, intraduisible, et que personne ne lit comme « posez une photo
   ici ». Il est toujours la, masque : c'est lui qui porte le fichier et la
   validation du formulaire, la zone ne fait que le declencher. */
.dropzone { position: relative; display: flex; align-items: center; justify-content: center;
  gap: 12px; min-height: 108px; padding: 16px; border: 1.5px dashed var(--line-strong);
  border-radius: 12px; background: var(--surface-soft); cursor: pointer; text-align: center;
  transition: border-color .12s, background .12s; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Pendant le survol d'un fichier glisse : la zone doit dire qu'elle le prendra. */
.dropzone[data-over] { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.dropzone-empty, .dropzone-filled { display: flex; flex-direction: column; align-items: center; gap: 3px; }
/* `display:flex` bat l'attribut `hidden`, qui ne pose qu'un `display:none` de
   feuille par defaut : sans cette ligne, l'invitation a deposer reste affichee
   a cote du nom du fichier depose. */
.dropzone-empty[hidden], .dropzone-filled[hidden] { display: none; }
.dropzone-empty svg { width: 22px; height: 22px; margin-bottom: 3px; fill: none;
  stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dropzone:hover .dropzone-empty svg, .dropzone[data-over] .dropzone-empty svg { stroke: var(--accent); }
.dropzone strong { font-size: 15px; color: var(--ink); }
.dropzone span { font-size: 14px; color: var(--muted); }
.dropzone-name { overflow-wrap: anywhere; }
/* L'apercu prouve que c'est LE bon visage qui part : une photo deposee par
   erreur coute trois heures de GPU avant qu'on s'en apercoive. */
.dropzone-preview { width: 68px; height: 68px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line); flex: none; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
/* Le choix de voix pose un menu et son bouton d'ecoute cote a cote : sans cette
   ligne le menu se retracte sur son option la plus courte. */
.input-row .select { flex: 1; min-width: 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.checkbox-row input { margin-top: 2px; accent-color: var(--accent); }

.voice-options { display: grid; gap: 10px; }
.voice-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.voice-option:hover { border-color: var(--action-line); }
.voice-option.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.provider-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #fff; background: var(--ink); font-size: 14px; font-weight: 700; }
.provider-icon.azure { background: #0875c9; }
.provider-icon.openai { color: #191a18; background: #e1e9e4; }
.voice-option strong { display: block; font-size: 14px; }
.voice-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.radio-dot { width: 17px; height: 17px; border: 1px solid var(--line-strong); border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; background: #fff; }
.selected .radio-dot { border-color: var(--accent); background: var(--accent); }
.info-note { padding: 13px 14px; border: 1px solid var(--action-line); border-radius: 10px; color: var(--brand); background: var(--accent-soft); font-size: 14px; line-height: 1.5; }

.chart-card { padding: 20px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.chart-legend { display: flex; gap: 15px; color: var(--muted); font-size: 12px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--ink); }
.legend-dot.accent { background: var(--accent); }
.bar-chart { display: flex; height: 180px; align-items: flex-end; gap: 10px; margin-top: 26px; padding-top: 10px; border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% 45px; }
.bar-group { display: flex; height: 100%; flex: 1; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: min(12px, 35%); min-height: 3px; border-radius: 4px 4px 0 0; background: var(--ink); }
.bar.accent { background: var(--accent); }
.bar-labels { display: flex; justify-content: space-around; margin-top: 8px; color: var(--soft); font-size: 12px; }

.plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-card { position: relative; display: flex; min-height: 385px; flex-direction: column; padding: 19px; }
.plan-card.featured { color: #fff; border-color: var(--ink); background: var(--ink); box-shadow: var(--shadow); }
.plan-card.current::before { content: none; }
.plan-name { font-size: 15px; font-weight: 700; }
.plan-price { min-height: 50px; margin-top: 14px; font-size: 28px; font-weight: 700; letter-spacing: -.05em; }
.plan-price small { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.featured .plan-price small, .featured .plan-summary { color: var(--stone-200); }
.plan-summary { min-height: 48px; margin: 5px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.plan-features { display: grid; gap: 10px; margin: 0 0 20px; padding: 15px 0 0; border-top: 1px solid var(--line); list-style: none; }
.featured .plan-features { border-color: #3B3830; }
.plan-features li { display: flex; gap: 7px; font-size: 14px; line-height: 1.4; }
.plan-features li::before { content: "✓"; color: var(--green); font-weight: 700; }
.featured .plan-features li::before { color: #74d79e; }
.plan-card .button { margin-top: auto; }

.settings-list { display: grid; }
.setting-row { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; font-size: 14px; }
.setting-copy small { display: block; max-width: 560px; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.toggle { position: relative; width: 37px; height: 21px; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .18s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); }

.modal-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; }
.modal-layer { overflow: hidden; overscroll-behavior: contain; }
.modal-layer[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16,16,14,.42); backdrop-filter: blur(4px); }
.modal {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0,0,0,.2);
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 21px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-close { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 18px; cursor: pointer; }
.modal-body { padding: 20px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.secret-reveal { padding: 14px; border: 1px solid var(--action-line); border-radius: 10px; background: var(--accent-soft); }
.secret-reveal code { display: block; overflow-wrap: anywhere; color: var(--ink); font: 13px/1.5 ui-monospace, monospace; }
.secret-reveal p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; width: min(360px, calc(100vw - 40px)); gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; box-shadow: var(--shadow); animation: toast-in .2s ease both; }
.toast-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); }
.toast strong { display: block; font-size: 14px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.page-loading { display: grid; gap: 14px; }
.page-loading span { display: block; height: 120px; border-radius: 15px; background: linear-gradient(90deg, var(--surface-muted), var(--surface-soft), var(--surface-muted)); background-size: 200% 100%; animation: skeleton 1.2s linear infinite; }
.page-loading span:first-child { height: 70px; }
@keyframes skeleton { to { background-position: -200% 0; } }

.muted { color: var(--muted); }
.text-success { color: var(--green); }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
/* Page « Création d'avatars » (creation-defaults.js). */
.creation-intro { margin: -6px 0 18px; }
.creation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.creation-grid .field { align-content: start; }
.creation-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.creation-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.creation-check span { display: grid; gap: 4px; }
.creation-check small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.creation-reference { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 14px 0 0; }
.creation-group th { padding-top: 18px; color: var(--soft); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
/* Toujours à portée : la page est longue (liste des réglages, derniers avatars). */
.creation-origins .status-pill { white-space: normal; }
.creation-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--canvas); }
@media (max-width: 820px) { .creation-grid { grid-template-columns: 1fr; } }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --sidebar: 278px; }
  .sidebar { transform: translateX(-102%); box-shadow: 18px 0 60px rgba(0,0,0,.12); transition: transform .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(20,20,18,.38); }
  body.menu-open .sidebar-scrim { display: block; }
  .app-column { margin-left: 0; }
  .topbar { display: none; }
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(250,248,243,.92);
    backdrop-filter: blur(14px);
    transition: transform .2s ease;
  }
  /* console-header-scroll.js: hidden while scrolling down, back on scroll up. */
  body.mobile-header-hidden .mobile-header { transform: translateY(-100%); }
  html { scroll-padding-top: 72px; }
  .language-control-mobile { display:inline-flex; }
  .language-control-mobile select { width:112px; }
  .mobile-header .brand { gap: 12px; font-size: 22px; }
  .mobile-header .brand-mark { width: 26px; height: 26px; }
  .icon-button { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: var(--surface-muted); }
  .page-outlet { padding: 26px 17px 55px; }
  .preview-banner { align-items: flex-start; padding-inline: 17px; text-align: left; }
  .two-column, .two-equal { grid-template-columns: 1fr; }
  .page-header { align-items: flex-start; }
}

@media (max-width: 600px) {
  .preview-banner { display: grid; gap: 2px; }
  .page-header { display: grid; gap: 18px; }
  .page-title { font-size: 29px; }
  .header-actions { width: 100%; }
  .header-actions .button { flex: 1; }
  .metrics-grid, .avatar-grid, .three-column, .form-two { grid-template-columns: 1fr; }
  /* La vignette passe au-dessus du nom au lieu d'etre a cote : sur 360 px, la
     mise en ligne ne laissait au nom de fichier qu'une colonne de quelques
     caracteres, coupee au milieu. */
  .dropzone { flex-direction: column; gap: 10px; min-height: 128px; }
  .dropzone-preview { width: 56px; height: 56px; }
  /* Le menu de voix et son bouton d'ecoute : cote a cote, le menu tombait sous
     la largeur d'un nom de voix. */
  .input-row .button-small { width: 100%; }
  .metric-card { min-height: 126px; }
  .avatar-visual { aspect-ratio: 1.5 / 1; }
  .avatar-card-actions { align-items: stretch; flex-direction: column; }
  .avatar-card-actions .button { width: 100%; }
  .architecture-flow { grid-template-columns: 1fr; }
  .flow-node:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .data-table td { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 9px; padding: 5px 14px; border: 0; }
  .data-table td::before { content: attr(data-label); color: var(--soft); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .data-table td[colspan] { display: block; }
  .data-table td[colspan]::before, .table-actions::before { content: none; }
  .data-table tr:last-child { border-bottom: 0; }
  .table-actions { justify-content: flex-start; padding-top: 7px !important; }
  .check-row { grid-template-columns: 28px minmax(0, 1fr); padding: 8px 0; }
  .check-row .inline-action { grid-column: 2; justify-self: start; padding: 0; }
  .onboarding-lead { padding: 21px; }
  .onboarding-lead h2 { font-size: 20px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-layer { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 91vh; border-radius: 18px 18px 0 0; }
  /* L'interrupteur est petit par dessin ; au doigt, c'est sa zone de contact
     qui doit grandir, pas son trace. `::after` porte deja le curseur : la zone
     passe donc par `::before`, qui ne dessine rien. */
  .toggle::before { content: ""; position: absolute; inset: -11px -8px; }
  .input-row { display: grid; }

  /* La case de consentement d'un avatar personnalise faisait 13 px de cote.
     Son libelle entier est cliquable, donc la cible etait deja large ; c'est
     le dessin qui ne disait pas ou appuyer. */
  .checkbox-row input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shared interaction colors across the shell, forms, menus and dialogs. */
::selection { color: var(--ink); background: var(--action-line); }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.button-primary:active:not(:disabled), .button-accent:active:not(:disabled) { background: var(--cta-active); }
.button-primary:disabled, .button-accent:disabled { background: var(--cta-disabled); color: var(--ink); box-shadow: none; opacity: 1; }
.nav-item.active .nav-count { color: var(--brand); background: var(--action-line); }
.plan-card.featured .button-secondary { color: var(--brand); }
/* Keep dark CTAs distinct from dark product panels. */
:is(.onboarding-lead, .custom-avatar-banner, .plan-card.featured) :is(.button-primary, .button-accent):not(:disabled) { color: #fff; background: var(--cta); border-color: var(--muted); }
:is(.onboarding-lead, .custom-avatar-banner, .plan-card.featured) :is(.button-primary, .button-accent):hover:not(:disabled) { background: var(--cta-hover); }
:is(.onboarding-lead, .custom-avatar-banner, .plan-card.featured) :is(.button-primary, .button-accent):active:not(:disabled) { background: var(--cta-active); }
:is(.onboarding-lead, .custom-avatar-banner, .plan-card.featured) :focus-visible { outline-color: var(--action-on-dark); }

/* The workspace library stays compact; catalogue controls belong to Platform. */
.console-shell [hidden] { display:none !important; }
.console-area-label { font-size:14px; font-weight:600; color:var(--muted); }
.topbar-context { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
.avatar-page-header { align-items:center; margin-bottom:24px; }
.avatar-create-action { display:flex; flex-direction:column; align-items:flex-end; gap:7px; }
.avatar-create-action small,.avatar-quota-note { color:var(--muted); font-size:13px; }
.avatar-quota-note { margin:-8px 0 20px; }
.avatar-library .avatar-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),300px)); align-items:start; gap:20px; justify-content:start; }
.avatar-library .avatar-card-body { padding:20px; }
.avatar-library .avatar-name-row { display:flex; align-items:center; gap:8px; min-height:36px; margin-bottom:16px; }
.avatar-card-heading { display:flex; align-items:flex-start; gap:8px; }
.avatar-card-heading .avatar-name-row { flex:1; min-width:0; }
.avatar-actions { position:relative; flex:none; margin-left:auto; }
.avatar-actions > summary { display:grid; place-items:center; width:40px; height:40px; padding:8px; border-radius:8px; color:var(--muted); list-style:none; }
.avatar-actions > summary::-webkit-details-marker { display:none; }
.avatar-actions > summary:hover,.avatar-actions[open] > summary { background:var(--surface-muted); color:var(--ink); }
.avatar-actions-list { position:absolute; top:calc(100% + 4px); right:0; z-index:5; min-width:148px; padding:4px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.avatar-actions-list .button { width:100%; justify-content:flex-start; min-height:40px; white-space:nowrap; }
@media (pointer:coarse) { .avatar-actions > summary,.avatar-actions-list .button { min-width:44px; min-height:44px; } }
.avatar-library .avatar-name-row h3 { font-size:19px; line-height:1.35; overflow-wrap:anywhere; }
.avatar-rename { display:grid; place-items:center; flex-shrink:0; width:32px; height:32px; padding:6px; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; }
.avatar-rename:hover { background:var(--surface-muted); color:var(--ink); }
.avatar-rename svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.avatar-name-form { width:100%; min-width:0; }
.avatar-name-form input { width:100%; }
.avatar-name-form > div { display:flex; gap:6px; margin-top:8px; }
.avatar-access { position:absolute; top:12px; left:12px; z-index:2; display:flex; align-items:center; gap:8px; max-width:calc(100% - 24px); padding:7px 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; font-weight:600; line-height:1.4; cursor:pointer; }
.avatar-access svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; }
.avatar-access-options { display:grid; gap:10px; }
.avatar-access-options label { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
.avatar-access-options input { accent-color:var(--accent); width:18px; height:18px; }
.avatar-library .avatar-card-body .avatar-progress-copy { min-height:0; margin:0 0 16px; }
.avatar-library .avatar-card-primary { margin-bottom:0; }
.avatar-lifecycle { max-width:calc(100% - 24px); }
.platform-catalog .avatar-access + .avatar-lifecycle { top:54px; }
.avatar-plan-summary { padding:18px 22px; margin-bottom:30px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.avatar-plan-summary > div { display:flex; flex-wrap:wrap; align-items:center; gap:8px 24px; }
.avatar-plan-summary strong { font-size:15px; }
.avatar-plan-summary span { color:var(--ink); font-size:14px; }
.avatar-plan-summary p { margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.avatar-library-section + .avatar-library-section { margin-top:36px; }
.avatar-section-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.avatar-section-heading h2 { margin:0; font-size:19px; line-height:1.4; }
.avatar-entitlement { position:absolute; z-index:2; left:12px; bottom:12px; max-width:calc(100% - 24px); padding:7px 11px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); font-size:12px; font-weight:600; line-height:1.5; }
.avatar-entitlement.is-locked { background:var(--ink); color:var(--surface); border-color:var(--ink); }
.avatar-upgrade-action .button { width:100%; }
.avatar-custom-empty { display:flex; align-items:center; gap:18px; padding:24px; }
.avatar-custom-empty > div:nth-child(2) { flex:1; }
.avatar-custom-empty h3 { margin:0; font-size:15px; line-height:1.5; }
.avatar-custom-empty p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.avatar-custom-symbol { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; border:1px dashed var(--line); border-radius:10px; color:var(--muted); font-size:24px; }
.avatar-requests { margin-top:20px; }
.avatar-plan-options { min-width:0; margin:2px 0 0; padding:14px; border:1px solid var(--line); border-radius:10px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.avatar-plan-options legend { padding:0 6px; font-size:13px; font-weight:600; }
.avatar-plan-options label { padding:10px; gap:8px; font-size:13px; }
.avatar-plan-options input { flex-shrink:0; }
.avatar-plan-options p { grid-column:1/-1; margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.console-shell[data-area="platform"] .console-area-label { color:var(--brand); }
@media(max-width:680px) {
  .avatar-page-header { align-items:flex-start; gap:16px; }
  .avatar-page-header .page-title { font-size:30px; }
  .avatar-create-action { align-items:flex-start; }
  .avatar-library .avatar-card-body { padding:18px; }
  .avatar-library .avatar-visual { aspect-ratio:1.35 / 1; }
  .avatar-plan-summary { padding:16px; }
  .avatar-plan-summary > div { flex-direction:column; align-items:flex-start; gap:6px; }
  .avatar-custom-empty { flex-wrap:wrap; padding:18px; gap:12px; }
  .avatar-custom-empty > .button { width:100%; }
}

/* Shared product UI: actual resource scope, one account entry, local controls. */
.mobile-scope { display:none; }
.console-area-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.topbar-context { min-width:0; }
.topbar-actions { flex-shrink:0; }
.current-access { font-size:14px; font-weight:600; color:var(--muted); }
.avatar-admin-state { display:grid; gap:8px; margin:4px 0 18px; font-size:13px; color:var(--muted); }
.avatar-admin-state button { justify-self:start; text-align:left; }
.avatar-settings-link { display:inline-flex; min-height:36px; align-items:center; margin-top:8px; color:var(--muted); font-size:13px; text-underline-offset:3px; }
.avatar-settings-links { display:flex; flex-wrap:wrap; gap:0 16px; }
.avatar-atlas-link { color:var(--action); font-weight:600; }
.list-filters { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 24px; }
.list-filters label { flex:1 1 180px; min-width:0; }
.list-filters label:first-child { flex-grow:2; }
.list-filters input,.list-filters select { width:100%; }
[data-list-empty] { margin:20px 0; color:var(--muted); }
.billing-summary { display:flex; flex-wrap:wrap; align-items:center; gap:10px 28px; font-size:14px; margin:-8px 0 24px; }
.billing-summary > span { color:var(--muted); }
.billing-summary strong { color:var(--ink); font-weight:600; }
.billing-target { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px; background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:20px; }
.billing-target p { margin:6px 0 0; color:var(--muted); font-size:14px; }
.billing-mode,.billing-currency { margin:8px 0; color:var(--muted); font-size:13px; line-height:1.5; }
.plan-eligible { display:block; color:var(--brand); font-size:13px; font-weight:600; margin:10px 0; }
.account-menu { display:grid; gap:12px; }
.account-menu strong,.account-menu p { overflow-wrap:anywhere; }
.account-menu p { margin:0 0 8px; font-size:14px; color:var(--muted); }
.branding-choice { display:flex; align-items:center; gap:10px; margin-top:20px; min-height:44px; font-size:14px; }
.branding-choice input { width:18px; height:18px; accent-color:var(--brand); }
.summary-grid { display:grid; grid-template-columns:minmax(100px,1fr) minmax(0,2fr); gap:12px 18px; font-size:14px; }
.summary-grid dt { color:var(--muted); }
.summary-grid dd { margin:0; overflow-wrap:anywhere; }
.summary-workspace + .summary-workspace { margin-top:24px; padding-top:16px; border-top:1px solid var(--line); }
.table-actions .button { min-height:36px; }
@media (max-width:820px) {
  .sidebar { height:100dvh; padding-top:16px; }
  .primary-nav { margin-top:18px; }
  .sidebar-bottom .nav-item { min-height:40px; }
  .account-trigger { margin-top:8px; }
  .mobile-scope { display:block; padding:12px 20px 0; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
  body.login-mode .mobile-scope { display:none; }
  .billing-summary { margin-top:0; gap:10px; flex-direction:column; align-items:flex-start; }
  .billing-target { align-items:flex-start; flex-direction:column; }
  .list-filters label { flex-basis:100%; }
  .avatar-section-heading { align-items:flex-start; }
  .summary-grid { grid-template-columns:1fr 1fr; }
}
@media (prefers-reduced-motion:reduce) { .sidebar { transition:none; } }

[hidden] { display: none !important; }

.banner-support { position:sticky; top:66px; z-index:19; }
@media(max-width:820px) {
  .banner-support { top:60px; transition: transform .2s ease; }
  body.mobile-header-hidden .banner-support { transform: translateY(-60px); }
}

/* Voice is a card configuration field, ahead of the trial personality. */
.avatar-voice-field { display:flex; flex-direction:column; gap:6px; min-width:0; margin:0 0 18px; }
.avatar-voice-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:24px; }
.avatar-voice-heading label { color:var(--muted); font-size:13px; font-weight:500; }
.avatar-voice-heading button { font-size:13px; color:var(--muted); min-height:24px; }
.avatar-voice-field select { width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:white; color:var(--ink); font:inherit; font-size:14px; text-overflow:ellipsis; }
.avatar-voice-status { font-size:12px; line-height:1.4; color:var(--muted); }
.avatar-voice-status.is-error { color:var(--danger); }
.avatar-voice-field [data-voice-retry] { align-self:flex-start; font-size:13px; }

.avatar-voice-heading .avatar-voice-status { margin-left:auto; text-align:right; }

.avatar-incident-panel { position:fixed;left:24px;bottom:24px;z-index:45;width:min(360px,calc(100vw - 48px));max-height:40vh;overflow:auto;padding:14px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 22px #0002; }
.avatar-incident-panel summary{font-weight:600;cursor:pointer;}
.avatar-incident-panel p{font-size:13px;overflow-wrap:anywhere;}

.avatar-grid .avatar-card { width:100%; max-width:300px; justify-self:start; }
.avatar-cleanup-list { max-height: 260px; overflow: auto; padding: 0; list-style: none; }
.avatar-cleanup-list li { display: flex; gap: 16px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border, #e8e4dd); overflow-wrap: anywhere; }
.avatar-cleanup-list small { flex-shrink: 0; }
