/* In de stijl van iOS: systeemkleuren, groepen op een grijze achtergrond, matglas in de balk. Licht en donker volgen
   het apparaat; de knop rechtsboven zet het vast (data-theme op <html>). */
:root {
  --bg: #f2f2f7; --card: #ffffff; --fill: #e9e9ee; --ink: #000000; --soft: #3c3c43cc; --muted: #8e8e93; --sep: #c6c6c8;
  --accent: #007aff; --accent-soft: #007aff18; --live: #34c759; --bar: rgba(249, 249, 249, .78);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1c1c1e; --fill: #2c2c2e; --ink: #ffffff; --soft: #ebebf5bf; --muted: #8e8e93; --sep: #38383a;
  --accent: #0a84ff; --accent-soft: #0a84ff26; --live: #30d158; --bar: rgba(22, 22, 23, .78); --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1c1c1e; --fill: #2c2c2e; --ink: #ffffff; --soft: #ebebf5bf; --muted: #8e8e93; --sep: #38383a;
    --accent: #0a84ff; --accent-soft: #0a84ff26; --live: #30d158; --bar: rgba(22, 22, 23, .78); --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.47 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.top { position: sticky; top: 0; z-index: 5; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep); padding-top: env(safe-area-inset-top); }
.bar { max-width: 860px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 14px; align-items: center; }
.logo { font: 700 22px/1 var(--display); text-decoration: none; letter-spacing: -.03em; }
.logo span { color: var(--accent); }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo b { font-weight: inherit; }
.logo img { border-radius: 8px; }
.search { flex: 1; }
.search input { width: 100%; font: 16px var(--font); color: var(--ink); background: var(--fill); border: 0; border-radius: 10px; padding: 8px 12px 8px 34px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center; }
.search input::placeholder { color: var(--muted); }
.theme { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme svg { width: 18px; height: 18px; }

.title { font: 700 34px/1.15 var(--display); letter-spacing: -.025em; margin: 26px 0 4px; }
.sub { color: var(--muted); margin: 0 0 6px; font-size: 15px; }
.day { margin: 30px 4px 8px; font: 600 13px var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }

/* een groep zoals in Instellingen: witte kaart, regels met een dunne scheidslijn */
.group { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 14px; }
.live { color: var(--live); font-weight: 600; }
.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 5px; vertical-align: 1px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }

/* overzicht */
.now { display: grid; gap: 10px; margin-top: 16px; }
.nowcard { display: block; text-decoration: none; background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--live); }
.nowcard b { display: block; font-size: 17px; margin: 2px 0; }
.nowcard small { color: var(--muted); font-size: 14px; }
.days { display: flex; gap: 8px; overflow-x: auto; margin: 18px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.dayb { flex: none; width: 52px; padding: 8px 0; border: 0; border-radius: 12px; background: var(--card); color: var(--ink); font: 600 19px var(--font); cursor: pointer; box-shadow: var(--shadow); }
.dayb small { display: block; font: 500 11px var(--font); text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.dayb.on { background: var(--accent); color: #fff; }
.dayb.on small { color: #ffffffcc; }
.seg { display: flex; margin-top: 14px; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg button { flex: 1; border: 0; background: none; color: var(--ink); font: 500 14px var(--font); padding: 6px 0; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.item { display: grid; grid-template-columns: 50px 1fr auto auto; gap: 12px; align-items: center; text-decoration: none; padding: 12px 16px; position: relative; }
.item + .item::before { content: ''; position: absolute; top: 0; left: 78px; right: 0; border-top: .5px solid var(--sep); }
.item:hover { background: var(--fill); }
.item .when { font: 600 15px var(--font); font-variant-numeric: tabular-nums; color: var(--soft); }
.item h2 { font: 600 16px/1.3 var(--font); margin: 0; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .meta { margin-top: 2px; font-size: 13px; }
.dots { display: flex; align-items: center; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--card); margin-left: -5px; }
.dots small { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* één debat */
.back { display: inline-flex; gap: 4px; margin-top: 16px; color: var(--accent); text-decoration: none; font-size: 17px; }
.dhead { background: var(--card); border-radius: 18px; padding: 18px 18px 16px; margin-top: 12px; box-shadow: var(--shadow); }
.dhead h1 { font: 700 clamp(24px, 4.5vw, 32px)/1.15 var(--display); letter-spacing: -.025em; margin: 6px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: var(--fill); border-radius: 12px; padding: 9px 12px; }
.stats b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); font-size: 12.5px; }
.share { display: flex; gap: 2px; height: 8px; margin-top: 14px; border-radius: 4px; overflow: hidden; }
.share i { background: var(--c); min-width: 3px; }
.people { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.who { flex: none; display: inline-flex; align-items: center; gap: 7px; font: 500 14px var(--font); color: var(--ink); background: var(--card); border: 0; border-radius: 999px; padding: 5px 13px 5px 6px; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; }
.who:first-child { padding-left: 13px; }
.who small { color: var(--muted); font-weight: 400; }
.who.on { background: var(--accent); color: #fff; }
.who.on small { color: #ffffffcc; }

.av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 600 13px var(--font); letter-spacing: .02em; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.chat { margin-top: 14px; display: grid; gap: 10px; }
.msg { display: flex; gap: 10px; align-items: flex-start; scroll-margin-top: 90px; }
.bub { flex: 1; min-width: 0; background: var(--card); border-radius: 4px 18px 18px 18px; padding: 10px 14px 12px; box-shadow: var(--shadow); }
.msg.interruptie { margin-left: 28px; }
.msg.interruptie .bub { background: var(--fill); }
.by { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.by b { font-weight: 600; }
.by span { color: var(--muted); }
.by a { margin-left: auto; text-decoration: none; }
.by time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.txt p { margin: 5px 0 0; font-size: 16.5px; line-height: 1.5; }
.txt.clip { max-height: 9.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.more { border: 0; background: none; color: var(--accent); font: 500 15px var(--font); padding: 6px 0 0; cursor: pointer; }
.sys { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.4; padding: 2px 30px; scroll-margin-top: 90px; }
.sys time { font-weight: 600; font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.msg:target .bub, .sys:target { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 18px; }
mark { background: var(--accent-soft); color: inherit; border-radius: 4px; padding: 0 2px; font-weight: 600; }

.hits .hit { display: block; text-decoration: none; padding: 13px 16px; position: relative; }
.hits .hit + .hit::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.hits .hit:hover { background: var(--fill); }
.hit h2 { font: 600 16px/1.3 var(--font); margin: 2px 0 0; }
.hit p { margin: 5px 0 0; color: var(--soft); font-size: 15px; }

.empty { color: var(--muted); margin: 40px 4px; }
.foot { margin: 48px auto 40px; font-size: 13px; color: var(--muted); padding-bottom: env(safe-area-inset-bottom); }

@media (max-width: 600px) {
  .title { font-size: 30px; }
  .item { grid-template-columns: 44px 1fr auto; padding: 11px 14px; }
  .item .dots { display: none; }
  .item + .item::before { left: 70px; }
  .av { width: 30px; height: 30px; font-size: 11px; }
  .msg.interruptie { margin-left: 16px; }
  .stats b { font-size: 14px; }
}
