/* Nexus identity: warm gold, quiet dark surfaces, clear interactive states. */
:root {
  --nexus-gold: #c5a04a;
  --nexus-gold-light: #f2d98e;
  --nexus-gold-deep: #71551f;
  --nexus-night: #111214;
  --nexus-card-radius: 16px;
  --nexus-soft-shadow: 0 12px 32px #090a0d16;
}
body[data-theme="black-gold"] {
  --nexus-gold: #c5a04a;
  --nexus-gold-light: #f2d98e;
  --nexus-gold-deep: #71551f;
}
body[data-theme="black-silver"] {
  --nexus-gold: #bdc2cc;
  --nexus-gold-light: #f0f2f6;
  --nexus-gold-deep: #555b66;
}
body[data-theme="violet-black"] {
  --nexus-gold: #b281d1;
  --nexus-gold-light: #e3c1fa;
  --nexus-gold-deep: #69418b;
}

/* An animated signature mark with a soft pulse and a passing highlight. */
.login-brand .brand-mark,
.sidebar-brand .brand-mark {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--nexus-gold);
  background: radial-gradient(circle at 32% 20%, #414044, #17181b 63%, #090a0c);
  color: var(--nexus-gold-light);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--nexus-gold) 12%, transparent), 0 5px 18px #0007;
  animation: nexus-mark-beacon 5.6s ease-in-out infinite;
}
.login-brand .brand-mark::before,
.sidebar-brand .brand-mark::before {
  position: absolute;
  inset: 3px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--nexus-gold-light) 48%, transparent);
  border-radius: inherit;
  pointer-events: none;
}
.login-brand .brand-mark::after,
.sidebar-brand .brand-mark::after {
  position: absolute;
  inset: -20% auto -20% -60%;
  width: 45%;
  content: "";
  background: linear-gradient(105deg, transparent, color-mix(in srgb, var(--nexus-gold-light) 62%, transparent), transparent);
  transform: skewX(-18deg);
  animation: nexus-mark-sweep 6.8s ease-in-out infinite;
  pointer-events: none;
}
.login-brand:hover .brand-mark,
.sidebar-brand:hover .brand-mark {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--nexus-gold) 18%, transparent), 0 8px 24px color-mix(in srgb, var(--nexus-gold) 32%, #000);
}
.login-brand span:last-child {
  color: var(--nexus-gold-light);
  text-shadow: 0 0 12px color-mix(in srgb, var(--nexus-gold) 48%, transparent);
}
.sidebar-brand .brand-name-fire {
  background-image: linear-gradient(180deg, #fff3c5, var(--nexus-gold-light) 38%, var(--nexus-gold) 82%);
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--nexus-gold) 45%, transparent));
}
.breadcrumbs .app-nexus-fire {
  position: relative;
  color: var(--nexus-gold-light);
  text-shadow: 0 0 12px color-mix(in srgb, var(--nexus-gold) 55%, transparent);
}

/* A consistent Nexus finish across pages, cards, controls, and mobile navigation. */
.nexus-page-heading {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--nexus-gold) 40%, #e6dcc4);
  box-shadow: var(--nexus-soft-shadow);
}
.nexus-page-heading::after {
  position: absolute;
  top: -44px;
  right: -35px;
  width: 150px;
  height: 150px;
  content: "✦";
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--nexus-gold) 25%, transparent);
  border-radius: 50%;
  color: color-mix(in srgb, var(--nexus-gold) 44%, transparent);
  font-size: 36px;
  pointer-events: none;
}
.nexus-page-heading h1 { color: var(--nexus-gold-deep); }
body[data-theme] .nexus-page-heading h1 { color: var(--nexus-gold-light); }
body[data-theme] .nexus-page-heading {
  border-color: color-mix(in srgb, var(--nexus-gold) 35%, var(--line));
  background: radial-gradient(ellipse at 100% 0, color-mix(in srgb, var(--nexus-gold) 15%, transparent), transparent 48%), linear-gradient(125deg, #1b1c1f, #111214);
}
body[data-theme] .nexus-page-description { color: #c9c4b7; }
body[data-theme] .publication-card,
body[data-theme] .catalog-card,
body[data-theme] .person-card,
body[data-theme] .member-card,
body[data-theme] .marketplace-panel,
body[data-theme] .marketplace-listings,
body[data-theme] .panel {
  border-radius: var(--nexus-card-radius);
  box-shadow: 0 8px 24px #0002;
}
.primary-button,
.secondary-button,
.nav-link,
.bottom-nav-link,
.icon-button {
  border-radius: 10px;
}
.primary-button,
.secondary-button {
  min-height: 42px;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.nav-link.active,
.bottom-nav-link.active {
  box-shadow: inset 0 1px #fff5, 0 5px 16px color-mix(in srgb, var(--nexus-gold) 18%, transparent);
}
.bottom-nav-link > span:first-child { color: var(--nexus-gold-light); }
.bottom-nav-link.active > span:first-child { color: #241b09; }
body[data-theme="black-silver"] .bottom-nav-link.active > span:first-child { color: #17191d; }
body[data-theme="violet-black"] .bottom-nav-link.active > span:first-child { color: #160d1d; }

.publication-create-actions { gap: 12px; }
.publication-create-actions .primary-button { min-height: 48px; padding-inline: 18px; font-size: 13px; }
.marketplace-panel > [data-toggle-marketplace-form] { min-height: 46px; padding-inline: 18px; font-size: 13px; }
.home-ambassador-banner { border-color: color-mix(in srgb, var(--nexus-gold) 62%, #d3bd7e); }
.home-ambassador-banner span:last-child { display: block; }

@keyframes nexus-mark-beacon {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--nexus-gold) 12%, transparent), 0 5px 18px #0007; }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--nexus-gold) 18%, transparent), 0 6px 24px color-mix(in srgb, var(--nexus-gold) 28%, #000); }
}
@keyframes nexus-mark-sweep {
  0%, 54%, 100% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  62% { opacity: .8; }
  78% { transform: translateX(360%) skewX(-18deg); opacity: 0; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
}
@media (max-width: 700px) {
  .nexus-page-heading::after { right: -58px; width: 116px; height: 116px; font-size: 29px; }
  .home-ambassador-banner span:last-child { font-size: 11px; }
  .publication-create-actions { display: grid; grid-template-columns: 1fr; }
  .publication-create-actions .primary-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .login-brand .brand-mark,
  .sidebar-brand .brand-mark,
  .login-brand .brand-mark::after,
  .sidebar-brand .brand-mark::after { animation: none !important; }
  .primary-button,
  .secondary-button,
  .publication-card,
  .catalog-card,
  .person-card,
  .member-card { transition: none !important; }
}
body.reduce-motion .login-brand .brand-mark,
body.reduce-motion .sidebar-brand .brand-mark,
body.reduce-motion .login-brand .brand-mark::after,
body.reduce-motion .sidebar-brand .brand-mark::after { animation: none !important; }

/* Keep assistive labels available without letting helper text alter the layout. */
.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;
}
.breadcrumbs .app-nexus-fire {
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--nexus-gold) 55%, transparent);
  border-radius: 999px;
  background: linear-gradient(110deg, #171716, #242018);
}
.breadcrumbs .app-nexus-emblem {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border: 1px solid var(--nexus-gold);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 20%, #45413a, #141517 72%);
  color: var(--nexus-gold-light);
  font: 800 13px Manrope, Arial, sans-serif;
  box-shadow: 0 0 10px color-mix(in srgb, var(--nexus-gold) 25%, transparent);
  animation: nexus-mark-beacon 5.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .breadcrumbs .app-nexus-emblem { animation: none !important; }
}
body.reduce-motion .breadcrumbs .app-nexus-emblem { animation: none !important; }

/* Nexus signature across every space: editorial warmth, steady controls, clear rhythm. */
body[data-theme] .primary-button,
body[data-theme] .secondary-button,
body[data-theme] .text-button,
body[data-theme] .icon-button {
  min-height: 40px;
  border-radius: 11px;
  font-weight: 750;
  letter-spacing: .005em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, border-color .18s ease;
}
body[data-theme] .primary-button { box-shadow: inset 0 1px #ffffff66, 0 5px 15px #0003; }
body[data-theme] .secondary-button { border-color: color-mix(in srgb, var(--nexus-gold) 58%, #5c5c5c); background: linear-gradient(145deg,#232426,#171819); color: var(--nexus-gold-light); }
body[data-theme] .primary-button:not(:disabled):hover,
body[data-theme] .secondary-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 9px 22px #0005, 0 0 0 1px color-mix(in srgb,var(--nexus-gold) 24%,transparent); }
body[data-theme] button:disabled,
body[data-theme] .primary-button:disabled,
body[data-theme] .secondary-button:disabled { filter: blur(.8px) grayscale(.28); opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-button:disabled,.secondary-button:disabled { filter: blur(1.15px) grayscale(.3); opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
body[data-theme] .panel,
body[data-theme] .marketplace-listings,
body[data-theme] .profile-friends-panel,
body[data-theme] .profile-library-link,
body[data-theme] .publication-composer-panel,
body[data-theme] .publication-catalog-panel,
body[data-theme] .publication-social-panel {
  border-color: color-mix(in srgb,var(--nexus-gold) 18%,var(--line));
  border-radius: 18px;
  box-shadow: 0 12px 32px #0003;
}
body[data-theme] .section-heading h2,
body[data-theme] .panel-title h2,
body[data-theme] .feature-section h2 { letter-spacing: -.02em; }
body[data-theme] .catalog-card,
body[data-theme] .publication-card,
body[data-theme] .person-card,
body[data-theme] .member-card { border-color: color-mix(in srgb,var(--nexus-gold) 18%,var(--line)); border-radius: 16px; }
body[data-theme] input:not([type=checkbox]):not([type=radio]):not([type=file]),
body[data-theme] textarea,
body[data-theme] select { border-radius: 11px; }
.publication-create-actions .primary-button { min-height: 48px; border-radius: 14px; box-shadow: 0 8px 20px #a278251c; }
.publication-composer-panel { padding: clamp(16px,3vw,26px); }
.publication-composer-form { margin-top: 18px; }
.publication-composer-form [data-article-body-field] textarea { min-height: 210px; }
.marketplace-panel { padding: clamp(16px,3vw,25px); }
.marketplace-panel form h2 { margin: 6px 0 4px; font: 800 19px Manrope,Arial,sans-serif; }
.market-price-help,.mobile-money-note { display: block; color: var(--muted); font-size: 11px; line-height: 1.55; }
.catalog-price,.publication-price { display: inline-flex; align-items: center; width: max-content; margin: 5px 0 7px; padding: 6px 10px; border: 1px solid color-mix(in srgb,var(--nexus-gold) 43%,transparent); border-radius: 999px; background: color-mix(in srgb,var(--nexus-gold) 13%,transparent); color: var(--nexus-gold-light); font-size: 12px; font-weight: 800; }
.publication-price { margin: 8px 0 0; }
.mobile-money-button { width: 100%; margin-top: 10px; }
.mobile-money-note { margin: 6px 2px 0; }
.marketplace-empty { grid-column: 1/-1; padding: 30px 20px; border: 1px dashed color-mix(in srgb,var(--nexus-gold) 48%,var(--line)); border-radius: 16px; background: radial-gradient(ellipse at 50% 0,color-mix(in srgb,var(--nexus-gold) 12%,transparent),transparent 68%); text-align: center; }
.marketplace-empty p { margin-bottom: 0; color: var(--muted); }
.member-profile-card { border-color: color-mix(in srgb,var(--nexus-gold) 28%,var(--line)); border-radius: 20px; box-shadow: 0 20px 55px #0004; }
.profile-cover { position: relative; isolation: isolate; }
.profile-cover::after { position: absolute; inset: 35% 0 0; z-index: 0; content: ""; background: linear-gradient(transparent,#0708097a); pointer-events: none; }
.profile-identity { z-index: 1; padding-inline: clamp(14px,3vw,28px); }
.profile-large-avatar { border: 4px solid #171819; box-shadow: 0 0 0 2px var(--nexus-gold),0 10px 28px #0007; }
.profile-name-block h2 { color: #f7f2e6; text-shadow: 0 2px 12px #0008; }
.profile-section-nav { gap: 9px; padding: 13px clamp(14px,3vw,28px); }
.profile-section-nav a { border: 1px solid color-mix(in srgb,var(--nexus-gold) 38%,transparent); border-radius: 999px; background: linear-gradient(145deg,#28251d,#1a1a19); color: var(--nexus-gold-light); transition: transform .18s ease,background .18s ease; }
.profile-section-nav a:hover { transform: translateY(-2px); background: #3a3020; }
.profile-stats { gap: 8px; padding: 13px; border: 0; background: linear-gradient(125deg,#17191c,#1d1c18); }
.profile-stats>div { border: 1px solid #ffffff10; border-radius: 13px; background: #ffffff05; }
.profile-stats b { color: var(--nexus-gold-light); font-size: 20px; }
.profile-stats span { color: #c5bfaf; }
.profile-bio { margin: 14px; padding: clamp(16px,3vw,24px); border: 1px solid #ffffff12; border-radius: 16px; background: linear-gradient(135deg,#1c1d1e,#191a1a); }
.profile-bio h3 { color: var(--nexus-gold-light); letter-spacing: .02em; }
.profile-identity-phone { color: #a6d6a2; }
.profile-friends-panel { background: linear-gradient(145deg,#1b1d1f,#171819); }
.friends-panel,.invitations-panel,.members-toolbar { border-color: color-mix(in srgb,var(--nexus-gold) 20%,var(--line)); }
.member-card,.friend-card,.invitation-item { transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.member-card:hover,.friend-card:hover,.invitation-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--nexus-gold) 50%,var(--line)); box-shadow: 0 10px 24px #0003; }
.friend-card { grid-template-columns:42px minmax(90px,1fr) auto auto; min-width:min(390px,92vw); padding:12px; border-color:color-mix(in srgb,var(--nexus-gold) 22%,var(--line)); border-radius:15px; background:linear-gradient(145deg,#202123,#171819); }
.friend-card>img,.friend-card>.member-avatar { width:40px;height:40px;border:2px solid color-mix(in srgb,var(--nexus-gold) 65%,transparent); }
.friend-card-copy { display:grid;gap:4px;min-width:0; }
.friend-card-copy>b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
.friend-card .presence-state { font-size:10px; }
.friend-card .primary-button,.friend-card .secondary-button { min-height:36px;padding:8px 10px;border-radius:10px;font-size:10px;white-space:nowrap; }
.profile-works-panel,.profile-library-link { border-color:color-mix(in srgb,var(--nexus-gold) 22%,var(--line)); }
.profile-completion-note { border-radius: 14px; box-shadow: 0 7px 22px #0002; }
.theme-dark .profile-completion-note { background: linear-gradient(120deg,#332d1d,#202228); border-color: #725e32; color: #f1e5c3; }
body[data-theme] .toast { border: 1px solid color-mix(in srgb,var(--nexus-gold) 55%,transparent); border-radius: 13px; box-shadow: 0 12px 35px #0008; }
body[data-theme] .login-card h2 { color:#f6e9c9!important; }
body[data-theme] .login-card .muted,body[data-theme] .login-card .login-help { color:#d1c9b8; }
body[data-theme] .login-card .auth-continue { border:1px solid #f0d78e;background:linear-gradient(115deg,#e9d18c,#bd963f);color:#211b0f!important; }
body[data-theme] .login-card .login-help .text-button { color:var(--nexus-gold-light); }
@media (max-width:700px) {
  .profile-stats { gap: 6px; padding: 10px; }
  .profile-stats>div { border: 1px solid #ffffff10!important; border-radius: 12px; }
  .publication-card { grid-template-columns: 86px minmax(0,1fr); gap: 12px; padding: 12px; }
  .publication-cover { width: 86px; height: 126px; }
  .mobile-money-button { min-height: 44px; font-size: 11px; }
  .friend-card { grid-template-columns:38px minmax(70px,1fr) auto; min-width:min(330px,91vw); }
  .friend-card .secondary-button { grid-column:2; }
  .friend-card .primary-button { grid-column:3;grid-row:2; }
  .friend-card-copy { grid-column:2/4; }
}
@media (prefers-reduced-motion:reduce) {
  body[data-theme] .primary-button,body[data-theme] .secondary-button,.profile-section-nav a { transition:none!important; }
  body[data-theme] .primary-button:not(:disabled):hover,body[data-theme] .secondary-button:not(:disabled):hover,.profile-section-nav a:hover { transform:none; }
}
