/* ==========================================================================
   Sponsor Hub — the provider-branded destination, plus the syndicated card
   that partner content takes inside Advisor Connect.

   The syndicated card is deliberately styled to read as different from a
   first-party research card: an advisor should never have to work out who is
   talking to them.
   ========================================================================== */

.v2-hub-wrap {
  padding: 20px 24px 40px;
  max-width: 1180px;
}

.v2-hub-h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.v2-hub-h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
}

.v2-hub-sub {
  color: var(--v2-text-muted, #667);
  margin: 4px 0 0;
  max-width: 70ch;
}

/* --- directory ---------------------------------------------------------- */

.v2-hub-dir {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.v2-hub-dir-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--v2-border, #e3e6ea);
  border-radius: 6px;
  background: var(--v2-surface, #fff);
  text-decoration: none;
  color: inherit;
}

.v2-hub-dir-card:hover {
  border-color: var(--v2-accent, #0b6ab0);
}

.v2-hub-dir-logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
}

.v2-hub-dir-logo-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--v2-surface-alt, #f2f4f7);
  font-size: 20px;
  font-weight: 600;
  color: var(--v2-text-muted, #667);
}

.v2-hub-dir-name {
  font-weight: 600;
}

.v2-hub-dir-about,
.v2-hub-dir-meta {
  font-size: 12px;
  color: var(--v2-text-muted, #667);
  margin-top: 3px;
}

/* --- hub ---------------------------------------------------------------- */

.v2-hub-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0 16px;
  border-top: 3px solid var(--v2-accent, #0b6ab0);
  border-bottom: 1px solid var(--v2-border, #e3e6ea);
}

.v2-hub-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.v2-hub-headline {
  flex: 1 1 auto;
  min-width: 0;
}

.v2-hub-contact {
  flex: 0 0 auto;
}

.v2-hub-tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 18px;
  border-bottom: 1px solid var(--v2-border, #e3e6ea);
}

.v2-hub-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--v2-text-muted, #667);
}

.v2-hub-tab.active {
  color: var(--v2-accent, #0b6ab0);
  border-bottom-color: var(--v2-accent, #0b6ab0);
  font-weight: 600;
}

.v2-hub-section {
  margin-bottom: 26px;
}

.v2-hub-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.v2-hub-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.v2-hub-product {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 1px solid var(--v2-border, #e3e6ea);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  background: var(--v2-surface, #fff);
}

.v2-hub-product:hover {
  border-color: var(--v2-accent, #0b6ab0);
}

.v2-hub-product-ref {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.v2-hub-product-label {
  font-size: 12px;
  color: var(--v2-text-muted, #667);
}

.v2-hub-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.v2-hub-tool {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--v2-border, #e3e6ea);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}

.v2-hub-tool-name {
  font-weight: 600;
}

.v2-hub-tool-desc {
  font-size: 12px;
  color: var(--v2-text-muted, #667);
  margin-top: 4px;
}

/* --- syndicated card ---------------------------------------------------- */

.v2-syndicated-card {
  border-left: 3px solid var(--v2-accent, #0b6ab0);
  background: var(--v2-surface-alt, #f8fafc);
}

.v2-syndicated-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--v2-accent, #0b6ab0);
  color: #fff;
}

.v2-syndicated-cta {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  white-space: nowrap;
}

/* --- Content Workspace hub tab ------------------------------------------ */

.v2-cw-hub {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px 48px;
  max-width: 1080px;
  box-sizing: border-box;
}

.v2-cw-hub-card {
  background: var(--v2-bg-card, #fff);
  border: 1px solid var(--v2-border-color, #e2e8f0);
  border-radius: 12px;
  padding: 16px 18px 18px;
}

.v2-cw-hub-card h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.v2-cw-hub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.v2-cw-hub-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.v2-cw-hub-title h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.v2-cw-hub-public {
  font-size: 13px;
  font-weight: 600;
  color: #0964a0;
  text-decoration: none;
}

.v2-cw-hub-public:hover { text-decoration: underline; }

.v2-cw-hub-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
  flex: 1 1 420px;
  max-width: 520px;
  margin-left: auto;
}

.v2-cw-hub-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.v2-cw-hub-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.1;
}

.v2-cw-hub .v2-admin-input,
.v2-cw-hub textarea.v2-admin-input {
  max-width: 720px;
  display: block;
}

.v2-cw-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

#v2-content-workspace .v2-cw-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.v2-cw-hub-table { overflow-x: auto; }

.v2-cw-hub-table .v2-admin-table { width: 100%; }

.v2-cw-hub-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.v2-cw-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .v2-hub-wrap { padding: 14px; }
  .v2-hub-header { flex-wrap: wrap; }
  .v2-cw-hub { padding: 14px 14px 36px; }
  .v2-cw-hub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; margin-left: 0; }
}

html.dark-theme .v2-cw-hub-card,
.dark-theme .v2-cw-hub-card {
  background: #151b27;
  border-color: #2a3444;
}
html.dark-theme .v2-cw-hub-title h3,
html.dark-theme .v2-cw-hub-stat-value,
.dark-theme .v2-cw-hub-title h3,
.dark-theme .v2-cw-hub-stat-value { color: #e6e9f0; }
html.dark-theme .v2-cw-hub-stat,
.dark-theme .v2-cw-hub-stat {
  background: #0f1622;
  border-color: #2a3444;
  color: #94a3b8;
}
