/* --- Trending rij (boven categorieën) --- */
.trending-row {
  margin: var(--s-3) 0 var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}
.trending-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 var(--s-3);
  display: flex; align-items: center; gap: 6px;
}
.trending-flame { font-size: 14px; }
.trending-scroll {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 4px;
  margin: 0 calc(-1 * var(--s-3));
  padding-left: var(--s-3);
  padding-right: var(--s-3);
}
.trending-scroll::-webkit-scrollbar { height: 3px; }
.trending-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.trending-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .12s, transform .08s, box-shadow .12s;
  position: relative;
}
.trending-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(229,72,29,.08);
}
.trending-card:active { transform: scale(.98); }
.trending-cat {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--track-loose);
  color: var(--text-muted);
}
.trending-cat-ico svg { width: 11px; height: 11px; }
.trending-title-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.trending-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.trending-views {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}
.trend-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(229,72,29,.10);
  color: var(--accent);
  white-space: nowrap;
}
.trend-badge.new {
  background: var(--text);
  color: var(--surface);
}

/* Admin stats trending sectie */
.stats-trending {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.trending-row-item {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: var(--s-3);
  align-items: center;
  padding: 10px var(--s-4);
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.trending-row-item:last-child { border-bottom: 0; }
.trending-row-item:hover { background: var(--surface-2); }
.trending-row-item .trending-cat {
  font-size: 10px;
  color: var(--text-muted);
}
.trending-row-item .trending-title-text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  display: block;
  min-height: 0;
  -webkit-line-clamp: unset;
}
.trending-row-item .trending-views { color: var(--text-2); }

@media (max-width: 600px) {
  .trending-card { flex-basis: 180px; padding: 10px 12px; }
  .trending-title-text { font-size: 13px; }
  .trending-row-item {
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
    gap: 4px 8px;
  }
  .trending-row-item .trending-cat { grid-column: 1 / -1; }
  .trending-row-item .trending-views { grid-column: 1; }
  .trending-row-item .trend-badge { grid-column: 2; grid-row: 2; }
}

/* --- Category chips (pill-style, clean) --- */
.chip-row {
  display: flex; gap: var(--s-2);
  overflow-x: auto;
  padding: var(--s-3) 0 var(--s-4);
  scroll-snap-type: x mandatory;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-6);
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

/* Trending-rij: zelfde nette behandeling, geen zichtbare scrollbalk */
.trending-scroll { scrollbar-width: none; }
.trending-scroll::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer; white-space: nowrap;
  scroll-snap-align: start;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -.005em;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip:active { transform: scale(.97); }
.chip.active {
  background: var(--text); color: var(--surface);
  border-color: var(--text);
}
.chip.accent-active {
  background: var(--accent); color: var(--accent-text);
  border-color: var(--accent);
}
.chip .chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}
.chip.active .chip-count { color: rgba(255,255,255,.7); }
.chip.accent-active .chip-count { color: rgba(255,255,255,.8); }

/* --- Manual grid (clean cards) --- */
.grid-manuals {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card-manual {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  display: flex; flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  animation: card-in .35s cubic-bezier(.2,.7,.2,1) both;
}
.card-manual:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
  color: var(--text);
}
.card-manual:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

/* Cleaner tab: subtiele category-label bovenin */
.card-manual .tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.card-manual .tab-bullet {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.card-manual .tab-num { display: none; }
.card-manual .tab-name {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Thumbnail */
.card-manual .thumb {
  aspect-ratio: 4/5;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-manual .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.card-manual .thumb-empty {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 24px;
}

/* Body */
.card-manual .body {
  padding: var(--s-4);
  flex: 1;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.card-manual .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.005em;
  margin-bottom: var(--s-2);
  color: var(--text);
}
.card-manual .card-filename {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-manual .specs {
  display: grid;
  grid-template-columns: 60px 1fr;
  column-gap: var(--s-3);
  row-gap: 4px;
  font-size: 13px;
  margin-top: auto;
}
.card-manual .specs dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 2px;
  white-space: nowrap;
}
.card-manual .specs dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-manual .tag-row {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.6;
}
.card-manual .tag-row .dot { color: var(--accent); padding: 0 4px; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Badges (compact, subtle) --- */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  font-weight: 500;
}
.tag {
  display: inline-block;
  padding: 1px 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
}

/* --- Search input --- */
.search-input {
  flex: 1;
  max-width: 480px;
  padding: 9px 14px;
  min-height: 38px;
  border-radius: var(--r-1);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

/* --- Empty / toast / modal --- */
.empty {
  text-align: center;
  padding: var(--s-12) var(--s-4);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-2);
  margin: var(--s-4) 0;
  background: var(--surface);
}

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text); color: var(--surface);
  padding: 11px 18px;
  border-radius: var(--r-1);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, .50);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-lg);
  padding: var(--s-6);
  width: min(560px, 92vw);
}

/* --- Login-card --- */
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow);
  padding: var(--s-8);
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--r-3) var(--r-3) 0 0;
}
.login-stamp {
  position: absolute;
  top: 16px; right: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 3px 8px;
  background: var(--surface-2);
  border-radius: var(--r-1);
}

/* --- Spec list (viewer pane) --- */
.spec-list dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--s-4);
  font-weight: 500;
}
.spec-list dt:first-child { margin-top: 0; }
.spec-list dd {
  margin: 4px 0 0 0;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

/* --- Brand header --- */
.brand {
  display: flex; align-items: baseline; gap: var(--s-3);
}
.brand .word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: var(--track-tight);
  color: var(--text);
}
.brand .word .accent { color: var(--accent); }
.brand .stamp {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: var(--s-3);
  border-left: 1px solid var(--border);
}

/* --- Hamburger button (mobile) --- */
.hamburger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-1);
  padding: 0;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
  transition: background .12s, box-shadow .12s, transform .08s;
}
.hamburger:hover { background: var(--surface-2); }
.hamburger:active { transform: translateY(1px); }
.hamburger span {
  display: block;
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .2s, opacity .2s, top .2s;
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }
.hamburger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* --- Drawer --- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, .50);
  backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  transition: opacity .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.drawer-backdrop.open { opacity: 1; }
.drawer-backdrop[hidden] { display: block; pointer-events: none; opacity: 0; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 330px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 70;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: max(var(--s-4), env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer.open { transform: translateX(0); }
.drawer[hidden] { display: flex; transform: translateX(100%); pointer-events: none; }
.drawer.open[hidden] { pointer-events: auto; }

.drawer-head {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--s-3);
  flex-shrink: 0;
}
.drawer-head .brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: var(--track-tight);
  flex: 1;
  color: var(--text);
}
.drawer-head .brand-word .accent { color: var(--accent); }
.drawer-close {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-1);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer-close:hover { background: var(--surface-2); }
.drawer-close:active { transform: translateY(1px); }

.drawer-list {
  display: flex; flex-direction: column;
  padding: var(--s-2) 0;
  gap: 0;
}
.drawer-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 13px var(--s-5);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  letter-spacing: -.005em;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
}
.drawer-item:last-child { border-bottom: 0; }
.drawer-item:hover { background: var(--surface-2); text-decoration: none; }
.drawer-item:active { background: var(--surface-3); }
.drawer-ico {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--r-1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.drawer-item.drawer-logout .drawer-ico { background: #FEE2E2; color: var(--danger); }

/* Install button scoping */
.btn[data-pwa-install] { display: inline-flex; }
.drawer-item[data-pwa-install]::before { content: none; }

/* Card chevron — desktop hidden, mobile shown via responsive.css */
.card-chevron { display: none; }

/* List-toolbar (sort + group toggle) */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 0 2px var(--s-4);
  margin-top: -8px;
}
.toolbar-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.toolbar-sort .mono { font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--track-loose); text-transform: uppercase; color: var(--text-muted); }
.toolbar-sort select { width: auto; min-height: 34px; padding: 4px 10px; font-size: 13px; }
.toolbar-group { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-2); cursor: pointer; user-select: none; }
.toolbar-group input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* Search-snippet binnen kaart */
.card-snippet {
  margin-top: var(--s-3);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
  padding: 8px 10px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-1);
  font-style: italic;
}
.card-snippet mark { background: var(--accent); color: var(--surface);
  padding: 1px 3px; border-radius: 2px; font-weight: 600; font-style: normal; }

/* Groepering per categorie */
.grid-manuals.grouped { display: flex; flex-direction: column; gap: var(--s-8); }
.category-group { display: flex; flex-direction: column; gap: var(--s-4); }
.category-group-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: var(--track-tight);
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin: 0;
  color: var(--text);
}
.category-group-title .cat-ico { width: 18px; height: 18px; color: var(--accent);
  display: inline-flex; align-items: center; }
.category-group-title .cat-ico svg { width: 100%; height: 100%; }
.category-group-title .cat-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--track-loose); color: var(--text-muted); font-weight: 500;
}
.grid-manuals.nested { gap: var(--s-4); }

/* Empty-state met illustratie */
.empty-state {
  text-align: center;
  padding: var(--s-12) var(--s-4);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-2);
  margin: var(--s-4) 0;
}
.empty-state .empty-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: var(--s-4);
  opacity: .45;
}
.empty-state .empty-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 var(--s-2);
  color: var(--text);
}
.empty-state .empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* Foutcode scanner-pagina */
.scanner-card {
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); box-shadow: var(--shadow);
  padding: var(--s-8) var(--s-6);
}
.scanner-shot {
  display: block; cursor: pointer;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-2);
  padding: var(--s-10) var(--s-4);
  text-align: center;
  background: var(--surface-2);
  transition: border-color .12s, background .12s, transform .08s;
}
.scanner-shot:hover { border-color: var(--accent); background: var(--accent-soft); }
.scanner-shot:active { transform: scale(.99); }
.shot-icon { font-size: 56px; line-height: 1; margin-bottom: var(--s-3); }
.shot-label { font-weight: 600; font-size: 16px; color: var(--text); margin-bottom: 4px; }
.shot-hint { font-size: 11px; color: var(--text-muted); }
.scan-status {
  text-align: center; padding: var(--s-4); margin-top: var(--s-4);
  background: var(--accent-soft); border-radius: var(--r-1);
  color: var(--accent-deep); font-weight: 500;
}
.scanner-codes, .scanner-matches { margin-top: var(--s-6); }
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  text-decoration: none; color: var(--text);
  transition: border-color .12s, background .12s, transform .08s;
}
.match-item:hover { border-color: var(--accent); background: var(--surface-2); text-decoration: none; }
.match-item:active { transform: scale(.99); }
.match-code {
  background: #FEF3C7; color: #92400E; padding: 4px 8px;
  border-radius: var(--r-1); font-weight: 700; flex-shrink: 0;
  border: 1px solid #FDE68A;
}
.match-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.match-info small { color: var(--text-muted); font-size: 12px; }
.match-arrow { color: var(--text-muted); font-size: 20px; }

/* Pull-to-refresh indicator */
#ptr-indicator {
  position: fixed;
  top: calc(max(8px, env(safe-area-inset-top)) + 64px);  /* onder topbar */
  left: 50%;
  --ptr-y: -120px;
  transform: translateX(-50%) translateY(var(--ptr-y));
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  transition: opacity .12s, transform .12s;
  pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
#ptr-indicator.ptr-ready { color: var(--accent); border-color: var(--accent); }
#ptr-indicator.ptr-loading { color: var(--accent); }
.ptr-spin { display: inline-block; animation: ptr-spin 1s linear infinite; }
@keyframes ptr-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Chip + tab icons (Lucide-stijl, currentColor) */
.chip-ico, .tab-ico {
  display: inline-flex; align-items: center;
  width: 14px; height: 14px; vertical-align: middle;
  flex-shrink: 0;
}
.chip-ico svg, .tab-ico svg { width: 100%; height: 100%; }
.chip-ico { color: var(--accent); }
.chip.active .chip-ico { color: var(--surface); }
.chip.accent-active .chip-ico { color: var(--surface); }
.tab-ico { color: var(--accent); }

/* NIEUW / BIJGEWERKT badge op kaart-tab */
.card-badge {
  display: inline-block;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
}

/* --- Detail-pagina (/manual/<uuid>) --- */
.detail-shell { max-width: 760px; }
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow);
  padding: var(--s-8);
}
.detail-head { margin-bottom: var(--s-6); }
.detail-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
  font-weight: 600;
}
.detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: var(--track-tight);
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 var(--s-2);
}
.detail-filename {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-3);
  margin: 0 0 var(--s-6);
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
}
.detail-specs .spec-row { margin: 0; }
.detail-specs dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 2px;
}
.detail-specs dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.detail-section {
  margin: var(--s-6) 0;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.detail-section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 var(--s-4);
  color: var(--text);
  letter-spacing: var(--track-tight);
}
.detail-section-title .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.detail-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
}
.detail-bullets li {
  position: relative;
  padding: 12px 16px 12px 38px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-1);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.detail-bullets li::before {
  content: "→";
  position: absolute;
  left: 14px; top: 12px;
  color: var(--accent);
  font-weight: 700;
}

/* Markdown-rendered notes */
.detail-notes { color: var(--text); font-size: 15px; line-height: 1.6; }
.detail-notes ul, .detail-notes ol { margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px; }
.detail-notes li {
  position: relative;
  padding: 10px 16px 10px 38px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-1);
  list-style: none;
}
.detail-notes li::before {
  content: "→";
  position: absolute;
  left: 14px; top: 10px;
  color: var(--accent);
  font-weight: 700;
}
/* Checkbox-list-items: andere look (geen → maar checkbox) */
.detail-notes li:has(> input.task-check) {
  padding-left: 44px;
}
.detail-notes li:has(> input.task-check)::before { content: ""; }
.detail-notes input.task-check {
  position: absolute;
  left: 14px; top: 12px;
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.detail-notes input.task-check:checked + * ~ * { text-decoration: line-through; opacity: .55; }
.detail-notes li:has(> input.task-check:checked) { opacity: .55; text-decoration: line-through; }
.detail-notes p { margin: 12px 0; }
.detail-notes h1, .detail-notes h2, .detail-notes h3 { font-family: var(--font-display);
  font-weight: 600; margin: 18px 0 8px; letter-spacing: var(--track-tight); }
.detail-notes h1 { font-size: 20px; } .detail-notes h2 { font-size: 17px; } .detail-notes h3 { font-size: 15px; }
.detail-notes a { color: var(--accent); text-decoration: underline; }
.detail-notes strong { font-weight: 700; color: var(--text); }
.detail-notes code { background: var(--surface-3); padding: 1px 6px; border-radius: 3px; font-size: 13px; }

/* Print-friendly */
@media print {
  body { background: white !important; color: black !important; }
  .topbar, .drawer, .drawer-backdrop, .detail-actions, .detail-meta, .toast { display: none !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .detail-card { border: none !important; box-shadow: none !important; padding: 0 !important; }
  .detail-title { color: black !important; font-size: 22pt !important; }
  .detail-category { color: black !important; }
  .detail-specs { background: white !important; border: 1px solid #ccc !important; }
  .detail-notes li { background: white !important; border-left-color: #000 !important; }
  .detail-notes li::before { color: black !important; }
  a { color: black !important; text-decoration: underline !important; }
  .photo-gallery { display: grid !important; gap: 8px !important; }
  .photo-thumb { aspect-ratio: 4/3; page-break-inside: avoid; }
  .tag-pill.error-code { background: white !important; border: 1px solid black !important;
    color: black !important; font-weight: 700; }
  /* Geen URL-toevoeging op links binnen body — links zijn al duidelijk */
  a[href]::after { content: ""; }
}

.detail-description {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre-wrap;
}

.detail-tags {
  margin: var(--s-4) 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tag-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-2);
}

.detail-actions {
  margin: var(--s-8) 0 var(--s-4);
  display: flex; gap: var(--s-3); flex-wrap: wrap;
}
.detail-actions .btn {
  flex: 1;
  min-width: 160px;
  font-size: 15px;
  padding: 13px 20px;
  min-height: 48px;
}

.tag-pill.error-code {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
  font-weight: 600;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.photo-thumb {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
  aspect-ratio: 4/3;
}
.photo-thumb:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: white; font-size: 11px; padding: 18px 8px 6px;
  font-family: var(--font-mono); letter-spacing: var(--track-loose);
}

/* Comments / Q&A */
.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--s-4); }
.comments-empty { color: var(--text-muted); font-size: 14px; margin: 0; padding: var(--s-3) 0;
  text-align: center; }
.comment {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: 10px 14px;
}
.comment.pinned { border-color: var(--accent); background: var(--accent-soft); }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-author { font-weight: 600; font-size: 13px; color: var(--text); }
.comment-time { font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-loose);
  color: var(--text-muted); text-transform: uppercase; }
.comment-pin-badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-loose);
  color: var(--accent); text-transform: uppercase; font-weight: 600; }
.comment-actions { margin-left: auto; display: flex; gap: 4px; }
.comment-btn { background: transparent; border: 0; cursor: pointer;
  width: 24px; height: 24px; border-radius: var(--r-1); color: var(--text-muted);
  font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.comment-btn:hover { background: var(--surface-3); color: var(--text); }
.comment-body { font-size: 14px; line-height: 1.5; color: var(--text); word-wrap: break-word; }

.comment-form { display: flex; flex-direction: column; gap: 8px;
  padding-top: var(--s-3); border-top: 1px solid var(--border); }
.comment-form textarea { resize: vertical; min-height: 60px; font-family: var(--font-body);
  font-size: 14px; line-height: 1.5; }
.comment-form .btn { align-self: flex-end; }

.detail-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--track-loose);
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}

/* Registration mark */
.reg-mark {
  display: inline-block;
  width: 18px; height: 18px;
  position: relative;
}
.reg-mark::before, .reg-mark::after {
  content: ""; position: absolute; background: var(--text);
}
.reg-mark::before { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.reg-mark::after  { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
