@font-face {
  font-family: "Alaska";
  src: url("fonts/alaska.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- tokens: licht ---------- */
:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #efebe2;
  --sidebar: #efebe2;
  --text: #1b1a17;
  --text-2: #57534b;
  --muted: #6f6a60;          /* 4,77:1 op --bg, 4,52:1 op --sidebar */
  --line: #e4dfd4;
  --accent: #c00d0d;         /* huisstijl: spaarzaam (punt, nu, actief, aandacht) */
  --accent-hover: #960a0a;
  --accent-soft: #fbe3e3;
  --focus: #c00d0d;
  --mark: #fde68a;
  --pos: #15803d;
  --neg: #1b1a17;
  --bubble-mine: #dcf5e3;
  --bubble-theirs: #ffffff;
  /* categorieën: stip of icoon op een tint, altijd met label */
  --c-msg: #2f6fdb;   --t-msg: #e9f0fc;
  --c-work: #7a5af8;  --t-work: #efebfe;
  --c-money: #0e9384; --t-money: #e3f3ef;
  --c-body: #d63e6e;  --t-body: #fcebf1;
  --c-media: #b7791f; --t-media: #fbf1dd;
  --c-home: #64748b;  --t-home: #edf0f4;
  --c-note: #8a6a4f;  --t-note: #f4ede6;
  /* bronnen, gekoppeld aan hun categorie */
  --gmail: var(--c-msg); --whatsapp: var(--c-msg); --slack: var(--c-work); --bunq: var(--c-money);
  --garmin: var(--c-body); --iphone: var(--c-msg); --calendar: var(--c-msg); --homeassistant: var(--c-home);
  --obsidian: var(--c-note); --jira: var(--c-work); --bitbucket: var(--c-work); --confluence: var(--c-work);
  --youtube: var(--c-media); --kobo: var(--c-media); --photos: var(--c-media); --teams: var(--c-work); --outlook: var(--c-work);
  --ytmusic: var(--c-media); --applemusic: var(--c-media); --podcasts: var(--c-media); --contacts: var(--c-msg);
  --err: #c00d0d;
  --viz-1: #2f6fdb;
  --viz-2: #d63e6e;
  --viz-3: #0e9384;
  --viz-other: #b8b2a6;
  --heat-1: #cfe8d2;
  --heat-2: #8ccb95;
  --heat-3: #3e9a4c;
  --heat-4: #1d5b2a;
  --heat-5: #0f3a19;
  --glass: rgb(255 255 255 / 0.72);
  --glass-line: rgb(255 255 255 / 0.8);
  --radius: 14px;
  --shadow: 0 1px 2px rgb(27 26 23 / 0.04);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236f6a60' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");  /* pijltje van een keuzelijst, in --muted */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sidebar-w: 232px;
  --tabbar-space: calc(112px + env(safe-area-inset-bottom));
  font-family: "Alaska", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color-scheme: light;
}

/* ---------- tokens: donker (systeem, of zelf gekozen) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312; --surface: #1d1c1a; --surface-2: #262522; --sidebar: #1a1917;
    --text: #eeeae2; --text-2: #cfc9bd; --muted: #a8a195; --line: #2e2c28;
    --accent: #f25c54; --accent-hover: #ff8078; --accent-soft: #3d1717; --focus: #f25c54;
    --mark: #854d0e; --pos: #4ade80; --neg: #eeeae2; --bubble-mine: #1f3a2a; --bubble-theirs: #262522;
    --c-msg: #7fa6f0; --t-msg: #1c2740; --c-work: #a690fb; --t-work: #251f3d; --c-money: #3cc0ac; --t-money: #12302b;
    --c-body: #ee7299; --t-body: #3a1b26; --c-media: #ddaa4a; --t-media: #342a16; --c-home: #94a3b8; --t-home: #222830;
    --c-note: #c29d7d; --t-note: #2e251d; --err: #f25c54;
    --viz-1: #7fa6f0; --viz-2: #ee7299; --viz-3: #3cc0ac; --viz-other: #5b5a56;
    --heat-1: #173d22; --heat-2: #1f6b33; --heat-3: #3e9a4c; --heat-4: #8ccb95; --heat-5: #cfe8d2;
    --glass: rgb(30 29 27 / 0.72); --glass-line: rgb(255 255 255 / 0.12);
    --shadow: none; color-scheme: dark;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23a8a195' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  --bg: #141312; --surface: #1d1c1a; --surface-2: #262522; --sidebar: #1a1917;
  --text: #eeeae2; --text-2: #cfc9bd; --muted: #a8a195; --line: #2e2c28;
  --accent: #f25c54; --accent-hover: #ff8078; --accent-soft: #3d1717; --focus: #f25c54;
  --mark: #854d0e; --pos: #4ade80; --neg: #eeeae2; --bubble-mine: #1f3a2a; --bubble-theirs: #262522;
  --c-msg: #7fa6f0; --t-msg: #1c2740; --c-work: #a690fb; --t-work: #251f3d; --c-money: #3cc0ac; --t-money: #12302b;
  --c-body: #ee7299; --t-body: #3a1b26; --c-media: #ddaa4a; --t-media: #342a16; --c-home: #94a3b8; --t-home: #222830;
  --c-note: #c29d7d; --t-note: #2e251d; --err: #f25c54;
  --viz-1: #7fa6f0; --viz-2: #ee7299; --viz-3: #3cc0ac; --viz-other: #5b5a56;
  --heat-1: #173d22; --heat-2: #1f6b33; --heat-3: #3e9a4c; --heat-4: #8ccb95; --heat-5: #cfe8d2;
  --glass: rgb(30 29 27 / 0.72); --glass-line: rgb(255 255 255 / 0.12);
  --shadow: none; color-scheme: dark;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23a8a195' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-variant-numeric: tabular-nums; }
a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.mono { font-family: var(--mono); font-size: 0.9em; }
.center { text-align: center; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
code { font-family: var(--mono); font-size: 0.85em; word-break: break-all; }
kbd { font: 0.78rem var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.sr-only, .theme-switch legend {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* bronkleuren */
.src-gmail { --src: var(--gmail); }
.src-whatsapp { --src: var(--whatsapp); }
.src-slack { --src: var(--slack); }
.src-teams { --src: var(--teams); }
.src-outlook { --src: var(--outlook); }
.src-bunq { --src: var(--bunq); }
.src-garmin { --src: var(--garmin); }
.src-iphone { --src: var(--iphone); }
.src-calendar { --src: var(--calendar); }
.src-homeassistant { --src: var(--homeassistant); }
.src-homeassistant.cat-media { --src: var(--c-media); }  /* Apple TV en Sonos */
.src-obsidian { --src: var(--obsidian); }
.src-jira { --src: var(--jira); }
.src-bitbucket { --src: var(--bitbucket); }
.src-confluence { --src: var(--confluence); }
.src-youtube { --src: var(--youtube); }
.src-kobo { --src: var(--kobo); }
.src-photos { --src: var(--photos); }
.src-ytmusic { --src: var(--ytmusic); }
.src-podcasts { --src: var(--podcasts); }
.src-applemusic { --src: var(--applemusic); }
.src-contacts { --src: var(--contacts); }
/* bronicoon (static/bronnen.svg) op de plek van een stip: het logo in zijn merkkleur, geen rondje */
.src-icon { color: var(--src, var(--muted)); }
svg.src-icon { flex: none; background: none; border-radius: 0; }
.logo-gmail { color: #ea4335; } .logo-whatsapp { color: #25d366; } .logo-calendar, .logo-drive, .logo-photos { color: #4285f4; }
.logo-homeassistant { color: #18bcf2; } .logo-obsidian { color: #7c3aed; } .logo-jira, .logo-bitbucket { color: #0052cc; }
.logo-confluence { color: #1868db; } .logo-youtube, .logo-ytmusic { color: #ff0000; } .logo-podcasts { color: #9933cc; } .logo-applemusic { color: #fa2d48; } .logo-wisprflow { color: #7a5af8; }
.logo-outlook { color: #0078d4; } .logo-teams { color: #6264a7; } .logo-garmin { color: var(--text); } .logo-bunq { color: #3394d7; }
.logo-kobo { color: #bf0000; } .logo-iphone { color: #34c759; } .logo-contacts { color: #8e8e93; } .logo-twentemilieu { color: #00a651; } .logo-claude { color: #d97757; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.logo-jira, .logo-bitbucket, .logo-confluence) { color: #4c9aff; }
  :root:not([data-theme="light"]) .logo-teams { color: #7b83eb; }
  :root:not([data-theme="light"]) .logo-kobo { color: #f0443a; }
  :root:not([data-theme="light"]) .logo-obsidian { color: #a88bfa; }
}
:root[data-theme="dark"] :is(.logo-jira, .logo-bitbucket, .logo-confluence) { color: #4c9aff; }
:root[data-theme="dark"] .logo-teams { color: #7b83eb; }
:root[data-theme="dark"] .logo-kobo { color: #f0443a; }
:root[data-theme="dark"] .logo-obsidian { color: #a88bfa; }
svg.badge { width: 16px; height: 16px; }
.item-head svg.badge { width: 20px; height: 20px; margin-top: 8px; }
svg.dot-inline { width: 16px; height: 16px; vertical-align: -3px; }
svg.src-dot { width: 14px; height: 14px; vertical-align: -2px; }
svg.dot-cat { width: 14px; height: 14px; }
.tag.status-klaar, .tag.status-gemerged { background: color-mix(in srgb, var(--pos) 15%, transparent); color: color-mix(in srgb, var(--pos) 60%, var(--text)); }
.tag.status-bezig, .tag.status-open { background: color-mix(in srgb, var(--jira) 15%, transparent); color: color-mix(in srgb, var(--jira) 70%, var(--text)); }

/* ---------- schil: zijbalk (desktop) en glazen tabbalk (iPhone) ---------- */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px;
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: max(12px, env(safe-area-inset-top)); }
body.with-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: max(22px, env(safe-area-inset-top)) 14px 18px;
  background: var(--sidebar); border-right: 1px solid var(--line);
  view-transition-name: sidebar;
}
/* Niets laten krimpen: past het niet (Meer opengeklapt, laag scherm), dan scrolt de zijbalk. Anders kromp het logo
   tot niets en schoof de zoekknop eroverheen. */
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { display: block; min-height: 0; color: var(--text); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; padding: 0 10px 16px; line-height: 1; }
.dot, .page-title::after { color: var(--accent); }
.search-button {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); text-decoration: none;
}
.search-button kbd { margin-left: auto; }
.sidebar a, .sidebar .logout button {
  display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 10px;
  text-decoration: none; color: var(--text-2); font: inherit; font-size: 0.95rem;
}
.sidebar .nav-main, .sidebar .nav-foot { display: flex; flex-direction: column; gap: 2px; }
.sidebar .nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 600; }
.sidebar a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
/* Ingeklapte groep met minder gebruikte pagina's: kleiner en rustiger dan het hoofdmenu */
.nav-more { margin-top: 10px; }
.nav-more summary {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px; cursor: pointer; list-style: none;
  color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: "›"; font-size: 1rem; line-height: 1; transition: transform .15s; }
.nav-more[open] summary::after { transform: rotate(90deg); }
.nav-more summary:hover { color: var(--text); }
.sidebar .nav-more a { min-height: 32px; font-size: 0.88rem; gap: 10px; }
.sidebar .nav-more a .icon { width: 16px; height: 16px; }
.sidebar .logout button { width: 100%; border: 0; background: none; cursor: pointer; }
.sidebar .logout button:hover { color: var(--accent); }
/* iconen in de kleur van hun onderdeel */
.nav-today .icon { color: var(--accent); }
.nav-chat .icon, .nav-people .icon { color: var(--c-msg); }
.nav-week .icon { color: var(--c-work); }
.nav-time .icon, .nav-trends .icon { color: var(--c-money); }
.nav-place .icon { color: var(--c-body); }
.nav-status .icon { color: var(--c-money); }
.nav-data .icon, .nav-settings .icon, .nav-logout .icon, .nav-more .icon { color: var(--c-home); }

.theme-switch { margin: 8px 0 4px; }
.theme-switch fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; background: color-mix(in srgb, var(--text) 7%, var(--sidebar)); border-radius: 10px; }
.segmented button {
  min-height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2);
  font: inherit; font-size: 0.8rem; cursor: pointer;
}
.segmented.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-switch { margin: 0; max-width: 260px; }
.demo-pill, .demo-flag {
  display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; vertical-align: middle;
  background: var(--accent); color: #fff; font: 700 0.7rem/1 var(--mono, ui-monospace, monospace); letter-spacing: 0.06em; text-transform: uppercase;
}
.demo-flag { display: none; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 40px 80px; }
main:focus { outline: none; }
body.bare main { max-width: 440px; padding-top: max(15vh, env(safe-area-inset-top)); }
.page-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 400; line-height: 1; letter-spacing: -0.02em;
  text-transform: lowercase; margin: 4px 0 22px;
}
.page-title::after { content: "."; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: 0 12px 32px rgb(27 26 23 / 0.18), inset 0 1px 0 rgb(255 255 255 / 0.5);
}
.tabbar, .tabbar-search { display: none; }

@media (max-width: 899px) {
  html { scroll-padding-bottom: var(--tabbar-space); }
  body.with-shell { display: block; }
  .sidebar { display: none; }
  .demo-flag { display: block; position: fixed; z-index: 30; top: calc(env(safe-area-inset-top) + 8px); right: max(12px, env(safe-area-inset-right)); margin: 0; text-decoration: none; }
  /* Als app op het beginscherm loopt de wazige rand van de statusbalk (iOS 26) nog een stuk
     onder de veilige zone door: altijd ruimte bovenop de inset, niet max(). */
  main { padding: calc(env(safe-area-inset-top) + 20px) max(16px, env(safe-area-inset-right)) var(--tabbar-space) max(16px, env(safe-area-inset-left)); }
  .tabbar {
    position: fixed; z-index: 20; left: max(12px, env(safe-area-inset-left)); right: calc(88px + env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom)); height: 64px; padding: 5px; border-radius: 32px;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    view-transition-name: tabbar;
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border-radius: 27px; text-decoration: none; font-size: 0.7rem; font-weight: 500; color: var(--text-2); min-width: 0;
  }
  .tabbar a span { white-space: nowrap; }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { background: var(--surface); color: var(--accent); font-weight: 700; }
  .tabbar a[aria-current="page"] .icon { color: var(--accent); }
  .tabbar-search {
    position: fixed; z-index: 20; right: max(12px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--text);
    view-transition-name: tabbar-search;
  }
}
@media (max-width: 379px) {
  /* smal scherm: labels blijven altijd staan, alleen alles iets compacter */
  .tabbar { right: calc(72px + env(safe-area-inset-right)); left: max(8px, env(safe-area-inset-left)); height: 58px; padding: 4px; }
  .tabbar-search { width: 58px; height: 58px; right: max(8px, env(safe-area-inset-right)); }
  .tabbar a { font-size: min(0.66rem, 2.9vw); letter-spacing: -0.01em; }
  .tabbar a .icon { width: 20px; height: 20px; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- pagina-overgangen ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 120ms ease-out both vt-fade-out; }
::view-transition-new(root) { animation: 240ms var(--ease) both vt-rise-in; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise-in { from { opacity: 0; transform: translateY(8px); } }
/* laden: balk bovenin en de oude inhoud gedimd (app.js zet .laden na een klik) */
html.laden::before {
  content: ""; position: fixed; z-index: 1000; top: env(safe-area-inset-top, 0); left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent) 60%, transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: laden-balk 900ms ease-in-out infinite;
}
.tl-main[aria-busy="true"], .people-results[aria-busy="true"] { opacity: .6; transition: opacity 150ms ease 200ms; }
html.laden main { opacity: .55; transition: opacity 200ms ease 150ms; pointer-events: none; }
@keyframes laden-balk { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- meer (iPhone) ---------- */
.more-list { display: flex; flex-direction: column; padding: 4px 0; }
.more-list a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; text-decoration: none; border-top: 1px solid var(--line); }
.more-list a:first-child { border-top: 0; }
.more-theme .theme-switch { margin: 0; }
.more-logout .button { width: 100%; }

/* filters */
.filters { display: grid; gap: 10px; margin-bottom: 18px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 12px; box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; color: inherit; font: inherit; font-size: 1.05rem; padding: 12px 0; outline: none; min-width: 0; }
.search kbd { font: 0.8rem ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 0.9rem;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip small { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--src); }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; width: max-content; }
.more .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 10px; }
.more label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.more select, .more input {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 100%;
}
.more .reset { font-size: 0.9rem; color: var(--muted); padding-bottom: 7px; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* tijdlijn */
.day { margin-bottom: 8px; }
.day-head {
  position: sticky; top: 49px; z-index: 5;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
  margin: 0; padding: 14px 0 6px; background: var(--bg);
}
.day-head::first-letter { text-transform: uppercase; }
.entries { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry > a {
  display: grid; grid-template-columns: 44px 16px 1fr auto; gap: 10px; align-items: baseline;
  padding: 10px 14px; text-decoration: none; color: inherit;
}
.entry > a:hover { background: var(--surface-2); color: inherit; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85rem; }
.badge { width: 10px; height: 10px; border-radius: 50%; background: var(--src); align-self: center; }
.main { display: grid; min-width: 0; }
.who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.found-why { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--text-2); font-size: 0.78rem; }
.suggestion { margin: 0 0 12px; }
.meaning { margin: 0 0 24px; padding: 12px 14px 4px; border: 1px dashed var(--line); border-radius: var(--radius); }
.meaning-head { font-size: 1rem; font-weight: 600; margin: 0 0 6px; }
.pal-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--text-2); font-size: 0.72rem; font-weight: 500; }
.snippet { color: var(--muted); font-size: 0.9rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.value { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.value.pos { color: var(--pos); }
.value.neg { color: var(--neg); }
.clip { font-size: 0.85em; }
.thumbs { display: flex; gap: 6px; padding: 0 14px 10px 78px; overflow-x: auto; }
.thumbs img { height: 72px; border-radius: 8px; display: block; }
.more-wrap { text-align: center; margin-top: 18px; }
.load-more {
  display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none;
}
.load-more[aria-busy="true"] { opacity: 0.5; pointer-events: none; }

/* detailpagina's */
.crumbs { margin-bottom: 10px; font-size: 0.9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.item-head { display: grid; grid-template-columns: 20px 1fr auto; gap: 14px; align-items: start; margin-bottom: 16px; }
.item-head .badge { margin-top: 10px; width: 12px; height: 12px; }
.item-head h1 { font-size: 1.45rem; line-height: 1.25; margin: 2px 0 4px; overflow-wrap: anywhere; }
.item-head h1 a { text-decoration: none; }
.eyebrow { margin: 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.item-head p { margin: 0; }
.amount { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0; }
.amount.pos { color: var(--pos); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h2 { font-size: 1rem; margin: 0 0 10px; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin-top: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: 0.78rem; padding: 1px 8px; margin: 0 4px 2px 0; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 500; }
.body .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.body .ai-answer { margin-top: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li.current a { font-weight: 650; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.media-grid:empty { display: none; }
.media-grid img, .media-grid video { width: 100%; border-radius: 8px; display: block; }
.media-grid audio { width: 100%; grid-column: 1 / -1; }
.files { list-style: none; margin: 10px 0 0; padding: 0; }
.files li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; flex-wrap: wrap; }
.files .dl { margin-left: auto; text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; box-shadow: var(--shadow); }
.stats span { font-size: 0.8rem; color: var(--muted); }
.stats strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); }
.links { color: var(--muted); }

/* chat */
.chat { background: var(--surface-2); }
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bubble-day { align-self: center; font-size: 0.78rem; color: var(--muted); background: var(--surface); padding: 2px 10px; border-radius: 999px; margin: 10px 0 4px; }
.bubble { max-width: min(78%, 520px); padding: 6px 10px 4px; border-radius: 12px; display: grid; gap: 3px; box-shadow: var(--shadow); scroll-margin-top: 120px; }
.bubble.theirs { align-self: flex-start; background: var(--bubble-theirs); border-top-left-radius: 4px; }
.bubble.mine { align-self: flex-end; background: var(--bubble-mine); border-top-right-radius: 4px; }
.bubble.current, .bubble:target { outline: 2px solid var(--accent); }
.bubble .sender { font-size: 0.8rem; font-weight: 650; color: var(--src, var(--whatsapp)); }
.bubble a.sender { justify-self: start; text-decoration: none; }
.bubble a.sender:hover, .bubble a.sender:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.bubble .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble img, .bubble video { max-width: 100%; max-height: 320px; border-radius: 8px; display: block; }
.bubble audio { max-width: 100%; }
.bubble .thread-tag { justify-self: start; font-size: 0.75rem; color: var(--muted); text-decoration: none; }
.bubble a.thread-tag:hover, .bubble a.thread-tag:focus-visible { color: var(--accent); text-decoration: underline; }
.bubble .stamp { justify-self: end; font-size: 0.72rem; color: var(--muted); text-decoration: none; }
.bubble .reactions { justify-self: start; display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 -14px -4px; padding: 1px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.85rem; line-height: 1.4; cursor: default; }
.bubble.mine .reactions { justify-self: end; margin: 0 -4px -14px 0; }
.bubble:has(.reactions) { margin-bottom: 12px; }
.bubble .reactions .n { font-size: 0.72rem; color: var(--muted); margin-left: 2px; }
.chatlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chatlist li + li { border-top: 1px solid var(--line); }
.chatlist a { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; }
.chatlist a:hover { background: var(--surface-2); color: inherit; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--src) 18%, transparent); color: var(--src); font-weight: 700; }

/* status */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.errrow td { border-bottom: 1px solid var(--line); padding-top: 0; }
.block { display: block; }
.dot-inline { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--src); margin-right: 6px; }
.nowrap { white-space: nowrap; }
.state { font-size: 0.78rem; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.state.ok { background: color-mix(in srgb, var(--pos) 16%, transparent); color: color-mix(in srgb, var(--pos) 60%, var(--text)); }
.state.err { background: color-mix(in srgb, var(--err) 16%, transparent); color: color-mix(in srgb, var(--err) 70%, var(--text)); }
.state.busy { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.card:has(.table) { overflow-x: auto; }

@media (max-width: 600px) {
  :root { font-size: 14px; }
  .search kbd { display: none; }
  .entry > a { grid-template-columns: 38px 16px 1fr auto; gap: 8px; padding: 9px 12px; }
  .thumbs { padding-left: 66px; }
  .item-head { grid-template-columns: 10px 1fr; }
  .item-head .amount { grid-column: 2; }
  .item-head .share { grid-column: 2; justify-self: start; }
  .item-head .share-panel { position: static; width: auto; margin-top: 8px; }
  .bubble { max-width: 90%; }
}

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-head .page-title { margin-bottom: 2px; }
.dash-head p { margin: 0; }
.hero { display: grid; text-align: right; }
.hero strong { font-size: 3rem; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.periods { display: flex; gap: 4px; margin: 18px 0 12px; padding: 3px; background: var(--surface-2); border-radius: 10px; width: max-content; max-width: 100%; overflow-x: auto; }
.periods a { text-decoration: none; padding: 5px 12px; border-radius: 8px; color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.periods a[aria-current] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.tile-label { font-size: 0.82rem; color: var(--muted); }
.tile-value { font-size: 1.55rem; font-weight: 650; }
.tile-delta { font-size: 0.8rem; }
.tile-delta.good { color: var(--pos); }
.tile-delta.bad { color: var(--err); }
.tile-delta .muted { font-weight: 400; }
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 760px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.dash-grid .card { min-width: 0; }
.card-head { margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; }
.viz { position: relative; min-height: 40px; }
.viz-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.viz-grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.viz-grid line.viz-base { stroke: var(--muted); stroke-opacity: 0.45; }
.viz-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-end { fill: var(--text); font-size: 12px; font-weight: 600; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { stroke: var(--surface); stroke-width: 2; }
.viz-cross, .viz-hover-dot { visibility: hidden; }
.viz-cross { stroke: var(--muted); stroke-width: 1; }
.crosshair .viz-cross, .crosshair .viz-hover-dot { visibility: visible; }
.viz-hit { fill: transparent; cursor: crosshair; outline: none; }
.viz-hit:focus-visible { stroke: var(--focus); stroke-width: 1; }
.viz-col.hover path { filter: brightness(1.12); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-empty { margin: 16px 0; }
.viz-tip { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .08s;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.14); font-size: 0.82rem; min-width: 90px; }
.viz-tip.on { opacity: 1; }
.viz-tip-title { color: var(--muted); margin-bottom: 3px; }
.viz-tip-row { display: flex; align-items: center; gap: 6px; }
.viz-tip-row strong { font-variant-numeric: tabular-nums; }
.viz-tip-row span:last-child { color: var(--muted); }
.viz-tip-key { width: 10px; height: 2px; border-radius: 1px; flex: none; }
.viz-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.viz-bars li { display: grid; grid-template-columns: minmax(0, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 0.88rem; }
.viz-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.viz-bar-track { height: 12px; display: block; }
.viz-bar { display: block; height: 12px; border-radius: 0 4px 4px 0; }
.viz-bar-value { font-variant-numeric: tabular-nums; color: var(--muted); }
.viz-heat-wrap { overflow-x: auto; }
.viz-heat { fill: var(--surface-2); outline: none; }
.viz-heat.l1 { fill: var(--heat-1); } .viz-heat.l2 { fill: var(--heat-2); } .viz-heat.l3 { fill: var(--heat-3); }
.viz-heat.l4 { fill: var(--heat-4); } .viz-heat.l5 { fill: var(--heat-5); }
a:focus-visible .viz-heat, a:hover .viz-heat { stroke: var(--text); stroke-width: 1.5; }
.viz-heat-scale { display: flex; align-items: center; gap: 3px; justify-content: flex-end; font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.viz-heat-scale span { width: 11px; height: 11px; border-radius: 2px; background: var(--surface-2); }
.viz-heat-scale .l1 { background: var(--heat-1); } .viz-heat-scale .l2 { background: var(--heat-2); }
.viz-heat-scale .l3 { background: var(--heat-3); } .viz-heat-scale .l4 { background: var(--heat-4); }
.viz-heat-scale .l5 { background: var(--heat-5); }
.viz-heat-scale { gap: 3px; } .viz-heat-scale::before { content: none; }
.viz-table { margin-top: 8px; font-size: 0.85rem; }
.viz-table summary { cursor: pointer; color: var(--muted); width: max-content; }
.viz-table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.viz-table th, .viz-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); }
.viz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.agenda li, .memories li { display: block; }
.agenda a, .memories a { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; white-space: normal; }
.agenda .when { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; grid-row: span 2; min-width: 7.5em; }
.agenda .what, .memories .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memories a { grid-template-columns: 3em auto 1fr; align-items: center; }
.memories .year { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
@media (max-width: 600px) { .hero { text-align: left; } .hero strong { font-size: 2.4rem; } }

/* mensen */
/* Zoekvak, keuzelijsten en vinkje op één regel: even hoog, zelfde rand, afronding en schaduw */
.filters:has(> select) { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.filters:has(> select) .search { flex: 1 1 280px; }
.filters > select, .filters .check {
  font: inherit; font-size: 0.92rem; color: var(--text); background-color: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  min-height: 46px; padding: 0 16px;
}
.filters > select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 16px center;
  background-size: 12px 12px;
}
.filters > select:hover, .filters .check:hover { border-color: var(--muted); }
.filters > select:focus-visible { outline: none; border-color: var(--accent); }
.filters .check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.filters .check:has(input:focus-visible) { border-color: var(--accent); }
.filters .check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.people .avatar { --src: var(--muted); }
img.avatar { object-fit: cover; background: var(--surface-2); }
.avatar.big { width: 72px; height: 72px; font-size: 1.8rem; flex: none; }
span.avatar.big, .people span.avatar { background: var(--surface-2); color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 8px; }
.err { color: var(--err); }
.src-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--src); margin-right: 3px; vertical-align: 1px; }
.person-head { display: flex; gap: 18px; align-items: center; margin: 8px 0 18px; }
@media (max-width: 600px) {
  .person-head { align-items: flex-start; gap: 14px; }
  .person-head .avatar.big { width: 52px; height: 52px; font-size: 1.3rem; margin-top: 4px; }
}
.person-head h1 { margin: 0 0 4px; }
.person-head p { margin: 2px 0; }
.src-tag { text-decoration: none; color: var(--src); background: color-mix(in srgb, var(--src) 14%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid-2 > .card { margin: 0; }
.identities { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.identities li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; overflow-wrap: anywhere; }
.identities li > :first-child { grid-column: 1 / -1; }
.months { display: flex; align-items: end; gap: 2px; height: 72px; }
.months .bar { flex: 1; height: max(var(--h), 2px); background: var(--c-msg); border-radius: 4px 4px 0 0; }
.months .bar:hover { opacity: 1; }
.months .bar.zero { height: 2px; background: var(--line); }
.months-axis { display: flex; justify-content: space-between; margin-bottom: 0; }
.section-title { margin: 24px 0 8px; }
.pager { display: flex; justify-content: space-between; margin: 16px 0; }

/* login */
.login { max-width: 380px; margin: 48px auto; }
.login form { display: grid; gap: 8px; margin-top: 12px; }
.login input { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
button.primary, .button { font: inherit; font-weight: 600; color: var(--bg); background: var(--text); border: 0; border-radius: 10px; min-height: 44px; padding: 10px 16px; cursor: pointer; }
button.secondary { font: inherit; font-size: 0.85rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.logout { margin: 0; display: flex; }
form.inline { display: inline; margin: 0; }
button.link { font: inherit; color: var(--muted); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; text-decoration: underline; }
button.link:hover { color: var(--accent); }
.merge-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.merge-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.merge-list li form { margin-left: auto; }
.merge-search { display: flex; gap: 8px; margin-top: 8px; }
/* mogelijk dubbel (/mensen/dubbel): twee personen naast elkaar, reden en knoppen eronder */
.dup-notice { margin: 0 0 12px; }
.dup-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; }
.dup-person { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; text-decoration: none; min-width: 0; }
.dup-person .main { display: grid; min-width: 0; }
.dup-person .who { font-weight: 600; overflow-wrap: anywhere; }
.dup .avatar { --src: var(--muted); }
.dup span.avatar { background: var(--surface-2); color: var(--muted); }
.dup-why { margin: 10px 0 8px; }
.dup-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
/* deellink: knop rechtsboven in de itemkop, paneel eronder (share.py) */
.share { position: relative; }
.share > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.share > summary::-webkit-details-marker { display: none; }
.share[open] > summary { color: var(--accent); }
.share-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(360px, calc(100vw - 32px)); margin: 0; padding: 16px; }
.share-panel h3 { margin: 0 0 2px; font-size: 1rem; }
.share-panel .share-lead { margin: 0 0 16px; color: var(--muted); font-size: 0.87rem; line-height: 1.4; }
.share-field { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.share-field legend { padding: 0; margin-bottom: 6px; font-size: 0.8rem; color: var(--muted); }
.segmented.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.segmented label { position: relative; display: grid; place-items: center; min-height: 34px; border-radius: 8px; color: var(--text-2); font-size: 0.85rem; cursor: pointer; }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(:checked) { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.segmented label:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.share-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.9rem; cursor: pointer; }
.share-check input { margin-top: 3px; accent-color: var(--text); }
.share-check small { display: block; color: var(--muted); font-size: 0.8rem; }
.share-go { width: 100%; }
.share-copy { display: flex; gap: 8px; }
.share-copy input { flex: 1; min-width: 0; font: inherit; font-size: 0.87rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.share-panel .share-meta { margin: 8px 0 12px; }
.ha-links { display: grid; gap: 14px; }
.ha-link label { display: block; font-weight: 600; margin-bottom: 6px; }
.ha-link .share-copy input { height: 38px; }
.share-panel .share-stop-form { padding-top: 10px; border-top: 1px solid var(--line); }
.share-stop { font: inherit; font-size: 0.85rem; color: var(--accent); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.share-stop:hover { text-decoration: underline; }
body.share-page main { max-width: 820px; margin: 0 auto; padding: 32px 20px 56px; }
.share-page .route-map { margin: 0 0 14px; }
.share-page .route-img { width: 100%; height: auto; border-radius: var(--radius); }
.share-foot { margin-top: 24px; text-align: center; }
.share-missing { max-width: 440px; margin: 12vh auto 0; text-align: center; }
.share-missing .share-missing-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 16px; background: var(--surface-2); color: var(--muted); }
.share-missing h1 { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.25; }
.share-missing p { margin: 0 0 10px; color: var(--text-2); line-height: 1.5; }
.share-missing .muted { color: var(--muted); }
.merge-search input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
/* lijstregel: hoofdtekst links (met labels), gegevens rechts */
.list li.row { align-items: baseline; }
.list li.row .row-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 8px; align-items: baseline; }
.list li.row .row-main .src-dot { margin: 0 -4px 0 2px; flex: none; align-self: center; }
.list li.row .row-meta { flex: none; white-space: nowrap; text-decoration: none; }
@media (max-width: 600px) { .list li.row { flex-direction: column; gap: 2px; } }
.report h1 { margin-top: 0; font-size: 1.4rem; }
.report h2 { font-size: 1.05rem; margin: 20px 0 6px; }
.report ul { margin: 0; padding-left: 20px; }
.report li { margin: 3px 0; }

/* foto's */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.photo-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-video { display: grid; place-items: center; height: 100%; font-size: 0.75rem; color: var(--muted); padding: 6px; text-align: center; overflow-wrap: anywhere; }
.photo-page .crumbs { display: flex; gap: 14px; align-items: baseline; }
.card-head.with-link { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head.with-link a { color: var(--muted); text-decoration: none; }
.card-head.with-link a:hover { color: var(--accent); }

/* ---------- alle foto's van iemand ---------- */
.pp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.pp-head .avatar { width: 56px; height: 56px; font-size: 1.4rem; }
.pp-head .page-title { margin: 0; }
.pp-head p { margin: 4px 0 0; }
.pp-years { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 10px 0;
  margin-bottom: 8px; background: var(--bg); scrollbar-width: none; }
.pp-years a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text);
  text-decoration: none; font-size: 0.87rem; }
.pp-years a:hover { color: var(--accent); }
.pp-years .n { color: var(--muted); margin-left: 4px; }
.pp-month { margin-bottom: 26px; scroll-margin-top: 60px; }
.pp-month h2 { font-size: 1.05rem; margin: 0 0 10px; }
.pp-month h2::first-letter { text-transform: uppercase; }
.pp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.pp-grid a { border-radius: 4px; }
.pp-grid img { transition: transform 200ms var(--ease); }
.pp-grid a:hover img { transform: scale(1.04); }
@media (max-width: 600px) { .pp-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; } .pp-grid a { border-radius: 0; } }
.photo-view { margin: 0 0 14px; }
.photo-view img, .photo-view video { max-width: 100%; max-height: 78vh; display: block; margin: 0 auto; border-radius: var(--radius); }

.autorefresh { display: inline-flex; align-items: center; gap: 8px; font-size: 0.87rem; color: var(--text-2); min-height: 44px; cursor: pointer; }
.autorefresh input { width: 18px; height: 18px; accent-color: var(--text); }
.brand-standalone { font-size: 2rem; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 20px 4px; line-height: 1; }
.login .page-title { font-size: 2.2rem; margin-bottom: 12px; }

/* ---------- categorieën ---------- */
.cat-msg { --c: var(--c-msg); --t: var(--t-msg); }
.cat-work { --c: var(--c-work); --t: var(--t-work); }
.cat-money { --c: var(--c-money); --t: var(--t-money); }
.cat-body { --c: var(--c-body); --t: var(--t-body); }
.cat-media { --c: var(--c-media); --t: var(--t-media); }
.cat-home { --c: var(--c-home); --t: var(--t-home); }
.cat-note { --c: var(--c-note); --t: var(--t-note); }
.cat-tile { width: var(--s, 34px); height: var(--s, 34px); flex: none; display: grid; place-items: center; border-radius: calc(var(--s, 34px) * 0.27); background: var(--t); color: var(--c); }
.dot-cat { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* knoppen die een filter aan/uit zetten */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
button.chip { font: inherit; font-size: 0.87rem; min-height: 36px; cursor: pointer; color: var(--text); }
button.chip .n { color: var(--muted); font-size: 0.8rem; }
button.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
button.chip[aria-pressed="true"] .n { color: inherit; opacity: 0.75; }

.round-button {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none;
}
.round-button:hover { color: var(--accent); }

/* ---------- dag ---------- */
.dp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.dp-head .page-title { margin: 6px 0 0; }
.crumbs { display: flex; gap: 8px; font-size: 0.87rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.day-nav { display: flex; align-items: center; gap: 8px; }
.week-strip { display: flex; gap: 3px; padding: 4px; background: var(--surface-2); border-radius: 14px; }
.wd {
  width: 44px; height: 62px; border-radius: 10px; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 2px; padding-bottom: 6px; text-decoration: none; color: var(--text);
}
.wd .bar { width: 16px; height: max(var(--h), 2px); border-radius: 3px; background: color-mix(in srgb, var(--text) 22%, transparent); }
.wd-name { font-size: 0.72rem; color: var(--muted); }
.wd-num { font-size: 0.87rem; font-weight: 600; }
.wd[aria-current="date"] { background: var(--surface); box-shadow: var(--shadow); }
.wd[aria-current="date"] .bar { background: var(--accent); }
.wd.future { opacity: 0.45; }

.day-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; view-transition-name: dag-inhoud; }
.moments { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 8px; }
.moments::before { content: ""; position: absolute; left: 60px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.moment { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 22px; }
.moment[hidden] { display: none; }
.m-time { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); padding-top: 14px; text-align: right; }
.m-card {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); min-width: 0;
  transition: border-color 120ms ease, transform 120ms ease;
}
.m-card:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); color: var(--text); }
.m-card:active { transform: scale(0.99); }
.m-body { display: flex; flex-direction: column; min-width: 0; }
.m-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-sub { font-size: 0.85rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* bundel: kop plus de items zelf, compact en elk klikbaar */
.m-stack { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.m-stack .m-card { border: 0; border-radius: 0; }
.m-stack .m-card:active { transform: none; }
.m-stack > .m-entries, .m-stack > .m-more { padding-left: 60px; padding-right: 8px; }
.m-stack > :last-child { padding-bottom: 8px; }
.m-entries { list-style: none; margin: -4px 0 0; padding: 0; display: flex; flex-direction: column; }
.m-entries a {
  display: flex; align-items: baseline; gap: 8px; min-height: 30px; padding: 4px 8px; margin-left: -8px;
  border-radius: 8px; font-size: 0.87rem; text-decoration: none; color: var(--text-2); min-width: 0;
}
.m-entries a:hover { background: var(--surface-2); color: var(--text); }
.m-entries time { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); flex: none; }
.me-who { font-weight: 500; color: var(--text); flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-more summary { list-style: none; cursor: pointer; font-size: 0.85rem; color: var(--text-2); padding: 4px 0; width: max-content; text-decoration: underline; text-underline-offset: 3px; }
.m-more summary::-webkit-details-marker { display: none; }
.m-more summary:hover { color: var(--text); }
.m-more .when-open, .m-more[open] .when-closed { display: none; }
.m-more[open] .when-open { display: inline; }
.m-more[open] summary { order: 2; }
.m-more[open] { display: flex; flex-direction: column; }
.m-more .m-entries { margin: 0; }
.m-photos { grid-column: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 6px; }
.m-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.empty-state { color: var(--muted); padding: 40px 0; }

.day-summary { margin-bottom: 18px; }
.day-summary .card-head form { margin: 0; }
.ds-text p { margin: 0 0 6px; line-height: 1.5; }
.ds-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 12px 0 6px; }
.ds-picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ds-picks .m-card { min-height: 48px; padding: 8px 12px; }
.ds-picks .m-sub { white-space: normal; }
.day-summary-ask { margin: 0 0 18px; }
.day-start .card-head form { margin: 0; }
.day-start h2 .small { font-weight: 400; margin-left: 6px; }
.ds-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; }
.ds-cols p { margin: 0; line-height: 1.5; }
.ds-cols .ds-kicker { margin-top: 0; }
.ds-cols .ds-kicker a { color: inherit; text-decoration: none; }
.ds-agenda { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.9rem; }
.ds-agenda a { display: inline-flex; gap: 8px; align-items: baseline; text-decoration: none; color: var(--text); min-height: 28px; }
.ds-agenda time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.ds-agenda .past { opacity: 0.5; }
@media (max-width: 699px) { .ds-cols { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

.day-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 20px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat-v { font-size: 1.45rem; line-height: 1.15; }
.stat-k { font-size: 0.78rem; color: var(--muted); }
.side-card { margin: 0; }
.side-card h2 { font-size: 0.95rem; }
.side-big { font-size: 1.6rem; margin: 0; }
.people-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.people-mini a { display: flex; align-items: center; gap: 10px; min-height: 40px; text-decoration: none; }
.people-mini .avatar { width: 30px; height: 30px; font-size: 0.8rem; --src: var(--c-msg); object-fit: cover; }
.pm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-n { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 899px) {
  .day-grid { grid-template-columns: minmax(0, 1fr); }
  .day-side { position: static; }
  .dp-head { align-items: stretch; }
  .day-nav { width: 100%; justify-content: space-between; }
  .week-strip { flex: 1; justify-content: space-between; }
  .wd { width: auto; flex: 1; min-width: 34px; }
  .moment { grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; }
  .moments::before { display: none; }
}

/* door de dagen bladeren: vooruit schuift naar links, terug naar rechts */
html:active-view-transition-type(vooruit) ::view-transition-old(dag-inhoud) { animation: 200ms var(--ease) both vt-out-left; }
html:active-view-transition-type(vooruit) ::view-transition-new(dag-inhoud) { animation: 240ms var(--ease) both vt-in-right; }
html:active-view-transition-type(terug) ::view-transition-old(dag-inhoud) { animation: 200ms var(--ease) both vt-out-right; }
html:active-view-transition-type(terug) ::view-transition-new(dag-inhoud) { animation: 240ms var(--ease) both vt-in-left; }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-40px); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(40px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(40px); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-40px); } }

/* ---------- vandaag ---------- */
.kicker { margin: 0; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.today-head .page-title { margin: 4px 0 0; }
.today-actions { display: flex; gap: 8px; }
.button-ghost {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.92rem;
}
.button-ghost:hover { color: var(--accent); }
.attention { background: color-mix(in srgb, #d97706 12%, var(--surface)); border: 1px solid color-mix(in srgb, #d97706 35%, var(--line)); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; }
.attention p { margin: 4px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dot-warn { width: 8px; height: 8px; border-radius: 50%; background: #d97706; flex: none; }

.now-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.now-card {
  display: flex; flex-direction: column; gap: 4px; min-height: 128px; padding: 16px 18px; border-radius: 16px;
  background: var(--t); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); text-decoration: none; color: var(--text);
  transition: transform 120ms var(--ease);
}
.now-card:hover { color: var(--text); transform: translateY(-1px); }
.now-k { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-2); }
.now-v { font-size: 1.9rem; line-height: 1.1; }
.now-v-text { font-size: 1.25rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.now-s { font-size: 0.85rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-headline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-headline h2 { margin: 0; }
.card-title-big { font-size: 1.6rem !important; font-weight: 400; text-transform: lowercase; }
.card-title-big::after { content: "."; color: var(--accent); }

.river-plot { position: relative; display: flex; flex-direction: column; gap: 4px; }
.lane { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; height: 22px; }
.lane-label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-2); }
.lane-track { position: relative; height: 100%; border-bottom: 1px dashed var(--line); }
.tick { position: absolute; left: calc(var(--x) * 100%); top: 3px; width: 4px; height: 15px; border-radius: 2px; background: var(--c); }
.river-plot::before {
  /* toekomst gearceerd, nu als rode lijn */
  content: ""; position: absolute; top: -4px; bottom: 18px; left: calc(96px + (100% - 96px) * var(--now)); right: 0;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bg) 70%, transparent) 0 6px, transparent 6px 12px);
  border-left: 2px solid var(--accent); pointer-events: none;
}
.river-axis { display: flex; justify-content: space-between; margin-left: 96px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); padding-top: 2px; }

.today-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.summary { list-style: none; margin: 0; padding: 0; }
.summary a { display: grid; grid-template-columns: 30px 88px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 50px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.summary li:first-child a { border-top: 0; }
.sum-label { font-size: 0.87rem; color: var(--text-2); }
.sum-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-n { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.memory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.memory-grid a { position: relative; display: block; text-decoration: none; }
.memory-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.memory-grid span { position: absolute; left: 6px; bottom: 6px; font-family: var(--mono); font-size: 0.75rem; padding: 1px 6px; border-radius: 6px; background: rgb(0 0 0 / 0.6); color: #fff; }

@media (max-width: 1100px) { .now-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .lane { grid-template-columns: 76px minmax(0, 1fr); }
  .river-axis { margin-left: 76px; }
  .river-plot::before { left: calc(76px + (100% - 76px) * var(--now)); }
  .summary a { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .sum-label { display: none; }
}
@media (max-width: 420px) { .now-card { min-height: 112px; padding: 14px; } .now-v { font-size: 1.5rem; } }

/* ---------- tijd (jaar) ---------- */
.year-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.year-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.year-title .page-title { margin: 0; }
.year-title p { margin: 0; }
.years { display: flex; align-items: flex-end; gap: 4px; height: 84px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.years a { flex: 1 0 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: 0.72rem; font-family: var(--mono); }
.years .yb { width: 100%; height: var(--h); border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--text) 22%, transparent); }
.years a:hover .yb { background: color-mix(in srgb, var(--text) 40%, transparent); }
.years a[aria-current="page"] { color: var(--text); font-weight: 600; }
.years a[aria-current="page"] .yb { background: var(--text); }
.months-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; }
.month-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.month-card.future { opacity: 0.6; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.month-head h2 { margin: 0; font-size: 1.3rem; font-weight: 400; }
.month-total { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 22px); gap: 4px; }
.cell { width: 22px; height: 22px; border-radius: 5px; display: block; background: color-mix(in srgb, var(--text) 7%, transparent); }
.cell.pad { background: none; }
.cell.future { background: none; border: 1px dashed var(--line); }
.cell.l1 { background: var(--heat-1); } .cell.l2 { background: var(--heat-2); }
.cell.l3 { background: var(--heat-3); } .cell.l4 { background: var(--heat-4); }
a.cell:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.cell.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.month-peak { margin: 8px 0 0; font-size: 0.8rem; color: var(--text-2); }
.year-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; font-size: 0.82rem; color: var(--text-2); }
.year-legend .cell { width: 14px; height: 14px; border-radius: 3px; }
.year-table { margin-left: auto; }
.year-table summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
@media (max-width: 480px) { .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); } .cell { width: auto; aspect-ratio: 1; height: auto; } }

/* ---------- tijdlijn ---------- */
.tl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tl-head .page-title { margin: 0; }
.views { display: flex; gap: 4px; flex-wrap: wrap; }
.views a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--text-2); font-size: 0.9rem; }
.views a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tl-filters { display: block; margin: 0; }
.tl-bar { margin-bottom: 14px; }
main:has(.tl-layout) { max-width: 1320px; }
.tl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px 34px; gap: 24px; align-items: start; }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.token { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); text-decoration: none; font-size: 0.87rem; color: var(--text); }
.token span { color: var(--muted); font-size: 1rem; }
.token:hover span { color: var(--accent); }
.token-clear { font-size: 0.85rem; color: var(--muted); margin-left: 4px; }

.facets { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.facets > summary { display: none; }
.facet-body { display: flex; flex-direction: column; gap: 14px; }
.facets fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; }
.facets legend { font-size: 0.82rem; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 4px; }
.facet { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 32px; font-size: 0.9rem; cursor: pointer; }
.facet:not(:has(.dot-cat)) { grid-template-columns: 20px minmax(0, 1fr) auto; }
.facet input { width: 16px; height: 16px; margin: 0; accent-color: var(--text); }
.f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-n { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.facet-row { flex-direction: row !important; flex-wrap: wrap; gap: 8px; }
.facet-row legend { width: 100%; }
.facet-row label, .facet-select { display: grid; gap: 2px; font-size: 0.8rem; color: var(--text-2); flex: 1 1 100px; }
.facets input[type="date"], .facets select {
  font: inherit; font-size: 0.87rem; min-height: 36px; padding: 4px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 100%;
}
.facet-more > summary { cursor: pointer; font-size: 0.85rem; color: var(--text-2); min-height: 32px; display: flex; align-items: center; }
.facet-more[open] { display: flex; flex-direction: column; gap: 8px; }
.js .facet-apply { display: none; }  /* met JS filteren wijzigingen direct */
.year-rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.year-rail a { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-decoration: none; min-height: 24px; display: grid; place-items: center; border-radius: 6px; }
.year-rail a:hover, .year-rail a[aria-current] { color: var(--text); background: var(--surface-2); }
.save-view { position: relative; }
.save-view > summary { list-style: none; cursor: pointer; }
.save-view > summary::-webkit-details-marker { display: none; }
.save-view form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; gap: 8px; padding: 10px; width: 320px; max-width: 80vw;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.18); }
.save-view input { font: inherit; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); flex: 1 1 200px; max-width: 320px; }

/* daggroepen: kop blijft bovenaan staan tijdens scrollen */
.timeline .day-head { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-top: 10px; padding-bottom: 6px; margin: 0; }
.timeline .day-head a { text-decoration: none; }
.timeline .day-head a:hover { color: var(--accent); }

@media (max-width: 1100px) { .tl-layout { grid-template-columns: minmax(0, 1fr) 230px; } .year-rail { display: none; } }
@media (max-width: 899px) {
  .tl-layout { grid-template-columns: minmax(0, 1fr); }
  .facets { order: -1; position: static; max-height: none; overflow: visible; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; }
  .facets > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 600; }
  .facets > summary .n { background: var(--text); color: var(--bg); border-radius: 999px; padding: 0 8px; font-size: 0.8rem; }
  .facets[open] { padding-bottom: 14px; }
  .timeline .day-head { top: 0; padding-top: calc(env(safe-area-inset-top) + 12px); }
}

/* ---------- ⌘K ---------- */
.palette {
  width: min(900px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 120px)); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; animation: pal-in 180ms var(--ease); }
.palette::backdrop { background: rgb(20 19 18 / 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(0.99); } }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; min-height: 64px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1.25rem; color: var(--text); }
.pal-close { font: 0.78rem var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: none; min-height: 28px; padding: 0 8px; cursor: pointer; }
.pal-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px; }
.pal-filters:not(:empty) { padding-top: 10px; }
.pal-filter { font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.pal-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; flex: 1; }
.pal-list { overflow-y: auto; padding: 8px; max-height: 480px; border-right: 1px solid var(--line); }
.pal-group + .pal-group { margin-top: 6px; }
.pal-group-name { font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 8px 12px 4px; }
.pal-option { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border-radius: 10px; cursor: pointer; }
.pal-option[aria-selected="true"] { background: var(--surface-2); }
.pal-tile { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--t, var(--surface-2)); color: var(--c, var(--text-2)); }
.pal-text { display: flex; flex-direction: column; min-width: 0; }
.pal-label { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-sub { font-size: 0.8rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-empty { color: var(--muted); padding: 16px 12px; margin: 0; }
.pal-preview { padding: 18px 20px; overflow-y: auto; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.pal-map { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; margin-bottom: 12px; display: block; background: var(--surface-2); }
.pal-p-sub { margin: 0; font-size: 0.8rem; color: var(--text-2); }
.pal-p-title { margin: 4px 0 8px; font-size: 1.35rem; font-weight: 400; line-height: 1.2; }
.pal-p-stat { margin: 0 0 8px; font-size: 1.1rem; }
.pal-p-snippet { margin: 0 0 12px; font-size: 0.9rem; color: var(--text-2); line-height: 1.5; }
.pal-p-link { font-size: 0.9rem; }
.pal-foot { display: flex; gap: 16px; align-items: center; min-height: 42px; padding: 0 20px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--text-2); background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.pal-foot kbd { margin-right: 3px; }
.pal-syntax { margin-left: auto; font-family: var(--mono); }
@media (max-width: 899px) {
  .palette { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0;
    padding-top: calc(env(safe-area-inset-top) + 12px); background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); }
  .pal-body { grid-template-columns: minmax(0, 1fr); }
  .pal-list { max-height: none; border-right: 0; }
  .pal-preview, .pal-foot { display: none; }
  .pal-option { min-height: 52px; }
}
@media (prefers-reduced-transparency: reduce) { .palette { background: var(--surface); } }

/* ---------- kaarten ---------- */
.route-img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--surface-2); }
.route-map { position: relative; margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.route-map picture, .route-map > .route-img { display: block; width: 100%; height: 100%; }
.route-map .route-img { border-radius: 0; height: 100%; object-fit: cover; }
/* specifieker dan .mapboxgl-map (position: relative) uit de CSS van Mapbox, anders heeft de kaart geen hoogte */
.route-map .route-gl, .route-map .route-gl.mapboxgl-map { position: absolute; inset: 0; opacity: 0; transition: opacity 250ms ease; }
.route-map[data-state="live"] .route-gl { opacity: 1; }
.route-map[data-state] .map-activate { display: none; }
.map-activate {
  position: absolute; right: 10px; bottom: 30px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-size: 0.87rem; font-weight: 600; color: var(--text); background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); box-shadow: 0 4px 16px rgb(0 0 0 / 0.2);
}
.route-map[aria-busy="true"]::after { content: "Kaart laden…"; position: absolute; left: 12px; bottom: 12px; font-size: 0.8rem; padding: 2px 8px; border-radius: 6px; background: var(--glass); }
.route-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.35); }
.foto-popup .mapboxgl-popup-content { padding: 8px; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 4px 18px rgb(0 0 0 / 0.25); }
.foto-popup .mapboxgl-popup-tip { display: none; }
.foto-popup .mapboxgl-popup-close-button { display: none; }
.foto-popup-grid { display: grid; grid-template-columns: repeat(3, 72px); gap: 4px; }
.foto-popup-grid:has(> :only-child) { grid-template-columns: 150px; }
.foto-popup-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.foto-popup-meta { margin: 6px 2px 0; max-width: 224px; font-size: 0.8rem; color: var(--muted); }
.m-map { grid-column: 2; margin: 6px 0 0; max-width: 560px; }
/* chat, nieuwste eerst: dagkop blijft staan tijdens scrollen en linkt naar de dag */
.newest-first .bubble-day { position: sticky; top: 8px; z-index: 1; box-shadow: 0 1px 4px rgb(0 0 0 / 0.08); }
.bubble-day a { color: inherit; text-decoration: none; }
.bubble-day a:hover { color: var(--accent); }
.bubbles .more-wrap { align-self: center; list-style: none; margin-top: 12px; }

/* ---------- persoon ---------- */
.ph-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; margin: 8px 0 18px; }
.ph-avatar { width: 104px; height: 104px; font-size: 2.6rem; font-weight: 400; object-fit: cover; --src: var(--c-msg); }
.ph-name { margin: 0; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.ph-name span { display: inline-block; }
.ph-meta { margin: 6px 0 10px; color: var(--text-2); font-size: 0.92rem; }
.ph-channels { display: flex; flex-wrap: wrap; gap: 6px; }
.channel { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--t); color: var(--text); text-decoration: none; font-size: 0.87rem; }
.channel .n { color: var(--text-2); font-size: 0.8rem; }
.channel:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--c); }
.ph-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ph-actions form { margin: 0; }
.ph-actions .button, .ph-actions .button-ghost { width: 100%; justify-content: center; text-align: center; text-decoration: none; display: inline-flex; align-items: center; }
.ph-months .months { height: 96px; }
.ph-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 8px; }
.ph-together .card-title-big { margin: 4px 0 10px; }
.together-day { margin-bottom: 18px; }
.together-day h3 { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.together-day h3 a { text-decoration: none; color: inherit; }
.together-day h3 a:hover { color: var(--accent); }
.together-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.together-list > li + li { border-top: 1px solid var(--line); }
.together-list > li > a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 14px; text-decoration: none; color: var(--text); }
.together-list > li > a:hover { background: var(--surface-2); color: var(--text); }
.together-list .has-entries > .m-entries, .together-list .has-entries > .m-more { padding-left: 56px; padding-right: 8px; }
.together-list .has-entries { padding-bottom: 6px; }
.ph-side { display: flex; flex-direction: column; gap: 12px; }
.ph-side .card { margin: 0; }
.ph-quote { font-size: 1.15rem; line-height: 1.45; margin: 0 0 8px; }
.ph-quote.vault-md { font-size: 1.02rem; }

/* Opgemaakte vaultnotitie (Obsidian-markdown) */
.vault-md { overflow-wrap: anywhere; line-height: 1.55; }
.vault-md > :first-child { margin-top: 0; }
.vault-md > :last-child { margin-bottom: 0; }
.vault-md p, .vault-md ul, .vault-md ol, .vault-md blockquote, .vault-md pre { margin: 0 0 0.75em; }
.vault-md h2, .vault-md h3, .vault-md h4, .vault-md h5, .vault-md h6 { margin: 1.2em 0 0.4em; line-height: 1.25; }
.vault-md h2 { font-size: 1.25rem; } .vault-md h3 { font-size: 1.1rem; } .vault-md h4, .vault-md h5, .vault-md h6 { font-size: 1rem; }
.vault-md ul, .vault-md ol { padding-left: 1.3em; }
.vault-md li { margin: 0.15em 0; }
.vault-md li.task { list-style: none; margin-left: -1.2em; }
.vault-md li.task.done { color: var(--muted); }
.vault-md a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.vault-md a.wikilink { text-decoration-style: dotted; }
.vault-md a.wikilink.extern::after { content: " ↗"; font-size: 0.8em; }
.vault-md .wikilink:not(a) { color: var(--text-2); }
.vault-md code { font-family: ui-monospace, monospace; font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
.vault-md pre { background: var(--surface-2); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.vault-md pre code { background: none; padding: 0; }
.vault-md mark { background: var(--mark); color: inherit; padding: 0 0.15em; border-radius: 3px; }
.vault-md blockquote { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; color: var(--text-2); }
.vault-md blockquote.callout { border-left-color: var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; padding: 8px 12px; }
.vault-md .callout-title { font-weight: 600; color: var(--text); margin-bottom: 0.3em; }
.vault-md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.ph-details > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.ph-details[open] > summary { margin-bottom: 8px; }
@media (max-width: 899px) {
  .ph-head { grid-template-columns: auto minmax(0, 1fr); }
  .ph-avatar { width: 72px; height: 72px; font-size: 1.8rem; }
  .ph-actions { grid-column: 1 / -1; flex-direction: row; }
  .ph-actions > * { flex: 1; }
  .ph-grid { grid-template-columns: minmax(0, 1fr); }
}

/* gedeelde elementen (avatar, naam, dagcel, foto) groeien in één vloeiende beweging mee */
::view-transition-group(*) { animation-duration: 320ms; animation-timing-function: var(--ease); }

/* ---------- plekken ---------- */
/* /plekken: tellers, kaart, de vaste plekken als kaarten, laatst geweest, en per land compacte regels */
.places-stats { max-width: 720px; }
.places-map { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 960 / 360; }
.places-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.places-head { font-size: 1.1rem; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.places-head small { font-size: 0.85rem; font-weight: 400; }
.place-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
@media (max-width: 599px) {  /* twee naast elkaar, anders acht schermvullende kaarten */
  .place-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pc-cover { aspect-ratio: 4 / 3; }
  .pc-name { font-size: 1rem; }
  .place-cards .pl-meta { font-size: 0.78rem; }
}
.place-cards a { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.place-cards a:hover { border-color: color-mix(in srgb, var(--c-body) 45%, var(--line)); color: var(--text); }
.pc-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--t-body); color: var(--c-body); }
.pc-cover img, .pc-cover picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-cover img { object-fit: cover; display: block; }
.pc-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.pc-name { font-size: 1.15rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.85rem; color: var(--text-2); }
.pl-stat { display: inline-flex; align-items: center; gap: 4px; }
.pl-stat .icon { color: var(--muted); }
.place-recent { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.place-recent a { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); white-space: nowrap; }
.place-recent a:hover { border-color: color-mix(in srgb, var(--c-body) 45%, var(--line)); color: var(--text); }
.place-recent small { color: var(--muted); font-size: 0.78rem; }
.places-filter { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 22px 0 0; padding: 10px 0; background: var(--bg); }
.places-filter .search { flex: 1; max-width: 460px; }
.place-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.place-rows a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name when" "meta meta" "bar bar"; gap: 2px 10px; padding: 9px 2px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.place-rows a:hover .pl-name { color: var(--accent); }
.place-rows .pl-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-rows .pl-meta { grid-area: meta; font-size: 0.8rem; color: var(--muted); }
.place-rows .pl-bar { grid-area: bar; height: 3px; border-radius: 2px; background: var(--surface-2); position: relative; overflow: hidden; }
.place-rows .pl-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: max(var(--w), 3px); background: color-mix(in srgb, var(--c-body) 70%, transparent); border-radius: 2px; }
.pl-when { grid-area: when; font-size: 0.8rem; color: var(--muted); }
.place-more { margin-top: 4px; }
.place-more > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; color: var(--muted); }
.place-more[open] > summary { margin-bottom: 4px; }
.plek-zoekt .place-more > summary { display: none; }  /* tijdens zoeken staat alles open: geen "Nog 323 tonen" */
.place-page .ph-name { margin: 6px 0 14px; }
.place-stats { max-width: 520px; margin-bottom: 16px; }
.place-page .together-list { margin-top: 8px; }

/* ---------- foto ---------- */
.photo-page .photo-view { margin: 0 0 16px; padding: 12px; border-radius: 16px; background: #0f0e0d; display: grid; place-items: center; min-height: 50vh; }
.photo-page .photo-view img, .photo-page .photo-view video { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; display: block; }

/* uitklapblokken: pijltje rechts dat omdraait, zodat zichtbaar is dat je kunt uitvouwen */
.ph-details > summary, .facet-more > summary, .year-table > summary, .facets > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px;
}
.ph-details > summary::-webkit-details-marker, .facet-more > summary::-webkit-details-marker,
.year-table > summary::-webkit-details-marker, .facets > summary::-webkit-details-marker { display: none; }
.ph-details > summary::after, .facet-more > summary::after, .year-table > summary::after, .facets > summary::after {
  /* gedraaid is het vierkantje ~2,5 px breder aan elke kant: ruimte rechts, anders scrollt een smalle balk opzij */
  content: ""; margin-left: auto; margin-right: 3px; width: 8px; height: 8px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease); opacity: 0.7;
}
.ph-details[open] > summary::after, .facet-more[open] > summary::after,
.year-table[open] > summary::after, .facets[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.ph-details > summary:hover::after, .facet-more > summary:hover::after { opacity: 1; }
.year-table > summary { justify-content: flex-start; }
.year-table > summary::after { margin-left: 8px; }

.today-side { display: flex; flex-direction: column; gap: 16px; }
.today-side .card { margin: 0; }
.y-counts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.y-counts a { display: flex; align-items: center; gap: 8px; min-height: 40px; text-decoration: none; color: var(--text); }
.y-counts .sum-n { margin-left: auto; }
.lane-label { text-decoration: none; }
a.lane-label:hover { color: var(--text); }

/* Instellingen > Meldingen: tijd van de ochtendmelding */
.morning-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.morning-form label { display: inline-flex; align-items: center; gap: 8px; }
.morning-form input[type="time"] { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }

/* Briefing */
.brief-focus { margin: 0 0 14px; max-width: 360px; }
.brief-list { list-style: none; margin: 0; padding: 0; }
.brief-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.brief-list li:first-child { border-top: 0; padding-top: 0; }
.brief-list a { text-decoration: none; }
.brief-summary { margin-top: 4px; }
.brief-summary p { margin: 2px 0; }
.brief-status + .brief-status { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.brief-status h3 { font-size: 0.95rem; margin: 12px 0 4px; }
.brief-status .brief-kicker { margin-top: 0; color: var(--muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; }
.brief-people .tag { text-decoration: none; }
.button:disabled { opacity: 0.55; cursor: default; }

/* Vaste lasten */
.lasten-stats strong { white-space: nowrap; }
.lasten-list { list-style: none; margin: 0; padding: 0; }
.lasten-list li + li { border-top: 1px solid var(--line); }
.lasten-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; color: var(--text); text-decoration: none; }
.lasten-list a:hover .lasten-name { color: var(--c-money); }
.lasten-when { flex: 0 0 5.2em; font-size: 0.87rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lasten-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lasten-name small { display: block; font-size: 0.82rem; }
.lasten-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lasten-amount small { display: block; font-size: 0.8rem; }
.lasten-spark { flex: 0 0 60px; width: 60px; height: 18px; }
.lasten-spark polyline { fill: none; stroke: var(--c-money); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lasten-sum { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.lasten-sum div { display: grid; }
.lasten-sum dt { font-size: 0.8rem; color: var(--muted); }
.lasten-sum dd { margin: 0; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.lasten-sum .is-short dd { color: var(--err); }
.lasten-sub { font-size: 1rem; margin: 22px 0 2px; }

/* verdeling: één balk, daaronder de legenda als tabel */
.lasten-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin: 6px 0 14px; }
.lasten-bar span { flex-basis: 0; min-width: 3px; }
.lasten-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.lasten-legend a { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.lasten-legend a:hover .lasten-legend-name { color: var(--c-money); }
.lasten-legend i, .lasten-group-head i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.lasten-legend-name { flex: 1; min-width: 0; }
.lasten-legend-share { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.lasten-legend-amount { flex: 0 0 6.5em; text-align: right; font-variant-numeric: tabular-nums; }

/* de maand als staafjes per dag: hoogte = wortel van het bedrag, gevuld = al afgeschreven */
.lasten-month { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); gap: 2px; margin: 10px 0 4px; }
.lasten-day { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.lasten-track { position: relative; width: 100%; height: 72px; display: flex; align-items: flex-end; justify-content: center;
  border-bottom: 1px solid var(--line); }
.lasten-col { width: min(100%, 14px); height: calc(6px + var(--h) * 62px); border-radius: 3px 3px 0 0;
  border: 1.5px solid var(--c-money); border-bottom: 0;
  background: linear-gradient(to top, var(--c-money) calc(var(--done) * 100%), transparent 0); }
.lasten-day.is-today .lasten-track::after { content: ""; position: absolute; inset: 0 auto 0 50%; width: 2px; margin-left: -1px;
  background: var(--accent); opacity: 0.8; }
.lasten-day small { font-size: 0.7rem; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 0.7rem; }
.lasten-day.is-today small { color: var(--accent); font-weight: 600; }
.lasten-pay { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--pos); color: var(--surface); font-size: 0.7rem; font-weight: 700; font-style: normal;
  font-family: ui-sans-serif, system-ui, sans-serif; /* in Alaska lijkt een kleine € op een C */ }
.lasten-month-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; }
.lasten-month-key span { display: inline-flex; align-items: center; gap: 6px; }
.lasten-month-key i { width: 10px; height: 10px; border-radius: 2px; }
.lasten-month-key .k-done { background: var(--c-money); }
.lasten-month-key .k-todo { border: 1.5px solid var(--c-money); }
.lasten-month-key .k-today { width: 2px; height: 12px; background: var(--accent); border-radius: 0; }
.lasten-month-key .lasten-pay { position: static; transform: none; }

/* opvallend: label voorop, zodat duurder en nieuw in één oogopslag te zien zijn */
.lasten-tag { flex: 0 0 6.6em; text-align: center; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); }
.lasten-tag.is-duurder { background: var(--accent-soft); color: var(--accent); }
.lasten-tag.is-goedkoper { background: var(--t-money); color: var(--c-money); }
.lasten-tag.is-nieuw { background: var(--t-msg); color: var(--c-msg); }
.lasten-tag.is-gestopt { background: var(--t-home); color: var(--c-home); }
.lasten-more { margin-top: 4px; border-top: 1px solid var(--line); }
.lasten-more > summary { color: var(--text-2); }

/* per categorie */
.lasten-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.lasten-group-head h2 { margin: 0; flex: 1; }
.lasten-group-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 599px) {
  .lasten-spark { display: none; }
  .lasten-track { height: 56px; }
  .lasten-col { height: calc(4px + var(--h) * 50px); border-width: 1px; }
  .lasten-tag { flex-basis: 5.6em; }
}

/* Factuur en bon bij een betaling: onderwerp mag doorlopen, pdf's eronder op een smal scherm */
.invoice-list li { flex-wrap: wrap; align-items: baseline; justify-content: flex-start; }
.invoice-list li > a:first-child { flex: 1 1 16em; min-width: 0; white-space: normal; }
.invoice-list .tag { flex: none; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* categorie van een betaling kiezen */
.category-edit { margin-top: 4px; }
.category-edit summary { cursor: pointer; color: var(--muted); }
.category-form { display: grid; gap: 8px; margin-top: 8px; max-width: 420px; }
.category-form input[name="nieuw"] { display: none; }
.category-form:has(option[value="nieuw"]:checked) input[name="nieuw"] { display: block; }
.category-form label { display: flex; gap: 6px; align-items: baseline; }
.category-form button { justify-self: start; }

/* Uitgaven: variabele lasten tegen je eigen gemiddelde */
.uit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.uit-months { display: inline-flex; align-items: center; gap: 4px; font-size: 1.05rem; }
.uit-months a, .uit-months > span:not(:nth-child(2)) { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; text-decoration: none; color: var(--text); }
.uit-months a:hover { background: var(--surface-2); }
.uit-months > span:nth-child(2) { min-width: 9.5em; text-align: center; }
.uit-up { color: var(--accent); }
.uit-down { color: var(--pos); }

/* staafjes per maand met een lijn op het gemiddelde */
.uit-bars { position: relative; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; height: 130px; margin-top: 8px; }
.uit-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); min-width: 0; }
.uit-bar-fill { width: min(100%, 26px); height: calc(var(--h) * 100px); min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--c-money) 45%, transparent); }
.uit-bar.is-current .uit-bar-fill { background: var(--c-money); }
.uit-bar:hover .uit-bar-fill { background: var(--c-money); }
.uit-bar small { font-size: 0.7rem; line-height: 1; }
.uit-bars-avg { position: absolute; left: 0; right: 0; bottom: calc(0.7rem + 4px + var(--avg) * 100px); border-top: 1.5px dashed var(--text-2); opacity: 0.6; pointer-events: none; }

/* per categorie: balk met wat al uitging, licht wat op dit tempo nog komt, streepje = gemiddelde */
.uit-cats { list-style: none; margin: 0; padding: 0; }
.uit-cats li + li { border-top: 1px solid var(--line); }
.uit-cats a { display: grid; grid-template-columns: minmax(0, 1fr) auto 60px; grid-template-areas: "name amount spark" "meter meter spark";
  gap: 6px 14px; align-items: center; padding: 10px 0; color: var(--text); text-decoration: none; }
.uit-cats a:hover .uit-cat-name { color: var(--c-money); }
.uit-cat-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.uit-cat-amount { grid-area: amount; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.uit-cat-amount small { display: block; font-size: 0.8rem; }
.uit-cats .lasten-spark { grid-area: spark; }
.uit-avg-line { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; opacity: 0.7; }
.uit-meter { grid-area: meter; position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); }
.uit-meter > span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; }
.uit-meter-proj { width: calc(var(--proj) * 100%); background: color-mix(in srgb, var(--c-money) 25%, transparent); }
.uit-meter-spent { width: calc(var(--spent) * 100%); background: var(--c-money); }
.uit-meter-spent.is-high { background: var(--accent); }
.uit-meter-spent.is-warn { background: var(--c-media); }
.uit-meter-avg { left: calc(var(--avg) * 100% - 1px) !important; width: 2px; top: -3px !important; bottom: -3px !important; border-radius: 1px; background: var(--text); }
.lasten-tag.uit-tag-boven { flex: none; background: var(--accent-soft); color: var(--accent); }
.lasten-tag.uit-tag-op-weg { flex: none; background: var(--t-media); color: var(--c-media); }
.lasten-tag.uit-tag-onder { flex: none; background: var(--t-money); color: var(--c-money); }

/* nog in te delen: naam links, keuzelijst rechts */
.uit-todo { list-style: none; margin: 0; padding: 0; }
.uit-todo li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; }
.uit-todo li + li { border-top: 1px solid var(--line); }
.uit-todo-name { flex: 1; min-width: 0; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.uit-todo-name small { display: block; font-size: 0.82rem; }
.uit-todo-form { margin: 0; flex: none; }
.uit-todo-form select { font: inherit; font-size: 0.9rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); max-width: 11em; }
@media (max-width: 599px) {
  .uit-cats a { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name amount" "meter meter"; }
  .uit-cats .lasten-spark { display: none; }
  .uit-bars { gap: 3px; }
  .uit-todo li { flex-wrap: wrap; }
}

/* Plek: dagen met foto's onder het raster */
.place-days { margin: 10px 0 0; line-height: 1.9; }
.place-days a { white-space: nowrap; }

/* Foto's in de buurt */
.nearby-radius { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.nearby-radius a { padding: 5px 12px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-size: 0.87rem; }
.nearby-radius a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.nearby-day h2 { font-size: 1rem; margin: 22px 0 8px; }
.nearby-day h2 a { text-decoration: none; color: inherit; }
.photo-grid a.is-current img { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- agenda ---------- */
.ag-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ag-head .page-title { margin: 0; }
.ag-head p { margin: 4px 0 0; }
.ag-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ag-mode { min-width: 150px; }
.ag-mode a { display: grid; place-items: center; min-height: 34px; border-radius: 8px; color: var(--text-2); font-size: 0.85rem; text-decoration: none; }
.ag-mode a[aria-current] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.ag-cals { margin-bottom: 16px; }
.ag-ev {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none;
  font-size: 0.78rem; line-height: 1.35; padding: 1px 6px; border-radius: 5px; color: var(--text);
  border-left: 3px solid var(--ec); background: var(--et);
}
.ag-ev time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-ev.ag-allday { background: var(--ec); color: var(--surface); border-left-color: var(--ec); font-weight: 600; }
.ag-ev:hover { filter: brightness(0.96); text-decoration: underline; }

.ag-month { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.ag-weekdays, .ag-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ag-weekdays span { padding: 8px 8px 6px; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.ag-day { min-height: 112px; padding: 4px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-week:first-of-type .ag-day { border-top: 0; }
.ag-day:nth-child(7n + 1) { border-left: 0; }
.ag-day.other { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
.ag-day.other .ag-date { color: var(--muted); }
.ag-date { align-self: flex-start; min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 0.85rem; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--text); }
.ag-date:hover { background: var(--line); }
.ag-day.today .ag-date { background: var(--accent); color: #fff; font-weight: 700; }
.ag-evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-more { font-size: 0.75rem; color: var(--muted); padding-left: 6px; }
.ag-dots { display: none; gap: 3px; justify-content: center; }
.ag-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ec); }

.ag-list { display: none; margin-top: 20px; }
.ag-list-day { font-size: 0.9rem; font-weight: 600; margin: 18px 0 6px; }
.ag-list-day::first-letter { text-transform: uppercase; }
.ag-list-day a { color: inherit; text-decoration: none; }
.ag-list-day.today a { color: var(--accent); }
.ag-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ag-rows a {
  display: grid; grid-template-columns: 96px 1fr; gap: 0 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ec);
}
.ag-rows time { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; grid-row: span 2; }
.ag-rows .small { grid-column: 2; }

.ag-weekgrid { --hh: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ag-wk-head, .ag-wk-allday, .ag-wk-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.ag-wk-head { border-bottom: 1px solid var(--line); }
.ag-wk-head a { padding: 8px 6px; text-align: center; text-decoration: none; color: var(--text); border-left: 1px solid var(--line); }
.ag-wk-head small { color: var(--muted); text-transform: uppercase; font-size: 0.72rem; }
.ag-wk-head a.today b { color: var(--accent); }
.ag-wk-allday { border-bottom: 1px solid var(--line); }
.ag-wk-allday > span { padding: 6px 4px; font-size: 0.68rem; text-align: right; }
.ag-wk-allday > div { padding: 3px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-wk-body { height: calc(var(--hours) * var(--hh)); }
.ag-hours { display: flex; flex-direction: column; }
.ag-hours span { height: var(--hh); font-size: 0.7rem; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-0.5em); font-variant-numeric: tabular-nums; }
.ag-hours span:first-child { visibility: hidden; }
.ag-col {
  position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px) var(--hh));
}
.ag-col.today { background-color: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.ag-block {
  position: absolute; top: calc(var(--t) / 60 * var(--hh)); height: calc(var(--h) / 60 * var(--hh) - 2px);
  left: calc(2px + (100% - 4px) * var(--lane) / var(--lanes)); width: calc((100% - 4px) / var(--lanes) - 2px);
  white-space: normal; padding: 2px 5px;
}
.ag-block time { display: block; font-size: 0.7rem; }
.ag-now { position: absolute; left: 0; right: 0; top: calc(var(--t) / 60 * var(--hh)); border-top: 2px solid var(--accent); z-index: 1; pointer-events: none; }
.ag-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

@media (max-width: 899px) {
  .ag-tools { width: 100%; justify-content: space-between; }
  .ag-tools .day-nav { width: auto; }
}
@media (max-width: 760px) {
  .ag-day { min-height: 54px; align-items: center; padding: 4px 2px; }
  .ag-date { align-self: center; }
  .ag-evs { display: none; }
  .ag-dots { display: flex; }
  .ag-list { display: block; }
  .ag-weekgrid { display: none; }
}
.ag-block.short { white-space: nowrap; padding-top: 0; padding-bottom: 0; }
.ag-block.short time { display: inline; }

/* ---------- organisaties ---------- */
.people-switch { margin: -4px 0 14px; }
.org-avatar { border-radius: 22%; --src: var(--c-money); }
.tag-mine { background: var(--accent-soft, var(--surface-2)); color: var(--text); }
.org-page .stats { margin-top: 4px; }
.org-main { display: flex; flex-direction: column; gap: 12px; }
.org-main .card { margin: 0; }
.org-years { height: 80px; }
@media (max-width: 599px) {
  .org-list .who .tag { display: none; }  /* de naam gaat voor; "Waar je zelf bij hoort" zegt het al */
  .org-list .who { white-space: normal; overflow: visible; }  /* lange namen op twee regels, niet afgekapt */
}
/* Bij een organisatie staan er knoppen achter: die op een eigen regel, anders wordt de naam een smalle kolom */
.org-page .identities li > :last-child { grid-column: 1 / -1; }
.org-page .identities form.inline { margin-left: 6px; }
.org-former { margin: -4px 0 14px; }
.org-former > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.org-former[open] > summary { margin-bottom: 6px; }

/* ---------- waakhond ---------- */
.watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
/* Label boven de titel: past ook in de smalle kolom van een organisatiepagina */
.watch-signal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 10px 0; }
.watch-signal + .watch-signal { border-top: 1px solid var(--line); }
.watch-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.watch-body .lasten-tag { flex: none; }
.watch-body > a { color: var(--text); text-decoration: none; font-weight: 600; }
.watch-body > a:hover { color: var(--accent); }
.watch-body small a { color: inherit; }
.watch-ok { margin: 0; }
.watch-choose { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.watch-list.is-handled .watch-body { color: var(--muted); }
.lasten-tag.is-binnenkort { background: var(--t-work); color: var(--c-work); }
.org-cancel .list a, .org-cancel .list small { white-space: normal; overflow: visible; }

/* ---------- beslisbak ---------- */
.decide-group { margin: 22px 0 0; }
.decide-group > .card-head { padding: 0 2px; }
.decide-trips { list-style: none; margin: 0; padding: 0; }
.decide-trip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 16px; align-items: center; padding: 10px 0; }
.decide-trip + .decide-trip { border-top: 1px solid var(--line); }
.decide-trip-head { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--text); text-decoration: none; min-width: 0; }
.decide-trip-head:hover strong { color: var(--accent); }
.decide-trip-head img, .decide-trip-cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.decide-trip-form { display: flex; gap: 6px; align-items: center; margin: 0; min-width: 0; }
.decide-trip-form input { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
@media (max-width: 640px) { .decide-trip { grid-template-columns: minmax(0, 1fr); } }

/* ---------- reizen ---------- */
.trip-stats { max-width: 560px; }
.trip-year { margin-top: 18px; }
.trip-year-head { font-size: 1.15rem; margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; }
.trip-year-head small { font-size: 0.85rem; font-weight: 400; }
.trip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.trip-list a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.trip-list a:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--text); }
/* Het koffertje zit onder de foto: zichtbaar als er geen foto is (of de miniatuur niet laadt) */
.trip-cover { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-2); color: var(--muted); }
.trip-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trip-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-when, .trip-meta { font-size: 0.85rem; color: var(--muted); }
.trip-flags { margin-right: 6px; letter-spacing: 1px; }
.trip-hidden { margin-top: 24px; }
.trip-hidden > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.trip-head { margin-bottom: 12px; }
.trip-countries { margin: 6px 0 0; }
.trip-countries .tag { color: var(--text-2); }
.trip-places { margin: 4px 0 0; }
.trip-page .stats { margin-top: 4px; }
.trip-page .route-map { margin-bottom: 14px; }
.trip-main, .trip-side { display: flex; flex-direction: column; gap: 12px; }
.trip-main .card, .trip-side .card { margin: 0; }
.trip-days li a, .trip-bookings li a { white-space: normal; }
.trip-payments { margin-top: 8px; }
.trip-payments > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--muted); }
.trip-edit form { margin: 0 0 8px; }
.trip-rename-row { display: flex; gap: 6px; margin-top: 4px; }
.trip-rename-row input { flex: 1; min-width: 0; }
.trip-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
.trip-actions button { text-align: left; white-space: normal; }
.day-trip { margin: -4px 0 12px; }
