:root {
  --side: 15.5rem;
  --brand-ink: #0f2237;
  --brand-paper: #f4f1ea;
  --brand-mist: #e8eff3;
  --menens-blue: #00b0e4;
  --navy: var(--brand-ink);
  --cyan: var(--menens-blue);
  --paper: var(--brand-paper);
  --card: #ffffff;
  --muted: color-mix(in oklab, var(--brand-ink) 60%, white);
  --line: color-mix(in oklab, #8a8175 18%, transparent);
  --err: #b3261e;
  --ok: #1f6b4a;
  --text-78: color-mix(in oklab, var(--brand-ink) 78%, white);
  --text-72: color-mix(in oklab, var(--brand-ink) 72%, white);
  --text-68: color-mix(in oklab, var(--brand-ink) 68%, white);
  --text-60: color-mix(in oklab, var(--brand-ink) 60%, white);
  --text-52: color-mix(in oklab, var(--brand-ink) 52%, white);
  --text-45: color-mix(in oklab, var(--brand-ink) 45%, white);
  --text-on-ink: var(--brand-paper);
  --text-on-ink-soft: color-mix(in oklab, var(--brand-paper) 76%, transparent);
  --surface-card: color-mix(in oklab, var(--brand-paper) 88%, white);
  --surface-panel: color-mix(in oklab, white 70%, var(--brand-paper));
  --surface-panel-soft: color-mix(in oklab, white 55%, var(--brand-paper));
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(15, 34, 55, 0.1);
  --shadow-md: 0 14px 32px rgba(15, 34, 55, 0.1);
  --font-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --transition-fast: 0.2s ease;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: var(--font-base);
  background: var(--paper);
  color: var(--navy);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.65;
}
body.app {
  flex-direction: row;
  align-items: stretch;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: color-mix(in oklab, var(--cyan) 70%, var(--navy)); }
.menu-btn {
  display: none;
  position: fixed;
  top: max(0.7rem, env(safe-area-inset-top));
  left: max(0.7rem, env(safe-area-inset-left));
  z-index: 50;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 34, 55, 0.35);
}
.side {
  width: var(--side);
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem 1.125rem;
  height: 100dvh;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.1;
  flex: none;
  color: inherit;
  padding: 0.35rem 0.7rem 1.15rem;
}
.brand:hover { color: inherit; }
.wordmark { height: 15px; width: auto; max-width: 164px; display: block; }
.mark { font-weight: 800; letter-spacing: -0.03em; }
.sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: stretch;
  overflow-y: auto;
  min-width: 0;
  flex: 1;
}
nav a, nav button {
  text-decoration: none;
  border: 0;
  background: none;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-60);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}
nav a:hover, nav button:hover { color: var(--navy); background: color-mix(in oklab, var(--cyan) 8%, white); }
nav a.on {
  background: color-mix(in oklab, var(--cyan) 12%, white);
  color: var(--navy);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.side-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.who-mark {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in oklab, var(--cyan) 14%, white);
  color: var(--navy);
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.who-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who-name { font-size: 0.8125rem; font-weight: 600; color: var(--navy); }
.who-role { font-size: 0.6875rem; color: var(--text-52); }
.logout { margin: 0; flex: 1 1 100%; }
.logout button,
.logout button[type="submit"] {
  background: none;
  border: 0;
  box-shadow: none;
  font-weight: 500;
  color: var(--text-45);
  padding: 0.2rem 0;
  width: auto;
  border-radius: 0;
  text-align: left;
  font-size: 0.75rem;
  text-decoration: underline;
}
.logout button:hover,
.logout button[type="submit"]:hover {
  color: var(--navy);
  background: transparent;
}
.who { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.dump-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.progress-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.progress-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--navy);
}
.progress-list { list-style: none; margin: 0; padding: 0.875rem 0 0; border-top: 1px solid var(--line); display: grid; gap: 0.4rem; }
.progress-list li { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.8125rem; }
.progress-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-list li.empty span { color: var(--text-45); }
.progress-list i { flex: 1 1 auto; border-bottom: 1px dotted var(--line); }
.progress-list b { flex: none; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; color: var(--cyan); }
.progress-list li.empty b { color: var(--text-45); }
.file-picked { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.file-picked li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-panel-soft);
}
.file-picked .mono { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); flex: none; }
.file-picked li span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.file-picked li span:last-child { color: var(--text-52); flex: none; }
.file-picked li.file-err { border-color: #e3b3ad; background: #fdf4f3; }
.file-picked li.file-err .mono, .file-picked li.file-err span { color: #8c2018; }
.shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
main {
  flex: 1;
  padding: 1.75rem 2rem 3rem;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}
footer {
  padding: 1rem 2rem calc(1.25rem + env(safe-area-inset-bottom));
  color: var(--text-45);
  font-size: 0.75rem;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 700;
}
h1 span { color: var(--cyan); }
h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  font-weight: 700;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 700;
}
.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--cyan);
  margin: 0;
}
.muted { color: var(--muted); }
.intro {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.intro p { margin: 0; max-width: 42rem; color: var(--text-68); text-wrap: pretty; }
.card, fieldset.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 0 0 1rem;
}
.grid3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat .n { font-size: 2rem; font-weight: 800; color: var(--cyan); }
.stat small { color: rgba(255,255,255,0.7); }
.split { display: grid; gap: 1.5rem; grid-template-columns: 1.1fr 0.9fr; align-items: start; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .hero { padding: 1.25rem; }
  .grid2 { grid-template-columns: 1fr; }
}
.hero { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 2rem; }
.hero h1 { color: #fff; }
.ticks { padding-left: 1.1rem; }
.ticks li { margin: 0.45rem 0; }
.changelog { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.changelog > li { margin: 0; padding: 0; }
.changelog .when {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  margin: 0 0 0.35rem;
}
.changelog ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.changelog li li { margin: 0.3rem 0; color: var(--text-68); }
.card code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-panel-soft);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}
.ticks li { margin: 0.35rem 0; }
form.card, form.stack, .filters { display: flex; flex-direction: column; gap: 0.85rem; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.875rem; }
label.check { flex-direction: row; align-items: center; font-weight: 500; gap: 0.75rem; }
label.check.highlight {
  align-items: flex-start;
  padding: 1rem 1.125rem;
  border: 1px solid color-mix(in oklab, var(--cyan) 40%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--cyan) 6%, white);
  cursor: pointer;
}
label.check.highlight input { width: 18px; height: 18px; accent-color: var(--cyan); margin: 0.1rem 0 0; flex: none; }
label.check.highlight span { display: flex; flex-direction: column; gap: 0.2rem; }
label.check.highlight strong { font-size: 0.9375rem; }
input, select, textarea, button {
  font: inherit;
  color: var(--navy);
}
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  background: #fff;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--cyan) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--cyan) 16%, transparent);
}
textarea { min-height: 90px; resize: vertical; }
textarea.tall { min-height: 180px; }
.user-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 8.5rem 6rem 1fr auto;
  gap: 0.4rem;
  align-items: center;
}
.user-row input, .user-row select, .user-row button { margin: 0; }
.users td { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.users th { text-align: left; font-size: 0.78rem; color: var(--muted); padding-bottom: 0.4rem; }
.add-user h3 { margin: 0.4rem 0 0; }
@media (max-width: 900px) {
  .user-row { grid-template-columns: 1fr; }
}
.composer {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.composer textarea { min-height: 180px; }
.composer-block { display: flex; flex-direction: column; gap: 0.6rem; }
.composer-label { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--navy); }
.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.dropzone {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border: 1px dashed color-mix(in oklab, var(--cyan) 45%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--cyan) 5%, white);
  cursor: pointer;
  font-weight: 500;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
}
.drop-plus {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--cyan);
  flex: none;
}
.drop-copy { display: flex; flex-direction: column; gap: 0.2rem; }
.drop-title { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.drop-hint { font-size: 0.75rem; color: var(--text-52); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font-weight: 400; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  background: #fff;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-60);
  transition: var(--transition-fast);
}
.chip input:checked + span {
  background: color-mix(in oklab, var(--cyan) 10%, white);
  color: var(--navy);
  border-color: var(--cyan);
  font-weight: 600;
}
.chip-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  background: #fff;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-60);
  transition: var(--transition-fast);
}
.chip-link:hover { color: var(--navy); border-color: var(--cyan); }
.chip-link.on {
  background: color-mix(in oklab, var(--cyan) 10%, white);
  color: var(--navy);
  border-color: var(--cyan);
  font-weight: 600;
}
.chip-link.on .muted { color: var(--text-45); }
.people { margin-bottom: 0.25rem; }
.bubble .when {
  margin: 0.4rem 0 0;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  opacity: 0.75;
  font-weight: 400;
}
.srcs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.55rem 0 0; }
.src-kicker {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-52);
}
.src {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  background: #fff;
  color: var(--text-72);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.src:hover { border-color: var(--cyan); color: var(--navy); }
.fix-open {
  margin-top: 0.5rem;
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-52);
  cursor: pointer;
  text-decoration: underline;
}
.fix-open:hover { color: var(--err); }
.fix-open:disabled { opacity: 0.7; cursor: default; color: var(--ok); text-decoration: none; }
.fix { margin-top: 0.6rem; }
.fix-form { display: flex; flex-direction: column; gap: 0.5rem; }
.fix-form textarea { min-height: 72px; }
.fix-actions { display: flex; gap: 0.4rem; }
.chat.log[data-thread] { max-height: min(58vh, 640px); }
body:not(.page-chat) .luc-ask {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}
.files-label { font-weight: 650; }
.feed { display: flex; flex-direction: column; gap: 1rem; }
.entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.entry header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.entry-spacer { flex: 1 1 auto; }
.entry h3 { margin: 0; font-size: 1.0625rem; width: 100%; overflow-wrap: anywhere; }
.entry header + h3 { width: auto; }
.entry header .muted { margin: 0; font-size: 0.75rem; color: var(--text-52); }
.del { margin: 0; }
.del button,
.del button[type="submit"] {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-45);
  cursor: pointer;
  text-decoration: underline;
  width: auto;
  border-radius: 0;
}
.del button:hover,
.del button[type="submit"]:hover { color: var(--err); background: none; }
.pill {
  display: inline-block;
  background: color-mix(in oklab, var(--cyan) 12%, white);
  color: var(--navy);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}
.note { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--text-68); text-wrap: pretty; }
.avatar, .avatar-sm, .avatar-lg {
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  background: #e8eef2;
}
.avatar { width: 34px; height: 34px; flex-shrink: 0; }
.avatar-sm { width: 22px; height: 22px; display: inline-block; vertical-align: -6px; margin-right: 0.25rem; }
.avatar-lg {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 0 3px var(--cyan);
}
.nav-luc { display: inline-flex; align-items: center; gap: 0.15rem; }
.luc-head { display: flex; flex-direction: row; gap: 0.85rem; align-items: center; }
.luc-head h1 { margin: 0; font-size: 1.5rem; line-height: 1.1; }
.talk-head { display: flex; flex-direction: column; gap: 0.65rem; }
.talk-head h1 { font-size: 1.5rem; }
.luc-head p { margin: 0; }
.luc-lead { font-size: 0.9375rem; color: var(--text-68); }
.chat { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1rem; min-width: 0; }
.chat-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.row { display: flex; gap: 0.875rem; align-items: flex-start; max-width: 100%; }
.row.me { justify-content: flex-end; }
.bubble {
  max-width: min(34rem, 100%);
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-lg);
  line-height: 1.55;
  min-width: 0;
  overflow-wrap: anywhere;
}
.bubble p { margin: 0; white-space: pre-wrap; }
.caret {
  display: inline-block;
  width: 0.12em;
  height: 1.05em;
  margin-left: 0.12em;
  background: var(--navy);
  vertical-align: text-bottom;
  animation: luc-caret 0.9s step-end infinite;
}
@keyframes luc-caret {
  50% { opacity: 0; }
}
.bubble.user {
  background: var(--navy);
  color: var(--text-on-ink);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
}
.bubble.user .when { color: var(--text-on-ink-soft); }
.bubble.assistant {
  background: var(--surface-panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
}
.bubble.assistant strong { font-weight: 650; }
.bubble.assistant a { color: var(--cyan); }
.bubble.assistant a.tel { font-weight: 650; text-decoration: none; }
.bubble.assistant a.tel:hover { text-decoration: underline; }
.luc-pic {
  display: block;
  max-width: min(22rem, 100%);
  max-height: 16rem;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
  margin: 0.55rem 0;
}
.ask { display: flex; gap: 0.75rem; align-items: flex-end; }
.ask textarea { flex: 1; min-height: 72px; }
.ask button { flex-shrink: 0; }
.ask button:disabled { opacity: 0.65; cursor: wait; }
.ask-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem;
}
.ask-card textarea {
  border: 0;
  background: #fff;
  box-shadow: none;
  min-height: 48px;
  padding: 0.35rem 0.25rem;
  resize: none;
}
.ask-card textarea:focus { box-shadow: none; }
.banner {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-60);
  background: var(--surface-panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
}
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.examples {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
}
.ex {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text-72);
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}
.ex:hover { border-color: var(--cyan); color: var(--navy); }
.chat[data-thread] { max-height: min(52vh, 520px); overflow: auto; }
.dots { display: inline-flex; gap: 5px; align-items: center; height: 1.2em; padding: 0.15rem 0.1rem; }
.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  display: block;
  animation: luc-dot 1.2s infinite ease-in-out;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes luc-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.fb-fab {
  position: fixed;
  left: calc(var(--side) + 1.1rem);
  bottom: 1.1rem;
  z-index: 45;
  border: 0;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.fb-fab:disabled { opacity: 0.7; cursor: wait; }
.fb-toast {
  position: fixed;
  left: 1.1rem;
  bottom: 4.4rem;
  z-index: 46;
  background: var(--ok);
  color: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 650;
  margin: 0;
}
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 34, 55, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.fb-modal[hidden] { display: none; }
.fb-dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: min(32rem, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fb-dialog h2 { margin: 0; }
.fb-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.fb-cat {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font: inherit;
  color: var(--navy);
}
.fb-cat strong { display: block; }
.fb-cat span { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.fb-cat.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.fb-cat.on span { color: rgba(255,255,255,0.75); }
.fb-shot {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.fb-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
}
.fb-thumb img {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}
.fb-status { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.fb-status button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-72);
}
.fb-status button:hover { border-color: var(--cyan); color: var(--navy); }
.fb-status button:disabled {
  background: color-mix(in oklab, var(--cyan) 10%, white);
  color: var(--navy);
  border-color: var(--cyan);
  cursor: default;
  font-weight: 600;
}
.pill.cat-BUG { background: #fde8e8; }
.pill.cat-VERBETERING { background: #fff3d6; }
.pill.cat-VRAAG { background: #dceef8; }
.pill.cat-IDEE { background: #ece4f8; }
.luc-dock { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 40; }
.luc-fab {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 34, 55, 0.25);
}
.luc-fab img { width: 100%; height: 100%; object-fit: cover; display: block; }
.luc-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(380px, calc(100vw - 2rem));
  height: min(520px, calc(100vh - 8rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  flex-direction: column;
  overflow: hidden;
}
.luc-dock.open .luc-panel { display: flex; }
.luc-dock.open .luc-fab { display: none; }
.luc-panel-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.luc-panel-top strong { flex: 1; }
.luc-panel-top a { font-size: 0.8rem; color: var(--muted); }
.luc-panel-top button {
  border: 0;
  background: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--navy);
  line-height: 1;
}
.dock-thread { flex: 1; overflow: auto; padding: 0.75rem; max-height: none; }
.dock-ask { padding: 0.65rem; border-top: 1px solid var(--line); margin: 0; }
.dock-ask textarea { min-height: 52px; font-size: 0.92rem; }
button[type="submit"] {
  background: var(--cyan);
  border: 0;
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  width: fit-content;
}
.err { color: var(--err); font-weight: 700; }
.ok {
  color: var(--ok);
  font-weight: 700;
  background: #e8f6ef;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
}
.files { list-style: none; padding: 0.75rem 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 0.4rem; }
.files li { padding: 0; border: 0; font-size: 0.8125rem; }
.files .muted { color: var(--text-52); }
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
@media (max-width: 800px) { .filters { grid-template-columns: 1fr; } }
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { text-align: left; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-52);
  background: var(--surface-panel-soft);
  font-weight: 500;
}
legend { font-weight: 800; padding: 0 0.3rem; }
fieldset { border: 1px solid var(--line); }

.page-login {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  overflow-x: hidden;
}
.page-login,
.page-login input,
.page-login button {
  font-family: var(--font-base);
}
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.login-hero {
  background: var(--navy);
  color: #fff;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--cyan);
}
.login-brand {
  position: absolute;
  top: 2.25rem;
  left: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.login-logo { height: 20px; width: auto; display: block; }
.login-kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.login-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  max-width: 28rem;
}
.login-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  box-shadow: 0 0 0 3px var(--cyan);
  background: #e8eef2;
}
.login-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.login-hero h1 span { color: var(--cyan); }
.login-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
}
.login-card {
  width: 100%;
  max-width: 23rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.login-card h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.login-card > div > p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.login-card button[type="submit"] {
  width: 100%;
  background: var(--cyan);
  color: #fff;
  margin-top: 0.25rem;
}
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 4.5rem; }
.pw-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--text-52);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-pill);
}
.pw-toggle:hover { color: var(--navy); }
.login-err {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #b3261e;
  background: #fbeeee;
  border: 1px solid #f0cfcf;
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
}
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-pane { order: -1; padding: 1.5rem 1.1rem 2rem; }
  .login-hero { padding: 5.5rem 1.5rem 2.5rem; min-height: auto; }
  .login-brand { top: 1.25rem; left: 1.5rem; }
  .login-avatar { width: 112px; height: 112px; }
  .login-hero-copy { gap: 1.1rem; }
}

body.page-chat {
  height: 100dvh;
  overflow: hidden;
}
body.page-chat .shell {
  min-height: 0;
  height: 100dvh;
  overflow: hidden;
}
body.page-chat main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.85rem 1.5rem 0;
  max-width: 60rem;
}
body.page-chat .intro { margin-bottom: 0.5rem; flex-shrink: 0; gap: 0.35rem; }
body.page-chat .examples { flex-shrink: 0; margin: 0.35rem 0 0.5rem; }
body.page-chat .luc-thread,
body.page-chat .chat.log {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin-bottom: 0;
  overflow: auto;
}
body.page-chat .luc-ask,
body.page-chat .banner {
  flex-shrink: 0;
  margin: 0.65rem 0 calc(0.75rem + env(safe-area-inset-bottom));
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
body.page-chat footer { display: none; }
body.page-chat .people { margin: 0; }

@media (max-width: 900px) {
  body.app { flex-direction: column; }
  .side {
    width: auto;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
    flex: 1;
  }
  nav a.on { box-shadow: none; }
  .who-mark, .who-meta { display: none; }
  .side-foot {
    border: 0;
    padding: 0;
    margin: 0;
    flex: none;
  }
  .logout { flex: none; }
  .dump-grid { grid-template-columns: 1fr; }
  .fb-fab { left: max(0.7rem, env(safe-area-inset-left)); }
  .fb-toast { left: 0.7rem; }
  body.page-chat .shell { height: auto; flex: 1; min-height: 0; }
}

@media (max-width: 720px) {
  nav a, nav button { padding: 0.5rem 0.75rem; font-size: 0.875rem; }
  main { padding: 1.5rem 1.25rem 5.75rem; }
  .composer { padding: 1.1rem; }
  .composer textarea { min-height: 120px; }
  .avatar-lg { width: 40px; height: 40px; }
  .luc-head { gap: 0.65rem; align-items: center; }
  .ask { flex-direction: column; align-items: stretch; }
  body.page-chat .ask { flex-direction: row; align-items: flex-end; }
  body.page-chat .ask button[type="submit"] { width: auto; }
  .ask button[type="submit"],
  form.composer > button[type="submit"],
  .composer-foot button[type="submit"],
  form.card > button[type="submit"],
  form.stack > button[type="submit"] { width: 100%; }
  .ghost { width: auto; }
  .fb-actions { flex-wrap: wrap; }
  .fb-actions button { flex: 1; width: auto; }
  .fb-cats { grid-template-columns: 1fr; }
  .fb-fab {
    left: max(0.7rem, env(safe-area-inset-left));
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
  }
  .fb-toast { left: 0.7rem; right: 0.7rem; bottom: 4.2rem; }
  .luc-dock {
    right: max(0.7rem, env(safe-area-inset-right));
    bottom: max(0.7rem, env(safe-area-inset-bottom));
  }
  .luc-fab { width: 52px; height: 52px; }
  .luc-dock.open .luc-panel {
    position: fixed;
    inset: env(safe-area-inset-top, 0) 0 0 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    bottom: 0;
    right: 0;
  }
  .bubble { padding: 0.7rem 0.85rem; }
  .chat-panel { padding: 1.1rem; }
  .fix-actions { flex-wrap: wrap; }
  body.page-chat main { padding: 0.65rem 1rem 0; }
  body.page-chat .fb-fab {
    position: fixed;
    left: auto;
    right: 0.7rem;
    top: calc(env(safe-area-inset-top, 0px) + 3.6rem);
    bottom: auto;
  }
}

@media (min-width: 721px) {
  body.page-chat .fb-fab { left: auto; right: 1.1rem; bottom: 1.1rem; }
}
