:root {
  --ink: #111111;
  --ink-soft: #333333;
  --muted: #666666;
  --muted-2: #737373;
  --page: #f0f0f0;
  --page-top: #f9f9f9;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --surface-teal: #ede0ff;
  --surface-blue: #e0fffe;
  --surface-orange: #ffffe8;
  --surface-purple: #f5e0ff;
  --line: #e0e0e0;
  --line-strong: #cccccc;
  --teal: #6200ff;
  --teal-dark: #5000cc;
  --teal-soft: #e8d5ff;
  --blue: #00cfff;
  --orange: #fcfc62;
  --purple: #bf00ff;
  --pink: #ff3ea5;
  --danger: #dd0055;
  --shadow: 0 14px 38px rgba(0,0,0,.09);
  --shadow-hover: 0 20px 50px rgba(0,0,0,.14);
  --radius: 16px;
  --radius-sm: 11px;
  --shell: min(1180px, calc(100vw - 36px));
  /* Themeable surface tokens */
  --header-bg: rgba(249,249,249,.9);
  --header-border: rgba(204,204,204,.9);
  --input-bg: #fff;
  --surface-mid: #fafafa;
  --divider: #e8e8e8;
  --dropdown-bg: rgba(255,255,255,.98);

  /* Extended palette — generated during CSS tokenisation */
  --white: #fff;
  --mask-black: #000;
  --grid-line-color: rgba(0,0,0,.06);
  --focus-ring: #5000cc;
  --teal-focus-border: rgba(98,0,255,.7);
  --teal-focus-shadow: rgba(98,0,255,.11);
  --teal-shadow-sm: rgba(98,0,255,.22);
  --teal-shadow-md: rgba(98,0,255,.19);
  --teal-shadow-hover: rgba(98,0,255,.25);
  --brand-mark-start: #6200ff;
  --brand-mark-mid: #ff3ea5;
  --brand-mark-end: #00ffff;
  --avatar-bg-start: #3a3a3a;
  --avatar-bg-end: #111111;
  --avatar-alt-bg-start: #444444;
  --avatar-alt-bg-end: #1a1a1a;
  --btn-bg-start: #6200ff;
  --btn-bg-end: #4800cc;
  --placeholder-color: #767676;
  --input-disabled-color: #888888;
  --input-disabled-bg: #eeeeee;
  --card-border: #e6e6e6;
  --card-border-alt: #e6e6e6;
  --icon-teal-color: #5000cc;
  --icon-orange-color: #888800;
  --icon-blue-color: #0090aa;
  --icon-purple-color: #8000aa;
  --status-yellow-color: #727200;
  --status-yellow-bg: #ffffe8;
  --live-pill-border: #dddddd;
  --live-dot-color: #39ff14;
  --live-dot-shadow: rgba(57,255,20,.18);
  --chip-bg: rgba(0,0,0,.55);
  --chip-border: rgba(255,255,255,.48);
  --chip-category-bg: rgba(255,255,255,.88);
  --chip-category-border: rgba(255,255,255,.8);
  --status-live-color: #168000;
  --status-live-bg: #e8ffe0;
  --status-live-border: #aaee88;
  --status-draft-color: #727200;
  --status-draft-bg: #ffffe8;
  --status-draft-border: #e8e870;
  --progress-track: #e6e6e6;
  --progress-teal-start: #6200ff;
  --progress-teal-end: #9f60ff;
  --progress-active-start: #00cfff;
  --progress-active-end: #80e8ff;
  --surface-filter: rgba(255,255,255,.92);
  --surface-near-white: #f9f9f9;
  --surface-white-96: rgba(255,255,255,.96);
  --surface-white-94: rgba(255,255,255,.94);
  --surface-white-97: rgba(255,255,255,.97);
  --surface-white-91: rgba(255,255,255,.91);
  --surface-white-9: rgba(255,255,255,.9);
  --surface-white-88: rgba(255,255,255,.88);
  --surface-white-83: rgba(255,255,255,.83);
  --surface-white-14: rgba(255,255,255,.14);
  --surface-white-07: rgba(255,255,255,.07);
  --surface-white-35: rgba(255,255,255,.35);
  --teal-hover-border: #cccccc;
  --dark-overlay-35: rgba(0,0,0,.35);
  --dark-overlay-20: rgba(0,0,0,.2);
  --dark-overlay-42: rgba(0,0,0,.42);
  --dark-overlay-45: rgba(0,0,0,.45);
  --dark-overlay-40: rgba(0,0,0,.4);
  --dark-overlay-ink-52: rgba(0,0,0,.52);
  --dark-overlay-ink-48: rgba(0,0,0,.48);
  --dark-overlay-ink-18: rgba(0,0,0,.18);
  --dark-overlay-ink-22: rgba(0,0,0,.22);
  --dark-overlay-deep: rgba(0,0,0,.35);
  --join-bg-start: #0e0030;
  --join-bg-mid: #380099;
  --join-bg-end: #6200ff;
  --join-link-color: #300088;
  --portfolio-border: #e2e2e2;
  --portfolio-stats-bg: #f3f3f3;
  --activity-bg: #f5f5f5;
  --notice-bg: #f3f3f3;
  --funding-split-bg: #f5f5f5;
  --project-progress-track: #e6e6e6;
  --auth-visual-start: #f9f9f9;
  --auth-visual-end: #eeeeee;
  --auth-visual-accent: rgba(98,0,255,.2);
  --auth-teal-glow: rgba(98,0,255,.2);
  --auth-border-dim: rgba(204,204,204,.18);
  --auth-border-light: rgba(204,204,204,.9);
  --auth-border-light-85: rgba(204,204,204,.85);
  --auth-white-65: rgba(255,255,255,.65);
  --auth-white-5: rgba(255,255,255,.5);
  --danger-card-border: #ffd0e0;
  --danger-card-bg: #fff5f8;
  --danger-card-color: #cc0040;
  --danger-btn-border: #ff90b0;
  --danger-btn-color: #cc0044;
  --danger-hover-bg: rgba(255,0,85,.08);
  --editor-body-bg: #fafafa;
  --editor-body-border: #e6e6e6;
  --funding-toggle-border: #c090ff;
  --funding-toggle-bg: #f7f7f7;
  --funding-fields-border: #c090ff;
  --funding-fields-bg: #f7f7f7;
  --orb-teal-start: #7b3fff;
  --orb-teal-end: #5000cc;
  --orb-orange-start: #ffff80;
  --orb-orange-end: #cccc00;
  --orb-purple-start: #ff80cc;
  --orb-purple-end: #cc1070;
  --tone-1-start: #00cfff;
  --tone-1-end: #006888;
  --tone-2-start: #fcfc62;
  --tone-2-end: #888800;
  --tone-3-start: #bf00ff;
  --tone-3-end: #660099;
  --tone-4-start: #ff3ea5;
  --tone-4-end: #880050;
  --pitch-complete-color: #1a8a00;
  --pitch-complete-bg: #e8ffe0;
  --pitch-complete-border: #aaee88;
  --error-code-color: #eeeeee;
  --flash-success-color: #39ff14;
  --login-error-bg: #fff3f4;
  --logout-hover-bg: #fff5f7;
  --shadow-generic-12: rgba(0,0,0,.12);
  --shadow-generic-1: rgba(0,0,0,.1);
  --shadow-generic-25: rgba(0,0,0,.25);
  --shadow-generic-72: rgba(0,0,0,.72);
  --shadow-ink-6: rgba(0,0,0,.06);
  --shadow-ink-8: rgba(0,0,0,.08);
  --shadow-ink-1: rgba(0,0,0,.1);
  --shadow-ink-14: rgba(0,0,0,.14);
  --shadow-deep-23: rgba(0,0,0,.23);
  --preview-bg-default: #1a1a1a;
  --preview-card-default: #222222;
  --preview-accent-default: #6200ff;
  --preview-deep-overlay: rgba(0,0,0,.2);
  --admin-danger-border: #ffd0e0;
  --admin-danger-hover-bg: #fff5f8;
  --admin-orange-color: #888800;
  --admin-green-color: #1a8a00;
  --admin-blue-border: #b0f0ff;
  --admin-badge-purple-border: #e0b0ff;
  --admin-badge-teal-border: #c0a0ff;
  --admin-msg-border: #f1dfb8;
  --admin-msg-bg: rgba(255,252,245,.97);
  --settings-border: #e6e6e6;
  --dropdown-shadow: rgba(0,0,0,.14);
  --quick-modal-close-bg: #f7f7f7;
  --surface-white-12: rgba(255,255,255,.12);
  --gradient-dark-1: #2a2a2a;
  --gradient-dark-2: #252525;
  --gradient-dark-3: #2d2d2d;
  --gradient-dark-4: #282828;
  --gradient-dark-5: #262626;
  --gradient-dark-6: #262626;
  --gradient-teal-end: #9050ff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--page); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, var(--surface-white-96), transparent 34rem),
    linear-gradient(180deg, var(--page-top), var(--page) 33rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, var(--mask-black), transparent 70%);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal-dark); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
main { min-height: calc(100vh - 170px); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.shell { width: var(--shell); margin-inline: auto; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.muted { color: var(--muted); }
.text-link { color: var(--teal-dark); font-weight: 800; font-size: .86rem; }
.text-link:hover { color: var(--ink); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(145%);
}
.site-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 900; letter-spacing: -.025em; }
.brand-mark {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px 9px 11px 11px;
  color: var(--white);
  background: linear-gradient(145deg, var(--brand-mark-start), var(--brand-mark-mid) 58%, var(--brand-mark-end));
  box-shadow: 0 7px 18px var(--teal-shadow-sm);
  font-size: .83rem;
  font-weight: 950;
  transform: rotate(-4deg);
}
.brand-mark-small { width: 24px; height: 24px; border-radius: 7px; font-size: .69rem; }
.brand-name { color: var(--ink); }
.brand-logo { display: block; width: auto; }
.brand-logo-icon { display: none; }
.brand-logo-dark { display: none; }
.footer-brand-logo { display: block; width: auto; }
.footer-brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }
[data-theme="dark"] .footer-brand-logo-light { display: none; }
[data-theme="dark"] .footer-brand-logo-dark { display: block; }
.nav-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(145deg, var(--avatar-bg-start), var(--avatar-bg-end));
  font-size: .66rem;
  font-weight: 900;
}
/* Buttons and inputs */
.button {
  min-height: 42px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--teal-dark);
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(145deg, var(--btn-bg-start), var(--btn-bg-end));
  box-shadow: 0 9px 20px var(--teal-shadow-md);
  cursor: pointer;
  font-weight: 850;
  font-size: .86rem;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
a.button, a.button:visited { color: var(--white); }
.button:hover { color: var(--white); transform: translateY(-2px); box-shadow: 0 13px 26px var(--teal-shadow-hover); filter: saturate(1.05); }
.button-small { min-height: 36px; padding: 8px 13px; border-radius: 9px; font-size: .76rem; }
.button-wide { width: 100%; }
.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink-soft) !important;
  background: var(--white);
  box-shadow: none;
}
.button-secondary:hover { color: var(--teal-dark) !important; background: var(--surface-soft); box-shadow: none; }
.filter-submit {
  min-width: 47px;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: var(--teal);
  cursor: pointer;
  font-weight: 900;
}
label { display: grid; gap: 7px; color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
label small, .form-footnote { color: var(--muted); font-size: .7rem; font-weight: 500; }
input, textarea, select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--input-bg);
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { min-height: 110px; resize: vertical; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--placeholder-color); }
input:focus, textarea:focus, select:focus { border-color: var(--teal-focus-border); box-shadow: 0 0 0 3px var(--teal-focus-shadow); }
input:disabled { color: var(--input-disabled-color); background: var(--input-disabled-bg); }
input[type="checkbox"] { width: 17px; min-height: 17px; height: 17px; accent-color: var(--teal); }
.money-input { display: grid; grid-template-columns: 42px 1fr; }
.money-input span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  color: var(--teal-dark);
  background: var(--surface-soft);
  font-weight: 900;
}
.money-input input { border-radius: 0 9px 9px 0; }
.field-grid { display: grid; gap: 13px; }
.field-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-actions { display: flex; justify-content: flex-end; }

/* Common cards */
.bento-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-white-96);
  box-shadow: var(--shadow);
}
.card-heading {
  min-height: 48px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--card-border);
}
.card-heading > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-heading h2 { margin: 0; font-size: .91rem; letter-spacing: -.02em; }
.card-heading > a, .card-heading > span, .card-heading > strong { color: var(--muted); font-size: .68rem; font-weight: 800; }
.card-heading > a:hover { color: var(--teal-dark); }
.section-icon, .metric-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: .72rem;
  font-style: normal;
  font-weight: 950;
}
.section-icon-teal, .metric-icon-teal { color: var(--icon-teal-color); background: var(--surface-teal); }
.section-icon-orange, .metric-icon-orange { color: var(--icon-orange-color); background: var(--surface-orange); }
.section-icon-blue, .metric-icon-blue { color: var(--icon-blue-color); background: var(--surface-blue); }
.section-icon-purple, .metric-icon-purple { color: var(--icon-purple-color); background: var(--surface-purple); }
.section-icon-yellow { color: var(--status-yellow-color); background: var(--status-yellow-bg); }
.eyebrow { color: var(--teal-dark); font-size: .66rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--live-pill-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-size: .67rem;
  font-weight: 800;
}
.live-pill i, .build-status i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--live-dot-color); box-shadow: 0 0 0 4px var(--live-dot-shadow); }
.stage-chip, .category-chip, .status-chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--white);
  background: var(--chip-bg);
  backdrop-filter: blur(8px);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.category-chip { background: var(--chip-category-bg); color: var(--ink-soft); border-color: var(--chip-category-border); }
/* Per-category neon badge colors */
.category-chip[data-cat="AI Agents"]                    { background:rgba(0,207,255,.12); color:#0090aa; border-color:rgba(0,207,255,.35); }
.category-chip[data-cat="AI Apps/Wrappers"]             { background:rgba(98,0,255,.12);  color:#5000cc; border-color:rgba(98,0,255,.35); }
.category-chip[data-cat="Business Ops Tools"]           { background:rgba(0,206,209,.12); color:#007080; border-color:rgba(0,206,209,.35); }
.category-chip[data-cat="Consumer Apps"]                { background:rgba(255,62,165,.12);color:#bb0060; border-color:rgba(255,62,165,.35); }
.category-chip[data-cat="Content/Media Platforms"]      { background:rgba(252,252,98,.2); color:#6a6a00; border-color:rgba(252,252,98,.45); }
.category-chip[data-cat="Dashboards & Analytics"]       { background:rgba(191,0,255,.12); color:#8000bb; border-color:rgba(191,0,255,.35); }
.category-chip[data-cat="Developer Tools/APIs"]         { background:rgba(57,255,20,.12); color:#1a8a00; border-color:rgba(57,255,20,.35); }
.category-chip[data-cat="E-commerce"]                   { background:rgba(255,0,144,.12); color:#aa0060; border-color:rgba(255,0,144,.35); }
.category-chip[data-cat="EdTech Tools"]                 { background:rgba(98,0,255,.12);  color:#5000cc; border-color:rgba(98,0,255,.35); }
.category-chip[data-cat="Fintech Tools"]                { background:rgba(57,255,20,.12); color:#1a8a00; border-color:rgba(57,255,20,.35); }
.category-chip[data-cat="Games/Prototypes"]             { background:rgba(0,207,255,.12); color:#0090aa; border-color:rgba(0,207,255,.35); }
.category-chip[data-cat="Health/Wellness Apps"]         { background:rgba(255,62,165,.12);color:#bb0060; border-color:rgba(255,62,165,.35); }
.category-chip[data-cat="Marketplace Platforms"]        { background:rgba(0,206,209,.12); color:#007080; border-color:rgba(0,206,209,.35); }
.category-chip[data-cat="Mobile Apps"]                  { background:rgba(255,0,144,.12); color:#aa0060; border-color:rgba(255,0,144,.35); }
.category-chip[data-cat="Productivity Tools"]           { background:rgba(191,0,255,.12); color:#8000bb; border-color:rgba(191,0,255,.35); }
.category-chip[data-cat="Real Estate Tools"]            { background:rgba(252,252,98,.2); color:#6a6a00; border-color:rgba(252,252,98,.45); }
.category-chip[data-cat="SaaS Tools"]                   { background:rgba(98,0,255,.12);  color:#5000cc; border-color:rgba(98,0,255,.35); }
.category-chip[data-cat="Social/Community Apps"]        { background:rgba(255,62,165,.12);color:#bb0060; border-color:rgba(255,62,165,.35); }
.category-chip[data-cat="Vertical/Niche Industry Tools"]{ background:rgba(0,206,209,.12); color:#007080; border-color:rgba(0,206,209,.35); }
.category-chip[data-cat="Workflow Automation"]          { background:rgba(252,252,98,.2); color:#6a6a00; border-color:rgba(252,252,98,.45); }
.status-chip { color: var(--ink-soft); background: var(--white); border-color: var(--line); }
.status-live { color: var(--status-live-color); background: var(--status-live-bg); border-color: var(--status-live-border); }
.status-draft { color: var(--status-draft-color); background: var(--status-draft-bg); border-color: var(--status-draft-border); }
.avatar, .profile-avatar, .settings-avatar, .creator-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(145deg, var(--avatar-alt-bg-start), var(--avatar-alt-bg-end));
  font-weight: 900;
}
img.avatar, img.profile-avatar, img.settings-avatar, img.creator-avatar {
  display: block;
  object-fit: cover;
}
.avatar { width: 34px; height: 34px; font-size: .72rem; }
.avatar-small { width: 29px; height: 29px; font-size: .63rem; }
.creator-line { display: flex; align-items: center; gap: 9px; }
.creator-line div { display: grid; line-height: 1.15; }
.creator-line strong { font-size: .74rem; }
.creator-line small { color: var(--muted); font-size: .64rem; }
.project-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 11px;
  color: var(--white);
  background: linear-gradient(145deg, var(--project-accent,var(--teal)), var(--gradient-dark-1));
  font-weight: 950;
}
.project-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mini-progress { height: 5px; overflow: hidden; border-radius: 999px; background: var(--progress-track); }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--progress-teal-start), var(--progress-teal-end)); }
.mini-progress .progress-active { background: linear-gradient(90deg, var(--progress-active-start), var(--progress-active-end)); }
.mini-empty { min-height: 132px; padding: 22px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.mini-empty > span { font-size: 1.25rem; color: var(--teal); }
.mini-empty p, .mini-empty h3 { margin: 0; }
.empty-state { padding: 54px 24px; text-align: center; }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; color: var(--teal-dark); background: var(--surface-soft); font-size: 1.5rem; }

/* Feed */
.feed-shell { padding-block: 30px 56px; }
.feed-titlebar { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.feed-titlebar h1 { margin: 4px 0 0; font-size: clamp(1.65rem,3vw,2.3rem); }
.feed-title-actions { display: flex; align-items: flex-end; gap: 8px; }
.feed-filter {
  margin-bottom: 16px;
  padding: 9px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-filter);
  box-shadow: 0 9px 26px var(--shadow-ink-6);
}
.feed-filter input, .feed-filter select { min-height: 39px; border-radius: 9px; font-size: .75rem; background: var(--surface-near-white); }
.search-control { position: relative; display: block; }
.search-control > span:first-child { position: absolute; left: 12px; top: 8px; z-index: 1; color: var(--muted); font-size: 1rem; }
.search-control input { padding-left: 35px; }
.feed-layout { display: grid; grid-template-columns: minmax(0,1.64fr) minmax(310px,.76fr); gap: 16px; align-items: start; }
.feed-main, .feed-side { display: grid; gap: 16px; }
.spotlight-card { overflow: hidden; }
.spotlight-grid { padding: 14px; display: grid; grid-template-columns: minmax(230px,.9fr) minmax(0,1.1fr); gap: 14px; }
.spotlight-visual {
  position: relative;
  min-height: 238px;
  padding: 15px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 13px;
  background:
    radial-gradient(circle at 25% 18%, var(--surface-white-35), transparent 29%),
    linear-gradient(145deg, var(--project-accent,var(--teal)), var(--gradient-dark-2));
  background-size: cover;
  background-position: center;
}
.spotlight-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, var(--dark-overlay-35)); pointer-events: none; }
.spotlight-visual .stage-chip { position: absolute; top: 12px; left: 12px; z-index: 2; }
.spotlight-visual img, .large-monogram { position: relative; z-index: 2; width: 68px; height: 68px; object-fit: contain; border: 1px solid var(--auth-white-5); border-radius: 18px; background: var(--surface-white-91); box-shadow: 0 14px 28px var(--dark-overlay-20); }
.large-monogram { display: grid; place-items: center; color: var(--white); background: var(--dark-overlay-deep); font-size: 1.7rem; font-weight: 950; }
.spotlight-copy { min-width: 0; padding: 3px 4px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.project-kicker { color: var(--teal-dark); font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.spotlight-copy h3 { margin: 6px 0 8px; font-size: clamp(1.45rem,2.5vw,2rem); }
.spotlight-copy p { margin: 0; color: var(--muted); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight-footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.mini-progress-wrap { min-width: 160px; flex: 1; }
.mini-progress-wrap small { display: block; margin-top: 6px; color: var(--muted); font-size: .64rem; }
.build-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; }
.trend-carousel { position: relative; }
.trend-carousel-inner { position: relative; overflow: hidden; }
.trend-track { display: flex; transition: transform .38s cubic-bezier(.4,0,.2,1); will-change: transform; touch-action: pan-y; }
.trend-page { flex: 0 0 100%; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; padding: 12px; }
.trend-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: none; background: transparent; padding: 0; display: grid; place-items: center; cursor: pointer; z-index: 2; filter: drop-shadow(0 0 5px #00FFFF) drop-shadow(0 0 12px rgba(0,255,255,.5)); transition: filter .18s, transform .18s; }
.trend-arrow:hover { filter: drop-shadow(0 0 8px #00FFFF) drop-shadow(0 0 22px #00FFFF) drop-shadow(0 0 38px rgba(0,255,255,.32)); transform: translateY(-50%) scale(1.12); }
.trend-arrow:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.trend-arrow[disabled] { opacity: .3; pointer-events: none; }
.trend-arrow-prev { left: 6px; }
.trend-arrow-next { right: 6px; }
.trend-dots { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 0 4px; }
.trend-dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: var(--line-strong); cursor: pointer; padding: 0; transition: background .2s, width .2s, border-radius .2s; flex-shrink: 0; }
.trend-dot.trend-dot-active { background: var(--teal); width: 20px; border-radius: 4px; }
.trend-dot:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .trend-track { transition: none !important; } }
.trend-card { min-width: 0; padding: 8px; display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 10px; border: 1px solid var(--card-border-alt); border-radius: 12px; background: var(--surface-mid); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.trend-card:hover { transform: translateY(-2px); border-color: var(--teal-hover-border); box-shadow: 0 10px 24px var(--shadow-ink-8); }
.trend-thumb { min-height: 70px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: linear-gradient(145deg, var(--project-accent,var(--teal)), var(--gradient-dark-3)); background-size: cover; background-position: center; }
.trend-thumb img { width: 45px; height: 45px; object-fit: contain; border-radius: 10px; background: var(--surface-white-9); }
.trend-thumb > span { color: var(--white); font-size: 1.15rem; font-weight: 950; }
.trend-copy { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.trend-topline { display: flex; justify-content: space-between; gap: 8px; color: var(--teal-dark); font-size: .55rem; font-weight: 900; text-transform: uppercase; }
.trend-topline small { color: var(--muted); font-size: inherit; }
.trend-copy h3 { margin: 4px 0 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; }
.trend-metric { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; }
.trend-metric strong { color: var(--teal-dark); font-size: .58rem; }
.trend-carousel .trend-card { grid-template-columns: 1fr; padding: 0; overflow: hidden; position: relative; gap: 0; }
.trend-carousel .trend-thumb { position: relative; min-height: 220px; border-radius: 0; }
.trend-carousel .trend-copy { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px 8px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 0; color: rgba(255,255,255,.9); }
.trend-carousel .trend-creator { display: none; }
.trend-carousel .ms-pill { display: none; }
.trend-carousel .trend-copy h3 { font-size: .73rem; margin: 2px 0 5px; color: #fff; }
.trend-carousel .trend-copy h3 a { color: inherit; }
.trend-carousel .trend-topline { margin-bottom: 2px; color: rgba(255,255,255,.75); }
.trend-carousel .trend-metric strong { color: rgba(255,255,255,.9); }
.trend-carousel .trend-card:hover { transform: none; }
.trend-carousel .fee-note { display: none; }
.trend-carousel .card-days-left { display: none; }
.trend-carousel .card-backer-stack { display: none; }
.trend-carousel .comment-chip { display: none; }
.trend-carousel .trend-actions { margin-top: 4px; }
.es-urgency { display: block; font-size: .63rem; font-weight: 900; color: #ff9900; margin: 1px 0 3px; letter-spacing: .01em; }
.es-urgent { color: #ff4400; }
.fund-badge { display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; font-size:.63rem; font-weight:800; letter-spacing:.03em; flex-shrink:0; }
.fund-badge-funded { background:rgba(32,173,158,.18); color:#20ad9e; }
.fund-badge-expired { background:rgba(255,100,80,.13); color:#e05a40; }
.fund-badge-demo { background:rgba(255,200,50,.18); color:#b08000; font-size:.6rem; }
.trend-carousel .fund-badge-funded,
.cat-carousel .fund-badge-funded { background:rgba(32,173,158,.28); color:#5ffcd8; }
.trend-carousel .fund-badge-expired,
.cat-carousel .fund-badge-expired { background:rgba(255,100,80,.28); color:#ffb3aa; }
.save-btn { position:absolute; top:8px; left:8px; z-index:4; background:rgba(0,0,0,.45); border:none; border-radius:7px; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; font-size:.82rem; cursor:pointer; color:#fff; backdrop-filter:blur(4px); transition:background .15s; line-height:1; }
.save-btn:hover { background:rgba(0,0,0,.72); }
.save-btn.saved { background:rgba(220,53,69,.72); }
.fresh-list { padding: 5px 12px 10px; }
.fresh-row { padding: 10px 4px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto 15px; align-items: center; gap: 10px; border-bottom: 1px solid var(--divider); }
.fresh-row:last-child { border-bottom: 0; }
.cat-row { margin-bottom: 30px; }
.cat-row-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 0 2px; }
.cat-row-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.cat-row-title { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.2; }
.cat-row-count { font-size: .7rem; color: var(--muted); font-weight: 500; flex-shrink: 0; }
.cat-row-all { margin-left: auto; font-size: .72rem; font-weight: 800; color: var(--teal-dark); text-decoration: none; flex-shrink: 0; white-space: nowrap; }
.cat-row-all:hover { text-decoration: underline; }
.cat-page { flex: 0 0 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; padding: 6px 0; }
.cat-carousel .trend-card { grid-template-columns: 1fr; padding: 0; overflow: hidden; position: relative; gap: 0; }
.cat-carousel .trend-thumb { position: relative; min-height: 200px; border-radius: 0; }
.cat-carousel .trend-copy { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px 8px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 0; color: rgba(255,255,255,.9); }
.cat-carousel .trend-creator { display: none; }
.cat-carousel .ms-pill { display: none; }
.cat-carousel .trend-copy h3 { font-size: .73rem; margin: 2px 0 5px; color: #fff; }
.cat-carousel .trend-copy h3 a { color: inherit; }
.cat-carousel .trend-topline { margin-bottom: 2px; color: rgba(255,255,255,.75); }
.cat-carousel .trend-metric strong { color: rgba(255,255,255,.9); }
.cat-carousel .trend-card:hover { transform: none; }
.cat-carousel .fee-note { display: none; }
.cat-carousel .card-days-left { display: none; }
.cat-carousel .card-backer-stack { display: none; }
.cat-carousel .comment-chip { display: none; }
.cat-carousel .trend-actions { margin-top: 4px; }
@media (max-width:600px) { .cat-page { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.fresh-copy { min-width: 0; display: grid; }
.fresh-copy strong { font-size: .75rem; }
.fresh-copy small { overflow: hidden; color: var(--muted); font-size: .64rem; white-space: nowrap; text-overflow: ellipsis; }
.fresh-meta { display: grid; min-width: 48px; text-align: right; }
.fresh-meta strong { font-size: .71rem; }
.fresh-meta small { color: var(--muted); font-size: .56rem; text-transform: uppercase; }
.row-arrow { color: var(--muted-2); font-size: 1.1rem; }
.funding-list { padding: 7px 12px 12px; }
.funding-item { padding: 10px 2px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--divider); }
.funding-item:last-child { border-bottom: 0; }
.funding-item > span:nth-child(2) { min-width: 0; display: grid; }
.funding-item strong { overflow: hidden; font-size: .71rem; white-space: nowrap; text-overflow: ellipsis; }
.funding-item small { color: var(--muted); font-size: .59rem; }
.funding-item b { color: var(--teal-dark); font-size: .67rem; }
.creator-grid { padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.creator-card { min-width: 0; padding: 13px 7px; display: grid; justify-items: center; border: 1px solid var(--settings-border); border-radius: 12px; background: var(--surface-mid); text-align: center; }
.creator-avatar { width: 36px; height: 36px; font-size: .76rem; flex-shrink: 0; }
.avatar-tone-1 { background: linear-gradient(145deg,var(--tone-1-start),var(--tone-1-end)); }
.avatar-tone-2 { background: linear-gradient(145deg,var(--tone-2-start),var(--tone-2-end)); }
.avatar-tone-3 { background: linear-gradient(145deg,var(--tone-3-start),var(--tone-3-end)); }
.avatar-tone-4 { background: linear-gradient(145deg,var(--tone-4-start),var(--tone-4-end)); }
.creator-card strong { width: 100%; overflow: hidden; font-size: .66rem; white-space: nowrap; text-overflow: ellipsis; }
.creator-card small { color: var(--muted); font-size: .56rem; }
.creator-card b { margin-top: 5px; color: var(--teal-dark); font-size: .57rem; }
.builder-search-wrap { padding: 10px 12px 6px; }
.builder-search { width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--ink); font-size: .76rem; outline: none; box-sizing: border-box; }
.builder-search::placeholder { color: var(--muted-2); }
.builder-search:focus { border-color: var(--teal); box-shadow: 0 0 0 2px var(--focus-ring); }
.builder-list { max-height: 440px; overflow-y: auto; padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.builder-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; text-decoration: none; color: var(--ink); transition: background .14s; min-width: 0; }
.builder-row:hover { background: var(--surface-soft); }
.builder-row:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.builder-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.builder-info strong { font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.builder-info small { color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.builder-empty { padding: 10px 8px; color: var(--muted); font-size: .73rem; text-align: center; }
.pulse-grid { padding: 12px; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.pulse-grid div { padding: 14px 10px; display: grid; border: 1px solid var(--settings-border); border-radius: 11px; background: var(--surface-mid); }
.pulse-grid strong { font-size: 1.1rem; }
.pulse-grid span { color: var(--muted); font-size: .6rem; text-transform: uppercase; }
.join-card { padding: 15px; display: grid; grid-template-columns: 39px minmax(0,1fr) auto; align-items: center; gap: 10px; border-radius: var(--radius); color: var(--white); background: linear-gradient(135deg,var(--join-bg-start),var(--join-bg-mid) 56%,var(--join-bg-end)); box-shadow: var(--shadow); }
.join-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-white-14); font-weight: 950; }
.join-card div { display: grid; }
.join-card strong { font-size: .74rem; }
.join-card small { color: var(--auth-white-65); font-size: .61rem; }
.join-card a { padding: 7px 10px; border-radius: 8px; color: var(--join-link-color); background: var(--white); font-size: .65rem; font-weight: 900; }
.feed-empty { margin-top: 20px; }

/* General app pages */
.app-page { padding-block: 34px 58px; }
.narrow-page { max-width: 980px; }
.app-page-header { min-height: 64px; margin-bottom: 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.app-page-header h1 { margin: 3px 0 0; font-size: clamp(1.55rem,3vw,2.25rem); }
.profile-heading { display: flex; align-items: center; gap: 12px; }
.profile-avatar { width: 48px; height: 48px; font-size: 1rem; }
.metric-strip { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.metric-strip > div { padding: 14px; display: grid; grid-template-columns: 31px 1fr; grid-template-rows: auto auto; column-gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-white-94); box-shadow: 0 8px 24px var(--shadow-ink-6); }
.metric-strip .metric-icon { grid-row: 1 / span 2; align-self: center; width: 31px; height: 31px; border-radius: 9px; }
.metric-strip strong { font-size: .95rem; line-height: 1.05; }
.metric-strip small { color: var(--muted); font-size: .59rem; text-transform: uppercase; }

/* Dashboard */
.dashboard-bento { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(300px,.78fr); gap: 16px; align-items: start; }
.dashboard-rail { display: grid; gap: 16px; }
.portfolio-grid { padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.portfolio-card { min-width: 0; overflow: hidden; border: 1px solid var(--portfolio-border); border-radius: 13px; background: var(--surface-mid); transition: transform .18s ease, box-shadow .18s ease; }
.portfolio-card:hover { transform: translateY(-3px); box-shadow: 0 13px 30px var(--shadow-ink-1); }
.portfolio-cover { position: relative; min-height: 122px; padding: 12px; display: flex; align-items: flex-end; background: linear-gradient(145deg,var(--project-accent,var(--teal)),var(--gradient-dark-4)); background-size: cover; background-position: center; }
.portfolio-cover .status-chip { position: absolute; top: 10px; left: 10px; }
.portfolio-cover img, .portfolio-cover .large-monogram { width: 50px; height: 50px; border-radius: 13px; }
.portfolio-content { padding: 12px; }
.portfolio-content h3 { margin: 6px 0 6px; font-size: .95rem; }
.portfolio-content p { min-height: 36px; margin-bottom: 11px; color: var(--muted); font-size: .67rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.portfolio-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.portfolio-stats span { padding: 8px; display: grid; border-radius: 9px; background: var(--portfolio-stats-bg); }
.portfolio-stats strong { font-size: .7rem; }
.portfolio-stats small { color: var(--muted); font-size: .54rem; text-transform: uppercase; }
.portfolio-actions { margin-top: 10px; padding-top: 9px; display: flex; gap: 13px; border-top: 1px solid var(--card-border-alt); }
.portfolio-actions a { color: var(--teal-dark); font-size: .64rem; font-weight: 900; }
.portfolio-empty { min-height: 310px; }
.activity-list { padding: 7px 12px 12px; }
.activity-list article { padding: 10px 2px; display: grid; grid-template-columns: 29px minmax(0,1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--divider); }
.activity-list article:last-of-type { border-bottom: 0; }
.activity-list article > div { min-width: 0; display: grid; }
.activity-list article strong { font-size: .69rem; }
.activity-list article p { margin: 1px 0 0; overflow: hidden; font-size: .62rem; white-space: nowrap; text-overflow: ellipsis; }
.activity-list article small { color: var(--muted); font-size: .55rem; }
.activity-list article > b { color: var(--teal-dark); font-size: .64rem; }
.activity-note { margin: -4px 4px 8px 40px; padding: 8px 10px; border-radius: 9px; color: var(--muted); background: var(--activity-bg); font-size: .61rem; }
.compact-activity .project-avatar { width: 29px; height: 29px; border-radius: 9px; font-size: .62rem; }
.quick-links-card { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.quick-links-card a { padding: 12px 14px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--divider); }
.quick-links-card a:last-child { border-bottom: 0; }
.quick-links-card span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--teal-dark); background: var(--surface-soft); font-size: .7rem; }
.quick-links-card strong { font-size: .7rem; }
.quick-links-card b { color: var(--muted); }

/* Settings */
.settings-bento { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 16px; align-items: start; }
.settings-profile-card { padding: 25px; text-align: center; }
.settings-avatar { width: 76px; height: 76px; margin: 0 auto 13px; font-size: 1.35rem; }
.settings-profile-card h2 { margin: 0 0 7px; font-size: 1.05rem; }
.settings-profile-card p { min-height: 42px; margin: 0 0 16px; color: var(--muted); font-size: .69rem; }
.settings-mini-meta { padding-top: 13px; display: flex; justify-content: space-between; border-top: 1px solid var(--settings-border); font-size: .65rem; }
.settings-mini-meta span { color: var(--muted); }
.settings-forms { display: grid; gap: 16px; }
.form-card { padding: 0 16px 16px; display: grid; gap: 14px; }
.form-card-heading { margin: 0 -16px; }
.form-card-heading h2 { font-size: .9rem; }

/* Auth */
.auth-page main { display: grid; align-items: center; }
.auth-layout { min-height: calc(100vh - 154px); padding-block: 38px; display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.72fr); align-items: stretch; gap: 18px; }
.auth-layout.compact-auth { max-width: 960px; }
.auth-visual { min-height: 530px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background:
  radial-gradient(circle at 83% 16%, var(--auth-visual-accent), transparent 15rem),
  radial-gradient(circle at 18% 82%, var(--auth-teal-glow), transparent 16rem),
  linear-gradient(145deg,var(--auth-visual-start),var(--auth-visual-end)); }
.auth-visual-top { display: flex; justify-content: space-between; align-items: center; }
.auth-brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 1rem; }
.auth-visual h1 { margin: 6px 0 0; font-size: clamp(2.2rem,5vw,4.1rem); }
.auth-stack { width: min(460px,90%); margin-inline: auto; display: grid; gap: 12px; }
.auth-proof { display: flex; flex-direction: column; gap: 28px; }
.auth-proof-tagline { margin: 0; font-size: .95rem; font-weight: 600; color: var(--auth-white-65); line-height: 1.4; }
.auth-proof-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.auth-proof-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border: 1px solid var(--auth-border-dim); border-radius: 14px; background: var(--surface-white-07); }
.auth-proof-stat strong { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 900; color: var(--white); line-height: 1; letter-spacing: -.02em; }
.auth-proof-stat span { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--auth-white-5); }
.auth-mini-card { padding: 15px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--auth-border-light); border-radius: 14px; background: var(--surface-white-88); box-shadow: 0 17px 36px var(--shadow-ink-1); }
.auth-mini-card > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--teal-dark); background: var(--surface-soft); font-weight: 950; }
.auth-mini-card div { display: grid; }
.auth-mini-card small { color: var(--muted); font-size: .62rem; text-transform: uppercase; }
.auth-mini-card strong { font-size: .9rem; }
.auth-mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.auth-mini-grid > div { min-height: 96px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px solid var(--auth-border-light-85); border-radius: 13px; background: var(--surface-white-83); box-shadow: 0 12px 28px var(--shadow-ink-8); }
.auth-mini-grid strong { font-size: .68rem; }
.mini-orb { width: 30px; height: 30px; display: block; border-radius: 10px; }
.orb-teal { background: linear-gradient(145deg,var(--orb-teal-start),var(--orb-teal-end)); }
.orb-orange { background: linear-gradient(145deg,var(--orb-orange-start),var(--orb-orange-end)); }
.orb-purple { background: linear-gradient(145deg,var(--orb-purple-start),var(--orb-purple-end)); }
.auth-form { align-self: center; padding: 26px; display: grid; gap: 16px; }
.auth-form-heading { margin-bottom: 5px; display: flex; align-items: center; gap: 10px; }
.auth-form-heading h2 { margin: 0; font-size: 1.35rem; }
.auth-form-heading p { margin: 3px 0 0; color: var(--muted); font-size: .68rem; }
.auth-form .form-footnote { margin: 0; text-align: center; }
.auth-form .form-footnote a { color: var(--teal-dark); font-weight: 900; }
/* ── OAuth / social login buttons ────────────────────────────────────────── */
.oauth-buttons { display: grid; gap: 9px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: .84rem; font-weight: 600; color: var(--ink); background: var(--surface); text-decoration: none; transition: background .12s, border-color .12s; }
.oauth-btn:hover { background: var(--surface-soft); border-color: var(--line-strong); }
.oauth-btn svg { flex-shrink: 0; }
.oauth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-form form { display: grid; gap: 14px; }

/* Editor */
.editor-page { padding-bottom: 70px; }
.editor-page-header { margin-bottom: 14px; }
.editor-workspace { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 16px; align-items: start; }
.editor-fields { display: grid; gap: 12px; }
.editor-section { overflow: hidden; }
.editor-section summary {
  min-height: 64px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.editor-section summary::-webkit-details-marker { display: none; }
.editor-section summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1rem; font-weight: 500; }
.editor-section[open] summary::after { content: "−"; }
.editor-index { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--surface-soft); font-size: .64rem; font-weight: 950; }
.editor-section summary > div { display: grid; }
.editor-section summary strong { font-size: .82rem; }
.editor-section summary small { color: var(--muted); font-size: .62rem; }
.editor-section-body { padding: 16px; display: grid; gap: 15px; border-top: 1px solid var(--editor-body-border); background: var(--editor-body-bg); }
.story-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.story-fields label:first-child { grid-column: 1 / -1; }
.color-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.color-grid label { padding: 10px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.color-grid label span { font-size: .65rem; }
.color-grid input[type="color"] { width: 33px; min-height: 33px; height: 33px; padding: 2px; border-radius: 8px; cursor: pointer; }
.funding-toggle-card { padding: 12px 14px; border: 1px solid var(--funding-toggle-border); border-radius: 11px; background: var(--funding-toggle-bg); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch-row > span { display: grid; }
.switch-row strong { font-size: .75rem; }
.switch-row small { font-size: .6rem; }
.switch-row input { width: 36px; min-height: 20px; height: 20px; }
.funding-fields { padding: 14px; display: grid; grid-template-columns: minmax(170px,.55fr) minmax(0,1.45fr); gap: 13px; border: 1px dashed var(--funding-fields-border); border-radius: 11px; background: var(--funding-fields-bg); }
.tier-builder { display: grid; gap: 8px; }
.tier-row { display: grid; grid-template-columns: 100px 1fr 2fr auto; gap: 8px; align-items: start; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tier-row input, .tier-row textarea { margin: 0; }
.tier-row textarea { resize: vertical; min-height: 52px; }
.tier-label { font-size: .7rem; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.tier-remove { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 4px 6px; border-radius: 6px; align-self: center; }
.tier-remove:hover { color: var(--danger); background: var(--danger-hover-bg); }
.tier-add-btn { background: none; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .8rem; font-weight: 600; padding: 8px 14px; cursor: pointer; width: 100%; margin-top: 2px; }
.tier-add-btn:hover { border-color: var(--teal); color: var(--teal); }
.tier-review-list { display: grid; gap: 6px; }
.tier-review-item { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: .78rem; }
.tier-review-item strong { display: block; color: var(--ink); margin-bottom: 2px; }
.custom-section-fields { padding-bottom: 14px; display: grid; gap: 12px; border-bottom: 1px solid var(--editor-body-border); }
.custom-section-fields:last-child { padding: 0; border-bottom: 0; }
.publish-bar { position: sticky; bottom: 10px; z-index: 20; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--surface-white-94); backdrop-filter: blur(14px); }
.publish-switch { min-width: 210px; }
.editor-preview-rail { position: sticky; top: 80px; display: grid; gap: 12px; }
.preview-label { display: flex; align-items: center; justify-content: space-between; }
.preview-label small { color: var(--muted); font-size: .62rem; }
.editor-preview { overflow: hidden; border: 1px solid var(--surface-white-12); border-radius: var(--radius); color: var(--preview-text,var(--white)); background: var(--preview-bg,var(--preview-bg-default)); box-shadow: 0 22px 54px var(--preview-deep-overlay); }
.preview-image { position: relative; min-height: 170px; padding: 12px; background: linear-gradient(145deg,var(--preview-accent,var(--teal)),var(--gradient-dark-5)); background-size: cover; background-position: center; }
.preview-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 45%,var(--dark-overlay-40)); }
.preview-image .stage-chip { position: relative; z-index: 2; }
.preview-content { padding: 18px; background: var(--preview-card,var(--preview-card-default)); }
.preview-kicker { color: var(--preview-accent,var(--preview-accent-default)); font-size: .56rem; font-weight: 950; letter-spacing: .12em; }
.preview-content h2 { margin: 7px 0 8px; color: inherit; font-size: 1.35rem; }
.preview-content p { min-height: 52px; margin-bottom: 14px; color: inherit; opacity: .75; font-size: .7rem; }
.preview-button { padding: 8px 10px; display: inline-flex; border-radius: 8px; color: var(--white); background: var(--preview-accent,var(--teal)); font-size: .63rem; font-weight: 900; }
.font-editorial .preview-content h2, .font-editorial.project-theme h1, .font-editorial.project-theme h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.font-terminal .preview-content, .font-terminal.project-theme { font-family: "Courier New", monospace; }
.font-playful .preview-content h2, .font-playful.project-theme h1, .font-playful.project-theme h2 { letter-spacing: -.055em; }
.danger-card { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--danger-card-border); background: var(--danger-card-bg); }
.danger-card > div { display: grid; }
.danger-card strong { color: var(--danger-card-color); font-size: .7rem; }
.danger-card small { color: var(--muted); font-size: .58rem; }
.danger-button { padding: 7px 10px; border: 1px solid var(--danger-btn-border); border-radius: 8px; color: var(--danger-btn-color); background: var(--white); cursor: pointer; font-size: .65rem; font-weight: 900; }

/* Project detail */
.project-page { padding-bottom: 58px; }
.owner-bar { padding: 9px max(18px,calc((100vw - 1180px)/2)); display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: var(--white); font-size: .65rem; }
.owner-bar > div, .owner-bar nav { display: flex; align-items: center; gap: 11px; }
.owner-bar nav a { color: var(--teal-dark); font-weight: 900; }
.project-app { padding-top: 26px; }
.project-top-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.72fr); gap: 16px; align-items: stretch; }
.project-feature { overflow: hidden; display: grid; grid-template-columns: minmax(260px,.95fr) minmax(0,1.05fr); }
.project-feature-media { position: relative; min-height: 370px; padding: 16px; display: flex; align-items: flex-end; background: linear-gradient(145deg,var(--project-accent,var(--teal)),var(--gradient-dark-6)); background-size: cover; background-position: center; }
.project-feature-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 40%,var(--dark-overlay-45)); }
.project-feature-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; justify-content: space-between; gap: 8px; }
.project-detail-logo, .project-detail-monogram { position: relative; z-index: 2; width: 82px; height: 82px; border: 1px solid var(--auth-white-5); border-radius: 21px; object-fit: contain; background: var(--surface-white-94); box-shadow: 0 17px 36px var(--shadow-deep-23); }
.project-detail-monogram { display: grid; place-items: center; color: var(--white); background: var(--dark-overlay-42); font-size: 2rem; font-weight: 950; }
.project-feature-copy { padding: 26px; display: flex; flex-direction: column; justify-content: center; }
.project-feature-copy h1 { margin: 20px 0 11px; font-size: clamp(2.2rem,4.8vw,4.4rem); }
.project-feature-copy > p { margin-bottom: 22px; color: var(--muted); font-size: .92rem; }
.project-feature-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.project-top-rail { display: grid; gap: 16px; }
.project-funding-summary { padding-bottom: 15px; }
.funding-big { padding: 17px 15px 10px; display: grid; }
.funding-big strong { font-size: 1.7rem; }
.funding-big span { color: var(--muted); font-size: .61rem; text-transform: uppercase; }
.project-progress { height: 7px; margin: 0 15px; overflow: hidden; border-radius: 999px; background: var(--project-progress-track); }
.project-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--project-accent,var(--teal)),var(--gradient-teal-end)); }
.funding-split { margin-top: 13px; padding: 0 15px; display: grid; grid-template-columns: repeat(auto-fit,minmax(80px,1fr)); gap: 8px; }
.funding-split span { padding: 10px; display: grid; border-radius: 10px; background: var(--funding-split-bg); }
.funding-split strong { font-size: .73rem; }
.funding-split small { color: var(--muted); font-size: .55rem; text-transform: uppercase; }
.funding-deadline { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 15px 0; font-size: .73rem; }
.funding-deadline strong { color: var(--teal-dark); }
.funding-deadline small { color: var(--muted); font-size: .65rem; }
.project-status-summary { min-height: 102px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.project-status-summary > div { display: grid; }
.project-status-summary strong { font-size: .78rem; }
.project-status-summary small { color: var(--muted); font-size: .62rem; }
.project-quick-facts { padding: 8px 13px; }
.project-quick-facts div { padding: 10px 2px; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--divider); }
.project-quick-facts div:last-child { border-bottom: 0; }
.project-quick-facts span { color: var(--muted); font-size: .61rem; }
.project-quick-facts strong { max-width: 65%; text-align: right; font-size: .65rem; }
.project-link-strip { padding: 7px 13px; display: grid; }
.project-link-strip a { padding: 10px 2px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--divider); font-size: .68rem; font-weight: 900; }
.project-link-strip a:last-child { border-bottom: 0; }
.project-content-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.72fr); gap: 16px; align-items: start; }
.project-story-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.story-card { min-width: 0; padding: 20px; }
.story-card-wide { grid-column: 1 / -1; }
.project-story-grid > .story-card:not(.story-card-wide):last-child:nth-child(odd) { grid-column: 1 / -1; }
.story-card-accent { border-color: color-mix(in srgb,var(--project-accent,var(--teal)) 35%,var(--line)); background: color-mix(in srgb,var(--project-accent,var(--teal)) 5%,var(--white)); }
.story-card-head { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.story-card-head > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--surface-soft); font-size: .62rem; font-weight: 950; }
.story-card-head > div { display: grid; }
.story-card-head small { color: var(--muted); font-size: .56rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.story-card-head h2 { margin: 2px 0 0; font-size: 1rem; }
.rich-text { color: var(--ink-soft); font-size: .75rem; white-space: pre-line; }
.tiny-disclaimer { margin: 13px 0 0; color: var(--muted); font-size: .58rem; }
.gallery-card { padding-bottom: 15px; overflow: hidden; }
.gallery-card .card-heading { margin: -20px -20px 15px; }
.project-gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.project-gallery img { width: 100%; height: 210px; object-fit: cover; border-radius: 11px; }
.project-action-rail { position: sticky; top: 80px; display: grid; gap: 16px; }
.invest-card { padding: 18px; }
.invest-card h2 { margin: 13px 0 7px; font-size: 1.25rem; }
.invest-card > p { margin-bottom: 14px; color: var(--muted); font-size: .7rem; }
.invest-card form { display: grid; gap: 12px; }
.owner-notice { margin-bottom: 12px; padding: 11px; border-radius: 9px; color: var(--muted); background: var(--notice-bg); font-size: .65rem; }
.perk-jump { padding: 14px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; }
.perk-jump > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--status-yellow-color); background: var(--status-yellow-bg); }
.perk-jump div { display: grid; }
.perk-jump strong { font-size: .7rem; }
.perk-jump small { color: var(--muted); font-size: .59rem; }
.builder-mini-card { padding: 17px; }
.builder-mini-card p { margin: 13px 0; color: var(--muted); font-size: .68rem; }
.builder-mini-card > small { color: var(--muted); font-size: .58rem; }

/* Pitch */
.pitch-bento { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 16px; align-items: start; }
.pitch-control { padding: 18px; display: grid; gap: 17px; }
.pitch-project-id { display: flex; align-items: center; gap: 10px; }
.pitch-project-id > div { display: grid; }
.pitch-project-id strong { font-size: .8rem; }
.pitch-project-id small { color: var(--muted); font-size: .61rem; }
.pitch-checklist { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.pitch-checklist span { padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface-soft); font-size: .62rem; }
.pitch-checklist span::before { content: "○"; margin-right: 6px; }
.pitch-checklist span.complete { color: var(--pitch-complete-color); background: var(--pitch-complete-bg); border-color: var(--pitch-complete-border); }
.pitch-checklist span.complete::before { content: "●"; }
.pitch-control > small { color: var(--muted); font-size: .58rem; text-align: center; }
.pitch-output { overflow: hidden; }
.pitch-output-toolbar { min-height: 64px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--editor-body-border); background: var(--surface-soft); }
.pitch-output-toolbar > div { display: flex; align-items: center; gap: 9px; }
.pitch-output-toolbar > div > div { display: grid; }
.pitch-output-toolbar strong { font-size: .76rem; }
.pitch-output-toolbar small { color: var(--muted); font-size: .58rem; }
.pitch-output pre { max-height: 680px; margin: 0; padding: 22px; overflow: auto; color: var(--ink-soft); background: var(--white); font: .72rem/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; white-space: pre-wrap; }
.pitch-empty { min-height: 440px; padding: 30px; display: grid; place-items: center; align-content: center; text-align: center; }
.pitch-empty > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: var(--teal-dark); background: var(--surface-soft); font-size: 1.3rem; }
.pitch-empty h2 { margin: 14px 0 6px; font-size: 1.25rem; }
.pitch-empty p { color: var(--muted); font-size: .7rem; }

/* Error */
.error-layout { min-height: calc(100vh - 170px); padding-block: 50px; display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: center; gap: 16px; }
.error-card { position: relative; min-height: 430px; padding: 46px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; overflow: hidden; }
.error-code { position: absolute; right: 20px; top: -28px; color: var(--error-code-color); font-size: 10rem; line-height: 1; font-weight: 950; }
.error-card h1 { position: relative; max-width: 620px; margin: 18px 0 24px; font-size: clamp(2rem,5vw,4.2rem); }
.error-tiles { display: grid; gap: 12px; }
.error-tiles div { min-height: 130px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.error-tiles .mini-orb { width: 52px; height: 52px; border-radius: 15px; }

/* Flash and footer */
.flash-stack { position: fixed; bottom: 20px; right: 20px; z-index: 200; width: min(390px,calc(100vw - 36px)); display: grid; gap: 8px; }
.flash { padding: 12px 14px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: var(--surface-white-97); box-shadow: var(--shadow-hover); font-size: .72rem; animation: flashIn .28s ease both; cursor: pointer; }
.flash-dot { width: 9px; height: 9px; margin-top: 3px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.flash-success .flash-dot { background: var(--flash-success-color); }
.flash-danger .flash-dot { background: var(--danger); }
.flash-warning .flash-dot { background: var(--orange); }
.site-footer { min-height: 78px; padding-block: 20px 27px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-top: 1px solid var(--line-strong); color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: .72rem; font-weight: 900; }
.site-footer nav { display: flex; gap: 15px; font-size: .63rem; }
.site-footer small { justify-self: end; font-size: .61rem; }

@keyframes flashIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.flash-hide { animation: flashOut .38s ease forwards; pointer-events: none; }
@keyframes flashOut { to { opacity: 0; transform: translateX(calc(100% + 20px)); } }

/* Responsive */
@media (max-width: 1050px) {
  .feed-layout, .dashboard-bento, .project-top-grid, .project-content-grid { grid-template-columns: 1fr; }
  .feed-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .feed-side .join-card { grid-column: 1 / -1; }
  .project-top-rail { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .project-action-rail { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .builder-mini-card { grid-column: 1 / -1; }
  .editor-workspace { grid-template-columns: minmax(0,1fr) 290px; }
}

@media (max-width: 860px) {
  :root { --shell: min(100% - 26px, 1180px); }
  .site-header-inner { min-height: 60px; }
  .feed-filter { flex-wrap: wrap; }
  .metric-strip { grid-template-columns: repeat(2,1fr); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 380px; }
  .auth-form { width: min(100%,560px); justify-self: center; }
  .settings-bento { grid-template-columns: 1fr; }
  .settings-profile-card { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 15px; text-align: left; }
  .settings-avatar { margin: 0; }
  .settings-profile-card h2 { margin: 0 0 4px; }
  .settings-profile-card p { min-height: 0; margin: 0; }
  .settings-stats { grid-column: 1 / -1; }
  .editor-workspace { grid-template-columns: 1fr; }
  .editor-preview-rail { position: static; grid-template-columns: 1fr 1fr; align-items: start; }
  .preview-label { grid-column: 1 / -1; }
  .danger-card { align-self: stretch; }
  .project-feature { grid-template-columns: 1fr 1fr; }
  .project-top-rail { grid-template-columns: 1fr 1fr; }
  .project-link-strip { grid-column: 1 / -1; }
  .pitch-bento { grid-template-columns: 1fr; }
  .pitch-control { grid-template-columns: 1fr 1fr; align-items: start; }
  .pitch-project-id, .pitch-control > small { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .feed-shell, .app-page { padding-top: 22px; }
  .feed-titlebar, .app-page-header { align-items: center; }
  .feed-titlebar h1, .app-page-header h1 { font-size: 1.55rem; }
  .spotlight-grid, .project-feature { grid-template-columns: 1fr; }
  .spotlight-visual { min-height: 210px; }
  .trend-page, .portfolio-grid, .project-story-grid, .feed-side { grid-template-columns: 1fr; }
  .trend-card { grid-template-columns: 74px minmax(0,1fr); }
  .metric-strip { gap: 7px; }
  .metric-strip > div { padding: 11px; }
  .field-grid-2, .field-grid-3, .story-fields, .funding-fields { grid-template-columns: 1fr; }
  .tier-row { grid-template-columns: 80px 1fr; }
  .color-grid { grid-template-columns: repeat(2,1fr); }
  .editor-preview-rail { grid-template-columns: 1fr; }
  .publish-bar { position: static; align-items: stretch; flex-direction: column; }
  .publish-switch { min-width: 0; }
  .project-feature-media { min-height: 265px; }
  .project-feature-copy { padding: 22px; }
  .project-feature-copy h1 { font-size: 2.25rem; }
  .project-top-rail, .project-action-rail { grid-template-columns: 1fr; }
  .project-link-strip, .builder-mini-card { grid-column: auto; }
  .story-card-wide { grid-column: auto; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-gallery img { height: 230px; }
  .owner-bar { align-items: flex-start; flex-direction: column; }
  .pitch-control { grid-template-columns: 1fr; }
  .pitch-project-id, .pitch-control > small { grid-column: auto; }
  .error-layout { grid-template-columns: 1fr; }
  .error-card { min-height: 360px; padding: 30px; }
  .error-tiles { grid-template-columns: repeat(3,1fr); }
  .error-tiles div { min-height: 90px; }
  .site-footer { grid-template-columns: 1fr; justify-items: start; }
  .site-footer nav { flex-wrap: wrap; }
  .site-footer small { justify-self: start; }
}

@media (max-width: 460px) {
  :root { --shell: min(100% - 20px,1180px); }
  .brand-name { font-size: .78rem; }
  .brand-logo-full { display: none; }
  .brand-logo-dark { display: none; }
  [data-theme="dark"] .brand-logo-dark { display: none; }
  .brand-logo-icon { display: block; }
  .feed-title-actions .live-pill { display: none; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .fresh-row { grid-template-columns: 38px minmax(0,1fr) 14px; }
  .fresh-meta { display: none; }
  .auth-layout { padding-block: 18px; }
  .auth-visual { min-height: 330px; padding: 20px; }
  .auth-stack { width: 100%; }
  .auth-form { padding: 20px; }
  .settings-profile-card { grid-template-columns: 58px 1fr; }
  .settings-avatar { width: 58px; height: 58px; }
  .settings-mini-meta { grid-column: 1 / -1; display: flex; text-align: left; }
  .project-feature-actions .button { width: 100%; }
  .pitch-checklist { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.trend-topline > span { min-width: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; }
.trend-topline > small { flex: 0 0 auto; white-space: nowrap; }

/* Header-right: groups account-menu + mobile hamburger */
.header-right { display: flex; align-items: center; gap: 6px; }
.header-login {
  padding: 8px 11px; border-radius: 9px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--ink-soft); font-size: .78rem; font-weight: 750;
  transition: background .15s ease, color .15s ease;
}
.header-login:hover, .header-login[aria-expanded="true"] { background: var(--surface-soft); color: var(--teal-dark); }

/* Login dropdown */
.login-menu { position: relative; }
.login-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 250;
  width: 280px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--dropdown-bg);
  box-shadow: 0 16px 40px var(--dropdown-shadow);
  backdrop-filter: blur(12px);
  animation: dropIn .18s ease both;
  display: grid;
  gap: 12px;
}
.login-dropdown form { display: grid; gap: 10px; }
.login-dropdown label { font-size: .73rem; }
.login-dropdown input { min-height: 36px; font-size: .78rem; }
.login-submit { width: 100%; justify-content: center; min-height: 36px; }
.login-error {
  padding: 8px 10px; border-radius: 8px;
  background: var(--login-error-bg); color: var(--danger);
  font-size: .71rem; font-weight: 600; line-height: 1.4;
}
.login-forgot {
  display: block; text-align: center;
  font-size: .68rem; color: var(--muted);
  transition: color .15s ease;
}
.login-forgot:hover { color: var(--teal-dark); }

/* Account menu / hamburger dropdown */
.nav-avatar-cluster { display: flex; align-items: center; gap: 5px; }
.account-menu { position: relative; }
.account-toggle {
  width: 44px; height: 44px;
  padding: 3px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: transparent; cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 1.5px var(--line-strong);
  transition: box-shadow .15s ease;
}
.account-toggle:hover, .account-toggle[aria-expanded="true"] { background: transparent; box-shadow: 0 0 0 2px var(--teal); }
.account-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.account-toggle::after {
  content: '';
  position: absolute; bottom: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--line-strong);
  transition: border-top-color .15s ease;
}
.account-toggle:hover::after, .account-toggle[aria-expanded="true"]::after { border-top-color: var(--teal); }
.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 250;
  width: 240px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--dropdown-bg);
  box-shadow: 0 16px 40px var(--dropdown-shadow);
  backdrop-filter: blur(12px);
  animation: dropIn .18s ease both;
}
.account-dropdown-user {
  padding: 10px 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  border-radius: 10px 10px 0 0;
  transition: background .15s ease;
}
.account-dropdown-user:hover { background: var(--surface-soft); }
.account-dd-avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%; overflow: hidden;
  color: var(--white); background: linear-gradient(145deg,var(--avatar-bg-start),var(--avatar-bg-end));
  font-size: .76rem; font-weight: 900;
}
img.account-dd-avatar { object-fit: cover; display: block; }
.account-dropdown-user > div { display: grid; min-width: 0; }
.account-dropdown-user strong { font-size: .75rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-dropdown-user small { color: var(--muted); font-size: .62rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-dropdown-nav { display: grid; }
.account-dropdown-nav a {
  padding: 9px 10px;
  display: flex; align-items: center; gap: 9px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: .73rem; font-weight: 700;
  transition: background .15s ease, color .15s ease;
}
.account-dropdown-nav a:hover { background: var(--surface-soft); color: var(--teal-dark); }
.account-dropdown-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--divider); display: grid; }
.account-settings-link {
  padding: 9px 10px;
  display: flex; align-items: center; gap: 9px;
  border-radius: 9px;
  color: var(--ink-soft); background: transparent;
  font-size: .73rem; font-weight: 700;
  transition: background .15s ease, color .15s ease;
}
.account-settings-link:hover { background: var(--surface-soft); color: var(--teal-dark); }
.account-logout-btn {
  width: 100%; padding: 9px 10px;
  display: flex; align-items: center; gap: 9px;
  border: 0; border-radius: 9px;
  color: var(--danger); background: transparent;
  cursor: pointer; font-size: .73rem; font-weight: 700; text-align: left;
  transition: background .15s ease;
}
.account-logout-btn:hover { background: var(--logout-hover-bg); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Account settings stats block */
.settings-stats {
  margin-top: 14px; padding-top: 14px;
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  border-top: 1px solid var(--settings-border); text-align: center;
}
.settings-stats > div { display: grid; gap: 3px; }
.settings-stats strong { font-size: .78rem; }
.settings-stats span { color: var(--muted); font-size: .55rem; text-transform: uppercase; }

/* Nav avatar photo */
.nav-avatar-photo { object-fit: cover; display: block; }

/* ── Site nav (center links) ─────────────────────────────── */
.site-nav { display:flex; align-items:center; gap:2px; flex:1; padding-left:14px; }
.site-nav-link { display:inline-flex; align-items:center; gap:4px; padding:6px 11px; border-radius:8px; font-size:.8rem; font-weight:650; color:var(--ink-soft); text-decoration:none; background:none; border:none; cursor:pointer; white-space:nowrap; transition:background .12s,color .12s; }
.site-nav-link:hover,.site-nav-link.active { color:var(--teal-dark); background:var(--surface-soft); }

/* Categories dropdown */
.site-nav-cat { position:relative; }
.site-nav-cat-menu { display:none; position:absolute; top:calc(100% + 4px); left:0; min-width:180px; background:var(--surface); border:1px solid var(--line-strong); border-radius:12px; padding:5px; box-shadow:0 8px 28px var(--shadow-generic-12); z-index:300; }
.site-nav-cat.open .site-nav-cat-menu { display:block; }
.site-nav-cat-menu a { display:flex; padding:7px 12px; border-radius:8px; font-size:.78rem; font-weight:600; color:var(--ink-soft); text-decoration:none; transition:background .12s,color .12s; }
.site-nav-cat-menu a:hover { color:var(--teal-dark); background:var(--surface-soft); }

/* Nav icon buttons (search, bell) */
.nav-icon-btn { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border:none; border-radius:50%; padding:0; background:transparent; cursor:pointer; color:var(--muted); font-size:1rem; line-height:1; text-decoration:none; transition:background .15s,color .15s; }
.nav-icon-btn:hover { background:var(--surface-soft); color:var(--ink); }

/* Nav search (always-visible pill form) */
.nav-search-wrap { position:relative; display:flex; align-items:center; gap:6px; flex:1; min-width:0; max-width:360px; }
.nav-search-form { display:flex; align-items:center; gap:4px; flex:1; min-width:0; background:var(--surface); border:1px solid var(--line-strong); border-radius:9px; padding:0 8px 0 10px; height:34px; transition:border-color .15s; }
.nav-search-form:focus-within { border-color:var(--teal); box-shadow:0 0 0 2px var(--focus-ring); }
.nav-search-icon { color:var(--muted); font-size:.95rem; line-height:1; flex-shrink:0; }
.nav-search-input { flex:1; min-width:0; border:none; background:transparent; font-size:.78rem; color:var(--ink); outline:none !important; -webkit-tap-highlight-color:transparent; padding:0; -webkit-appearance:none; appearance:none; }
.nav-search-input:focus { border:none; outline:none !important; box-shadow:none; }
.nav-search-input::placeholder { color:var(--muted); }

/* Categories pill inside search row */
.site-nav-cat > .site-nav-link { display:inline-flex; align-items:center; gap:5px; padding:5px 12px; background:var(--surface); border:1px solid var(--line); border-radius:999px; font-size:.73rem; font-weight:600; color:var(--ink); height:34px; white-space:nowrap; transition:border-color .15s,color .15s; }
.site-nav-cat > .site-nav-link:hover, .site-nav-cat > .site-nav-link.active { border-color:var(--teal); color:var(--teal); background:var(--surface); }

/* Filters — icon button inside search box */
.nav-search-filter-btn { display:inline-flex; align-items:center; gap:3px; flex-shrink:0; border:none; background:transparent; cursor:pointer; color:var(--muted); padding:0 0 0 8px; margin-left:4px; border-left:1px solid var(--line); height:20px; transition:color .15s; position:relative; }
.nav-search-filter-btn:hover, .nav-search-filter-btn[aria-expanded="true"] { color:var(--teal); }
.fv-filter-dot { width:5px; height:5px; border-radius:50%; background:var(--teal); flex-shrink:0; position:absolute; top:-2px; right:-2px; }
.fv-filter-panel { display:none; position:absolute; top:calc(100% + 6px); right:0; width:220px; background:var(--surface); border:1px solid var(--line-strong); border-radius:12px; padding:16px; box-shadow:0 8px 24px var(--shadow-generic-12); z-index:300; }
.fv-filter-panel.open { display:block; }
.fv-filter-panel form { display:flex; flex-direction:column; gap:14px; }
.fv-fp-label { display:flex; flex-direction:column; gap:4px; font-size:.72rem; font-weight:700; color:var(--ink-soft); }
.fv-filter-panel select { border:1px solid var(--line); border-radius:7px; padding:6px 8px; font-size:.78rem; color:var(--ink); background:var(--surface); cursor:pointer; width:100%; }
.fv-filter-panel select:focus { outline:2px solid var(--teal); outline-offset:1px; border-color:var(--teal); }
[data-theme="dark"] .fv-filter-panel { background:var(--surface-mid); border-color:var(--line); }
[data-theme="dark"] .fv-filter-panel select { background:var(--surface); border-color:var(--line); color:var(--ink); }

/* Bell relative wrapper */
.nav-bell-wrap { position:relative; display:inline-flex; }

/* Hamburger button (mobile only) */
.nav-hamburger { display:none; flex-direction:column; justify-content:center; align-items:center; gap:5px; width:36px; height:36px; border:none; background:transparent; cursor:pointer; padding:4px; border-radius:8px; transition:background .15s; }
.nav-hamburger:hover { background:var(--surface-soft); }
.nav-hamburger span { display:block; width:18px; height:2px; background:var(--ink); border-radius:2px; transition:transform .2s,opacity .2s; }
.nav-hamburger.open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity:0; }
.nav-hamburger.open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* Mobile nav menu panel */
.nav-mobile-menu { display:none; position:absolute; top:100%; left:0; right:0; z-index:400; background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:10px 16px 16px; box-shadow:0 8px 24px var(--shadow-generic-12); }
.nav-mobile-menu.open { display:block; }
.nav-mobile-link { display:block; padding:10px 2px; font-size:.88rem; font-weight:650; color:var(--ink-soft); text-decoration:none; border-bottom:1px solid var(--line); }
.nav-mobile-link:last-child { border-bottom:none; }
.nav-mobile-link:hover,.nav-mobile-link.active { color:var(--teal-dark); }
.nav-mobile-actions { display:flex; gap:8px; padding-top:12px; }
.nav-mobile-actions .button { flex:1; justify-content:center; min-height:38px; }

@media (max-width: 680px) {
  .site-nav { display:none; }
  .nav-search-wrap,.nav-bell-wrap { display:none; }
}
@media (max-width: 480px) {
  .site-header { position:relative; }
  .nav-hamburger { display:flex; }
  .header-login, .header-right > .button { display:none; }
}

/* Profile photo on account settings card */
.settings-avatar-photo {
  width: 76px; height: 76px;
  border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 6px;
}

/* Avatar upload button */
.avatar-upload-btn {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: .64rem;
  font-weight: 800;
  transition: border-color .15s ease, color .15s ease;
}
.avatar-upload-btn:hover { border-color: var(--teal); color: var(--teal-dark); }

@media (max-width: 860px) {
  .settings-avatar-photo { margin: 0; }
}

/* Vote buttons */
.trend-actions { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 6px; }
.vote-btn, .quickview-btn {
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.vote-btn:hover, .quickview-btn:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-soft); }
.vote-btn.voted { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-soft); }
.vote-btn-detail { font-size: .82rem; padding: 8px 14px; border-radius: 10px; }
.vote-tally { color: var(--muted); font-size: .66rem; font-weight: 800; }

/* Quick-view modal */
.quick-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}
.quick-modal-overlay { position: absolute; inset: 0; background: var(--dark-overlay-ink-52); backdrop-filter: blur(4px); }
.quick-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px,100%);
  padding: 26px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 28px 64px var(--dark-overlay-ink-18);
  animation: quickModalIn .2s ease both;
}
.quick-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.quick-modal-header > div { display: grid; gap: 3px; }
.quick-modal-header h2 { margin: 4px 0 0; font-size: 1.35rem; }
.quick-modal-header small { color: var(--muted); font-size: .65rem; }
.quick-modal-card p { margin: 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.55; }
.quick-modal-card p.muted { color: var(--muted); font-size: .72rem; }
.quick-modal-close {
  width: 32px; height: 32px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); background: var(--quick-modal-close-bg);
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.quick-modal-close:hover { color: var(--ink); border-color: var(--ink-soft); }
@keyframes quickModalIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* Creator line as link */
.creator-line-link { text-decoration: none; color: inherit; border-radius: 9px; transition: background .15s ease; }
.creator-line-link:hover { background: var(--surface-soft); }

/* Public profile page */
.profile-pub-header {
  display: flex; align-items: center; gap: 22px;
  padding: 28px; margin-bottom: 22px;
}
.profile-pub-avatar {
  width: 88px; height: 88px; flex: 0 0 88px;
  border-radius: 50%; object-fit: cover; display: block;
}
.profile-pub-monogram {
  width: 88px; height: 88px; flex: 0 0 88px;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--white); background: linear-gradient(145deg, var(--avatar-bg-start), var(--avatar-bg-end));
  font-size: 2rem; font-weight: 900;
}
.profile-pub-info { min-width: 0; }
.profile-pub-info h1 { margin: 0 0 5px; font-size: clamp(1.3rem, 2.8vw, 1.8rem); }
.profile-pub-info p { margin: 0 0 10px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.profile-pub-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .65rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.profile-pub-section-title { margin: 0 0 14px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.profile-pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.profile-pub-card { display: grid; gap: 0; overflow: hidden; padding: 0; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.profile-pub-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow-ink-1); }
.profile-pub-thumb {
  height: 110px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(145deg, var(--project-accent, var(--teal)), var(--gradient-dark-3));
  background-size: cover; background-position: center;
}
.profile-pub-thumb img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--surface-white-9); }
.profile-pub-thumb > span { color: var(--white); font-size: 1.4rem; font-weight: 950; }
.profile-pub-card-info { padding: 12px 14px; display: grid; gap: 4px; }
.profile-pub-card-info strong { font-size: .82rem; }
.profile-pub-card-info small { color: var(--muted); font-size: .67rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.profile-pub-handle { margin: 0 0 6px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.profile-pub-actions { margin-top: 14px; }
/* Clickable avatar wrapper (own profile) */
.profile-pub-avatar-wrap {
  position: relative; display: block; flex: 0 0 88px; width: 88px; height: 88px;
  border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
}
.profile-pub-avatar-wrap .profile-pub-avatar,
.profile-pub-avatar-wrap .profile-pub-monogram { flex: none; }
.profile-pub-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--dark-overlay-ink-52); color: var(--white);
  font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  display: grid; place-items: center; opacity: 0; transition: opacity .18s ease;
}
.profile-pub-avatar-wrap:hover .profile-pub-avatar-overlay,
.profile-pub-avatar-wrap:focus-visible .profile-pub-avatar-overlay { opacity: 1; }
/* Edit profile dialog */
.edit-profile-dialog {
  width: min(460px, calc(100vw - 32px)); border: 0; border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 24px 64px var(--dark-overlay-ink-22);
  padding: 0;
}
.edit-profile-dialog::backdrop { background: var(--dark-overlay-ink-48); backdrop-filter: blur(4px); }
.dialog-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
}
.dialog-header h2 { margin: 0; font-size: 1.05rem; }
.dialog-close {
  border: 1px solid var(--line); background: none; border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; color: var(--muted); font-size: .8rem;
  display: grid; place-items: center; transition: color .15s, border-color .15s;
}
.dialog-close:hover { color: var(--ink); border-color: var(--ink-soft); }
.dialog-body { padding: 20px 24px; display: grid; gap: 16px; }
.dialog-footer { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .profile-pub-header { flex-direction: column; text-align: center; gap: 14px; }
  .profile-pub-meta { justify-content: center; }
  .profile-pub-actions { display: flex; justify-content: center; }
  .profile-pub-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* Admin panel */
.admin-table-wrap { overflow-x: auto; padding-bottom: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.admin-table th { padding: 11px 20px; text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.admin-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--surface-soft); }
.admin-row-suspended td { opacity: .6; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-btn { padding: 5px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: .73rem; font-weight: 600; transition: background .12s, border-color .12s; }
.admin-btn:hover { background: var(--surface-soft); }
.admin-btn-danger { color: var(--danger); border-color: var(--admin-danger-border); }
.admin-btn-danger:hover { background: var(--admin-danger-hover-bg); }
.admin-btn-orange { color: var(--admin-orange-color); border-color: var(--status-draft-border); }
.admin-btn-orange:hover { background: var(--surface-orange); }
.admin-btn-green { color: var(--admin-green-color); border-color: var(--status-live-border); }
.admin-btn-green:hover { background: var(--status-live-bg); }
.admin-btn-blue { color: var(--blue); border-color: var(--admin-blue-border); }
.admin-btn-blue:hover { background: var(--surface-blue); }
.admin-badge { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: .68rem; font-weight: 700; border: 1px solid transparent; }
.admin-badge-admin { background: var(--surface-purple); color: var(--purple); border-color: var(--admin-badge-purple-border); }
.admin-badge-you { background: var(--surface-teal); color: var(--teal-dark); border-color: var(--admin-badge-teal-border); }
.admin-badge-active { background: var(--status-live-bg); color: var(--admin-green-color); border-color: var(--status-live-border); }
.admin-badge-suspended { background: var(--admin-danger-hover-bg); color: var(--danger); border-color: var(--admin-danger-border); }
.admin-msg { padding: 12px 14px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--admin-msg-border); border-radius: 11px; background: var(--admin-msg-bg); box-shadow: var(--shadow-hover); animation: flashIn .28s ease both; }
.admin-msg-dismiss { margin-left: 4px; padding: 0 5px; background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--muted); flex: 0 0 auto; }
.admin-msg-dismiss:hover { color: var(--ink); }

/* ─── Theme toggle button ─────────────────────────────────── */
.theme-toggle {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0;
  background: transparent; cursor: pointer;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.theme-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.theme-icon { display: block; }
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }

/* ─── Dark theme variable overrides ──────────────────────── */
[data-theme="dark"] {
  --ink: #e0e0e0;
  --ink-soft: #aaaaaa;
  --muted: #999999;
  --muted-2: #555555;
  --page: #0a0a0a;
  --page-top: #111111;
  --surface: #1a1a1a;
  --surface-soft: #222222;
  --surface-teal: #130050;
  --surface-blue: #002830;
  --surface-orange: #1a1a00;
  --surface-purple: #1a0033;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --teal: #7b3fff;
  --teal-dark: #9a70ff;
  --teal-soft: #130050;
  --focus-ring: #c090ff;
  --danger: #ff3370;
  --shadow: 0 14px 38px rgba(0,0,0,.45);
  --shadow-hover: 0 20px 50px rgba(0,0,0,.6);
  --header-bg: rgba(10,10,10,.93);
  --header-border: rgba(42,42,42,.9);
  --input-bg: #111111;
  --surface-mid: #181818;
  --divider: #2a2a2a;
  --dropdown-bg: rgba(18,18,18,.99);
  --shadow-dark-3: rgba(0,0,0,.3);
  --dark-auth-visual-start: #0d0d0d;
  --dark-auth-visual-end: #1a1a1a;
  --dark-auth-accent-1: rgba(98,0,255,.3);
  --dark-auth-accent-2: rgba(191,0,255,.25);
  --dark-auth-card-bg-9: rgba(20,20,20,.9);
  --dark-auth-card-border-9: rgba(42,42,42,.9);
  --dark-auth-card-bg-85: rgba(20,20,20,.85);
  --dark-auth-card-border-85: rgba(42,42,42,.85);
  --dark-logout-hover-bg: rgba(255,0,85,.12);
  --dark-login-error-bg: rgba(255,0,85,.15);
  --dark-publish-bar-bg: rgba(10,10,10,.95);
  --dark-danger-card-bg: rgba(255,0,85,.07);
  --dark-admin-msg-bg: rgba(26,26,0,.97);
  --dark-admin-msg-border: #3a3a00;
  --dark-danger-card-border: #3a0020;
  --dark-dark-body-overlay: rgba(0,0,0,.45);
}

/* Body */
[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% -8%, var(--dark-dark-body-overlay), transparent 34rem),
    linear-gradient(180deg, var(--page-top), var(--page) 33rem);
}
[data-theme="dark"] body::before { opacity: .06; }

/* Cards and surfaces */
[data-theme="dark"] .bento-card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .metric-strip > div { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .card-heading { border-bottom-color: var(--divider); }
[data-theme="dark"] .quick-links-card { background: var(--surface); }
[data-theme="dark"] .quick-links-card a { border-bottom-color: var(--divider); }

/* Feed */
[data-theme="dark"] .feed-filter { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .feed-filter input,
[data-theme="dark"] .feed-filter select { background: var(--surface-mid); color: var(--ink); }
[data-theme="dark"] .trend-card { background: var(--surface-mid); border-color: transparent; border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
[data-theme="dark"] .trend-card:hover { border-color: rgba(255,255,255,.22); box-shadow: 0 10px 24px var(--shadow-dark-3); }
[data-theme="dark"] .creator-card { background: var(--surface-mid); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
[data-theme="dark"] .pulse-grid div { background: var(--surface-mid); border-color: var(--line); }
[data-theme="dark"] .fresh-row { border-bottom-color: var(--divider); }
[data-theme="dark"] .funding-item { border-bottom-color: var(--divider); }
[data-theme="dark"] .fv-newsletter { background: var(--surface); border-color: var(--line); }

/* Inputs */
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--muted-2); }
[data-theme="dark"] input:disabled { background: var(--surface-soft); color: var(--muted); }
[data-theme="dark"] .money-input span { background: var(--surface-soft); }

/* Buttons */
[data-theme="dark"] .button-secondary { background: var(--surface-soft) !important; border-color: var(--line-strong) !important; }
[data-theme="dark"] .button-secondary:hover { background: var(--surface-mid) !important; }
[data-theme="dark"] .vote-btn, [data-theme="dark"] .quickview-btn { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .vote-btn:hover, [data-theme="dark"] .quickview-btn:hover { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark); }
[data-theme="dark"] .vote-btn.voted { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark); }
[data-theme="dark"] .avatar-upload-btn { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .danger-button { background: var(--surface); border-color: var(--dark-danger-card-border); color: var(--danger); }

/* Header dropdowns */
[data-theme="dark"] .header-login { color: var(--ink-soft); }
[data-theme="dark"] .header-login:hover { background: var(--surface-soft); }
[data-theme="dark"] .account-toggle:hover,
[data-theme="dark"] .account-toggle[aria-expanded="true"] { background: transparent; box-shadow: 0 0 0 2px var(--teal); }
[data-theme="dark"] .account-dropdown-user { border-bottom-color: var(--divider); }
[data-theme="dark"] .account-dropdown-user:hover { background: var(--surface-soft); }
[data-theme="dark"] .account-dropdown-nav a:hover { background: var(--surface-soft); }
[data-theme="dark"] .account-settings-link:hover { background: var(--surface-soft); }
[data-theme="dark"] .account-dropdown-foot { border-top-color: var(--divider); }
[data-theme="dark"] .account-logout-btn:hover { background: var(--dark-logout-hover-bg); }
[data-theme="dark"] .login-error { background: var(--dark-login-error-bg); }

/* Flash notifications */
[data-theme="dark"] .flash { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
[data-theme="dark"] .admin-msg { background: var(--dark-admin-msg-bg); border-color: var(--dark-admin-msg-border); }

/* Footer */
[data-theme="dark"] .site-footer { border-top-color: var(--line); }

/* Dashboard */
[data-theme="dark"] .portfolio-card { background: var(--surface-mid); border-color: var(--line); }
[data-theme="dark"] .portfolio-stats span { background: var(--surface-soft); }
[data-theme="dark"] .portfolio-actions { border-top-color: var(--divider); }
[data-theme="dark"] .activity-list article { border-bottom-color: var(--divider); }
[data-theme="dark"] .activity-note { background: var(--surface-soft); color: var(--muted); }

/* Settings */
[data-theme="dark"] .settings-mini-meta { border-top-color: var(--divider); }
[data-theme="dark"] .settings-stats { border-top-color: var(--divider); }

/* Editor */
[data-theme="dark"] .editor-section-body { background: var(--surface-soft); border-top-color: var(--divider); }
[data-theme="dark"] .color-grid label { background: var(--surface-soft); border-color: var(--line); }
[data-theme="dark"] .funding-toggle-card { background: var(--surface-soft); border-color: var(--line); }
[data-theme="dark"] .funding-fields { background: var(--surface-soft); border-color: var(--line); border-style: dashed; }
[data-theme="dark"] .custom-section-fields { border-bottom-color: var(--divider); }
[data-theme="dark"] .publish-bar { background: var(--dark-publish-bar-bg); border-color: var(--line); }
[data-theme="dark"] .danger-card { background: var(--dark-danger-card-bg); border-color: var(--dark-danger-card-border); }
[data-theme="dark"] .danger-card strong { color: var(--danger); }

/* Project detail */
[data-theme="dark"] .owner-bar { background: var(--surface); border-bottom-color: var(--line); }
[data-theme="dark"] .funding-split span { background: var(--surface-soft); }
[data-theme="dark"] .owner-notice { background: var(--surface-soft); }
[data-theme="dark"] .mini-progress { background: var(--line); }
[data-theme="dark"] .project-progress { background: var(--line); }
[data-theme="dark"] .project-quick-facts div { border-bottom-color: var(--divider); }
[data-theme="dark"] .project-link-strip a { border-bottom-color: var(--divider); }

/* Quick-view modal */
[data-theme="dark"] .quick-modal-card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .quick-modal-overlay { background: var(--shadow-generic-72); }
[data-theme="dark"] .quick-modal-close { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }

/* Auth page */
[data-theme="dark"] .auth-visual {
  background:
    radial-gradient(circle at 83% 16%, var(--dark-auth-accent-1), transparent 15rem),
    radial-gradient(circle at 18% 82%, var(--dark-auth-accent-2), transparent 16rem),
    linear-gradient(145deg, var(--dark-auth-visual-start), var(--dark-auth-visual-end));
}
[data-theme="dark"] .auth-mini-card { background: var(--dark-auth-card-bg-9); border-color: var(--dark-auth-card-border-9); }
[data-theme="dark"] .auth-mini-grid > div { background: var(--dark-auth-card-bg-85); border-color: var(--dark-auth-card-border-85); }

/* Pitch page */
[data-theme="dark"] .pitch-output pre { background: var(--surface-soft); color: var(--ink-soft); }
[data-theme="dark"] .pitch-output-toolbar { background: var(--surface-mid); border-bottom-color: var(--divider); }
[data-theme="dark"] .pitch-checklist span { background: var(--surface-soft); border-color: var(--line); }
[data-theme="dark"] .pitch-checklist span.complete { background: var(--surface-soft); border-color: var(--line); color: var(--teal-dark); }

/* Profile edit dialog */
[data-theme="dark"] .edit-profile-dialog { background: var(--surface); }
[data-theme="dark"] .dialog-header { border-bottom-color: var(--divider); }
[data-theme="dark"] .dialog-footer { border-top-color: var(--divider); }
[data-theme="dark"] .dialog-close { background: var(--surface-soft); border-color: var(--line); }
