/* =====================================================================
   STF Research (Labsboard) — embedded styles
   The Labsboard runs INSIDE the platform's own shell (sidebar + topbar +
   identity switcher + theme). Its component CSS is scoped to .labs-root via
   @scope so the platform's generic class names never collide, and every
   Labs token is bridged onto the platform's design tokens here, so light /
   dark mode and the amber Research accent flow through automatically.
   The Labsboard's own .shell / .sidebar / .topbar / .login rules are kept
   but inert — that markup is never rendered (the platform owns the frame).
   ===================================================================== */

.labs-root {
  /* surfaces */
  --canvas: var(--bg-1);
  --bg: var(--bg-1);
  --surface: var(--bg-2);
  --surface-2: var(--bg-3);
  --rail: var(--bg-2);
  --bg-4: color-mix(in srgb, var(--bg-3) 86%, var(--fg-1));

  /* borders */
  --hairline: var(--border-1);
  --rule: var(--border-2);
  --border: var(--border-1);
  --border-soft: var(--border-1);
  --border-strong: var(--border-2);

  /* text */
  --text: var(--fg-1);
  --text-2: var(--fg-2);
  --text-3: var(--fg-3);

  /* Research identity accent = studio amber; washes use transparency so
     they read correctly in BOTH light and dark themes. */
  --amber: var(--stf-amber);
  --amber-faint: color-mix(in srgb, var(--stf-amber) 16%, transparent);
  --success: var(--stf-success);
  --success-faint: color-mix(in srgb, var(--stf-success) 14%, transparent);
  --accent: var(--stf-amber);
  --accent-faint: color-mix(in srgb, var(--stf-amber) 16%, transparent);
  --accent-soft: color-mix(in srgb, var(--stf-amber) 16%, transparent);
  --accent-press: color-mix(in srgb, var(--stf-amber) 82%, #000);
  --accent-text: #20180c;
  --pin: var(--stf-amber);
  --pin-soft: color-mix(in srgb, var(--stf-amber) 16%, transparent);
  --posted: var(--stf-success);
  --posted-soft: color-mix(in srgb, var(--stf-success) 14%, transparent);
  --vote-on: var(--stf-amber);

  /* geometry — Labs aliased --radius-sm to the platform's 8px control radius */
  --content-w: 1180px;
  --radius: var(--radius-lg);
  --radius-sm: var(--radius-md);
  --row-pad-y: 18px;
  --thumb: 96px;
  --safe-bottom: 0px;

  /* let the embedded board fill the platform content column, with the same
     breathing room as the platform's own .tb-scroll-pad pages */
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 30px 36px 64px;
}

/* labs manager banner — same visual as Content manager, at top of dashboard */
.labs-root .labs-mgr { margin: 0; }
.stf-mgr-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

@scope (.labs-root) {
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }
.mono { font-family: var(--font-mono); }

/* ---------------- App layout ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--rail);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 21px;
  letter-spacing: 0;
  color: var(--text);
}
.brand-sub {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--text-2);
}
.brand-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); align-self: center; }

.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-item .ico { color: inherit; flex-shrink: 0; }
.nav-item .count {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-3);
}
.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3);
  padding: 16px 24px 6px;
}

.sidebar-spacer { flex: 1; }

/* account block at bottom */
.account {
  margin: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  position: relative;
}
.account-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--radius-sm);
  transition: background .14s;
}
.account-btn:hover { background: var(--surface-2); }
.account-info { text-align: left; min-width: 0; flex: 1; }
.account-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-role { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
.account-chev { color: var(--text-3); flex-shrink: 0; }

/* main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 18px;
}
.topbar-title { font-family: var(--font-display); font-weight: 300; font-size: 19px; letter-spacing: -0.01em; }
.crumbs { display: flex; align-items: center; gap: 9px; min-width: 0; }
.crumb-root { font-size: 13px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.crumb-sep { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); opacity: 0.55; }
.crumb-cur { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: -0.005em; white-space: nowrap; }
.topbar-sub { color: var(--text-2); font-size: 13px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.content { flex: 1; padding: 34px 36px 90px; }
.content-inner { max-width: var(--content-w); margin: 0 auto; }

/* search */
.searchbar {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text-3);
  min-width: 220px;
  transition: border-color .14s, background .14s;
}
.searchbar:focus-within { border-color: var(--accent); background: var(--surface); }
.searchbar input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13.5px; }
.searchbar input::placeholder { color: var(--text-3); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
  transition: background .16s, border-color .16s, color .16s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: scale(0.99); }
.btn-primary { background: var(--bg-4); color: var(--text); border-color: var(--border-strong); }
.btn-primary:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 42%, transparent); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 52%, transparent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-3); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* avatars */
.avatar {
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.01em;
  user-select: none;
}
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.md { width: 34px; height: 34px; font-size: 12px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--bg); margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-more {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface-2); color: var(--text-2);
  font-family: var(--font-mono); font-weight: 700; font-size: 9px;
  box-shadow: 0 0 0 2px var(--bg); margin-left: -7px;
}

.av-a { background: #586b78; } .av-b { background: #7d6358; }
.av-c { background: #5f7a5f; } .av-d { background: #7a6079; }
.av-e { background: #7c6e4d; } .av-f { background: #54707f; }
.av-g { background: #6e5752; } .av-h { background: #537073; }

/* ---------------- Feed rows (Reddit-style) ---------------- */
.feed-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.seg {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 3px;
}
.seg button {
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: background .14s, color .14s;
}
.seg button.active { background: var(--bg-4); color: var(--text); }
.feed-spacer { flex: 1; }
.feed-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.02em; }

.feed { display: flex; flex-direction: column; }

.group-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3);
  padding: 18px 4px 8px;
}
.group-label .line { flex: 1; height: 1px; background: var(--border-soft); }
.group-label.pinned { color: var(--pin); }

.row {
  display: grid;
  grid-template-columns: var(--thumb) 1fr auto;
  gap: 18px;
  padding: var(--row-pad-y) 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 10px;
  position: relative;
  transition: border-color .14s, box-shadow .14s, transform .14s, opacity .2s, background .14s;
  align-items: stretch;
}
.row > .thumb { align-self: stretch; height: auto; min-height: var(--thumb); border-radius: 10px; }
.row .row-body { align-self: center; }
.row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.row.is-pinned { background: var(--surface); border-color: color-mix(in srgb, var(--pin) 38%, var(--border)); }
.row.is-read { background: var(--bg); border-color: var(--border-soft); }
.row.is-read:hover { background: var(--surface); }
.row.is-read .row-title { color: var(--text-2); font-weight: 500; }
.row.is-read .row-summary { color: var(--text-3); }

/* unread / new — lit-up indicator until the item is read */
.new-dot {
  position: absolute; top: calc(var(--row-pad-y) - 3px); left: 14px; z-index: 4;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: newPulse 2.1s ease-out infinite; pointer-events: none;
}
.row.is-new > .thumb { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-faint); }
.row.is-new .row-title { font-weight: 700; }
@keyframes newPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .new-dot { animation: none; } }
/* posted-card new badge */
.posted-card.is-new { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.posted-new-dot { top: 12px; left: 12px; border-color: #fff; z-index: 5; }
.row.is-archived { opacity: 0.55; }
.row.is-archived:hover { opacity: 0.85; }
.row.is-archived .row-title { color: var(--text-2); }
.row.is-dragging { opacity: 0.4; }
.row.is-drop-before::before, .row.is-drop-after::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.row.is-drop-before::before { top: -5px; }
.row.is-drop-after::after { bottom: -5px; }
.row.drag-lift { box-shadow: var(--shadow-lg); transform: scale(1.01); z-index: 5; }
.row-click { cursor: pointer; }

/* slim drag handle column */
.row-handle {
  align-self: start;
  margin-top: 3px;
  color: var(--text-3);
  cursor: grab;
  opacity: 0;
  transition: opacity .14s, color .14s;
  display: inline-flex;
  justify-content: center;
}
.row:hover .row-handle { opacity: 0.55; }
.row-handle:hover { color: var(--text); opacity: 1; }
.row-handle:active { cursor: grabbing; }

/* inline read/pin markers in the title */
.pin-inline { color: var(--text-3); margin-right: 7px; vertical-align: -2px; }
.unread-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 9px; vertical-align: middle; }
.vote-btn {
  width: 30px; height: 26px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: background .14s, color .14s, transform .1s;
}
.vote-btn:hover { background: var(--surface-2); color: var(--accent); }
.vote-btn.on { color: var(--accent); }
.vote-btn.on:active { transform: scale(0.9); }
.vote-count { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text); }
.vote-count.on { color: var(--accent); }
.drag-handle {
  margin-top: 4px; color: var(--text-3); cursor: grab;
  opacity: 0; transition: opacity .14s, color .14s;
  display: inline-flex;
}
.row:hover .drag-handle { opacity: 0.8; }
.drag-handle:hover { color: var(--text); }
.drag-handle:active { cursor: grabbing; }

/* typed thumbnail */
.thumb {
  width: var(--thumb); height: var(--thumb);
  border-radius: 10px; overflow: hidden; position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* per-item color tile shown when no image is uploaded */
.cover-tile {
  border-color: transparent;
  background:
    linear-gradient(140deg,
      oklch(0.92 0.042 var(--cover-hue)),
      oklch(0.86 0.064 calc(var(--cover-hue) + 34)));
}
.cover-tile::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(140deg, transparent 0 11px, oklch(0.76 0.06 var(--cover-hue) / 0.30) 11px 12px);
}
html[data-theme="dark"] .cover-tile {
  background:
    linear-gradient(140deg,
      oklch(0.36 0.06 var(--cover-hue)),
      oklch(0.30 0.075 calc(var(--cover-hue) + 34)));
}
html[data-theme="dark"] .cover-tile::after {
  background-image: repeating-linear-gradient(140deg, transparent 0 11px, oklch(0.55 0.06 var(--cover-hue) / 0.22) 11px 12px);
}
.thumb-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.thumb-ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in oklab, currentColor 7%, transparent) 6px 7px);
}
.thumb-tag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 5px; border-radius: 4px;
  background: color-mix(in oklab, currentColor 14%, var(--surface));
  z-index: 1;
}
.thumb.t-paper { color: oklch(0.55 0.1 256); }
.thumb.t-repo { color: oklch(0.55 0.1 290); }
.thumb.t-tool { color: oklch(0.55 0.1 200); }
.thumb.t-dataset { color: oklch(0.55 0.1 150); }
.thumb.t-article { color: oklch(0.55 0.1 60); }
.thumb.t-video { color: oklch(0.55 0.12 25); }
.thumb.t-image { color: oklch(0.55 0.1 320); }
.thumb.t-html { color: oklch(0.55 0.1 256); }
.thumb.t-url { color: oklch(0.55 0.08 256); }
.thumb.t-file { color: oklch(0.5 0.02 256); }
html[data-theme="dark"] .thumb.t-paper { color: oklch(0.72 0.1 256); }
html[data-theme="dark"] .thumb.t-repo { color: oklch(0.72 0.1 290); }
html[data-theme="dark"] .thumb.t-tool { color: oklch(0.72 0.1 200); }
html[data-theme="dark"] .thumb.t-dataset { color: oklch(0.72 0.1 150); }
html[data-theme="dark"] .thumb.t-article { color: oklch(0.72 0.1 60); }
html[data-theme="dark"] .thumb.t-video { color: oklch(0.72 0.12 25); }
html[data-theme="dark"] .thumb.t-image { color: oklch(0.72 0.1 320); }
html[data-theme="dark"] .thumb.t-html { color: oklch(0.72 0.1 256); }
html[data-theme="dark"] .thumb.t-url { color: oklch(0.72 0.08 256); }
html[data-theme="dark"] .thumb.t-file { color: oklch(0.7 0.02 256); }

.thumb.sm { width: 54px; height: 54px; }
.thumb.lg { width: 96px; height: 96px; }

/* row body */
.row-body { min-width: 0; }
.row-eyebrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  letter-spacing: 0.02em; margin-bottom: 3px;
}
.row-type {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-2);
}
.row-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.row-title {
  font-family: var(--font-sans);
  font-size: 16.5px; font-weight: 600; line-height: 1.3;
  letter-spacing: -0.008em;
  color: var(--text);
  cursor: pointer;
  text-wrap: pretty;
}
.row-title:hover { color: var(--accent); }
.row-summary {
  color: var(--text-2); font-size: 13px; line-height: 1.5;
  margin-top: 4px; max-width: 74ch;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-footer {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 10px;
}
.row-stat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
}
.row-stat .ico { color: var(--text-3); }
.row-stat:hover { color: var(--text); }
.row-stat.link:hover .ico { color: var(--accent); }
.row-stat.link:hover { color: var(--accent); }
.row-stat.unread, .row-stat.unread .ico { color: var(--accent); }
.row-stat.unread { font-weight: 600; }
.row-stat.liked .ico { color: var(--accent); fill: var(--accent); }
.row-stat.liked { color: var(--accent); }
.byline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.byline b { color: var(--text); font-weight: 600; }

.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border-soft);
}
.tag:hover { border-color: var(--border-strong); color: var(--text); }

/* row right rail */
.row-aside {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px;
  min-width: 0;
}
.row-aside-top { display: flex; align-items: center; gap: 4px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border-soft);
}
.status-pill .sdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-exploring { color: var(--text-2); }
.status-active { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* status doubles as an activate/deactivate toggle on hover */
.status-toggle { cursor: pointer; transition: background .14s, color .14s, border-color .14s; }
.status-toggle .lbl-action { display: none; }
.status-toggle:hover .lbl-status { display: none; }
.status-toggle:hover .lbl-action { display: inline; }
.status-exploring.status-toggle:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.status-exploring.status-toggle:hover .sdot { background: var(--accent); }
.status-active.status-toggle:hover { background: var(--surface-2); color: var(--text-2); border-color: var(--border-strong); }
.status-active.status-toggle:hover .sdot { background: var(--text-3); }

.collab { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.collab-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }

.menu-btn { color: var(--text-3); }
.menu-btn:hover { color: var(--text); }

/* pin badge corner */
.pin-flag {
  position: absolute; top: -7px; left: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px 3px 7px; border-radius: 999px;
  background: var(--pin); color: #fff;
  box-shadow: var(--shadow-sm);
}

/* join/research button */
.join-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text);
  transition: all .14s;
}
.join-btn:hover { border-color: var(--accent); color: var(--accent); }
.join-btn.joined { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------------- Dropdown menu ---------------- */
.menu {
  position: absolute; z-index: 220;
  min-width: 188px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 6px; overflow: hidden;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 7px;
  font-size: 13px; color: var(--text);
  transition: background .12s;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item .ico { color: var(--text-2); }
.menu-item.danger { color: oklch(0.55 0.18 25); }
.menu-item.danger .ico { color: oklch(0.55 0.18 25); }
.menu-sep { height: 1px; background: var(--border-soft); margin: 5px 4px; }

/* ---------------- Workshop (Idea detail) ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12,12,16,0.5);
  backdrop-filter: blur(2px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 40px 24px;
  overflow-y: auto;
  animation: fade .18s ease;
}

.workshop {
  background: var(--bg);
  width: 100%; max-width: 920px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: rise .26s cubic-bezier(.2,.8,.2,1);
  margin: auto 0;
}

.ws-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
.ws-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ws-close { position: absolute; top: 18px; right: 18px; }
.ws-title { font-family: var(--font-display); font-size: 26px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; max-width: 92%; text-wrap: balance; }
.ws-desc { color: var(--text-2); font-size: 15px; line-height: 1.6; margin-top: 10px; max-width: 70ch; }
.ws-metarow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.ws-people { display: flex; align-items: center; gap: 10px; }
.ws-people-label { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }

.ws-tabs {
  display: flex; gap: 4px; padding: 0 26px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
  position: sticky; top: 0; z-index: 2;
}
.ws-tab {
  position: relative; height: 46px; padding: 0 4px; margin-right: 22px;
  font-size: 14px; font-weight: 600; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .14s;
}
.ws-tab:hover { color: var(--text-2); }
.ws-tab.active { color: var(--text); }
.ws-tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--text); border-radius: 2px;
}
.ws-tab .cbadge { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.ws-tab.minor { margin-left: auto; margin-right: 0; font-weight: 500; font-size: 13px; color: var(--text-3); }
.ws-tab.minor.active { color: var(--text-2); }
.ws-tab.minor.active::after { background: var(--text-3); }
.ws-body { padding: 22px 26px 26px; min-height: 280px; }

/* related research list */
.link-card {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center;
  padding: 13px 14px; border: 1px solid var(--border-soft); border-radius: 10px;
  margin-bottom: 8px; background: var(--surface);
  transition: border-color .14s;
}
.link-card:hover { border-color: var(--border-strong); }
.link-icon {
  width: 40px; height: 40px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-2);
}
.link-title { font-weight: 600; font-size: 14px; }
.link-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.link-open { color: var(--text-3); }
.link-card:hover .link-open { color: var(--accent); }

/* discussion */
.msg { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 10px 0; }
.msg-body .who { font-weight: 600; font-size: 13.5px; margin-right: 8px; }
.msg-body .when { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.msg-text { font-size: 14px; line-height: 1.55; margin-top: 3px; color: var(--text); text-wrap: pretty; }
.msg-img {
  margin-top: 8px; width: min(360px, 70%); aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border-soft); position: relative;
}

/* prototype versions */
.proto-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.version {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border-soft); align-items: start;
}
.version:last-child { border-bottom: 0; }
.version-thumb { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; position: relative; background: var(--surface-2); border: 1px solid var(--border-soft); }
.version-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-tagline { display: flex; align-items: center; gap: 8px; }
.v-pill { font-family: var(--font-mono); font-size: 10px; font-weight: 700; background: var(--text); color: var(--bg); padding: 2px 7px; border-radius: 5px; letter-spacing: 0.04em; }
.v-pill.latest { background: var(--accent); color: var(--accent-text); }
.v-name { font-weight: 600; font-size: 14px; }
.v-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: 3px; }
.v-notes { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }

/* composer */
.composer {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 8px 8px 14px; background: var(--surface);
  margin-top: 14px;
}
.composer:focus-within { border-color: var(--accent); }
.composer input { flex: 1; background: transparent; border: 0; outline: 0; font-size: 14px; color: var(--text); }
.composer input::placeholder { color: var(--text-3); }

/* ---------------- Posted cards ---------------- */
.posted-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.posted-card {
  position: relative;
  border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column;
  transition: border-color .14s, box-shadow .14s;
}
.posted-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.posted-media { aspect-ratio: 16/10; position: relative; background: var(--surface-2); }
.posted-platform {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(12,12,16,0.62); color: #fff; backdrop-filter: blur(8px);
}
.posted-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.posted-caption { font-size: 14px; line-height: 1.5; color: var(--text); text-wrap: pretty; }
.posted-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-soft); border-radius: 9px; overflow: hidden; }
.pm { background: var(--surface); padding: 9px 6px; text-align: center; }
.pm-num { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.pm-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.posted-contrib { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid var(--border-soft); border-radius: 9px; }
.posted-contrib .pc-type { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.posted-contrib .pc-type .ico { color: var(--text-3); opacity: 0.85; }
.posted-contrib .pc-val { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); white-space: nowrap; }
.posted-contrib .pc-val b { color: var(--text); font-weight: 700; }
.posted-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

/* ---------------- Dashboard ---------------- */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 16px 18px; }
.kpi-label { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); letter-spacing: 0.06em; text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.kpi-value { font-family: var(--font-sans); font-size: 32px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 8px; line-height: 1; }
.kpi-sub { font-size: 12px; color: var(--text-2); margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.kpi-sub .up { color: var(--posted); font-weight: 600; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.panel-title { font-family: var(--font-sans); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.panel-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
.panel-body { padding: 4px 8px 8px; }

.mini {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 11px 10px; border-radius: 9px; transition: background .12s; cursor: pointer;
}
.mini:hover { background: var(--surface-2); }
.mini.pinned { background: var(--accent-soft); }
.mini.pinned:hover { background: color-mix(in oklab, var(--accent) 16%, transparent); }
.mini-pin { color: var(--accent); display: inline-flex; }
.mini-pin.off { color: var(--text-3); opacity: 0; transition: opacity .12s; }
.mini:hover .mini-pin.off { opacity: 0.7; }
.mini-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; position: relative; background: var(--surface-2); border: 1px solid var(--border-soft); }
.mini-thumb .thumb { width: 100%; height: 100%; border: 0; border-radius: 0; }
.mini-thumb .thumb-tag { font-size: 8px; padding: 1px 3px; letter-spacing: 0.04em; }
.mini-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.mini-right { display: flex; align-items: center; gap: 8px; }

.chart-card { grid-column: 1 / -1; }
.chart-wrap { padding: 8px 18px 18px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); margin-top: 6px; padding: 0 18px 16px; }
.chart-legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

.lb-row { display: grid; grid-template-columns: 20px 34px 1fr auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 9px; }
.lb-row:hover { background: var(--surface-2); }
.lb-rank { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); font-weight: 700; text-align: center; }
.lb-name { font-weight: 600; font-size: 13.5px; }
.lb-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.lb-num { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.lb-num small { color: var(--text-3); font-weight: 400; font-size: 10px; }

/* ---------------- Modal (compose / add) ---------------- */
.modal-back {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(12,12,16,0.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .18s ease;
}
.modal {
  background: var(--bg); width: 100%; max-width: 540px;
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: rise .24s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; max-height: 88vh;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-title { font-family: var(--font-sans); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------- Find detail overlay ---------------- */
.find-detail { max-width: 600px; }
.find-detail-media {
  position: relative; width: 100%; flex: none;
  height: clamp(150px, 32vh, 300px);
  background: var(--surface); overflow: hidden;
}
.find-detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.find-detail-media .thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 0; border: 0; min-height: 0;
}
.find-detail-x {
  position: absolute; top: 12px; right: 12px;
  background: rgba(12,12,16,0.55); color: #fff;
}
.find-detail-x:hover { background: rgba(12,12,16,0.78); }
.find-detail-body { padding: 18px 22px 6px; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.find-detail-title {
  font-family: var(--font-sans); font-weight: 600; font-size: 20px;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--text); text-wrap: balance;
}
.find-detail-byline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3); margin-top: 9px;
}
.find-detail-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-2); margin-top: 18px;
}
.find-detail-summary {
  font-size: 14px; line-height: 1.68; color: var(--text);
  margin: 7px 0 0; text-wrap: pretty; white-space: pre-wrap;
}
.find-detail-summary.muted { color: var(--text-3); }
.find-detail-source {
  margin-right: auto; align-self: center; font-size: 11px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 58%;
}

/* report-upload empty state — droppable */
.empty-drop { transition: border-color .14s, background .14s, color .14s; border-radius: 12px; }
.empty-drop.over {
  border: 1.5px dashed var(--accent);
  background: var(--accent-faint);
  color: var(--text);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 11px 13px; font-size: 14px; color: var(--text); outline: none; resize: vertical;
  transition: border-color .14s, background .14s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.type-opt {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border-soft);
  background: var(--surface-2); font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: all .12s;
}
.type-opt:hover { border-color: var(--border-strong); }
.type-opt.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: 12px;
  padding: 28px; text-align: center; color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--surface-2); transition: border-color .14s, background .14s;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .ph { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* image thumbnail dropzone */
.img-drop {
  position: relative; cursor: pointer; min-height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 18px; font-size: 13px;
}
.img-drop:hover { border-color: var(--border-strong); }
.img-drop.has-img { padding: 0; border-style: solid; border-color: var(--border-soft); overflow: hidden; background: var(--surface-2); }
.img-drop-preview { width: 100%; max-height: 220px; object-fit: contain; display: block; }
.img-drop-clear {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 0; cursor: pointer;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  backdrop-filter: blur(4px); color: var(--text);
}
.img-drop-clear:hover { background: var(--surface); }

/* ---------------- Login ---------------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 500px at 20% -10%, color-mix(in oklab, var(--accent) 8%, transparent), transparent),
    var(--canvas);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-md);
  padding: 40px 36px; text-align: center;
}
.login-mark { display: flex; align-items: baseline; gap: 8px; justify-content: center; margin-bottom: 6px; }
.login-mark .brand-mark { font-size: 30px; }
.login-mark .brand-sub { font-size: 21px; }
.login-tag { color: var(--text-2); font-size: 14px; margin-bottom: 30px; line-height: 1.5; }
.gbtn {
  width: 100%; height: 48px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 15px; font-weight: 500; color: var(--text); transition: background .14s, box-shadow .14s;
}
.gbtn:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.login-foot { margin-top: 26px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.login-accounts { margin-top: 22px; border-top: 1px solid var(--border-soft); padding-top: 18px; text-align: left; }
.login-accounts-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.acct-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.acct-row:hover { background: var(--surface-2); }
.acct-meta { min-width: 0; flex: 1; }
.acct-name { font-size: 13.5px; font-weight: 600; }
.acct-email { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* ---------------- Popover (account switch) ---------------- */
.popover {
  position: absolute; bottom: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; z-index: 120;
  max-height: 360px; overflow-y: auto;
}
.pop-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; width: 100%; text-align: left; transition: background .12s; }
.pop-item:hover { background: var(--surface-2); }
.pop-item.active { background: var(--accent-soft); }
.pop-name { font-size: 13px; font-weight: 600; }
.pop-email { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.pop-role { margin-left: auto; font-family: var(--font-mono); font-size: 9px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); letter-spacing: 0.04em; text-transform: uppercase; }
.pop-sep { height: 1px; background: var(--border-soft); margin: 5px 4px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  z-index: 400; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 9px;
  animation: toastin .25s cubic-bezier(.2,.8,.2,1);
}


/* ---- Idea page (full-page view, replaces Workshop overlay) ---------- */
.idea-page {
  max-width: 920px;
  margin: 0 auto;
}

.idea-page-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 0;
  position: relative;
}

.idea-page-toprow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}

.idea-page-byline {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  letter-spacing: 0.02em;
}
.idea-page-byline b { color: var(--text-2); font-weight: 600; }

.idea-page-settings-wrap { position: relative; }

.idea-edit-form { margin-bottom: 16px; }
.idea-edit-title {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 11px 14px; font-family: var(--font-display);
  font-size: 22px; font-weight: 300; letter-spacing: -0.02em;
  color: var(--text); outline: none; margin-bottom: 10px;
  transition: border-color .14s;
}
.idea-edit-title:focus { border-color: var(--accent); }
.idea-edit-desc {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 11px 14px; font-size: 14px; color: var(--text);
  outline: none; resize: vertical; line-height: 1.55;
  transition: border-color .14s;
}
.idea-edit-desc:focus { border-color: var(--accent); }
.idea-edit-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px;
}

.idea-page-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 300;
  letter-spacing: -0.025em; line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 10px; color: var(--text);
}

.idea-page-desc {
  color: var(--text-2); font-size: 15px; line-height: 1.6;
  max-width: 70ch; margin: 0 0 18px; text-wrap: pretty;
}

.idea-page-people-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.idea-people-label {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase;
}

/* sticky tabs — sits below the platform topbar (44px) */
.idea-page-tabs-bar {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--canvas);
  position: sticky; top: 44px; z-index: 10;
  margin: 0 -36px;
  padding: 0 36px;
}

.idea-ptab {
  position: relative; height: 46px; padding: 0 4px; margin-right: 22px;
  font-size: 14px; font-weight: 600; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .14s; white-space: nowrap;
}
.idea-ptab:hover { color: var(--text-2); }
.idea-ptab.active { color: var(--text); }
.idea-ptab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--text); border-radius: 2px;
}
.idea-ptab .cbadge {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
}
.idea-ptab.minor {
  margin-left: auto; margin-right: 0;
  font-weight: 500; font-size: 13px; color: var(--text-3);
}
.idea-ptab.minor.active { color: var(--text-2); }
.idea-ptab.minor.active::after { background: var(--text-3); }

.idea-page-body {
  padding: 22px 0 60px;
}

/* image-drop hover on find/idea rows */
.row.img-over {
  border-color: var(--accent) !important;
  background: var(--accent-faint) !important;
  box-shadow: 0 0 0 3px var(--accent-faint) !important;
}
.row.img-over .thumb {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

/* drag floater (touch) */
.drag-floater { position: fixed; pointer-events: none; z-index: 999; width: 320px; transform: translate(-50%, -50%); box-shadow: var(--shadow-lg); border-radius: 12px; opacity: 0.95; }

/* empty state */
.empty { text-align: center; padding: 70px 24px; color: var(--text-2); }
.empty .ico { color: var(--text-3); margin-bottom: 14px; }
.empty h3 { font-family: var(--font-display); font-weight: 300; font-size: 23px; letter-spacing: -0.02em; color: var(--text); margin: 0 0 6px; }

/* helpers */
.row-flex { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-2); }
.mut3 { color: var(--text-3); }
.spacer { flex: 1; }
.hide-scroll::-webkit-scrollbar { width: 0; height: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.section-h1 { font-family: var(--font-display); font-size: 27px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.05; }
.section-intro { color: var(--text-2); font-size: 13px; margin-top: 4px; max-width: 60ch; }
.section-head-actions { display: flex; align-items: center; gap: 10px; }
.section-head-actions .searchbar { max-width: 240px; }

/* mobile menu toggle (hidden on desktop) */
.menu-toggle { display: none; }
.scrim { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  :root { --sidebar-w: 240px; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
    box-shadow: var(--shadow-lg);
  }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 35; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 80px; }
  .row { grid-template-columns: 64px 1fr; gap: 14px; padding: 14px; }
  .row-aside { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }
  .row > .thumb { min-height: 64px; }
  .overlay { padding: 0; }
  .workshop { border-radius: 0; min-height: 100vh; max-width: 100%; }
  .posted-grid { grid-template-columns: 1fr; }
  .ws-title { font-size: 21px; }
}
@media (max-width: 460px) {
  .row { grid-template-columns: 1fr; }
  .row .thumb { display: none; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
}

/* ---- global keyframes (hoisted out of @scope) ---- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
