:root {
  --bg-ink: #09121f;
  --bg-deep: #101d31;
  --panel: rgba(13, 23, 40, 0.76);
  --panel-strong: rgba(9, 18, 31, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eff4ff;
  --muted: #91a3bf;
  --accent: #ff8642;
  --accent-soft: rgba(255, 134, 66, 0.16);
  --teal: #41d5c8;
  --rose: #ff6e8f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --serif: "Georgia", "Palatino Linotype", serif;
  --sans: "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
  --shell-padding: 1.4rem;
  --layout-left: 280px;
  --layout-right: 320px;
  --topbar-surface: rgba(9, 18, 31, 0.72);
  --ambient-one-color: rgba(255, 134, 66, 0.38);
  --ambient-two-color: rgba(65, 213, 200, 0.22);
  --ambient-three-color: rgba(255, 110, 143, 0.18);
}

:root[data-theme="paper"] {
  --bg-ink: #edf3fb;
  --bg-deep: #f9fbff;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --text: #142033;
  --muted: #607086;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --teal: #0f766e;
  --rose: #ea580c;
  --shadow: 0 24px 70px rgba(30, 41, 59, 0.12);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --topbar-surface: rgba(255, 255, 255, 0.82);
  --ambient-one-color: rgba(37, 99, 235, 0.16);
  --ambient-two-color: rgba(14, 165, 233, 0.14);
  --ambient-three-color: rgba(249, 115, 22, 0.12);
}

:root[data-theme="graphite"] {
  --bg-ink: #101722;
  --bg-deep: #192331;
  --panel: rgba(18, 26, 38, 0.84);
  --panel-strong: rgba(15, 22, 34, 0.96);
  --text: #f6f8fb;
  --muted: #97a5b6;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --teal: #38bdf8;
  --rose: #7c3aed;
  --shell-padding: 1rem;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 12px;
  --topbar-surface: rgba(16, 23, 34, 0.88);
  --ambient-one-color: rgba(79, 140, 255, 0.24);
  --ambient-two-color: rgba(56, 189, 248, 0.14);
  --ambient-three-color: rgba(124, 58, 237, 0.14);
}

:root[data-theme="sunset"] {
  --bg-ink: #1b1323;
  --bg-deep: #3a1e2c;
  --panel: rgba(39, 18, 32, 0.7);
  --panel-strong: rgba(32, 15, 28, 0.92);
  --line: rgba(255, 232, 226, 0.12);
  --line-strong: rgba(255, 232, 226, 0.2);
  --text: #fff5ef;
  --muted: #e8bdb3;
  --accent: #fb7185;
  --accent-soft: rgba(251, 113, 133, 0.18);
  --teal: #f59e0b;
  --rose: #f97316;
  --layout-left: 260px;
  --layout-right: 340px;
  --topbar-surface: rgba(40, 18, 32, 0.76);
  --ambient-one-color: rgba(249, 115, 22, 0.34);
  --ambient-two-color: rgba(251, 113, 133, 0.22);
  --ambient-three-color: rgba(245, 158, 11, 0.14);
}

:root[data-theme="forest"] {
  --bg-ink: #071913;
  --bg-deep: #0b3023;
  --panel: rgba(8, 31, 24, 0.78);
  --panel-strong: rgba(8, 24, 19, 0.94);
  --line: rgba(215, 255, 239, 0.1);
  --line-strong: rgba(215, 255, 239, 0.18);
  --text: #effdf6;
  --muted: #98c8b2;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --teal: #14b8a6;
  --rose: #84cc16;
  --layout-left: 300px;
  --layout-right: 300px;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --topbar-surface: rgba(8, 24, 19, 0.78);
  --ambient-one-color: rgba(34, 197, 94, 0.22);
  --ambient-two-color: rgba(20, 184, 166, 0.16);
  --ambient-three-color: rgba(132, 204, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 26%, transparent), transparent 28%),
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--teal) 18%, transparent), transparent 24%),
    linear-gradient(155deg, var(--bg-ink) 0%, var(--bg-deep) 44%, color-mix(in srgb, var(--bg-ink) 65%, black) 100%);
  overflow-x: hidden;
  background-attachment: fixed;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
  pointer-events: none;
}

.ambient-one {
  top: -8rem;
  left: -5rem;
  background: var(--ambient-one-color);
}

.ambient-two {
  top: 10rem;
  right: -7rem;
  background: var(--ambient-two-color);
}

.ambient-three {
  bottom: -8rem;
  left: 38%;
  background: var(--ambient-three-color);
}

#app {
  position: relative;
  z-index: 1;
}

.panel,
.preview-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.shell {
  padding: var(--shell-padding);
  max-width: 1680px;
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--topbar-surface);
  backdrop-filter: blur(18px);
  border-radius: 999px;
  position: sticky;
  top: 0.8rem;
  z-index: 30;
}

.brand,
.identity,
.ghost-button,
.thread-row,
.contact-chip {
  border: 0;
  background: transparent;
  color: inherit;
}

.brand,
.identity,
.thread-row,
.contact-chip {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  padding: 0.2rem 0.3rem;
  min-width: 0;
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.brand small {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: white;
  font-weight: 800;
  font-size: 1.35rem;
}

.topnav,
.topbar-center,
.nav-stack,
.topbar-right,
.hero-stats,
.post-actions,
.job-actions,
.community-actions,
.chip-row,
.composer-row,
.feed-switch,
.group-meta,
.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.topbar-center {
  justify-content: center;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(0, auto) minmax(0, auto);
  align-items: center;
  gap: 0.8rem;
}

.topbar-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

.topbar-search button {
  padding: 0.82rem 1rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: white;
  font-weight: 700;
}

.nav-pill,
.action-pill,
.ghost-button,
.primary-button,
.mini-action,
.theme-pill {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 0.72rem 1rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-pill:hover,
.action-pill:hover,
.ghost-button:hover,
.primary-button:hover,
.mini-action:hover,
.theme-pill:hover,
.thread-row:hover,
.contact-chip:hover,
.identity:hover {
  transform: translateY(-1px);
}

.nav-pill-active,
.action-pill-active,
.mini-action,
.primary-button,
.theme-pill-active {
  border-color: rgba(255, 134, 66, 0.45);
  background: linear-gradient(135deg, rgba(255, 134, 66, 0.2), rgba(255, 110, 143, 0.14));
}

.theme-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.theme-pill {
  padding: 0.48rem 0.72rem;
  font-size: 0.78rem;
  min-width: 0;
}

.mini-actions,
.action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mini-actions {
  justify-content: flex-end;
}

.action-cluster .primary-button,
.action-cluster .action-pill {
  width: auto;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.ghost-button-wide,
.action-pill-wide,
.primary-button {
  justify-content: center;
  width: 100%;
}

.layout {
  display: grid;
  grid-template-columns: var(--layout-left) minmax(0, 1fr) var(--layout-right);
  gap: 1.15rem;
  align-items: start;
}

.rail,
.main-column {
  display: grid;
  gap: 1rem;
}

.main-column {
  min-width: 0;
}

.profile-card,
.quick-panel,
.rail-panel,
.hero,
.composer,
.group-hero,
.section-head,
.job-card,
.post-card,
.community-card,
.conversation,
.thread-list,
.profile-grid {
  padding: 1.1rem;
}

.profile-card {
  overflow: hidden;
}

.cover-swatch {
  height: 4.5rem;
  border-radius: 1rem;
  margin-bottom: -1.4rem;
}

.profile-card .avatar {
  position: relative;
}

.profile-card-copy p,
.job-summary,
.hero-subtitle,
.auth-hero p,
.mini-card small,
.notice small,
.bubble small,
.empty-state p,
.profile-copy p,
.section-copy,
.composer-copy small,
.post-metrics,
.profile-list-item small,
.rail-job small {
  color: var(--muted);
}

.profile-card-copy {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.28rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-strip div,
.hero-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
}

.stat-strip strong,
.hero-stats strong {
  display: block;
  font-size: 1.15rem;
}

.stat-strip span,
.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.73rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.35rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--panel);
}

.hero-copy {
  display: grid;
  gap: 0.8rem;
}

.hero-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero h1,
.profile-hero h1,
.auth-hero h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.composer textarea,
.inline-form input,
.auth-form input,
.profile-form input,
.profile-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
}

.composer form {
  display: grid;
  gap: 0.9rem;
}

.composer-row > input {
  flex: 1 1 0;
  min-width: 0;
}

.composer-row > .primary-button {
  flex: 0 0 180px;
  width: auto;
}

.composer textarea,
.profile-form textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.inline-form,
.auth-form,
.profile-form {
  display: grid;
  gap: 0.75rem;
}

.composer-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.composer-copy {
  display: grid;
  gap: 0.15rem;
}

.stack,
.compact-stack,
.preview-stack,
.bubble-stack {
  display: grid;
  gap: 0.95rem;
}

.compact-stack {
  gap: 0.65rem;
}

.mini-card,
.notice,
.comment-row,
.space-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-card,
.notice {
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.mini-card .identity {
  min-width: 0;
  flex: 1 1 auto;
}

.identity span,
.thread-row span {
  display: grid;
  gap: 0.15rem;
  text-align: left;
}

.identity-copy {
  min-width: 0;
}

.identity strong,
.thread-row strong,
.mini-card strong,
.conversation-head strong {
  font-size: 0.96rem;
}

.identity small,
.thread-row small {
  color: var(--muted);
}

.mini-action {
  padding-inline: 0.9rem;
}

.mini-action-muted {
  opacity: 0.82;
}

.mini-action-strong {
  border-color: rgba(255, 134, 66, 0.45);
  background: linear-gradient(135deg, rgba(255, 134, 66, 0.2), rgba(255, 110, 143, 0.14));
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.85rem;
}

.chip-soft {
  background: var(--accent-soft);
}

.search-panel {
  display: grid;
  gap: 1rem;
}

.search-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.search-group {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.search-group h3 {
  margin: 0;
}

.post-copy {
  font-size: 1rem;
  line-height: 1.65;
  margin: 0.8rem 0 0.95rem;
}

.quoted-post {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.quoted-post-compact {
  margin-top: -0.1rem;
}

.quoted-post-copy {
  color: var(--text);
  line-height: 1.6;
}

.post-card {
  display: grid;
  gap: 0.9rem;
}

.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.post-more {
  white-space: nowrap;
}

.post-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding-top: 0.1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.post-image-shell {
  overflow: hidden;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
}

.post-image {
  width: 100%;
  display: block;
}

.comment-row {
  align-items: flex-start;
  padding-top: 0.15rem;
}

.comment-row p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.job-head,
.event-head,
.job-footer,
.rail-head,
.thread-head,
.profile-hero-top,
.conversation-head {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
}

.job-card h3,
.event-card h3,
.section-head h2,
.thread-head h2,
.rail-head h3,
.empty-state h3 {
  margin: 0;
}

.section-head {
  display: grid;
  gap: 0.35rem;
}

.section-copy {
  margin: 0;
  max-width: 62ch;
}

.job-type,
.job-meta,
.meta-line {
  color: var(--muted);
}

.event-card {
  display: grid;
  gap: 0.9rem;
}

.event-meta-row,
.attendee-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.community-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.65rem;
}

.community-card h3,
.community-card p {
  margin: 0 0 0.45rem;
}

.community-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.community-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.community-card-active {
  border-color: color-mix(in srgb, var(--group-accent, var(--accent)) 54%, var(--line));
  box-shadow: 0 24px 80px color-mix(in srgb, var(--group-accent, var(--accent)) 18%, transparent);
}

.community-actions {
  margin-top: 0.25rem;
}

.group-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.group-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--group-accent, var(--accent)) 32%, transparent), transparent 36%),
    linear-gradient(135deg, color-mix(in srgb, var(--group-accent, var(--accent)) 15%, transparent), transparent 52%);
  opacity: 0.95;
  pointer-events: none;
}

.group-hero > * {
  position: relative;
  z-index: 1;
}

.group-hero h2,
.group-hero p {
  margin: 0.25rem 0 0;
}

.group-meta {
  margin-top: 0.9rem;
}

.space-button {
  width: 100%;
  color: inherit;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.55rem;
}

.space-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.request-card,
.request-rail-card {
  display: grid;
  gap: 0.8rem;
}

.request-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.request-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.message-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
}

.thread-list,
.conversation {
  min-height: 70vh;
}

.thread-row {
  width: 100%;
  padding: 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-align: left;
}

.thread-row-active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.8rem 0 1rem;
}

.contact-chip {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.composer-quote {
  margin-top: 0.9rem;
}

.bubble-stack {
  padding: 1rem 0;
}

.bubble {
  max-width: 78%;
  padding: 0.85rem 1rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.bubble p {
  margin: 0 0 0.35rem;
}

.bubble-mine {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(255, 134, 66, 0.2), rgba(65, 213, 200, 0.12));
  border-radius: 1.1rem 1.1rem 0.35rem 1.1rem;
}

.inline-form {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.comment-stack .inline-form {
  grid-template-columns: auto 1fr auto;
}


.inline-form button {
  border: 0;
  border-radius: 999px;
  padding: 0.82rem 1rem;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: white;
}

.inline-form-wide {
  margin-top: auto;
}

.empty-state,
.empty-card {
  display: grid;
  place-items: center;
  min-height: 14rem;
  text-align: center;
}

.empty-card-plain {
  min-height: 8rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: transparent;
}

.profile-hero {
  overflow: hidden;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
}

.profile-copy {
  display: grid;
  gap: 1rem;
}

.profile-section {
  display: grid;
  gap: 0.55rem;
}

.profile-section h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-list {
  display: grid;
  gap: 0.7rem;
}

.profile-list-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.rail-left,
.rail {
  position: sticky;
  top: 6.8rem;
}

.profile-form textarea {
  min-height: 6.5rem;
}

.profile-form textarea[name="experience"],
.profile-form textarea[name="education"] {
  min-height: 8rem;
}

.request-rail-stack {
  margin-bottom: 1rem;
}

.request-rail-card {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.request-rail-card strong,
.request-rail-card small {
  display: block;
}

.request-rail-card small {
  color: var(--muted);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(380px, 30vw, 440px);
  gap: clamp(1rem, 2vw, 2rem);
  padding: clamp(0.8rem, 1.6vw, 1.6rem);
  align-items: center;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(2, 18, 51, 0.88) 0%, rgba(2, 18, 51, 0.66) 45%, rgba(17, 20, 45, 0.52) 100%),
    url("public/image/connectlogin.png") center / cover no-repeat;
  overflow: hidden;
}

.auth-landing {
  min-height: calc(100vh - clamp(1.6rem, 3.2vw, 3.2rem));
  display: grid;
  align-content: center;
  gap: clamp(1.2rem, 2.4vw, 2.4rem);
  padding: clamp(0.9rem, 1.8vw, 1.8rem);
  text-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  max-width: 720px;
}

.auth-marketing p,
.auth-safe-note p {
  margin: 0;
}

.auth-marketing {
  display: grid;
  gap: 0.8rem;
  max-width: 36rem;
}

.auth-marketing-title {
  margin: 0;
  display: grid;
  gap: 0.1rem;
  font-family: var(--sans);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.auth-marketing-title span {
  background: linear-gradient(90deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-marketing-tagline {
  margin: 0.2rem 0 0;
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
  line-height: 1.25;
  font-weight: 700;
  color: #5fb4ff;
}

.auth-marketing-tagline br + * { color: #ffffff; }

.auth-marketing-copy {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  max-width: 30rem;
}

.auth-marketing-copy strong {
  color: #5fb4ff;
  font-weight: 700;
}

.auth-safe-badge {
  margin-top: 0.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  max-width: 30rem;
}

.auth-safe-shield {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(99,102,241,0.28);
  color: #c7d2fe;
  display: grid;
  place-items: center;
}

.auth-safe-badge p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
}

.auth-safe-strong {
  color: #c7d2fe;
  font-weight: 700;
}

.auth-marketing h1 {
  margin: 0;
  display: grid;
  gap: 0.1rem;
  font-family: var(--sans);
  font-size: clamp(2.85rem, 4.7vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.auth-marketing h1 span:last-child {
  background: linear-gradient(90deg, #2f8cff 0%, #965cff 68%, #c65cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-marketing p {
  max-width: 31rem;
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.45;
  font-weight: 500;
}

.auth-feature-row {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  gap: 0.85rem 1.4rem;
  margin-top: 0;
  justify-content: start;
}

.auth-feature-img {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-feature-img img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.32));
  transition: transform 0.18s ease;
}

.auth-feature-img img:hover {
  transform: translateY(-3px) scale(1.05);
}

.auth-safe-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0;
}

.auth-safe-note strong {
  display: inline-block;
  margin-bottom: 0.15rem;
}

.auth-shield {
  width: 3rem;
  height: 3.3rem;
  display: grid;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 1.15rem 1.15rem 1.45rem 1.45rem;
  color: transparent;
  position: relative;
}

.auth-shield::after {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  border-right: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(45deg) translateY(-0.15rem);
}

.auth-card {
  min-height: min(640px, calc(100vh - 3.2rem));
  max-height: calc(100vh - 2rem);
  align-self: center;
  position: relative;
  overflow: hidden auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: #071126;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.5rem;
  box-shadow: 0 34px 90px rgba(2, 8, 23, 0.32);
}

.auth-language {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0.9rem 1.4rem 0;
  color: #071126;
  font-size: 0.9rem;
}

.auth-language svg { color: #23324d; }
.auth-language strong { font-weight: 700; }

.auth-language span:first-child {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border: 2px solid #23324d;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 900;
}

.auth-card-body {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 1rem 1.6rem 1.3rem;
}

.auth-card-logo-wrap {
  display: flex;
  justify-content: center;
}

.auth-card-logo {
  width: min(220px, 60%);
  max-height: 64px;
  object-fit: contain;
}

.auth-heading {
  padding-left: 0;
  text-align: center;
}

.auth-heading h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #071126;
}

.auth-heading p {
  margin: 0.55rem 0 0;
  color: #47546b;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  font-weight: 500;
}

.auth-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

.auth-social-stack,
.auth-form {
  display: grid;
  gap: 0.7rem;
}

.social-button {
  min-height: 2.7rem;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid #d9dee8;
  color: #080f20;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
}

.social-button span {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 1.05rem;
  font-weight: 900;
}

.social-google {
  color: #2563eb;
}

.social-facebook {
  color: #1877f2;
  font-family: Georgia, serif;
}

.social-linkedin {
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 0.18rem;
  background: #0a66c2;
  color: #ffffff;
  font-size: 1rem !important;
  letter-spacing: -0.08em;
}

.social-apple {
  color: #050505;
}

.auth-divider {
  min-height: 2.4rem;
  display: grid;
  place-items: center;
  position: relative;
  color: #172033;
  font-weight: 800;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: auto 0;
  height: 1px;
  width: 100%;
  background: #d8deea;
}

.auth-divider span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0 0.85rem;
  height: 1.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid #d8deea;
  background: #ffffff;
  color: #5a6a85;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  color: #111a2e;
  font-weight: 700;
  font-size: 0.85rem;
}

.auth-form input {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid #dce2ee;
  border-radius: 0.55rem;
  background: #ffffff;
  color: #071126;
  padding: 0 0.85rem;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.auth-form input::placeholder {
  color: #7b879d;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #dce2ee;
  border-radius: 0.55rem;
  background: #ffffff;
}

.password-field input {
  min-height: 2.7rem;
  border: 0;
  box-shadow: none;
}

.password-field button {
  border: 0;
  background: transparent;
  color: #42506a;
  padding: 0 1rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #42506a;
  font-size: 0.9rem;
}

.remember-row {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 0.55rem !important;
  font-weight: 500 !important;
}

.remember-row input {
  min-height: 0;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
}

.auth-options button,
.auth-switch-copy button,
.demo-login-link {
  border: 0;
  background: transparent;
  color: #1267ff;
  font-weight: 700;
}

.login-gradient-button {
  min-height: 2.8rem;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(100deg, #1665ff 0%, #6b37f4 52%, #9831e5 100%);
  box-shadow: 0 12px 24px rgba(65, 72, 235, 0.26);
  font-size: 0.95rem;
  font-weight: 800;
}

.auth-switch-copy {
  margin: -0.3rem 0 0;
  text-align: center;
  color: #536178;
  font-size: 0.9rem;
}

.demo-login-link {
  margin-top: -0.65rem;
  justify-self: center;
}

.auth-card-footer {
  min-height: 4.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-top: 1px solid #e0e5ef;
  color: #4d5a72;
  font-size: 0.72rem;
}

.auth-card-footer span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-card-footer span + span {
  border-left: 1px solid #d8deea;
}

.auth-card-footer strong {
  color: #24314b;
  font-size: 0.7rem;
}

.rail-job {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.demo-note,
.auth-error {
  color: var(--muted);
}

.auth-shell > .auth-error {
  position: fixed;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(92vw, 520px);
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: #7f1d1d;
  background: rgba(254, 242, 242, 0.96);
  border: 1px solid rgba(248, 113, 113, 0.45);
  box-shadow: 0 18px 40px rgba(127, 29, 29, 0.18);
}

.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.avatar-xs {
  width: 2rem;
  height: 2rem;
  font-size: 0.78rem;
}

.avatar-sm {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 0.88rem;
}

.avatar-md {
  width: 3rem;
  height: 3rem;
}

.avatar-lg {
  width: 4.8rem;
  height: 4.8rem;
  font-size: 1.3rem;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: rgba(9, 18, 31, 0.94);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.busy-dot {
  position: fixed;
  inset: auto 1.6rem 5.2rem auto;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  box-shadow: 0 0 0 0 rgba(255, 134, 66, 0.45);
  animation: pulse 1.1s infinite;
}

.notice-fresh {
  border-color: rgba(255, 134, 66, 0.28);
  background: linear-gradient(135deg, rgba(255, 134, 66, 0.12), rgba(255, 255, 255, 0.03));
}

.error-banner {
  color: #ffd0d0;
  border-color: rgba(255, 110, 143, 0.3);
  background: rgba(94, 14, 29, 0.35);
}

input::placeholder,
textarea::placeholder {
  color: rgba(145, 163, 191, 0.75);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 134, 66, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 134, 66, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 134, 66, 0);
  }
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .rail-left,
  .rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .message-layout,
  .profile-grid,
  .search-columns {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .auth-landing {
    min-height: auto;
    gap: 2rem;
  }

  .auth-card {
    min-height: auto;
  }

  .auth-columns {
    grid-template-columns: 1fr;
  }

  .auth-divider {
    min-height: 3.4rem;
  }

  .auth-divider::before {
    inset: auto 0;
    width: 100%;
    height: 1px;
  }
}

@media (max-width: 820px) {
  .shell,
  .auth-shell {
    padding: 1rem;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
    border-radius: 1.2rem;
    padding: 0.95rem;
  }

  .topnav,
  .topbar-center {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-search {
    grid-template-columns: 1fr;
  }

  .topbar-center {
    justify-content: flex-start;
  }

  .topbar-right {
    justify-content: space-between;
  }

  .rail-left,
  .rail,
  .grid-two,
  .preview-stack,
  .auth-feature-row,
  .auth-card-footer {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    padding: 0;
  }

  .auth-landing {
    padding: 1.4rem;
  }

  .auth-card-logo {
    width: min(280px, 86vw);
  }

  .auth-marketing h1 {
    font-size: clamp(2.7rem, 15vw, 4.2rem);
  }

  .auth-card {
    border-radius: 1.5rem 1.5rem 0 0;
  }

  .auth-language {
    padding: 1.3rem 1.3rem 0;
  }

  .auth-card-body {
    padding: 1.4rem;
  }

  .auth-heading {
    padding-left: 0;
  }

  .auth-social-stack,
  .auth-form {
    gap: 1rem;
  }

  .auth-options,
  .auth-card-footer span {
    align-items: flex-start;
  }

  .auth-options {
    flex-direction: column;
  }

  .auth-card-footer span + span {
    border-left: 0;
  }

  .hero,
  .group-hero,
  .job-head,
  .job-footer,
  .profile-hero-top,
  .conversation-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-head {
    align-items: flex-start;
  }

  .composer-row,
  .inline-form {
    grid-template-columns: 1fr;
    display: grid;
  }

  .composer-row > .primary-button {
    width: 100%;
    flex: 1 1 auto;
  }

  .bubble {
    max-width: 100%;
  }
}

/* ───────────────────────────────────────────────────
   SIDEBAR NAV (Left rail redesign)
──────────────────────────────────────────────────── */

.rail-left {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 0.4rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.14s, color 0.14s;
  cursor: pointer;
  position: relative;
  width: 100%;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.72;
  transition: opacity 0.14s;
}

.sidebar-nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-nav-item:hover svg {
  opacity: 1;
}

.sidebar-nav-item-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-nav-item-active svg {
  opacity: 1;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.sidebar-bottom {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #7647ff 0%, #3b82f6 100%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.16s, transform 0.14s;
  box-shadow: 0 4px 14px rgba(118, 71, 255, 0.34);
}

.sidebar-create-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sidebar-profile-strip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.5rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.14s;
  text-align: left;
  width: 100%;
  color: var(--text);
}

.sidebar-profile-strip:hover {
  background: var(--accent-soft);
}

.sidebar-profile-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  overflow: hidden;
}

.sidebar-profile-copy strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-copy small {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────────────────────────────────────────────────
   STORIES ROW
──────────────────────────────────────────────────── */

.stories-row {
  padding: 0.85rem 1rem !important;
}

.stories-scroll {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.stories-scroll::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  cursor: pointer;
}

.story-avatar-ring {
  position: relative;
  padding: 2.5px;
  border-radius: 999px;
}

.story-ring-active {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.story-ring-add {
  background: var(--accent);
}

.story-avatar-ring .avatar {
  border: 2.5px solid var(--panel);
}

.story-add-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 2px solid var(--panel);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
}

.story-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 58px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────────────────────────────────────────────────
   COMPOSER REDESIGN
──────────────────────────────────────────────────── */

.composer-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.composer-prompt-input {
  flex: 1;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.14s, background 0.14s;
}

.composer-prompt-input::placeholder {
  color: var(--muted);
}

.composer-prompt-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.1);
}

.composer-extra-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  margin-left: calc(2.5rem + 0.75rem);
}

.composer-tags-input,
.composer-image-input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.8rem;
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  outline: none;
  min-width: 0;
}

.composer-tags-input::placeholder,
.composer-image-input::placeholder {
  color: var(--muted);
}

.composer-tags-input:focus,
.composer-image-input:focus {
  border-color: var(--accent);
}

.composer-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.composer-action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}

.composer-action-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.composer-submit-btn {
  margin-left: auto;
}

/* ───────────────────────────────────────────────────
   POST CARD REDESIGN
──────────────────────────────────────────────────── */

.post-reactions-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.post-reaction-emojis {
  font-size: 0.95rem;
  letter-spacing: -0.05em;
}

.post-reaction-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.post-metrics-spacer {
  flex: 1;
}

.post-stat-link {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.83rem;
  transition: color 0.13s;
}

.post-stat-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.post-stat-sep {
  color: var(--muted);
  opacity: 0.5;
}

.post-action-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.post-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}

.post-action-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.post-action-btn svg {
  flex-shrink: 0;
}

.post-action-btn-active {
  color: var(--accent);
}

.post-action-btn-active svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.post-meta-time {
  color: var(--muted);
}

/* ───────────────────────────────────────────────────
   RIGHT RAIL REDESIGN
──────────────────────────────────────────────────── */

.rr-section {
  padding: 1rem !important;
}

.rr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.rr-head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.rr-see-all {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.13s;
}

.rr-see-all:hover {
  opacity: 0.75;
}

.rr-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rr-empty {
  font-size: 0.84rem;
  color: var(--muted);
}

/* Trending */
.rr-trend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  cursor: pointer;
  transition: opacity 0.13s;
}

.rr-trend-item:hover {
  opacity: 0.75;
}

.rr-trend-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.rr-trend-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-trend-count {
  font-size: 0.76rem;
  color: var(--muted);
}

.rr-trend-arrow {
  flex-shrink: 0;
  color: var(--muted);
}

/* Events */
.rr-event-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.rr-event-date-badge {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.2rem;
}

.rr-event-month {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rr-event-day {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.rr-event-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.rr-event-copy strong {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-event-copy small {
  font-size: 0.76rem;
  color: var(--muted);
}

/* Who to follow */
.rr-follow-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
}

.rr-follow-item .identity {
  min-width: 0;
  flex: 1;
}

.rr-follow-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.rr-follow-btn:hover,
.rr-follow-btn-active {
  background: var(--accent);
  color: #fff;
}


/* === ConnectAll redesign overrides === */

:root[data-theme="paper"] {
  --bg-ink: #f0f3f9;
  --bg-deep: #f6f8fc;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e6e9f0;
  --line-strong: #d6dbe5;
  --text: #1a1f2e;
  --muted: #6b7280;
  --accent: #3b82f6;
  --accent-soft: #eef2ff;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --topbar-surface: #ffffff;
  --shell-padding: 1rem;
  --layout-left: 260px;
  --layout-right: 320px;
  --ambient-one-color: transparent;
  --ambient-two-color: transparent;
  --ambient-three-color: transparent;
}

:root[data-theme="paper"] body {
  background: #f0f2f5 !important;
  color: var(--text);
}

:root[data-theme="paper"] .ambient { display: none !important; }

:root[data-theme="paper"] .shell {
  padding: 0;
  max-width: none;
}

/* Topbar */
:root[data-theme="paper"] .topbar {
  margin: 0;
  padding: 0.55rem 1.5rem;
  border: 0;
  border-bottom: 1px solid #e4e6eb;
  background: #ffffff;
  border-radius: 0;
  position: sticky;
  top: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  grid-template-columns: 240px minmax(0, 1fr) auto;
  gap: 1rem;
  backdrop-filter: none;
}

.brand-logo-img {
  height: 34px;
  width: auto;
  display: block;
}

:root[data-theme="paper"] .topbar-center {
  display: flex;
  justify-content: center;
  grid-template-columns: none;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

:root[data-theme="paper"] .topbar-search {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: block;
  grid-template-columns: none;
}

.topbar-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #65676b;
  display: grid;
  place-items: center;
  pointer-events: none;
}

:root[data-theme="paper"] .topbar-search input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border-radius: 999px;
  background: #f0f2f5;
  border: 1px solid transparent;
  color: #1a1f2e;
  font-size: 0.92rem;
  box-shadow: none;
}

:root[data-theme="paper"] .topbar-search input:focus {
  outline: none;
  border-color: #d0d7e2;
  background: #ffffff;
}

:root[data-theme="paper"] .topbar-search input::placeholder {
  color: #8a8d91;
}

.topbar-right {
  display: flex !important;
  align-items: center;
  gap: 0.4rem !important;
  flex-wrap: nowrap !important;
}

.topbar-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #65676b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.topbar-icon-btn:hover {
  background: #f0f2f5;
  color: #1a1f2e;
}

.topbar-icon-btn-active {
  color: #3b82f6;
  background: #eef2ff;
}

.topbar-icon-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  line-height: 1;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem 0.3rem 0.3rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: #1a1f2e;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-left: 0.4rem;
}

.topbar-profile:hover { background: #f0f2f5; }
.topbar-profile svg { color: #65676b; }

.topbar-logout {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #65676b;
  cursor: pointer;
}
.topbar-logout:hover { background: #f0f2f5; color: #ef4444; }

/* Layout */
:root[data-theme="paper"] .layout {
  padding: 1.1rem 1.5rem;
  gap: 1.2rem;
  max-width: 1480px;
  margin: 0 auto;
}

/* Left sidebar as a white card */
:root[data-theme="paper"] .rail-left {
  background: #ffffff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 0.85rem 0.7rem;
  position: sticky;
  top: 70px;
  align-self: start;
  height: fit-content;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

:root[data-theme="paper"] .sidebar-nav {
  padding: 0;
  gap: 2px;
  overflow: visible;
}

:root[data-theme="paper"] .sidebar-nav-item {
  color: #1a1f2e;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
}

:root[data-theme="paper"] .sidebar-nav-item:hover {
  background: #f0f2f5;
  color: #1a1f2e;
}

:root[data-theme="paper"] .sidebar-nav-item-active {
  background: #eef2ff;
  color: #3b82f6;
  font-weight: 600;
}

:root[data-theme="paper"] .sidebar-nav-item svg { opacity: 0.85; }
:root[data-theme="paper"] .sidebar-nav-item-active svg { opacity: 1; }

:root[data-theme="paper"] .sidebar-badge {
  background: #ef4444;
  font-size: 0.7rem;
}

:root[data-theme="paper"] .sidebar-bottom {
  border-top: 1px solid #e4e6eb;
  padding: 0.85rem 0.3rem 0.2rem;
  margin-top: 0.3rem;
}

:root[data-theme="paper"] .sidebar-create-btn {
  background: linear-gradient(100deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
  font-weight: 700;
}

:root[data-theme="paper"] .sidebar-profile-strip {
  background: #f7f9fc;
  border: 1px solid #e4e6eb;
  border-radius: 10px;
  padding: 0.6rem 0.65rem;
}
:root[data-theme="paper"] .sidebar-profile-strip strong { color: #1a1f2e; }
:root[data-theme="paper"] .sidebar-profile-strip small { color: #65676b; }

/* Panels */
:root[data-theme="paper"] .panel {
  background: #ffffff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  backdrop-filter: none;
  color: #1a1f2e;
}

/* Stories */
:root[data-theme="paper"] .stories-row { padding: 1rem 1.1rem !important; }

:root[data-theme="paper"] .story-item { gap: 0.45rem; }
:root[data-theme="paper"] .story-avatar-ring { padding: 3px; }
:root[data-theme="paper"] .story-avatar-ring .avatar { border: 3px solid #ffffff; width: 60px !important; height: 60px !important; font-size: 1rem !important; }
:root[data-theme="paper"] .story-name { color: #1a1f2e; max-width: 70px; font-weight: 500; }

/* Composer */
:root[data-theme="paper"] .composer { padding: 1rem 1.1rem; }

:root[data-theme="paper"] .composer-prompt-input {
  background: #f0f2f5;
  border: 1px solid transparent;
  color: #1a1f2e;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
}

:root[data-theme="paper"] .composer-prompt-input::placeholder { color: #65676b; }

:root[data-theme="paper"] .composer-prompt-input:focus {
  background: #ffffff;
  border-color: #d0d7e2;
}

.composer-actions-bar {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.7rem;
  margin-top: 0.5rem;
  border-top: 1px solid #e4e6eb;
}

:root[data-theme="paper"] .composer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  color: #65676b;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  flex: 1 1 auto;
  justify-content: center;
}

:root[data-theme="paper"] .composer-action-btn:hover { background: #f0f2f5; }
:root[data-theme="paper"] .composer-action-photo svg { color: #10b981; }
:root[data-theme="paper"] .composer-action-live svg { color: #ef4444; }
:root[data-theme="paper"] .composer-action-event svg { color: #f59e0b; }
:root[data-theme="paper"] .composer-action-feeling svg { color: #f59e0b; }

.composer-more-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #65676b;
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.composer-more-btn:hover { background: #f0f2f5; }

/* Feed switch pills */
:root[data-theme="paper"] .feed-switch {
  padding: 0.4rem;
  background: #ffffff;
  border: 1px solid #e4e6eb;
  border-radius: 999px;
  width: fit-content;
  gap: 0.3rem;
}

:root[data-theme="paper"] .feed-switch .nav-pill {
  border: 0;
  background: transparent;
  color: #65676b;
  padding: 0.45rem 1.1rem;
  font-weight: 600;
  font-size: 0.86rem;
}

:root[data-theme="paper"] .feed-switch .nav-pill-active {
  background: #eef2ff;
  color: #3b82f6;
}

/* Post card */
:root[data-theme="paper"] .post-card { padding: 1rem 1.1rem; }
:root[data-theme="paper"] .post-card .identity strong { color: #1a1f2e; }
:root[data-theme="paper"] .post-card .identity small { color: #65676b; }
:root[data-theme="paper"] .post-copy { color: #1a1f2e; }
:root[data-theme="paper"] .post-image-shell { border-radius: 10px; overflow: hidden; margin: 0.6rem -0.2rem 0; }
:root[data-theme="paper"] .post-reactions-bar { color: #65676b; padding: 0.55rem 0; border-bottom: 1px solid #e4e6eb; }
:root[data-theme="paper"] .post-action-bar { padding: 0.35rem 0; border-top: 0; gap: 0; }
:root[data-theme="paper"] .post-action-btn {
  flex: 1;
  background: transparent;
  border: 0;
  color: #65676b;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
:root[data-theme="paper"] .post-action-btn:hover { background: #f0f2f5; }
:root[data-theme="paper"] .post-action-btn-active { color: #3b82f6; }
:root[data-theme="paper"] .post-more { color: #65676b; }

:root[data-theme="paper"] .comment-stack { border-top: 1px solid #e4e6eb; padding-top: 0.7rem; }
:root[data-theme="paper"] .inline-form input {
  background: #f0f2f5;
  border: 1px solid transparent;
  color: #1a1f2e;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
}

/* Right rail */
:root[data-theme="paper"] .rail .rail-panel,
:root[data-theme="paper"] .rr-section {
  background: #ffffff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

:root[data-theme="paper"] .rr-head h3 { color: #1a1f2e; font-size: 1rem; margin: 0; }
:root[data-theme="paper"] .rr-see-all { color: #3b82f6; background: transparent; border: 0; font-weight: 600; font-size: 0.82rem; cursor: pointer; }
:root[data-theme="paper"] .rr-trend-label { color: #1a1f2e; font-weight: 700; }
:root[data-theme="paper"] .rr-trend-count { color: #65676b; font-size: 0.78rem; }
:root[data-theme="paper"] .rr-trend-arrow { color: #3b82f6; }
:root[data-theme="paper"] .rr-trend-item { padding: 0.4rem 0; }

:root[data-theme="paper"] .rr-event-date-badge {
  width: 44px;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  flex-shrink: 0;
}
:root[data-theme="paper"] .rr-event-month {
  display: block;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.18rem 0;
  letter-spacing: 0.04em;
}
:root[data-theme="paper"] .rr-event-day {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a1f2e;
  padding: 0.2rem 0;
}
:root[data-theme="paper"] .rr-event-item { display: flex; gap: 0.7rem; padding: 0.5rem 0; align-items: center; }
:root[data-theme="paper"] .rr-event-copy strong { display: block; color: #1a1f2e; font-size: 0.9rem; }
:root[data-theme="paper"] .rr-event-copy small { display: block; color: #65676b; font-size: 0.78rem; }

:root[data-theme="paper"] .rr-follow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
}
:root[data-theme="paper"] .rr-follow-item .identity strong { color: #1a1f2e; font-size: 0.88rem; }
:root[data-theme="paper"] .rr-follow-item .identity small { color: #65676b; font-size: 0.78rem; }
:root[data-theme="paper"] .rr-follow-btn {
  background: transparent;
  border: 1.5px solid #3b82f6;
  color: #3b82f6;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
:root[data-theme="paper"] .rr-follow-btn:hover { background: #eef2ff; }
:root[data-theme="paper"] .rr-follow-btn-active { background: #3b82f6; color: #ffffff; }

/* Hide stale extra-row (now removed) but keep safe */
.composer-extra-row { display: none !important; }

/* Hide brand-mark since we use logo image */
:root[data-theme="paper"] .brand-mark { display: none; }

/* Avatar tweaks for light theme */
:root[data-theme="paper"] .avatar { box-shadow: 0 0 0 1px #e4e6eb; }

/* Toast */
:root[data-theme="paper"] .toast {
  background: #1a1f2e;
  color: #ffffff;
}

@media (max-width: 1100px) {
  :root[data-theme="paper"] .layout {
    grid-template-columns: 1fr;
  }
  :root[data-theme="paper"] .rail-left,
  :root[data-theme="paper"] .rail:not(.rail-left) {
    display: none;
  }
}

