:root {
  --bg: #ffffff;
  --bg-deep: #f7f7f5;
  --panel: #ffffff;
  --panel-2: #f3f2f0;
  --border: #e6e5e2;
  --border-soft: #edece9;
  --text: #191919;
  --text-dim: #6b6b6b;
  --accent: #191919;
  --accent-2: #000000;
  --cyan: #191919;
  --violet: #6b6b6b;
  --magenta: #8a8a86;
  --teal: #6b6b6b;
  --lavender: #6b6b6b;
  --gold: #6b6b6b;
  --good: #191919;
  --warn: #6b6b6b;
  --glow-cyan: rgba(0, 0, 0, 0.05);
  --glow-violet: rgba(0, 0, 0, 0.05);
  /* Radius-schaal: xs = chips/kleine items, sm = knoppen/inputs, md = kaarten, lg = panelen */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  /* Elevatie: 1 = kaart boven achtergrond, 2 = zwevend (hover/toast) */
  --elev-1: 0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
  --elev-2: 0 4px 14px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; }

html { scrollbar-width: thin; scrollbar-color: #d0d0cc transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient gloed: verwijderd voor het witte, vlakke thema — een schone witte pagina
   heeft geen achtergrond-gloed nodig (Notion-stijl). */
body::before {
  content: none;
}

:focus-visible {
  outline: 2px solid rgba(25, 25, 25, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .2s ease;
}

/* Zijbalk in/uitklappen (desktop): kolom naar 0 breedte, zijbalk zelf verbergen. */
@media (min-width: 861px) {
  .app.sidebar-collapsed { grid-template-columns: 0 1fr; }
  .app.sidebar-collapsed .sidebar {
    width: 0; min-width: 0; padding-left: 0; padding-right: 0; overflow: hidden; border-right: none;
  }
}

/* ---------- Sidebar ---------- */

.sidebar {
  background: #fbfbfa;
  border-right: 1px solid var(--border-soft);
  padding: 60px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: width .2s ease, padding .2s ease;
}

.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 18px;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav-item .nav-icon {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: .7;
  transition: opacity .15s;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item:hover .nav-icon { opacity: .95; }
.nav-item.active {
  background: var(--panel-2);
  color: var(--cyan);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.nav-item.active .nav-icon { opacity: 1; }

.entry-list {
  margin-top: 14px;
  overflow-y: auto;
  flex: 1;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}
.entry-row {
  padding: 8px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  gap: 6px;
  transition: background .12s, color .12s;
}
.entry-row:hover { background: var(--panel-2); color: var(--text); }
.entry-row.active { background: var(--panel-2); color: var(--text); box-shadow: inset 2px 0 0 var(--violet); }
.entry-row .d { color: var(--lavender); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Main layout ---------- */

.main {
  padding: 60px 36px 40px;
  overflow-y: auto;
  max-height: 100vh;
}

h1 { font-size: 20px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 14px; color: var(--text-dim); font-weight: 400; margin: 0 0 24px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--elev-1);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.stat-card:hover { border-color: #d2d1cd; transform: translateY(-1px); box-shadow: var(--elev-2); }
.stat-card .num {
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.stat-card .label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat-card .sub { font-size: 11px; color: var(--text-dim); margin-top: 8px; min-height: 13px; }
.stat-card .sub .trend { color: var(--text-dim); font-variant-numeric: tabular-nums; }

.spark { display: block; margin-top: 10px; color: var(--text-dim); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: var(--elev-1);
}
.panel h3 {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.dash-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dash-cols { grid-template-columns: 1fr; } }

/* ---------- Ranglijst (meest gelinkte patronen) ---------- */

.rank-list { display: flex; flex-direction: column; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: background .12s;
}
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: rgba(0, 0, 0, 0.03); }
.rank-row .rank-n {
  width: 20px; height: 20px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 50%;
  font-variant-numeric: tabular-nums;
}
.rank-row .rank-name { flex: 0 1 auto; min-width: 90px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rank-bar { flex: 1; height: 6px; background: var(--border-soft); border-radius: 999px; overflow: hidden; }
.rank-row .rank-bar span { display: block; height: 100%; background: linear-gradient(90deg, #4a4a46, #171717); border-radius: 999px; }
.rank-row .rank-count { flex: none; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }

/* ---------- Lege & laad-states ---------- */

.empty-state {
  padding: 22px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}
.skeleton {
  display: inline-block;
  height: 1em;
  width: 60px;
  border-radius: var(--r-xs);
  background: var(--panel-2);
  position: relative;
  overflow: hidden;
  vertical-align: middle;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Heatmap ---------- */

.heatmap { display: flex; flex-wrap: wrap; gap: 4px; }
.heat-cell {
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.heat-cell.has-entry {
  background: linear-gradient(135deg, #3a3a38, #171717);
  border-color: transparent;
  box-shadow: none;
}

/* ---------- Editor & buttons ---------- */

textarea#editor {
  width: 100%;
  min-height: 60vh;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  padding: 16px;
  line-height: 1.55;
  resize: vertical;
}
textarea:focus {
  outline: none;
  border-color: rgba(25, 25, 25, 0.3);
  box-shadow: 0 0 0 3px rgba(25, 25, 25, 0.08);
}

button {
  background: var(--text);
  border: none;
  color: #ffffff;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 13px;
  transition: transform .1s, box-shadow .15s, filter .15s;
}
button:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); transform: translateY(-1px); filter: brightness(1.15); }
button:focus-visible { outline: 2px solid rgba(25, 25, 25, 0.5); outline-offset: 2px; }
button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}
button.secondary:hover { box-shadow: none; border-color: #cfcecb; }
button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--panel-2); color: var(--text-dim);
  border: 1px solid var(--border-soft);
}

#agentOutput {
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px dashed var(--violet);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 10px;
}

/* ---------- Patterns ---------- */

.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pattern-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  box-shadow: var(--elev-1);
  transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
}
.pattern-card:hover {
  border-color: var(--violet);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.04), var(--panel-2) 60%);
  transform: translateY(-1px);
  box-shadow: var(--elev-2);
}
.pattern-card .status { font-size: 11px; color: var(--teal); margin-top: 3px; }

#graphCanvas { width: 100%; height: 560px; border-radius: var(--r-md); background: var(--bg-deep); border: 1px solid var(--border-soft); }

/* ---------- Journal + chat ---------- */

.journal-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .journal-layout { grid-template-columns: 1fr; } }

.chat-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  height: 78vh;
  box-shadow: var(--elev-1);
}
.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: none; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { font-size: 13.5px; line-height: 1.6; }
.chat-msg.user {
  color: var(--text);
  align-self: flex-end;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 14px;
  border-radius: 10px 10px 2px 10px;
  max-width: 85%;
}
.chat-msg.assistant {
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  padding: 12px 14px;
  border-radius: 10px 10px 10px 2px;
  white-space: pre-wrap;
}
.chat-msg .wikilink { color: #2b6cb0; font-weight: 600; }
.chat-msg .insert-btn {
  margin-top: 8px; font-size: 11px; padding: 4px 10px; border-radius: var(--r-xs);
  background: rgba(0, 0, 0, 0.04); color: var(--good); border: 1px solid rgba(0, 0, 0, 0.18); cursor: pointer;
}
.chat-msg .insert-btn:hover { background: rgba(0, 0, 0, 0.08); }
.chat-input-row { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--border-soft); }
.chat-input-row textarea {
  flex: 1; resize: none; height: 44px; background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); padding: 10px 12px; font-family: inherit; font-size: 13px;
}
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-suggestions button { font-size: 11.5px; padding: 5px 10px; background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }
.chat-suggestions button:hover { color: var(--cyan); border-color: #cfcecb; box-shadow: none; }
.typing { color: var(--text-dim); font-style: italic; font-size: 12.5px; }
#chatAttachBtn { flex: none; align-self: flex-end; height: 44px; padding: 0 12px; font-size: 16px; }
.chat-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.chat-attachments:empty { padding: 0; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 4px 8px;
  background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.attach-remove {
  background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 11px; padding: 0; line-height: 1;
}
.attach-remove:hover { color: var(--bad, #e06060); box-shadow: none; }

/* ---------- Agent activity feed ---------- */

.activity-feed { display: flex; flex-direction: column; gap: 6px; max-height: 140px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim);
  padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 7px;
  animation: fadein .2s ease-out;
}
.activity-item .icon { font-size: 13px; }
.activity-item.status { color: var(--text-dim); font-style: italic; }
.activity-item.tool { color: var(--lavender); }
.activity-item.done { color: var(--good); }
@keyframes fadein { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: none; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Vault tree ---------- */

.vtree { font-size: 12.5px; }
.vtree .vfolder { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: var(--r-xs); cursor: pointer; color: var(--text); font-weight: 600; }
.vtree .vfolder:hover { background: var(--panel-2); }
.vtree .vfolder .caret { display: inline-block; transition: transform .15s; color: var(--text-dim); width: 10px; }
.vtree .vfolder.collapsed .caret { transform: rotate(-90deg); }
.vtree .vchildren { margin-left: 16px; border-left: 1px solid var(--border-soft); padding-left: 8px; }
.vtree .vchildren.collapsed { display: none; }
.vtree .vfile { padding: 5px 8px; border-radius: var(--r-xs); cursor: pointer; color: var(--text-dim); }
.vtree .vfile:hover { background: var(--panel-2); color: var(--text); }
.vtree .vfile.active { background: rgba(0, 0, 0, 0.05); color: var(--cyan); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); }

/* ---------- Kompas: Personal Development / Trading als 2 gestapelde groepen, allebei altijd
   zichtbaar (geen tab-omschakeling), zoals 2 mappen onder elkaar in een Notion-zijbalk. ---------- */
.kompas-group-h {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim);
  padding: 4px 2px 6px;
  margin: 20px 0 4px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}
.kompas-group-h:first-child { margin-top: 2px; border-top: none; padding-top: 4px; }

/* ---------- Kompas: één geschreven-en-getoond oppervlak, geen edit/preview-toggle meer, gewoon
   direct typen in de opgemaakte tekst zoals in Notion. ---------- */
.kompas-editor { border-radius: var(--r-md); padding: 4px 2px; min-height: 72vh; }
.kompas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.kompas-save-status { font-size: 11px; color: var(--text-dim); min-height: 1.2em; }
.kompas-format-btns { display: flex; gap: 4px; }
.kompas-fmt-btn {
  background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 4px 10px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.kompas-fmt-btn:hover { background: var(--panel); color: var(--text); border-color: #cfcecb; box-shadow: none; transform: none; }
.kompas-fmt-bold { font-size: 13px; padding: 4px 12px; }
.kompas-editable {
  min-height: 68vh; box-sizing: border-box; border-radius: 8px;
  padding: 10px 12px; margin: -10px -12px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.75;
  cursor: text; transition: background-color .15s, box-shadow .15s;
}
.kompas-editable:focus {
  outline: none;
  background: var(--panel-2);
  box-shadow: 0 0 0 1px var(--border);
}
/* ---------- Markdown rendering ---------- */

.markdown-view { font-size: 14px; line-height: 1.75; color: var(--text); }
.markdown-view h1 { font-size: 19px; margin: 0 0 14px; color: var(--accent-2); font-weight: 700; }
.markdown-view h2 { font-size: 15.5px; margin: 22px 0 10px; color: var(--accent-2); font-weight: 600; }
.markdown-view h3 { font-size: 13px; margin: 16px 0 8px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.markdown-view p { margin: 0 0 12px; }
.markdown-view ul, .markdown-view ol { margin: 0 0 12px; padding-left: 22px; }
.markdown-view li { margin: 4px 0; }
.markdown-view li::marker { color: var(--text-dim); }
.markdown-view strong { color: var(--accent-2); font-weight: 600; }
.markdown-view em { color: var(--text-dim); }
.markdown-view blockquote {
  margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--violet);
  background: var(--panel-2); border-radius: 0 8px 8px 0; color: var(--text-dim);
}
.markdown-view hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.markdown-view code { background: var(--panel-2); padding: 2px 6px; border-radius: 4px; font-size: 12.5px; color: var(--lavender); }
.wikilink { color: #2b6cb0; font-weight: 600; cursor: pointer; border-bottom: 1px dotted rgba(43, 108, 176, 0.5); }
.wikilink:hover { color: #1a4d85; border-bottom-style: solid; }

.markdown-view table {
  width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 13px;
  display: block; overflow-x: auto;
}
.markdown-view th {
  text-align: left; padding: 8px 12px; color: var(--text-dim); font-weight: 600;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.markdown-view td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.markdown-view tr:hover td { background: rgba(0, 0, 0, 0.02); }

/* ---------- Statuskleuren (gedeeld, o.a. Wall Status) ---------- */
/* Statusniveaus dragen hun betekenis via het symbool (✓ ± ✕) + tekstlabel, en via lichtheid
   (licht, donker), bewust GEEN groen/geel/rood, dat las als een "stoplicht"-grafiek. */
:root {
  --g-held: #171717;
  --g-mixed: #8f8f89;
  --g-missed: #b3b3ad;
  --kill-red: #c8433a;
}

.stat-sym { font-size: 15px; opacity: .8; }
.stat-card .num.num-sm { font-size: 17px; white-space: nowrap; padding-top: 7px; letter-spacing: .01em; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 999;
  background: var(--panel-2); border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text); padding: 10px 16px; border-radius: var(--r-sm); font-size: 13px;
  box-shadow: var(--elev-2);
  animation: fadein .2s ease-out;
}

/* ---------- Sterktes & Zwaktes ---------- */

.sw-summary {
  font-size: 13.5px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap;
}
.sw-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
@media (max-width: 1100px) { .sw-cols { grid-template-columns: 1fr; } }
.sw-col h3 { display: flex; align-items: center; gap: 8px; }
.sw-count { font-size: 11px; background: var(--panel-2); color: var(--text-dim); border-radius: 999px; padding: 1px 8px; }
/* Flat list rows (same language as .thread-row / .food-item) instead of a boxed card per
   item: no per-row background/border/shadow, just a hairline divider and generous padding.
   The accent-per-column distinction moves from a boxed card's left border to a subtler
   left border directly on the row. */
.sw-card {
  padding: 10px 4px 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, border-left-color .15s;
}
.sw-col .sw-card:last-child { border-bottom: none; }
.sw-card:hover { background: var(--panel-2); }
.sw-card .sw-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sw-card .sw-name p, .sw-card .sw-status p, .sw-card .sw-excerpt p { margin: 0; display: inline; }
.sw-card .sw-status { font-size: 10.5px; color: var(--text-dim); margin: 2px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.sw-card .sw-excerpt { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.sw-col.strengths .sw-card { border-left-color: var(--g-held); }
.sw-col.weaknesses .sw-card { border-left-color: var(--g-mixed); }
.sw-col.mistakes .sw-card { border-left-color: var(--g-missed); }

/* ---------- Scrollbars ---------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d0d0cc;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #b8b8b3; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Mobiel: inklapbare zijbalk + responsive schaling ---------- */

.menu-toggle {
  display: flex;
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
  z-index: 60;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--elev-1);
  transition: background .15s, border-color .15s;
}
.menu-toggle:hover { background: var(--panel); border-color: #cfcecb; }
.mobile-topbar { display: none; }

/* Desktop-only zijbalk in/uitklap-knop: enige manier om toggleSidebar() op desktop te
   bereiken (de hamburger in .mobile-topbar is daar onbereikbaar, zie .mobile-topbar hierboven). */
.sidebar-collapse-btn {
  display: flex;
  margin-left: auto;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.sidebar-collapse-btn:hover { background: var(--panel); border-color: #cfcecb; color: var(--text); box-shadow: none; transform: none; }

/* Desktop-only zijbalk uitklap-knop: leeft BUITEN .sidebar (die zelf op width:0/overflow:hidden
   gaat bij .sidebar-collapsed, zie hierboven), anders is er geen manier meer om 'm terug open
   te klikken zodra hij dicht staat. Enkel zichtbaar wanneer de zijbalk effectief ingeklapt is. */
.sidebar-expand-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  box-shadow: var(--elev-1);
  transition: background .15s, border-color .15s, color .15s;
}
.sidebar-expand-btn:hover { background: var(--panel); border-color: #cfcecb; color: var(--text); box-shadow: none; transform: none; }
.app.sidebar-collapsed .sidebar-expand-btn { display: flex; }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 45;
  opacity: 0;
  transition: opacity .2s;
}
.sidebar-backdrop.open { display: block; opacity: 1; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  /* Géén position:fixed meer op mobiel — een fixed hoek-knop kan in standalone/fullscreen
     mode (viewport-fit=cover) letterlijk achter de notch/Dynamic Island/statusbalk vallen,
     onbereikbaar voor een tik, ongeacht safe-area-berekeningen. Een gewone in-flow balk
     bovenaan de pagina kan dat structureel niet overkomen: normale (niet-fixed) content
     wordt door de browser altijd ONDER zijn eigen chrome geplaatst. */
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
  }
  .mobile-topbar-title { font-size: 14px; font-weight: 600; color: var(--text); }
  .sidebar-collapse-btn { display: none; }
  .sidebar-expand-btn { display: none !important; }
  .menu-toggle {
    position: static;
    display: flex;
    width: 34px;
    height: 34px;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 78vw;
    max-width: 280px;
    /* Boven de .mobile-topbar (z-index 60) — anders blijft de sticky topbar zichtbaar
       bovenop het opengeschoven zijmenu tijdens scrollen, en lopen beide door elkaar. */
    z-index: 65;
    padding-top: calc(60px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.15);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { z-index: 62; }

  .main { padding: 16px 14px 32px; max-height: none; }
  h1 { font-size: 17px; }
  h2 { font-size: 12.5px; margin-bottom: 16px; }

  .toolbar { flex-wrap: wrap; row-gap: 8px; }
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin: 14px 0 20px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .num { font-size: 21px; }
  .panel { padding: 14px 14px; margin-bottom: 16px; border-radius: var(--r-md); }
  .dash-cols { grid-template-columns: 1fr; gap: 12px; }

  .journal-layout { grid-template-columns: 1fr; gap: 14px; }
  .chat-panel { height: 60vh; }
  textarea#editor { min-height: 44vh; font-size: 12.5px; }
  .markdown-view { font-size: 13px; }

  .pattern-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

  .sw-cols { grid-template-columns: 1fr; gap: 12px; }

  .vtree { font-size: 11.5px; }
  .journal-layout[style*="320px"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 420px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .chat-suggestions button { font-size: 10.5px; }
  button { padding: 8px 12px; font-size: 12.5px; }
}

/* ============================================================
   Wired Brain 2.0 — visuele herontwerp-laag
   Donker monochroom blijft de basis; daarbovenop: glaspanelen,
   subtiele neurale fluorescentie (cyaan/violet op lage opacity),
   3D-tilt op kaarten, een levende synaps-achtergrond en een
   hero-illustratie op het dashboard. De Groei-statuskleuren
   (--g-held / --g-mixed / --g-missed) blijven exact ongewijzigd
   — die dragen betekenis. Tekst blijft grijstinten.
   ============================================================ */

:root {
  --neon-cyan: #191919;
  --neon-violet: #6b6b6b;
  --neon-cyan-soft: rgba(0,0,0,0.05);
  --neon-violet-soft: rgba(0,0,0,0.04);
  --glass: #ffffff;
  --glass-border: #e6e5e2;
}

/* ---------- Levende achtergrond ---------- */

/* Ambient gloed-laag: uitgeschakeld (zie basisregel hierboven, content: none). */

/* ---------- Panelen (vlak, geen glas) ---------- */

.panel, .chat-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
}
.panel { position: relative; isolation: isolate; transition: border-color .25s, box-shadow .25s; }
.panel:hover { border-color: #d6d5d2; z-index: 5; }

.sidebar {
  background: #fbfbfa;
}
.menu-toggle {
  background: var(--panel-2);
}

/* ---------- Typografie / hiërarchie ---------- */

h1 {
  font-size: 26px;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text);
}
h2 { margin-bottom: 26px; }

.brand {
  color: var(--text);
}

.panel h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel h3::after,
.sw-col h3::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.10), transparent);
}

/* ---------- Navigatie ---------- */

.nav-item { transition: background .15s, color .15s, box-shadow .15s, transform .18s; }
.nav-item:hover { transform: translateX(2px); }
.nav-item.active {
  background: var(--panel-2);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--neon-cyan);
}
.entry-row { transition: background .12s, color .12s, transform .15s; }
.entry-row:hover { transform: translateX(2px); }
.entry-row.active { box-shadow: inset 2px 0 0 var(--neon-violet); }

/* ---------- View-overgangen ---------- */

@keyframes view-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.main.view-anim > * { animation: view-in .45s cubic-bezier(.16, .8, .3, 1) both; }
.main.view-anim > *:nth-child(2) { animation-delay: .05s; }
.main.view-anim > *:nth-child(3) { animation-delay: .1s; }
.main.view-anim > *:nth-child(4) { animation-delay: .15s; }
.main.view-anim > *:nth-child(5) { animation-delay: .2s; }
.main.view-anim > *:nth-child(n+6) { animation-delay: .24s; }
/* Her-renders (bv. de 15s-poll van Groei) mogen niet telkens opnieuw animeren. */
.no-anim * { animation: none !important; }

/* ---------- Kaarten (vlak, geen 3D-tilt) ---------- */

.stat-card, .pattern-card {
  transition: transform .18s ease-out, border-color .2s, box-shadow .25s, background .2s;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
}
.stat-card:hover, .pattern-card:hover {
  transform: translateY(-1px);
  border-color: #d6d5d2;
  box-shadow: var(--elev-2);
}
.stat-card .num { text-shadow: none; }
.spark { color: var(--text-dim); }

/* ---------- Dashboard-hero ---------- */

.dash-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 250px;
  padding: 42px 46px 64px;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: var(--elev-1);
}
.hero-copy {
  position: relative;
  z-index: 1;
  transform: translate3d(calc(var(--px, 0px) * .35), calc(var(--py, 0px) * .35), 0);
  transition: transform .35s cubic-bezier(.2, .7, .3, 1);
}
.dash-hero .display-title {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
}
.dash-hero h2 { font-size: 14.5px; margin: 0; max-width: 48ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-tags .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
.hero-art {
  position: relative;
  transform: translate3d(calc(var(--px, 0px) * -.9), calc(var(--py, 0px) * -.9), 0);
  transition: transform .35s cubic-bezier(.2, .7, .3, 1);
}
.hero-art svg { width: 100%; max-height: 240px; display: block; }

.hero-net .hn { fill: #9a9a94; opacity: .75; animation: node-breathe 4.5s ease-in-out infinite; }
.hero-net .hn.v { fill: var(--neon-violet); }
.hero-net .hn.c { fill: var(--neon-cyan); }
.hero-net .hn.big { filter: none; }
.hero-net circle.hn:nth-of-type(2n) { animation-delay: -1.6s; }
.hero-net circle.hn:nth-of-type(3n) { animation-delay: -3.1s; }
@keyframes node-breathe {
  0%, 100% { opacity: .5; }
  50% { opacity: .95; }
}
.hero-net .hpulse { fill: #2b2b2b; filter: none; }

/* Statistiekkaarten zweven half over de onderrand van de hero. */
.dash-stats { margin-top: 18px; position: relative; z-index: 2; padding: 0; }

/* ---------- Redactionele dashboard-grid ---------- */

.dash-editorial { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.dash-editorial > .panel { margin-bottom: 0; }
.de-2 { grid-column: span 2; }
.de-3 { grid-column: span 3; }
.de-4 { grid-column: span 4; }
.de-6 { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .dash-editorial { grid-template-columns: 1fr; }
  .de-2, .de-3, .de-4, .de-6 { grid-column: auto; }
}

/* Weekdag-staafjes + mood-woorden (gerenderd uit /api/stats). */
.weekday-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 6px; }
.weekday-bars .wd {
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
}
.weekday-bars .wd .bar {
  width: 100%; max-width: 34px; min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4a4a46, #171717);
  border: 1px solid rgba(0,0,0, 0.15);
  transform-origin: bottom;
  animation: bar-in .55s cubic-bezier(.2, .7, .3, 1) backwards;
}
.weekday-bars .wd .lbl { font-size: 10.5px; color: var(--text-dim); }
.mood-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mood-chip {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(0,0,0, 0.04);
  border: 1px solid rgba(0,0,0, 0.12);
  color: var(--text);
}
.mood-chip .cnt { color: var(--text-dim); font-size: 10.5px; margin-left: 4px; }
.reflection-stat { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.reflection-stat b { color: var(--text); font-size: 18px; font-weight: 700; }

/* ---------- Micro-animaties (grafieken, heatmap, chat, toast) ---------- */

@keyframes bar-in { from { transform: scaleY(0); } }
.wbar {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: bar-in .55s cubic-bezier(.2, .7, .3, 1) backwards;
}
@keyframes draw-line { from { stroke-dashoffset: 1; } }
.spark-path { stroke-dasharray: 1; animation: draw-line .9s ease-out; }
@keyframes fade-in-soft { from { opacity: 0; } }
.spark-dot { animation: fade-in-soft .5s ease-out .55s backwards; }
@keyframes cell-in { from { opacity: 0; transform: scale(.55); } }
.heatmap .heat-cell { animation: cell-in .4s ease-out backwards; }
.heat-cell.has-entry {
  background: linear-gradient(135deg, #3a3a38, #171717);
  box-shadow: none;
}
.rank-row .rank-bar span {
  transform-origin: left center;
  animation: rank-grow .7s cubic-bezier(.2, .7, .3, 1) backwards;
  background: linear-gradient(90deg, #4a4a46, #171717);
}
@keyframes rank-grow { from { transform: scaleX(0); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.chat-msg { animation: msg-in .28s cubic-bezier(.2, .7, .3, 1) backwards; }
.chat-msg.user {
  background: rgba(0,0,0, 0.05);
  border-color: rgba(0,0,0, 0.15);
}
.chat-header .dot {
  background: var(--neon-cyan);
  box-shadow: none;
  animation: pulse 2.6s infinite;
}
.live-dot { background: var(--text-dim); box-shadow: none; }

.toast {
  border-color: rgba(0,0,0, 0.15);
  box-shadow: var(--elev-2);
  animation: toast-in .3s cubic-bezier(.2, .7, .3, 1), toast-out .3s ease-in 1.85s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Lege states met illustratie ---------- */

.empty-state {
  border: 1px dashed rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.012);
}
.empty-state::before {
  content: "";
  display: block;
  width: 56px;
  height: 30px;
  margin: 0 auto 8px;
  opacity: .55;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 30" fill="none"><path d="M6 23 L20 8 L33 16 L48 5" stroke="%23c9c9c4" stroke-width="1"/><circle cx="6" cy="23" r="2.4" fill="%23b3b3ad" opacity=".8"/><circle cx="20" cy="8" r="1.9" fill="%23b3b3ad"/><circle cx="33" cy="16" r="2.4" fill="%23b3b3ad" opacity=".8"/><circle cx="48" cy="5" r="1.9" fill="%23b3b3ad"/></svg>') no-repeat center / contain;
}

/* ---------- Interactie-accenten ---------- */

button:hover { box-shadow: 0 4px 14px rgba(0,0,0, 0.22); }
button:active:not(:disabled) { transform: translateY(0) scale(.97); }
:focus-visible { outline-color: rgba(25,25,25, 0.5); }
textarea:focus { border-color: rgba(0,0,0, 0.35); box-shadow: 0 0 0 3px rgba(0,0,0, 0.08); }
.wikilink { color: #2b6cb0; border-bottom-color: rgba(43,108,176, 0.45); }
.wikilink:hover { color: #1a4d85; }

/* ---------- Mobiel (≤860px) voor de nieuwe onderdelen ---------- */

@media (max-width: 860px) {
  .dash-hero { grid-template-columns: 1fr; min-height: 0; padding: 26px 20px 54px; }
  .dash-hero .display-title { font-size: 30px; }
  .hero-art { max-width: 300px; margin: 14px auto 0; }
  .dash-stats { margin-top: 14px; padding: 0; }
  .dash-editorial { gap: 12px; }
  h1 { font-size: 20px; }
}

/* ============================================================
   Wired Brain 3.0 — spektakel-laag ("living neural interface")
   Pseudo-3D deeltjesveld op de canvas, aurora + reuzentypografie
   in de hero, neon-gloed op alle grafieken, pointer-glans op
   kaarten, korrel-textuur, gloeiende nav-indicator en een
   getekend merk-glyph. Alles transform/opacity/filter, weinig
   elementen, en reduced-motion schakelt alles uit.
   ============================================================ */

/* ---------- Hero: aurora + reuzentitel ---------- */

.hero-aurora { display: none; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-aurora i { position: absolute; display: block; border-radius: 50%; filter: blur(55px); }
.hero-aurora .a1 {
  width: 420px; height: 320px; left: -80px; top: -120px;
  background: radial-gradient(circle, rgba(230,233,236, 0.20), transparent 65%);
  animation: aurora1 16s ease-in-out infinite alternate;
}
.hero-aurora .a2 {
  width: 480px; height: 360px; right: -120px; top: -60px;
  background: radial-gradient(circle, rgba(143,151,158, 0.18), transparent 65%);
  animation: aurora2 21s ease-in-out infinite alternate;
}
.hero-aurora .a3 {
  width: 380px; height: 300px; left: 30%; bottom: -160px;
  background: radial-gradient(circle, rgba(210, 225, 235, 0.10), transparent 65%);
  animation: aurora3 18s ease-in-out infinite alternate;
}
@keyframes aurora1 { to { transform: translate(70px, 40px) scale(1.25); } }
@keyframes aurora2 { to { transform: translate(-60px, 50px) scale(1.15) rotate(20deg); } }
@keyframes aurora3 { to { transform: translate(50px, -40px) scale(1.3); } }

.dash-hero { min-height: 300px; padding: 52px 50px 72px; }
.hero-art { z-index: 1; }
.hero-art svg { max-height: 280px; }
.dash-hero .display-title {
  font-size: clamp(42px, 6.5vw, 76px);
  color: var(--text);
}

/* Hero-artwork: lijnen tekenen zichzelf, gloeiende dubbels, draaiende ringen, orbit-spark. */
.hero-net .hdraw { stroke-dasharray: 1; animation: draw-line 1.8s cubic-bezier(.4, 0, .2, 1) both; }
.hero-net .hglow { opacity: .55; animation: fade-in-soft 1.2s ease-out .6s backwards; }
.hero-ring, .hero-ring2 { transform-box: fill-box; transform-origin: center; }
.hero-ring { animation: spin 16s linear infinite; }
.hero-ring2 { animation: spin-rev 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
.hero-spark { fill: #2b2b2b; filter: none; }

/* ---------- Dramatischere view-overgangen (diepte-invlieg) ---------- */

@keyframes view-in {
  from { opacity: 0; transform: translateY(30px) scale(.965); }
  to { opacity: 1; transform: none; }
}
.main.view-anim > * { animation: view-in .6s cubic-bezier(.16, 1, .3, 1) both; }

/* ---------- Kaarten: pointer-glans + gekleurde gloedschaduw ---------- */

.stat-card, .pattern-card { position: relative; }
.stat-card::after, .pattern-card::after {
  content: none;
}
.stat-card:hover, .pattern-card:hover {
  box-shadow: var(--elev-2);
}

/* ---------- Grafieken (vlak, geen gloed) ---------- */

.wbar { filter: none; }
.spark-path { filter: none; }
.spark-ping {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: ping 2.6s cubic-bezier(0, 0, .2, 1) 1s infinite;
}
@keyframes ping {
  0% { opacity: .7; transform: scale(.4); }
  70%, 100% { opacity: 0; transform: scale(3); }
}
/* ---------- Korrel-textuur: uitgeschakeld (geen filmkorrel op een schoon wit thema) ---------- */

body::after {
  content: none;
}

/* ---------- Sidebar: gloeiende indicator + getekend merk-glyph ---------- */

.nav-item { position: relative; }
.nav-item.active { box-shadow: none; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2.5px;
  border-radius: 3px;
  background: var(--text);
  box-shadow: none;
}

.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: radial-gradient(120% 120% at 25% 15%, var(--panel-2) 0%, var(--bg-deep) 70%);
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
}
.brand-mark svg { width: 18px; height: 18px; }

/* ---------- Mobiel: spektakel dimmen waar het bandbreedte/fill-rate kost ---------- */

@media (max-width: 860px) {
  .dash-hero { min-height: 0; padding: 30px 20px 56px; }
  .dash-hero .display-title { font-size: 38px; }
  .hero-aurora i { filter: blur(40px); }
  body::after { display: none; } /* korrel uit op mobiel — scheelt fill-rate */
}

/* ---------- Reduced motion: alle beweging uit ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* SMIL-animaties (animateMotion) luisteren niet naar CSS — die elementen gewoon verbergen. */
  .hero-net .hpulse, .hero-spark { display: none; }
  .hero-copy, .hero-art { transform: none; }
  .spark-ping { opacity: 0; }
}

/* ==========================================================================
   Wired Brain 3.1 — future layer (gebouwd na visuele review via Chrome)
   HUD-look: gradient-randen, neon-cijfers, gloeiende heatmap en area-charts.
   ========================================================================== */

/* Gradient-rand op glaspanelen en statkaarten: uitgeschakeld (vlakke rand volstaat) */
.panel::before, .stat-card::before {
  content: none;
}
.stat-card { position: relative; isolation: isolate; }

/* Statcijfers: gewone effen kleur, geen gradient/gloed */
.stat-card .num {
  background: none;
  -webkit-background-clip: unset; background-clip: unset; color: var(--text);
  text-shadow: none;
  filter: none;
}
/* Groei-statussen behouden hun betekenis-kleur, geen gradient overheen */
.stat-card .num.g-held-text { background: none; -webkit-text-fill-color: var(--g-held); color: var(--g-held); filter: none; }
.stat-card .num.g-mixed-text { background: none; -webkit-text-fill-color: var(--g-mixed); color: var(--g-mixed); filter: none; }
.stat-card .num.g-missed-text { background: none; -webkit-text-fill-color: var(--g-missed); color: var(--g-missed); filter: none; }

/* Heatmap: vlakke, effen cellen */
.heat-cell { background: rgba(0,0,0,.03); border: 1px solid rgba(0,0,0,.08); }
.heat-cell.has-entry {
  background: linear-gradient(180deg, #3a3a38, #171717);
  border-color: transparent;
  box-shadow: none;
}

/* Weekbalken: geen gloed */
.wbar { filter: none; }

/* ---------- 369-geometrie + orbs (future layer, deel 2) ---------- */

/* Cijfers in de hero-vortex: 3/6/9 fel, de verdubbelingslus-cijfers gedimd */
.h369 { font-family: "Inter", sans-serif; font-size: 14px; font-weight: 700; fill: var(--text); filter: none; }
.h369.dim { font-size: 10px; font-weight: 500; fill: #9a9a94; filter: none; }

/* Logo: 369-circuit-lijn (1-2-4-8-7-5) dun en gedimd achter de 3-6-9 driehoek */
.bm-circuit { stroke: rgba(0,0,0,.18); stroke-width: .7; fill: none; }

/* Zwevende gradient-orbs over de hele tool (website-diepte, puur transform-animatie) */

/* ---------- To Do & Kill List ---------- */
.todo-panel h3 { margin: 0 0 12px; }
#todoPrimary .todo-panel { margin-bottom: 20px; }
.todo-secondary { margin-bottom: 16px; }
.todo-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border-soft); }
.todo-check { width: 20px; height: 20px; flex: none; border-radius: 5px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: background .15s, border-color .15s; }
.todo-row.done .todo-check { background: var(--g-held, #171717); border-color: var(--g-held, #171717); color: #ffffff; }
.todo-text { flex: 1; font-size: 13.5px; color: var(--text); word-break: break-word; }
.todo-row.done .todo-text { color: var(--text-dim); text-decoration: line-through; }
.todo-del { flex: none; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 12px; padding: 4px; opacity: .5; transition: opacity .15s, color .15s; }
.todo-del:hover { opacity: 1; color: var(--kill-red); }
.todo-add-row { display: flex; gap: 8px; }
.todo-add-input { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; font-size: 13px; }
.todo-add-btn { flex: none; }
.empty-hint { font-size: 12.5px; color: var(--text-dim); padding: 6px 2px; }

/* ---------- Boeken ---------- */
.book-row.reading .todo-check { background: var(--g-mixed, #8f8f89); border-color: var(--g-mixed, #8f8f89); color: #ffffff; }
.book-row.done .todo-text { text-decoration: none; }
.book-author { color: var(--text-dim); font-weight: 400; font-size: 12.5px; }
.book-log-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.book-log-form select { flex: 1; min-width: 180px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; font-size: 13px; }
.book-log-form input[type="number"] { width: 90px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; font-size: 13px; }

/* ---------- Waar op letten: kern-digest op het dashboard ---------- */
.watch-panel { margin-bottom: 20px; border-color: var(--text-dim); }
.watch-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.watch-item { padding: 10px 12px; background: var(--panel-2); border-radius: var(--r-sm); border-left: 2px solid var(--text-dim); }
.watch-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.watch-hint { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.watch-open-btn { font-size: 12px; }

/* ---------- Dagelijkse Wall-poort op het dashboard ---------- */
.wall-gate { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 20px; border: 1px solid var(--text-dim); }
.wall-gate-text { font-size: 13.5px; color: var(--text); }
.wall-gate-text strong { font-weight: 700; }

/* ---------- Snelle acties (Lazlo-sms) ---------- */
.quick-actions-panel { margin-bottom: 20px; }
.quick-action-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 6px; }

/* ---------- Kill List: "waarom nu"-formulier ---------- */
.kill-reason-mode { gap: 6px; }
.kill-reason-input { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 6px 9px; font-size: 12.5px; }
.kill-reason-btn, .kill-reason-cancel { flex: none; font-size: 11.5px; padding: 6px 10px; }

/* ---------- Kill List / Routine: standing lists, geen checklists ---------- */
.plain-panel h3 { margin: 0 0 12px; }
.kill-panel h3 { color: var(--kill-red); }
.plain-group-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 12px 0 6px; }
.plain-group-h:first-child { margin-top: 0; }
.plain-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.plain-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: transparent; }
.plain-dot { flex: none; color: var(--text-dim); font-size: 16px; line-height: 1; }
.plain-text { flex: 1; font-size: 13.5px; color: var(--text); word-break: break-word; }
.kill-log-btn { flex: none; font-size: 11px; padding: 4px 9px; }

/* ---------- Completed: dichtgeklapte log onderaan de To Do-pagina ---------- */
.completed-toggle { margin-top: 4px; }
.completed-toggle summary { cursor: pointer; font-size: 13px; color: var(--text-dim); padding: 8px 2px; list-style: none; display: flex; align-items: center; gap: 8px; }
.completed-toggle summary::-webkit-details-marker { display: none; }
.completed-toggle summary::before { content: "▸"; transition: transform .15s; }
.completed-toggle[open] summary::before { transform: rotate(90deg); }
.completed-count { font-size: 11px; background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 8px; }
.completed-toggle #completedCol { margin-top: 10px; }

/* ---------- Kompas: Risk Plan / Trade Plan als dichtgeklapte panels ---------- */
.hub-section { margin: 18px 0; }
.hub-section summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text); padding: 8px 2px; list-style: none; display: flex; align-items: center; gap: 8px; }
.hub-section summary::-webkit-details-marker { display: none; }
.hub-section summary::before { content: "▸"; transition: transform .15s; color: var(--text-dim); }
.hub-section[open] summary::before { transform: rotate(90deg); }
.hub-section .panel { margin-top: 8px; }
.hub-food-link { margin-top: 12px; }
.hub-food-link a { font-size: 12.5px; color: var(--text-dim); text-decoration: none; }
.hub-food-link a:hover { color: var(--accent-2); }

/* ---------- Live dagenteller op To Do/Kill List-items ---------- */
.todo-since { display: inline-block; margin-left: 8px; font-size: 10.5px; color: var(--text-dim); background: var(--panel); border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 7px; }

/* ---------- Dashboard: Wall Status + Open threads ---------- */
.wall-rows { display: flex; flex-direction: column; gap: 9px; }
.wall-row { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.wall-dot { flex: none; width: 16px; text-align: center; font-weight: 700; }
.g-held-text { color: var(--g-held, #7ecf9c); }
.g-mixed-text { color: var(--g-mixed, #d4b06a); }
.g-missed-text { color: var(--g-missed, #c96a6a); }
.wall-arena { color: var(--text); flex: none; min-width: 128px; }
.wall-sub { color: var(--text-dim); }
.thread-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.thread-row:last-child { border-bottom: none; }
.thread-check { flex: none; width: 12px; color: var(--g-held, #7ecf9c); font-size: 11px; font-weight: 700; }
.thread-tag { flex: none; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 8px; background: var(--border); color: var(--text-dim); }
.thread-tag.kill { background: rgba(200, 67, 58, 0.14); color: var(--kill-red); }
.thread-row.done .thread-text { color: var(--text-dim); text-decoration: line-through; }
.thread-row.done .thread-tag { opacity: .55; }

/* ---------- Planning / kalender ---------- */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-nav { padding: 5px 12px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell { position: relative; aspect-ratio: 1 / 0.85; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border-soft); padding: 6px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .15s, background .15s; overflow: hidden; }
.cal-period { position: absolute; left: -1px; right: -1px; bottom: 2px; height: 6px; background: rgba(0, 0, 0, 0.08); border-top: 1px solid rgba(0, 0, 0, 0.15); border-bottom: 1px solid rgba(0, 0, 0, 0.15); z-index: 1; }
.cal-day, .cal-marks { position: relative; z-index: 2; }
.cal-period.done { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.12); }
.cal-period.p-start { left: 5px; border-top-left-radius: 5px; border-bottom-left-radius: 5px; border-left: 1px solid rgba(0, 0, 0, 0.15); }
.cal-period.p-end { right: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-right: 1px solid rgba(0, 0, 0, 0.15); }
.cal-cell:hover { border-color: var(--border); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.today { border-color: rgba(25,25,25,.35); }
.cal-cell.selected { background: var(--panel); border-color: var(--text-dim); }
.cal-day { font-size: 12px; color: var(--text); }
.cal-marks { display: flex; align-items: center; justify-content: space-between; }
.cal-dot.entry { width: 6px; height: 6px; border-radius: 50%; background: var(--g-held, #7ecf9c); display: inline-block; }
.cal-plan-count { font-size: 9.5px; background: var(--border); color: var(--text); border-radius: 8px; padding: 1px 5px; }
@media (max-width: 860px) {
  .cal-cell { padding: 4px; }
  .cal-day { font-size: 10.5px; }
}

/* ---------- Planning: dag-tijdrooster ---------- */
.day-grid-wrap { max-height: 420px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--r-sm); position: relative; }
.day-grid { position: relative; margin-left: 46px; }
.dg-hourline { position: absolute; left: -46px; right: 0; height: 0; border-top: 1px solid var(--border-soft); }
.dg-hourline span { position: absolute; left: 0; top: -7px; width: 40px; font-size: 10px; color: var(--text-dim); text-align: right; padding-right: 6px; }
.dg-blocks { position: absolute; inset: 0; left: 4px; right: 8px; }
.dg-block { position: absolute; left: 0; right: 0; background: var(--panel-2); border: 1px solid var(--border); border-left: 2px solid var(--text-dim); border-radius: 5px; padding: 3px 8px; display: flex; align-items: center; gap: 6px; overflow: hidden; cursor: default; }
.dg-block.done { opacity: .5; border-left-color: var(--border); }
.dg-block.done .dg-text { text-decoration: line-through; }
.dg-check { flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dg-block.done .dg-check { background: var(--text-dim); color: var(--bg); }
.dg-text { flex: 1; font-size: 11.5px; color: var(--text); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.dg-del { flex: none; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 11px; opacity: .5; }
.dg-del:hover { opacity: 1; }
.day-untimed-h { font-size: 12px; color: var(--text-dim); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.day-add-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.day-add-start, .day-add-end, .day-add-pstart, .day-add-pend { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; font-size: 13px; }
.day-add-text, .day-add-ptext { flex: 1; min-width: 140px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; font-size: 13px; }
.day-add-period { padding-top: 12px; border-top: 1px dashed var(--border-soft); align-items: center; }
.day-add-period-label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; flex: none; width: 100%; }
.day-periods { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.period-row .todo-text { font-weight: 500; }
@media (max-width: 860px) {
  .day-grid-wrap { max-height: 340px; }
}

/* Overlay-vensters (Routines-editor, iPhone-agendafeed) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; width: min(560px, 100%); max-height: 85vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.modal-hint { font-size: 12.5px; color: var(--text-dim); margin: 0; line-height: 1.5; }
.modal-hint code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; font-size: 11.5px; }
.modal-box textarea { min-height: 220px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 10px; font-family: ui-monospace, monospace; font-size: 13px; resize: vertical; }
.modal-box input[type="text"] { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; font-size: 12.5px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Trading-tab: modeldocument + trade log ---------- */
.doc-actions { margin-left: auto; display: flex; gap: 8px; }
.doc-actions button { font-size: 11.5px; padding: 6px 10px; }

/* ---------- PDF-downloadknop (op elke documentweergave) ---------- */
.pdf-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 7px 12px; white-space: nowrap; }
.pdf-btn svg { flex: 0 0 auto; }
.pdf-btn.busy { opacity: .6; cursor: progress; }
.pdf-btn.busy svg { animation: pdfPulse 1s ease-in-out infinite; }
@keyframes pdfPulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.doc-head .pill { display: inline-block; }
.kompas-toolbar-right { display: flex; align-items: center; gap: 10px; }

/* Print-fallback: als de server geen PDF kan maken, wordt enkel #printArea afgedrukt. */
#printArea { display: none; }
@media print {
  body.printing .app, body.printing .sidebar-backdrop, body.printing .toast { display: none !important; }
  body.printing #printArea { display: block; padding: 0; color: #191919; }
  body.printing #printArea .pdf-title { font-size: 20pt; font-weight: 700; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid #e6e5e2; }
  body.printing #printArea .markdown-view { font-size: 11.5pt; }
}

.trading-doc-editor {
  width: 100%; min-height: 460px; box-sizing: border-box;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); padding: 14px; font-family: ui-monospace, monospace;
  font-size: 13px; line-height: 1.65; resize: vertical;
}
#tradingDoc .markdown-view input[type="checkbox"] {
  accent-color: var(--g-held, #7ecf9c); width: 15px; height: 15px;
  margin-right: 8px; cursor: pointer; vertical-align: -2px;
}
#tradingDoc .markdown-view li:has(> input[type="checkbox"]) { list-style: none; margin-left: -18px; }

.trade-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; }
.trade-form label { font-size: 11px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; text-transform: uppercase; letter-spacing: .04em; }
.trade-form input, .trade-form select, .trade-form textarea {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); padding: 8px 10px; font-size: 13px; font-family: inherit;
  text-transform: none; letter-spacing: normal;
}
.trade-form input[type="file"] { padding: 6px; font-size: 12px; }
.trade-form textarea { resize: vertical; }
.trade-form .span3 { grid-column: span 3; }
.trade-form .span4 { grid-column: 1 / -1; }
.trade-form-actions { display: flex; align-items: center; gap: 12px; }
.trade-form-hint { font-size: 12px; color: var(--text-dim); }
@media (max-width: 860px) {
  .trade-form { grid-template-columns: repeat(2, 1fr); }
  .trade-form .span3 { grid-column: 1 / -1; }
}

.trade-row { border: 1px solid var(--border-soft); border-radius: var(--r-sm); background: var(--panel-2); margin-bottom: 8px; overflow: hidden; }
.trade-row-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; flex-wrap: wrap; }
.trade-row-head:hover { background: rgba(0, 0, 0, 0.03); }
.trade-when { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.trade-instr { font-size: 12.5px; font-weight: 600; color: var(--text); }
.trade-dir { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); text-transform: uppercase; letter-spacing: .05em; }
.trade-dir.long { color: var(--g-held, #7ecf9c); border-color: var(--g-held, #7ecf9c); }
.trade-dir.short { color: var(--g-missed, #d98a8a); border-color: var(--g-missed, #d98a8a); }
.trade-r { font-size: 13px; font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.trade-r.pos { color: var(--g-held, #7ecf9c); }
.trade-r.neg { color: var(--g-missed, #d98a8a); }
.trade-chip { font-size: 10.5px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.trade-chip.warn { color: var(--g-missed, #d98a8a); border-color: var(--g-missed, #d98a8a); }
.trade-row-detail { padding: 4px 12px 12px; border-top: 1px solid var(--border-soft); }
.trade-detail-line { font-size: 12.5px; margin: 6px 0; color: var(--text); }
.trade-detail-line strong { color: var(--text-dim); font-weight: 600; }
.trade-notes { font-size: 13px; line-height: 1.6; color: var(--text); margin: 8px 0; }
.trade-shot { max-width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); margin-top: 10px; display: block; }
.md-embed { max-width: 100%; max-height: 480px; border-radius: var(--r-sm); border: 1px solid var(--border); margin: 10px 0; display: block; background: #fff; }

/* ---------- Food-tab: eetlog-dashboard per dag ---------- */

.trade-form .span2 { grid-column: span 2; }
.food-chart-hint { font-size: 11px; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }
.wt-summary { font-size: 12px; color: var(--text-dim); margin: -4px 0 10px; }
.wt-summary b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.wt-row { display: grid; margin-top: 4px; box-sizing: border-box; }
.wt-in {
  width: 100%; min-width: 0; box-sizing: border-box;
  background: rgba(0,0,0,0.04); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 10.5px; text-align: center; padding: 4px 1px;
  font-variant-numeric: tabular-nums;
}
.wt-in::placeholder { color: var(--text-dim); opacity: .55; }
.wt-in:focus { outline: none; border-color: rgba(25,25,25,.35); background: rgba(0,0,0,0.06); }
.wt-in.today { border-color: rgba(25,25,25,.3); }
.food-days-title { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); margin: 26px 0 12px; }

.food-day { padding: 14px 16px; }
.food-day-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.food-date { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; margin-right: auto; }
.food-chip { font-size: 10.5px; color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.food-chip.dim { color: var(--text-dim); }
.food-status { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.food-goal-bar { height: 6px; background: var(--border-soft); border-radius: 999px; overflow: hidden; margin: 4px 0 12px; }
.food-goal-bar span { display: block; height: 100%; background: linear-gradient(90deg, #4a4a46, #171717); border-radius: 999px; transform-origin: left center; animation: rank-grow .7s cubic-bezier(.2, .7, .3, 1) backwards; }

.food-item { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.food-item:first-child { border-top: none; }
.food-time { flex: none; width: 42px; font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.food-text { flex: 1 1 240px; font-size: 13px; color: var(--text); line-height: 1.5; }

@media (max-width: 860px) {
  .trade-form .span2 { grid-column: 1 / -1; }
  .food-time { width: auto; }
}
