/* ============================================================
   NIEUWSKOERIER — Contemporary Sleek (2026)
   Dark-first · Geist · Hairline borders · 12px radius · Glass blur
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@300..700&display=swap');

:root {
  color-scheme: dark light;

  /* Dark (default) */
  --bg:       #0A0A0B;
  --bg-1:    #111113;
  --bg-2:    #17171A;
  --bg-3:    #1F1F23;
  --hover:   #1A1A1D;
  --line:    rgba(255,255,255,0.07);
  --line-2:  rgba(255,255,255,0.11);
  --line-3:  rgba(255,255,255,0.18);

  --fg:       #F5F5F7;
  --fg-2:    #A6A6AD;
  --fg-3:    #6E6E76;
  --fg-4:    #48484E;

  --accent:       #FF4444;
  --accent-hover: #FF6B6B;
  --accent-soft:  rgba(255, 68, 68, 0.12);
  --accent-glow:  rgba(255, 68, 68, 0.22);

  --upvote:   #FF7A2E;
  --downvote: #6E8BFF;
  --success:  #3DDC84;
  --warn:     #F5B942;

  --mesh-a: rgba(255, 68, 68, 0.10);
  --mesh-b: rgba(110, 139, 255, 0.07);

  /* Type */
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, monospace;

  /* Spacing (8pt) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 40px;  --s-8: 56px;
  --s-9: 80px;

  /* Radii */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 120ms;
  --t-mid:  220ms;

  /* Layout */
  --content-w: 1440px;
  --rail-l: 260px;
  --rail-r: 340px;
  --header-h: 56px;

  /* Thread-lijn — SOLID kleur (geen alpha) zodat overlap tussen wrapper-border
     en child-::before-border visueel identiek is. Subtiel genoeg op donkere bg. */
  --thread-line: #2C2C2F;
}

[data-theme="light"] {
  color-scheme: light;
  --bg:       #FFFFFF;
  --bg-1:    #FAFAFA;
  --bg-2:    #F4F4F5;
  --bg-3:    #EDEDEE;
  --hover:   #F7F7F8;
  --line:    rgba(0,0,0,0.07);
  --line-2:  rgba(0,0,0,0.11);
  --line-3:  rgba(0,0,0,0.18);

  --fg:       #0A0A0B;
  --fg-2:    #52525B;
  --fg-3:    #8E8E96;
  --fg-4:    #B5B5BC;

  --accent:       #E11D48;
  --accent-hover: #BE123C;
  --accent-soft:  rgba(225, 29, 72, 0.08);
  --accent-glow:  rgba(225, 29, 72, 0.15);

  --mesh-a: rgba(225, 29, 72, 0.06);
  --mesh-b: rgba(59, 130, 246, 0.05);

  --thread-line: #E1E1E4;
}

* { box-sizing: border-box; }

/* iOS Safari auto-zoom voorkomen: mobiel inputs min. 16px
   Met !important omdat `font: inherit` op .search input / .composer__field
   anders de font-size naar 14px duwt en iOS alsnog inzoomt. */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select,
  .search input,
  .composer__field {
    font-size: 16px !important;
  }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  font-feature-settings: "cv11", "ss01", "ss03";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}

/* subtle ambient mesh — modern depth, no texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 20% -10%, var(--mesh-a), transparent 60%),
    radial-gradient(900px 500px at 100% 10%, var(--mesh-b), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; letter-spacing: inherit;
}

/* ===============================
   HEADER (sticky glass)
   =============================== */

.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.hdr__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px) 1fr;
  align-items: center;
  gap: var(--s-5);
  padding: 0 var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  flex-shrink: 0;
  min-width: 0;
  transition: opacity var(--t-fast);
}
.brand:hover { opacity: 0.85; }

.brand-mark {
  height: 24px;
  width: 24px;
  color: var(--accent);
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.brand-text {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.022em;
  color: var(--fg);
  white-space: nowrap;
}

.brand__pill {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  padding: 2px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  letter-spacing: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 12px;
  color: var(--fg-2);
  transition: border-color var(--t-fast), background var(--t-fast);
  cursor: text;
}
.search:hover { background: var(--bg-2); }
.search:focus-within {
  border-color: var(--accent);
  background: var(--bg-1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search svg { width: 14px; height: 14px; margin-right: 8px; color: var(--fg-3); flex-shrink: 0; }
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--fg);
  font: inherit;
  letter-spacing: inherit;
}
.search input:focus,
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--fg-3); }
.search .kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  letter-spacing: 0;
}

.hdr__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  justify-content: flex-end;
}
.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-md);
  color: var(--fg-2);
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
}
.icon-btn:hover { background: var(--bg-2); color: var(--fg); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn__dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.btn-ghost {
  padding: 0 12px;
  height: 34px;
  border-radius: var(--r-md);
  color: var(--fg-2);
  font-weight: 500;
  font-size: 13px;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { background: var(--bg-2); color: var(--fg); }

.btn-primary {
  padding: 0 14px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--t-fast);
}
.btn-primary:hover { opacity: 0.88; }

.btn-accent {
  padding: 0 14px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--t-fast);
}
.btn-accent:hover { background: var(--accent-hover); }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF4444, #FF7A2E);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--t-fast);
  border: 0;
}
.avatar:hover { transform: scale(1.05); }

/* =========================
   USER MENU (avatar dropdown)
   ========================= */
.hdr__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.user-menu { position: relative; }
.user-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 0 1px var(--line);
  z-index: 60;
  display: flex; flex-direction: column;
  gap: 1px;
  animation: menuIn 160ms var(--ease) both;
}
[hidden] { display: none !important; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.user-menu__who {
  padding: 10px 12px 8px;
}
.user-menu__sep {
  border: 0; border-top: 1px solid var(--line);
  margin: 4px 0;
}
.user-menu__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  text-align: left;
  width: 100%;
  transition: background var(--t-fast), color var(--t-fast);
  background: transparent;
  border: 0;
  cursor: pointer;
  letter-spacing: inherit;
}
.user-menu__item:hover { background: var(--bg-2); }
.user-menu__item svg { color: var(--fg-3); flex-shrink: 0; }
.user-menu__item--danger { color: var(--accent); }
.user-menu__item--danger:hover { background: var(--accent-soft); }
.user-menu__item--danger svg { color: var(--accent); }

/* ===============================
   SECONDARY BAR (tabs under header)
   =============================== */

.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}
.subnav__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  align-items: stretch;
  gap: var(--s-2);
  overflow-x: auto;
  overflow-y: hidden;          /* geen vertical scroll op mobiel */
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  height: 44px;
}
.subnav__inner::-webkit-scrollbar { display: none; }

.tab {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  padding: 0 12px;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 0 transparent;
  transition: color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  border-radius: 0;
}
.tab:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.tab.is-active {
  color: var(--fg);
  box-shadow: inset 0 -2px 0 0 var(--fg);   /* binnen de box = niet clippable */
}

/* ===============================
   SHELL (responsive 3-col)
   =============================== */

.shell {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: var(--s-6) var(--s-5) var(--s-9);
  display: grid;
  grid-template-columns: var(--rail-l) minmax(0, 1fr) var(--rail-r);
  gap: var(--s-6);
  align-items: start;
}

.rail-left, .rail-right {
  position: sticky;
  top: calc(var(--header-h) + 44px + var(--s-4));
  align-self: start;             /* groeit niet mee met grid-cell */
  /* Geen eigen scrollbar: sidebars schuiven natuurlijk mee met de pagina.
     Sticky houdt ze zichtbaar tijdens scrollen totdat de feed-bottom ze
     "loslaat". Dit voorkomt de twee-scroll-context verwarring. */
}

.feed { min-width: 0; }

/* ===============================
   LEFT RAIL
   =============================== */

.rail-group { margin-bottom: var(--s-5); }
.rail-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 10px var(--s-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rail-label a { color: var(--fg-3); transition: color var(--t-fast); }
.rail-label a:hover { color: var(--fg); }

.rail-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--fg-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.rail-item:hover { background: var(--bg-2); color: var(--fg); }
.rail-item.is-active { background: var(--bg-2); color: var(--fg); }
.rail-item.is-active::before {
  content: "";
  width: 3px; height: 16px;
  background: var(--accent);
  border-radius: 4px;
  margin-left: -13px;
  margin-right: 7px;
}
.rail-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.rail-item .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}

.kdot {
  width: 20px; height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 10px;
  color: white;
  flex-shrink: 0;
}

/* ===============================
   FEED
   =============================== */

.feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
  gap: var(--s-4);
}
.feed__title h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
.feed__title p {
  color: var(--fg-3);
  font-size: 13px;
  margin: 2px 0 0;
}

.seg {
  display: inline-flex;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
}
.seg button {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-3);
  border-radius: 7px;
  transition: all var(--t-fast);
}
.seg button:hover { color: var(--fg); }
.seg button.is-active {
  background: var(--bg-3);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--line-2);
}

/* Sub-periode selector voor Top-sort */
.range-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.range-sub__lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-right: 8px;
  margin-right: 2px;
  border-right: 1px solid var(--line);
}
.range-sub a {
  padding: 4px 10px;
  border-radius: 99px;
  color: var(--fg-3);
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast);
  text-decoration: none;
}
.range-sub a:hover { color: var(--fg); background: var(--bg-2); }
.range-sub a.is-active {
  color: var(--fg);
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

/* Feed-switch: Voor u ↔ Alles op homepage */
.feed-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
  font-size: 13px;
}
.feed-switch a {
  padding: 6px 14px;
  border-radius: 7px;
  color: var(--fg-3);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.feed-switch a:hover { color: var(--fg); }
.feed-switch a.is-active {
  background: var(--bg-3);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--line-2);
}
.feed-switch__badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

/* Post row */
.post {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  transition: background var(--t-fast), transform var(--t-fast);
  position: relative;
}
.post--with-thumb { grid-template-columns: 44px minmax(0, 1fr) 104px; }
.post:hover { background: var(--bg-1); }
.post + .post { margin-top: 2px; }

/* Feed thumbnail (klein, rechts) */
.post__thumb {
  display: block;
  width: 104px;
  height: 76px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
  align-self: flex-start;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform var(--t-fast);
}
.post__thumb:hover { transform: scale(1.02); }
.post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Big media in feed (alleen voor user-uploads en video's) */
.post__media {
  display: block;
  margin: var(--s-3) 0 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  max-height: 520px;
  line-height: 0;
}
.post__media--image img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--bg-2);
  transition: transform var(--t-fast);
}
.post__media--image:hover img { transform: scale(1.01); }
.post__media--video {
  background: #000;
}
.post__media--video video {
  display: block;
  width: 100%;
  max-height: 520px;
  background: #000;
}
@media (max-width: 600px) {
  .post__media { max-height: 420px; }
  .post__media--image img, .post__media--video video { max-height: 420px; }
}

.vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding-top: 2px;
}
.vote button {
  width: 28px; height: 26px;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.vote button:hover { background: var(--bg-2); color: var(--fg); }
.vote button.is-up.is-active { color: var(--upvote); background: color-mix(in srgb, var(--upvote) 14%, transparent); }
.vote button.is-down.is-active { color: var(--downvote); background: color-mix(in srgb, var(--downvote) 14%, transparent); }
.vote button svg { width: 14px; height: 14px; }
.vote__score {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0;
}

.post__body { min-width: 0; }

.post__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-3);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.post__meta .kchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg);
  font-weight: 600;
  font-size: 12.5px;
  padding: 2px 8px 2px 4px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  transition: background var(--t-fast);
}
.post__meta .kchip:hover { background: var(--bg-3); }
.post__meta .kchip .kdot { width: 16px; height: 16px; font-size: 9px; border-radius: 5px; }
.post__meta .dot { color: var(--fg-4); }
.post__meta .author:hover { color: var(--fg); }

.post__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.018em;
  color: var(--fg);
  margin: 0 0 6px;
}
.post__title a:hover { color: var(--accent); }

.post__blurb {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0 0 10px;
  max-width: 68ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post__foot {
  display: flex;
  gap: var(--s-1);
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}
.post__foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--fg-3);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  font-weight: 500;
}
.post__foot a:hover { background: var(--bg-2); color: var(--fg); }
.post__foot a svg { width: 13px; height: 13px; }

.post__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-2);
  background: var(--bg-2);
  border-radius: var(--r-pill);
}
.post__source .fav {
  width: 18px; height: 18px;
  border-radius: 4px;
  display: block;
  object-fit: cover;
  background: var(--bg-3);
}
.post__source .fav--fb {
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 9.5px;
  color: var(--fg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  letter-spacing: 0.01em;
}
.badge--live { background: var(--accent-soft); color: var(--accent); }
.badge--live::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 1.6s infinite;
}
.badge--analyse { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge--discussie { background: color-mix(in srgb, var(--downvote) 14%, transparent); color: var(--downvote); }
.badge--trust { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); padding: 2px 8px; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 0 5px transparent; }
}

/* ===============================
   RIGHT RAIL
   =============================== */

.panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-3);
}
.panel__head h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.panel__head a {
  font-size: 12px;
  color: var(--fg-3);
  transition: color var(--t-fast);
}
.panel__head a:hover { color: var(--fg); }

.trend-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.trend-row:last-child { border-bottom: 0; }
.trend-row__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  font-weight: 500;
}
.trend-row__body { min-width: 0; }
.trend-row__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.35;
  margin: 0 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trend-row__title:hover { color: var(--accent); }
.trend-row__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
}
.trend-row__spark {
  color: var(--success);
  font-size: 10px;
  font-family: var(--mono);
  white-space: nowrap;
}

/* Reacties-stream (dedicated /reacties page) */
.reacties-stream { margin-top: var(--s-2); }
.reactie-row {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: var(--s-3);
  padding: var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background var(--t-fast);
}
.reactie-row:hover { background: var(--bg-1); }
.reactie-row:last-child { border-bottom: 0; }

.reactie-row__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.reactie-row__body { min-width: 0; }
.reactie-row__meta {
  font-size: 12.5px;
  color: var(--fg-3);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reactie-row__meta strong { color: var(--fg); font-weight: 600; }
.reactie-row__chip {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--fg-2);
  font-size: 11px;
  font-weight: 500;
}
.reactie-row__time { color: var(--fg-3); font-family: var(--mono); font-size: 11px; }
.reactie-row__text {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.55;
  margin: 0 0 8px;
  max-width: 68ch;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reactie-row__media {
  position: relative;
  display: inline-block;
  margin: 0 0 8px;
  max-width: 280px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  line-height: 0;
}
.reactie-row__media img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}
.reactie-row__media-label {
  position: absolute;
  top: 6px; left: 6px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.latest-comment__media {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  margin-left: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.reactie-row__post {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--fg-3);
  font-style: italic;
}
.reactie-row__post svg { color: var(--fg-4); flex-shrink: 0; }
.reactie-row:hover strong { color: var(--accent); }

/* Laatste reacties in right-rail */
.latest-comment {
  display: block;
  padding: 10px 0;
  border-bottom: 1px dotted var(--line);
  color: inherit;
  text-decoration: none;
  transition: background var(--t-fast);
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  border-radius: 4px;
}
.latest-comment:last-child { border-bottom: 0; }
.latest-comment:hover { background: var(--bg-2); }

.latest-comment__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.latest-comment__avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 600;
  font-size: 10px;
  flex-shrink: 0;
}
.latest-comment__who {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.2;
}
.latest-comment__meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.latest-comment__body {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.45;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latest-comment__post {
  font-size: 11px;
  color: var(--fg-3);
  font-style: italic;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latest-comment:hover .latest-comment__who { color: var(--accent); }

/* Agenda */
.agenda-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  font-size: 12.5px;
}
.agenda-row:last-child { border-bottom: 0; }
.agenda-row__time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  padding-top: 1px;
}

.hero-panel {
  padding: var(--s-5);
  background:
    radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-3);
  position: relative;
  overflow: hidden;
}
.hero-panel__kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.hero-panel h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.25;
}
.hero-panel p {
  font-size: 12.5px;
  color: var(--fg-2);
  margin: 0 0 var(--s-3);
  line-height: 1.5;
}

/* ===============================
   POST DETAIL
   =============================== */

.detail {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-5) var(--s-9);
}

/* =========================================================
   POST DETAIL — 2 kolommen: content fills, right-rail rechts
   ========================================================= */
.shell--post {
  grid-template-columns: minmax(0, 1fr) var(--rail-r);
}
.post-detail {
  min-width: 0;
  padding-top: var(--s-2);
}

/* Eyebrow: badge + rubriek + tijd + reacties */
.p-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--fg-3);
  margin-bottom: var(--s-3);
  flex-wrap: wrap;
}
.p-eyebrow__time,
.p-eyebrow__count { font-family: var(--mono); letter-spacing: 0.02em; }

/* Globale kchip (rubriek-pill) — werkt in elke context */
.kchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.kchip:hover { background: var(--bg-3); border-color: var(--line-2); }
.kchip .kdot {
  width: 16px; height: 16px;
  font-size: 9px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Title */
.p-title {
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.028em;
  margin: 0 0 var(--s-3);
  color: var(--fg);
  word-break: break-word;
}
.p-title a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
.p-title a:hover { color: var(--accent); }
.p-title__arrow {
  width: 0.55em; height: 0.55em;
  margin-left: 0.15em;
  opacity: 0.4;
  transition: opacity var(--t-fast), transform var(--t-fast);
  display: inline-block;
  vertical-align: 0.15em;
}
.p-title a:hover .p-title__arrow { opacity: 0.9; transform: translate(2px,-2px); }

/* Subtitle: source + author + trust */
.p-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-3);
}
.p-src {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg-2);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--t-fast);
}
.p-src:hover { background: var(--bg-3); color: var(--fg); border-color: var(--line-2); }
.p-src__fav {
  width: 18px; height: 18px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg-3);
  display: block;
}
.p-src__fav--fb {
  display: grid; place-items: center;
  font-weight: 700; font-size: 10px; color: var(--fg);
}
.p-sub__by a { color: var(--fg); font-weight: 500; text-decoration: none; }
.p-sub__by a:hover { color: var(--accent); }

/* Preview-card voor externe links: klein thumb + excerpt */
.p-preview {
  display: grid;
  grid-template-columns: 120px minmax(0,1fr);
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 0 0 var(--s-5);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), background var(--t-fast);
  align-items: center;
}
.p-preview:hover { border-color: var(--line-2); background: var(--bg-2); }
.p-preview--text { grid-template-columns: 1fr; }
.p-preview__thumb {
  width: 120px; height: 80px;
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-2);
}
.p-preview__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.p-preview__text {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hero-afbeelding boven discussion-body of als prominente foto */
.p-hero {
  margin: 0 0 var(--s-5);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  max-height: 520px;
  border: 1px solid var(--line);
}
.p-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  background: var(--bg);
}
@media (max-width: 600px) {
  .p-hero { max-height: 360px; margin-bottom: var(--s-4); }
  .p-hero img { max-height: 360px; }
}

/* Post-detail video player */
.p-video {
  margin: 0 0 var(--s-5);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  max-height: 640px;
  border: 1px solid var(--line);
  line-height: 0;
}
.p-video video {
  width: 100%;
  max-height: 640px;
  display: block;
  background: #000;
}
@media (max-width: 600px) {
  .p-video { max-height: 420px; margin-bottom: var(--s-4); }
  .p-video video { max-height: 420px; }
}

/* Video-thumb play-overlay in feed */
.post__thumb--video { position: relative; }
.post__thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.28));
  color: #fff;
  pointer-events: none;
}
.post__thumb-play svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  background: rgba(0,0,0,0.45);
  border-radius: 999px;
  padding: 8px 8px 8px 10px;
}
@media (max-width: 600px) {
  .post__thumb-play svg { width: 24px; height: 24px; padding: 6px 6px 6px 8px; }
}

/* Upload-progress balk */
.img-upload__progress {
  margin-top: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.img-upload__bar {
  width: 100%;
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.img-upload__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease;
}
.img-upload__status {
  font-size: 12px;
  color: var(--fg-3);
}
.img-upload__preview video {
  display: block;
  max-width: 100%;
  border-radius: var(--r-md);
  background: #000;
}

/* Action-bar: destructieve variant (verwijder-knop voor OP/admin) */
.bar__item--delete {
  color: var(--fg-3);
  margin-left: auto;
}
.bar__item--delete:hover {
  color: #e5484d;
  background: rgba(229, 72, 77, 0.08);
}

/* Mobiel: nog compacter */
@media (max-width: 600px) {
  .post-detail { padding-top: 0; }
  .p-title { font-size: 22px; letter-spacing: -0.028em; line-height: 1.18; }
  .p-eyebrow { gap: 8px; font-size: 11.5px; margin-bottom: 10px; }
  .p-sub { gap: 8px; font-size: 12.5px; margin-bottom: var(--s-4); padding-bottom: var(--s-3); }
  .p-src { padding: 3px 10px 3px 3px; font-size: 11.5px; }
  .p-src__fav { width: 16px; height: 16px; }
  .p-preview { grid-template-columns: 80px minmax(0,1fr); gap: var(--s-3); padding: var(--s-3); }
  .p-preview__thumb { width: 80px; height: 60px; }
  .p-preview__text { font-size: 13px; -webkit-line-clamp: 3; }
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-3);
  margin-bottom: var(--s-4);
  font-family: var(--mono);
}
.crumb a { transition: color var(--t-fast); }
.crumb a:hover { color: var(--fg); }
.crumb svg { width: 11px; height: 11px; }

.article-meta-top {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--fg-3);
  margin-bottom: var(--s-4);
}

.article-title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-4);
  color: var(--fg);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-5);
  font-size: 12.5px;
  color: var(--fg-3);
  flex-wrap: wrap;
}
.article-meta .by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 500;
}
.article-meta .by .avatar { width: 24px; height: 24px; font-size: 10px; }

.link-card {
  display: grid;
  grid-template-columns: 1fr 180px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s-5);
  transition: border-color var(--t-fast);
}
.link-card:hover { border-color: var(--line-2); }
.link-card__body { padding: var(--s-4); min-width: 0; }
.link-card__domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.link-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--fg);
}
.link-card__desc {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-card__img {
  background: var(--bg-2);
  position: relative;
  min-height: 120px;
  overflow: hidden;
}
.link-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.link-card--no-img { grid-template-columns: 1fr; }

.article-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  margin-bottom: var(--s-5);
}
.article-body p { margin: 0 0 var(--s-4); max-width: 66ch; }
.article-body blockquote {
  margin: var(--s-5) 0;
  padding: var(--s-4);
  background: var(--bg-1);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 17px;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.article-body blockquote cite {
  display: block;
  font-size: 12.5px;
  color: var(--fg-3);
  font-weight: 400;
  font-style: normal;
  margin-top: 10px;
  font-family: var(--mono);
}

/* Action bar */
.bar {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-2);
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: var(--r-pill);
  margin-bottom: var(--s-5);
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.bar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--fg-2);
  border-radius: var(--r-pill);
  transition: all var(--t-fast);
  font-weight: 500;
}
.bar__item:hover { background: var(--bg-2); color: var(--fg); }
.bar__item svg { width: 14px; height: 14px; }
.bar__item.is-up.is-active { background: color-mix(in srgb, var(--upvote) 14%, transparent); color: var(--upvote); }
.bar__item.is-down.is-active { background: color-mix(in srgb, var(--downvote) 14%, transparent); color: var(--downvote); }
.bar__sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }

/* Composer */
.composer {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  margin-bottom: var(--s-6);
  transition: border-color var(--t-fast);
}
.composer:focus-within { border-color: var(--line-3); }
.composer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s-3);
}
.composer__head .who { font-size: 13px; font-weight: 600; }
.composer__head .who small {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 400;
}
.composer__field {
  width: 100%;
  min-height: 80px;
  background: transparent;
  border: 0;
  resize: vertical;
  font: inherit;
  color: var(--fg);
  line-height: 1.5;
  letter-spacing: inherit;
}
.composer__field:focus { outline: none; }
.composer__field::placeholder { color: var(--fg-3); }
.composer__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}
.composer__foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.composer__foot a { color: var(--accent); }

/* Composer media-attach (foto/GIF in comments) */
.composer__attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--fg-3);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms;
}
.composer__attach-btn:hover { background: var(--bg-2); color: var(--fg); border-color: var(--line-2); }
.composer__attach-btn.is-active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.composer__media-preview {
  position: relative;
  margin: var(--s-3) 0 0;
  max-width: 260px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.composer__media-preview img { display: block; width: 100%; max-height: 200px; object-fit: contain; background: var(--bg-2); }
.composer__media-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.composer__media-remove:hover { background: #e5484d; }

.composer__attach {
  margin-top: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  overflow: hidden;
}
.composer__attach-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.composer__attach-tabs button {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  color: var(--fg-3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms;
}
.composer__attach-tabs button.is-active { color: var(--fg); background: var(--bg-1); box-shadow: inset 0 -2px 0 var(--accent); }
.composer__attach-tabs button:hover:not(.is-active) { color: var(--fg); }
.composer__attach-panel { padding: 12px; }

.composer__upload-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-2);
  cursor: pointer;
  color: var(--fg-3);
  font-size: 13px;
  transition: all 120ms;
}
.composer__upload-drop:hover,
.composer__upload-drop.is-drop { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-2)); }
.composer__upload-status { margin-top: 8px; font-size: 12px; color: var(--fg-3); }

.composer__giphy-search {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.composer__giphy-search:focus { outline: none; border-color: var(--accent); }
/* Masonry-layout: elke GIF behoudt z'n natuurlijke proporties, geen crop */
.composer__giphy-grid {
  column-count: 3;
  column-gap: 6px;
  margin-top: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.composer__giphy-item {
  display: block;
  width: 100%;
  margin: 0 0 6px 0;
  border: 0;
  padding: 0;
  background: var(--bg-2);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  transition: box-shadow 120ms ease;
  line-height: 0;
}
.composer__giphy-item:hover,
.composer__giphy-item:focus-visible { box-shadow: 0 0 0 2px var(--accent); outline: none; }
.composer__giphy-item img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-2);
}
.composer__giphy-loading,
.composer__giphy-empty {
  column-span: all;
  padding: 20px;
  text-align: center;
  color: var(--fg-3);
  font-size: 13px;
}
@media (min-width: 900px) { .composer__giphy-grid { column-count: 4; } }
@media (max-width: 480px) { .composer__giphy-grid { column-count: 2; } }

/* Paginator (Vorige / Pagina N / Volgende) */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: var(--s-6) 0;
}
.pager .btn-ghost { display: inline-flex; }
.pager__spacer { display: inline-block; min-width: 1px; }
.pager__n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}
@media (max-width: 600px) {
  .pager { gap: 8px; }
  .pager .btn-ghost { padding: 8px 12px; font-size: 13px; }
  .pager__n { font-size: 11px; }
}

/* YouTube embed in comment / post */
.yt-embed {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  margin: 10px 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Afbeelding in gerenderde comment */
.c__img {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  line-height: 0;
  transition: transform 120ms;
}
.c__img img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 320px;
  height: auto;
  object-fit: contain;
  background: var(--bg-2);
}
.c__img:hover { transform: scale(1.005); }
.char-count {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  transition: color var(--t-fast);
  letter-spacing: 0;
}
.char-count--warn { color: var(--accent); }
.cmd-hint { font-family: var(--mono); letter-spacing: 0; }

/* ===============================
   COMMENTS
   =============================== */

.comments-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-4);
}
.comments-head h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.comments-head h2 .count { color: var(--fg-3); font-weight: 500; margin-left: 6px; }

.c-sort {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
}
.c-sort button,
.c-sort a {
  display: inline-block;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  border-radius: 6px;
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.c-sort button:hover,
.c-sort a:hover { color: var(--fg); }
.c-sort button.is-active,
.c-sort a.is-active { background: var(--bg-3); color: var(--fg); box-shadow: 0 0 0 1px var(--line-2); }

.thread {
  padding: 10px 0 8px;
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 44px + 20px);
  min-width: 0;
}
.c { min-width: 0; }
.thread + .thread { border-top: 1px solid var(--line); }
.thread .thread + .thread { border-top: 0; }

/* Target-reactie: subtiele wash BINNEN de comment (Reddit/YouTube stijl).
   Geen outline, geen halo — korte flash die wegvaagt naar een zachte tint.
   z-index:2 zodat thread-curve/lijn niet over de bg paint. */
.thread:target > .c {
  position: relative;
  z-index: 2;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  animation: targetFlash 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes targetFlash {
  0%   { background: color-mix(in srgb, var(--accent) 22%, transparent); }
  60%  { background: color-mix(in srgb, var(--accent) 11%, transparent); }
  100% { background: color-mix(in srgb, var(--accent) 5%, transparent); }
}

/* Nested comments — wrapper-approach (Reddit/YouTube patroon)
   - .thread__replies heeft border-left  = DE thread-lijn
   - elke child ::before = curved L van de border naar het child-avatar
   - laatste visible child krijgt box-shadow = "gummt" de border daaronder weg
   - opake kleur zodat overlap tussen wrapper-border en child-curve-border
     niet compounded alpha geeft (geen visuele kink aan de joint) */
.thread__replies {
  position: relative;
  margin-left: calc(var(--avx, 14px) - 1px);    /* border-center = avx = avatar-center */
  padding-left: 22px;
  border-left: 2px solid var(--thread-line);
}

/* --avs = avatar-size, --avx = avatar-center-x. Beide variëren per depth. */
.thread { --avs: 28px; --avx: 14px; }
.thread:is([data-depth="1"],[data-depth="2"]) { --avs: 22px; --avx: 11px; }
.thread:is([data-depth="3"],[data-depth="4"],[data-depth="5"]) { --avs: 20px; --avx: 10px; }
.thread:is([data-depth="6"],[data-depth="7"],[data-depth="8"],[data-depth="9"],[data-depth="10"],[data-depth="11"],[data-depth="12"]) { --avs: 18px; --avx: 9px; }

/* Doorlopende lijn BINNEN .c van onder avatar tot wrapper-top — zo lijkt de
   lijn te STARTEN vanaf de avatar (Reddit-patroon). */
.thread:has(> .thread__replies):not(.is-collapsed) > .c::after {
  content: "";
  position: absolute;
  left: calc(var(--avx, 14px) - 1px);
  top: calc(var(--avs, 28px) + 4px);
  bottom: 0;
  width: 2px;
  background: var(--thread-line);
  pointer-events: none;
}
.thread__replies > .thread {
  position: relative;
  padding-top: 10px;
}
/* Curve connector: border-left + border-bottom met bottom-left-radius = gladde L.
   Hoogte schaalt met avatar-size zodat curve bij avatar-center eindigt. */
.thread__replies > .thread::before {
  content: "";
  position: absolute;
  left: -24px;        /* terug naar wrapper-border (22 padding + 2 border) */
  top: 0;
  width: 20px;        /* eindigt 4px vóór child-content */
  height: calc(10px + var(--avs, 28px) / 2);   /* padding-top + avatar-center */
  border-left: 2px solid var(--thread-line);
  border-bottom: 2px solid var(--thread-line);
  border-bottom-left-radius: 10px;
  pointer-events: none;
}

/* De "last visible"-truc: box-shadow met offset -24 paint een rechthoek
   van 24px breed LINKS van dit element, in de bg-kleur. Dit verbergt
   de wrapper-border vanaf dit element naar beneden. Zo stopt de lijn
   precies bij de laatste reply, net als Reddit. */
.thread__replies > .thread:last-child,
.thread__replies > .thread:has(+ .thread.thread--hidden) {
  box-shadow: -24px 0 0 0 var(--bg);
}

/* Klikbare zone over de border (voor thread-inklappen) */
.thread__gutter {
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 20px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}
.thread__replies:has(> .thread__gutter:hover),
.thread__replies:has(> .thread__gutter:focus-visible) {
  border-left-color: var(--fg-3);
}
.thread__replies:has(> .thread__gutter:hover) > .thread::before,
.thread__replies:has(> .thread__gutter:focus-visible) > .thread::before {
  border-left-color: var(--fg-3);
  border-bottom-color: var(--fg-3);
}

/* Ingeklapt: wrapper inclusief alle kinderen verbergen */
.is-collapsed > .thread__replies { display: none; }

/* Sibling-cap: threads voorbij de limiet starten hidden tot "Toon N meer" klik */
.thread--hidden { display: none; }

.more-replies {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 6px 0 0 22px;
  padding: 5px 13px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.more-replies:hover {
  background: var(--bg-2);
  color: var(--fg);
  border-color: var(--accent);
}
.more-replies svg { color: var(--accent); transform: rotate(-90deg); }
.more-replies:hover svg { transform: rotate(0); transition: transform 180ms ease; }

/* Reddit-stijl: [-] toggle zit in de action-bar (eerste item),
   uitgelijnd op avatar-center-x zodat de lijn eronder bij 'm start. */
.c { position: relative; }
.c__toggle {
  flex-shrink: 0;
  flex-grow: 0;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  aspect-ratio: 1 / 1;                           /* forceer perfecte cirkel */
  margin-left: calc(var(--avx, 14px) - 10px);   /* toggle-center = avx */
  margin-right: 6px;
  padding: 0;
  border: 1px solid var(--fg-3);
  border-radius: 50%;
  background: var(--bg);                         /* maskeert de lijn erachter */
  color: var(--fg-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;                                    /* boven de .c::after lijn */
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.c__toggle::before {
  content: "−";
  display: block;
  line-height: 1;
  width: 1em;
  text-align: center;
}
.is-collapsed > .c > .c__actions > .c__toggle::before { content: "+"; }

/* Downvoted + ingeklapt: vervang rond "+" door tekst-pill "Reactie lezen".
   Maakt duidelijk dat deze comment bewust verstopt is maar leesbaar. */
.is-collapsed.is-downvoted > .c > .c__actions > .c__toggle {
  width: auto;
  aspect-ratio: auto;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.is-collapsed.is-downvoted > .c > .c__actions > .c__toggle::before {
  content: "Reactie lezen";
  width: auto;
}
.c__toggle:hover { background: var(--bg-2); color: var(--fg); border-color: var(--fg-2); }
.is-collapsed > .c > .c__actions > .c__toggle { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 60%, var(--fg-3)); }

/* Ingeklapt-staat: verberg body/actions/children, toon "X verborgen" */
.c__meta-hidden { display: none; color: var(--accent); font-weight: 500; }
.is-collapsed > .c > .c__head .c__meta-hidden { display: inline; }
/* Ingeklapt: body + overige actions + children weg, alleen head + toggle zichtbaar */
.is-collapsed > .c > .c__body,
.is-collapsed > .thread-continue { display: none; }
.is-collapsed > .c > .c__actions > :not(.c__toggle) { display: none; }

/* Downvoted (score ≤ -4): permanent gemuted body wanneer die ZICHTBAAR is.
   Dus na handmatig uitklappen (of bij Nieuw/Oud waar niet auto-collapsed wordt)
   zie je wel de tekst maar in lichte kleur als "deze is gedownvote"-signaal. */
.is-downvoted > .c > .c__body { opacity: 0.55; }
.is-downvoted > .c > .c__body:hover { opacity: 0.95; }

/* "Continue thread" link bij depth-cap */
.thread-continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: var(--s-2) 0 0 16px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 120ms, border-color 120ms;
}
.thread-continue:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: var(--accent);
}
.thread-continue svg { flex-shrink: 0; }

/* Focus-mode banner (je bekijkt één thread) */
.thread-focus-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--s-4);
  padding: 12px 16px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--r-md);
  font-size: 14px;
}
.thread-focus-notice > div { display: flex; flex-direction: column; gap: 2px; }
.thread-focus-notice span { color: var(--fg-3); font-size: 13px; }
.thread-focus-notice a {
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.thread-focus-notice a:hover { text-decoration: underline; }

/* c-sort: kleine scheider + actieknop */
.c-sort__sep { flex: 1; }
.c-sort__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-3);
  font-size: 13px;
  cursor: pointer;
  transition: all 120ms;
}
.c-sort__action:hover { background: var(--bg-2); color: var(--fg); border-color: var(--line-2); }
.c-sort__action.is-all-collapsed { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

@media (max-width: 600px) {
  .thread__replies { padding-left: 14px; }  /* margin-left komt uit --avx in base */
  .thread__replies > .thread::before { left: -16px; width: 12px; border-bottom-left-radius: 8px; }
  .thread__replies > .thread:last-child,
  .thread__replies > .thread:has(+ .thread.thread--hidden) { box-shadow: -16px 0 0 0 var(--bg); }
  .thread__gutter { left: -6px; width: 14px; }
  .c__toggle { width: 18px; height: 18px; margin-left: calc(var(--avx, 14px) - 9px); margin-right: 4px; font-size: 11px; }
  .thread-focus-notice { flex-direction: column; align-items: flex-start; }

  /* Flat-variant vanaf diepe nesting: compacter maar curve blijft zichtbaar */
  .thread__replies--flat {
    margin-left: 0;
    padding-left: 10px;
    border-left-width: 1px;
  }
  .thread__replies--flat > .thread::before {
    left: -11px;
    width: 9px;
    height: 14px;
    border-left-width: 1px;
    border-bottom-width: 1px;
    border-bottom-left-radius: 6px;
  }
  .thread__replies--flat > .thread:last-child,
  .thread__replies--flat > .thread:has(+ .thread.thread--hidden) {
    box-shadow: -11px 0 0 0 var(--bg);
  }
}

/* Vangnet: welk element ook overrijdt z'n parent, geen page-level scroll */
html, body { overflow-x: clip; }

.c__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.c__avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 600;
  font-size: 10.5px;
  flex-shrink: 0;
}
/* Root-comment iets groter, genest kleiner — visueel duidelijk verschil */
.thread[data-depth="0"] > .c > .c__head > .c__avatar { width: 28px; height: 28px; font-size: 12px; }
.thread[data-depth="3"] > .c > .c__head > .c__avatar,
.thread[data-depth="4"] > .c > .c__head > .c__avatar,
.thread[data-depth="5"] > .c > .c__head > .c__avatar { width: 20px; height: 20px; font-size: 10px; }
.thread:is([data-depth="6"],[data-depth="7"],[data-depth="8"],[data-depth="9"],[data-depth="10"],[data-depth="11"],[data-depth="12"]) > .c > .c__head > .c__avatar {
  width: 18px; height: 18px; font-size: 9.5px;
}
.c__author {
  font-weight: 600;
  color: var(--fg);
  transition: color var(--t-fast);
}
.c__author:hover { color: var(--accent); }
.c__flair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-weight: 600;
  letter-spacing: 0.005em;
}
.c__flair--op { background: var(--accent-soft); color: var(--accent); }
.c__flair--verified { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.c__flair--mod { background: color-mix(in srgb, var(--downvote) 14%, transparent); color: var(--downvote); }
.c__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
}

.c__body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  margin: 0 0 6px;
  /* Lange URLs / emoji-rijen / woorden zonder spaties moeten breken i.p.v.
     de hele pagina horizontaal te laten scrollen op mobiel */
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
/* Body krijgt alleen indent als er een reply-lijn loopt (thread heeft kinderen).
   Zonder replies geen lijn = geen lege strook links van body. */
.thread:has(> .thread__replies) > .c > .c__body {
  padding-left: calc(var(--avs, 28px) + 7px);
}
.c__body p { margin: 0 0 6px; }
.c__body p:last-child { margin-bottom: 0; }
.c__body em {
  color: var(--fg);
  font-style: normal;
  background: var(--bg-2);
  padding: 0 4px;
  border-radius: 3px;
}

.c__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.c__actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 11.5px;
  color: var(--fg-3);
  border-radius: 50px;
  font-weight: 500;
  transition: all var(--t-fast);
}
.c__actions button:hover { background: var(--bg-2); color: var(--fg); }
.c__actions button svg { width: 12px; height: 12px; }
.c__actions button.vote-up.is-active { color: var(--upvote); background: color-mix(in srgb, var(--upvote) 12%, transparent); }
.c__actions .score { font-family: var(--mono); font-weight: 600; color: var(--fg-2); }

/* Mod-acties op reacties (Verwijder / Herstel) */
.c-mod-action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  font-size: 11.5px; font-weight: 500;
  color: var(--fg-3);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  background: transparent;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  margin-left: auto;
}
.c-mod-action:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.c-mod-action svg  { flex-shrink: 0; }

/* Deleted comment — collapsed met expand-reden */
.thread.is-deleted > .c { opacity: 0.72; }
.thread.is-deleted .c__avatar { filter: grayscale(0.6); }

.c-removed {
  margin: 0;
  padding: 0;
}
.c-removed > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  color: var(--fg-3);
  font-size: 12.5px;
  font-style: italic;
  user-select: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.c-removed > summary::-webkit-details-marker { display: none; }
.c-removed > summary:hover { color: var(--fg); background: var(--bg-3); }
.c-removed > summary svg { color: var(--fg-4); transition: transform var(--t-fast); }
.c-removed[open] > summary svg { transform: rotate(90deg); }
.c-removed > summary em { color: var(--fg-4); font-size: 11.5px; font-style: normal; letter-spacing: 0.02em; }

.c-removed__info {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-2);
  border-left: 3px solid var(--line-3);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.55;
}
.c-removed__info p { margin: 0 0 8px; }
.c-removed__info p:last-child { margin-bottom: 0; }

.c-removed__original {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dotted var(--line-2);
}
.c-removed__original small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-4);
  margin-bottom: 6px;
}
.c-removed__original div {
  color: var(--fg-3);
  font-style: italic;
  font-size: 13px;
}

/* ===============================
   MOBILE
   =============================== */

.bottom-bar {
  display: none;
  position: fixed;
  bottom: var(--s-3);
  left: var(--s-3); right: var(--s-3);
  height: 58px;
  background: color-mix(in srgb, var(--bg-1) 85%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  z-index: 100;
  padding: 0 var(--s-3);
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.bottom-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--fg-3);
  font-size: 10px;
  font-weight: 500;
  padding: 6px;
  border-radius: var(--r-md);
  transition: color var(--t-fast);
}
.bottom-bar a.is-active { color: var(--fg); }
.bottom-bar a.is-active svg { color: var(--accent); }
.bottom-bar svg { width: 20px; height: 20px; }

.fab {
  display: none;
  position: fixed;
  right: var(--s-4);
  bottom: 90px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  place-items: center;
  box-shadow: 0 10px 30px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 99;
  transition: transform var(--t-fast);
}
.fab:hover { transform: scale(1.06); }
.fab svg { width: 22px; height: 22px; }

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 1100px) {
  :root { --rail-l: 200px; --rail-r: 280px; }
  .post--with-thumb { grid-template-columns: 44px minmax(0,1fr) 88px; }
  .post__thumb { width: 88px; height: 66px; }
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    gap: var(--s-5);
    padding: var(--s-4) var(--s-4) 120px;
  }
  .rail-left { display: none; }
  .rail-right {
    position: static;
    max-height: none;
    order: 2;
  }
  .feed { order: 1; }

  .hdr__inner {
    grid-template-columns: auto 1fr auto;
    gap: var(--s-3);
  }
  .search { height: 34px; }
  .search .kbd { display: none; }
  /* brand-text + pill blijven zichtbaar: er is plek op mobiel sinds search/bell/bezorg weg zijn */
  .brand-mark { height: 22px; width: 22px; }

  /* Minder items op tablet zodat zoekbalk ruimte krijgt */
  .hdr__bezorg span { display: none; }
  .hdr__bezorg { padding: 0; width: 34px; justify-content: center; }

  .bottom-bar { display: flex; }
  .fab { display: grid; }

  /* Link-card compact ipv full-width banner */
  .link-card { grid-template-columns: 1fr 96px; }
  .link-card__body { padding: var(--s-3); }
  .link-card__title { font-size: 14px; }
  .link-card__domain { font-size: 10.5px; }
  .link-card__desc { -webkit-line-clamp: 2; font-size: 12px; }
  .link-card__img { min-height: 0; }
  .article-title { font-size: 26px; letter-spacing: -0.028em; }

  .bar {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    scrollbar-width: none;
    justify-content: space-between;
  }
  .bar::-webkit-scrollbar { display: none; }
  /* Op mobiel verbergen we alleen de tekstlabels van Delen/Opslaan zodat 5 items passen */
  .bar__item--share .label,
  .bar__item--save  .label,
  .bar__item--delete .label { display: none; }
  .bar__item { padding: 6px 10px; }

}

@media (max-width: 600px) {
  .hdr__inner {
    grid-template-columns: auto 1fr auto;
    gap: var(--s-2);
    padding: 0 var(--s-3);
  }
  /* Op mobiel: zoekbalk uit de header (bottom-nav heeft Zoek) */
  .hdr .search { display: none; }
  /* Notif in bell ook weg — inbox via bottom-nav */
  .hdr__notif { display: none; }
  /* Bezorg verborgen — FAB is aanwezig */
  .hdr__bezorg { display: none; }
  /* Registreren-knop inkorten of verbergen */
  .hdr__actions .btn-ghost.hdr__login { display: none; }

  .detail { padding: var(--s-4) var(--s-3) 120px; }
  /* Edge-to-edge posts + reacties: breken uit de shell-padding voor meer body-ruimte */
  .post,
  .reactie-row {
    margin-left: calc(-1 * var(--s-4));
    margin-right: calc(-1 * var(--s-4));
    border-radius: 0;
  }
  .post {
    grid-template-columns: 36px minmax(0,1fr);
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border-top: 1px solid var(--line);
  }
  .reactie-row { padding: var(--s-3) var(--s-4); }
  .reactie-row__text { font-size: 13.5px; -webkit-line-clamp: 3; }
  .feed > .post:first-of-type,
  .reacties-stream > .reactie-row:first-of-type { border-top: 0; }
  .post + .post { margin-top: 0; }
  .post--with-thumb { grid-template-columns: 36px minmax(0,1fr) 72px; }
  .post__thumb { width: 72px; height: 54px; border-radius: var(--r-sm); }

  /* Meta: dots weg, kleiner, 1 rij waar kan */
  .post__meta { gap: 6px; font-size: 11.5px; }
  .post__meta .sep,
  .post__meta .dot { display: none; }
  .post__meta .kchip { padding: 2px 8px 2px 3px; font-size: 11.5px; }
  .post__meta .kchip .kdot { width: 14px; height: 14px; font-size: 8.5px; border-radius: 4px; }
  .post__meta .author { font-size: 11.5px; }
  .post__meta .post__meta-time { color: var(--fg-3); }

  /* Title: iets kleiner, strakker */
  .post__title { font-size: 15.5px; letter-spacing: -0.015em; line-height: 1.3; }

  /* Blurb: 12px, 2 regels max */
  .post__blurb { font-size: 12.5px; -webkit-line-clamp: 2; margin: 0 0 8px; line-height: 1.45; }

  /* Foot: compact, geen label op Delen */
  .post__foot { gap: 2px; font-size: 11px; flex-wrap: wrap; row-gap: 2px; }
  .post__foot a { padding: 4px 8px; font-size: 11.5px; }
  .post__foot a svg { width: 12px; height: 12px; }
  .post__foot-share .post__foot-label { display: none; } /* alleen icon op mobiel */

  /* Domein-pill: truncate lange domeinen */
  .post__source {
    padding: 2px 8px 2px 3px;
    font-size: 11px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .post__source .fav { width: 14px; height: 14px; }

  /* Trust: shorter text */
  .badge--trust { font-size: 10px; padding: 1px 6px; }
  .badge--trust-long { display: none; } /* alleen "★ 97%" */

  /* Post detail: tighter, copyright-vriendelijke thumb */

  /* Rubriek-head stackt: icon+body rij 1, acties volle breedte rij 2 */
  .rubriek-head {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: var(--s-3);
    gap: var(--s-3);
  }
  .rubriek-head .kdot,
  .rubriek-head > .avatar { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
  .rubriek-head h2 { font-size: 17px; }
  .rubriek-head p  { font-size: 12px; }
  .rubriek-head__actions {
    grid-column: 1 / -1;
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
  }
  .rubriek-head__actions > * {
    flex: 1;
    justify-content: center;
    min-height: 38px;
  }
  /* Legacy: derde kind dat badge is → ook naar nieuwe rij */
  .rubriek-head > .badge:nth-child(3) {
    grid-column: 1 / -1;
    align-self: flex-start;
    justify-self: flex-start;
  }

  /* Post detail: tighter, copyright-vriendelijke thumb */
  .detail { padding: var(--s-4) var(--s-3) 120px; }
  .link-card { grid-template-columns: 1fr 76px; gap: 0; border-radius: var(--r-md); }
  .link-card__body { padding: 10px 12px; }
  .link-card__title {
    font-size: 14px; font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .link-card__domain { margin-bottom: 6px; font-size: 10px; }
  .link-card__desc {
    /* Zichtbaar op mobiel — maar compact */
    font-size: 11.5px;
    -webkit-line-clamp: 2;
    margin: 0;
    line-height: 1.4;
  }
  .link-card__img { min-height: 0; height: auto; }

  /* Meta-top: tighter */
  .article-title { font-size: 22px; letter-spacing: -0.03em; line-height: 1.18; }
  .article-meta-top { gap: 6px; font-size: 11.5px; flex-wrap: wrap; row-gap: 4px; }

  /* Byline: stack ipv wrap */
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 0;
    font-size: 12.5px;
  }
  .article-meta .badge--trust { margin-left: 0 !important; align-self: flex-start; }
  .article-meta .by { font-size: 13px; }

  /* Menu zelf full-width op mobiel */
  .user-menu__panel {
    position: fixed;
    right: var(--s-3);
    left: var(--s-3);
    top: calc(var(--header-h) + 6px);
    min-width: 0;
    max-height: calc(100vh - var(--header-h) - 12px);
    overflow-y: auto;
  }
}

@media (max-width: 420px) {
  .hdr__inner { padding: 0 var(--s-3); gap: var(--s-2); }
  .brand-mark { height: 20px; width: 20px; }
  .brand-text { font-size: 13px; }
  .brand__pill { display: none; } /* pas echt weg op kleinste schermen */

  /* Kleinste schermen: thumb nóg compacter */
  .post { grid-template-columns: 32px minmax(0,1fr); gap: var(--s-2); padding: var(--s-3); margin-left: calc(-1 * var(--s-3)); margin-right: calc(-1 * var(--s-3)); }
  .post--with-thumb { grid-template-columns: 32px minmax(0,1fr) 64px; }
  .post__thumb { width: 64px; height: 48px; }
  .shell { padding-left: var(--s-3); padding-right: var(--s-3); }
  .link-card { grid-template-columns: 1fr 64px; }
  .article-title { font-size: 20px; }
}

/* Load animation */
@media (prefers-reduced-motion: no-preference) {
  .post {
    animation: fade-up 0.5s var(--ease) both;
  }
  .post:nth-child(1) { animation-delay: 0ms; }
  .post:nth-child(2) { animation-delay: 40ms; }
  .post:nth-child(3) { animation-delay: 80ms; }
  .post:nth-child(4) { animation-delay: 120ms; }
  .post:nth-child(5) { animation-delay: 160ms; }
  .post:nth-child(6) { animation-delay: 200ms; }
  .post:nth-child(7) { animation-delay: 240ms; }
  .post:nth-child(8) { animation-delay: 280ms; }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* Focus ring (modern, ring-style) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Scrollbar — subtle */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* ===============================
   TOAST
   =============================== */
.nk-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nk-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.nk-toast--error { border-color: var(--accent); color: var(--accent); }
.nk-toast--ok    { border-color: var(--success); color: var(--success); }

/* Save active state */
[data-save].is-active {
  color: var(--accent) !important;
  background: var(--accent-soft);
}

/* Inline reply composer */
.composer--inline {
  margin-top: var(--s-3);
  margin-bottom: 0;
  padding: var(--s-3);
}
.composer--inline .composer__foot { padding-top: var(--s-2); border-top: 0; display:flex; }
.composer--inline .composer__foot > div { margin-left: auto; display:flex; gap: 6px; }

/* ======================================================================
   AUTH PAGES (login / register)  — split-layout, rich hero
   ====================================================================== */
body.auth-page {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}
body.auth-page::before { display: none; } /* geen globale mesh, hero doet het */

.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* -------- Hero (left) -------- */
.auth__hero {
  position: relative;
  padding: var(--s-7) var(--s-8) var(--s-6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0B0B0D;
  color: #F5F5F7;
  isolation: isolate;
}
.auth__hero-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(45% 55% at 15% 20%, rgba(255, 68, 68, 0.45), transparent 60%),
    radial-gradient(50% 50% at 95% 10%, rgba(255, 122, 46, 0.35), transparent 60%),
    radial-gradient(55% 55% at 80% 95%, rgba(110, 139, 255, 0.35), transparent 65%),
    radial-gradient(60% 45% at 10% 95%, rgba(139, 92, 246, 0.30), transparent 65%);
  filter: blur(40px) saturate(1.1);
  z-index: -2;
  animation: heroDrift 22s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2%, 3%, 0) scale(1.05); }
  100% { transform: translate3d(2%, -1%, 0) scale(1.02); }
}
.auth__hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 30% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 30% 50%, black 20%, transparent 80%);
  z-index: -1;
}

.auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #F5F5F7;
  margin-bottom: auto;
  flex-shrink: 0;
}
.auth__brand .brand-mark { color: #FF4444; width: 28px; height: 28px; }

.auth__hero-body {
  max-width: 520px;
  padding: var(--s-5) 0;
  animation: authRise 0.8s var(--ease) both;
}
@keyframes authRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.auth__kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,68,68,0.14);
  color: #FF7A7A;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}

.auth__title {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 var(--s-4);
  color: #F5F5F7;
}
.auth__dot {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  border-radius: 50%;
  background: #FF4444;
  margin-left: 0.1em;
  vertical-align: 0.12em;
  box-shadow: 0 0 28px rgba(255, 68, 68, 0.55);
  font-style: normal;
}

.auth__lead {
  font-size: 18px;
  color: rgba(245, 245, 247, 0.72);
  line-height: 1.55;
  margin: 0 0 var(--s-6);
  max-width: 480px;
}

/* Features list */
.auth__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
.auth__features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px 14px 0;
}
.auth__features svg {
  width: 20px;
  height: 20px;
  color: #FF7A7A;
  flex-shrink: 0;
  margin-top: 2px;
}
.auth__features strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #F5F5F7;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.auth__features span {
  display: block;
  font-size: 13px;
  color: rgba(245, 245, 247, 0.6);
  line-height: 1.45;
}

/* Stats row */
.auth__stats {
  display: flex;
  gap: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.auth__stat { display: flex; flex-direction: column; gap: 2px; }
.auth__stat-num {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #F5F5F7;
}
.auth__stat-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(245,245,247,0.55);
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: lowercase;
}

.auth__hero-foot {
  display: flex;
  gap: var(--s-4);
  padding-top: var(--s-5);
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(245,245,247,0.45);
  letter-spacing: 0.04em;
}
.auth__hero-foot a {
  color: inherit;
  transition: color var(--t-fast);
}
.auth__hero-foot a:hover { color: #F5F5F7; }

/* -------- Form panel (right) -------- */
.auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  background: var(--bg);
}
.auth__panel-inner {
  width: 100%;
  max-width: 420px;
  animation: authRise 0.8s var(--ease) 0.1s both;
}

.auth__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--fg-3);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  padding: 6px 0;
  margin-bottom: var(--s-5);
  transition: color var(--t-fast);
}
.auth__back:hover { color: var(--fg); }

.auth__h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.1;
}
.auth__sub {
  color: var(--fg-3);
  margin: 0 0 var(--s-5);
  font-size: 14px;
  line-height: 1.55;
}

.auth__form .form-field { margin-bottom: var(--s-4); }
.auth__form .form-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  margin-bottom: 6px;
}
.auth__forgot {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--fg-3);
  text-decoration: none;
  transition: color var(--t-fast);
}
.auth__forgot:hover { color: var(--accent); }

/* Field-status (live username-availability) */
.field-status {
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: color var(--t-fast), opacity var(--t-fast);
}
.field-status[data-state="checking"] { color: var(--fg-3); }
.field-status[data-state="ok"]       { color: var(--success); }
.field-status[data-state="bad"]      { color: var(--accent); }

/* Shake animatie voor error alerts */
.form-alert--shake { animation: alertShake 0.35s cubic-bezier(.36,.07,.19,.97); }
@keyframes alertShake {
  10%, 90%  { transform: translateX(-2px); }
  20%, 80%  { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60%  { transform: translateX(5px); }
}
.auth__form .form-field input {
  width: 100%;
  padding: 13px 14px;
  /* 16px op mobiel voorkomt auto-zoom in iOS Safari */
  font-size: 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--fg);
  font-family: inherit;
  letter-spacing: inherit;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.auth__form .form-field input:hover:not(:focus) { border-color: var(--line-2); }
.auth__form .form-field input:focus {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth__form .form-field input::placeholder { color: var(--fg-4); }
@media (min-width: 768px) {
  .auth__form .form-field input { font-size: 14.5px; }
}

/* Password strength meter */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  height: 16px;
}
.pw-strength__track {
  flex: 1;
  height: 4px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
}
.pw-strength__bar {
  height: 100%;
  width: 0;
  background: var(--fg-3);
  transition: width 0.35s var(--ease), background 0.35s var(--ease);
  border-radius: 99px;
}
.pw-strength__label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  min-width: 52px;
  text-align: right;
}

/* Remember-me checkbox */
.auth__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s-3);
  font-size: 13px;
  color: var(--fg-2);
  cursor: pointer;
  user-select: none;
}
.auth__remember input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  cursor: pointer;
  position: relative;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.auth__remember input[type="checkbox"]:hover { border-color: var(--line-3); }
.auth__remember input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.auth__remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8 7 12 13 4'/></svg>") center/contain no-repeat;
}

/* Loading state op submit */
.auth__submit[disabled] {
  opacity: 0.7;
  cursor: wait;
}
.auth__submit .spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth__submit {
  width: 100%;
  padding: 14px 16px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--r-md);
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--t-fast), transform var(--t-fast);
  margin-top: var(--s-2);
  letter-spacing: inherit;
}
.auth__submit:hover { background: var(--accent-hover); }
.auth__submit:active { transform: scale(0.98); }
.auth__submit svg { transition: transform var(--t-fast); }
.auth__submit:hover svg { transform: translateX(3px); }

.auth__terms {
  font-size: 11.5px;
  color: var(--fg-3);
  line-height: 1.55;
  margin: var(--s-3) 0 0;
}
.auth__terms a {
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth__terms a:hover { color: var(--accent); }

.auth__alt {
  text-align: center;
  font-size: 13.5px;
  color: var(--fg-3);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.auth__alt a {
  color: var(--fg);
  font-weight: 600;
  margin-left: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.auth__alt a:hover { color: var(--accent); }

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: auto; }
  .auth__hero {
    padding: var(--s-6) var(--s-5) var(--s-5);
    min-height: auto;
  }
  .auth__title { font-size: clamp(32px, 7vw, 44px); }
  .auth__features { grid-template-columns: 1fr; gap: 8px; }
  .auth__features li { padding: 8px 0; }
  .auth__stats { gap: var(--s-5); }
  .auth__hero-foot { flex-wrap: wrap; gap: var(--s-3); }
  .auth__panel { padding: var(--s-5) var(--s-4) var(--s-7); }
}

@media (max-width: 480px) {
  .auth__hero { padding: var(--s-5) var(--s-4) var(--s-4); }
  .auth__hero-body { padding: var(--s-3) 0; }
  .auth__lead { font-size: 15.5px; }
  .auth__stat-num { font-size: 22px; }
  .auth__h2 { font-size: 26px; }
}

/* Legacy auth-shell (nog gebruikt door andere pagina's) */
.auth-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-5) var(--s-9);
}
.auth-shell h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.auth-shell > p {
  color: var(--fg-3);
  margin: 0 0 var(--s-5);
}
.form-field { margin-bottom: var(--s-4); }
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--fg);
  padding: 10px 12px;
  font: inherit;
  letter-spacing: inherit;
  outline: none;
  transition: border-color var(--t-fast);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--line-3);
}
.form-field textarea { min-height: 90px; resize: vertical; }
.form-alert {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: var(--s-4);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.form-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.form-submit:hover { background: var(--accent-hover); }
.form-footer {
  font-size: 13px;
  color: var(--fg-3);
  text-align: center;
  margin-top: var(--s-5);
}
.form-footer a { color: var(--fg); font-weight: 500; }
.form-footer a:hover { color: var(--accent); }

/* Flash (empty state) */
.empty {
  text-align: center;
  padding: var(--s-8) var(--s-4);
  color: var(--fg-3);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
}
.empty h3 {
  color: var(--fg);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

/* Trust-badge tweak */
.badge--trust { white-space: nowrap; }

/* Image upload widget (bezorg + rubriek + profiel) */
.img-upload { display: block; }
.img-upload__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--s-5) var(--s-4);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  color: var(--fg-3);
  text-align: center;
}
.img-upload__drop:hover,
.img-upload__drop.is-drop {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg);
}
.img-upload__drop svg { color: var(--fg-3); transition: color var(--t-fast); }
.img-upload__drop:hover svg { color: var(--accent); }
.img-upload__drop span { font-weight: 500; font-size: 14px; }
.img-upload__drop small { color: var(--fg-3); font-size: 12px; }

.img-upload__preview {
  position: relative;
  display: block;
  width: 100%;
  max-height: 320px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
}
.img-upload__preview img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
.img-upload__remove {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: white;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: background var(--t-fast);
}
.img-upload__remove:hover { background: var(--accent); }

/* Als kdot een background-image heeft: letter weg */
.kdot[style*="background-image"] { color: transparent; font-size: 0; }

/* User-bio op profielpagina */
.user-bio {
  padding: var(--s-3) var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  color: var(--fg);
  line-height: 1.55;
  font-size: 14px;
  margin-bottom: var(--s-5);
}

/* Settings-pagina */
.settings-section {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
}
.settings-section:last-of-type { border-bottom: 0; }
.settings-section h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
}

.avatar-upload {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s-4);
  align-items: start;
}
.avatar-upload__preview {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  transition: opacity var(--t-fast);
  position: relative;
}
.avatar-upload__preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-upload__fb {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 40px;
}
.avatar-upload__actions { padding-top: 8px; }

/* Avatars met foto: de button-letter moet niet zichtbaar zijn als er een img-bg is */
.avatar[style*="background-image"] { color: transparent; }

@media (max-width: 600px) {
  .avatar-upload { grid-template-columns: 72px 1fr; gap: var(--s-3); }
  .avatar-upload__preview { width: 72px; height: 72px; }
  .avatar-upload__fb { font-size: 30px; }
}

/* Mod-only remove button op post-card */
.mod-remove {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px;
  font-size: 11.5px; font-weight: 500;
  color: var(--fg-3);
  background: transparent;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
}
.mod-remove:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Koerier preview in create-form */
.rubriek-preview {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.rubriek-preview .preview-dot {
  width: 40px; height: 40px; border-radius: 12px; font-size: 16px;
  transition: background var(--t-fast);
}
.preview-title { font-weight: 600; font-size: 15px; color: var(--fg); }
.preview-sub   { font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); margin-top: 2px; }

/* Color picker */
.color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 32px; height: 32px; border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { border-color: var(--fg); }

/* Form sections op lange forms */
.form-section {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
}
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.form-help {
  color: var(--fg-3); font-size: 13px; margin: 0 0 var(--s-4); line-height: 1.55;
}
.form-tip {
  display: block;
  color: var(--fg-3); font-size: 12px; margin-top: 6px;
}
.form-tip a { color: var(--accent); }
.req { color: var(--accent); }

/* Moderator beheer-pagina */
.mod-section {
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.mod-section:last-child { border-bottom: 0; }
.mod-section h3 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
}
.mod-list { display: flex; flex-direction: column; gap: 2px; }
.mod-list__row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md);
}
.mod-list__row + .mod-list__row { margin-top: 4px; }

/* Officieel-badge */
.official-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
  white-space: nowrap;
}
.official-badge svg { flex-shrink: 0; }

/* Welkom-panel na aanmaak rubriek */
.welcome-panel {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s-4);
  padding: var(--s-4);
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--success) 18%, transparent), transparent 60%),
    var(--bg-1);
  border: 1px solid color-mix(in srgb, var(--success) 40%, var(--line));
  border-radius: var(--r-lg);
  margin-bottom: var(--s-4);
  align-items: center;
}
.welcome-panel__icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 24px;
}
.welcome-panel h3 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px;
}
.welcome-panel p {
  font-size: 13px; color: var(--fg-2); margin: 0; line-height: 1.5;
}

/* Rubriekenpanel regels-lijst */
.rules-list {
  list-style: none; padding: 0; margin: 0;
  counter-reset: r;
  font-size: 13px; line-height: 1.5;
  color: var(--fg);
}
.rules-list li {
  counter-increment: r;
  padding: 6px 0 6px 28px;
  position: relative;
  border-bottom: 1px dotted var(--line);
}
.rules-list li:last-child { border-bottom: 0; }
.rules-list li::before {
  content: counter(r);
  position: absolute;
  left: 0; top: 6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  display: grid; place-items: center;
}

/* Mod row in sidebar */
.mod-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--line);
}
.mod-row:last-child { border-bottom: 0; }
.mod-row:hover .c__author { color: var(--accent); }

/* Rubriek-header op /r/slug pagina (zie ook .rubriek-head later in file) */
.rubriek-head h2 {
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

.rubriek-head__actions {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-shrink: 0;
}

/* Link card hover image */
.link-card__img { background-size: cover; background-position: center; }

/* Submit preview block */
#ogPreview:empty { display: none; }

/* Follow button */
.follow-btn {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  font-weight: 500;
  font-size: 12px;
  color: var(--fg);
  background: transparent;
  transition: all var(--t-fast);
}
.follow-btn:hover { border-color: var(--fg); }
.follow-btn.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ===============================
   MARKDOWN in comment bodies
   =============================== */
.c__body a:not([class*="btn-"]),
.article-body a:not([class*="btn-"]) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.c__body a:not([class*="btn-"]):hover,
.article-body a:not([class*="btn-"]):hover { color: var(--accent-hover); }

.c__body a.mention,
.article-body a.mention {
  color: var(--fg);
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 500;
  font-size: 12.5px;
}
.c__body a.mention:hover,
.article-body a.mention:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.c__body code,
.article-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--fg);
}
.c__body pre,
.article-body pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3);
  overflow-x: auto;
  margin: var(--s-3) 0;
}
.c__body pre code,
.article-body pre code {
  background: transparent;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.c__body blockquote,
.article-body blockquote {
  margin: var(--s-2) 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--fg);
  font-style: italic;
}

/* Search result hit highlight */
mark {
  background: color-mix(in srgb, var(--warn) 22%, transparent);
  color: var(--fg);
  border-radius: 3px;
  padding: 0 2px;
}

/* ===============================
   NOTIFICATIONS
   =============================== */
.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.notif-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
.notif-bucket {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--s-4) 0 var(--s-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.notif {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast);
  position: relative;
  cursor: pointer;
}
.notif:hover { background: var(--bg-1); }
.notif.is-unread {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.notif.is-unread::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 4px;
}
.notif__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.notif__body { min-width: 0; }
.notif__msg {
  font-size: 13.5px;
  color: var(--fg);
  line-height: 1.4;
  margin: 0 0 4px;
}
.notif__msg strong {
  font-weight: 600;
}
.notif__preview {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.45;
  background: var(--bg-2);
  border-left: 3px solid var(--line-2);
  padding: 6px 10px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 6px 0 0;
  max-width: 60ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  text-align: right;
  white-space: nowrap;
  padding-top: 4px;
}
.notif__type {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-weight: 600;
  background: var(--bg-2);
  color: var(--fg-2);
  margin-right: 6px;
}
.notif__type--reply   { background: color-mix(in srgb, var(--downvote) 16%, transparent); color: var(--downvote); }
.notif__type--mention { background: color-mix(in srgb, var(--accent) 16%, transparent);   color: var(--accent); }
.notif__type--comment { background: color-mix(in srgb, var(--success) 16%, transparent);  color: var(--success); }

/* ===============================
   SEARCH
   =============================== */
.search-hero {
  padding: var(--s-5) var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-5);
}
.search-hero input {
  width: 100%;
  font-size: 18px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--fg);
  outline: none;
  font-family: inherit;
  font-weight: 500;
  transition: border-color var(--t-fast);
}
.search-hero input:focus { border-color: var(--accent); }
.search-hero p {
  color: var(--fg-3);
  font-size: 13px;
  margin: var(--s-2) 0 0;
}

.search-result {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}
.search-result:last-child { border-bottom: 0; }
.search-result__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 11.5px;
  color: var(--fg-3);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.search-result__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.search-result__title a { color: var(--fg); }
.search-result__title a:hover { color: var(--accent); }
.search-result__body {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
  margin: 0;
  max-width: 68ch;
}

.search-user {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3);
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.search-user:hover { background: var(--bg-1); }
.search-user .avatar { width: 40px; height: 40px; font-size: 14px; border-radius: 12px; }
.search-user__name { font-weight: 600; color: var(--fg); font-size: 14px; }
.search-user__sub  { font-family: var(--mono); font-size: 11px; color: var(--fg-3); }

/* Rubriek header strip */
.rubriek-head {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-5);
}
.rubriek-head .kdot { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; }
.rubriek-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
.rubriek-head p {
  color: var(--fg-3);
  font-size: 13px;
  margin: 2px 0 0;
}
