/*
 * Stash AI Initiatives dashboard — ported verbatim from the legacy
 * `src/App.jsx` CSS template-literal so the Rails app matches the existing
 * UI pixel-for-pixel. New rules at the bottom for the admin namespace and
 * for the Rails-specific deep-link target highlight.
 */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,400&display=swap");

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

:root {
  --bg:#0f1724;--bg2:#162032;--bg3:#1c2840;--border:rgba(255,255,255,0.07);
  --gold:#E18A26;--gold-light:#F2A954;--gold-dim:rgba(225,138,38,0.14);
  --white:#FFFFFF;--t1:rgba(255,255,255,0.92);--t2:rgba(255,255,255,0.55);--t3:rgba(255,255,255,0.3);
  --green:#34D399;--green-bg:rgba(52,211,153,0.12);--green-t:#059669;
  --blue:#60A5FA;--blue-bg:rgba(96,165,250,0.12);--blue-t:#3B82F6;
  --amber:#FBBF24;--amber-bg:rgba(251,191,36,0.12);--amber-t:#D97706;
  --orange:#FB923C;--orange-bg:rgba(251,146,60,0.12);--orange-t:#EA580C;
  --purple:#A78BFA;--purple-bg:rgba(167,139,250,0.12);--purple-t:#7C3AED;
  --red:#F87171;--red-bg:rgba(248,113,113,0.12);--red-t:#DC2626;
  --slate:#94A3B8;--slate-bg:rgba(148,163,184,0.08);
  --cyan:#22D3EE;--cyan-bg:rgba(34,211,238,0.12);
}
html { scroll-behavior: smooth }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--t1); min-height: 100vh }
/* Base link colour: without it, any link with no class of its own fell back to the browser's dark blue, unreadable on
   this dark background. :where() keeps this at zero specificity, so any styled link (buttons, chips, tabs) still wins. */
:where(a), :where(a:visited) { color: var(--gold-light) }

/* LOGIN */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg);
  background-image: radial-gradient(ellipse 70% 55% at 50% 115%, rgba(225,138,38,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 45% 65% at 82% 8%, rgba(30,50,90,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 12% 90%, rgba(225,138,38,0.06) 0%, transparent 70%);
  position: relative; overflow: hidden }
.login-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(0,0,0,0.35) 100%) }
.login-card { position: relative; background: linear-gradient(180deg, rgba(28,40,64,0.65) 0%, var(--bg2) 100%);
  border: 1px solid var(--border); border-radius: 20px; padding: 44px 40px 28px; width: 380px; max-width: 100%; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset; backdrop-filter: blur(8px) }
.login-card::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 72px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); border-radius: 0 0 4px 4px }
.login-mark { display: flex; justify-content: center; margin: 0 auto 22px;
  filter: drop-shadow(0 6px 22px rgba(225,138,38,0.22)) }
.login-mark img { width: 230px; max-width: 100%; height: auto; display: block }
.login-eyebrow { display: inline-block; font-size: 10px; font-weight: 700; color: var(--gold); background: var(--gold-dim);
  padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 12px }
.login-title { font-family: 'Fraunces', serif; font-size: 26px; color: var(--white); font-weight: 400; margin-bottom: 6px; letter-spacing: -0.2px }
.login-sub { font-size: 13px; color: var(--t2); margin-bottom: 24px }
.login-divider { height: 1px; background: var(--border); margin: 0 -8px 24px }
.login-input { width: 100%; padding: 13px 16px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px;
  color: var(--white); font-family: 'DM Sans', sans-serif; font-size: 15px; margin-bottom: 12px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s }
.login-input:hover { background: rgba(255,255,255,0.06) }
.login-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); background: rgba(255,255,255,0.06) }
.login-input::placeholder { color: var(--t3) }
.login-btn { width: 100%; padding: 13px; background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #fff; border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; letter-spacing: 0.2px;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 6px 18px rgba(225,138,38,0.3), 0 1px 0 rgba(255,255,255,0.35) inset }
.login-btn:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(225,138,38,0.4), 0 1px 0 rgba(255,255,255,0.45) inset }
.login-btn:active { transform: scale(0.98) }
.login-err { color: var(--red); font-size: 12px; margin-top: 12px }
.login-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--t3); letter-spacing: 0.3px }
.login-foot span { color: var(--gold); opacity: 0.85 }
.login-btn.login-ms { display: flex; align-items: center; justify-content: center; gap: 10px }
.login-btn.login-ms svg { flex: 0 0 auto; background: #fff; padding: 2px; border-radius: 3px }
.login-ok { color: var(--green); font-size: 12px; margin-bottom: 12px }
.login-card .login-err { margin: 0 0 12px }
.login-note { font-size: 11px; color: var(--t3); margin-top: 14px }

/* HEADER */
.header { padding: 24px 40px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border) }
.header-left { display: flex; align-items: center; gap: 14px }
.header-brand { font-family: 'Fraunces', serif; font-size: 18px; color: var(--t1); font-weight: 400; display: inline-flex; align-items: center; gap: 10px }
.header-brand .header-title { color: var(--gold) }
.header-logo { height: 30px; width: auto; display: block }
.header-slash { color: var(--t3); margin: 0 4px; font-weight: 300 }
.header-sub { font-size: 14px; color: var(--t2); font-weight: 400 }
.header-right { display: flex; align-items: center; gap: 24px; font-size: 13px; color: var(--t3) }
.header-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px }
.header-right a { color: var(--t3); text-decoration: none }
.header-right a:hover { color: var(--gold) }

/* TAB BAR */
.tabs { display: flex; gap: 2px; padding: 0 40px; border-bottom: 1px solid var(--border); background: var(--bg) }
.tab { padding: 14px 18px; font-size: 13px; font-weight: 500; color: var(--t3); cursor: pointer; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s; text-decoration: none; white-space: nowrap }
.tab:hover { color: var(--t2) }
.tab.active { color: var(--gold); border-bottom-color: var(--gold) }
.tab-count { font-size: 10px; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--t3); padding: 1px 6px; border-radius: 10px; margin-left: 6px }
.tab.active .tab-count { background: var(--gold-dim); color: var(--gold) }

/* CONTENT */
.content { padding: 32px 40px 80px }

/* FLASH */
.flash { padding: 12px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 13px }
.flash.notice { background: var(--green-bg); color: var(--green); border: 1px solid rgba(52,211,153,0.25) }
.flash.alert  { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(248,113,113,0.25) }

/* SECTION TITLE */
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px }
.sec-badge { font-size: 11px; font-weight: 700; background: var(--gold-dim); color: var(--gold); padding: 4px 12px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 1px }
.sec-title { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 400; color: var(--t1) }
.sec-hint { margin-left: auto; font-size: 12px; color: var(--t3); font-style: italic }

/* PIPELINE BOARD */
.pipe-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 48px }
@media (max-width: 1200px) { .pipe-grid { grid-template-columns: repeat(3, 1fr) } }
@media (max-width: 800px)  { .pipe-grid { grid-template-columns: repeat(2, 1fr) } }
.pipe-col { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden }
.pipe-col-head { padding: 12px 16px; border-bottom: 2px solid currentColor }
.pipe-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px }
.pipe-col-sub { font-size: 10px; opacity: 0.6; margin-top: 2px }
.pipe-col-body { padding: 10px; display: flex; flex-direction: column; gap: 6px }
.pipe-chip { background: var(--bg3); border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 500;
  color: var(--t1); line-height: 1.35; cursor: pointer; transition: background 0.15s, transform 0.1s, border-color 0.15s;
  display: flex; flex-direction: column; gap: 5px; text-decoration: none }
.pipe-chip:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); transform: translateY(-1px) }
.pipe-chip[hidden] { display: none }
.pipe-chip-head { display: flex; align-items: flex-start; gap: 8px }
.pipe-chip-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px }
.pipe-chip-summary { margin: 0; font-size: 11px; font-weight: 400; color: var(--t2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.pipe-chip-sub { font-size: 9px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600 }
.pipe-p { font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; flex-shrink: 0; letter-spacing: 0.4px; line-height: 1.4 }
.pipe-p.p1 { background: var(--gold-dim); color: var(--gold) }
.pipe-p.p2 { background: var(--purple-bg); color: var(--purple) }
.pipe-p.p3 { background: var(--slate-bg); color: var(--slate) }
.pipe-p.maintenance { background: var(--cyan-bg); color: var(--cyan); text-transform: uppercase }
.pipe-p.complete { background: var(--green-bg); color: var(--green); text-transform: uppercase }

/* PIPELINE TOOLBAR (search + filter) */
.pipe-toolbar { margin-bottom: 14px }
.pipe-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px }
.pipe-filter { display: inline-flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--border);
  color: var(--t2); padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.15s, border-color 0.15s, color 0.15s }
.pipe-filter:hover { border-color: rgba(255,255,255,0.18); color: var(--t1) }
.pipe-filter.is-active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold-light) }
.pipe-search-wrap { display: flex; align-items: center; gap: 12px }
.pipe-search { flex: 1; max-width: 420px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 13px; color: var(--t1); font-size: 13px; font-family: inherit }
.pipe-search::placeholder { color: var(--t3) }
.pipe-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim) }
.pipe-result-count { font-size: 11px; color: var(--t3); font-weight: 600; white-space: nowrap }
.pipe-col-count { font-size: 11px; font-weight: 700; opacity: 0.7; margin-left: 4px }
.pipe-col-empty { color: var(--t3); font-size: 11px; font-style: italic; text-align: center; padding: 10px 6px }

/* PIPELINE LEGEND */
.pipe-legend { display: flex; align-items: center; gap: 18px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 14px; font-size: 11px; color: var(--t2); flex-wrap: wrap }
.pipe-legend-label { color: var(--t3); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; font-size: 10px }
.pipe-legend-item { display: inline-flex; align-items: center; gap: 6px }

/* DEPARTMENT COLUMNS */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 48px }
.dept-col { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 0; overflow: hidden }
.dept-col-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 10px }
.dept-col-name { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 400; color: var(--t1) }
.dept-col-meta { font-size: 11px; color: var(--t3); margin-left: auto }
.dept-col-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 14px }

/* DEPARTMENT INDEX TILES */
.dept-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 48px }
.dept-tile { display: flex; flex-direction: column; gap: 10px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px; text-decoration: none; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s }
.dept-tile:hover { border-color: rgba(255,255,255,0.16); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.28) }
.dept-tile-head { display: flex; align-items: center; gap: 10px }
.dept-tile-name { flex: 1; font-family: 'Fraunces', serif; font-size: 18px; font-weight: 400; color: var(--t1) }
.dept-tile-meta { font-size: 12px; color: var(--t2); line-height: 1.4 }
.dept-tile-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 11px; color: var(--t3) }
.dept-tile-count { color: var(--t2); font-weight: 600 }
.dept-tile-live { color: var(--green); background: var(--green-bg); padding: 2px 8px; border-radius: 10px; font-weight: 600 }
.dept-tile-arrow { margin-left: auto; color: var(--gold); font-weight: 600 }

/* DEPARTMENT DETAIL PAGE */
.sec-back { text-decoration: none; font-style: normal !important; color: var(--gold) !important }
.sec-back:hover { text-decoration: underline }
.dept-show-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--t2); margin-bottom: 24px }
.dept-show-dot { color: var(--t3) }
.dept-show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 48px; align-items: start }
.dept-show-grid .init-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px }
.dept-show-empty { font-size: 13px; color: var(--t3); padding: 24px 0 }

/* CONDENSED COMPLETE / MAINTENANCE LIST */
.done-head { font-family: 'Fraunces', serif; font-size: 14px; font-weight: 400; color: var(--t2);
  margin: 8px 0 12px; display: flex; align-items: center; gap: 8px; text-transform: none }
.done-count { font-size: 11px; font-weight: 600; color: var(--t3); background: var(--bg3); padding: 1px 8px; border-radius: 10px }
.done-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 48px }
.done-row { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; scroll-margin-top: 70px; transition: box-shadow 0.3s }
.done-row:target { box-shadow: 0 0 0 2px var(--gold), 0 0 20px var(--gold-dim); animation: init-flash 2.5s ease-out 1 }
.done-row .init-p { width: auto; min-width: 28px; height: 22px; padding: 0 8px; font-size: 10px; margin-top: 0 }
.done-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--t1) }
.done-row .init-status { margin-bottom: 0 }
.done-link { color: var(--blue); text-decoration: none; font-size: 14px }

.form-advanced { border-top: 1px solid var(--border); padding-top: 14px; margin: 6px 0 4px }
.form-advanced summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--t2); user-select: none }
.form-advanced summary:hover { color: var(--t1) }
.form-advanced[open] summary { margin-bottom: 14px }

/* SUBMISSIONS */
.submit-cta { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap }
.submit-cta-note { font-size: 12px; color: var(--t3) }
.sub-status { display: inline-flex; padding: 2px 9px; border-radius: 10px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px }
.sub-new { background: var(--gold-dim); color: var(--gold) }
.sub-reviewed { background: var(--blue-bg); color: var(--blue) }
.sub-promoted { background: var(--green-bg); color: var(--green) }
.sub-dismissed { background: var(--slate-bg); color: var(--slate) }
.sub-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--t2); margin-bottom: 12px }
.sub-from { font-size: 13px; color: var(--t2); margin-bottom: 12px }
.sub-body { font-size: 14px; line-height: 1.7; color: var(--t1); white-space: pre-wrap; margin-bottom: 12px }
.sub-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap }
.stat-badge { font-size: 11px; font-weight: 700; background: var(--gold-dim); color: var(--gold); padding: 2px 8px;
  border-radius: 10px; vertical-align: middle }

/* INITIATIVE CARDS (inside dept columns) */
.init-card { scroll-margin-top: 70px; transition: box-shadow 0.3s }
.init-card:target { box-shadow: 0 0 0 2px var(--gold), 0 0 20px var(--gold-dim); animation: init-flash 2.5s ease-out 1 }
@keyframes init-flash {
  0%   { box-shadow: 0 0 0 2px var(--gold), 0 0 20px var(--gold-dim) }
  85%  { box-shadow: 0 0 0 2px var(--gold), 0 0 20px var(--gold-dim) }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 0 transparent }
}
.init-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px }
.init-p { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px }
.init-p.p1 { background: var(--gold-dim); color: var(--gold) }
.init-p.p2 { background: var(--purple-bg); color: var(--purple) }
.init-p.p3 { background: var(--slate-bg); color: var(--slate) }
.init-p.maintenance { width: auto; height: auto; padding: 5px 10px; border-radius: 6px; font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.4px; background: var(--cyan-bg); color: var(--cyan) }
.init-p.complete { width: auto; height: auto; padding: 5px 10px; border-radius: 6px; font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.4px; background: var(--green-bg); color: var(--green) }
.init-name-wrap { flex: 1; min-width: 0 }
.init-name { font-size: 14px; font-weight: 600; color: var(--t1); line-height: 1.35 }
.init-sub { font-size: 10px; color: var(--t3); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600 }

.init-status { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.3px }
.st-live { background: var(--green-bg); color: var(--green) }
.st-dev  { background: var(--blue-bg);  color: var(--blue)  }
.st-queued { background: var(--orange-bg); color: var(--orange) }
.st-wish { background: var(--purple-bg); color: var(--purple-t) }
.st-archive { background: var(--slate-bg); color: var(--slate) }
.init-label { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-bottom: 8px;
  margin-left: 6px; text-transform: uppercase; letter-spacing: 0.5px; background: var(--gold-dim); color: var(--gold) }

.init-summary { font-size: 12px; line-height: 1.6; color: var(--t2); margin-bottom: 8px }
.init-more { margin-bottom: 8px }
.init-more > summary { cursor: pointer; font-size: 11px; font-weight: 600; color: var(--blue); user-select: none;
  list-style: none; display: inline-flex; align-items: center; gap: 5px }
.init-more > summary::-webkit-details-marker { display: none }
.init-more > summary::before { content: '\25B8'; font-size: 9px; transition: transform 0.15s }
.init-more[open] > summary::before { transform: rotate(90deg) }
.init-more > summary:hover { color: var(--t1) }
.init-more[open] > summary { margin-bottom: 8px }
.init-more:not([open]) .init-desc { display: none }
.init-more .init-desc { margin-bottom: 0 }
.init-desc { font-size: 12px; line-height: 1.6; color: var(--t2); margin-bottom: 8px; white-space: pre-wrap }
.init-waiting { font-size: 11px; font-weight: 600; color: var(--amber); line-height: 1.5 }
.init-meta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px }
.init-meta { font-size: 10px; color: var(--t3); background: var(--bg3); padding: 2px 8px; border-radius: 4px }
.init-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px }
.init-link { font-size: 11px; color: var(--blue); text-decoration: none; background: var(--blue-bg); padding: 2px 10px; border-radius: 12px; transition: background 0.15s }
.init-link:hover { background: rgba(96,165,250,0.2) }

/* TOOLS */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px }
.tool-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.2s }
.tool-card:hover { border-color: rgba(255,255,255,0.12) }
.tool-name { font-size: 14px; font-weight: 600; color: var(--t1) }
.tool-url { font-size: 12px; color: var(--blue); text-decoration: none; word-break: break-all }
.tool-url:hover { text-decoration: underline }
.tool-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px }
.tool-login { font-size: 11px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px;
  color: var(--t2); user-select: text }

.footer { text-align: center; font-size: 11px; color: var(--t3); padding: 32px 0 0 }

.divider { height: 1px; background: var(--border); margin: 8px 0 32px }

/* MOBILE */
@media (max-width: 640px) {
  .header { padding: 14px 16px 12px; flex-wrap: wrap; gap: 8px 12px; align-items: center }
  .header-left { flex: 1 1 auto; min-width: 0 }
  .header-brand { font-size: 15px; gap: 8px; flex-wrap: wrap; line-height: 1.2 }
  .header-logo { height: 24px }
  .header-slash { display: none }
  .header-right { gap: 10px; font-size: 11px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto }
  .header-right > span:nth-child(2) { display: none }
  .header-right > span:nth-child(3) { display: none }
  .header-right > .header-user { display: none }

  .tabs { padding: 0 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none }
  .tabs::-webkit-scrollbar { display: none }
  .tab { padding: 12px 12px; font-size: 12px }

  .content { padding: 20px 16px 60px }

  .sec-head { flex-wrap: wrap; gap: 10px; margin-bottom: 18px }
  .sec-title { font-size: 18px; line-height: 1.25 }
  .sec-hint { margin-left: 0; flex-basis: 100%; font-size: 11px }
  .sec-badge { font-size: 10px; padding: 3px 9px }

  .pipe-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px }
  .pipe-legend { gap: 10px; padding: 10px 12px }

  .dept-grid { grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px }
  .dept-col-head { padding: 14px 16px 10px; flex-wrap: wrap; gap: 6px }
  .dept-col-meta { margin-left: 0; flex-basis: 100% }
  .dept-col-body { padding: 12px 14px }

  .init-name { font-size: 13px }
  .init-desc { font-size: 12px }

  .tools-grid { grid-template-columns: 1fr; gap: 12px }
  .tool-card { padding: 14px 16px }

  .login-card { padding: 32px 24px 22px }
  .login-title { font-size: 22px }
}

/* ─── ADMIN ────────────────────────────────────────────────────────────── */

.admin-wrap { max-width: 1100px; margin: 0 auto }

.admin-actions { display: flex; gap: 10px; align-items: center; margin: 18px 0 22px; flex-wrap: wrap }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: var(--bg3); color: var(--t1);
  transition: background 0.15s, border-color 0.15s, filter 0.1s; font-family: 'DM Sans', sans-serif }
.btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16) }
.btn.primary { background: linear-gradient(180deg, var(--gold-light), var(--gold)); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(225,138,38,0.25) }
.btn.primary:hover { filter: brightness(1.06) }
.btn.danger { color: var(--red); border-color: rgba(248,113,113,0.25); background: var(--red-bg) }
.btn.danger:hover { background: rgba(248,113,113,0.2) }
.btn.ghost { background: transparent }

.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; font-size: 13px; vertical-align: top }
.admin-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3); background: var(--bg3);
  border-bottom: 1px solid var(--border); font-weight: 700 }
.admin-table tbody tr { border-top: 1px solid var(--border) }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02) }
.admin-table td.actions { white-space: nowrap; text-align: right }
.admin-table td.actions a, .admin-table td.actions button { margin-left: 6px }
.admin-table .muted { color: var(--t3) }

.form-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 26px 28px; max-width: 760px }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px }
.form-row.two { flex-direction: row; gap: 14px }
.form-row.two > div { flex: 1 }
.form-row label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3); font-weight: 700 }
.form-row input[type=text], .form-row input[type=url], .form-row input[type=number], .form-row textarea, .form-row select {
  width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px;
  color: var(--white); font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s }
.form-row textarea { min-height: 110px; resize: vertical; font-family: 'DM Sans', sans-serif; line-height: 1.5 }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim) }
.form-row .hint { font-size: 11px; color: var(--t3); margin-top: 2px }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px }

.form-errors { background: var(--red-bg); border: 1px solid rgba(248,113,113,0.25); color: var(--red);
  padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px }
.form-errors ul { margin-left: 18px }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 32px }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px }
.stat-num { font-family: 'Fraunces', serif; font-size: 32px; color: var(--gold) }
.stat-label { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px }

.admin-section-title { font-family: 'Fraunces', serif; font-size: 18px; color: var(--t1); margin: 18px 0 12px }

button.linklike { background: none; border: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline }

/* ─── WE HEARD ─────────────────────────────────────────────────────────── */

.header-brand .header-sub { font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--t3); margin-left: 6px }
.tab.tab-heard { font-weight: 700 }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0 }

.heard-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: -6px 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border) }
.heard-actions { display: flex; gap: 10px; flex-wrap: wrap }
.subnav { display: flex; gap: 4px; flex-wrap: wrap }
.subnav-link { font-size: 13px; color: var(--t2); text-decoration: none; padding: 7px 12px; border-radius: 8px }
.subnav-link:hover { color: var(--t1); background: rgba(255,255,255,0.04) }
.subnav-link.active { color: var(--gold-light); background: var(--gold-dim) }

.heard-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px }
.heard-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px }
.heard-stat-num { font-family: 'Fraunces', serif; font-size: 28px; color: var(--gold); line-height: 1.1 }
.heard-stat-label { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.6px }

.heard-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px }
.heard-filters .pipe-filter { text-decoration: none }
.heard-filter-note { font-size: 12px; color: var(--t2); margin-left: 6px }
.heard-filter-note a { color: var(--gold-light) }

.heard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px }
.heard-empty { grid-column: 1 / -1; background: var(--bg2); border: 1px dashed rgba(255,255,255,0.14); border-radius: 14px; padding: 28px }
.heard-empty h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 20px; margin-bottom: 8px }
.heard-empty p { color: var(--t2); font-size: 14px; line-height: 1.55; margin-bottom: 14px; max-width: 620px }

.theme-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px }
.theme-card:hover { border-color: rgba(225,138,38,0.3) }
.theme-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start }
.theme-name { font-family: 'Fraunces', serif; font-size: 18px; color: var(--white); text-decoration: none; line-height: 1.25 }
.theme-name:hover { color: var(--gold-light) }
.theme-flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end }
.theme-signal { font-size: 12px; color: var(--gold-light); font-weight: 600 }
.theme-voices { display: flex; gap: 6px; flex-wrap: wrap }
.theme-summary { font-size: 13px; color: var(--t2); line-height: 1.5 }
.theme-quote { font-size: 13px; color: var(--t1); line-height: 1.5; border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; font-style: italic }
.theme-quote cite { display: block; font-style: normal; font-size: 11px; color: var(--t3); margin-top: 3px }
.theme-inits { display: flex; gap: 6px; flex-wrap: wrap; align-items: center }
.theme-init { font-size: 11px; color: var(--blue); background: var(--blue-bg); padding: 3px 9px; border-radius: 6px; text-decoration: none }
a.theme-init:hover { filter: brightness(1.2) }
.theme-init-gap { color: var(--orange); background: var(--orange-bg) }
.theme-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 11px; color: var(--t3);
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto }
.theme-echo { color: var(--gold-light); text-decoration: none; font-weight: 600; white-space: nowrap }
.theme-echo:hover { text-decoration: underline }
.theme-detail-head { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px }
.theme-detail-head .theme-flags { justify-content: flex-start }

.flag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 7px; border-radius: 5px; white-space: nowrap }
.flag-rising { color: var(--red); background: var(--red-bg) }
.flag-converge { color: var(--purple); background: var(--purple-bg) }
.flag-consistent { color: var(--green); background: var(--green-bg) }
.flag-gap { color: var(--orange); background: var(--orange-bg) }
.flag-suggested { color: var(--blue); background: var(--blue-bg) }
.theme-suggested-note { margin-bottom: 16px; line-height: 1.6 }
.theme-suggested-note .form-actions { margin-top: 10px }

.voice-chip { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap }
.voice-partner { color: var(--gold-light); background: var(--gold-dim) }
.voice-member  { color: var(--cyan); background: var(--cyan-bg) }
.voice-team    { color: var(--blue); background: var(--blue-bg) }
.voice-creator { color: var(--purple); background: var(--purple-bg) }
.voice-other   { color: var(--slate); background: var(--slate-bg) }

/* Insight types: outlined, so they read differently from the filled voice chips */
.kind-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid currentColor; white-space: nowrap }
.kind-idea        { color: var(--amber) }
.kind-pain-point  { color: var(--red) }
.kind-request     { color: var(--orange) }
.kind-bright-spot { color: var(--green) }
.theme-kinds { display: flex; flex-wrap: wrap; gap: 6px }

.heard-side { display: flex; flex-direction: column; gap: 14px }
.side-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px }
.side-card details summary { cursor: pointer; list-style: none }
.side-card details summary::-webkit-details-marker { display: none }
.side-card details[open] summary { margin-bottom: 10px }
.side-alert { border-color: rgba(251,146,60,0.35); font-size: 13px; color: var(--t1) }
.side-alert a { color: var(--gold-light); margin-left: 4px }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--t3); font-weight: 700; margin-bottom: 10px }
.side-list { list-style: none; display: flex; flex-direction: column; gap: 10px }
.side-list li { display: flex; flex-direction: column; gap: 2px; font-size: 13px }
.side-list a { color: var(--t1); text-decoration: none }
.side-list a:hover { color: var(--gold-light) }
.side-listeners li { flex-direction: row; justify-content: space-between }
.side-meta { font-size: 12px; color: var(--t3); line-height: 1.5 }
.side-meta code { color: var(--gold-light) }
.side-legend { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--t2) }
.side-legend .flag { margin-right: 6px }
.side-form .form-row { margin-bottom: 10px }
.side-form .form-row textarea { min-height: 60px }
.brief-preview { width: 100%; margin: 10px 0 4px; padding: 10px; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 8px;
  color: var(--t2); font-family: ui-monospace, Menlo, monospace; font-size: 11px; line-height: 1.5; resize: vertical }

.insight-list { display: flex; flex-direction: column; gap: 10px }
.insight-row { display: flex; gap: 14px; justify-content: space-between; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px }
.insight-row.is-dismissed { opacity: 0.45 }
.insight-main { display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.insight-body { font-size: 14px; color: var(--t1); line-height: 1.5 }
.insight-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--t3) }
.insight-meta a { color: var(--t2) }
.insight-theme { color: var(--gold-light) !important; text-decoration: none }
.insight-theme.is-missing { color: var(--orange) !important }
.insight-inits { display: flex; gap: 6px; flex-wrap: wrap }
.insight-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 0 auto }
.insight-actions form { display: flex }
.insight-actions .btn { justify-content: center; padding: 6px 12px; font-size: 12px; width: 100% }

.ins-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 7px; border-radius: 5px }
.ins-suggested { color: var(--amber); background: var(--amber-bg) }
.ins-confirmed { color: var(--green); background: var(--green-bg) }
.ins-dismissed { color: var(--slate); background: var(--slate-bg) }
.cap-status { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap }
.cap-pending, .cap-processing { color: var(--blue); background: var(--blue-bg) }
.cap-processed { color: var(--green); background: var(--green-bg) }
.cap-failed { color: var(--red); background: var(--red-bg) }
.cap-skipped { color: var(--amber); background: var(--amber-bg) }

.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap }
.review-head .admin-section-title { margin: 0 }
.review-group { margin-bottom: 26px }
.review-group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px }
.review-group-title { font-family: 'Fraunces', serif; font-size: 16px; color: var(--t1); text-decoration: none }
.review-group-head form { margin-left: auto }

.capture-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--t2); margin-bottom: 16px }
.capture-note { font-size: 14px; color: var(--t2); background: var(--blue-bg); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px }
.capture-error { display: flex; align-items: center; flex-wrap: wrap; gap: 6px }
.capture-source { margin-top: 24px; font-size: 13px; color: var(--t2) }
.capture-source summary { cursor: pointer; color: var(--t3) }
.capture-source pre { white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.5;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-top: 10px; max-height: 480px; overflow: auto }
.capture-rerun { margin-top: 18px; font-size: 12px; color: var(--t3) }

.heard-form { max-width: 860px }
.heard-form-hint { display: block; margin: -4px 0 14px; color: var(--t3); font-size: 13px; line-height: 1.5 }
.date-input { width: 100%; padding: 9px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px;
  color: var(--white); font-family: 'DM Sans', sans-serif; font-size: 14px; color-scheme: dark }
.form-row input[type=email], .form-row input[type=file], .side-form select, .side-form input[type=text] {
  width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px;
  color: var(--white); font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none }
.quick-list { counter-reset: quick }
.quick-item { display: flex; gap: 14px; margin-bottom: 14px; counter-increment: quick }
.quick-num::before { content: counter(quick) }
.quick-add { margin: 0 0 6px 44px }
.quick-num { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--gold-dim); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 15px; margin-top: 4px }
.quick-fields { flex: 1; display: flex; flex-direction: column; gap: 8px }
.quick-fields textarea, .quick-fields select, .quick-fields input { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 8px; color: var(--white); font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none }
.quick-fields textarea { resize: vertical; line-height: 1.5 }
.quick-fields textarea:focus, .quick-fields select:focus, .quick-fields input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim) }
.quick-meta { display: grid; grid-template-columns: 160px 1fr; gap: 8px }
.form-actions .hint { font-size: 12px; color: var(--t3) }
.form-actions .hint a { color: var(--gold-light) }

.heard-badge { display: inline-block; font-size: 10px; font-weight: 700; color: var(--gold-light); background: var(--gold-dim);
  padding: 3px 8px; border-radius: 5px; text-decoration: none; margin-left: 6px; letter-spacing: 0.2px }
.pipe-chip .heard-badge { margin: 6px 0 0 }
a.heard-badge:hover { filter: brightness(1.15) }

.gap-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px }
.gap-row { display: flex; justify-content: space-between; gap: 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px }
.gap-main { display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.gap-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: 0 0 auto }
.quiet-note { margin: -6px 0 12px }
.promote-note { margin-bottom: 14px }

.digest-slide { background: linear-gradient(160deg, var(--bg3), var(--bg2)); border: 1px solid rgba(225,138,38,0.25); border-radius: 18px;
  padding: 30px 34px; display: flex; flex-direction: column; gap: 16px; max-width: 1100px }
.digest-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); font-weight: 700 }
.digest-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px }
.digest-theme { background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; overflow: hidden }
.digest-theme-name { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--gold-light); font-weight: 700 }
.digest-theme-headline { font-family: 'Fraunces', serif; font-size: 17px; line-height: 1.3; color: var(--white) }
.digest-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.digest-form select { padding: 9px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px; color: var(--t1); font: inherit; font-size: 13px }
.digest-form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim) }
.insight-event { color: var(--gold-light) }
.heard-filter-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--t3) }
.digest-theme .theme-quote { font-size: 12px }

.partner-link-form { margin-bottom: 22px }
.copy-row { display: flex; gap: 8px; min-width: 280px }
.copy-input { flex: 1; min-width: 0; padding: 8px 10px; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 8px;
  color: var(--t2); font-family: ui-monospace, Menlo, monospace; font-size: 11px }

/* Partner-facing feedback form */
.public-body { background-image: radial-gradient(ellipse 70% 55% at 50% 115%, rgba(225,138,38,0.14) 0%, transparent 60%) }
.public-wrap { max-width: 620px; margin: 0 auto; padding: 40px 16px 60px }
.public-brand { display: flex; justify-content: center; margin-bottom: 24px }
.public-logo { width: 190px; height: auto }
.public-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 30px 30px 24px }
.public-title { font-family: 'Fraunces', serif; font-weight: 400; font-size: 28px; color: var(--white); margin-bottom: 8px }
.public-sub { color: var(--t2); font-size: 14px; line-height: 1.55; margin-bottom: 20px }
.public-submit { width: 100%; justify-content: center; padding: 12px; font-size: 15px }
.public-note { font-size: 12px; color: var(--t3); margin-top: 12px; text-align: center }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden }

@media (max-width: 960px) {
  .heard-layout { grid-template-columns: 1fr }
  .heard-stats { grid-template-columns: repeat(3, 1fr) }
}
@media (max-width: 640px) {
  .heard-stats { grid-template-columns: repeat(2, 1fr) }
  .theme-grid { grid-template-columns: 1fr }
  .heard-top { align-items: stretch }
  .heard-actions .btn { flex: 1; justify-content: center }
  .insight-row, .gap-row { flex-direction: column }
  .insight-actions { flex-direction: row; flex-wrap: wrap }
  .insight-actions .btn { width: auto }
  .gap-actions { align-items: flex-start }
  .quick-meta { grid-template-columns: 1fr }
  .digest-slide { aspect-ratio: auto; padding: 22px 18px }
  .public-card { padding: 22px 18px }
  .copy-row { min-width: 0 }
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch }

/* We Heard — claims */
.claim-board { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 12px; align-items: start; overflow-x: auto }
.claim-col { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 200px }
.claim-col-head { display: flex; justify-content: space-between; align-items: center }
.claim-col-title { font-weight: 700; font-size: 13px; color: var(--t1) }
.claim-col-hint { font-size: 11px; color: var(--t3); line-height: 1.4 }
.claim-card { display: flex; flex-direction: column; gap: 6px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; text-decoration: none; color: var(--t1) }
.claim-card:hover { border-color: rgba(225,138,38,0.35) }
.claim-card-name { font-weight: 700; font-size: 13px; color: var(--white); text-decoration: none }
.claim-card-name:hover { color: var(--gold-light) }
.claim-people { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--t2) }
.claim-owner { color: var(--gold-light); font-weight: 600 }
.claim-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--t3) }
.claim-meta a { color: var(--gold-light) }
.claim-brd { color: var(--green) }
.claim-steps { margin: 0 0 18px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--t2); line-height: 1.5 }
.claim-steps li.is-done { color: var(--t3) }
.claim-steps li.is-done strong { color: var(--green) }
.claim-steps strong { color: var(--t1) }
.claim-steps a { color: var(--gold-light); margin-left: 6px }
.claim-notes { white-space: pre-wrap }
.theme-claims { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 8px }
.theme-claims .claim-card { width: 100% }
.theme-claimed { display: flex; flex-wrap: wrap; gap: 6px }
.theme-claim-chip { font-size: 11px; color: var(--green); background: var(--green-bg); padding: 3px 9px; border-radius: 6px; text-decoration: none }
.claim-updated { font-size: 11px; color: var(--t3) }
.claim-send { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 18px }
.claim-send .hint { font-size: 12px; color: var(--t3) }
.claim-send .hint a, .review-head .side-meta a { color: var(--gold-light) }
.btn[disabled] { opacity: 0.45; cursor: not-allowed }
.tab-board { margin-left: auto }
.form-row input[type=date] { color-scheme: dark }
@media (max-width: 960px) { .claim-board { grid-template-columns: repeat(4, 220px) } }
@media (max-width: 900px) { .header-brand .header-sub { display: none } }
a.heard-stat { text-decoration: none; transition: border-color 0.15s, background 0.15s }
a.heard-stat:hover { border-color: rgba(225,138,38,0.4); background: var(--bg3) }
.heard-stat.is-active { border-color: var(--gold) }
.heard-filter-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px }
.heard-filter-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: -6px 0 18px }
.heard-filter-form label { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3) }
.heard-filter-form select, .digest-form select { padding: 8px 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px; color: var(--t1); font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; max-width: 260px }
.heard-filter-form { gap: 8px 12px }
.heard-filter-form select { max-width: 150px; padding: 7px 8px; font-size: 12px }
.heard-filter-form label { gap: 5px; font-size: 10px }
.heard-filter-form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim) }
.heard-filter-clear { font-size: 12px; color: var(--gold-light) }
.shared-themes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px }
.shared-theme { font-size: 12px; color: var(--t1); background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; text-decoration: none }
.shared-theme:hover { border-color: rgba(225,138,38,0.35) }
.shared-theme-count { color: var(--gold-light); font-weight: 700 }
.property-themes { display: flex; flex-wrap: wrap; gap: 4px }
.property-table td { vertical-align: top }
.property-table td:first-child a { color: var(--gold-light); font-weight: 600; text-decoration: none }

/* We Heard — charts. Series colours: the dataviz reference palette's dark steps, validated against this
   app's dark surfaces (#0f1724, #162032): lightness band, chroma, CVD (worst ΔE 8.4) and contrast all pass.
   Text never uses a series colour; identity is the swatch beside it. */
:root {
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
  --chart-grid: rgba(255,255,255,0.08); --chart-axis: rgba(255,255,255,0.18);
}
.vz-partner, .vz-bg-partner { fill: var(--series-1); background: var(--series-1) }
.vz-member,  .vz-bg-member  { fill: var(--series-2); background: var(--series-2) }
.vz-team,    .vz-bg-team    { fill: var(--series-3); background: var(--series-3) }
.vz-creator, .vz-bg-creator { fill: var(--series-4); background: var(--series-4) }
.vz-other,   .vz-bg-other   { fill: var(--series-5); background: var(--series-5) }
.vz-spark { fill: var(--series-1) }
.vz-grid { stroke: var(--chart-grid); stroke-width: 1 }
.vz-axis { stroke: var(--chart-axis); stroke-width: 1 }
.vz-tick { fill: var(--t2); font-size: 10px; font-family: 'DM Sans', sans-serif }
.vz-hit { fill: transparent }
.vz-hit:hover + g path, g:hover > path { opacity: 0.85 }
.vz-root { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 10px; margin-bottom: 18px }
.vz-chart { width: 100%; height: auto; display: block; overflow: visible }
.vz-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; font-size: 12px; color: var(--t2) }
.vz-legend-item { display: inline-flex; align-items: center; gap: 6px }
.vz-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block }
.vz-table summary { cursor: pointer; font-size: 12px; color: var(--t3); margin-top: 6px }
.vz-table table { margin-top: 8px }
.theme-weekly { display: flex; align-items: flex-end; gap: 8px }
.theme-weekly svg { display: block }
.theme-weekly-caption { font-size: 10px; color: var(--t3) }

/* We Heard — simplified home and Everything heard */
.heard-stats.heard-stats-two { grid-template-columns: repeat(2, minmax(0, 260px)) }
.theme-claim { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px }
.theme-unclaimed { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3) }
.theme-claim-btn { padding: 5px 12px; font-size: 12px }
.theme-evidence { margin: -4px 0 16px }
.theme-evidence a { color: var(--gold-light) }
.heard-check { cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-size: 12px !important; color: var(--t2) !important }
.heard-check input { accent-color: var(--gold) }
.insight-source { color: var(--t2) }
.insight-meta a { color: var(--gold-light); text-decoration: none }
.insight-meta a.insight-source { color: var(--t2) }
.property-group { margin-bottom: 22px }
.property-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px }
.property-group-name { font-family: 'Fraunces', serif; font-size: 18px; color: var(--white); text-decoration: none }
a.property-group-name:hover { color: var(--gold-light) }
.property-group-themes { display: flex; flex-wrap: wrap; gap: 4px }
@media (max-width: 700px) { .heard-stats.heard-stats-two { grid-template-columns: 1fr 1fr } }

/* We Heard — one page */
.wh-page { max-width: 920px; margin: 0 auto }
.wh-add { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 26px }
.wh-add-title { font-family: 'Fraunces', serif; font-weight: 400; font-size: 24px; color: var(--white); margin-bottom: 12px }
.wh-add-form textarea, .wh-add-form select, .wh-add-form input[type=text], .wh-search input, .wh-brd input {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px; color: var(--t1);
  font-family: 'DM Sans', sans-serif; font-size: 14px; padding: 10px 12px; outline: none }
.wh-add-form textarea { width: 100%; resize: vertical; line-height: 1.5 }
.wh-add-form textarea:focus, .wh-add-form select:focus, .wh-add-form input:focus, .wh-search input:focus, .wh-brd input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim) }
.wh-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px }
.wh-add-row label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3) }
.wh-add-row input[type=text] { width: 200px }
.wh-transcript-link { font-size: 13px; margin-left: auto }
.wh-list-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px }
.wh-search { flex: 1; display: flex; align-items: center; gap: 10px }
.wh-search input { flex: 1 }
.wh-clear { font-size: 13px }
.wh-summary { margin: 0 }
.wh-empty { color: var(--t2); font-size: 14px; padding: 20px 0 }
.wh-themes { display: flex; flex-direction: column; gap: 10px }
.wh-theme { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; scroll-margin-top: 16px }
.wh-theme:target { border-color: rgba(225,138,38,0.5) }
.wh-theme-details summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px }
.wh-theme-details summary::-webkit-details-marker { display: none }
.wh-theme-name { font-family: 'Fraunces', serif; font-size: 19px; color: var(--white); line-height: 1.3 }
.wh-theme-name::before { content: "▸"; display: inline-block; width: 18px; color: var(--t3); font-family: 'DM Sans', sans-serif; font-size: 14px; transition: transform 0.15s }
.wh-theme-details[open] .wh-theme-name::before { transform: rotate(90deg) }
.wh-theme-heard { font-size: 13px; color: var(--gold-light); font-weight: 600; padding-left: 18px }
.wh-theme-quote { font-size: 13px; color: var(--t2); font-style: italic; line-height: 1.5; padding-left: 18px }
.wh-note { font-size: 12px; color: var(--t3); margin: 10px 0 0 18px }
.wh-insights { list-style: none; margin: 12px 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--border); padding-top: 12px }
.wh-insight-text { font-size: 14px; color: var(--t1); line-height: 1.5 }
.wh-insight-meta { font-size: 12px; color: var(--t3); margin-top: 2px }
.wh-insight-quote { font-size: 13px; color: var(--t2); font-style: italic; border-left: 2px solid var(--gold); padding: 2px 0 2px 10px; margin-top: 6px }
.wh-claim { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 150px; text-align: right }
.wh-owner { font-size: 13px; color: var(--t2) }
.wh-owner strong { color: var(--white) }
.wh-board-link { font-size: 13px }
.wh-brd summary { cursor: pointer; font-size: 12px; color: var(--gold-light); list-style: none }
.wh-brd summary::-webkit-details-marker { display: none }
.wh-brd form { display: flex; gap: 6px; margin-top: 6px }
.wh-brd input { width: 220px; font-size: 13px; padding: 7px 10px }
.wh-admin-inline { display: flex; gap: 6px; align-items: center }
.wh-admin-inline input[type=text], .wh-admin-inline select { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px;
  color: var(--t1); font: inherit; font-size: 13px; padding: 6px 8px; max-width: 220px }
@media (max-width: 700px) {
  .wh-theme { grid-template-columns: 1fr }
  .wh-claim { align-items: flex-start; text-align: left }
  .wh-transcript-link { margin-left: 0 }
  .wh-add-row input[type=text] { width: 100% }
  .wh-list-head { flex-direction: column; align-items: stretch }
}
.wh-landed { background: var(--green-bg); border: 1px solid rgba(52,211,153,0.3); color: var(--t1); border-radius: 12px; padding: 12px 16px; margin: -12px 0 22px; font-size: 14px }
.wh-landed p + p { margin-top: 4px }
.wh-new-theme { align-self: flex-start; margin-left: 18px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--blue); background: var(--blue-bg); border-radius: 6px; padding: 2px 8px }
.wh-insight-quote cite { display: block; font-style: normal; font-size: 11px; color: var(--t3); margin-top: 2px }
.wh-insight-quote + .wh-insight-quote { margin-top: 6px }
.wh-quote-edit { display: grid; grid-template-columns: 1fr 220px auto; gap: 8px; align-items: start; margin-top: 8px }
.wh-quote-remove { font-size: 12px; color: var(--t2); display: flex; gap: 4px; align-items: center }
@media (max-width: 700px) { .wh-quote-edit { grid-template-columns: 1fr } }
.wh-let-go { background: none; border: none; padding: 0; font: inherit; font-size: 12px; color: var(--t3); text-decoration: underline; cursor: pointer }
.wh-let-go:hover, .wh-let-go:focus-visible { color: var(--t1) }
.wh-words { margin-top: 10px }
.wh-words > label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3); margin-bottom: 4px }
.wh-words > label span { text-transform: none; letter-spacing: 0; color: var(--t3); font-style: italic; margin-left: 4px }
.wh-words-kind { border: 0; padding: 0; margin: 6px 0 0; display: flex; gap: 16px; font-size: 13px; color: var(--t2) }
.wh-words-kind label { display: flex; align-items: center; gap: 5px; cursor: pointer }
.wh-theme-words { font-weight: 500; color: var(--t2) }
.wh-theme-words.wh-no-words { color: var(--t3); font-weight: 400 }
.wh-insight-quote.wh-paraphrase { font-style: normal; border-left-style: dashed; border-left-color: var(--t3) }
.wh-add-words { display: inline-block; font-size: 12px; margin-top: 4px }
.wh-quote-flags { display: flex; flex-direction: column; gap: 4px }
.idea-intro { font-size: 14px; color: var(--t2); margin: -8px 0 18px; max-width: 720px }
.idea-form { max-width: 720px }
.init-evidence { margin-top: 10px; border-left: 2px solid var(--gold); padding: 2px 0 2px 10px }
.init-evidence-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3); margin-bottom: 2px }
.init-evidence p { font-size: 13px; color: var(--t2); font-style: italic; white-space: pre-line }
.init-submitted { font-size: 12px; color: var(--t3); margin-top: 8px }
.idea-pending { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--amber-t); background: var(--amber-bg); border: 1px solid rgba(251,191,36,0.3) }
.pipe-chip .idea-pending { margin: 6px 0 0; align-self: flex-start; width: fit-content }
.idea-approve { margin-top: 10px; padding: 6px 14px; font-size: 12px }
.wh-heard-too { margin: 10px 0 2px 18px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline }
.wh-heard-too a { font-weight: 600 }
.wh-heard-too span { color: var(--t3); font-size: 12px }
.wh-context { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; max-width: 760px }
.wh-context-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--t3) }
.wh-context-text { font-size: 15px; color: var(--t1); margin: 4px 0 2px }
