/* Ideaflow — "Polished app": Geist on zinc, white cards, violet accent. */
:root {
  --bg: #FAFAFA; --surface: #FFFFFF; --surface-2: #F4F4F5; --surface-3: #E4E4E7;
  --fg: #09090B; --fg-2: #3F3F46; --muted: #52525B; --faint: #A1A1AA;
  --line: #E4E4E7; --line-2: #F4F4F5; --line-dash: #D4D4D8;
  --primary: #6D28D9; --primary-hover: #5B21B6; --primary-fg: #FFFFFF;
  --primary-soft: #F5F3FF; --primary-tint: #EDE9FE; --primary-text: #5B21B6; --primary-line: #DDD6FE; --primary-ring: rgba(109,40,217,.14);
  --danger: #BE123C; --ok: #047857;
  --violet-fg: #5B21B6; --violet-bg: #EDE9FE; --rose-fg: #BE123C; --rose-bg: #FFF1F2; --emerald-fg: #047857; --emerald-bg: #ECFDF5;
  --sky-fg: #0369A1; --sky-bg: #F0F9FF; --amber-fg: #B45309; --amber-bg: #FFFBEB; --amber-dot: #D97706; --blue-fg: #1D4ED8; --blue-bg: #EFF6FF; --blue-dot: #2563EB;
  --emerald-dot: #059669; --zinc-fg: #3F3F46; --zinc-bg: #F4F4F5; --zinc-dot: #71717A; --teal-fg: #0F766E; --teal-bg: #CCFBF1; --indigo-fg: #3730A3; --indigo-bg: #E0E7FF;
  --green-fg: #047857; --green-bg: #D1FAE5; --pink-fg: #BE185D; --pink-bg: #FCE7F3; --orange-fg: #C2410C; --orange-bg: #FFF7ED;
  --shadow: 0 1px 2px rgba(0,0,0,.05); --shadow-pop: 0 8px 24px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.05);
  --nav-bg: rgba(255,255,255,.92); --hero: linear-gradient(180deg, #F5F3FF 0%, #FFFFFF 100%);
  --radius: 8px; --radius-lg: 12px; --w: 1120px; --gutter: 24px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090B; --surface: #18181B; --surface-2: #27272A; --surface-3: #3F3F46;
    --fg: #FAFAFA; --fg-2: #D4D4D8; --muted: #A1A1AA; --faint: #71717A;
    --line: #27272A; --line-2: #1F1F23; --line-dash: #3F3F46;
    --primary: #8B5CF6; --primary-hover: #7C3AED; --primary-fg: #FFFFFF;
    --primary-soft: #1E1537; --primary-tint: #2E1065; --primary-text: #C4B5FD; --primary-line: #4C1D95; --primary-ring: rgba(139,92,246,.25);
    --danger: #FB7185; --ok: #6EE7B7;
    --violet-fg: #C4B5FD; --violet-bg: #2E1065; --rose-fg: #FDA4AF; --rose-bg: #4C0519; --emerald-fg: #6EE7B7; --emerald-bg: #022C22;
    --sky-fg: #7DD3FC; --sky-bg: #082F49; --amber-fg: #FCD34D; --amber-bg: #451A03; --amber-dot: #F59E0B; --blue-fg: #93C5FD; --blue-bg: #172554; --blue-dot: #3B82F6;
    --emerald-dot: #10B981; --zinc-fg: #D4D4D8; --zinc-bg: #27272A; --zinc-dot: #A1A1AA; --teal-fg: #5EEAD4; --teal-bg: #042F2E; --indigo-fg: #A5B4FC; --indigo-bg: #1E1B4B;
    --green-fg: #6EE7B7; --green-bg: #022C22; --pink-fg: #F9A8D4; --pink-bg: #500724; --orange-fg: #FDBA74; --orange-bg: #431407;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-pop: 0 8px 24px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
    --nav-bg: rgba(9,9,11,.85); --hero: linear-gradient(180deg, #1E1537 0%, #09090B 100%);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; height: 36px; outline: none; box-shadow: var(--shadow); color: var(--fg); }
textarea { height: auto; padding: 8px 12px; resize: none; width: 100%; display: block; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { padding-right: 28px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; cursor: pointer; font-weight: 500; }
input[type=checkbox], input[type=radio] { height: auto; box-shadow: none; accent-color: var(--primary); margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .error { color: var(--danger); } .mono { font-family: var(--mono); }
.meta-mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.spacer { flex: 1; }
.linkish { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 500; }
.linkish:hover { color: var(--primary-hover); text-decoration: underline; }
.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -.15em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 500; font-size: 14px; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-text); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn.dashed { border-style: dashed; border-color: var(--line-dash); background: transparent; box-shadow: none; color: var(--muted); }
.btn.dashed:hover { color: var(--fg); border-color: var(--faint); }
.btn.accent { border: 0; background: transparent; box-shadow: none; color: var(--primary); }
.btn.accent:hover { background: var(--primary-soft); }
.btn.danger { color: var(--danger); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 8px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 18px; }
.btn-icon { width: 32px; padding: 0; }
.btn:disabled { opacity: .6; cursor: default; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.seg > * { height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 500; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg > .on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.seg.seg-lg { background: var(--surface); border-radius: 10px; padding: 3px; box-shadow: var(--shadow); }
.seg.seg-lg > * { height: 40px; padding: 0 16px; font-size: 14px; }
.seg.seg-lg > .on { background: var(--primary); color: var(--primary-fg); box-shadow: none; }

/* ---------- top nav ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { max-width: var(--w); margin: 0 auto; padding: 8px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--fg); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.beta-badge { font-size: 11px; font-weight: 500; line-height: 18px; padding: 0 8px; border-radius: 999px; color: var(--amber-fg); background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber-fg) 25%, transparent); white-space: nowrap; }
.top-nav { display: flex; align-items: center; gap: 2px; }
.top-nav a { color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: var(--radius); }
.top-nav a:hover { color: var(--fg); background: var(--surface-2); }
.top-nav a.active { color: var(--fg); background: var(--surface-2); }
.top-search { flex: 1 1 200px; min-width: 0; display: flex; justify-content: flex-end; }
.top-search label { position: relative; display: flex; align-items: center; width: 100%; max-width: 320px; }
.top-search .icon { position: absolute; left: 10px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.top-search input { width: 100%; padding: 0 56px 0 32px; }
.kbd { position: absolute; right: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--bg); pointer-events: none; }
.top-user { height: 36px; font-size: 13px; max-width: 170px; }
.top-user.as-login { color: var(--muted); }
.signup { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter) 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.signup input { font-size: 13px; width: 150px; }

/* ---------- layout ---------- */
.main { padding: 0 0 64px; }
.main.loading { opacity: .75; }
.main > .muted, .main > .error { max-width: var(--w); margin: 24px auto; padding: 0 var(--gutter); }
.container { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.page-body { padding-top: 24px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 16px 20px; }
.card-lg { padding: 24px; }
.rail-card { padding: 16px; }
.rail-title { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rail-head .rail-title { margin: 0; }
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rail-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rail-person { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.rail-person .who { min-width: 0; }
.rail-person .name { font-weight: 500; color: var(--fg); }
.rail-person .sub { color: var(--muted); font-size: 13px; }
.section-card { padding: 20px 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 15px; font-weight: 600; }
.section-head h2 .n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.empty { padding: 8px 0; color: var(--muted); }

/* hero band (profile, event) */
.hero { background: var(--hero); border-bottom: 1px solid var(--line); }
.hero-inner { padding-top: 36px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 24px; }
.hero-main { flex: 1 1 320px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-actions.stack { flex-direction: column; align-items: flex-end; }
.hero-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.hero-title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.hero-title.big { font-size: 30px; line-height: 1.15; }
.hero-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.handle { font-family: var(--mono); font-size: 13px; color: var(--muted); font-weight: 400; }
.hero-bio { margin: 6px 0 0; font-size: 15px; max-width: 64ch; overflow-wrap: anywhere; }
.hero-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.hero-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta a:hover { color: var(--fg); }
.hero-meta .icon { width: 14px; height: 14px; }
.hero-meta.lg { font-size: 14px; gap: 6px 20px; margin-top: 12px; }
.hero-meta.lg .icon { width: 16px; height: 16px; }
.hero-meta b { color: var(--fg); font-weight: 500; }
.tabs { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 4px; overflow-x: auto; }
.tabs a { color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a.active { color: var(--fg); border-bottom-color: var(--primary); }
.tabs .n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

/* ---------- atoms: badges, chips, avatars ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; line-height: 1.5; padding: 1px 8px; border-radius: 999px; white-space: nowrap; color: var(--zinc-fg); background: var(--zinc-bg); vertical-align: middle; }
.badge-lg { padding: 2px 10px; }
.badge-kind.kind-project, .badge-kind.kind-event { color: var(--violet-fg); background: var(--violet-bg); }
.badge-kind.kind-problem { color: var(--rose-fg); background: var(--rose-bg); }
.badge-kind.kind-solution { color: var(--emerald-fg); background: var(--emerald-bg); }
.badge-kind.kind-question { color: var(--sky-fg); background: var(--sky-bg); }
.badge-kind.kind-group { color: var(--teal-fg); background: var(--teal-bg); }
.badge-kind.kind-university { color: var(--indigo-fg); background: var(--indigo-bg); }
.badge-kind.kind-company { color: var(--orange-fg); background: var(--orange-bg); }
.badge-kind.kind-new { color: var(--primary-text); background: var(--primary-soft); }
.badge-kind.kind-heading { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); }
.badge-kind.kind-list { color: #b45309; background: color-mix(in srgb, #D97706 12%, transparent); }
.badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--zinc-dot); flex: none; }
.badge-status.status-in_progress { color: var(--amber-fg); background: var(--amber-bg); } .badge-status.status-in_progress::before { background: var(--amber-dot); }
.badge-status.status-exploring { color: var(--blue-fg); background: var(--blue-bg); } .badge-status.status-exploring::before { background: var(--blue-dot); }
.badge-status.status-shipped { color: var(--emerald-fg); background: var(--emerald-bg); } .badge-status.status-shipped::before { background: var(--emerald-dot); }
.badge-status.status-paused::before, .badge-status.status-abandoned::before { background: var(--faint); }
.badge-status.status-paused, .badge-status.status-abandoned { color: var(--muted); }
.pill-mono { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; white-space: nowrap; max-width: 100%; vertical-align: baseline; line-height: 1.5; }
.chip-tag { font-family: var(--mono); font-size: 12px; color: var(--primary-text); background: var(--primary-soft); padding: 1px 8px; }
.chip-tag:hover { background: var(--primary-tint); }
.chip-tag.on, .chip-tag.overlap { color: var(--primary-fg); background: var(--primary); }
.chip-tag.lg { padding: 3px 10px; }
.chip-tag.big { font-size: 20px; padding: 4px 14px; }
.chip-user { color: var(--primary); font-weight: 500; }
.chip-user:hover { color: var(--primary-hover); text-decoration: underline; }
.chip-node { display: inline; color: var(--fg); font-weight: 500; background: var(--primary-soft); border-radius: 6px; padding: 0 5px; white-space: normal; overflow-wrap: anywhere; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.chip-node:hover { background: var(--primary-tint); }
.chip-node .badge { margin-right: 4px; vertical-align: 1px; }
.chip .n { opacity: .6; font-size: .9em; margin-left: 2px; }
.chip.removable button { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: inherit; opacity: .7; line-height: 1; display: inline-flex; }
.chip.removable button:hover { opacity: 1; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 600; flex: none; width: 28px; height: 28px; font-size: 10px; letter-spacing: .01em; color: var(--av-fg, var(--primary-text)); background: var(--av-bg, var(--primary-tint)); text-decoration: none !important; }
.avatar.av-xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.av-sm { width: 24px; height: 24px; font-size: 9px; }
.avatar.av-lg { width: 32px; height: 32px; font-size: 11px; }
.avatar.av-xl { width: 36px; height: 36px; font-size: 12px; }
.avatar.av-hero { width: 72px; height: 72px; font-size: 24px; border: 1px solid var(--primary-line); }
.avatar.av-nav { border: 1px solid var(--line); }
.av-stack { display: inline-flex; }
.av-stack .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.av-stack .avatar:first-child { margin-left: 0; }
.person-link { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); min-width: 0; }
.person-link .name { font-weight: 500; }
.person-link:hover .name { text-decoration: underline; }
.imported { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); border: 1px solid var(--line-dash); border-radius: 999px; padding: 0 6px; background: var(--bg); white-space: nowrap; line-height: 20px; }
.imported .icon { width: 11px; height: 11px; }
.imported a.src, a.imported.src { color: inherit; }
.imported a.src:hover, a.imported.src:hover { color: var(--primary); text-decoration: underline; }
.ol-link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ol-link:hover { color: var(--primary); text-decoration-color: currentColor; }
.title-src { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--faint); }
.title-src:hover { color: var(--primary); }
.ol-src { display: inline-flex; color: var(--faint); padding: 2px; border-radius: 4px; }
.ol-src:hover { color: var(--primary); background: var(--surface-2); }
.imported .claim { color: var(--primary); font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
.imported .claim:hover { text-decoration: underline; }
.imported.lg { font-size: 12px; padding: 2px 8px; line-height: 20px; }
.imported.lg .icon { width: 12px; height: 12px; }
.ctx { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; font-size: 13px; color: var(--muted); max-width: 100%; }
.ctx a { color: var(--fg); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.ctx a:hover { text-decoration: underline; }
.ctx .icon { width: 14px; height: 14px; }

/* ---------- composer ---------- */
.composer { display: flex; gap: 12px; padding: 14px 16px; margin: 0; }
.composer.login-hint { color: var(--muted); align-items: center; gap: 10px; }
.composer .c-main { flex: 1; min-width: 0; }
.composer textarea { border: 0; box-shadow: none; padding: 6px 0; background: transparent; border-radius: 0; }
.composer textarea:focus { box-shadow: none; }
.composer .c-title { font-size: 15px; }
.composer .c-body { font-size: 14px; color: var(--fg-2); }
.composer input.c-title { width: 100%; border: 0; box-shadow: none; padding: 6px 0; background: transparent; font-size: 15px; height: auto; }
.c-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.c-row select, .c-row input { height: 32px; font-size: 13px; box-shadow: none; color: var(--muted); }
.c-row label { display: inline-flex; align-items: center; gap: 6px; }
.c-row .c-home { color: var(--muted); }
.composer:not(.open) .c-row { display: none; }
.c-hint { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.composer-details summary { cursor: pointer; list-style: none; }
.composer-details summary::-webkit-details-marker { display: none; }
.composer-details .composer { margin-top: 10px; display: block; }
.composer-details .c-row input { flex: 1 1 160px; }
.composer.block { display: block; }

/* ---------- filters ---------- */
.filters { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.f-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.f-q { flex: 1 1 160px; min-width: 140px; font-size: 13px; }
.f-tags { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 6px; flex: 1 1 180px; min-height: 36px; background: var(--surface); box-shadow: var(--shadow); }
.f-tags:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.f-tags .chip-tag { padding: 2px 6px 2px 10px; height: 28px; }
.f-tag { border: 0; box-shadow: none; padding: 0 4px; height: 28px; font-size: 13px; width: 90px; flex: 1; min-width: 70px; background: transparent; }
.f-tag:focus { box-shadow: none; }
.f-sort { font-size: 13px; height: 36px; color: var(--fg); }
.f-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.f-label { font-family: var(--mono); color: var(--faint); margin-right: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.fchip { height: 28px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 10px; font-size: 12px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.fchip:hover { color: var(--fg); border-color: var(--faint); }
.fchip.on { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.f-more { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.f-more input { font-size: 13px; }
.f-region { width: 190px; } .f-affil { width: 280px; max-width: 100%; }
.f-affilwrap { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.f-check { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- feed cards ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed > .muted, .feed > .error { padding: 8px 0; }
.idea-card { padding: 16px 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.card-head .who { color: var(--muted); }
.card-head .when { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-title { margin: 10px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.card-title .tlink { color: var(--fg); }
.card-title .tlink:hover { text-decoration: underline; }
.card-title .chip-tag { font-weight: 400; vertical-align: 2px; }
.card-body { color: var(--muted); font-size: 14px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.card-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.card-ctx { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.card-foot .count { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.card-foot .count:hover { background: var(--surface-2); color: var(--fg); }
.card-foot .count .icon { width: 14px; height: 14px; }
.card-foot .dot { color: var(--line-dash); }
.load-more { align-self: center; }

/* ---------- outline ---------- */
.outline-card { padding: 8px 8px 16px; }
.outline { font-size: 14px; }
.ol-list { display: flex; flex-direction: column; }
.ol-row { position: relative; }
.ol-line { display: flex; align-items: flex-start; gap: 4px; padding: 5px 8px 5px 4px; min-height: 32px; border-radius: var(--radius); }
.ol-row.editable > .ol-line:hover, .ol-row > .ol-line:focus-within { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.ol-toggle { width: 20px; height: 22px; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .1s; flex: none; border-radius: 6px; }
.ol-toggle .icon { width: 14px; height: 14px; transition: transform .1s; }
.ol-toggle:hover { background: var(--surface-2); color: var(--fg); }
.ol-row:hover > .ol-line > .ol-toggle, .ol-row.collapsed > .ol-line > .ol-toggle, .kind-heading > .ol-line > .ol-toggle { opacity: 1; }
.ol-row.collapsed > .ol-line > .ol-toggle .icon { transform: rotate(-90deg); }
.ol-dot { width: 20px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ol-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg); display: block; transition: box-shadow .1s; }
.ol-dot:hover i { box-shadow: 0 0 0 4px var(--surface-3); }
.ol-row.collapsed > .ol-line > .ol-dot i { box-shadow: 0 0 0 4px var(--surface-3); }
.kind-heading > .ol-line > .ol-dot { display: none; }
.ol-text { flex: 1; min-width: 0; padding: 0 4px; line-height: 22px; }
.ol-view { min-height: 22px; overflow-wrap: anywhere; cursor: text; }
.ol-view .chip-tag { margin: 0 2px; vertical-align: 1px; }
.ol-row:not(.editable) > .ol-line .ol-view { cursor: default; }
.ol-view.empty::before { content: 'Type an idea…'; color: var(--faint); }
.ol-input { border: 0; padding: 0; margin: 0; line-height: inherit; background: transparent; min-height: 22px; overflow: hidden; box-shadow: none; border-radius: 0; font-size: inherit; }
.ol-input:focus { outline: none; box-shadow: none; }
.kind-heading > .ol-line { padding-top: 10px; padding-bottom: 4px; }
.kind-heading > .ol-line > .ol-text { font-weight: 600; font-size: 17px; letter-spacing: -.01em; line-height: 24px; }
.kind-heading > .ol-line > .ol-text .ol-view { min-height: 24px; }
.ol-list > .ol-row.kind-heading:not(:first-child) > .ol-line { margin-top: 10px; }
.ol-meta { display: inline-flex; gap: 6px; align-items: center; padding-top: 2px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ol-author { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.ol-author:hover { color: var(--fg); }
.ol-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ol-more { width: 24px; height: 22px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; opacity: 0; flex: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.ol-more:hover { background: var(--surface-2); color: var(--fg); }
.ol-row:hover > .ol-line > .ol-more, .ol-row:focus-within > .ol-line > .ol-more { opacity: 1; }
.ol-children { margin-left: 33px; border-left: 1px solid var(--line); padding-left: 4px; }
.kind-heading > .ol-children { margin-left: 21px; border-left: 0; padding-left: 0; }
.ol-row.collapsed > .ol-children { display: none; }
.ol-add { margin: 10px 0 0 28px; }
.ol-empty { padding: 8px 12px 4px 28px; font-size: 14px; }
.hint { margin-bottom: 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
@media (hover: none) { .ol-toggle, .ol-more { opacity: 1; } }

/* ---------- autocomplete popup ---------- */
.ac { position: fixed; z-index: 50; min-width: 220px; max-width: min(380px, 92vw); max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; font-size: 14px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
.ac-item.active { background: var(--primary-soft); }
.ac-item .badge { font-size: 11px; padding: 0 6px; }
.ac-item .ac-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ac-item .ac-sub { color: var(--muted); font-size: 12px; white-space: nowrap; font-family: var(--mono); }
.ac-item.create .ac-label { color: var(--primary); }

/* ---------- popover (kind/status menu) ---------- */
.popover { position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 220px; }
.popover label { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); }
.popover select { font-size: 13px; height: 32px; box-shadow: none; }
.popover-row { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }

/* ---------- profile ---------- */
.profile-form { display: block; }
.profile-form input, .profile-form textarea { margin-bottom: 8px; width: 100%; }
.profile-form .c-row { margin-top: 4px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; padding: 14px 16px; color: var(--fg); }
.person:hover { background: var(--surface-2); }
.person .who { min-width: 0; flex: 1; }
.person-name { font-weight: 500; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.person-bio { font-size: 13px; color: var(--muted); margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.person-meta .imported { margin-top: 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- node page ---------- */
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { color: var(--faint); width: 14px; height: 14px; }
.crumbs .current { color: var(--fg); font-weight: 500; overflow-wrap: anywhere; }
.node-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.inline-select { height: 26px; font-size: 12px; padding: 0 24px 0 10px; border-radius: 999px; color: var(--muted); font-weight: 500; box-shadow: none; background-color: var(--surface-2); border-color: transparent; background-position: right 6px center; }
.node-title { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.node-title.editable { cursor: text; border-radius: 6px; }
.node-title.editable:hover { background: var(--surface-2); box-shadow: 0 0 0 6px var(--surface-2); }
.node-title-input { font: inherit; letter-spacing: inherit; border: 0; padding: 0; background: var(--surface-2); border-radius: 6px; box-shadow: 0 0 0 6px var(--surface-2); }
.node-title-input:focus { box-shadow: 0 0 0 6px var(--surface-2); }
.node-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); }
.node-byline .dot { color: var(--line-dash); }
.node-byline a.under { color: var(--muted); font-weight: 500; }
.node-byline a.under:hover { color: var(--fg); }
.node-body { margin-top: 20px; font-size: 15px; line-height: 1.65; max-width: 640px; }
.node-body .body p { margin: 0 0 12px; overflow-wrap: anywhere; }
.node-body .body p:last-child { margin-bottom: 0; }
.node-body .linkish { margin-top: 6px; display: inline-block; }
.node-body .composer { padding: 0; }
.node-body .composer textarea { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.node-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.node-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.node-actions .counts { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.place-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.event-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.event-meta > div { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.event-meta b { color: var(--fg); font-weight: 500; }
.event-meta .composer { padding: 0; display: block; }
.members { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.members .person-link { font-size: 13px; }
.members .role { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.links { display: flex; flex-direction: column; gap: 12px; }
.link-group { display: flex; flex-direction: column; gap: 6px; }
.link-group .rel { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.link-item { display: flex; align-items: flex-start; gap: 4px; }
.link-item .chip-node { background: none; padding: 0; font-weight: 500; }
.link-item .chip-node:hover { text-decoration: underline; background: none; }
.link-item .x { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0 4px; line-height: 1.4; }
.link-item .x:hover { color: var(--danger); }
.add-link { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; }
.add-link select, .add-link input { width: 100%; height: 34px; font-size: 13px; box-shadow: none; }
.add-link .row { display: flex; gap: 6px; }
.add-link .row > * { flex: 1; min-width: 0; }
.discussion .reply { display: flex; gap: 12px; margin-top: 16px; }
.discussion > .reply:first-child { margin-top: 0; }
.reply .r-main { min-width: 0; flex: 1; }
.reply-head { display: flex; gap: 4px 8px; align-items: baseline; font-size: 13px; flex-wrap: wrap; }
.reply-head .author { font-weight: 500; color: var(--fg); }
.reply-head .author:hover { text-decoration: underline; }
.reply-head .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.reply-head .tag-author { font-size: 11px; font-weight: 500; color: var(--primary-text); background: var(--primary-tint); border-radius: 999px; padding: 0 6px; }
.reply-text { margin: 4px 0 0; overflow-wrap: anywhere; }
.reply-text .body { font-size: 14px; color: var(--muted); margin-top: 2px; }
.reply-actions { display: flex; gap: 8px; margin-top: 4px; }
.reply-actions .btn { color: var(--muted); }
.replies { margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--line); }
.replies .reply { margin-top: 12px; }
.replies .reply:first-child { margin-top: 0; }
.reply-form-holder { margin-top: 8px; }
.reply-form-holder:empty { margin: 0; }
.reply-compose { display: flex; gap: 12px; margin-top: 20px; }
.reply-compose .avatar { margin-top: 2px; }
.reply-box { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: box-shadow .1s, border-color .1s; }
.reply-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.reply-box textarea { border: 0; box-shadow: none; background: transparent; padding: 12px 14px; font-size: 14px; }
.reply-box textarea:focus { box-shadow: none; }
.reply-box .c-row { margin: 0; padding: 8px 10px; border-top: 1px solid var(--line-2); gap: 8px; }
.reply-as { display: inline-flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.reply-as label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--muted); }
.reply-as label:has(:checked) { color: var(--fg); }
.graph-box { position: relative; min-height: 120px; border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--line-2); }
.graph-box.small { min-height: 100px; }
.graph-box.page { min-height: 360px; border: 0; border-radius: var(--radius-lg); background: var(--surface); }
.graph-box canvas { display: block; }
.graph-box > p { padding: 14px; margin: 0; }
.g-tip { font-size: 12px; max-width: 260px; font-family: var(--font); }
.g-legend { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 10px; }
.g-key { display: inline-flex; align-items: center; gap: 5px; }
.g-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.g-key i.line { width: 14px; height: 0; border-top: 1.5px solid var(--faint); border-radius: 0; }
.g-key i.line.dashed { border-top-style: dashed; }
.graph-info { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.details dt { color: var(--muted); } .details dd { margin: 0; overflow-wrap: anywhere; }
.details dd.mono { font-family: var(--mono); font-size: 12px; }

/* people table */
.table-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.table-controls .search { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 320px; }
.table-controls .search .icon { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.table-controls .search input { width: 100%; height: 40px; padding-left: 32px; }
.table-controls .tagset { display: flex; flex-wrap: wrap; gap: 6px; }
.tagbtn { height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--primary-text); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.tagbtn.on { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.table-card { overflow: hidden; }
.people-table-wrap { overflow-x: auto; }
.people-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.people-table thead tr { background: var(--bg); border-bottom: 1px solid var(--line); }
.people-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; white-space: nowrap; }
.people-table th:first-child, .people-table td:first-child { padding-left: 16px; width: 40px; }
.people-table th:last-child, .people-table td:last-child { padding-right: 16px; }
.people-table td { padding: 14px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.people-table tr.open td { background: var(--bg); border-bottom: 0; }
.people-table tr.detail td { background: var(--bg); padding: 0 16px 16px 12px; border-bottom: 1px solid var(--line); }
.people-table td.sub { color: var(--muted); }
.people-table td.sub div { font-size: 12px; }
.people-table .expand { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.people-table .expand .icon { width: 14px; height: 14px; transition: transform .1s; }
.people-table tr.open .expand .icon { transform: rotate(90deg); }
.people-table .pcell { display: flex; align-items: flex-start; gap: 10px; }
.people-table .pcell .name { font-weight: 500; white-space: nowrap; color: var(--fg); }
.people-table .pcell .name:hover { text-decoration: underline; }
.people-table .pcell .handle { font-size: 12px; display: block; }
.people-table .pcell .imported { margin-top: 4px; background: var(--surface); }
.people-table .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.people-table .ideas-n { font-weight: 500; }
.people-table .ideas-preview { font-size: 13px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.match .bar { width: 48px; height: 6px; border-radius: 999px; background: var(--primary-tint); overflow: hidden; display: inline-block; }
.match .bar i { display: block; height: 100%; background: var(--primary); }
.match .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ideas-list { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.ideas-list ul { list-style: none; margin: 0; padding: 0; }
.ideas-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.ideas-list li:first-child { border-top: 0; }
.ideas-list li .badge-kind { min-width: 60px; justify-content: center; }
.ideas-list li .t { flex: 1 1 240px; min-width: 0; font-weight: 500; color: var(--fg); }
.ideas-list li .t:hover { text-decoration: underline; }
.ideas-list li .t .chip-tag { font-weight: 400; }

/* ---------- people table (/people?view=table) ---------- */
.main.wide .container { max-width: 1600px; }
.pt .table-controls { margin-bottom: 12px; }
.pt-colmenu { position: relative; }
.pt-colpop { right: 0; top: calc(100% + 6px); min-width: 200px; gap: 2px; padding: 8px; }
.pt-colopt { display: flex !important; justify-content: flex-start !important; gap: 8px !important; padding: 5px 6px; border-radius: 6px; color: var(--fg) !important; cursor: pointer; }
.pt-colopt:hover { background: var(--surface-2); }
.pt-wrap { overflow: auto; max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px); outline: none; }
.pt-wrap:focus-visible { box-shadow: inset 0 0 0 2px var(--primary-ring); }
.pt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.pt-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: left; padding: 0; white-space: nowrap; }
.pt-table th.num, .pt-table td.num { text-align: right; }
.pt-sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 4px; width: 100%; padding: 8px 12px; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; }
.pt-table th.num .pt-sort { justify-content: flex-end; }
.pt-sort:hover, .pt-sort.on { color: var(--fg); }
.pt-sort:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); border-radius: 4px; }
.pt-arrow { display: inline-flex; opacity: 0; transition: transform .1s; }
.pt-sort:hover .pt-arrow { opacity: .4; }
.pt-sort.on .pt-arrow { opacity: 1; }
.pt-arrow.asc { transform: rotate(180deg); }
.pt-table td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; background: var(--surface); }
.pt-table tbody tr { cursor: pointer; }
.pt-table tbody tr:hover td { background: var(--surface-2); }
.pt-table tbody tr:last-child td { border-bottom: 0; }
/* Person column stays put while the rest scrolls sideways. */
.pt-table .pt-col-person { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line-2); }
.pt-table th.pt-col-person { z-index: 3; }
.pt-person { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.pt-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pt-name { font-weight: 500; color: var(--fg); white-space: nowrap; }
.pt-name:hover { text-decoration: underline; }
.pt-handle { font-size: 12px; color: var(--muted); }
.pt-bio { min-width: 200px; max-width: 280px; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-loc { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--fg-2); }
.pt-loc .icon { color: var(--faint); }
.pt-link { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; color: var(--primary-text); }
.pt-link:hover { text-decoration: underline; }
.pt-date { white-space: nowrap; color: var(--muted); }
.pt-table td.num { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--fg-2); }
.pt-empty { color: var(--faint); }
.pt-none { color: var(--muted); padding: 20px 16px !important; cursor: default; }
.pt-status { font-size: 11px; }
.pt-status-member { color: var(--primary-text); background: var(--primary-soft); }
.pt-col-status .imported { background: var(--surface); }
.pt-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pt-col-projects .pt-pills { min-width: 360px; max-width: 440px; }
.pt-col-affiliations .pt-pills, .pt-col-lists .pt-pills, .pt-col-tags .pt-pills { min-width: 140px; max-width: 240px; }
.pt-pill { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 8px; border-radius: 6px; color: var(--zinc-fg); background: var(--zinc-bg); }
.pt-pill:hover { box-shadow: inset 0 0 0 1px currentColor; }
.pt-pill .n { margin-left: 5px; opacity: .65; font-family: var(--mono); font-size: 11px; }
.pt-pill.pt-role::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: currentColor; margin-right: 5px; vertical-align: 1px; }
.pt-pill.pt-tag { font-family: var(--mono); font-weight: 400; color: var(--primary-text); background: var(--primary-soft); border-radius: 999px; }
.pt-pill.pt-more { color: var(--muted); background: transparent; border: 1px dashed var(--line-dash); line-height: 18px; }
.pt-pill.pt-more:hover { box-shadow: none; }
@media (max-width: 640px) {
  .pt-person { min-width: 0; width: 120px; }
  .pt-name { white-space: normal; }
  .pt-person .avatar { display: none; }
}

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; transition: all .2s; pointer-events: none; z-index: 60; max-width: 90vw; box-shadow: var(--shadow-pop); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .top-row { gap: 8px; }
  .top-nav { order: 10; width: 100%; overflow-x: auto; margin: 0 -4px; }
  .top-nav a { padding: 6px 10px; font-size: 13px; }
  .top-search { order: 11; width: 100%; flex-basis: 100%; }
  .top-search label { max-width: none; }
  .btn-new .label { display: none; }
  .btn-new { width: 36px; padding: 0; }
  .hero-inner { padding-top: 24px; }
  .hero-title { font-size: 22px; } .hero-title.big { font-size: 24px; }
  .avatar.av-hero { width: 56px; height: 56px; font-size: 20px; }
  .hero-actions.stack { align-items: flex-start; }
  .tabs { margin-top: 20px; }
  .page-body { padding-top: 16px; }
  .card-lg, .section-card { padding: 16px; }
  .idea-card { padding: 14px 16px; }
  .node-title { font-size: 22px; }
  .ol-children { margin-left: 20px; }
  .ol-line { flex-wrap: wrap; }
  .ol-text { flex: 1 1 180px; }
  .ol-meta { flex: 0 1 auto; max-width: 100%; justify-content: flex-start; }
  .ol-line > .ol-meta:not(:empty) { margin-left: auto; }
  .kind-heading > .ol-children { margin-left: 8px; }
  .f-affil, .f-region { width: 100%; }
  .seg.seg-lg > * { height: 36px; padding: 0 12px; font-size: 13px; }
  .card-head .when { margin-left: 0; width: 100%; }
}

/* ---- sign-in + claim ---- */
.btn-signin { white-space: nowrap; }
.signout { margin: 0; }
.claim-panel { margin: 16px 0 0; padding: 16px 18px; }
.claim-panel h3 { margin: 0 0 6px; font-size: 15px; }
.claim-token { font: 12px/1.5 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); background: var(--surface-2, #f4f4f5); border: 1px solid var(--border, #e4e4e7); border-radius: 8px; padding: 10px 12px; overflow-x: auto; user-select: all; margin: 6px 0; }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* ---- Workflowy-style homepage filter ---- */
.ol-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0 12px; height: 38px; border: 1px solid var(--border, #e4e4e7); border-radius: 10px; background: var(--surface, #fff); color: var(--muted, #71717a); }
.ol-filter:focus-within { border-color: var(--accent, #6d28d9); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #6d28d9) 15%, transparent); }
.ol-filter-input, .ol-filter-input:focus { flex: 1; border: 0 !important; box-shadow: none !important; padding: 0; height: auto; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text, #18181b); min-width: 0; }
.ol-filter-count { white-space: nowrap; }
.ol-row.ol-context > .ol-line .ol-view { opacity: .55; }
mark.ol-hit { background: color-mix(in srgb, #facc15 45%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---- likes ---- */
.like { display: inline-flex; align-items: center; gap: 8px; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted, #71717a); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.like-btn:hover { background: var(--surface-2, #f4f4f5); color: var(--text, #18181b); }
.like-btn.on { color: #e11d48; }
.like-btn.on svg path { fill: currentColor; }
.like-btn .n { font-variant-numeric: tabular-nums; }
.like.compact .like-btn { padding: 2px 6px; font-size: 12px; }
.ol-line .like.compact { opacity: 0; transition: opacity .12s; }
.ol-line:hover .like.compact, .ol-line .like.compact:focus-within, .ol-line .like.compact:has(.on), .ol-line .like.compact:has(.n) { opacity: 1; }
.likers-line { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--muted, #71717a); cursor: pointer; }
.likers-line:hover { text-decoration: underline; color: var(--text, #18181b); }
.likers-pop { min-width: 220px; max-height: 320px; overflow: auto; }
.likers-head { display: flex; align-items: center; gap: 4px; font-weight: 600; margin-bottom: 6px; color: #e11d48; }
@media (prefers-reduced-motion: reduce) { .ol-line .like.compact { transition: none; } }

/* ---- idea lists: render like a section heading in outlines, with a list badge ---- */
.ol-row:hover > .ol-line > .ol-toggle, .kind-list > .ol-line > .ol-toggle { opacity: 1; }
.kind-list > .ol-line { padding-top: 10px; padding-bottom: 4px; }
.kind-list > .ol-line > .ol-text { font-weight: 600; font-size: 17px; letter-spacing: -.01em; line-height: 24px; }
.ol-list > .ol-row.kind-list:not(:first-child) > .ol-line { margin-top: 10px; }
.kind-list > .ol-line > .ol-dot i { background: #D97706; }

.ol-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 10px; }
.ol-quick .fchip { font-size: 12px; }

/* ---- people on ideas ---- */
.people-row { display: flex; align-items: center; gap: 8px; }
.people-row .role { margin-left: auto; font-size: 11px; color: var(--muted); }
.people-x { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; opacity: .6; }
.people-x:hover { opacity: 1; background: var(--surface-2, #f4f4f5); }
.people-row .role + .people-x { margin-left: 4px; }
.people-group { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.people-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.people-join { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.people-join .fchip { font-size: 12px; }
.people-add { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.people-add .people-who { flex: 1 1 140px; min-width: 0; }
.people-stack { display: inline-flex; align-items: center; gap: 6px; }
.people-stack .stack { display: inline-flex; }
.people-stack .stack .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface, #fff); }
.people-stack .stack .avatar:first-child { margin-left: 0; }

.badge-kind.kind-person { color: #be185d; background: color-mix(in srgb, #DB2777 12%, transparent); }
.kind-person > .ol-line > .ol-dot i { background: #DB2777; border-radius: 3px; }

/* ---- graph layout controls ---- */
.g-controls { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.g-panel { background: var(--surface, #fff); border: 1px solid var(--border, #e4e4e7); border-radius: 10px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.08); width: 260px; display: flex; flex-direction: column; gap: 8px; }
.g-row { display: grid; grid-template-columns: 78px 1fr 32px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted, #71717a); }
.g-row input[type=range] { width: 100%; accent-color: var(--accent, #6d28d9); border: 0 !important; padding: 0; height: auto; background: transparent; box-shadow: none !important; }
.g-val { font-variant-numeric: tabular-nums; text-align: right; color: var(--text, #18181b); }
.g-seg { grid-column: 2 / 4; display: inline-flex; border: 1px solid var(--border, #e4e4e7); border-radius: 8px; overflow: hidden; }
.g-seg button { flex: 1; border: 0; background: transparent; font: inherit; font-size: 12px; padding: 3px 6px; cursor: pointer; color: var(--muted, #71717a); }
.g-seg button.on { background: var(--accent, #6d28d9); color: #fff; }
.g-actions { grid-template-columns: auto auto; justify-content: end; }

/* ---- graph search ---- */
.g-search { position: absolute; top: 8px; left: 8px; z-index: 2; width: min(460px, calc(100% - 120px)); }
.g-qrow { display: flex; align-items: center; gap: 6px; background: var(--surface, #fff); border: 1px solid var(--border, #e4e4e7); border-radius: 10px; padding: 0 8px; height: 34px; color: var(--muted, #71717a); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.g-qrow:focus-within { border-color: var(--accent, #6d28d9); }
.g-q, .g-q:focus { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; outline: 0; background: transparent; font: inherit; font-size: 13px; padding: 0; height: auto; color: var(--text, #18181b); }
.g-count { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-step { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; color: var(--muted, #71717a); border-radius: 6px; }
.g-step:hover { background: var(--surface-2, #f4f4f5); color: var(--text, #18181b); }
.g-only { border: 1px solid var(--border, #e4e4e7); background: transparent; border-radius: 999px; font: inherit; font-size: 11px; padding: 2px 8px; cursor: pointer; white-space: nowrap; color: var(--muted, #71717a); }
.g-only.on { background: var(--accent, #6d28d9); border-color: var(--accent, #6d28d9); color: #fff; }
.g-results { margin-top: 4px; background: var(--surface, #fff); border: 1px solid var(--border, #e4e4e7); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); overflow: hidden; }
.g-hit { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-size: 13px; padding: 6px 10px; cursor: pointer; color: var(--text, #18181b); }
.g-hit:hover { background: var(--surface-2, #f4f4f5); }
.g-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.g-kind { margin-left: auto; font-size: 11px; color: var(--muted, #71717a); }
.g-sep { padding: 6px 10px 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #71717a); border-top: 1px solid var(--border, #e4e4e7); }
a.g-hit { text-decoration: none; }

/* ---- visibility & sharing ---- */
.vis-ico { display: inline-flex; align-items: center; color: var(--muted, #71717a); }
.vis-ico.vis-private { color: #b45309; }
.vis-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vis-opt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border, #e4e4e7); background: transparent; border-radius: 8px; padding: 6px 4px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text, #18181b); }
.vis-opt.on { border-color: var(--accent, #6d28d9); background: color-mix(in srgb, var(--accent, #6d28d9) 10%, transparent); color: var(--accent, #6d28d9); font-weight: 600; }
.vis-opt:disabled { cursor: default; opacity: .7; }

/* ---- slugs ---- */
.slug-row { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: 100%; }
.slug-row a { overflow-wrap: anywhere; }
.slug-btn { border: 0; background: none; padding: 2px; color: var(--muted, #71717a); cursor: pointer; border-radius: 4px; }
.slug-btn:hover { background: var(--surface-2, #f4f4f5); color: var(--text, #18181b); }
.slug-input { width: 150px; font-size: 12px; padding: 2px 6px !important; height: auto !important; }
/* About uses the same type, surfaces and compact controls as the outline. */
.about-block { padding: 16px; margin-bottom: 16px; }
.about-block .section-title { font-size: 16px; margin: 0 0 12px; }
.about-section { border-top: 1px solid var(--line); padding: 12px 0; }
.about-section > summary { cursor: pointer; font-weight: 600; min-height: 40px; }
.about-section > summary span { margin-left: 12px; font-weight: 400; }
.about-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.about-controls input { max-width: 180px; }
.about-pin { display: flex; align-items: center; gap: 8px; padding: 8px; }
.ask-done .card-title, .ask-done.node-title, a.ask-done, .kind-ask[data-status="done"] > .ol-line .ol-view { text-decoration: line-through; }
.pin-control { position: relative; font-size: 12px; }
.pin-control summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.pin-control[open] > div { position: absolute; z-index: 20; background: var(--bg); border: 1px solid var(--line); padding: 8px; min-width: 180px; display: flex; flex-direction: column; gap: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.person-preview { position: fixed; z-index: 100; width: 288px; padding: 16px; pointer-events: none; box-shadow: var(--shadow-pop); }
.person-preview p { margin: 8px 0 0; }

.about-move { max-width: 100%; min-width: 0; }
.about-move select { max-width: 100%; min-width: 0; width: 240px; }

.pt-ask { display: block; max-width: 280px; margin-top: 4px; white-space: normal; font-size: 12px; }

/* ---- canonical path + other paths ---- */
.crumbs-wrap { margin-bottom: 16px; }
.crumbs-wrap .crumbs { margin-bottom: 0; }
.crumb-more { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0 2px; }
.crumb-more:hover { color: var(--fg); text-decoration: underline; }
.other-paths-btn { margin-left: 8px; border: 1px dashed var(--border, #e4e4e7); background: transparent; color: var(--muted); border-radius: 999px; font: inherit; font-size: 12px; padding: 1px 8px; cursor: pointer; }
.other-paths-btn:hover, .other-paths-btn[aria-expanded=true] { color: var(--fg); border-style: solid; }
.other-paths { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--border, #e4e4e7); border-radius: 10px; background: var(--surface, #fff); }
.other-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.other-path a { color: var(--muted); max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.other-path a:hover { color: var(--fg); }
.other-path .current { color: var(--fg); }
