/* =================================================================
   otterary — visual redesign layer
   Loaded after styles.css and overrides it. Removing this file and its
   <link> in index.html / 404.html restores the previous look.
   Built in layers; later sections override earlier ones. The final look
   is the warm cream + deep olive layer (V3) with Plus Jakarta Sans and
   copper as the brand accent.
   ================================================================= */


/* ---------- Tokens ---------- */
:root {
  /* cool neutrals replace the warm sand scale */
  --sand-50:  #F8FAFC;
  --sand-100: #F1F4F8;
  --sand-150: #E8ECF2;
  --sand-200: #D5DBE3;
  --sand-300: #B8C2CF;
  --line:        #E4E8EE;
  --line-strong: #D3D9E2;
  --page:        #F3F5F8;

  /* ink → slate */
  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;

  /* brand copper stays; flat, no glow */
  --clay-600: #7E2F0E;
  --clay-500: #9A3B14;
  --clay-400: #B04F22;
  --copper-soft: #FBEFE7;
  --copper-line: #F1D3BF;
  --amber-100: var(--copper-soft);
  --amber-400: #D08A3A;
  --amber-500: #B0741E;

  /* navy (navigation + dark surfaces) */
  --navy-900: #0E1A30;
  --navy-800: #15253F;
  --navy-700: #1F3354;
  --navy-300: #8FA0BD;
  --navy-200: #C3CDDF;

  /* pastel accents from the references */
  --lav-bg: #EFECFD; --lav-ink: #5646C0; --lav-line: #DAD4FA;
  --sky-bg: #E4F2FB; --sky-ink: #1D6798; --sky-line: #C6E2F4;
  --mint-bg: #E4F5EC; --mint-ink: #1F7A4D; --mint-line: #C3E6D3;
  --peach-bg: #FDEFE3; --peach-ink: #A4501C; --peach-line: #F6D6BD;

  /* sentiment */
  --bull: #1F8A5B; --bull-bg: #E6F5EE; --bull-line: #BFE5D1;
  --bear: #C93C3C; --bear-bg: #FDEDED; --bear-line: #F4C9C9;
  --neutral: #64748B; --neutral-bg: #EEF1F5; --neutral-line: #D5DBE3;
  --warn: #B45309; --warn-bg: #FEF3E2; --warn-line: #F8D8A8;
  --sentiment-gradient: linear-gradient(90deg, #C93C3C 0%, #E59A9A 26%, #CDD3DC 50%, #86C9A6 74%, #1F8A5B 100%);

  --card: #FFFFFF;
  --card-soft: #F8FAFC;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --sh-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-md: 0 10px 28px -14px rgba(15, 23, 42, .22), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --sh-lg: 0 24px 56px -24px rgba(15, 23, 42, .32), 0 4px 12px -4px rgba(15, 23, 42, .08);
  --sh-glow: 0 6px 16px -8px rgba(154, 59, 20, .45);
  --shadow-md: var(--sh-md);

  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bookmark: var(--clay-500);
  --bookmark-soft: var(--copper-soft);
  --paper: var(--navy-900);
  --focus-ring: 0 0 0 3px rgba(176, 79, 34, .18);
}

body {
  background: var(--page);
  font-size: 15px;
  letter-spacing: -.005em;
  font-feature-settings: "cv11", "ss01";
}
:focus-visible { outline: 2px solid var(--clay-400); outline-offset: 2px; }

/* headings: Inter, tighter tracking, heavier weight than the serif */
.hero h1, .sec-title, .co-h-name, .detail-title, .post-title, .card-title, .profile-name,
.modal-head h2, .compose-head h1, .compose-title, .comments h3, .empty h3, .dm-list-head,
.dm-empty h3, .settings-section h2, .feedback-heading h1, .feedback-content h2,
.company-create-form h1, .not-found-page h1, .not-found-brand, .writing-title,
.rich-article h2, .rich-article h3, .ref-title, .publish-options h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
}

/* ---------- Top bar ---------- */
.topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
.brand-mark { border-radius: 12px; border-color: var(--line); box-shadow: none; }
.brand-name { font-family: var(--font-sans); font-weight: 700; font-size: 21px; letter-spacing: -.035em; }
.brand-name b { color: var(--clay-500); }
.topbar-search {
  height: 42px; border-radius: var(--r-md);
  background: var(--sand-100); border: 1px solid transparent; box-shadow: none;
}
.topbar-search:hover { border-color: var(--line-strong); }
.topbar-search:focus-within { background: #fff; border-color: var(--clay-400); box-shadow: var(--focus-ring); }
.topbar-search input { font-size: 14.5px; }

/* ---------- Buttons ---------- */
.btn { height: 42px; border-radius: var(--r-md); font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.btn-sm { height: 36px; border-radius: 8px; font-size: 13.5px; }
.btn-primary { background: var(--clay-500); color: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--clay-600); box-shadow: 0 6px 16px -8px rgba(154,59,20,.55); }
.btn-ghost { background: #fff; color: var(--ink-900); border: 1px solid var(--line-strong); box-shadow: var(--sh-xs); }
.btn-ghost:hover { background: var(--sand-50); border-color: var(--sand-300); color: var(--ink-900); }
.btn-danger { border-radius: var(--r-md); }
.icon-btn, .search-mini { border-radius: var(--r-md); border-color: var(--line-strong); box-shadow: none; }
.icon-btn:hover { border-color: var(--sand-300); color: var(--ink-900); transform: none; background: var(--sand-50); }
.badge { background: var(--clay-500); border-color: #fff; box-shadow: none; }

/* ---------- Navigation rail (dark navy) ---------- */
.site-nav {
  background: var(--navy-900);
  border-right: 0;
  padding: 14px 7px;
}
.site-nav:hover, .site-nav:focus-within { box-shadow: 12px 0 32px -12px rgba(14, 26, 48, .45); }
.nav-item { color: var(--navy-300); border-radius: 10px; font-weight: 500; font-size: 14.5px; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: rgba(214, 125, 74, .16); color: #F2A477; }
.nav-item:focus-visible { outline-color: #F2A477; }

/* ---------- Layout surfaces ---------- */
.card, .co-header, .profile-head, .detail-card, .compose-card, .dm-list, .dm-thread, .feedback-card {
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.card { border-radius: var(--r-lg); }
.card-title { font-size: 16px; letter-spacing: -.015em; }
.card-title .icon {
  width: 16px; height: 16px; padding: 6px; box-sizing: content-box;
  border-radius: 8px; background: var(--copper-soft); color: var(--clay-500);
}
.company-layout .rail .card { border-radius: var(--r-lg); }
.company-layout .rail .card-title { font-size: 15px; }
.company-layout .rail .card-title .icon { width: 14px; height: 14px; padding: 5px; }
.rank-row { border-top-color: var(--line); }
.rank-row .rk { font-weight: 600; color: var(--ink-400); }
.rank-row .val { color: var(--clay-500); }
.tkr-row:hover { background: var(--sand-100); }

/* ---------- Hero (light, grid paper, stat tiles) ---------- */
.hero {
  color: var(--ink-900);
  background:
    radial-gradient(600px 320px at 92% 0%, rgba(196, 214, 244, .55), transparent 70%),
    radial-gradient(520px 300px at 70% 110%, rgba(222, 215, 251, .55), transparent 70%),
    #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
}
.hero::after { display: none; }
.hero-grid {
  opacity: 1;
  background-image: linear-gradient(rgba(31, 51, 84, .06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(31, 51, 84, .06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(100deg, transparent 0%, #000 55%);
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, #000 55%);
}
.hero-kicker {
  background: var(--copper-soft); border: 1px solid var(--copper-line); color: var(--clay-600);
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; border-radius: 8px; padding: 6px 11px;
}
.hero h1 { color: var(--ink-900); line-height: 1.08; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--clay-500); }
.hero p { color: var(--ink-500); }
.hero-stats { gap: 12px; }
.hero-stat {
  min-width: 150px; padding: 12px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line); box-shadow: var(--sh-xs);
}
.hero-stat .n { font-family: var(--font-sans); font-weight: 700; font-size: 26px; letter-spacing: -.03em; color: var(--ink-900); }
.hero-stat .l { color: var(--ink-500); font-size: 12.5px; letter-spacing: 0; }
.card .hero-stat .n { color: var(--ink-900); }

/* marquee cards become crisp white tiles */
.mini-card {
  background: #FFFFFF; border: 1px solid var(--line);
  box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .35);
  border-radius: 12px;
}
.mini-name { color: var(--ink-900); }
.mini-sub { color: var(--ink-500); }
.mini-bar { background: var(--sand-150); }
.mini-bar .n { background: var(--sand-300); }
.company-logo.mini-badge { background: var(--sand-100); }
.company-logo.mini-badge:not(.has-logo) { background: var(--accent); }

/* ---------- Section heading + controls ---------- */
.sec-title { font-size: 22px; }
.folder-search {
  width: 280px; height: 40px; margin-top: 10px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  color: var(--ink-400); box-shadow: var(--sh-xs);
}
.folder-search input { height: 38px; font-size: 14.5px; }
.folder-search input::placeholder { color: var(--ink-400); }
.folder-search:focus-within { border-color: var(--clay-400); box-shadow: var(--focus-ring); }

.dd-btn {
  border-radius: var(--r-md); border-color: var(--line-strong); box-shadow: var(--sh-xs);
  font-size: 13.5px; color: var(--ink-700);
}
.dd-btn:hover { border-color: var(--sand-300); color: var(--ink-900); background: var(--sand-50); }
.dd-btn.active, .dd.open .dd-btn { border-color: var(--clay-400); color: var(--clay-600); background: #fff; box-shadow: var(--focus-ring); }
.dd-btn .icon-sm:first-child { color: var(--ink-500); }
.dd-btn.active .icon-sm:first-child, .dd.open .dd-btn .icon-sm:first-child { color: var(--clay-500); }
.create-trigger.dd-btn { border-radius: var(--r-md); background: var(--clay-500); border-color: var(--clay-500); color: #fff; }
.create-trigger.dd-btn:hover, .dd.open .create-trigger.dd-btn { background: var(--clay-600); border-color: var(--clay-600); color: #fff; }

.dd-menu {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-lg);
}
.dd-item { color: var(--ink-700); font-weight: 500; border-radius: 8px; }
.dd-item:hover { background: var(--sand-100); color: var(--ink-900); }
.dd-item.sel { background: var(--copper-soft); color: var(--clay-600); font-weight: 600; }
.dd-item .icon-sm:first-child { color: var(--ink-400); }
.dd-item.sel .icon-sm:first-child, .dd-tick { color: var(--clay-500); }
.bookmark-filter { border-bottom-color: var(--line); }
.dd-sep { background: var(--line); }

.seg { border-radius: var(--r-md); border-color: var(--line); background: var(--sand-150); box-shadow: none; }
.seg button { border-radius: 8px; color: var(--ink-500); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink-900); box-shadow: var(--sh-sm); }

/* ---------- Company folder cards (same structure, cleaner shell) ---------- */
.folder {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-xs); background: #fff;
}
.folder::before { display: none; }
.folder:hover {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--sh-md);
}
.folder:hover .folder-name { color: var(--ink-900); }
.folder-name { font-family: var(--font-sans); font-weight: 700; font-size: 20px; letter-spacing: -.025em; }
.company-logo { border-radius: 12px; border: 0; }
.company-logo.has-logo { background: var(--sand-100); }
.folder .ticker-badge { font-weight: 700; letter-spacing: .02em; }
.company-sentiment-ends { color: var(--ink-400); font-weight: 500; }
.company-sentiment-value { color: var(--ink-700); font-weight: 700; }
.folder .folder-foot { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.folder-count { color: var(--ink-600); font-weight: 600; font-size: 13px; }
.folder-count .icon-sm { color: var(--ink-400); }
.folder-bookmark:hover { background: var(--sand-100); }
.folder-bookmark[aria-pressed="true"] { color: var(--clay-500); }

/* sentiment slider: navy thumb on a cool gradient */
.sentiment-range::-webkit-slider-thumb { background: var(--navy-800); border-width: 3px; box-shadow: 0 1px 4px rgba(15,23,42,.35); }
.sentiment-range::-moz-range-thumb { background: var(--navy-800); }
.sentiment-marker { background: var(--navy-800); }
.sent-meter .bar { background: var(--sand-150); }

/* ---------- Company page ---------- */
.co-header { border-radius: var(--r-xl); }
.co-h-name { font-size: 38px; letter-spacing: -.035em; }
.ticker-badge.xl { border-radius: 16px; }
.co-h-stats { gap: 10px; }
.co-h-stat {
  min-width: 96px; padding: 8px 14px; border-radius: 10px;
  background: var(--sand-50); border: 1px solid var(--line); text-align: left;
}
.co-h-stat .n { font-family: var(--font-sans); font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.co-h-stat .l { color: var(--ink-500); font-size: 12px; }
.chip-mini { background: var(--sand-100); color: var(--ink-700); border-radius: 6px; }
.breadcrumb { font-size: 13.5px; }
.breadcrumb a { color: var(--ink-700); }
.breadcrumb a:hover { color: var(--clay-500); }

/* ---------- Post cards + detail ---------- */
.post-card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--sh-xs); }
.post-card.clickable:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--line-strong); }
.post-card.clickable:hover .post-title { color: var(--clay-500); }
.post-title { font-size: 18.5px; letter-spacing: -.02em; }
.post-meta { font-size: 12.5px; }
.post-meta a.tkr, .post-folder-back .tkr {
  font-weight: 700; font-size: 11.5px; letter-spacing: .04em; color: var(--clay-600);
  background: var(--copper-soft); padding: 2px 7px; border-radius: 6px;
}
.post-folder-back { color: var(--clay-600); }
.post-meta .who { color: var(--ink-900); }
.detail-card { border-radius: var(--r-xl); box-shadow: var(--sh-sm); }
.detail-title { letter-spacing: -.03em; }

/* status-style badges (Ashford reference) */
.pill { border-radius: 6px; }
.post-tags .pill { height: 22px; padding: 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pill.type.blog { color: var(--lav-ink); background: var(--lav-bg); border-color: var(--lav-line); }
.pill.type.article { color: var(--sky-ink); background: var(--sky-bg); border-color: var(--sky-line); }
.pill.type.audio { color: var(--peach-ink); background: var(--peach-bg); border-color: var(--peach-line); }
.pill.muted, .pill.type { color: var(--ink-700); background: var(--sand-100); border-color: var(--line); }

.vote { background: var(--sand-100); border-color: var(--line); }
.vote button:hover { background: #fff; }
.vote button.up.active, .vote .score.up { color: var(--clay-500); }
.post-actions > .post-comments { border-color: var(--line-strong); color: var(--ink-700); border-radius: var(--r-pill); }
.post-actions > .post-comments:hover { background: var(--sand-100); }
.act:hover { background: var(--sand-100); }
.post-bookmark.act.active, .act.bookmark.active { color: var(--clay-500); background: transparent; }

.tag-panel { border-top: 1px solid var(--line); }
.compact-sentiment .sentiment-label, .tag-row .lbl { color: var(--ink-500); letter-spacing: .06em; }
.compact-sentiment [data-clear-sent] { border-radius: 8px; border-color: var(--line-strong); }

.rich-article { font-size: 16.5px; line-height: 1.75; color: var(--ink-700); }
.rich-article blockquote { border-left-color: var(--clay-400); font-family: var(--font-sans); font-weight: 500; font-style: italic; font-size: 19px; }
.rich-article a { color: var(--clay-500); }
.rich-article .article-mention { background: var(--sky-bg); border-color: var(--sky-line); color: var(--sky-ink); }
.rich-article .article-post-link, .ref-read { color: var(--sky-ink); }
.rich-article .article-post-card { background: var(--sand-50); border-color: var(--line); border-radius: 12px; }
.ref-ticker { background: var(--copper-soft); color: var(--clay-600); font-family: var(--font-sans); font-weight: 700; }
.ref-sentiment { background: var(--bull-bg); color: var(--bull); }

/* ---------- Comments ---------- */
.comments h3 .icon { color: var(--clay-500); }
.comment { border-top-color: var(--line); }
.comment-head .op { background: var(--copper-soft); }
.comment-children { border-left-color: var(--line); }
.comment-compose textarea, .reply-box textarea, .dm-compose textarea { background: #fff; border-color: var(--line-strong); border-radius: var(--r-md); }
.comment-compose textarea:focus, .reply-box textarea:focus, .dm-compose textarea:focus { border-color: var(--clay-400); box-shadow: var(--focus-ring); }

/* ---------- Forms, modals, toasts ---------- */
.field label, .settings-row > label { color: var(--ink-700); font-weight: 600; font-size: 13px; }
.input, .textarea { background: #fff; border-color: var(--line-strong); border-radius: var(--r-md); font-size: 14.5px; }
.input:hover, .textarea:hover { border-color: var(--sand-300); }
.input:focus, .textarea:focus { border-color: var(--clay-400); box-shadow: var(--focus-ring); }
.input[readonly] { background: var(--sand-50); }
.modal-root { background: rgba(15, 23, 42, .45); }
.modal { border-radius: var(--r-xl); border-color: var(--line); }
.modal-foot, .compose-foot { background: var(--sand-50); border-top-color: var(--line); }
.modal-close:hover { background: var(--sand-100); }
.toast { background: var(--navy-900); color: #fff; border-radius: 12px; }
.ac-menu, .search-results { border-color: var(--line); border-radius: 12px; box-shadow: var(--sh-lg); }
.ac-item:hover, .ac-item.hl, .sr-item:hover, .sr-item.hl, .sr-all:hover { background: var(--sand-100); }
.sr-all, .sr-create { color: var(--clay-500); }
.empty .icon-lg, .dm-empty .icon-lg { color: var(--ink-400); }
.empty h3, .dm-empty h3 { color: var(--ink-900); }
.pw-eye:hover { background: var(--sand-100); }

/* ---------- Composer ---------- */
.editor-toolbar, .classic-composer .editor-toolbar { background: var(--sand-50); border-color: var(--line-strong); }
.editor-toolbar button:hover, .editor-toolbar button:focus-visible { background: #fff; box-shadow: var(--sh-xs); }
.classic-composer .rich-editor { border-color: var(--line-strong); }
.classic-composer .rich-editor:focus, .rich-editor:focus { border-color: var(--clay-400); box-shadow: var(--focus-ring); }
.type-tag { border-radius: 8px; border-color: var(--line-strong); color: var(--ink-600); }
.type-tag.active { background: var(--copper-soft); color: var(--clay-600); border-color: var(--clay-400); }
.editor-more, .editor-panel, .mention-picker { background: #fff; border-color: var(--line); }
.mention-picker [role=option][aria-selected=true], .image-sizes [aria-pressed='true'] { background: var(--sky-bg); color: var(--sky-ink); }
.publish-options { background: var(--sand-50); }
.editor-resize-grip:hover, .editor-resize-grip:focus-visible { background: var(--sand-100); }
.logo-upload { border-color: var(--line-strong); }
.logo-upload.dragging { background: var(--copper-soft); }

/* ---------- Profile ---------- */
.profile-head::before {
  height: 84px; opacity: 1;
  background: linear-gradient(120deg, #E4ECF8 0%, #EFECFD 55%, rgba(255,255,255,0) 100%);
}
.me-badge { background: var(--copper-soft); border-radius: 6px; }
.rep-give { border-top: 1px solid var(--line); }
.rep-btn { border-radius: var(--r-md); border-width: 1px; }
.rep-pill.research { color: var(--lav-ink); background: var(--lav-bg); border-color: var(--lav-line); }
.rep-pill.accurate { color: var(--sky-ink); background: var(--sky-bg); border-color: var(--sky-line); }

/* ---------- Feedback (segmented tabs like the Ashford reference) ---------- */
.eyebrow { color: var(--clay-500); }
.feedback-tabs { border-bottom: 0; background: var(--sand-150); border-radius: var(--r-md); padding: 4px; gap: 2px; }
.feedback-tabs button { border-bottom: 0; border-radius: 8px; padding: 7px 16px; color: var(--ink-500); font-family: var(--font-sans); }
.feedback-tabs button.active { background: #fff; color: var(--ink-900); box-shadow: var(--sh-sm); }
.feedback-card { border-radius: var(--r-lg); }
.feedback-kind { background: var(--sand-100); color: var(--ink-700); border-radius: 6px; }
.feedback-vote { background: var(--sand-50); border-color: var(--line); border-radius: 10px; }
.feedback-vote button[aria-pressed="true"] { color: var(--clay-500); background: var(--copper-soft); }
.feedback-status { background: var(--peach-bg); color: var(--peach-ink); border-radius: 6px; font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: .05em; }
.feedback-status.resolved { background: var(--mint-bg); color: var(--mint-ink); }

/* ---------- Messages ---------- */
.dm-row { border-bottom-color: var(--line); }
.dm-row:hover { background: var(--sand-50); }
.dm-row.active { background: var(--sand-100); box-shadow: inset 3px 0 0 var(--clay-500); }
.dm-msg.them .dm-bubble { background: var(--sand-100); border-color: var(--line); }
.dm-msg.me .dm-bubble { background: var(--navy-800); color: #fff; }
.dm-unread-dot { box-shadow: none; }
.dm-compose { background: #fff; }

/* ---------- Settings / misc ---------- */
.settings-section { border-top-color: var(--line); }
.email-change-form { border-top-color: var(--line); }
.misinfo-banner { color: #7A3E06; }
.misinfo-banner .mi-sub { color: #8A5212; }
.img-remove { background: rgba(15, 23, 42, .7); }
.link-chip, .media-card { background: var(--sand-50); border-color: var(--line); }
.not-found-brand { font-size: 24px; }

/* ---------- Mobile: bottom tab bar stays navy ---------- */
@media (max-width: 720px) {
  .site-nav, .site-nav:hover, .site-nav:focus-within { background: var(--navy-900); border-top: 0; padding-left: 8px; padding-right: 8px; }
  .nav-item { font-size: 10.5px; border-radius: 10px; }
  .hero-stat { min-width: 0; flex: 1; }
  .folder-search { width: 100%; }
  .co-h-name { font-size: clamp(28px, 8vw, 38px); }
}

/* =================================================================
   Harmonized palette + selected soft-3D details
   Flat white cards on a cool canvas; only the search fields, folder
   bookmark, sentiment sliders, profile chip and top bar use relief.
   ================================================================= */
:root {
  --page: #F2F4F8;
  --clay-500: #9C4219;
  --clay-400: #B3582A;
  --clay-600: #7F3412;
  --copper-soft: #F8ECE3;
  --copper-line: #EDD4C3;
  --navy-900: #121E36;
  --navy-800: #1B2A47;
  --sentiment-gradient: linear-gradient(90deg, #C4525A 0%, #E6A7A6 25%, #D5DBE4 50%, #93CCAF 75%, #2E8B66 100%);
  --bull: #2E8B66; --bull-bg: #E8F5EF; --bull-line: #C5E6D6;
  --bear: #C4525A; --bear-bg: #FBEEEF; --bear-line: #F1CDD0;
  --soft-light: rgba(255, 255, 255, .95);
  --soft-dark: rgba(146, 158, 184, .45);
  --soft-raise: -3px -3px 7px var(--soft-light), 3px 3px 8px var(--soft-dark);
  --soft-inset: inset 2px 2px 5px rgba(146, 158, 184, .42), inset -2px -2px 5px var(--soft-light);
}
body { background: var(--page); }
.nav-item.active { background: rgba(240, 165, 122, .14); color: #F0A57A; }

/* top bar shares the canvas color so the relief reads cleanly */
.topbar { background: var(--page); border-bottom: 1px solid rgba(146, 158, 184, .22); box-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
.brand-mark { background: #fff; border-color: rgba(255,255,255,.8); box-shadow: var(--soft-raise); }
.brand:hover .brand-mark { box-shadow: -4px -4px 9px var(--soft-light), 4px 4px 11px var(--soft-dark); }

/* search fields are carved into the surface */
.topbar-search, .folder-search { background: var(--page); border: 1px solid transparent; box-shadow: var(--soft-inset); }
.topbar-search:hover { border-color: transparent; }
.topbar-search:focus-within, .folder-search:focus-within {
  background: var(--page); border-color: transparent;
  box-shadow: var(--soft-inset), 0 0 0 2px rgba(179, 88, 42, .32);
}

/* profile chip + mail button: raised */
.topbar .user-chip, .topbar .icon-btn, .topbar .search-mini {
  background: var(--page); border-color: rgba(255, 255, 255, .7); box-shadow: var(--soft-raise);
}
.topbar .user-chip:hover, .topbar .icon-btn:hover { background: var(--page); border-color: rgba(255,255,255,.85); box-shadow: -4px -4px 9px var(--soft-light), 4px 4px 11px var(--soft-dark); }
.topbar .user-chip:active, .topbar .icon-btn:active, .topbar .search-mini:active, .user-dd.open .user-chip { box-shadow: var(--soft-inset); }

/* folder bookmark: raised button, pressed in once saved */
.folder-bookmark { background: #F7F8FB; box-shadow: -2px -2px 5px #fff, 2px 3px 6px rgba(146, 158, 184, .5); }
.folder-bookmark:hover { background: #F7F8FB; color: var(--ink-700); box-shadow: -3px -3px 6px #fff, 3px 4px 8px rgba(146, 158, 184, .55); }
.folder-bookmark[aria-pressed="true"], .folder-bookmark:active { background: #EEF1F6; color: var(--clay-500); box-shadow: inset 2px 2px 4px rgba(146, 158, 184, .5), inset -2px -2px 4px #fff; }

/* sentiment sliders: recessed gradient groove with a raised knob */
.sentiment-range { height: 34px; }
.sentiment-range::-webkit-slider-runnable-track {
  height: 10px; border-radius: 999px; background: var(--sentiment-gradient);
  box-shadow: inset 2px 2px 4px rgba(40, 50, 75, .3), inset -2px -2px 4px rgba(255, 255, 255, .55), 0 1px 0 #fff;
}
.sentiment-range::-moz-range-track {
  height: 10px; border-radius: 999px; background: var(--sentiment-gradient);
  box-shadow: inset 2px 2px 4px rgba(40, 50, 75, .3), inset -2px -2px 4px rgba(255, 255, 255, .55);
}
.sentiment-range::-webkit-slider-thumb {
  width: 24px; height: 24px; margin-top: -7px; border: 0;
  background: radial-gradient(circle, var(--navy-800) 0 4px, transparent 4.5px), linear-gradient(145deg, #FFFFFF, #DDE2EC);
  box-shadow: -2px -2px 5px rgba(255, 255, 255, .9), 3px 4px 8px rgba(110, 124, 152, .5);
}
.sentiment-range::-moz-range-thumb {
  width: 22px; height: 22px; border: 0;
  background: radial-gradient(circle, var(--navy-800) 0 4px, transparent 4.5px), linear-gradient(145deg, #FFFFFF, #DDE2EC);
  box-shadow: -2px -2px 5px rgba(255, 255, 255, .9), 3px 4px 8px rgba(110, 124, 152, .5);
}
.sentiment-range:active::-webkit-slider-thumb { box-shadow: inset 2px 2px 5px rgba(110, 124, 152, .45), inset -2px -2px 5px rgba(255, 255, 255, .9); }
.company-value-track { margin-top: 1px; }
.sentiment-track { height: 10px; box-shadow: inset 2px 2px 4px rgba(40, 50, 75, .3), inset -2px -2px 4px rgba(255, 255, 255, .55); }
.sentiment-marker { width: 20px; height: 20px; border: 0; background: radial-gradient(circle, var(--navy-800) 0 3.5px, transparent 4px), linear-gradient(145deg, #FFFFFF, #DDE2EC); box-shadow: -2px -2px 5px rgba(255, 255, 255, .9), 3px 3px 7px rgba(110, 124, 152, .5); }

@media (prefers-reduced-motion: no-preference) {
  .folder-bookmark, .topbar .user-chip, .topbar .icon-btn, .brand-mark { transition: box-shadow 160ms ease, background-color 160ms ease; }
}

/* =================================================================
   V3 — warm cream + deep olive (reference: Profile / Connection / Schedule)
   Plus Jakarta Sans, pill buttons, list-style rows, soft cream cards.
   Copper stays as the otterary brand accent.
   ================================================================= */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../assets/fonts/plusjakartasans.woff2) format('woff2');
}
:root {
  --page: #EFEBE3;
  --card: #FBF8F2;
  --card-soft: #F6F2EA;
  --card-white: #FFFDF9;
  --chip: #E9E5DB;
  --chip-hover: #E1DCD0;
  --row-hover: #F2EEE5;

  --olive-900: #2F3B26;
  --olive-800: #3B4A30;
  --olive-700: #4D5E40;
  --olive-300: #A9B79A;
  --gold: #E2C06A;

  --sand-50: #F8F5EF; --sand-100: #F2EEE5; --sand-150: #E9E5DB; --sand-200: #DAD4C6; --sand-300: #C3BCAB;
  --line: #E7E2D7; --line-strong: #D9D2C3;
  --ink-900: #26261F; --ink-700: #46463D; --ink-600: #5B5A50; --ink-500: #7B796E; --ink-400: #A3A094;

  --clay-500: #9C4219; --clay-400: #B3582A; --clay-600: #7F3412;
  --copper-soft: #F5E6DA; --copper-line: #E9D0BE;

  --bull: #4E6B3A; --bull-bg: #E5ECDA; --bull-line: #CAD8B8;
  --bear: #A94B3F; --bear-bg: #F5E4DE; --bear-line: #EACBC2;
  --neutral: #7B796E; --neutral-bg: #EEEBE3; --neutral-line: #DAD4C6;
  --sentiment-gradient: linear-gradient(90deg, #B0564A 0%, #DDB1A3 26%, #DDD8CC 50%, #AFC39B 74%, #4E6B3A 100%);

  --lav-bg: #ECE6F1; --lav-ink: #6A5987; --lav-line: #DDD3E8;
  --sky-bg: #E3ECEA; --sky-ink: #3F6B67; --sky-line: #CCDDDA;
  --peach-bg: #F4E7D9; --peach-ink: #93602F; --peach-line: #E8D3BC;
  --mint-bg: var(--bull-bg); --mint-ink: var(--bull);

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px;
  --sh-xs: 0 1px 2px rgba(70, 60, 40, .05);
  --sh-sm: 0 2px 6px rgba(70, 60, 40, .06);
  --sh-md: 0 14px 30px -18px rgba(70, 60, 40, .28);
  --sh-lg: 0 26px 56px -26px rgba(60, 50, 30, .36), 0 4px 12px -6px rgba(60, 50, 30, .10);
  --focus-ring: 0 0 0 3px rgba(59, 74, 48, .20);

  --soft-light: rgba(255, 255, 255, .9);
  --soft-dark: rgba(168, 157, 134, .45);
  --soft-raise: -3px -3px 7px var(--soft-light), 3px 3px 8px var(--soft-dark);
  --soft-inset: inset 2px 2px 5px rgba(168, 157, 134, .42), inset -2px -2px 5px var(--soft-light);

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "Plus Jakarta Sans", system-ui, sans-serif;
  --navy-800: var(--olive-800);
  --navy-900: var(--olive-900);
}
body { background: var(--page); color: var(--ink-900); letter-spacing: 0; font-feature-settings: normal; }
:focus-visible { outline-color: var(--olive-700); }

.hero h1, .sec-title, .co-h-name, .detail-title, .post-title, .card-title, .profile-name,
.modal-head h2, .compose-head h1, .compose-title, .comments h3, .empty h3, .dm-list-head,
.dm-empty h3, .settings-section h2, .feedback-heading h1, .feedback-content h2,
.company-create-form h1, .not-found-page h1, .not-found-brand, .writing-title,
.rich-article h2, .rich-article h3, .ref-title, .publish-options h2, .folder-name, .brand-name {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
}

/* ---------- top bar: envelope removed, warm relief kept ---------- */
.topbar a.icon-btn[href="#/messages"] { display: none; }
.topbar { background: var(--page); border-bottom-color: rgba(168, 157, 134, .25); }
.brand-name { font-size: 21px; }
.topbar .user-chip .u-karma { color: var(--clay-500); }

/* ---------- buttons: pills ---------- */
.btn { border-radius: 999px; height: 44px; padding: 0 20px; font-weight: 600; }
.btn-sm { border-radius: 999px; height: 36px; }
.btn-primary { background: var(--olive-800); color: #fff; box-shadow: 0 8px 18px -10px rgba(47, 59, 38, .7); }
.btn-primary:hover { background: var(--olive-900); box-shadow: 0 10px 22px -10px rgba(47, 59, 38, .8); }
.btn-ghost { background: var(--chip); border: 0; color: var(--ink-900); box-shadow: none; }
.btn-ghost:hover { background: var(--chip-hover); color: var(--ink-900); border: 0; }
.card .btn-ghost, .modal .btn-ghost, .detail-card .btn-ghost, .co-header .btn-ghost { background: var(--chip); }
.btn-danger { border-radius: 999px; }
.dd-btn { border-radius: 999px; background: var(--chip); border: 0; box-shadow: none; color: var(--ink-900); font-weight: 600; padding: 0 14px 0 16px; }
.dd-btn:hover { background: var(--chip-hover); color: var(--ink-900); }
.dd-btn.active, .dd.open .dd-btn { background: var(--olive-800); color: #fff; box-shadow: none; }
.dd-btn .icon-sm:first-child, .dd-btn > .icon-sm:last-child { color: currentColor; opacity: .8; }
.dd-btn.active .icon-sm:first-child, .dd.open .dd-btn .icon-sm:first-child { color: currentColor; }
.create-trigger.dd-btn { border-radius: 50%; background: var(--olive-800); color: #fff; }
.create-trigger.dd-btn:hover, .dd.open .create-trigger.dd-btn { background: var(--olive-900); color: #fff; }
.pill { border-radius: 999px; }

/* dropdown menus as list tables */
.dd-menu { background: var(--card-white); border: 1px solid var(--line); border-radius: 20px; padding: 8px; box-shadow: var(--sh-lg); }
.dd-item { border-radius: 12px; font-weight: 500; color: var(--ink-700); padding: 10px 12px; }
.dd-item:hover { background: var(--row-hover); color: var(--ink-900); }
.dd-item.sel { background: var(--chip); color: var(--ink-900); font-weight: 600; }
.dd-item .icon-sm:first-child { color: var(--ink-500); }
.dd-item.sel .icon-sm:first-child, .dd-tick { color: var(--olive-800); }

/* ---------- navigation rail: deep olive ---------- */
.site-nav { background: var(--olive-800); }
.nav-item { color: #B9C2AD; font-weight: 500; border-radius: 14px; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .10); color: #fff; }
.nav-item.active .icon { color: var(--gold); }
.site-nav:hover, .site-nav:focus-within { box-shadow: 14px 0 32px -14px rgba(47, 59, 38, .5); }

/* ---------- surfaces ---------- */
.card, .co-header, .profile-head, .detail-card, .compose-card, .dm-list, .dm-thread, .feedback-card, .post-card {
  background: var(--card); border: 1px solid rgba(255, 255, 255, .6); box-shadow: var(--sh-sm);
}
.card, .post-card, .feedback-card { border-radius: 24px; }
.co-header, .profile-head, .detail-card, .compose-card, .dm-list, .dm-thread { border-radius: 28px; }
.post-card.clickable:hover { box-shadow: var(--sh-md); border-color: rgba(255,255,255,.8); }
.post-card.clickable:hover .post-title { color: var(--olive-800); }
.card-title { font-weight: 700; }
.card-title .icon { background: var(--chip); color: var(--olive-800); border-radius: 50%; }
.modal { background: var(--card); border-radius: 28px; }
.modal-foot, .compose-foot { background: var(--card-soft); }
.toast { background: var(--olive-900); border-radius: 18px; }

/* list/table rows (reference: Connection list) */
.rank-row { border-top: 0; padding: 9px 10px; margin: 0 -10px; border-radius: 14px; transition: background-color 140ms ease; }
.rank-row:hover { background: var(--row-hover); }
.rank-row .rk { color: var(--ink-400); }
.rank-row .val { color: var(--olive-800); }
.tkr-row:hover { background: var(--row-hover); }
.company-layout .rank-row { padding: 8px; margin: 0 -8px; }
.dm-list { padding: 6px 8px; }
.dm-list-head { border-bottom: 0; padding: 14px 12px 8px; }
.dm-tools { border-bottom: 0; padding: 6px 4px 10px; }
.dm-row { border-bottom: 0; border-radius: 18px; padding: 12px; margin: 2px 0; }
.dm-row:hover { background: var(--row-hover); }
.dm-row.active { background: var(--chip); box-shadow: none; }
.dm-thread-head { border-bottom-color: var(--line); }
.dm-msg.them .dm-bubble { background: var(--card-white); border-color: var(--line); }
.dm-msg.me .dm-bubble { background: var(--olive-800); }
.dm-compose { background: var(--card); }
.sr-item, .ac-item { border-radius: 12px; }
.sr-item:hover, .sr-item.hl, .ac-item:hover, .ac-item.hl, .sr-all:hover { background: var(--row-hover); }
.search-results, .ac-menu { background: var(--card-white); border-radius: 20px; }
.sr-all, .sr-create { color: var(--olive-800); }

/* ---------- inputs ---------- */
.input, .textarea, .comment-compose textarea, .reply-box textarea, .dm-compose textarea {
  background: var(--card-white); border: 1px solid var(--line); border-radius: 16px;
}
.input:focus, .textarea:focus, .comment-compose textarea:focus, .reply-box textarea:focus, .dm-compose textarea:focus { border-color: var(--olive-700); box-shadow: var(--focus-ring); }
.topbar-search:focus-within, .folder-search:focus-within { box-shadow: var(--soft-inset), 0 0 0 2px rgba(59, 74, 48, .3); }
.topbar-search, .folder-search { border-radius: 999px; }
.folder-search { padding: 0 16px; }

/* ---------- folders ---------- */
.folder { background: var(--card); border: 1px solid rgba(255, 255, 255, .6); border-radius: 24px; box-shadow: var(--sh-sm); }
.folder:hover { background: var(--card); border-color: rgba(255,255,255,.85); box-shadow: var(--sh-md); }
.folder:hover .folder-name { color: var(--ink-900); }
.folder-name { font-weight: 700; font-size: 20px; }
.company-logo.has-logo { background: var(--card-white); box-shadow: 0 1px 3px rgba(70, 60, 40, .08); }
.company-logo { border-radius: 14px; }
.folder .folder-foot { border-top: 1px solid var(--line); }
.folder-count { color: var(--ink-600); }
.folder-bookmark { background: var(--card-soft); box-shadow: -2px -2px 5px #fff, 2px 3px 6px rgba(168, 157, 134, .5); }
.folder-bookmark:hover { background: var(--card-soft); }
.folder-bookmark[aria-pressed="true"], .folder-bookmark:active { background: var(--chip); color: var(--clay-500); box-shadow: inset 2px 2px 4px rgba(168, 157, 134, .55), inset -2px -2px 4px #fff; }
.sentiment-range::-webkit-slider-thumb { background: radial-gradient(circle, var(--olive-800) 0 4px, transparent 4.5px), linear-gradient(145deg, #FFFFFF, #E4DED2); box-shadow: -2px -2px 5px rgba(255,255,255,.9), 3px 4px 8px rgba(140, 128, 104, .5); }
.sentiment-range::-moz-range-thumb { background: radial-gradient(circle, var(--olive-800) 0 4px, transparent 4.5px), linear-gradient(145deg, #FFFFFF, #E4DED2); }
.sentiment-marker { background: radial-gradient(circle, var(--olive-800) 0 3.5px, transparent 4px), linear-gradient(145deg, #FFFFFF, #E4DED2); }

/* ---------- post chips ---------- */
.post-tags .pill { height: 26px; padding: 0 11px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; border: 0; }
.pill.type, .pill.muted { background: var(--chip); color: var(--ink-700); }
.pill.type.blog { background: var(--lav-bg); color: var(--lav-ink); }
.pill.type.article { background: var(--sky-bg); color: var(--sky-ink); }
.pill.type.audio { background: var(--peach-bg); color: var(--peach-ink); }
.vote { background: var(--chip); border: 0; }
.post-actions > .post-comments { background: var(--chip); border: 0; }
.post-meta a.tkr, .post-folder-back .tkr { background: var(--chip); color: var(--ink-900); border-radius: 999px; padding: 2px 9px; letter-spacing: .02em; }
.compact-sentiment [data-clear-sent] { background: var(--chip); border: 0; border-radius: 999px; }
.co-h-stat { background: var(--card-white); border: 0; border-radius: 18px; box-shadow: var(--sh-xs); }
.chip-mini { background: var(--chip); border-radius: 999px; }
.type-tag { border-radius: 999px; background: var(--chip); border: 0; color: var(--ink-700); }
.type-tag.active { background: var(--olive-800); color: #fff; }
.editor-toolbar, .classic-composer .editor-toolbar { background: var(--card-soft); border-color: var(--line); }
.classic-composer .rich-editor { background: var(--card-white); border-color: var(--line); }
.rich-article .article-mention { background: var(--sky-bg); border-color: var(--sky-line); color: var(--sky-ink); }
.rich-article .article-post-card { background: var(--card-white); }

/* ---------- segmented tabs: pill track, olive selection ---------- */
.feedback-tabs, .seg { background: var(--chip); border-radius: 999px; padding: 4px; box-shadow: none; }
.feedback-tabs button, .seg button { border-radius: 999px; }
.feedback-tabs button.active, .seg button[aria-pressed="true"] { background: var(--olive-800); color: #fff; box-shadow: none; }
.feedback-kind { background: var(--chip); border-radius: 999px; padding: 3px 10px; }
.feedback-status { border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.feedback-vote { background: var(--chip); border: 0; border-radius: 16px; }
.feedback-vote button[aria-pressed="true"] { background: var(--olive-800); color: #fff; }
.profile-head::before { background: linear-gradient(120deg, #E9E3D3 0%, #EDE8DA 55%, rgba(255,255,255,0) 100%); }
.rep-btn { border-radius: 999px; background: var(--chip); border: 0; }
.eyebrow, .hero-kicker { color: var(--olive-800); }

/* ---------- new hero banner ---------- */
.hero.hero-v2 {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); gap: 32px; align-items: center;
  padding: 36px; border-radius: 30px; color: var(--ink-900);
  background: var(--card); border: 1px solid rgba(255, 255, 255, .7); box-shadow: var(--sh-sm);
}
.hero-arcs { position: absolute; top: -8px; left: 22%; width: 560px; max-width: 70%; stroke: var(--gold); stroke-width: 1.2; opacity: .75; pointer-events: none; z-index: 0; }
.hero-v2 .hero-left { max-width: none; z-index: 1; }
.hero-v2 .hero-kicker {
  background: var(--chip); border: 0; border-radius: 999px; padding: 7px 14px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; margin-bottom: 20px;
}
.hero-v2 h1 { font-size: clamp(32px, 3.3vw, 48px); line-height: 1.1; letter-spacing: -.03em; max-width: 14ch; }
.hero-v2 h1 em { font-style: normal; color: var(--clay-500); }
.hero-tiles { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-tile {
  display: flex; flex-direction: column; gap: 10px; min-width: 200px; padding: 16px 18px;
  background: var(--card-white); border-radius: 22px; box-shadow: var(--sh-xs); color: var(--ink-900);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
a.hero-tile:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.ht-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-500); font-weight: 500; }
.ht-go { color: var(--ink-400); transform: rotate(-90deg); }
.ht-row { display: flex; align-items: center; gap: 16px; }
.ht-n { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.ht-stack { display: flex; }
.company-logo.ht-logo { width: 32px; height: 32px; border-radius: 50%; margin-left: -9px; border: 2px solid var(--card-white); font-size: 8px; box-shadow: none; }
.company-logo.ht-logo:first-child { margin-left: 0; }
.company-logo.ht-logo.has-logo { background: #fff; }
.company-logo.ht-logo img { width: 72%; height: 72%; }

.hero-pulse { position: relative; z-index: 1; display: grid; gap: 10px; padding: 14px; background: var(--chip); border-radius: 26px; }
.hp-head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 8px 2px; font-weight: 700; font-size: 15px; }
.hp-head small { font-size: 12px; font-weight: 500; color: var(--ink-500); }
.hp-list { display: grid; gap: 2px; padding: 6px; background: var(--card-white); border-radius: 20px; }
.hp-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(60px, 90px) 54px 14px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; color: var(--ink-900); transition: background-color 140ms ease; }
.hp-row:hover { background: var(--row-hover); }
.company-logo.hp-logo { width: 34px; height: 34px; border-radius: 11px; font-size: 8.5px; background: var(--card-soft); }
.company-logo.hp-logo:not(.has-logo) { background: var(--accent); }
.company-logo.hp-logo img { width: 62%; height: 62%; }
.hp-id { min-width: 0; line-height: 1.25; }
.hp-id b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-id small { font-size: 11.5px; color: var(--ink-500); font-weight: 500; }
.hp-meter { position: relative; height: 6px; border-radius: 999px; background: var(--sentiment-gradient); box-shadow: inset 1px 1px 2px rgba(40, 40, 30, .25); }
.hp-meter i { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--olive-800); transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(40, 40, 30, .3); }
.hp-val { justify-self: end; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.hp-val.bull { color: var(--bull); background: var(--bull-bg); }
.hp-val.bear { color: var(--bear); background: var(--bear-bg); }
.hp-val.flat { color: var(--ink-500); background: var(--sand-100); }
.hp-go { color: var(--ink-400); transform: rotate(-90deg); }
.hp-empty { padding: 14px; color: var(--ink-500); font-size: 14px; }
.hp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-mini { padding: 12px 14px; background: var(--card-white); border-radius: 20px; }
.hp-mini-l { display: block; font-size: 12.5px; color: var(--ink-500); font-weight: 500; }
.hp-mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.hp-mini-row b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }

@media (max-width: 1080px) {
  .hero.hero-v2 { grid-template-columns: minmax(0, 1fr); }
  .hero-v2 h1 { max-width: 18ch; }
}

/* ---------- mobile: floating olive tab bar like the reference ---------- */
@media (max-width: 720px) {
  .hero.hero-v2 { padding: 22px 18px; border-radius: 24px; gap: 22px; }
  .hero-tile { min-width: 0; flex: 1; }
  .hp-row { grid-template-columns: 32px minmax(0, 1fr) 56px 50px; }
  .hp-row .hp-go { display: none; }
  .site-nav, .site-nav:hover, .site-nav:focus-within {
    left: 12px; right: 12px; width: auto; bottom: calc(10px + env(safe-area-inset-bottom));
    height: 62px; padding: 6px 8px; border-radius: 24px; background: var(--olive-800);
    box-shadow: 0 14px 30px -12px rgba(47, 59, 38, .6);
  }
  .nav-item { border-radius: 16px; }
  #main { padding-bottom: calc(var(--mobile-nav-height) + 22px + env(safe-area-inset-bottom)); }
}

/* =================================================================
   V3.1 — subtle layered depth + rotating metric block
   ================================================================= */
:root {
  --layer: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 1px rgba(70, 60, 40, .05), 0 3px 6px -2px rgba(70, 60, 40, .07), 0 14px 26px -16px rgba(70, 60, 40, .26);
  --layer-hover: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 1px rgba(70, 60, 40, .05), 0 6px 12px -4px rgba(70, 60, 40, .10), 0 22px 36px -18px rgba(70, 60, 40, .32);
}
.hero.hero-v2 { box-shadow: var(--layer); border-color: rgba(255, 255, 255, .85); }
.folder { box-shadow: var(--layer); border-color: rgba(255, 255, 255, .85); }
.folder:hover { box-shadow: var(--layer-hover); }

.hero-rotator { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 28px; }
.hr-window {
  position: relative; width: 360px; max-width: 100%; height: 64px; perspective: 700px;
  background: var(--card-white); border-radius: 22px; box-shadow: var(--layer); overflow: hidden;
}
.hr-face {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 18px;
  opacity: 0; transform: rotateX(-90deg) translateY(12px); transform-origin: 50% 50% -20px;
  transition: transform 620ms cubic-bezier(.22, .9, .3, 1.1), opacity 380ms ease;
  backface-visibility: hidden;
}
.hr-face.is-in { opacity: 1; transform: none; }
.hr-face.is-out { opacity: 0; transform: rotateX(90deg) translateY(-12px); transition-duration: 460ms, 300ms; }
.hr-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--olive-800); color: var(--gold); flex: none; }
.hr-n { font-size: 28px; font-weight: 700; letter-spacing: -.03em; color: var(--ink-900); line-height: 1; }
.hr-l { font-size: 15px; font-weight: 500; color: var(--ink-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-dots { display: inline-flex; gap: 6px; padding-left: 20px; }
.hr-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--sand-300); transition: width 300ms ease, background-color 300ms ease; }
.hr-dots i.on { width: 18px; background: var(--olive-800); }
@media (prefers-reduced-motion: reduce) {
  .hr-face, .hr-face.is-out { transform: none; transition: opacity 1ms; }
}

/* ---------- Account chip keeps its raised look while its menu is open ---------- */
.user-dd.open .user-chip, .user-dd .user-chip:active,
.topbar .user-dd.open .user-chip {
  background: var(--page); color: var(--ink-900);
  border-color: rgba(255, 255, 255, .85);
  box-shadow: -4px -4px 9px var(--soft-light), 4px 4px 11px var(--soft-dark);
}
.user-dd.open .user-chip .u-name { color: var(--ink-900); }
.user-dd.open .user-chip .u-karma { color: var(--clay-500); }

/* ---------- Profile banner: envelope top-right, ⋯ menu beside the name ---------- */
.profile-message {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--card-white); color: var(--ink-700);
  box-shadow: -3px -3px 7px var(--soft-light), 3px 3px 8px var(--soft-dark);
  transition: box-shadow 160ms ease, color 160ms ease;
}
.profile-message:hover { color: var(--olive-800); box-shadow: -4px -4px 9px var(--soft-light), 4px 4px 11px var(--soft-dark); }
.profile-message:active { box-shadow: var(--soft-inset); }
.profile-head:has(.profile-message) .profile-id { padding-right: 56px; }
.profile-menu { display: inline-flex; }
.profile-menu .post-menu-trigger { width: 34px; height: 34px; color: var(--ink-500); background: transparent; }
.profile-menu .post-menu-trigger:hover { background: var(--chip); color: var(--ink-900); }
.profile-menu.open .post-menu-trigger { background: var(--chip); color: var(--ink-900); }
.profile-menu .dd-menu { left: 0; right: auto; min-width: 150px; font-size: 14px; letter-spacing: 0; }
.profile-menu .dd-item.danger { color: var(--bear); }
.profile-menu .dd-item.danger .icon-sm:first-child { color: var(--bear); }

/* ---------- Account chip presses in (same color) while its menu is open ---------- */
.user-dd.open .user-chip, .user-dd .user-chip:active, .topbar .user-dd.open .user-chip {
  background: var(--page); color: var(--ink-900); border-color: transparent;
  box-shadow: var(--soft-inset);
}

/* ---------- Filter/sort buttons keep their beige chip color in every state ---------- */
.dd-btn:not(.create-trigger):not(.post-menu-trigger):not(.user-chip),
.dd-btn.active:not(.create-trigger):not(.post-menu-trigger):not(.user-chip),
.dd.open .dd-btn:not(.create-trigger):not(.post-menu-trigger):not(.user-chip) {
  background: var(--chip); color: var(--ink-900); border: 0; box-shadow: none;
}
.dd-btn:not(.create-trigger):not(.post-menu-trigger):not(.user-chip):hover { background: var(--chip-hover); color: var(--ink-900); }

/* Plus Jakarta Sans draws + and − low and wide; the system font's signs sit centered and snug, like typed "+25%". */
.num-sign { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
.num { white-space: nowrap; }

/* ---------- Header lockup: the otter is the "o" in otterary ---------- */
.brand.brand-lockup { display: inline-flex; align-items: center; gap: 0; flex: none; font-size: 26px; line-height: 1; }
.brand-o { height: 1em; width: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: block; flex: none; }
.brand-rest {
  font-family: var(--font-sans); font-weight: 700; font-size: 1em; line-height: 1;
  color: #2e2820; letter-spacing: -.015em;
}
/* Narrow headers: the lockup would drop under ~24px, so show the otter alone at a tappable size. */
@media (max-width: 720px) {
  .brand.brand-lockup { font-size: 36px; }
  .brand-rest { display: none; }
}

/* =================================================================
   Navigation: gold active state with no highlight box
   ================================================================= */
.nav-item, .nav-item:hover, .nav-item.active { background: transparent; }
.nav-item { color: #B9C2AD; transition: color 200ms ease; }
.nav-item:hover { color: #fff; }
.nav-item.active, .nav-item.active .icon { color: var(--gold); }
.nav-item .icon { transition: color 200ms ease, transform 300ms cubic-bezier(.22, 1, .36, 1); }

/* Phones: icons only; the active one sweeps open to show its name */
@media (max-width: 720px) {
  .site-nav, .site-nav:hover, .site-nav:focus-within { display: flex; justify-content: space-around; align-items: center; grid-template-columns: none; }
  .nav-item {
    flex: 0 0 auto; flex-direction: row; gap: 0; height: 46px; padding: 0 12px; margin: 0;
    font-size: 14px; font-weight: 600; border-radius: 999px;
    transition: gap 420ms cubic-bezier(.22, 1, .36, 1), padding 420ms cubic-bezier(.22, 1, .36, 1), color 200ms ease;
  }
  .nav-item span, .site-nav:hover .nav-item span, .site-nav:focus-within .nav-item span {
    display: inline-block; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; color: #fff;
    transition: max-width 420ms cubic-bezier(.22, 1, .36, 1), opacity 260ms ease;
  }
  .nav-item.active { gap: 8px; padding: 0 16px; }
  .nav-item.active span, .site-nav:hover .nav-item.active span, .site-nav:focus-within .nav-item.active span { max-width: 96px; opacity: 1; transition-delay: 0ms, 90ms; }
  .nav-item.active .icon { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-item, .nav-item span, .nav-item .icon { transition: none !important; }
}

/* =================================================================
   Header: account / sign-in controls always pinned to the top right
   ================================================================= */
.topbar-spacer, .topbar .topbar-spacer { flex: 1 1 0; min-width: 0; }
.auth-dd { position: relative; flex: none; }
.auth-trigger { gap: 6px; padding: 0 16px 0 20px; }
.auth-trigger .icon-sm { transition: transform 200ms ease; opacity: .85; }
.auth-dd.open .auth-trigger .icon-sm { transform: rotate(180deg); }
.auth-dd .dd-menu { right: 0; left: auto; min-width: 210px; }
.auth-dd .dd-item { font-weight: 600; color: var(--ink-900); }

/* =================================================================
   Profile: collapsible "Give a reputation tag"
   ================================================================= */
.rep-give { margin-top: 18px; padding-top: 12px; }
.rep-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 0;
  background: none; border: 0; cursor: pointer; color: var(--ink-500);
}
.rep-toggle:hover { color: var(--ink-900); }
.rep-toggle .icon-sm { transition: transform 260ms ease; }
.rep-give.open .rep-toggle .icon-sm { transform: rotate(180deg); }
.rep-give-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms cubic-bezier(.22, 1, .36, 1); }
.rep-give.open .rep-give-panel { grid-template-rows: 1fr; }
.rep-give-inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear 320ms; }
.rep-give.open .rep-give-inner { visibility: visible; transition-delay: 0s; }
.rep-give-inner .rep-give-row { padding-top: 12px; }
@media (prefers-reduced-motion: reduce) { .rep-give-panel, .rep-give-inner { transition: none; } }

/* =================================================================
   Post editor: Substack-style toolbar and menus
   ================================================================= */
.classic-composer .editor-toolbar.tb-substack, .editor-toolbar.tb-substack {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; width: 100%;
  padding: 6px 8px; overflow-x: auto; scrollbar-width: none;
}
.tb-substack::-webkit-scrollbar { display: none; }
.editor-toolbar.tb-substack > button {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 36px; min-width: 36px; min-height: 0; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-700); font: 600 14px var(--font-sans);
}
.editor-toolbar.tb-substack > button:hover, .editor-toolbar.tb-substack > button:focus-visible { background: var(--chip); color: var(--ink-900); box-shadow: none; }
.editor-toolbar.tb-substack > button[aria-pressed="true"], .editor-toolbar.tb-substack > button[aria-expanded="true"] { background: var(--chip-hover); color: var(--ink-900); }
.editor-toolbar.tb-substack > .tb-style { padding: 0 8px 0 10px; }
.tb-sep { flex: none; width: 1px; height: 22px; margin: 0 6px; background: var(--line-strong); }
.tb-menu, .tb-menu.editor-more {
  position: fixed; z-index: 140; display: grid; grid-template-columns: 1fr; width: auto; min-width: 210px;
  padding: 6px; background: var(--card-white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg);
}
.tb-menu[hidden] { display: none; }
.tb-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 10px;
  border: 0; border-radius: 10px; background: transparent; text-align: left; font: 500 14px var(--font-sans); color: var(--ink-700);
}
.tb-menu button:hover, .tb-menu button:focus-visible { background: var(--row-hover); color: var(--ink-900); }
.tb-menu button.sel { background: var(--chip); color: var(--ink-900); font-weight: 600; }
.tb-mi-icon { display: inline-grid; place-items: center; width: 22px; color: var(--ink-500); flex: none; }
.tb-h { font: 800 13px var(--font-sans); letter-spacing: -.02em; }
.tb-mi-check { margin-left: auto; display: inline-flex; color: var(--olive-800); visibility: hidden; }
.tb-menu button.sel .tb-mi-check { visibility: visible; }

/* formatting the toolbar can produce */
.rich-article [data-align="center"], .rich-editor [data-align="center"] { text-align: center; }
.rich-article [data-align="right"], .rich-editor [data-align="right"] { text-align: right; }
.rich-article sup, .rich-editor sup { font-size: .7em; line-height: 0; vertical-align: super; }
.rich-article sup[data-fn], .rich-editor sup[data-fn] { color: var(--clay-500); font-weight: 700; margin-left: 1px; }
.rich-article ol[data-footnotes], .rich-editor ol[data-footnotes] { font-size: 14px; line-height: 1.6; color: var(--ink-500); list-style: decimal; padding-left: 1.4em; }

/* ticker box: fits four characters, widens for longer tickers */
.compact-ticker { flex: 0 0 auto; width: auto; max-width: none; }
.compact-ticker .input { width: calc(var(--ticker-chars, 4) * 1.15ch + 30px); min-width: 0; padding: 10px 12px; text-align: center; }

/* Menu bar: soft box on hover; the selected icon fills solid gold with no box */
@media (hover: hover) {
  .nav-item:hover:not(.active) { background: rgba(255, 255, 255, .08); color: #fff; }
}
.nav-item.active, .nav-item.active:hover { background: transparent; }
.nav-icon .nav-shape, .nav-icon .nav-detail { transition: fill 220ms ease, stroke 220ms ease; }
.nav-item.active .nav-icon .nav-shape { fill: var(--gold); stroke: var(--gold); }
.nav-item.active .nav-icon .nav-detail { stroke: var(--olive-800); }

/* Side menu: expand on hover, or while a keyboard user is inside it; a mouse click
   leaves focus on the link, which must not keep it open after the pointer leaves. */
@media (min-width: 721px) {
  .site-nav:focus-within:not(:hover):not(:has(:focus-visible)) { width: var(--nav-width); box-shadow: none; }
  .site-nav:focus-within:not(:hover):not(:has(:focus-visible)) .nav-item span { opacity: 0; }
}

/* Quote attribution: small italic line inside the quote, dash included in the text */
.rich-article blockquote cite, .rich-editor blockquote cite {
  display: block; margin-top: 6px; font: italic 400 .6em/1.5 var(--font-sans); color: var(--ink-500);
}
.rich-article blockquote cite::before, .rich-editor blockquote cite::before { content: none; }
.tb-menu button:disabled { opacity: .45; cursor: not-allowed; background: transparent; }

/* User mentions sit slightly smaller than the surrounding text */
.rich-article .article-mention { font-size: .88em; }
