/* My Notetaker (by My AI) portal. Navy sidebar + light work area, matching the site's product screenshots. */

/* ------------------------------------------------------------------ shell */
body { min-height: 100dvh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 30;
  display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy) 55%);
  color: #fff;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 6px; color: #fff; text-decoration: none; font: 700 16.5px/1 var(--font-display); letter-spacing: -0.01em; }
.nav { display: grid; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--nav-ink); text-decoration: none; font-weight: 500; font-size: 14.5px;
  transition: background .15s ease, color .15s ease;
}
.nav a svg { width: 19px; height: 19px; opacity: .9; }
.nav a:hover { background: rgb(255 255 255 / 0.05); color: #fff; }
.nav a.active { background: rgb(255 255 255 / 0.09); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.04); }
.nav .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgb(143 243 224 / 0.16); color: var(--teal); font-size: 11.5px; font-weight: 600; text-align: center; line-height: 19px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-radius: 12px; color: #fff; text-decoration: none; }
.side-user:hover { background: rgb(255 255 255 / 0.05); }
.side-user strong { display: block; font-size: 13.5px; font-weight: 600; }
.side-user small { display: block; color: #93a3ba; font-size: 12px; }

.shell { margin-left: 232px; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; padding: 14px 32px; padding-top: max(14px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-brand { display: none; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 700 15.5px/1 var(--font-display); }
.top-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .15s ease, background .15s ease; }
.top-search:focus-within { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--surface); }
.top-search [data-icon] { display: inline-flex; color: var(--muted); }
.top-search svg { width: 18px; height: 18px; }
.top-search input { border: 0; background: transparent; padding: 0; height: 100%; font-size: 14px; outline: none; min-width: 0; }
.top-search input::placeholder { color: var(--faint); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.dot-badge { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 2px var(--surface); }
.top-avatar { margin-left: 4px; text-decoration: none; }
.rec-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px 0 13px; margin-right: 6px; border-radius: 999px;
  background: var(--teal); color: var(--teal-ink); text-decoration: none; font-weight: 600; font-size: 14px;
  box-shadow: 0 0 0 1px rgb(13 27 36 / 0.04), 0 6px 18px rgb(143 243 224 / 0.35); transition: transform .12s ease;
}
.rec-pill:hover { transform: translateY(-1px); }
.rec-pill-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 3px rgb(229 72 77 / 0.18); }
.rec-pill.is-live { background: var(--rec); color: #fff; box-shadow: 0 6px 18px rgb(229 72 77 / 0.35); }
.rec-pill.is-live .rec-pill-dot { background: #fff; animation: pulse 1.2s infinite; box-shadow: none; }
.rec-pill span:last-child { font-variant-numeric: tabular-nums; }

main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 28px 32px 80px; outline: none; }
body:not(.signed-in) .side, body:not(.signed-in) .topbar, body:not(.signed-in) .tabbar { display: none; }
body:not(.signed-in) .shell { margin-left: 0; }

.tabbar { display: none; }

.queue { position: sticky; top: 71px; z-index: 15; margin: 0; padding: 8px 16px; text-align: center; font-size: 14px; background: var(--accent-soft); color: var(--accent); }
.queue.offline { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 1000px) {
  .side { width: 76px; padding-inline: 12px; }
  .side-brand span, .nav a span, .nav .count, .side-user span:not(.avatar) { display: none; }
  .side-brand { justify-content: center; padding-inline: 0; }
  .nav a { justify-content: center; padding: 11px; }
  .side-user { justify-content: center; }
  .shell { margin-left: 76px; }
}
@media (max-width: 680px) {
  .side { display: none; }
  .shell { margin-left: 0; }
  .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; background: var(--navy); border-bottom: 0; backdrop-filter: none; }
  .top-brand { display: inline-flex; color: #fff; }
  .top-search { display: none; }
  .top-actions .icon-btn { color: #fff; }
  .top-actions .icon-btn:hover { background: rgb(255 255 255 / 0.08); }
  .hide-sm { display: none !important; }
  .rec-pill { display: none; }
  .dot-badge { box-shadow: 0 0 0 2px var(--navy); }
  main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .queue { top: 58px; }
  body.signed-in .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; align-items: flex-end;
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 550; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar > button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; border-radius: 12px; color: var(--muted); font: inherit; font-size: 11px; font-weight: 550; cursor: pointer; }
  .tabbar > button svg { width: 21px; height: 21px; }
  .tabbar > button.active, .tabbar > button[aria-expanded="true"] { color: var(--accent); }
  .tabbar > button .count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--rec); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; }
  .tabbar a.rec { flex: none; }
  .tabbar a.rec .rec-fab { width: 54px; height: 54px; margin-top: -24px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--teal-ink); box-shadow: 0 8px 22px rgb(15 27 43 / 0.25), 0 0 0 5px var(--surface); }
  .tabbar a.rec.is-live .rec-fab { background: var(--rec); color: #fff; }
  .tabbar a.rec .rec-fab svg { width: 24px; height: 24px; }
}

/* ------------------------------------------------------------------ primitives */
h1, h2, .side-brand, .top-brand, .auth-brand-sm, .stat strong { word-spacing: .06em; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.2vw, 30px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 14.5px; margin: 0; }
.soft, .muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
.small { font-size: 13.5px; }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 6px; color: var(--muted); font-size: 13.5px; }
.eyebrow svg { width: 16px; height: 16px; }
.page-head { margin: 4px 0 22px; }
.page-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-date { color: var(--muted); font-size: 13.5px; margin: 0 0 8px; }
.page-head .lead { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stack { display: grid; gap: 16px; align-content: start; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.see-all { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.see-all svg { width: 15px; height: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--rec); }
.btn.wide { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 550; font-size: 14px; }
.form small { color: var(--muted); font-weight: 400; }
input, textarea, select { width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
input[disabled] { color: var(--muted); background: var(--surface-2); }
.form-error { margin: 0; color: var(--rec); font-size: 14px; }

.notice { padding: 14px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; background: var(--surface-2); }
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin: 0; }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.notice.error { background: var(--rec-soft); color: var(--rec); border-color: transparent; }
.notice.ok { background: var(--ok-soft); border-color: transparent; }
.notice.ok input { margin: 6px 0 10px; font-family: var(--font-mono); font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.busy { background: var(--accent-soft); color: var(--accent); }
.badge.busy::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
.badge.live, .badge.error { background: var(--rec-soft); color: var(--rec); }
.badge.active { background: var(--ok-soft); color: var(--ok); }
.badge.active::before { content: ""; width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: currentColor; }

.avatar {
  --h: 220;
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
  font: 700 12.5px/1 var(--font-sans); letter-spacing: .02em;
  background: linear-gradient(135deg, hsl(var(--h) 72% 88%), hsl(calc(var(--h) + 30) 70% 80%)); color: hsl(var(--h) 55% 28%);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.6);
}
:root[data-theme="dark"] .avatar { background: linear-gradient(135deg, hsl(var(--h) 38% 30%), hsl(calc(var(--h) + 30) 40% 24%)); color: hsl(var(--h) 80% 86%); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: linear-gradient(135deg, hsl(var(--h) 38% 30%), hsl(calc(var(--h) + 30) 40% 24%)); color: hsl(var(--h) 80% 86%); box-shadow: none; } }
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.9); }
.avatar.icon { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.avatar.icon svg { width: 18px; height: 18px; }
/* Photo avatars: image fills the circle; keeps the ring from .xl etc. */
.avatar.has-photo { background: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); overflow: hidden; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.xl.has-photo { box-shadow: 0 0 0 4px rgb(255 255 255 / 0.9), inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.avatars .avatar.lg.has-photo { box-shadow: 0 0 0 2px var(--surface); }
/* Photo picker row (settings + contact dialog) */
.photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 10px; }
/* Linked speaker chips are clickable through to the contact profile */
.speakers a.speaker.linked { text-decoration: none; color: inherit; cursor: pointer; transition: background .12s ease, transform .1s ease; }
.speakers a.speaker.linked:hover { background: var(--accent-soft); transform: translateY(-1px); }

.skeleton { height: 58px; border-radius: var(--radius-sm); margin-bottom: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton.tall { height: 160px; }
.empty, .empty-inline { color: var(--muted); }
.empty { text-align: center; padding: 60px 0; }
.empty-inline { margin: 8px 0; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 70;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 550; font-size: 14.5px;
  box-shadow: var(--shadow-lg); transition: all .25s ease; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--rec); }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ auth */
body:not(.signed-in) main { max-width: none; padding: 0; }
.auth-wrap { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { position: sticky; top: 0; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; gap: 40px; padding: 40px 0 0 48px; color: #fff; background: radial-gradient(120% 80% at 20% 0%, #1b3050, var(--navy) 65%); }
.auth-art .side-brand { padding: 0; }
.auth-art .auth-copy { padding-right: 48px; max-width: 520px; }
.auth-art h2 { font: 700 clamp(30px, 3vw, 40px)/1.08 var(--font-display); letter-spacing: -0.03em; margin: 0 0 12px; }
.auth-art h2 span { color: var(--teal); }
.auth-art p { margin: 0; color: #d9e1ec; max-width: 40ch; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 13px; }
.auth-points li { display: flex; align-items: center; gap: 11px; color: #d9e1ec; font-size: 15px; }
.auth-points li svg { width: 20px; height: 20px; flex: none; color: var(--teal); }
.auth-trust { margin-top: auto; display: flex; align-items: center; gap: 10px; color: #93a3ba; font-size: 13px; padding-right: 48px; max-width: 46ch; }
.auth-trust svg { width: 18px; height: 18px; flex: none; color: var(--teal); }
.auth { width: 100%; max-width: 400px; margin: auto; padding: 40px 20px; }
.auth h1 { margin-bottom: 8px; }
.auth .card { padding: 24px; }
.auth-wrap.single { grid-template-columns: 1fr; }
.auth-wrap.single .auth-brand-sm { display: inline-flex; }
.auth-wrap.single .auth-brand-sm img { background: var(--navy); border-radius: 8px; padding: 3px; }
.auth .center { text-align: center; margin: 14px 0 0; }
#verify-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
#verify-banner p { margin: 0; flex: 1 1 280px; }
.switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth-brand-sm { display: none; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 16px/1 var(--font-display); margin-bottom: 28px; }
.auth-maker-sm { display: none; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-brand-sm { display: inline-flex; }
  .auth-maker-sm { display: block; text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 28px; }
  .auth-maker-sm a { color: inherit; }
  .auth-brand-sm img { background: var(--navy); border-radius: 8px; padding: 3px; }
}

/* ------------------------------------------------------------------ dashboard */
.greet { display: flex; align-items: center; gap: 10px; }
.greet .wave { font-size: 26px; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat { padding: 18px 20px; display: grid; gap: 2px; }
.stat strong { font: 700 28px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13.5px; }
.trend { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ok); }
.trend.down { color: var(--rec); }
.trend.flat { color: var(--faint); font-weight: 500; }
.trend svg { width: 14px; height: 14px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .stats { gap: 10px; } .stat { padding: 14px; } .stat strong { font-size: 24px; } }

.rows { display: grid; }
.rrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.rrow-main, .rrow-side { text-decoration: none; color: inherit; }
.rows > .rrow:last-child { border-bottom: 0; }
.rrow:hover .rrow-title { color: var(--accent); }
.rrow-main { display: grid; gap: 3px; min-width: 0; }
.rrow-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s ease; }
.rrow-title small { font-weight: 400; font-size: 14px; color: var(--muted); }
.rrow-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow-side { display: grid; justify-items: end; gap: 3px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.rrow-side b { color: var(--muted); font-weight: 500; font-size: 13px; }
.rrow-side .when::after, .rrow-side b::after { content: "  ›"; color: var(--faint); }
.rrow.contact-row .rrow-side .when::after { content: ""; }

.task { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows > .task:last-child { border-bottom: 0; }
.task-main { display: grid; gap: 3px; min-width: 0; }
.task-text { font-size: 14px; font-weight: 500; }
.task-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-sub a { color: inherit; text-decoration: none; }
.task-sub a:hover { color: var(--accent); }
.task-due { font-size: 12.5px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.task-due.today { color: var(--ok); font-weight: 600; }
.task.done .task-text { color: var(--faint); text-decoration: line-through; }
.check { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; border-radius: 6px; border: 1.8px solid color-mix(in srgb, var(--muted) 55%, var(--line)); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.check.round { border-radius: 50%; }
.check::after { content: ""; width: 10px; height: 6px; border: solid transparent; border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg); }
.check:checked { background: var(--ok-soft); border-color: var(--ok); }
.check:checked::after { border-color: var(--ok); }
.check.mark { border-color: transparent; background: transparent; cursor: default; }
.check.mark::after { border-color: var(--ok); width: 12px; height: 7px; }

.start-card { display: flex; align-items: center; gap: 18px; padding: 22px 24px; margin-bottom: 18px; background: linear-gradient(120deg, var(--navy-2), var(--navy)); color: #fff; border: 0; }
.start-card h2 { color: #fff; margin: 0 0 4px; font-size: 18px; }
.start-card p { margin: 0; color: #c9d4e3; font-size: 14px; }
.start-card .btn { margin-left: auto; flex: none; }
@media (max-width: 560px) { .start-card { flex-direction: column; align-items: flex-start; } .start-card .btn { margin-left: 0; } }

/* ------------------------------------------------------------------ recorder */
.rec-layout { max-width: 760px; margin: 0 auto; }
.recorder { text-align: center; padding: 30px 20px 24px; position: relative; overflow: hidden; }
.recorder.is-live { border-color: color-mix(in srgb, var(--rec) 40%, var(--line)); }
.recorder.is-live::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rec) 14%, transparent), transparent);
  animation: breathe 3.2s ease-in-out infinite;
}
.rec-visual canvas { width: 100%; max-width: 420px; height: 70px; opacity: .9; }
.recorder:not(.is-live) .rec-visual { display: none; }
.rec-clock { font-variant-numeric: tabular-nums; font: 700 46px/1 var(--font-display); letter-spacing: -0.02em; margin: 6px 0; position: relative; }
.recorder:not(.is-live) .rec-clock { color: var(--faint); }
.rec-status { margin: 0 0 18px; color: var(--muted); position: relative; }
.rec-status.error { color: var(--rec); }
.rec-controls { display: flex; justify-content: center; margin-bottom: 18px; position: relative; }
.rec-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--rec); box-shadow: 0 0 0 8px var(--rec-soft), var(--shadow-lg); transition: transform .12s ease;
}
.rec-btn:hover { transform: scale(1.04); }
.rec-btn:disabled { opacity: .5; cursor: default; transform: none; }
.rec-dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: all .2s ease; }
.is-live .rec-dot { width: 26px; height: 26px; border-radius: 6px; }
.is-live .rec-btn { animation: ring 1.8s ease-out infinite; }
.rec-source { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; position: relative; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); color: var(--muted); font-weight: 550; font-size: 14px; }
.chip-radio svg { width: 18px; height: 18px; }
.chip-radio input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rec-source:disabled { opacity: .5; }
.rec-hint { margin: 6px auto 0; max-width: 460px; font-size: 13.5px; color: var(--muted); position: relative; }
.consent { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; margin: 14px 0 24px; }
.consent svg { width: 18px; height: 18px; flex: none; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rec) 45%, transparent), var(--shadow-lg); } 100% { box-shadow: 0 0 0 22px transparent, var(--shadow-lg); } }
@keyframes breathe { 50% { opacity: .55; transform: scale(1.06); } }
.import { margin-top: 22px; color: var(--muted); font-size: 14px; }
.import summary { cursor: pointer; }
.import form { margin-top: 10px; }

/* ------------------------------------------------------------------ list */
.day { margin: 18px 2px 2px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.day:first-child { margin-top: 0; }
.list-card { padding: 8px 20px 12px; }
.search-cta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 18px; color: var(--muted); text-decoration: none; font-size: 14px; }
.search-cta:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.search-cta svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.search-cta span:nth-child(2) { flex: 1; }

/* ------------------------------------------------------------------ detail */
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } .aside-sum { display: none; } }
.detail-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.detail-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.detail-icon svg { width: 22px; height: 22px; }
.detail-head h1 { font-size: clamp(20px, 2.4vw, 24px); margin: 0 0 4px; }
.editable { outline: none; border-radius: 8px; margin-left: -6px; padding: 0 6px; }
.editable[contenteditable="plaintext-only"]:hover, .editable:focus { background: var(--surface-2); }
.meta { color: var(--muted); margin: 0; font-size: 13.5px; }
.speakers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.speaker { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; }
.speakers .speaker { padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--surface-2); }
.main-card { padding: 22px 24px; }

.progress { list-style: none; display: flex; justify-content: space-between; gap: 8px; padding: 16px 20px; margin: 0 0 18px; }
.progress li { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 14px; font-weight: 550; }
.progress .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
.progress li.done { color: var(--ok); }
.progress li.done .dot { background: currentColor; }
.progress li.current { color: var(--accent); }
.progress li.current .dot { animation: pulse 1.2s infinite; background: currentColor; }
@media (max-width: 520px) { .progress { flex-direction: column; } }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 -4px 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: 10px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
/* Narrow phones: tighter tabs so all of them fit; the rest scrolls (edge fade hints there is more). */
@media (max-width: 420px) {
  .tabs { gap: 0; mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .tabs a { padding: 10px 9px; font-size: 13.5px; }
}

.prose { font-size: 15px; line-height: 1.65; }
.prose h2, .prose h3 { font-family: var(--font-display); font-size: 14.5px; color: var(--ink); margin: 22px 0 6px; letter-spacing: -0.005em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose ul li::marker { color: var(--accent); }
.prose ul.tasks { list-style: none; padding-left: 0; }
.prose ul.tasks li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.prose ul.tasks .box { flex: none; width: 16px; height: 16px; border: 2px solid var(--accent); border-radius: 50%; transform: translateY(2px); }
.cite { color: var(--accent); font-weight: 700; font-size: 11px; }

.transcript { display: grid; }
.utterance { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.utterance:last-child { border-bottom: 0; }
.utterance strong { font-size: 13.5px; }
.utt-spk { border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; }
.utt-spk:hover { box-shadow: 0 0 0 2px var(--accent-soft); }
.utt-name { cursor: pointer; }
.utt-name:hover { color: var(--accent); }
.utt-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.utterance p { margin: 2px 0 0; white-space: pre-wrap; line-height: 1.6; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.rename { margin-bottom: 14px; padding: 12px 16px; box-shadow: none; background: var(--surface-2); border-color: transparent; }
.rename summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.rename form { margin-top: 14px; }
.rename label { grid-template-columns: 1fr 1.4fr; align-items: center; }

.aside-card { padding: 18px; }
.aside-card h2 { font-size: 14.5px; margin-bottom: 8px; }
.aside-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.aside-card .rows .task { padding: 9px 0; }
.aside-card .task-text { font-size: 13.5px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 75%, var(--ink)); font-size: 12.5px; font-weight: 500; }
.tag.pos { background: var(--ok-soft); color: var(--ok); }
a.tag { text-decoration: none; cursor: pointer; transition: filter .12s ease; }
a.tag:hover { filter: brightness(0.97); text-decoration: none; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 13px; }
.bar-row .lbl { font-weight: 550; }
.bar-row .pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-row .track { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-row .fill { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; transition: width .6s ease; }
.bar-row.pos .lbl { color: var(--ok); } .bar-row.pos .fill { background: linear-gradient(90deg, #1fb89a, var(--pos)); }
.bar-row.neu .lbl { color: color-mix(in srgb, var(--neu) 60%, var(--ink)); } .bar-row.neu .fill { background: var(--neu); }
.bar-row.neg .lbl { color: var(--neg); } .bar-row.neg .fill { background: var(--neg); }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.aside-card select { font-size: 14px; padding: 8px 12px; }
.detail-actions { display: grid; gap: 12px; }
.detail-actions audio { width: 100%; height: 40px; }
.detail-actions .row .btn { flex: 1 1 auto; min-height: 36px; font-size: 13px; padding: 6px 12px; }

/* ------------------------------------------------------------------ ask */
.ask-layout { max-width: 820px; }
.ask-form { display: flex; gap: 10px; align-items: flex-end; padding: 10px 10px 10px 16px; }
.ask-form textarea { border: 0; background: transparent; padding: 8px 0; resize: none; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 24px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.answer { margin-bottom: 20px; }
.answer .q { font-weight: 650; margin: 0 0 12px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.source { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.source span { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.thinking { display: flex; gap: 6px; padding: 8px 0; }
.thinking span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
.thinking span:nth-child(2) { animation-delay: .2s; }
.thinking span:nth-child(3) { animation-delay: .4s; }

/* ------------------------------------------------------------------ tasks page */
.tasks-layout { max-width: 860px; }
.task-group + .task-group { margin-top: 18px; }

/* ------------------------------------------------------------------ settings */
.settings { max-width: 860px; display: grid; gap: 16px; }
.settings .page-head { margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.eyebrow::first-letter, .day::first-letter, .meta::first-letter, .source span::first-letter { text-transform: uppercase; }

/* ------------------------------------------------------------------ contacts */
.search-wrap { margin-bottom: 14px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.contact-card { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .1s ease; }
.contact-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.contact-card .rrow-main { flex: 1; }
.contact-card .cnt { color: var(--faint); font-size: 12.5px; white-space: nowrap; }

.profile { max-width: 860px; }
.profile-card { padding: 0; overflow: hidden; }
.profile-hero { position: relative; text-align: center; padding: 26px 20px 60px; background: radial-gradient(120% 90% at 50% 0%, #1b3050, var(--navy) 70%); color: #fff; }
.profile-hero .back { position: absolute; left: 16px; top: 14px; color: #c9d4e3; margin: 0; }
.profile-hero .back:hover { color: #fff; }
.profile-hero h1 { color: #fff; margin: 14px 0 2px; font-size: 22px; }
.profile-hero .role { margin: 0; color: #b6c3d6; font-size: 13.5px; }
.profile-hero .edit { position: absolute; right: 12px; top: 10px; color: #c9d4e3; }
.profile-hero .edit:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.profile-body { position: relative; margin-top: -34px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 4px 22px 22px; }
.profile-body .tabs { margin: 0 -8px 6px; }
.profile-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.profile-section:last-child { border-bottom: 0; }
.profile-section h2 { font-size: 14.5px; margin-bottom: 10px; }
.last-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; }
.last-row strong { display: block; font-size: 14.5px; }
.last-row span { color: var(--muted); font-size: 13px; }
.ask-person { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.ask-person .sp { display: inline-flex; color: var(--accent); flex: none; }
.ask-person .sp svg { width: 18px; height: 18px; }
.ask-person input { border: 0; background: transparent; padding: 8px 0; outline: none; font-size: 14px; }
.ask-person .btn { flex: none; min-height: 36px; }
.src-note { display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 12.5px; margin: 14px 0 0; }
.src-note svg { width: 15px; height: 15px; flex: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgb(15 27 43 / 0.5); backdrop-filter: blur(2px); }
.modal { width: 100%; max-width: 420px; margin: 0; }
.modal h2 { margin-bottom: 16px; font-size: 18px; }
.modal-actions { margin-top: 4px; }

/* ------------------------------------------------------------------ brand credits */
.side-brand small { display: block; margin-top: 4px; font: 500 11px/1 var(--font-sans); color: #93a3ba; letter-spacing: .02em; }
.side-brand span { display: block; }
.side-credit { margin: 4px 8px 0; font-size: 11px; line-height: 1.5; color: #7f8ea5; }
.side-credit a { color: #b6c3d6; text-decoration: none; }
.side-credit a:hover { color: #fff; text-decoration: underline; }
.auth-maker { margin: -28px 0 32px !important; padding-right: 48px; font-size: 12.5px; color: #7f8ea5 !important; padding-left: 28px; }
.auth-maker a { color: #b6c3d6; text-decoration: none; }
.auth-maker a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 1000px) { .side-credit { display: none; } }
@media (max-width: 1000px) { .side .side-brand span { display: none; } }

/* two overlapping avatars: the contact + you */
.avatars { display: inline-flex; flex: none; }
.avatars .avatar.lg { width: 36px; height: 36px; font-size: 12.5px; margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar.lg:first-child { margin-left: 0; }
.avatars a.avatar { text-decoration: none; position: relative; transition: transform .1s ease; }
.avatars a.avatar:hover { transform: translateY(-2px); z-index: 3; }
.avatar.more { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------------ plan / billing */
.plan-card .plan-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 18px; margin: 0 0 12px; }
.plan-feats { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 7px; }
.plan-feats li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.plan-feats li svg { width: 16px; height: 16px; flex: none; }
.plan-feats li.on { color: var(--ink); } .plan-feats li.on svg { color: var(--ok, #147d55); }
.plan-feats li.off { color: var(--faint); } .plan-feats li.off svg { color: var(--faint); }
.badge.ok { background: color-mix(in srgb, var(--ok, #147d55) 15%, transparent); color: var(--ok, #147d55); }
.plan-banner { display: flex; align-items: center; gap: 8px; }
.plan-banner svg { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------------ admin */
.admin-table td { vertical-align: top; }
.admin-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.admin-field select, .admin-field input { padding: 7px 10px; font-size: 14px; }
.a-days { width: 84px; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
@media (max-width: 760px) {
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
  .admin-table td { border: 0; padding: 6px 0; }
}

/* ------------------------------------------------------------------ speaker -> contact linking */
.speaker-links { margin-bottom: 16px; }
.speaker-links h3 { font-size: 15px; margin: 0 0 4px; }
.sl-list { display: grid; gap: 10px; margin-top: 12px; }
.sl-row { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 8px; }
.sl-rename { padding: 7px 10px; font-size: 14px; min-width: 0; }
.sl-select { min-width: 150px; width: auto; padding: 8px 10px; font-size: 14px; }
.sl-suggest { grid-column: 2 / -1; justify-self: start; white-space: nowrap; }
.sl-actions { margin-top: 14px; }
@media (max-width: 560px) {
  .sl-row { grid-template-columns: auto 1fr; }
  .sl-rename { grid-column: 2; }
  .sl-select, .sl-suggest { grid-column: 1 / -1; width: 100%; }
}
.speaker-nudge { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; background: var(--accent-soft); color: var(--ink); }
.speaker-nudge svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.speaker-nudge a { margin-left: auto; font-weight: 600; white-space: nowrap; }

/* ------------------------------------------------------------------ contact timeline */
.timeline { list-style: none; margin: 4px 0 0; padding: 0 0 0 8px; }
.tl-item { position: relative; padding: 0 0 4px 22px; border-left: 2px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; }
.tl-dot { position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px var(--surface); }
.tl-dot.pos { background: var(--ok); } .tl-dot.neu { background: var(--neu, #8aa5d6); } .tl-dot.neg { background: var(--rec); }
.tl-card { display: grid; gap: 2px; padding: 8px 10px; margin-bottom: 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); transition: background .12s ease; }
.tl-card:hover { background: var(--surface-2); }
.tl-when { font-size: 12px; color: var(--muted); }
.tl-title { font-weight: 600; }
.tl-meta { font-size: 12.5px; color: var(--faint); text-transform: capitalize; }

/* ------------------------------------------------------------------ minutes chart */
.chart-card { margin-bottom: 16px; }
.cv-wrap { margin-top: 6px; }
.cv-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cv-bar { fill: var(--accent); transition: fill .12s ease; }
.cv-bar:hover { fill: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
.cv-axis { stroke: var(--line); stroke-width: 1; }
.cv-x { fill: var(--faint); font-size: 11px; font-family: var(--font-sans); }

/* ---- Netwerk ---- */
:root{ --net-cross:#aab4c0; }
:root[data-theme="dark"]{ --net-cross:#5b6b7d; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){ --net-cross:#5b6b7d; } }
.net-stage{ position:relative; padding:8px; overflow:hidden; user-select:none; -webkit-user-select:none; }
.net-svg{ display:block; width:100%; height:auto; touch-action:none; cursor:grab; }
.net-svg.dragging, .net-svg.panning{ cursor:grabbing; }
.net-svg text{ user-select:none; -webkit-user-select:none; }
.net-node{ cursor:grab; }
.net-node:active{ cursor:grabbing; }
.net-toolbar{ position:absolute; top:12px; right:12px; display:flex; gap:8px; z-index:2; }
.tbtn{ display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:10px; padding:7px 11px; font-size:13px; font-weight:600; cursor:pointer; box-shadow:0 2px 8px rgba(15,23,32,.06); }
.tbtn svg{ width:16px; height:16px; }
.tbtn:hover{ background:var(--surface-2,#f0f3f6); }
.net-stage:fullscreen{ border-radius:0; padding:0; display:flex; align-items:center; justify-content:center; background:var(--surface); }
.net-stage:fullscreen .net-svg{ height:100vh; width:100vw; }
.net-edge{ fill:none; stroke-linecap:round; transition:opacity .18s; }
.net-node{ cursor:pointer; }
.net-chip{ stroke:var(--surface); stroke-width:2; filter:drop-shadow(0 4px 9px rgba(15,23,32,.16)); }
.net-init{ text-anchor:middle; dominant-baseline:central; font-weight:600; fill:#fff; pointer-events:none; }
.net-nm{ text-anchor:middle; fill:var(--ink); font-weight:600; font-size:11px; opacity:.92; pointer-events:none; }
.net-hulllabel{ font-weight:700; font-size:13px; letter-spacing:.02em; }
.net-node.dim, .net-edge.dim{ opacity:.14 !important; transition:opacity .18s; }
.net-tip{ position:absolute; pointer-events:none; opacity:0; transform:translate(-50%,-120%);
  background:var(--surface-2,#1c232d); color:var(--ink); border:1px solid var(--line); border-radius:12px;
  padding:9px 12px; min-width:150px; box-shadow:0 12px 30px rgba(0,0,0,.25); transition:opacity .12s; z-index:5; }
.net-tip .n{ font-weight:600; font-size:14px; }
.net-tip .o{ color:var(--muted); font-size:12.5px; margin:1px 0 6px; }
.net-tip .row{ display:flex; justify-content:space-between; gap:16px; font-size:12.5px; }
.net-tip .row span{ color:var(--muted); }
.legend{ display:flex; flex-wrap:wrap; gap:14px; margin-top:16px; }
.legend b{ display:inline-flex; align-items:center; gap:7px; font-weight:500; color:var(--muted); font-size:13px; }
.legend .dot{ width:11px; height:11px; border-radius:50%; }

/* Self-contact (account owner) marker */
.self-badge{ display:inline-flex; vertical-align:middle; color:#e0a400; margin-left:4px; }
.self-badge svg{ width:15px; height:15px; }
.self-badge.lg svg{ width:20px; height:20px; }

/* contact profile (generated) */
.c-profile .cp-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.c-profile .cp-head h2{ display:flex; align-items:center; gap:6px; margin:0; }
.c-profile .cp-head h2 svg{ width:16px; height:16px; color:var(--accent, #2f6bf2); }
.c-profile .cp-body h2, .c-profile .cp-body h3{ font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:14px 0 4px; }
.c-profile .cp-body p, .c-profile .cp-body li{ font-size:14.5px; line-height:1.55; }
.c-profile .cp-body ul{ margin:0; padding-left:18px; }
.c-profile .cp-meta{ margin:12px 0 0; }
.c-profile .cp-status{ display:inline-flex; align-items:center; gap:6px; }
.c-profile .cp-status .thinking{ transform:scale(.7); }

/* ---------------------------------------------------------------- charts (inzichten) */
:root{ --s-pos:#16a37a; --s-neu:#a7b0bd; --s-neg:#e5484d; }
:root[data-theme="dark"]{ --s-pos:#1c9a73; --s-neu:#56627a; --s-neg:#f05a5f; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){ --s-pos:#1c9a73; --s-neu:#56627a; --s-neg:#f05a5f; } }
.ch-card{ position:relative; }
.ch-svg{ display:block; width:100%; height:auto; overflow:visible; }
.ch-grid{ stroke:var(--line); stroke-width:1; }
.ch-ref{ stroke:var(--faint); stroke-width:1; stroke-dasharray:3 4; }
.ch-y{ fill:var(--faint); font-size:10.5px; text-anchor:end; font-family:var(--font-sans); }
.ch-x{ fill:var(--faint); font-size:10.5px; text-anchor:middle; font-family:var(--font-sans); }
.ch-s.pos{ fill:var(--s-pos); } .ch-s.neu{ fill:var(--s-neu); } .ch-s.neg{ fill:var(--s-neg); }
.ch-bar{ fill:var(--accent); }
.ch-empty{ stroke:var(--line); stroke-width:2; stroke-dasharray:2 3; }
.ch-hit{ fill:transparent; cursor:default; }
.ch-hit.on{ fill:color-mix(in srgb, var(--ink) 5%, transparent); }
.ch-tip{ position:absolute; z-index:3; pointer-events:none; opacity:0; transform:translateY(-50%); transition:opacity .12s;
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:10px; padding:8px 10px; font-size:12.5px; line-height:1.5; white-space:nowrap; box-shadow:0 8px 24px rgba(15,23,32,.14); }
.ch-tip div{ color:var(--muted); }
.ch-legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--muted); }
.ch-legend span{ display:inline-flex; align-items:center; gap:6px; }
.ch-legend .sw{ width:10px; height:10px; border-radius:3px; display:inline-block; }
.ch-legend .sw.pos{ background:var(--s-pos); } .ch-legend .sw.neu{ background:var(--s-neu); } .ch-legend .sw.neg{ background:var(--s-neg); }
.ch-hero{ margin:2px 0 10px; font-size:14px; } .ch-hero strong{ font-size:22px; font-family:var(--font-display); margin-right:2px; }
.ch-table{ margin-top:8px; font-size:13px; } .ch-table summary{ cursor:pointer; color:var(--muted); }
.ch-table table{ width:100%; border-collapse:collapse; margin-top:8px; font-variant-numeric:tabular-nums; }
.ch-table th, .ch-table td{ text-align:left; padding:5px 8px; border-bottom:1px solid var(--line); } .ch-table th{ color:var(--muted); font-weight:600; }
.insights .card{ margin-bottom:16px; }
.ins-grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:16px; align-items:start; }
.ins-grid .stack{ display:grid; gap:16px; } .ins-grid .stack .card{ margin:0; }
@media (max-width: 960px){ .ins-grid{ grid-template-columns:1fr; } }
.ins-sub{ font-size:13.5px; margin:16px 0 8px; }
.hbars{ display:grid; gap:4px; }
.hbar{ display:grid; grid-template-columns:minmax(90px, 34%) 1fr auto 52px; align-items:center; gap:10px; padding:5px 6px; border-radius:8px; color:inherit; text-decoration:none; font-size:13.5px; }
.hbar:hover{ background:var(--surface-2); }
.hb-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:550; }
.hb-track{ height:8px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.hb-fill{ display:block; height:100%; border-radius:999px; background:var(--accent); }
.hb-val{ color:var(--muted); font-variant-numeric:tabular-nums; text-align:right; }
.delta{ font-size:11.5px; color:var(--muted); text-align:right; font-variant-numeric:tabular-nums; }
.delta.up{ color:var(--ok); } .delta.down{ color:var(--warn); } .delta.new{ color:var(--accent); }
.seg{ display:inline-flex; background:var(--surface-2); border-radius:10px; padding:3px; gap:2px; align-self:center; }
.seg a{ padding:6px 12px; border-radius:8px; font-size:13px; color:var(--muted); text-decoration:none; white-space:nowrap; }
.seg a.on{ background:var(--surface); color:var(--ink); font-weight:600; box-shadow:0 1px 3px rgba(15,23,32,.1); }
.tag b{ font-weight:600; color:var(--muted); margin-left:2px; }

.insights .card-head, .profile-section .card-head{ flex-wrap:wrap; gap:6px 14px; }
.insights .card-head h2, .profile-section .card-head h2{ white-space:nowrap; }

.rec-warn{ margin:14px auto 0; max-width:560px; text-align:left; font-size:13.5px; line-height:1.5; }

/* mobile "Meer" sheet */
.sheet-backdrop{ position:fixed; inset:0; z-index:60; background:rgb(10 16 26 / 0); transition:background .2s; }
.sheet-backdrop.open{ background:rgb(10 16 26 / .42); }
.sheet{ position:absolute; left:0; right:0; bottom:0; background:var(--surface); border-radius:20px 20px 0 0; padding:8px 12px calc(16px + env(safe-area-inset-bottom)); box-shadow:0 -10px 30px rgb(10 16 26 / .2); transform:translateY(100%); transition:transform .2s ease; }
.sheet-backdrop.open .sheet{ transform:none; }
.sheet-grip{ display:block; width:40px; height:4px; border-radius:4px; background:var(--line); margin:4px auto 10px; }
.sheet-nav{ display:grid; gap:2px; }
.sheet-nav a{ display:flex; align-items:center; gap:14px; padding:13px 12px; border-radius:12px; color:var(--ink); text-decoration:none; font-size:15.5px; font-weight:550; }
.sheet-nav a svg{ width:22px; height:22px; color:var(--muted); }
.sheet-nav a.active{ background:var(--accent-soft); color:var(--accent); } .sheet-nav a.active svg{ color:var(--accent); }
.sheet-nav a .count{ margin-left:auto; min-width:22px; height:22px; padding:0 7px; border-radius:999px; background:var(--rec); color:#fff; font-size:12px; line-height:22px; text-align:center; }
@media (prefers-reduced-motion: reduce){ .sheet, .sheet-backdrop{ transition:none; } }

.progress-nudge{ display:flex; align-items:center; gap:10px; margin:-8px 0 18px; }

/* Billing (Instellingen > Abonnement) */
.seg button { padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,32,.1); }
.billing-choose { display: grid; gap: 14px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.billing-choose .seg { justify-self: start; flex-wrap: wrap; }
.plan-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.plan-option { display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.plan-option.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-option .btn { margin-top: 6px; justify-content: center; }
.plan-price { font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.plan-price small { font-size: 12px; font-weight: 500; color: var(--muted); font-family: var(--font-sans); }
.billing-sub { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; display: grid; gap: 8px; justify-items: start; }
.billing-sub p { margin: 0; }
/* Watch pairing (Instellingen > Horloge) */
.pair-code { max-width: 13ch; text-transform: uppercase; letter-spacing: .18em; font-variant-numeric: tabular-nums; font-weight: 600; }
.pair-code::placeholder { letter-spacing: normal; font-weight: 400; text-transform: none; }
.devices { margin-top: 12px; }
.device-row { grid-template-columns: minmax(0, 1fr) auto; }
.device-row:last-child { border-bottom: 0; }

/* Settings tabs, team, admin members + actiecodes */
.settings-tabs { margin-top: -4px; }
.privacy-promise { border-left: 3px solid var(--ok); }
.privacy-promise h2 { margin-bottom: 6px; }
.privacy-promise p { margin: 0 0 8px; }
#org-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#org-name { margin: 6px 0 14px; }
#org-name input { flex: 1 1 220px; }
.team-table select, .admin-table select { min-width: 120px; }
.sub-h { font-size: 15px; margin: 18px 0 8px; }
.org-row { grid-template-columns: minmax(0, 1fr) auto; }
.org-actions { margin-top: 12px; }
.members-row > td { background: var(--surface-2); }
.table.inner { margin: 0; }
.table tr.inactive td { color: var(--faint); }
.promo-form .grid-2 { gap: 12px 16px; margin-bottom: 12px; }
.promo-form .row { gap: 8px; }
.promo-form .row input { flex: 1; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.invite-accept { max-width: 560px; margin: 40px auto; }
.invite-accept h1 { font-size: 24px; }
#settings-body { display: grid; gap: 16px; }
.admin > .card + .card, .admin > form + .card { margin-top: 16px; }
.promo-form [hidden] { display: none; }
.promo-form .row select { flex: 0 0 96px; width: 96px; }
.promo-form .row input { min-width: 0; }
label.check { flex-direction: row; align-self: center; }
label.check input { width: auto; flex: none; margin: 0; }
#invite input[type="email"] { flex: 1 1 240px; }
#invite select { flex: 0 0 auto; width: auto; }
.form label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.form label.check input[type="checkbox"], label.check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; }
.form label.check { white-space: nowrap; }
.u-orgs { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.u-orgs li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-orgs select { width: auto; padding: 4px 8px; font-size: 13px; }
.u-add select { width: auto; max-width: 200px; padding: 4px 8px; font-size: 13px; }
.admin > .card + .card { margin-top: 12px; }
.am-add { margin-top: 10px; }
.am-add input { flex: 1 1 240px; }
.am-add select { width: auto; }
.invoices { margin-top: 14px; }
.invoices .table td { vertical-align: middle; }

/* Recording device icons + devices tab */
.dev { display: inline-flex; vertical-align: -3px; margin-right: 6px; color: var(--muted); }
.dev svg { width: 15px; height: 15px; }
.meta .dev { vertical-align: -2px; }
.device-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.device-row .avatar.icon svg { width: 18px; height: 18px; }
.device-row .row { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.app-dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.app-dl p { margin: 2px 0 0; }
details.small summary { cursor: pointer; }
details.small ol { margin: 6px 0; padding-left: 20px; }

/* Small screens: admin user table as stacked cards instead of overflowing columns. */
@media (max-width: 640px) {
  .table.admin-users thead { display: none; }
  .table.admin-users, .table.admin-users tbody, .table.admin-users tr, .table.admin-users td { display: block; width: 100%; }
  .table.admin-users tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table.admin-users td { border: 0; padding: 4px 0; text-align: left; }
  .table.admin-users td:nth-child(3)::before { content: "Platformbeheer: "; color: var(--muted); font-size: 13px; }
  .table.admin-users .u-add { flex-wrap: wrap; }
}

/* Loading feedback (lib.js api()): progress bar at the top + spinner on the button that started it. */
body.loading::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1000; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--teal), var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: loadbar 1.1s infinite ease-in-out; }
body.loading { cursor: progress; }
@keyframes loadbar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.is-busy { position: relative; pointer-events: none; }
.btn.is-busy, button.is-busy { color: transparent !important; }
.btn.is-busy::after, button.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--accent) var(--accent) transparent transparent; animation: spin .7s linear infinite; }
.btn.primary.is-busy::after, .btn.teal.is-busy::after { border-color: var(--accent-ink) var(--accent-ink) transparent transparent; }
.nav a.is-busy, .tabbar a.is-busy { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { body.loading::before { animation-duration: 3s; } .btn.is-busy::after, button.is-busy::after { animation-duration: 2s; } }

/* Legal bits: signup consent, terms gate, retention, withdrawal, AI labels. */
.check-line { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 450 !important; font-size: 13.5px !important; line-height: 1.5; }
.check-line input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
fieldset.ctype { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.ctype legend { font-weight: 550; font-size: 14px; margin-bottom: 6px; padding: 0; }
fieldset.ctype small { color: var(--muted); font-size: 12.5px; }
.chip-radio input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.terms-gate { max-width: 640px; margin: 24px auto; }
.terms-gate h1 { margin-top: 0; }
.terms-gate .check-line { margin: 14px 0; }
.inline-select { display: inline-flex; align-items: center; gap: 10px; font-weight: 550; font-size: 14px; flex-wrap: wrap; }
.withdraw { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.plan-option .muted.small { display: block; }

/* Plan labels, locked features and the "Bekijk als" preview. */
.plan-tag { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font: 600 11px/18px var(--font-sans); letter-spacing: .02em; vertical-align: middle;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.nav .plan-tag { margin-left: auto; }
.stat .plan-tag { margin: 0; font-size: 13px; line-height: 24px; padding: 2px 10px; }
.locked-card .card-head h2 { margin: 0; }
.locked-card p { margin: 6px 0 12px; }
.locked-mini p { margin: 4px 0 0; }
.preview-pick { margin: 12px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.preview-pick p { margin: 0 0 8px; }
.preview-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 14px; background: var(--navy); color: #fff; font-size: 14px; text-align: center; box-shadow: var(--shadow-lg); }
@media (max-width: 960px) { .preview-bar { bottom: 88px; } }
.preview-bar .btn { background: #fff; color: var(--navy); border-color: #fff; }

/* Action items: suggestions vs. tasks (the user decides). */
.task-section { margin: 4px 0 18px; }
.task-section h3 { font-size: 15px; margin: 6px 0 8px; }
.task-section > .card-head { margin-bottom: 0; }
.task-section summary, .review-group summary { cursor: pointer; font-weight: 600; font-size: 14px; margin: 8px 0; color: var(--muted); }
.task.suggestion { border-left: 3px solid var(--accent-soft); padding-left: 10px; }
.task.dismissed .task-text { color: var(--muted); text-decoration: line-through; }
.task-acts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.task .task-sub { display: block; }
.mine-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; background: var(--ok-soft); color: var(--ok); vertical-align: 1px; }
.due-input { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: auto; }
.due-input.overdue, .task-due.overdue { color: var(--rec); border-color: color-mix(in srgb, var(--rec) 40%, var(--line)); }
.review-link { display: inline-flex; margin-top: 8px; }
.review-note { margin: -4px 0 8px; }
.task.suggestion, .task.dismissed { grid-template-columns: minmax(0, 1fr) auto; }
.task.suggestion .task-sub { white-space: normal; }
@media (max-width: 640px) {
  .task.suggestion, .task.dismissed { grid-template-columns: minmax(0, 1fr); }
  .task-acts { justify-content: flex-start; margin-left: 0; }
  .task:not(.suggestion):not(.dismissed) .task-acts { grid-column: 2 / -1; }
}

/* Two-step verification */
#twofa .pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; margin-right: 6px; }
#twofa .pill.ok { background: #e3f7f1; color: #0b6b55; }
.twofa-step, .twofa-setup { margin-top: 12px; }
.twofa-setup .qr { width: 196px; max-width: 100%; background: #fff; border: 1px solid var(--line, #e6ebf1); border-radius: 12px; padding: 6px; margin: 8px 0 10px; }
.twofa-setup .qr svg { display: block; width: 100%; height: auto; }
.twofa-setup .steps { margin: 0; padding-left: 20px; }
code.secret { display: inline-block; margin-top: 4px; font-size: 14px; letter-spacing: .04em; user-select: all; word-break: break-all; }
.recovery .codes { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.recovery .codes code { font-size: 15px; letter-spacing: .03em; }

/* 6-digit code: one box per digit */
.otp-wrap { display: grid; gap: 8px; }
.otp-label { font-weight: 600; font-size: 14px; }
.otp { display: flex; gap: 8px; }
.otp[hidden], .otp-label[hidden], .otp-rec[hidden] { display: none; }
.otp-d { width: 46px; height: 54px; flex: 0 0 auto; padding: 0; text-align: center; font: 600 22px/1 var(--font-sans); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); caret-color: var(--accent); }
.otp-d:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.otp-switch { justify-self: start; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
#code-form .otp { justify-content: space-between; }
@media (max-width: 380px) { .otp { gap: 6px; } .otp-d { width: 40px; height: 50px; font-size: 20px; } }
