/* Aarnyx klantdemo — geen externe fonts of CDN. */
:root {
  --bg: #efe6d8;
  --bg-2: #e6dccb;
  --paper: #fbf6ee;
  --paper-2: #fffdf9;
  --ink: #1c1915;
  --muted: #5c564c;
  --faint: #857c70;
  --line: #e2d5c3;
  --line-strong: #cbbba4;
  --nav: #161d29;
  --nav-2: #222b3b;
  --nav-ink: #f6f0e6;
  --nav-dim: #c5cedd;
  --copper: #c24e24;
  --copper-dark: #8c3414;
  --copper-soft: #f8e4d8;
  --sea: #1a4c58;
  --sea-soft: #e2eef1;
  --human: #8a560e;
  --human-soft: #f8ecd4;
  --ok: #17653e;
  --ok-soft: #e3f3ea;
  --off: #8a8175;
  --shadow: 0 1px 0 rgba(28, 25, 21, 0.04), 0 16px 40px rgba(70, 46, 20, 0.07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(194, 78, 36, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, .brand strong { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 15px; font-family: var(--sans); font-weight: 700; }
a { color: var(--copper-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.banner {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2118;
  color: #f3e6d4;
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.banner b { color: #fff; font-weight: 650; }

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 32px); }

.nav {
  position: sticky;
  top: 32px;
  height: calc(100vh - 32px);
  overflow: auto;
  background: var(--nav);
  color: var(--nav-ink);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; padding: 0 6px; }
.brand strong { display: block; font-size: 22px; line-height: 1; }
.brand em { display: block; margin-top: 3px; font-style: normal; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nav-dim); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-head { margin: 0; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8ea0b8; }
.nav-ico { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; color: var(--nav-dim); font-weight: 650; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.nav-toggle:hover { background: var(--nav-2); color: var(--nav-ink); }
.app.is-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.app.is-collapsed .brand span,
.app.is-collapsed .nav-head,
.app.is-collapsed .nav-label,
.app.is-collapsed .nav-foot p,
.app.is-collapsed #btn-reset { display: none; }
.app.is-collapsed .nav a[data-nav],
.app.is-collapsed .nav-toggle,
.app.is-collapsed .brand { justify-content: center; }
.static-step { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.streams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stream { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 0; box-shadow: var(--shadow); }
.stream h2 { font-size: 20px; margin-bottom: 4px; }
.flow-arrow { text-align: center; color: var(--copper); font-weight: 750; line-height: 1; padding: 4px 0; }
.node { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.node .t { font-weight: 700; }
.hub { background: var(--sea-soft); border: 1px solid #b7d3da; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.people { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.person { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.person.on { border-color: var(--ink); }
.person .dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.buddy { width: 76px; text-align: center; flex: 0 0 76px; }
.buddy svg { width: 68px; height: 68px; display: block; margin: 0 auto; }
.buddy-face { fill: #c24e24; }
.eye { fill: #1c1915; }
.mouth { fill: none; stroke: #1c1915; stroke-width: 2.4; stroke-linecap: round; }
.buddy-name { font-size: 12px; font-weight: 750; margin-top: 2px; }
.buddy.talking { animation: buddy-bob .45s ease-in-out infinite; }
.buddy.talking .mouth { animation: buddy-talk .22s ease-in-out infinite; transform-origin: 40px 50px; }
@keyframes buddy-bob { 50% { transform: translateY(-5px); } }
@keyframes buddy-talk { 50% { transform: scaleY(.3); } }
.agent { background: linear-gradient(180deg, #fffdf9 0%, #f6ecdf 100%); }
.nav a[data-nav] {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--nav-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.nav a[data-nav]:hover, .nav a[data-nav].on { background: var(--nav-2); color: var(--nav-ink); }
.nav a[data-nav].on { box-shadow: inset 3px 0 0 var(--copper); }
.mini { font-size: 10px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 2px 6px; }
.mini.off { background: #343e50; color: #c5cedd; }
.mini.on { background: #1d6b45; color: #e9fff2; }
.nav-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #aeb9cb; font-size: 12.5px; display: flex; flex-direction: column; gap: 10px; }
.nav-foot .btn { color: var(--nav-ink); border-color: rgba(255, 255, 255, 0.2); background: transparent; }

.main { min-width: 0; padding: 0 28px 48px; }
.top {
  position: sticky;
  top: 32px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 -28px 18px;
  padding: 12px 28px;
  background: rgba(251, 246, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-dark); }
.co { color: var(--muted); font-size: 13.5px; }
.top-actions { display: flex; align-items: end; gap: 10px; }
.top-actions label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
select, textarea, input[type="text"] {
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 10px;
}
select { min-width: 11rem; }

.workspace { min-width: 0; }
.workspace.dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 18px;
  align-items: start;
}
.view { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 1080px; }
.workspace.dock .view { max-width: none; }
.lead { color: var(--muted); font-size: 16.5px; max-width: 68ch; }

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--copper); border-color: var(--copper); color: #fffaf6; }
.btn.primary:hover { background: var(--copper-dark); border-color: var(--copper-dark); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.small { padding: 5px 10px; font-size: 13px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card h2, .card h3 { margin-bottom: 4px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr); gap: 16px; align-items: start; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}
.fact b { color: var(--ink); font-weight: 700; }
.fact a { color: inherit; text-decoration: none; }
.fact a:hover { color: var(--copper-dark); }

.mod {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 112px;
  box-shadow: var(--shadow);
}
.mod:hover { border-color: var(--copper); }
.mod-mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--nav); color: var(--nav-ink);
  font-size: 12px; font-weight: 750;
}
.mod-name { font-weight: 750; }
.mod-state { color: var(--muted); font-size: 13px; }
.badge { align-self: flex-start; font-size: 11px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--bg-2); color: var(--off); }

.today { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.today button, .linkish {
  width: 100%;
  text-align: left;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.today button:hover, .linkish:hover { border-color: var(--copper); }
.intake p + p { margin-top: 4px; }
.from { color: var(--faint); font-size: 12.5px; }

.strip {
  background: var(--ok-soft);
  border: 1px solid #b7dfc6;
  color: var(--ok);
  border-radius: 12px;
  padding: 10px 12px;
}
.strip a { color: var(--ok); font-weight: 750; }

.agent {
  display: none;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-height: 480px;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 92px;
}
.workspace.dock .agent, .workspace.drawer .agent { display: flex; }
.workspace.drawer .agent {
  position: fixed;
  z-index: 15;
  top: 84px;
  right: 16px;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 104px);
}
.workspace.dock .agent-close { display: none; }
.agent-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.agent-head h2 { font-size: 26px; }
.log { overflow: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; padding-right: 2px; }
.msg { border-radius: 12px; padding: 8px 10px; max-width: 100%; }
.msg .who { display: block; font-size: 11px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.msg p { white-space: pre-wrap; }
.msg.agent { background: var(--sea-soft); }
.msg.user { background: var(--copper-soft); }
.src { display: block; margin-top: 6px; font-size: 12px; color: var(--sea); }
.suggest { display: flex; flex-direction: column; gap: 6px; }
.suggest button { text-align: left; border-radius: 10px; border: 1px dashed var(--line-strong); background: transparent; padding: 7px 8px; cursor: pointer; color: var(--muted); }
.suggest button:hover { border-color: var(--copper); color: var(--ink); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; }

.diagram { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.node { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.node.brain { background: var(--nav); color: var(--nav-ink); border-color: var(--nav); }
.node.brain .eyebrow, .node.brain .muted { color: #c5cedd; }
.arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--copper-dark); font-weight: 750; min-width: 7rem; text-align: center; }
.arrow b { font-size: 28px; line-height: 1; }
.arrow small { color: var(--muted); font-weight: 600; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.muted { color: var(--muted); }
.list { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }

.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: 13px; border-radius: 999px; padding: 3px 8px; }
.status.go { background: var(--ok-soft); color: var(--ok); }
.status.stop { background: var(--bg-2); color: var(--off); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dl { display: grid; grid-template-columns: 9.5rem 1fr; gap: 4px 10px; font-size: 14px; }
.dl dt { color: var(--faint); }
.dl dd { margin: 0; }
.card.dashed { border-style: dashed; background: transparent; box-shadow: none; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.flow, .mini-flow { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.flow button, .mini-flow li {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.flow button { cursor: pointer; }
.flow button:hover { border-color: var(--line-strong); }
.flow button.on { border-color: var(--ink); background: #fff; }
.flow button.now { box-shadow: inset 3px 0 0 var(--copper); }
.n { font-variant-numeric: tabular-nums; color: var(--faint); font-weight: 700; }
.t { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kind { font-size: 12px; font-weight: 750; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.kind.mens { color: var(--human); background: var(--human-soft); }
.kind.auto { color: var(--sea); background: var(--sea-soft); }
.nowflag, .afwflag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-dark); background: var(--copper-soft); border-radius: 999px; padding: 1px 6px; }
.fields { display: flex; flex-direction: column; gap: 8px; }
.fields label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 650; }
.day { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.day b { text-transform: capitalize; }
.detail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 8px; }
.kindline { min-height: 1.6em; }

.composer textarea { width: 100%; min-height: 280px; resize: vertical; line-height: 1.45; font-family: var(--mono); font-size: 12px; }
#plan-letop { background: var(--sea-soft); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
#plan-letop p + p { margin-top: 4px; }
.hint { color: var(--faint); font-size: 13px; }
.error { color: var(--copper-dark); font-weight: 650; }
.env-slot .ghost-mods { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.env-slot .ghost-mods li { border: 1px dashed var(--line-strong); color: var(--faint); border-radius: 999px; padding: 4px 10px; }
#env-done { display: flex; flex-direction: column; gap: 10px; border-color: #b7dfc6; scroll-margin-top: 96px; }
.mod-pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mod-pills li { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px 5px 12px; }
.tag { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 2px 6px; }
.tag.on { background: var(--ok-soft); color: var(--ok); }
.tag.off { background: var(--bg-2); color: var(--off); }
.tag.sap { background: var(--sea-soft); color: var(--sea); }
.roles-fixed { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.scenario-echo { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px; font-size: 13px; color: var(--muted); max-height: 160px; overflow: auto; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 700; }
.tabs button[aria-selected="true"] { background: var(--nav); color: var(--nav-ink); border-color: var(--nav); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); font-weight: 750; }
.yes { color: var(--ok); font-weight: 750; }
.no { color: var(--faint); }
.quote { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.lock { background: var(--human-soft); color: #6d4710; border-radius: 10px; padding: 8px 10px; font-size: 14px; }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 11rem 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.track { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--sea); border-radius: inherit; }
.track.alt span { background: var(--copper); }
.callout { border-left: 4px solid var(--copper); padding: 4px 0 4px 12px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi .v { font-family: var(--serif); font-size: 26px; }

.foot { margin-top: 28px; color: var(--faint); font-size: 12.5px; }

@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3, .kpis { grid-template-columns: 1fr; }
  .workspace.dock { grid-template-columns: 1fr; }
  .agent { position: relative; top: 0; max-height: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .nav { position: sticky; height: auto; flex-direction: row; flex-wrap: wrap; }
  .nav-foot { display: none; }
  .split, .diagram, .grid-2, .grid-5, .streams { grid-template-columns: 1fr; }
  .arrow b { transform: rotate(90deg); }
  .top { flex-wrap: wrap; }
  .bar-row { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
