/* =========================================================================
   Scholars Post: new design (2026). Loaded after styles.css on every page.
   Layout with flexbox only. Fonts are self-hosted (assets/fonts, SIL Open Font Licence):
   Roboto Flex for text, Source Serif 4 (600) for headings. Icons: Phosphor (phosphor.css).
   Light and dark themes use the same switch as styles.css: data-theme on <html>, else the system setting.
   ========================================================================= */

@font-face { font-family: "Roboto Flex"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("../fonts/roboto-flex-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/roboto-flex-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Flex"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("../fonts/roboto-flex-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/roboto-flex-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --nd-navy: #03304a;          /* hero, dark cards */
  --nd-primary: #0b5578;       /* buttons, links, active states */
  --nd-on-primary: #ffffff;
  --nd-pale: #e6ecf1;          /* selected chips, tags, SciNexID chip: a quiet neutral */
  --nd-on-pale: #191c1e;
  --nd-cta: #ea6a24; --nd-cta-hover: #f48b50; --nd-on-cta: #1f0800;   /* brand orange: only the one main action per screen */
  --nd-hero-text: #d6e2ea;
  --nd-hero-line: #9fb8c8;
  --nd-page: #f7fafd;
  --nd-surface: #ffffff;
  --nd-soft: #eef3f7;
  --nd-search: #e6ecf1;
  --nd-ink: #191c1e;
  --nd-muted: #41484d;
  --nd-outline: #71787e;
  --nd-line: #dde3e8;
  --nd-line-soft: #e6ecf1;
  --nd-ok: #006b5b;
  --nd-q-bg: #ffdea3; --nd-q-fg: #261900;
  --nd-p-bg: #a0f2dd; --nd-p-fg: #00201a;
  --nd-d-bg: #e3dfff; --nd-d-fg: #130067;
  --nd-a-bg: #ffd8e4; --nd-a-fg: #3e001d;
  --nd-shadow: 0 8px 28px rgba(3, 48, 74, .18);
  --nd-sans: "Roboto Flex", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --nd-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --nd-r-card: 20px;
  --nd-r-hero: 28px;

  /* the tokens styles.css uses, so the other pages take the new palette too */
  --primary: #0b5578; --primary-dark: #03304a; --primary-soft: #e8eef3;
  --secondary: #0b5578; --secondary-dark: #03304a;
  --ink: #191c1e; --ink-soft: #41484d; --muted: #5a6268; --muted-light: #8a9298;
  --page: #f7fafd; --surface: #ffffff; --surface-soft: #f1f5f9; --line: #dde3e8;
  --shadow: none;
  --radius: 16px;
  --serif: "Source Serif 4", Georgia, serif;
  --header-h: 68px;
  --focus: 0 0 0 3px rgba(11, 85, 120, .35);
}
:root[data-theme="dark"] {
  --nd-navy: #0c3a55; --nd-primary: #8bcef5; --nd-on-primary: #00344d;
  --nd-pale: #2c353b; --nd-on-pale: #dfe3e7; --nd-cta: #f9a47a; --nd-cta-hover: #ffc3a3; --nd-on-cta: #3a1300; --nd-hero-text: #c9d6df; --nd-hero-line: #8fa9b9;
  --nd-page: #0f1417; --nd-surface: #171c20; --nd-soft: #1f2529; --nd-search: #252b30;
  --nd-ink: #dfe3e7; --nd-muted: #a9b1b8; --nd-outline: #8b9298; --nd-line: #2e363c; --nd-line-soft: #262d32; --nd-ok: #84d6c3;
  --nd-q-bg: #5c4300; --nd-q-fg: #ffdea3; --nd-p-bg: #00513f; --nd-p-fg: #a0f2dd; --nd-d-bg: #3a2e8c; --nd-d-fg: #e3dfff; --nd-a-bg: #6b1d3c; --nd-a-fg: #ffd8e4;
  --nd-shadow: 0 8px 28px rgba(0, 0, 0, .5);
  --primary: #8bcef5; --primary-dark: #c6e7ff; --primary-soft: #1f2a31; --secondary: #8bcef5; --secondary-dark: #c6e7ff;
  --ink: #dfe3e7; --ink-soft: #c1c7ce; --muted: #a9b1b8; --muted-light: #7f878d;
  --page: #0f1417; --surface: #171c20; --surface-soft: #1f2529; --line: #2e363c;
  --focus: 0 0 0 3px rgba(139, 206, 245, .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --nd-navy: #0c3a55; --nd-primary: #8bcef5; --nd-on-primary: #00344d;
    --nd-pale: #2c353b; --nd-on-pale: #dfe3e7; --nd-cta: #f9a47a; --nd-cta-hover: #ffc3a3; --nd-on-cta: #3a1300; --nd-hero-text: #c9d6df; --nd-hero-line: #8fa9b9;
    --nd-page: #0f1417; --nd-surface: #171c20; --nd-soft: #1f2529; --nd-search: #252b30;
    --nd-ink: #dfe3e7; --nd-muted: #a9b1b8; --nd-outline: #8b9298; --nd-line: #2e363c; --nd-line-soft: #262d32; --nd-ok: #84d6c3;
    --nd-q-bg: #5c4300; --nd-q-fg: #ffdea3; --nd-p-bg: #00513f; --nd-p-fg: #a0f2dd; --nd-d-bg: #3a2e8c; --nd-d-fg: #e3dfff; --nd-a-bg: #6b1d3c; --nd-a-fg: #ffd8e4;
    --nd-shadow: 0 8px 28px rgba(0, 0, 0, .5);
    --primary: #8bcef5; --primary-dark: #c6e7ff; --primary-soft: #1f2a31; --secondary: #8bcef5; --secondary-dark: #c6e7ff;
    --ink: #dfe3e7; --ink-soft: #c1c7ce; --muted: #a9b1b8; --muted-light: #7f878d;
    --page: #0f1417; --surface: #171c20; --surface-soft: #1f2529; --line: #2e363c;
    --focus: 0 0 0 3px rgba(139, 206, 245, .4);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
body { font-family: var(--nd-sans); font-size: 16px; line-height: 1.5; background: var(--nd-page); color: var(--nd-ink); }
a { color: var(--nd-primary); }
.ph { vertical-align: -0.125em; }
.nd-serif, .post-title, .post-title a, .pm-detail .post-title, .post-static h1, .profile-hero-main h1, .auth-card h1, .auth-hero h2, .join-card h2, .gate-card h3 {
  font-family: var(--nd-serif); font-weight: 600; letter-spacing: 0;
}
.card { border-color: var(--nd-line); box-shadow: none; }
.btn { border-radius: 22px; min-height: 40px; font-weight: 500; }
.btn-primary { background: var(--nd-primary); color: var(--nd-on-primary); }
.btn-primary:hover { background: var(--nd-navy); color: #fff; }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-primary:hover { color: var(--nd-on-primary); }
.dropdown-menu { border-radius: 16px; box-shadow: var(--nd-shadow); border-color: var(--nd-line); background: var(--nd-surface); }
.dropdown-menu .ph { width: 18px; text-align: center; color: var(--nd-muted); font-size: 18px; }

/* ---------- Buttons (new) ---------- */
.nd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 22px; border: 1px solid transparent; font: inherit; font-weight: 500; text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s; }
.nd-btn-lg { min-height: 56px; padding: 0 28px; border-radius: 28px; font-size: 17px; }
.nd-btn-block { width: 100%; }
.nd-btn-primary { background: var(--nd-primary); color: var(--nd-on-primary); }
.nd-btn-primary:hover { background: var(--nd-navy); color: #fff; }
.nd-btn-tonal { background: var(--nd-pale); color: var(--nd-on-pale); }
.nd-btn-outline { border-color: var(--nd-outline); color: var(--nd-primary); background: transparent; }
.nd-btn-outline:hover { background: var(--nd-soft); }
.nd-btn-light { background: var(--nd-cta); color: var(--nd-on-cta); font-weight: 600; }
.nd-btn-light:hover { background: var(--nd-cta-hover); color: var(--nd-on-cta); }
.nd-btn-outline-light { border-color: var(--nd-hero-line); color: #fff; }
.nd-btn-outline-light:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nd-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* ---------- Header ---------- */
.nd-header { position: sticky; top: 0; z-index: 100; background: var(--nd-page); border-bottom: 1px solid var(--nd-line); }
.nd-header-inner { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nd-brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none !important; }
.nd-brand img { width: 32px; height: 32px; border-radius: 8px; }
.nd-brand span { font-family: var(--nd-serif); font-size: 24px; font-weight: 600; color: var(--nd-navy); line-height: 1; }
:root[data-theme="dark"] .nd-brand span { color: var(--nd-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .nd-brand span { color: var(--nd-ink); } }
.nd-menu-btn { height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: transparent; color: var(--nd-ink); font: inherit; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.nd-menu-btn:hover, .nd-apps.open .nd-menu-btn, .nd-menu-btn.is-active { background: var(--nd-search); }
.nd-apps .apps-menu { left: 0; right: auto; top: 52px; }
.nd-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nd-nav a { height: 44px; padding: 0 12px; display: flex; align-items: center; font-weight: 500; color: var(--nd-ink); text-decoration: none !important; border-radius: 22px; }
.nd-nav a:hover { background: var(--nd-search); }
.nd-nav a[aria-current="page"] { color: var(--nd-primary); font-weight: 600; }
.nd-search { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 24px; background: var(--nd-search); color: var(--nd-muted); }
.nd-search .ph { font-size: 20px; }
.nd-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--nd-ink); outline: none; }
.nd-search:focus-within { box-shadow: 0 0 0 2px var(--nd-primary); }
.nd-actions { display: flex; align-items: center; gap: 4px; }
.nd-icon-btn { width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; color: var(--nd-muted); display: flex; align-items: center; justify-content: center; text-decoration: none !important; font-size: 22px; }
.nd-icon-btn:hover { background: var(--nd-search); color: var(--nd-ink); }
.nd-icon-btn .count-badge { top: -6px; right: -10px; }
.nd-avatar-btn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: transparent; display: flex; align-items: center; justify-content: center; }
.nd-avatar-btn .avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.nd-text-btn { height: 44px; padding: 0 14px; display: flex; align-items: center; font-weight: 500; color: var(--nd-primary); text-decoration: none !important; border-radius: 22px; }
.nd-text-btn:hover { background: var(--nd-search); }
.nd-pill { height: 44px; padding: 0 22px; display: flex; align-items: center; border-radius: 22px; background: var(--nd-primary); color: var(--nd-on-primary) !important; font-weight: 500; text-decoration: none !important; }
.nd-pill:hover { background: var(--nd-navy); color: #fff !important; }
.nd-header .profile-menu, .nd-header .notif-menu { top: 52px; }

/* Apps menu: 3 tiles a row, with flexbox */
.apps-menu { width: 356px; padding: 16px; border-radius: 20px; }
.apps-grid { display: flex; flex-wrap: wrap; gap: 4px 0; }
.dropdown-menu a.apps-tile { flex: 0 0 33.333%; min-height: 88px; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 4px; border-radius: 14px; font-size: 13px; font-weight: 500; }
.apps-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 16%, transparent); }
.dropdown-menu .apps-ic .ph { width: auto; font-size: 22px; color: var(--c); }
:root[data-theme="dark"] .apps-ic { background: color-mix(in srgb, var(--c) 30%, transparent); }
:root[data-theme="dark"] .dropdown-menu .apps-ic .ph { color: color-mix(in srgb, var(--c) 45%, #fff); }
.apps-head { border-top: 0; padding-top: 0; margin: 10px 4px 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--nd-muted); }

/* ---------- Page ---------- */
.nd-main { max-width: 1240px; margin: 0 auto; padding: 24px 24px 0; display: flex; flex-direction: column; gap: 32px; }
.nd-hero { background: var(--nd-navy); color: #fff; border-radius: var(--nd-r-hero); padding: 48px 56px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.nd-hero-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.nd-hero h1 { margin: 0; font-family: var(--nd-serif); font-size: 52px; line-height: 1.08; font-weight: 600; letter-spacing: -.5px; }
.nd-hero p { margin: 0; font-size: 19px; color: var(--nd-hero-text); max-width: 600px; }
.nd-hero-points { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.nd-hero-points li { display: flex; align-items: center; gap: 8px; }
.nd-hero-points .ph { color: var(--nd-hero-line); font-size: 18px; }
.nd-hero-cta { flex: 0 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nd-hero-cta span { font-size: 14px; color: var(--nd-hero-text); text-align: center; }

.nd-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.nd-feed { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.nd-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.nd-feed-head h2 { margin: 0; font-size: 30px; color: var(--nd-navy); }
.nd-feed-head p { margin: 2px 0 0; color: var(--nd-muted); }
:root[data-theme="dark"] .nd-feed-head h2 { color: var(--nd-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .nd-feed-head h2 { color: var(--nd-ink); } }

.nd-card { background: var(--nd-surface); border-radius: var(--nd-r-card); padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.nd-card > * { margin: 0; }
.nd-card h2 { margin: 0; }
.nd-side-title { font-size: 18px; font-weight: 600; color: var(--nd-ink); }
.nd-muted { color: var(--nd-muted); font-size: 15px; }
.nd-small { font-size: 13px; }
.nd-card.nd-dark { background: var(--nd-navy); color: #fff; }
.nd-card.nd-dark h2 { font-size: 22px; line-height: 1.25; }
.nd-card.nd-dark p { color: var(--nd-hero-text); font-size: 15px; }
.nd-card.nd-tonal { background: var(--nd-pale); color: var(--nd-on-pale); }
.nd-card.nd-tonal .nd-side-title { color: var(--nd-on-pale); }
.nd-card.nd-soft { background: var(--nd-soft); }
.nd-tag { height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 6px; background: #e6ecf1; color: #191c1e; font-size: 12px; font-weight: 600; }

/* Composer */
.nd-composer { flex-direction: row; align-items: center; gap: 12px; padding: 16px; }
.nd-composer .avatar { width: 44px; height: 44px; }
.nd-composer-btn { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border: 1px solid var(--nd-line); border-radius: 24px; background: var(--nd-page); color: var(--nd-muted); font: inherit; text-align: left; }
.nd-composer-btn:hover { border-color: var(--nd-primary); }

/* Sort tabs and type chips */
.nd-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; border-bottom: 1px solid var(--nd-line); }
.nd-tabs { display: flex; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nd-tab { height: 48px; padding: 0 16px; display: flex; align-items: center; white-space: nowrap; border-bottom: 3px solid transparent; font-weight: 500; color: var(--nd-muted); text-decoration: none !important; }
.nd-tab:hover { color: var(--nd-ink); }
.nd-tab.is-active { border-bottom-color: var(--nd-primary); color: var(--nd-primary); font-weight: 600; }
.nd-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.nd-chip { height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--nd-outline); border-radius: 8px; background: transparent; color: var(--nd-ink); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none !important; }
.nd-chip:hover { background: var(--nd-soft); }
.nd-chip.is-active { background: var(--nd-pale); color: var(--nd-on-pale); border-color: transparent; }
.nd-more .dropdown-menu { right: 0; min-width: 190px; }

/* ---------- Feed cards (markup from assets/js/app.js) ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.card.post { border: 0; border-radius: var(--nd-r-card); padding: 24px 24px 8px; background: var(--nd-surface); }
.post-head { align-items: center; gap: 12px; }
.post-head .avatar { width: 44px; height: 44px; font-size: 15px; }
.post-author { font-weight: 600; color: var(--nd-ink); }
.post-meta small, .post-meta .sub small { color: var(--nd-muted); }
.post-title { margin: 14px 0 6px; font-size: 22px; line-height: 1.3; }
.post-title a { color: var(--nd-ink); }
.post-body { color: var(--nd-muted); }
.badge { order: 0; height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; background: var(--nd-soft); color: var(--nd-ink); }
.badge.question { background: var(--nd-q-bg); color: var(--nd-q-fg); }
.badge.paper, .badge.preprint { background: var(--nd-p-bg); color: var(--nd-p-fg); }
.badge.discussion { background: var(--nd-d-bg); color: var(--nd-d-fg); }
.badge.announcement { background: var(--nd-a-bg); color: var(--nd-a-fg); }
.badge.resource { background: var(--nd-pale); color: var(--nd-on-pale); }
.post-head .follow-btn, .post-head [data-act="follow"], .nd-follow { height: 36px; padding: 0 14px; border: 1px solid var(--nd-outline); border-radius: 18px; background: transparent; color: var(--nd-primary); font: inherit; font-size: 14px; font-weight: 500; }
.nd-follow:hover { background: var(--nd-soft); }
.post-more .icon-btn { width: 44px; height: 44px; border-radius: 22px; font-size: 22px; color: var(--nd-muted); }
.post-more .icon-btn:hover { background: var(--nd-soft); }
.post-actions { flex-wrap: wrap; border-top: 1px solid var(--nd-line-soft); margin-top: 14px; padding: 6px 0 0; gap: 2px; }
.post-actions .act { flex: 0 0 auto; height: 44px; padding: 0 12px; border-radius: 22px; color: var(--nd-muted); font-size: 14px; font-weight: 500; gap: 6px; }
.post-actions .act .ph { font-size: 20px; }
.post-actions .act:hover { background: var(--nd-soft); color: var(--nd-ink); }
.post-actions .act.on { color: var(--nd-primary); }
.post-counters { font-size: 13px; color: var(--nd-muted); }
.post-counters .ph { font-size: 15px; }
.paper-card, .link-card, .repost-embed { background: var(--nd-soft); border: 0; border-radius: 12px; }
.tag { border-radius: 8px; }

.post-meta { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.post-meta > small, .post-meta > .sub { flex-basis: 100%; }
.card.post .post-author { font-size: 16px; }
.card.post .post-meta small { font-size: 14px; }
.card.post .post-body { font-size: 16px; line-height: 1.55; }
.card.post .vis-chip { font-size: 12px; line-height: 20px; }
.card.post .disc-chip { font-size: 12px; }
.nd-side .sc-card .sc-list li a { font-size: 14px; min-height: 44px; padding: 0; }
.nd-side .sc-card .sc-list .ph { font-size: 18px; color: var(--nd-primary); }
.nd-side .sc-card .side-title { font-size: 18px; font-weight: 600; }

/* ---------- Right column ---------- */
.nd-profile { align-items: stretch; }
.nd-profile-main { display: flex; align-items: center; gap: 14px; color: var(--nd-ink); text-decoration: none !important; }
.nd-profile-main .avatar-xl { width: 64px; height: 64px; font-size: 22px; border: 0; }
.nd-profile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nd-profile-text strong { font-family: var(--nd-serif); font-weight: 600; font-size: 18px; line-height: 1.25; }
.nd-profile-text small { color: var(--nd-muted); font-size: 14px; }
.nd-profile .sid-chip { background: var(--nd-pale); color: var(--nd-on-pale); }
.nd-stats { display: flex; margin: 4px 0 0; border-top: 1px solid var(--nd-line-soft); border-bottom: 1px solid var(--nd-line-soft); }
.nd-stats div { flex: 1; text-align: center; padding: 10px 2px; }
.nd-stats dt { font-size: 12px; color: var(--nd-muted); }
.nd-stats dd { margin: 0; font-weight: 600; font-size: 16px; }
.nd-quick { display: flex; flex-direction: column; }
.nd-quick a { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 10px; border-radius: 22px; color: var(--nd-ink); font-weight: 500; text-decoration: none !important; }
.nd-quick a .ph { font-size: 20px; color: var(--nd-muted); }
.nd-quick a:hover, .nd-quick a.is-active { background: var(--nd-soft); }
.nd-join h2 { font-size: 22px; }
.nd-join p { color: var(--nd-muted); }
.nd-faces { display: flex; gap: 6px; }
.nd-faces .avatar-sm { width: 36px; height: 36px; }
.nd-people { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.nd-people .suggest { min-height: 60px; display: flex; align-items: center; gap: 12px; }
.nd-people .avatar { width: 44px; height: 44px; font-size: 15px; }
.nd-people .suggest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nd-people .suggest-info a { font-weight: 600; color: var(--nd-ink); }
.nd-people .suggest-info small { color: var(--nd-muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-jobs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.nd-jobs li { display: flex; flex-direction: column; }
.nd-jobs a { font-weight: 600; color: var(--nd-ink); }
.nd-jobs small { color: var(--nd-muted); font-size: 14px; }
.nd-principles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.nd-principles li { display: flex; gap: 10px; }
.nd-principles .ph { flex: none; color: var(--nd-ok); font-size: 20px; margin-top: 1px; }
.nd-side .sc-card { border: 0; border-radius: var(--nd-r-card); padding: 20px; }
.nd-side .side-ad-top { border-radius: var(--nd-r-card); overflow: hidden; }

/* ---------- Footer (old content, new look, flexbox) ---------- */
.site-footer { background: var(--nd-soft); border-top: 0; margin-top: 48px; }
.footer-inner { max-width: 1240px; padding: 40px 24px 24px; display: flex; flex-wrap: wrap; gap: 24px 40px; }
.footer-brand { flex: 2 1 320px; }
.footer-col { flex: 1 1 150px; }
.footer-col h2 { font-family: var(--nd-sans); font-size: 12px; color: var(--nd-muted); }
.footer-col a { color: var(--nd-ink); min-height: 32px; display: inline-flex; align-items: center; }
.footer-brand .brand-text { font-family: var(--nd-serif); font-weight: 600; font-size: 22px; color: var(--nd-navy); }
.footer-brand .brand-text b { font-weight: 600; }
:root[data-theme="dark"] .footer-brand .brand-text { color: var(--nd-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .footer-brand .brand-text { color: var(--nd-ink); } }
.footer-brand p { color: var(--nd-muted); }
.footer-copy { flex: 1 1 100%; border-top-color: var(--nd-line); color: var(--nd-muted); }
.footer-copy + .footer-copy { border-top: 0; padding-top: 0; margin-top: -8px; }

/* ---------- Small screens ---------- */
@media (max-width: 1020px) { .nd-nav { display: none; } }
@media (max-width: 760px) {
  .nd-header-inner { padding: 10px 16px; gap: 8px; }
  .nd-brand span { font-size: 20px; }
  .nd-menu-btn span { display: none; }
  .nd-search { order: 9; flex-basis: 100%; height: 44px; }
  .nd-actions { margin-left: auto; }
  .nd-app-link, .nd-text-btn { display: none; }
  .nd-main { padding: 16px 16px 0; gap: 20px; }
  .nd-hero { padding: 28px 22px; border-radius: 22px; }
  .nd-hero h1 { font-size: 34px; }
  .nd-hero p { font-size: 17px; }
  .nd-feed { flex-basis: 100%; }
  .card.post { padding: 18px 16px 6px; }
  .post-title { font-size: 20px; }
  .post-actions .act span { display: none; }
  .apps-menu { position: fixed; left: 10px; right: 10px; top: 64px; width: auto; }
}

/* Guests on phones: Join free and Sign in move from the header into the Menu */
.apps-auth { display: none; }
@media (max-width: 760px) {
  .nd-guest-btn { display: none !important; }
  .apps-auth { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--nd-line); }
  .dropdown-menu .apps-auth a { width: auto; display: flex; justify-content: center; }
  .dropdown-menu .apps-auth .nd-pill { flex: 1; background: var(--nd-primary); color: var(--nd-on-primary) !important; }
  .dropdown-menu .apps-auth .nd-text-btn { color: var(--nd-primary); }
  .apps-foot { display: none; }
}

/* ---------- One type family everywhere (styles.css set Montserrat on form controls) ---------- */
html, body, button, input, select, textarea, optgroup, option, .mono, .profile-card-body strong { font-family: var(--nd-sans); }
.post-title, .post-title a, .pm-detail .post-title, .post-static h1, .profile-hero-main h1, .auth-card h1, .auth-hero h2, .join-card h2, .gate-card h3 { font-family: var(--nd-serif); font-weight: 600; }

/* ---------- Spacing: one scale (4, 8, 12, 16, 24, 32) for every page ---------- */
:root { --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; }
.layout { gap: var(--sp-5); padding: var(--sp-5); }
.col { gap: var(--sp-4); }
.card { border-radius: var(--nd-r-card); }
.side-card, .nd-side .sc-card { padding: 20px; }
.feed { gap: var(--sp-4); }
.field { gap: var(--sp-2); font-size: 14px; }
.form-row { margin-top: 0; }
.btn-block + .btn-block { margin-top: var(--sp-2); }
.gate-card { padding: var(--sp-5); display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.gate-card h3, .gate-card p { margin: 0; }

/* Sign-in / join popup */
.modal-dialog { border-radius: 24px; }
.modal-auth { padding: 0 0 var(--sp-5); }
.auth-hero { padding: var(--sp-6) var(--sp-5) var(--sp-2); }
.auth-hero h2 { margin: var(--sp-3) 0 var(--sp-2); }
.auth-hero p { margin: 0; }
.auth-tabs { margin: var(--sp-4) var(--sp-5) 0; }
.auth-panel { padding: var(--sp-5) var(--sp-5) 0; }
.auth-form, .auth-join { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-join p { margin: 0; }
.auth-join .btn-block { min-height: 48px; border-radius: 24px; }
.auth-join .form-row { justify-content: center; padding-top: var(--sp-1); }
.auth-form .form-row { justify-content: flex-end; }

/* ---------- Post popup: post (and its images) on the left, comments on the right ---------- */
@media (min-width: 1101px) {
  .modal-post { padding: var(--sp-6); }
  .post-dialog { grid-template-columns: minmax(0, 1fr) 400px; max-width: 1600px; border-radius: 24px; }
  .post-dialog:not(:has(.carousel)) { max-width: 1180px; height: min(640px, 100%); }
}
.pm-detail { padding: var(--sp-5); }
.pm-detail .post-title { font-size: 24px; margin: var(--sp-4) 0 var(--sp-2); }
.pm-side-head { padding: var(--sp-4) 56px var(--sp-4) 20px; }
.carousel-track { cursor: grab; }
.carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.carousel-track img { -webkit-user-drag: none; user-select: none; }
.carousel-btn { width: 44px; height: 44px; }
/* the image takes the space left over, so the post text and its buttons below it are always fully visible */
.pm-main .carousel { flex: 1 1 0; min-height: 0; }
.pm-main .pm-detail { flex: 0 0 auto; }

/* ---------- Orange = the main action (Join free, View conference, Post) ---------- */
.nd-pill.nd-cta, .btn.nd-cta { background: var(--nd-cta); color: var(--nd-on-cta) !important; font-weight: 600; }
.nd-pill.nd-cta:hover, .btn.nd-cta:hover { background: var(--nd-cta-hover); color: var(--nd-on-cta) !important; }
.dropdown-menu .apps-auth .nd-pill.nd-cta { background: var(--nd-cta); color: var(--nd-on-cta) !important; }
.nd-chip.is-active { font-weight: 600; box-shadow: inset 0 0 0 1px var(--nd-outline); }

/* ---------- Sort tabs and the type filter on one line ---------- */
.nd-toolbar { flex-wrap: nowrap; align-items: center; }
.nd-tabs { flex: 1 1 auto; min-width: 0; }
.nd-filter { flex: none; }
.nd-filter-btn { height: 40px; min-width: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--nd-outline); border-radius: 20px; background: transparent; color: var(--nd-ink); font: inherit; font-size: 14px; font-weight: 500; }
.nd-filter-btn .ph { font-size: 20px; }
.nd-filter-btn:hover, .nd-filter.open .nd-filter-btn { background: var(--nd-soft); }
.nd-filter-btn.is-active { background: var(--nd-pale); color: var(--nd-on-pale); border-color: var(--nd-ink); padding: 0 14px 0 12px; }
.nd-filter .dropdown-menu { right: 0; left: auto; min-width: 210px; padding: 8px; }
.nd-filter-head { margin: 4px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--nd-muted); }
.nd-filter .dropdown-menu a { justify-content: space-between; min-height: 40px; }
.nd-filter .dropdown-menu a.is-active { background: var(--nd-soft); font-weight: 600; }
.nd-filter .dropdown-menu a .ph { color: var(--nd-primary); }
@media (max-width: 760px) { .nd-filter-btn span { display: none; } .nd-filter-btn.is-active { padding: 0 10px; } }

/* ---------- Phones: logo, Menu and the icons on one line; header menus stay inside the screen ---------- */
@media (max-width: 760px) {
  .nd-header-inner { flex-wrap: wrap; column-gap: 4px; row-gap: 8px; }
  .nd-brand { gap: 8px; min-width: 0; }
  .nd-brand img { width: 28px; height: 28px; }
  .nd-brand span { font-size: 19px; white-space: nowrap; }
  .nd-actions { margin-left: auto; gap: 2px; flex: none; }
  .nd-icon-btn, .nd-avatar-btn, .nd-menu-btn { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 21px; }
  .nd-avatar-btn .avatar-sm { width: 34px; height: 34px; }
  .nd-header .notif-menu, .nd-header .profile-menu {
    position: fixed; left: 12px; right: 12px; top: 60px; width: auto; max-width: none;
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nd-header .notif-list { max-height: none; }
}
@media (max-width: 379px) { .nd-brand span { display: none; } }

/* Profile menu head: the avatar initials centred and the verified mark beside the name */
.profile-menu-head .avatar { display: inline-grid; flex-direction: initial; place-items: center; }
.profile-menu-head .vbadge { display: inline-flex; flex-direction: row; }
.profile-menu-head .vbadge .sr-only { display: block; }

/* ---------- Counts beside each action (Upvote 12, Comment 3 …), no separate counter row ---------- */
.post-actions .act .act-count { font-weight: 600; font-size: 14px; color: inherit; font-variant-numeric: tabular-nums; }
.post-actions .act .act-count[hidden] { display: none !important; }
.post-actions .act.on .act-count { color: var(--nd-primary); }
.post-counters { display: none !important; }
@media (max-width: 760px) { .post-actions { justify-content: space-between; } .post-actions .act { padding: 0 10px; } }

/* ---------- Sliding rows: heading, "View all" and arrows on top, cards slide sideways ---------- */
.nd-slider { background: var(--nd-surface); border-radius: var(--nd-r-card); padding: 20px 0 20px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: 90px; }
.nd-slider-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 16px; }
.nd-slider-head h2 { margin: 0; font-family: var(--nd-serif); font-weight: 600; font-size: 22px; }
.nd-slider-head h2 .muted { font-family: var(--nd-sans); font-size: 16px; font-weight: 400; }
.nd-slider-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.nd-slider-nav .nd-link { padding: 0 8px; }
.nd-slider-btn { width: 40px; height: 40px; border: 1px solid var(--nd-line); border-radius: 20px; background: var(--nd-surface); color: var(--nd-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.nd-slider-btn:hover:not(:disabled) { background: var(--nd-soft); }
.nd-slider-btn:disabled { opacity: .35; cursor: default; }
.nd-slider-btn[hidden] { display: none; }
.nd-slider-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0; padding: 2px 20px 6px 0; scrollbar-width: none; }
.nd-slider-track::-webkit-scrollbar { display: none; }
.nd-slider-track > * { scroll-snap-align: start; flex: 0 0 auto; }
/* product and service cards in a row */
.nd-slider .co-item-grid.nd-slider-track { display: flex; grid-template-columns: none; }
.nd-slider .co-tile { width: 220px; border-radius: 16px; border-color: var(--nd-line); }
.co-tile { border-radius: 16px; }
.co-item-grid-all { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ---------- Post tiles: picture, type, heading, a line of text, date ---------- */
.nd-post-tile { width: 280px; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--nd-line); border-radius: 16px; overflow: hidden; background: var(--nd-surface); color: var(--nd-ink); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.nd-post-tile:hover { box-shadow: var(--nd-shadow); transform: translateY(-1px); }
.nd-post-tile-img { aspect-ratio: 16 / 10; background: var(--nd-soft); display: flex; align-items: center; justify-content: center; color: var(--nd-primary); font-size: 40px; overflow: hidden; }
.nd-post-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nd-post-tile-img .ph { opacity: .6; }
.nd-post-tile-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; flex: 1; }
.nd-post-tile-body strong { font-family: var(--nd-serif); font-weight: 600; font-size: 18px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-post-tile-text { color: var(--nd-muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-post-tile-meta { color: var(--nd-muted); font-size: 13px; margin-top: auto; }
.nd-post-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.nd-post-grid .nd-post-tile { width: auto; flex: 0 0 calc((100% - 48px) / 3); }
@media (max-width: 1020px) { .nd-post-grid .nd-post-tile { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 640px) { .nd-post-grid .nd-post-tile { flex-basis: 100%; } .nd-post-tile { width: 250px; } .nd-slider .co-tile { width: 180px; } }

/* ---------- Plain pages (all products, all posts) ---------- */
.nd-page { max-width: 1240px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.nd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--nd-muted); }
.nd-crumbs a { color: var(--nd-muted); }
.nd-crumbs a:hover { color: var(--nd-primary); }
.nd-page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.nd-page-head h1 { margin: 0; font-size: 34px; color: var(--nd-ink); }
.nd-page-head h1 .muted { font-family: var(--nd-sans); font-size: 20px; font-weight: 400; }
.nd-page-head p { margin: 0; }
.nd-pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.nd-pager-nums { display: flex; gap: 4px; align-items: center; }
.nd-pager-btn, .nd-pager-num { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--nd-line); background: var(--nd-surface); color: var(--nd-ink); font-weight: 500; text-decoration: none !important; }
.nd-pager-num { padding: 0; }
.nd-pager-btn:hover, .nd-pager-num:hover { background: var(--nd-soft); }
.nd-pager-num.is-current { background: var(--nd-primary); border-color: var(--nd-primary); color: var(--nd-on-primary); }
.nd-pager-btn.is-off { opacity: .4; }
.nd-pager-gap { padding: 0 4px; color: var(--nd-muted); }
@media (max-width: 760px) { .nd-page { padding: 16px; } .nd-page-head h1 { font-size: 26px; } .nd-slider { padding: 16px 0 16px 16px; } .nd-slider-btn { display: none !important; } }

/* ---------- Post header: name and badge on one line, a compact Follow / Connect that never covers the text ---------- */
.post-head .post-meta { overflow: hidden; }
.post-meta .post-author { max-width: calc(100% - 26px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-meta .vbadge { flex: none; }
.post-meta > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-meta .sub { gap: 6px; row-gap: 6px; }
.post-head [data-slot="follow"] { flex: none; align-self: center; }
.post-head [data-slot="follow"]:empty { display: none; }
.post-head [data-slot="follow"] .btn { min-height: 34px; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; font-weight: 600; }
.post-head .post-more { flex: none; }
@media (max-width: 760px) {
  .card.post .post-head { gap: 10px; align-items: flex-start; }
  .card.post .post-head .avatar { width: 40px; height: 40px; font-size: 14px; }
  .card.post .post-author { font-size: 15px; }
  .card.post .post-meta small { font-size: 13px; }
  .post-head [data-slot="follow"] { align-self: flex-start; margin-top: 2px; }
  .post-head [data-slot="follow"] .btn { min-height: 30px; height: 30px; padding: 0 12px; font-size: 12.5px; }
  .post-head .post-more .icon-btn { width: 36px; height: 36px; font-size: 20px; margin-right: -6px; }
  .post-meta .badge, .post-meta .vis-chip, .post-meta .disc-chip { font-size: 11.5px; }
}

/* "Scholarly conversations" on one line on phones */
@media (max-width: 760px) {
  .nd-feed-head h1, .nd-feed-head h2 { font-size: clamp(20px, 6.2vw, 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nd-feed-head p { font-size: 15px; }
}

/* Follow / Following (companies) as a small pill beside the post type, so the name gets the full width */
.post-meta .sub [data-slot="follow"] { display: inline-flex; }
.post-meta .sub [data-slot="follow"] .btn { min-height: 24px; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; gap: 4px; line-height: 1; }
.post-meta .sub [data-slot="follow"] .btn-primary { background: transparent; color: var(--nd-primary); border: 1px solid var(--nd-primary); }
.post-meta .sub [data-slot="follow"] .btn-primary:hover { background: var(--nd-soft); }
.post-meta .sub [data-slot="follow"] .btn-ghost { background: var(--nd-soft); color: var(--nd-muted); border: 1px solid transparent; }
.post-meta .sub [data-slot="follow"] .btn-primary::before { content: "+"; font-weight: 700; }
.post-meta .sub [data-slot="follow"] .btn-ghost::before { content: "✓"; font-weight: 700; }
.post-meta .post-author { max-width: calc(100% - 26px); }

/* ---------- Image viewer (opens from the post popup) ---------- */
html.lb-open, html.lb-open body { overflow: hidden; }
.nd-lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(5, 10, 14, .94); display: flex; flex-direction: column; }
.nd-lightbox[hidden] { display: none; }
.nd-lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; pointer-events: none; }
.nd-lb-count { color: #fff; font-size: 14px; font-weight: 600; background: rgba(0, 0, 0, .45); padding: 4px 12px; border-radius: 999px; pointer-events: auto; }
.nd-lb-count:empty { visibility: hidden; }
.nd-lb-close { pointer-events: auto; width: 44px; height: 44px; border: 0; border-radius: 22px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.nd-lb-close:hover { background: rgba(255, 255, 255, .26); }
.nd-lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; cursor: grab; }
.nd-lb-track::-webkit-scrollbar { display: none; }
.nd-lb-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.nd-lb-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 64px 72px; box-sizing: border-box; }
.nd-lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; cursor: default; }
.nd-lb-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 24px; background: rgba(255, 255, 255, .92); color: #111; font-size: 22px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.nd-lb-btn.prev { left: 16px; } .nd-lb-btn.next { right: 16px; }
.nd-lb-btn:disabled { opacity: 0; pointer-events: none; }
.nd-lb-btn[hidden] { display: none; }
.carousel-slide img { cursor: zoom-in; }
@media (max-width: 760px) { .nd-lb-slide { padding: 56px 8px; } .nd-lb-btn { display: none; } }

/* Post page: similar discussions */
.nd-similar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nd-similar-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--nd-line-soft); }
.nd-similar-list li:first-child { padding-top: 4px; }
.nd-similar-list li:last-child { border-bottom: 0; }
.nd-similar-list a { color: var(--nd-ink); font-weight: 600; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-similar-list a:hover { color: var(--nd-primary); }
.nd-similar-list small { color: var(--nd-muted); font-size: 12.5px; }
.nd-similar .nd-link { min-height: 36px; font-size: 14px; }

/* ---------- Science Catalogs update card in the feed (from the hub) ---------- */
.nd-update-card { border: 0; border-radius: var(--nd-r-card); padding: 20px 24px 24px; background: var(--nd-surface); box-shadow: inset 4px 0 0 var(--nd-cta); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.nd-update-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; flex-wrap: wrap; }
.nd-update-kind { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 6px; background: color-mix(in srgb, var(--nd-cta) 16%, transparent); color: var(--nd-ink); font-size: 12.5px; font-weight: 600; }
.nd-update-kind .ph { color: var(--nd-cta); font-size: 15px; }
.nd-update-from { font-size: 12.5px; color: var(--nd-muted); }
.nd-update-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; display: block; }
.nd-update-title { margin: 0; font-family: var(--nd-serif); font-weight: 600; font-size: 21px; line-height: 1.3; color: var(--nd-ink); }
.nd-update-text { margin: 0; color: var(--nd-muted); }
.nd-update-btn .ph { font-size: 16px; }
@media (max-width: 760px) { .nd-update-card { padding: 16px 16px 18px; } .nd-update-title { font-size: 19px; } }

/* Company page: vacancies card on the right */
.co-vac-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.co-vac-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--nd-line-soft); }
.co-vac-list li:first-child { padding-top: 2px; }
.co-vac-list li:last-child { border-bottom: 0; }
.co-vac-list li[hidden] { display: none; }
.co-vac-list a { font-weight: 600; color: var(--nd-ink); font-size: 14.5px; line-height: 1.35; }
.co-vac-list a:hover { color: var(--nd-primary); }
.co-vac-list small { color: var(--nd-muted); font-size: 12.5px; }
.co-vac-list .co-vac-date { color: var(--nd-ok); font-weight: 500; }

/* ---------- Find peers / My peers ---------- */
.nd-peer-tabs { border-bottom: 1px solid var(--nd-line); }
.nd-peer-tabs .nd-tab { gap: 8px; }
.nd-tab-count { font-size: 12px; font-weight: 600; color: var(--nd-muted); background: var(--nd-soft); border-radius: 10px; padding: 1px 8px; }
.count-pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #cc1016; color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nd-peers-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.nd-peer-filters { flex: 1 1 280px; max-width: 320px; gap: 14px; align-items: stretch; position: sticky; top: calc(var(--header-h) + 16px); }
.nd-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--nd-ink); }
.nd-field input, .nd-field select { height: 44px; padding: 0 12px; border: 1px solid var(--nd-line); border-radius: 12px; background: var(--nd-page); color: var(--nd-ink); font: inherit; font-weight: 400; font-size: 15px; width: 100%; }
.nd-field input:focus, .nd-field select:focus { outline: none; border-color: var(--nd-primary); box-shadow: var(--focus); }
.nd-peer-filters .check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nd-peer-filter-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.nd-peer-results { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.nd-peer-summary { margin: 0; }
.nd-peer-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.nd-peer { flex: 0 0 calc((100% - 32px) / 3); min-width: 0; background: var(--nd-surface); border-radius: var(--nd-r-card); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.nd-peer-top { display: flex; align-items: center; gap: 12px; color: var(--nd-ink); text-decoration: none !important; min-width: 0; }
.nd-peer-top .avatar-lg { width: 52px; height: 52px; flex: none; }
.nd-peer-name { min-width: 0; display: flex; align-items: center; }
.nd-peer-name strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-peer-headline { margin: 0; font-size: 14px; color: var(--nd-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-peer-place { margin: 0; font-size: 13px; color: var(--nd-muted); display: flex; align-items: center; gap: 4px; }
.nd-peer-areas { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nd-peer-areas span { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--nd-soft); color: var(--nd-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-peer-note { margin: 0; font-size: 13.5px; font-style: italic; color: var(--nd-muted); }
.nd-peer-actions { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nd-peer-btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
.nd-peer-btn:disabled { opacity: .6; cursor: default; }
.nd-peer-empty { align-items: center; text-align: center; padding: 32px 20px; width: 100%; }
.nd-peer-empty > .ph { font-size: 36px; color: var(--nd-muted); }
.nd-peer-h2 { margin: 8px 0 0; font-size: 20px; font-family: var(--nd-serif); font-weight: 600; }
.nd-peer-h2 .muted { font-family: var(--nd-sans); font-size: 15px; font-weight: 400; }
.nd-peer-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 24px; background: var(--nd-search); color: var(--nd-muted); max-width: 520px; }
.nd-peer-search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--nd-ink); outline: none; }
.nd-page-cta { display: flex; gap: 8px; align-items: center; }
@media (max-width: 1100px) { .nd-peer { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 760px) { .nd-peer-filters { max-width: none; position: static; } .nd-peer { flex-basis: 100%; } }
/* Peers: complete-your-profile notice */
.nd-peer-gate { flex-direction: row; align-items: flex-start; gap: 16px; border: 1px solid color-mix(in srgb, var(--nd-cta) 35%, transparent); }
.nd-peer-gate-ic { flex: none; width: 44px; height: 44px; border-radius: 22px; background: color-mix(in srgb, var(--nd-cta) 16%, transparent); color: var(--nd-cta); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.nd-peer-gate strong { font-size: 16px; }
.nd-peer-gate p { margin: 4px 0 12px; font-size: 14.5px; }
.nd-peer-gate-steps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nd-done { display: inline-flex; align-items: center; gap: 6px; color: var(--nd-ok); font-weight: 600; font-size: 14px; padding: 0 8px; }
@media (max-width: 760px) { .nd-peer-gate { flex-direction: column; } }

/* Company page: "No vacancies right now" card with a small illustration */
.co-vac-none { text-align: center; }
.co-vac-none .side-title { text-align: left; }
.co-vac-art { display: block; width: 100%; max-width: 220px; height: auto; margin: 4px auto 6px; }
.co-vac-art .v-shadow { fill: var(--nd-soft); }
.co-vac-art .v-bag { fill: var(--nd-pale); stroke: var(--nd-line); stroke-width: 2; }
.co-vac-art .v-handle { stroke: var(--nd-muted); }
.co-vac-art .v-band { fill: var(--nd-line); }
.co-vac-art .v-clasp { fill: var(--nd-muted); }
.co-vac-art .v-sign { fill: var(--nd-surface); stroke: var(--nd-cta); stroke-width: 2.5; }
.co-vac-art .v-sign-text { fill: var(--nd-cta); font: 700 13px var(--nd-sans); letter-spacing: .12em; }
.co-vac-art .v-dot { fill: var(--nd-cta); opacity: .5; }
.co-vac-none-title { margin: 0; font-weight: 600; font-size: 16px; color: var(--nd-ink); }
.co-vac-none .small-note { margin: 4px 0 8px; }

/* Company jobs page: form on the left, open and past jobs on the right */
.jobs-cols { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 960px) { .jobs-cols { grid-template-columns: minmax(0, 1fr); } }
.jobs-side-list { margin-top: 4px; }
.jobs-side-list li { gap: 4px 8px; }
.jobs-side-list li > strong { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.jobs-side-list li .muted { flex: 1 1 100%; }
.jobs-side-list .co-row-actions { flex: 1 1 100%; margin-left: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
#past-jobs .small-note { margin: -4px 0 0; }
