/* New companion look. Only applies when <html data-look="new">; the classic
   look is untouched. Same font (Inter), icons (Material Icons), videos and initials. */

html[data-look="new"] {
  --nl-c1: #2563eb; --nl-c2: #22d3ee; --nl-c3: #6366f1;
  --nl-ink: #0f172a; --nl-muted: #64748b; --nl-surface: #ffffff; --nl-line: #e2e8f0;
  --nl-soft: color-mix(in srgb, var(--nl-c1) 8%, #ffffff);
  --nl-page: #f6f8fc;
}
html[data-look="new"][data-companion="iris"] { --nl-c1: #7c3aed; --nl-c2: #ec4899; --nl-c3: #a78bfa; }
html[data-look="new"][data-companion="mia"] { --nl-c1: #f97316; --nl-c2: #f43f5e; --nl-c3: #fbbf24; }
html[data-look="new"][data-companion="immersia"] { --nl-c1: #059669; --nl-c2: #84cc16; --nl-c3: #34d399; }
html[data-look="new"][data-theme="dark"] {
  --nl-ink: #e2e8f0; --nl-muted: #94a3b8; --nl-surface: #111827; --nl-line: #1f2937;
  --nl-soft: color-mix(in srgb, var(--nl-c1) 16%, #0b1220);
  --nl-page: #0b1220;
}

/* ---------- Calmer page: fewer buttons in the top bar ---------- */
html[data-look="new"] body.app-authenticated {
  background:
    radial-gradient(900px 520px at 70% -10%, color-mix(in srgb, var(--nl-c1) 12%, transparent), transparent 70%),
    radial-gradient(700px 420px at 10% 110%, color-mix(in srgb, var(--nl-c2) 9%, transparent), transparent 70%),
    var(--nl-page) !important;
  transition: background .8s ease;
}
html[data-look="new"] body .top-bar .profile-icon-btn,
html[data-look="new"] body .top-bar #user-name,
html[data-look="new"] body .chat-top-banner,
html[data-look="new"] body #sidebar-avatar-card,
html[data-look="new"] body #sidebar-avatar-show,
html[data-look="new"] body .chat-empty-state .welcome-icon,
html[data-look="new"] body #mobile-speaking-avatar,
html[data-look="new"] body #sidebar-situation,
html[data-look="new"] body .sidebar-collapsible:has(#usage-toggle),
html[data-look="new"] body .sidebar-tools,
html[data-look="new"] body #skill-picker-wrapper .skill-picker-control { display: none !important; }

html[data-look="new"][data-side-tabs="off"] body #notes-side-tab,
html[data-look="new"][data-side-tabs="off"] body #practice-side-tab { display: none !important; }
html[data-look="new"][data-stage-avatar="off"] body .nl-orb { display: none; }

/* New pieces stay hidden in the classic look */
.nl-practice, .nl-situation, .nl-profile-card, .nl-settings, .nl-tools-btn { display: none; }

/* ---------- Practice: three tabs, then your choice and your situation ---------- */
html[data-look="new"] body .chat-action-row { align-items: center; gap: 10px; flex-wrap: wrap; }
html[data-look="new"] body #skill-picker-wrapper { display: block; }
html[data-look="new"] body .nl-practice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nl-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--nl-c1) 7%, var(--nl-page)); border: 1px solid var(--nl-line); }
.nl-tabs button {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 10px;
  background: none; color: var(--nl-muted); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.nl-tabs button[hidden] { display: none; }
.nl-tabs button .material-icons { font-size: 17px; }
.nl-tabs button:hover { color: var(--nl-ink); }
.nl-tabs button.active { background: var(--nl-surface); color: var(--nl-ink); box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .35); }
.nl-tabs button.active .material-icons { color: var(--nl-c1); }
.nl-choice { display: inline-flex; align-items: center; height: 34px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--nl-c1) 35%, transparent); background: var(--nl-soft); animation: nl-pop .2s ease-out; }
.nl-choice[hidden] { display: none; }
.nl-choice button { border: 0; background: none; color: var(--nl-c1); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.nl-choice-open { padding: 0 4px 0 14px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-choice-clear { display: grid; place-items: center; width: 30px; height: 30px; }
.nl-choice-clear .material-icons { font-size: 16px; }
html[data-look="new"] body .nl-situation { display: inline-flex; align-items: center; gap: 2px; height: 34px; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--nl-c1) 40%, var(--nl-line)); }
html[data-look="new"] body .nl-situation.on { border-style: solid; background: var(--nl-soft); }
.nl-situation-open { padding: 0 12px; border: 0; background: none; color: var(--nl-ink); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-situation-switch { position: relative; width: 34px; height: 20px; margin-right: 8px; border: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .2s; }
.nl-situation-switch[hidden] { display: none; }
.nl-situation-switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.nl-situation-switch[aria-checked="true"] { background: var(--nl-c1); }
.nl-situation-switch[aria-checked="true"] span { transform: translateX(14px); }

/* ---------- Your name at the bottom of the companions list ---------- */
html[data-look="new"] body .nl-profile-card {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; padding: 10px 12px; text-align: left;
  border: 1px solid var(--nl-line); border-radius: 16px; background: var(--nl-surface); color: var(--nl-ink); cursor: pointer;
  font: inherit; transition: border-color .2s, box-shadow .2s;
}
html[data-look="new"] body .nl-profile-card:hover { border-color: color-mix(in srgb, var(--nl-c1) 45%, transparent); box-shadow: 0 10px 22px -16px var(--nl-c1); }
.nl-profile-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nl-profile-copy strong { font-size: 14px; }
.nl-profile-copy small { color: var(--nl-muted); font-size: 12px; }
.nl-profile-card > .material-icons { color: var(--nl-muted); font-size: 20px; }

/* Skill practice grouped by capability */
html[data-look="new"] body #skill-chips-grid.nl-grouped { display: flex !important; flex-direction: column; gap: 2px; grid-template-columns: none !important; }
.nl-skill-group { border-radius: 14px; transition: background .2s; }
.nl-skill-group.open { background: var(--nl-soft); }
.nl-skill-group-head {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px;
  background: none; color: var(--nl-ink); text-align: left; cursor: pointer;
}
.nl-skill-group-head:hover { background: var(--nl-soft); }
.nl-skill-group-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; font-size: 19px; color: #fff; background: linear-gradient(135deg, var(--nl-c1), var(--nl-c2)); }
.nl-skill-group-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nl-skill-group-copy strong { font: 600 14px/1.2 Inter, system-ui, sans-serif; }
.nl-skill-group-copy small { color: var(--nl-muted); font: 500 12px/1.3 Inter, system-ui, sans-serif; }
.nl-skill-group-chevron { color: var(--nl-muted); transition: transform .25s ease; }
.nl-skill-group.open .nl-skill-group-chevron { transform: rotate(180deg); }
.nl-skill-group-chips { display: none; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px 58px; }
.nl-skill-group.open .nl-skill-group-chips { display: flex; animation: nl-rise .25s ease both; }
html[data-look="new"] body .nl-skill-group-chips .skill-chip {
  width: auto !important; min-height: 0 !important; padding: 7px 12px !important; border-radius: 999px !important;
  border: 1px solid var(--nl-line) !important; background: var(--nl-surface) !important; color: var(--nl-ink) !important;
  font: 500 13px/1.1 Inter, system-ui, sans-serif !important; box-shadow: none !important;
}
html[data-look="new"] body .nl-skill-group-chips .skill-chip:hover { border-color: color-mix(in srgb, var(--nl-c1) 45%, transparent) !important; background: var(--nl-soft) !important; }
html[data-look="new"] body .nl-skill-group-chips .skill-chip.selected { background: var(--nl-c1) !important; border-color: var(--nl-c1) !important; color: #fff !important; }
html[data-look="new"] body .nl-skill-group-chips .skill-chip .skill-chip-check { display: none !important; }
html[data-look="new"] body #skill-picker-panel { width: min(420px, calc(100vw - 32px)) !important; }
html[data-look="new"] body #skill-picker-panel .skill-guided-note,
html[data-look="new"] body #skill-picker-guided-view > .skill-picker-panel-top,
html[data-look="new"] body #skill-picker-focus-view > .skill-picker-panel-top { display: none !important; }
html[data-look="new"] body .skill-picker-guided-heading { margin: 2px 0 12px !important; font-size: 15px !important; }
html[data-look="new"] body #skill-picker-panel { max-height: min(70vh, 620px); overflow-y: auto; }

.nl-skill-search { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 0 8px; padding: 0 12px; border: 1px solid var(--nl-line); border-radius: 12px; background: var(--nl-surface); }
.nl-skill-search:focus-within { border-color: var(--nl-c1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nl-c1) 15%, transparent); }
.nl-skill-search .material-icons { color: var(--nl-muted); font-size: 20px; }
.nl-skill-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--nl-ink); font: 500 14px/1 Inter, system-ui, sans-serif; }
.nl-skill-group[hidden], .nl-skill-group-chips .skill-chip[hidden], .nl-skill-empty[hidden] { display: none !important; }
.nl-skill-empty { margin: 8px 12px; color: var(--nl-muted); font-size: 13px; }

/* ---------- Focus practice page ---------- */
html[data-look="new"] body .chat-area { position: relative; }
html[data-look="new"] body .nl-focus-page:not([hidden]) {
  position: absolute; left: 0; right: 0; bottom: 0; top: var(--nl-focus-top, 58px); z-index: 30; overflow-y: auto;
  background: var(--nl-surface); border-radius: 0 0 26px 26px; animation: nl-fade .2s ease;
}
.nl-focus-page[hidden], .nl-focus-tools[hidden], #nl-focus-cards[hidden], .nl-focus-detail[hidden] { display: none !important; }
.nl-focus-page-inner { max-width: 1040px; margin: 0 auto; padding: 26px 28px 40px; }
.nl-focus-page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.nl-focus-page-head h2 { margin: 0; color: var(--nl-ink); font: 800 26px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.nl-focus-page-head p { margin: 6px 0 0; color: var(--nl-muted); font-size: 14px; }
.nl-focus-tools { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 6px; }
.nl-focus-search { flex: 1 1 280px; margin: 0 !important; height: 44px !important; }
.nl-focus-code { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 14px; border: 1px solid var(--nl-line); border-radius: 12px; }
.nl-focus-code label { color: var(--nl-ink); font: 600 13px/1 Inter, system-ui, sans-serif; white-space: nowrap; }
.nl-focus-code input { width: 120px; border: 0; outline: 0; background: none; color: var(--nl-ink); font: 500 14px/1 Inter, system-ui, sans-serif; text-transform: uppercase; }
.nl-focus-code input::placeholder { text-transform: none; }
.nl-focus-code button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--nl-c1); color: #fff; font: 700 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.nl-focus-status { min-height: 18px; margin: 4px 0 8px; color: var(--nl-muted); font-size: 13px; }
.nl-focus-group { margin-top: 14px; }
.nl-focus-group h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; color: var(--nl-ink); font: 700 15px/1.2 Inter, system-ui, sans-serif; }
.nl-focus-group h3 small { color: var(--nl-muted); font-weight: 500; font-size: 12px; }
.nl-focus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nl-focus-skeleton span { height: 120px; border-radius: 18px; border: 1px solid var(--nl-line);
  background: linear-gradient(90deg, var(--nl-surface) 0%, var(--nl-soft) 50%, var(--nl-surface) 100%) 0 0 / 200% 100%;
  animation: nl-shimmer 1.4s ease-in-out infinite; }
@keyframes nl-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .nl-focus-skeleton span { animation: none; } }
.nl-focus-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.nl-focus-empty p { flex-basis: 100%; margin: 0; color: var(--nl-muted); font-size: 14px; }
.nl-focus-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--nl-line); border-radius: 18px; background: var(--nl-surface); color: var(--nl-ink);
  transition: transform .2s, border-color .2s, box-shadow .2s; animation: nl-rise .35s ease both;
}
.nl-focus-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--nl-c1) 45%, transparent); box-shadow: 0 16px 30px -22px var(--nl-c1); }
.nl-focus-card.coded { background: color-mix(in srgb, var(--nl-c1) 4%, var(--nl-surface)); border-color: color-mix(in srgb, var(--nl-c1) 30%, var(--nl-line)); }
.nl-focus-card.active { border-color: var(--nl-c1); }
.nl-focus-card strong { font: 700 16px/1.3 Inter, system-ui, sans-serif; }
.nl-focus-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--nl-muted); font-size: 12px; }
.nl-focus-card-summary { color: var(--nl-muted); font-size: 13px; line-height: 1.45; }
.nl-focus-card-with { color: var(--nl-ink); font-size: 12px; font-weight: 600; margin-top: 2px; }
.nl-badge { padding: 2px 8px; border-radius: 6px; background: #dbeafe; color: #1d4ed8; font: 700 11px/1.4 Inter, system-ui, sans-serif; font-style: normal; text-transform: uppercase; letter-spacing: .03em; }
.nl-badge.code { background: #dcfce7; color: #15803d; }
.nl-badge.on { background: var(--nl-c1); color: #fff; }
.nl-focus-detail { max-width: 760px; margin-top: 14px; animation: nl-rise .3s ease both; }
.nl-focus-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 0; border: 0; background: none; color: var(--nl-c1); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.nl-focus-back .material-icons { font-size: 18px; }
.nl-focus-detail h3 { margin: 8px 0 6px; color: var(--nl-ink); font: 800 24px/1.25 Inter, system-ui, sans-serif; }
.nl-focus-detail-summary { margin: 0 0 18px; color: var(--nl-muted); font-size: 15px; line-height: 1.5; }
.nl-focus-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nl-focus-detail-grid section { padding: 14px 16px; border: 1px solid var(--nl-line); border-radius: 16px; }
.nl-focus-detail-grid h4 { margin: 0 0 8px; color: var(--nl-muted); font: 700 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.nl-focus-detail-grid p, .nl-focus-detail-grid li { margin: 0; color: var(--nl-ink); font-size: 14px; line-height: 1.5; }
.nl-focus-detail-grid ul { margin: 0; padding-left: 18px; }
.nl-focus-how { margin: 16px 0; color: var(--nl-ink); font-size: 14px; line-height: 1.5; }
.nl-focus-start { height: 46px; padding: 0 22px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--nl-c1), var(--nl-c2)); color: #fff; font: 700 15px/1 Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 14px 28px -16px var(--nl-c1); }
.nl-focus-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nl-focus-start-other { height: 46px; padding: 0 18px; border: 1px solid var(--nl-line); border-radius: 14px; background: var(--nl-surface); color: var(--nl-ink); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.nl-focus-start-other:hover { background: var(--nl-soft); }
.nl-focus-note { margin: 14px 0 0; color: var(--nl-muted); font-size: 13px; }
html[data-look="new"] body .nl-situation[hidden] { display: none; }
.nl-focus-start:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Focus topic chosen: the centre says what you are practising */
html[data-look="new"] body #welcome-banner.nl-has-focus > p,
html[data-look="new"] body #welcome-banner.nl-has-focus > .suggestions { display: none !important; }
.nl-focus-intro { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 620px; margin: 6px auto 0; text-align: center; animation: nl-rise .4s ease both; }
.nl-focus-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--nl-soft); color: var(--nl-c1); font: 700 12px/1.2 Inter, system-ui, sans-serif; }
.nl-focus-eyebrow .material-icons { font-size: 16px; }
html[data-look="new"] body #welcome-banner .nl-focus-intro h3 { display: block !important; margin: 4px 0 0; color: var(--nl-ink); font: 750 22px/1.25 Inter, system-ui, sans-serif !important; }
.nl-focus-intro p { margin: 0; color: var(--nl-muted); font-size: 15px; line-height: 1.5; }
.nl-focus-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.nl-focus-starter { padding: 10px 16px; border: 1px solid var(--nl-line); border-radius: 999px; background: var(--nl-surface); color: var(--nl-ink); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.nl-focus-starter:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--nl-c1) 45%, transparent); box-shadow: 0 12px 24px -18px var(--nl-c1); }

/* ---------- Tools button and drawer ---------- */
html[data-look="new"] body .nl-tools-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin-left: auto;
  border: 1px solid var(--nl-line); border-radius: 12px; background: var(--nl-surface); color: var(--nl-ink);
  font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer;
}
html[data-look="new"] body .nl-tools-btn .material-icons { font-size: 18px; color: var(--nl-c1); }
html[data-look="new"] body .nl-tools-btn:hover { background: var(--nl-soft); }
html[data-look="new"] body #clear-chat-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 36px; height: 36px !important; padding: 0 !important; margin-left: auto !important; font-size: 0 !important;
  border: 1px solid var(--nl-line) !important; border-radius: 12px !important; background: var(--nl-surface) !important; color: var(--nl-ink) !important;
  box-shadow: none !important;
}
html[data-look="new"] body #clear-chat-btn.hidden { display: none !important; }
html[data-look="new"] body #clear-chat-btn .material-icons { font-size: 20px !important; color: var(--nl-muted) !important; }
html[data-look="new"] body #clear-chat-btn:hover .material-icons { color: #dc2626 !important; }
html[data-look="new"] body #clear-chat-btn:hover { background: var(--nl-soft) !important; }
html[data-look="new"] body #clear-chat-btn:not(.hidden) ~ .nl-voice-pill { margin-left: 0; }
html[data-look="new"] body #clear-chat-btn:not(.hidden) ~ .nl-tools-btn { margin-left: 0; }
html[data-look="new"] body .nl-tools #tools-content { display: flex !important; flex-direction: column; gap: 8px; max-height: none !important; overflow: visible !important; opacity: 1 !important; padding: 0 !important; }
html[data-look="new"] body .nl-tools #tools-content > button { width: 100%; justify-content: flex-start; border-radius: 14px !important; }

/* ---------- Voice sessions and time left, top row, during voice only ---------- */
.nl-voice-pill { display: none; }
html[data-look="new"] body .nl-voice-pill:not([hidden]) {
  display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; margin-left: auto;
  border: 1px solid var(--nl-line); border-radius: 14px; background: var(--nl-surface); animation: nl-pop .2s ease-out;
}
html[data-look="new"] body .nl-voice-pill:not([hidden]) ~ .nl-tools-btn { margin-left: 0; }
.nl-voice-dots { display: inline-flex; gap: 4px; }
.nl-voice-dots i { display: block; width: 22px; height: 8px; border-radius: 999px; background: var(--nl-line); }
.nl-voice-dots i.on { background: linear-gradient(90deg, var(--nl-c1), var(--nl-c2)); }
.nl-voice-copy { display: flex; flex-direction: column; line-height: 1.15; }
.nl-voice-copy strong { color: var(--nl-ink); font: 700 13px/1.2 Inter, system-ui, sans-serif; }
.nl-voice-copy small { color: var(--nl-muted); font: 500 12px/1.2 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.nl-voice-pill.low .nl-voice-copy small { color: #c2410c; }

/* Voice without the conversation text: the avatar stays big in the centre */
html[data-look="new"] body .chat-area.nl-big-stage #transcript-box { display: none !important; }
html[data-look="new"] body .chat-area.nl-big-stage .nl-stage { flex: 1; justify-content: center; }
html[data-look="new"] body .chat-area.nl-big-stage .nl-orb {
  --nl-standalone-size: clamp(184px, 30vh, 224px);
  width: var(--nl-standalone-size); height: var(--nl-standalone-size);
}
html[data-look="new"] body .chat-area.nl-big-stage .nl-orb-initial { font-size: 64px; }
html[data-look="new"] body .chat-area.nl-big-stage .nl-spark { --nl-r: calc(var(--nl-standalone-size) / 2); }

/* Text on/off during voice, right under the avatar */
.nl-text-toggle { display: none; }
html[data-look="new"][data-voice] body .nl-text-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--nl-line); border-radius: 999px;
  background: var(--nl-surface); color: var(--nl-ink); font: 600 12px/1 Inter, system-ui, sans-serif; cursor: pointer;
}
.nl-text-toggle .material-icons { font-size: 16px; color: var(--nl-c1); }
.nl-text-toggle:hover { background: var(--nl-soft); }

/* How to use as a small "?" next to dark mode */
html[data-look="new"] body .top-bar .top-help-chip[onclick="openGetStarted()"] { display: inline-flex !important; width: 36px; padding: 0 !important; justify-content: center; }
html[data-look="new"] body .top-bar .top-help-chip[onclick="openGetStarted()"] > span { display: none; }
html[data-look="new"] body .top-bar .top-help-chip[onclick="openGetStarted()"]::before { content: "?"; font: 800 17px/1 Inter, system-ui, sans-serif; }

/* ---------- Settings side panel ---------- */
html[data-look="new"] body .nl-settings:not([hidden]) {
  display: flex; flex-direction: column; gap: 12px; position: fixed; top: 0; right: 0; bottom: 0; z-index: 1500;
  width: min(360px, 100vw); padding: 20px 18px; overflow-y: auto;
  background: var(--nl-surface); color: var(--nl-ink); border-left: 1px solid var(--nl-line);
  box-shadow: -30px 0 60px -40px rgba(15, 23, 42, .6); animation: nl-slide .25s ease-out;
}
.nl-settings-head { display: flex; align-items: center; justify-content: space-between; }
.nl-settings-head h2 { margin: 0; font-size: 20px; font-weight: 750; }
.nl-settings-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--nl-soft); color: var(--nl-ink); cursor: pointer; }
.nl-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--nl-line); border-radius: 16px; }
.nl-card p { margin: 0; color: var(--nl-muted); font-size: 13px; line-height: 1.45; }
.nl-card small { color: var(--nl-muted); font-size: 12px; }
.nl-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.nl-card-row span { color: var(--nl-muted); font-size: 13px; }
.nl-pill { padding: 3px 10px; border-radius: 999px; background: #fff7ed; color: #c2410c !important; font-weight: 700; font-size: 12px !important; }
.nl-pill.on { background: #dcfce7; color: #15803d !important; }
.nl-card-btn { align-self: flex-start; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--nl-line); background: none; color: var(--nl-ink); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.nl-card-btn:hover { background: var(--nl-soft); }
.nl-toggle-row input { width: 18px; height: 18px; accent-color: var(--nl-c1); }
.nl-usage-bar { height: 8px; border-radius: 999px; background: var(--nl-line); overflow: hidden; }
.nl-usage-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--nl-c1), var(--nl-c2)); transition: width .6s ease; }
.nl-links { display: flex; flex-direction: column; }
.nl-links button { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--nl-line); background: none; color: var(--nl-c1); font: 600 14px/1.2 Inter, system-ui, sans-serif; text-align: left; cursor: pointer; }
.nl-links button .material-icons { font-size: 20px; }
@keyframes nl-slide { from { transform: translateX(40px); opacity: 0; } }

.nl-user-initials {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; font-size: 13px; font-weight: 700; background: linear-gradient(135deg, var(--nl-c1), var(--nl-c2));
}

/* "Try the new look" in the classic top bar */
.nl-try-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #c7d2fe; background: linear-gradient(135deg, #eef2ff, #fdf2f8); color: #4338ca;
  font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer;
}
.nl-try-btn .material-icons { font-size: 18px; }
[data-theme="dark"] .nl-try-btn { background: #1e1b4b; border-color: #3730a3; color: #c7d2fe; }

/* ---------- Sidebar: companions first, tools in one drawer ---------- */
html[data-look="new"] body .sidebar { gap: 10px; }
html[data-look="new"] body .agent-card { border-radius: 16px !important; transition: transform .25s ease, background .25s ease, border-color .25s ease; }
html[data-look="new"] body .agent-card:hover { transform: translateX(3px); }
html[data-look="new"] body .agent-card.active {
  border-color: color-mix(in srgb, var(--nl-c1) 50%, transparent) !important;
  background: var(--nl-soft) !important;
  box-shadow: 0 10px 26px -18px var(--nl-c1);
}
html[data-look="new"] body .agent-card.active .agent-card-icon { animation: nl-orb-breathe 3.2s ease-in-out infinite; }

/* ---------- The stage: avatar in the centre ---------- */
.nl-stage { display: none; }
html[data-look="new"] body .nl-stage {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 16px 0; transition: padding .5s ease;
}
html[data-look="new"] body .nl-stage.nl-enter .nl-orb { animation: nl-enter .7s cubic-bezier(.2, .9, .3, 1.2); }
/* Avatar size: large on the empty screen, a little smaller in a chat; less on short screens. */
.nl-orb { --nl-orb: clamp(176px, 27vh, 240px); position: relative; width: var(--nl-orb); height: var(--nl-orb); transition: width .5s ease, height .5s ease; }
.nl-orb-media {
  position: absolute; inset: calc(var(--nl-orb) * .083); border-radius: 50%; overflow: hidden; z-index: 2;
  background: linear-gradient(135deg, var(--nl-c1), var(--nl-c2));
  box-shadow: 0 0 0 4px var(--nl-surface), 0 18px 40px -18px var(--nl-c1);
}
.nl-orb-media video, .nl-orb-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-orb-initial {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  font: 750 calc(var(--nl-orb) * .31)/1 Inter, system-ui, sans-serif; text-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.nl-orb-media video + .nl-orb-initial { z-index: -1; }
.nl-ring, .nl-glow, .nl-ripple { position: absolute; border-radius: 50%; pointer-events: none; }
.nl-glow {
  inset: -18px; z-index: 0; filter: blur(22px); opacity: .55;
  background: radial-gradient(circle, color-mix(in srgb, var(--nl-c2) 70%, transparent), transparent 70%);
}
.nl-ring {
  inset: 0; z-index: 1;
  background: conic-gradient(from 0deg, var(--nl-c1), var(--nl-c2), var(--nl-c3), var(--nl-c1));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}
.nl-ripple { inset: 6px; z-index: 0; border: 2px solid color-mix(in srgb, var(--nl-c1) 55%, transparent); opacity: 0; }
.nl-spark {
  position: absolute; z-index: 3; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 12px 3px var(--nl-c2); opacity: 0;
}

/* Like the facilitator: a name tag on the avatar and sound waves at its sides */
.nl-orb-tag {
  position: absolute; z-index: 4; right: 6px; bottom: 6px; padding: 5px 11px; border-radius: 999px;
  border: 3px solid var(--nl-surface); background: linear-gradient(135deg, var(--nl-c1), var(--nl-c2)); color: #fff;
  font: 800 12px/1 Inter, system-ui, sans-serif; box-shadow: 0 6px 14px -8px var(--nl-c1);
}
.nl-side-wave { position: absolute; z-index: 3; top: 50%; display: flex; align-items: center; gap: 5px; height: 44px; margin-top: -22px; opacity: 0; transition: opacity .25s ease; }
.nl-side-wave.left { right: calc(100% + 10px); flex-direction: row-reverse; }
.nl-side-wave.right { left: calc(100% + 10px); }
.nl-side-wave i { display: block; width: 5px; height: 38px; border-radius: 3px; background: linear-gradient(var(--nl-c1), var(--nl-c2)); transform: scaleY(.35); }
html[data-voice="speaking"] .nl-side-wave { opacity: 1; }
html[data-voice="speaking"] .nl-side-wave i { animation: nl-side-bar 620ms ease-in-out infinite alternate; }
html[data-voice="speaking"] .nl-side-wave i:nth-child(2) { animation-delay: -.2s; height: 28px; }
html[data-voice="speaking"] .nl-side-wave i:nth-child(3) { animation-delay: -.4s; height: 18px; }
@keyframes nl-side-bar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
/* The tag names the companion on the big avatar; the small one keeps the name beside it */
html[data-look="new"] body .chat-area:is(.empty-state, .nl-big-stage) .nl-name { display: none; }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-orb-tag { right: -6px; bottom: 2px; padding: 3px 8px; font-size: 11px; border-width: 2px; }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-side-wave { display: none; }
html[data-look="new"] body .chat-area:is(.empty-state, .nl-big-stage) .nl-wave { display: none; }

/* Each companion moves in its own way */
/* Alex: rest for 16 seconds, then gently move for 4 seconds. */
html[data-companion="alex"] .nl-ring { animation: nl-idle-spin 20s ease-in-out infinite; }
html[data-companion="alex"] .nl-spark { opacity: 1; animation: nl-idle-orbit 20s ease-in-out infinite; }
html[data-companion="alex"] .nl-glow { animation: nl-idle-glow 20s ease-in-out infinite; }
/* Iris: calm, reflective. Slow breathing glow and a soft drifting ring. */
html[data-companion="iris"] .nl-ring { animation: nl-spin 22s linear infinite, nl-breathe 6s ease-in-out infinite; }
html[data-companion="iris"] .nl-glow { animation: nl-glow 6s ease-in-out infinite; opacity: .7; }
html[data-companion="iris"] .nl-ripple { animation: nl-ripple 6s ease-out infinite; }
html[data-companion="iris"] .nl-ripple-2 { animation-delay: 3s; }
/* Mia: warm and direct. Heartbeat pulses like feedback landing. */
html[data-companion="mia"] .nl-ring { animation: nl-spin 12s linear infinite reverse; }
html[data-companion="mia"] .nl-ripple { animation: nl-ripple 2.6s ease-out infinite; }
html[data-companion="mia"] .nl-ripple-2 { animation-delay: 1.3s; }
html[data-companion="mia"] .nl-orb-media { animation: nl-heartbeat 2.6s ease-in-out infinite; }
html[data-companion="immersia"] .nl-ring { animation: nl-spin 10s linear infinite; }

/* Speaking: everything gets livelier and the sound wave plays */
html[data-companion="alex"][data-voice="speaking"] .nl-ring { animation-name: nl-spin; }
html[data-companion="alex"][data-voice="speaking"] .nl-spark { animation: nl-orbit 5.5s linear infinite; }
html[data-voice="speaking"] .nl-ring { animation-duration: 2.4s !important; }
html[data-voice="speaking"] .nl-glow { opacity: .9; animation: nl-glow 1.1s ease-in-out infinite !important; }
html[data-voice="speaking"] .nl-ripple { animation: nl-ripple 1.6s ease-out infinite !important; }
html[data-voice="speaking"] .nl-ripple-2 { animation-delay: .8s !important; }
/* Listening: the ring slows and softens, a small mic shows */
html[data-voice="listening"] .nl-ring { opacity: .55; animation-duration: 16s !important; }
html[data-voice="listening"] .nl-glow { opacity: .35; }

.nl-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 26px; }
.nl-wave span {
  width: 4px; height: 6px; border-radius: 4px; background: linear-gradient(var(--nl-c1), var(--nl-c2));
  transition: height .25s ease; opacity: .45;
}
html[data-voice="speaking"] .nl-wave span { opacity: 1; animation: nl-bar .8s ease-in-out infinite alternate; }
html[data-voice="speaking"] .nl-wave span:nth-child(2n) { animation-duration: .6s; }
html[data-voice="speaking"] .nl-wave span:nth-child(3n) { animation-duration: .95s; animation-delay: -.3s; }
html[data-voice="speaking"] .nl-wave span:nth-child(4n) { animation-delay: -.5s; }
html[data-voice="listening"] .nl-wave span { opacity: .8; animation: nl-bar-soft 1.8s ease-in-out infinite alternate; }
html[data-voice="listening"] .nl-wave span:nth-child(2n) { animation-delay: -.9s; }

.nl-name { margin: 0; color: var(--nl-ink); font: 750 22px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.01em; }
.nl-status {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 12px; border-radius: 999px;
  background: var(--nl-soft); color: var(--nl-c1); font: 600 12px/1 Inter, system-ui, sans-serif;
}
.nl-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
html[data-voice="speaking"] .nl-status::before, html[data-voice="listening"] .nl-status::before { animation: nl-dot 1s ease-in-out infinite; }
.nl-tagline { display: none; }

/* Once the conversation starts the avatar moves up and gets smaller */
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-stage { flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px 4px; }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-orb { --nl-orb: clamp(124px, 17vh, 150px); }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-orb-media { box-shadow: 0 0 0 3px var(--nl-surface); }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-spark { width: 7px; height: 7px; margin: -3.5px; }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-name { display: none; }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-tagline { display: none; }
html[data-look="new"] body .chat-area:not(.empty-state):not(.nl-big-stage) .nl-stage-copy { flex-direction: row; align-items: center; justify-content: center; gap: 8px; }
.nl-stage-copy { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* Chat area and messages */
html[data-look="new"] body .chat-area { border-radius: 26px !important; border-color: var(--nl-line) !important; }
html[data-look="new"] body .chat-empty-state h3 { display: none !important; }
html[data-look="new"] body .chat-empty-state { padding-top: 4px !important; }
html[data-look="new"] body .chat-empty-state > p { margin-top: 0 !important; }
html[data-look="new"] body .chat-empty-state h3 span,
html[data-look="new"] body #welcome-title .welcome-name {
  background: linear-gradient(90deg, var(--nl-c1), var(--nl-c2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-look="new"] body .suggestion-chip { border-radius: 20px !important; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease !important; }
html[data-look="new"] body .suggestion-chip:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--nl-c1) 40%, transparent) !important; box-shadow: 0 18px 34px -22px var(--nl-c1) !important; }
html[data-look="new"] body .suggestion-chip { animation: nl-rise .5s ease both; }
/* Suggestions as small pills, like the mockup */
html[data-look="new"] body .chat-empty-state .suggestions { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 10px !important; max-width: 760px; margin: 14px auto 0 !important; }
html[data-look="new"] body .chat-empty-state .suggestion-chip {
  display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; width: auto !important; min-height: 0 !important;
  padding: 10px 16px !important; border-radius: 999px !important; background: var(--nl-surface) !important;
}
html[data-look="new"] body .chat-empty-state .suggestion-chip .suggestion-desc { display: none !important; }
html[data-look="new"] body .chat-empty-state .suggestion-chip .suggestion-icon {
  width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: none !important;
  box-shadow: none !important; font-size: 18px !important; color: var(--nl-c1) !important;
}
html[data-look="new"] body .chat-empty-state .suggestion-chip .suggestion-title { margin: 0 !important; font-size: 14px !important; font-weight: 600 !important; color: var(--nl-ink) !important; }
html[data-look="new"] body .suggestion-chip:nth-child(2) { animation-delay: .08s; }
html[data-look="new"] body .suggestion-chip:nth-child(3) { animation-delay: .16s; }
/* The speak / type / send bar stays exactly as in the classic look. */

/* ---------- First visit welcome ---------- */
.nl-welcome {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, #0f172a 55%, transparent); backdrop-filter: blur(6px);
  animation: nl-fade .3s ease;
}
.nl-welcome[hidden] { display: none; }
.nl-welcome-card {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 30px 28px 24px; border-radius: 28px; text-align: center;
  background: var(--nl-surface, #fff); color: var(--nl-ink, #0f172a);
  box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .6); animation: nl-enter .6s cubic-bezier(.2, .9, .3, 1.15);
}
.nl-welcome-orbs { position: relative; height: 120px; margin-bottom: 8px; }
.nl-welcome-orbs span {
  position: absolute; top: 20px; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font: 750 28px/1 Inter, system-ui, sans-serif; text-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .6); animation: nl-float 4s ease-in-out infinite, nl-rise .6s ease both;
}
.nl-welcome-orbs span:nth-child(1) { left: calc(50% - 130px); background: linear-gradient(135deg, #2563eb, #22d3ee); }
.nl-welcome-orbs span:nth-child(2) { left: calc(50% - 39px); top: 4px; background: linear-gradient(135deg, #7c3aed, #ec4899); animation-delay: -1.3s, .12s; }
.nl-welcome-orbs span:nth-child(3) { left: calc(50% + 52px); background: linear-gradient(135deg, #f97316, #f43f5e); animation-delay: -2.6s, .24s; }
.nl-welcome h2 { margin: 0 0 6px; font: 800 26px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.nl-welcome > .nl-welcome-card > p { margin: 0 auto 18px; max-width: 420px; color: var(--nl-muted, #64748b); font-size: 15px; line-height: 1.5; }
.nl-welcome ol { list-style: none; display: grid; gap: 10px; margin: 0 0 20px; padding: 0; text-align: left; }
.nl-welcome li {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--nl-line, #e2e8f0); animation: nl-rise .5s ease both;
}
.nl-welcome li:nth-child(1) { animation-delay: .25s; }
.nl-welcome li:nth-child(2) { animation-delay: .38s; }
.nl-welcome li:nth-child(3) { animation-delay: .51s; }
.nl-welcome li .material-icons {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
.nl-welcome li:nth-child(2) .material-icons { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.nl-welcome li:nth-child(3) .material-icons { background: linear-gradient(135deg, #f97316, #f43f5e); }
.nl-welcome li strong { display: block; font-size: 14px; }
.nl-welcome li small { color: var(--nl-muted, #64748b); font-size: 13px; }
.nl-welcome-start {
  width: 100%; height: 48px; border: 0; border-radius: 14px; color: #fff; cursor: pointer;
  font: 700 15px/1 Inter, system-ui, sans-serif; background: linear-gradient(135deg, #2563eb, #7c3aed, #ec4899);
  background-size: 200% 100%; animation: nl-shine 4s ease-in-out infinite;
}
.nl-welcome-tour {
  width: 100%; height: 42px; margin-top: 8px; border: 1px solid var(--nl-line, #e2e8f0); border-radius: 14px;
  background: none; color: var(--nl-ink, #0f172a); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer;
}
.nl-welcome-tour:hover { background: var(--nl-soft, #eef2ff); }
.nl-welcome-note { margin: 12px 0 0; color: var(--nl-muted, #64748b); font-size: 12px; }

@keyframes nl-spin { to { transform: rotate(360deg); } }
@keyframes nl-idle-spin { 0%, 80% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes nl-idle-orbit { 0%, 80% { transform: rotate(0deg) translateX(var(--nl-r, 105px)); } 100% { transform: rotate(360deg) translateX(var(--nl-r, 105px)); } }
@keyframes nl-idle-glow { 0%, 80%, 100% { transform: scale(.94); opacity: .45; } 90% { transform: scale(1.06); opacity: .8; } }
@keyframes nl-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
@keyframes nl-glow { 0%, 100% { transform: scale(.94); opacity: .45; } 50% { transform: scale(1.06); opacity: .8; } }
@keyframes nl-ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes nl-heartbeat { 0%, 60%, 100% { transform: scale(1); } 10% { transform: scale(1.035); } 20% { transform: scale(.995); } 30% { transform: scale(1.025); } }
@keyframes nl-orbit { from { transform: rotate(0deg) translateX(var(--nl-r, 105px)); } to { transform: rotate(360deg) translateX(var(--nl-r, 105px)); } }
@keyframes nl-bar { from { height: 5px; } to { height: 24px; } }
@keyframes nl-bar-soft { from { height: 4px; } to { height: 11px; } }
@keyframes nl-dot { 50% { opacity: .3; } }
@keyframes nl-enter { from { opacity: 0; transform: scale(.82); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes nl-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes nl-fade { from { opacity: 0; } }
@keyframes nl-pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes nl-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes nl-shine { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@keyframes nl-orb-breathe { 0%, 100% { box-shadow: 0 0 0 2px var(--nl-surface), 0 0 0 4px color-mix(in srgb, var(--nl-c1) 35%, transparent); } 50% { box-shadow: 0 0 0 2px var(--nl-surface), 0 0 0 7px color-mix(in srgb, var(--nl-c1) 12%, transparent); } }
.nl-stage .nl-spark { --nl-r: calc(var(--nl-orb) / 2); }

@media (prefers-reduced-motion: reduce) {
  html[data-look="new"] *, .nl-welcome * { animation: none !important; transition: none !important; }
}

/* The wave only shows during voice */
html[data-look="new"]:not([data-voice]) body .nl-wave { display: none; }
