/* ---------------------------------------------------------------------------
   Marketing › Social Planner (public/social-planner.js), laid out as GHL's
   planner: a header with its six tabs and actions, then the Planner's
   filter bar, post table and pager.
--------------------------------------------------------------------------- */

/* ----- header ----- */
.sp-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 0 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--line); }
.sp-head-title { font-size: 16.5px; font-weight: 600; padding: 12px 0; }
.sp-tabs { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tab { flex: none; white-space: nowrap; background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 12px 12px; font: inherit; font-size: 14.5px; color: #475467; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sp-tab:hover { color: var(--text); }
.sp-tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.sp-beta { font-size: 10px; font-weight: 650; letter-spacing: .03em; color: #6a3fc1; background: #f1ebfd; border-radius: 4px; padding: 2px 6px; }
.sp-head-actions { display: flex; gap: 8px; align-items: center; padding: 8px 0; margin-left: auto; }
.sp-head-actions .icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* ----- filter bar ----- */
.sp-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
/* One row, as GHL: the gap after Filters gives way first, then the search box. */
.sp-bar > * { flex: none; }
.sp-bar .grow { flex: 1 1 0; min-width: 0; }
.sp-chipbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.sp-chipbtn:hover { background: var(--hover); }
.sp-chipbtn b { color: var(--brand); font-weight: 600; margin-left: 2px; }
.sp-chipbtn .ico { color: var(--muted); }
.sp-chipbtn .sp-count { background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; line-height: 17px; }
/* GHL's range: one joined box, a calendar mark then "28 / 05 / 2026" in each half. */
.sp-dates { display: flex; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.sp-date-in { position: relative; display: flex; align-items: center; gap: 8px; width: 142px; padding: 0 11px; margin: 0; font-size: 14px; color: var(--text); white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.sp-date-in + .sp-date-in { border-left: 1px solid var(--line); }
.sp-date-in .ico { flex: none; color: var(--muted); }
.sp-date-in:hover { background: var(--hover); }
.sp-date-in:focus-within { box-shadow: inset 0 0 0 2px var(--brand-soft); }
.sp-date-in input { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.sp-who { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.sp-who .sp-more { font-size: 11.5px; font-weight: 500; color: #475467; background: #f2f4f7; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.sp-who > .ico { color: var(--muted); margin-left: 2px; }
.sp-who-empty { color: var(--muted); font-size: 14px; padding: 0 4px; }
.sp-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 38px; }
.sp-toggle button { background: var(--surface); border: 0; width: 46px; display: grid; place-items: center; color: #475467; cursor: pointer; }
.sp-toggle button + button { border-left: 1px solid var(--line); }
.sp-toggle button.on { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); border-radius: 7px 0 0 7px; }
.sp-toggle button + button.on { border-radius: 0 7px 7px 0; }
.sp-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.sp-bar .sp-search { flex: 0 1 300px; min-width: 180px; }
.sp-search:focus-within { border-color: var(--brand); }
.sp-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); width: 100%; padding: 0; }

/* ----- avatars ----- */
.sp-av { position: relative; width: 28px; height: 28px; flex: none; }
.sp-av img, .sp-av .sp-ini { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 600; }
.sp-net { position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 1.5px solid var(--surface); }
.sp-stack { display: inline-flex; }
.sp-stack .sp-av + .sp-av { margin-left: 9px; }

/* ----- popovers ----- */
.sp-pop { position: absolute; z-index: 70; min-width: 220px; max-height: 360px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); padding: 6px; }
.sp-pop-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 8px 4px; text-transform: uppercase; letter-spacing: .03em; }
.sp-pop-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; margin: 0; }
.sp-pop-item:hover { background: var(--hover); }
.sp-pop-item.on { color: var(--brand); font-weight: 600; }
.sp-pop-item.danger { color: #b03636; }
.sp-pop-item input { width: auto; margin: 0; flex: none; }
.sp-pop-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pop-foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-soft); margin-top: 6px; padding: 8px 4px 2px; }

/* ----- table ----- */
.sp-selbar[hidden] { display: none; }
.sp-selbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.sp-table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sp-table th { text-align: left; font-weight: 600; color: #344054; padding: 12px 14px; height: 46px; background: #f9fafb; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; }
.sp-table th .ico { vertical-align: -3px; margin-right: 8px; color: #475467; }
/* GHL's column proportions. */
.sp-col-caption { width: 25%; }
.sp-col-media { width: 9.5%; }
.sp-col-status { width: 13%; }
.sp-col-type { width: 15%; }
.sp-col-date { width: 14%; }
.sp-col-social { width: 11%; }
.sp-table td { padding: 7px 14px; height: 50px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; }
.sp-table th:last-child, .sp-table td:last-child { border-right: 0; text-align: center; width: 6.5%; }
.sp-table th:first-child, .sp-table td:first-child { width: 5.5%; text-align: center; }
.sp-table th:last-child .icon-btn, .sp-table td:last-child .icon-btn { margin: 0 auto; color: #475467; }
.sp-table tr:last-child td { border-bottom: 0; }
.sp-table tbody tr.clickable { cursor: pointer; }
.sp-table tbody tr.clickable:hover td { background: var(--hover); }
.sp-table input[type=checkbox] { appearance: none; width: 18px; height: 18px; margin: 0 auto; display: block; border: 1px solid #d0d5dd; border-radius: 5px; background: var(--surface) center / 12px no-repeat; cursor: pointer; }
.sp-table input[type=checkbox]:hover { border-color: var(--brand); }
.sp-table input[type=checkbox]:checked { background-color: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.sp-table input[type=checkbox]:indeterminate { background-color: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.sp-table input[type=checkbox]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sp-cap { max-width: 360px; }
.sp-cap-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475467; }
.sp-issues { margin-top: 4px; font-size: 12.5px; color: #b03636; white-space: normal; }
.sp-links { margin-top: 3px; font-size: 12.5px; }
.sp-links a { margin-right: 10px; }
.sp-media { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; display: block; margin: 0 auto; }
.sp-media-ph { width: 36px; height: 36px; border-radius: 6px; background: var(--bg); color: var(--muted); display: grid; place-items: center; margin: 0 auto; }
.sp-status { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; }
/* GHL's Published mark is the plane flying right. */
.sp-status[data-status="published"] .ico { transform: rotate(45deg); }
.sp-type { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #f2f4f7; color: #344054; font-size: 14px; white-space: nowrap; }
.sp-date { white-space: nowrap; }
.sp-date div:first-child { color: #344054; }
.sp-date div + div { color: var(--muted); font-size: 14px; margin-top: 1px; }
.sp-empty { text-align: center; padding: 48px 12px; color: var(--muted); font-size: 14px; }
.sp-empty .sp-empty-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; margin-bottom: 12px; }
.sp-empty .sp-empty-title { color: var(--text); font-weight: 600; font-size: 15px; margin-bottom: 4px; }

/* ----- pager ----- */
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 24px 4px; font-size: 14px; color: #344054; }
.sp-pager { display: flex; align-items: center; gap: 8px; }
.sp-pager select { appearance: none; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 30px 0 10px; color: var(--text); font: inherit; width: auto; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 9px center / 15px no-repeat; }
.sp-pager select + span { margin: 0 6px 0 2px; }
.sp-pager button { height: 34px; min-width: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.sp-pager button:disabled { color: var(--dim); opacity: .55; cursor: default; }
.sp-pager button.on { border-color: var(--brand); color: var(--brand); }

/* ----- statistics ----- */
.sp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sp-tile { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.sp-tile-l { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.sp-tile-n { font-size: 24px; font-weight: 600; }

/* ----- GHL's initialisedPlanner banner ----- */
.sp-welcome { display: flex; align-items: center; gap: 24px; padding: 22px 24px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(100deg, var(--brand-soft), var(--surface) 72%); }
.sp-welcome-text { flex: 1; min-width: 0; }
.sp-welcome-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.sp-welcome-text p { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.sp-welcome-text .btn { margin-top: 12px; }
.sp-welcome-nets { display: grid; grid-template-columns: repeat(2, 44px); gap: 10px; flex: none; margin-right: 12px; }
.sp-welcome-nets span { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -8px rgba(16, 24, 40, .45); }
.sp-welcome-nets span:nth-child(even) { transform: translateY(10px); }

/* ----- "+ New Post" and the composer's "Post" menus ----- */
.sp-newpost, .sp-postbtn { display: inline-flex; align-items: center; gap: 6px; }
.sp-newpost > .ico:last-child, .sp-postbtn > .ico:last-child { margin-left: 2px; opacity: .9; }
.sp-pop-wide { min-width: 300px; }
.sp-pop-item > .ico { flex: none; color: var(--muted); }
.sp-pop-choice { align-items: flex-start; }
.sp-pop-choice > .ico { margin-top: 2px; }
.sp-pop-choice .grow { white-space: normal; display: grid; gap: 2px; }
.sp-pop-choice .hint { font-size: 12.5px; }
.sp-pop-choice.danger b, .sp-pop-choice.danger > .ico { color: #b03636; }
.sp-pop-none { padding: 2px 8px 6px; font-size: 13px; }
.sp-pop .sp-cal-post { margin: 4px 6px; }

/* ----- list extras ----- */
.sp-repeat { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sp-file { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; word-break: break-all; }
.sp-file > .ico { color: var(--muted); flex: none; }
.sp-file .sp-issues { flex-basis: 100%; }

/* ----- calendar: GHL's month and week ----- */
/* "October 2026", a joined pair of chevrons, Today; Month / Week on the right. */
.sp-cal-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.sp-cal-head .grow { flex: 1; }
.sp-cal-title { font-size: 18px; font-weight: 500; color: var(--text); min-width: 132px; }
.sp-cal-steps { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 36px; }
.sp-cal-steps button { width: 44px; border: 0; background: var(--surface); color: #344054; display: grid; place-items: center; cursor: pointer; }
.sp-cal-steps button + button { border-left: 1px solid var(--line); }
.sp-cal-steps button:hover { background: var(--hover); }
.btn.sp-cal-today { height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; }
.sp-seg { display: inline-flex; padding: 3px; gap: 2px; background: #f2f4f7; border: 1px solid var(--line); border-radius: 8px; }
.sp-seg button { min-width: 124px; height: 32px; border: 1px solid transparent; border-radius: 6px; background: none; color: #475467; font: inherit; font-size: 14.5px; cursor: pointer; }
.sp-seg button.on { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
/* The month: one bordered grid, Sunday first and in red, numbers top right. */
.sp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.sp-cal-dow { text-align: center; color: #344054; font-size: 16px; font-weight: 500; padding: 10px 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--surface); }
.sp-cal-dow.sun { color: #e53e3e; }
.sp-cal-dow:nth-child(7n) { border-right: 0; }
.sp-cal-day { min-height: 176px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px 8px 8px; font-size: 12px; overflow: hidden; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.sp-cal-day:nth-child(7n) { border-right: 0; }
.sp-cal-day:nth-last-child(-n + 7) { border-bottom: 0; }
.sp-cal-day.off { background: var(--surface); }
.sp-cal-day.drop { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.sp-cal-num { align-self: flex-end; color: #344054; font-size: 14px; line-height: 20px; min-width: 20px; text-align: center; }
.sp-cal-day.today .sp-cal-num { color: #fff; background: var(--brand); border-radius: 10px; font-weight: 600; padding: 0 5px; }
/* GHL's calendarCard: the account, the time, the caption, tinted by status. */
.sp-cal-post { display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 5px; border-radius: 4px; border-left: 3px solid transparent; cursor: pointer; font-size: 12px; color: #344054; min-width: 0; }
.sp-cal-post .sp-av, .sp-cal-post .sp-av img, .sp-cal-post .sp-av .sp-ini { width: 18px; height: 18px; font-size: 8px; }
.sp-cal-post .sp-net { width: 10px; height: 10px; right: -3px; bottom: -3px; border-width: 1px; }
.sp-cal-post .sp-net .ico { width: 6px; height: 6px; }
.sp-cal-post-time { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-cal-post-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-cal-post[draggable="true"] { cursor: grab; }
.sp-cal-more { align-self: flex-start; background: none; border: 0; padding: 0 2px; color: var(--brand); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
/* The week: a time gutter and seven columns of hourly rows. */
.sp-week { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.sp-week-head, .sp-week-body { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); }
.sp-week-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.sp-week-gutter, .sp-week-dow { border-right: 1px solid var(--line); }
.sp-week-dow { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; color: #344054; font-size: 14px; font-weight: 500; }
.sp-week-dow:last-child { border-right: 0; }
.sp-week-dow.sun .sp-week-dname { color: #e53e3e; }
.sp-week-dnum { font-size: 18px; line-height: 28px; min-width: 28px; text-align: center; border-radius: 14px; }
.sp-week-dow.today .sp-week-dnum { background: var(--brand); color: #fff; font-weight: 600; }
.sp-week-body { max-height: 620px; overflow-y: auto; }
.sp-week-time { height: 56px; padding: 4px 8px 0 0; text-align: right; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sp-week-cell { min-height: 56px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 3px; }
.sp-week-cell:nth-child(8n) { border-right: 0; }
.sp-week-cell.today { background: #f8faff; }
.sp-week-cell.drop { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }

/* ----- Content sub-tabs ----- */
.sp-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 16px; overflow-x: auto; }
.sp-subtab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font: inherit; font-size: 14px; color: #475467; cursor: pointer; white-space: nowrap; }
.sp-subtab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.sp-kicker { font-size: 11.5px; font-weight: 650; letter-spacing: .05em; color: var(--muted); margin: 6px 0 2px; }

/* ----- composer ----- */
.sp-compose { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sp-compose-side { position: sticky; top: 12px; display: grid; gap: 8px; }
.sp-compose-foot { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 0 2px; border-top: 1px solid var(--line-soft); margin-top: 12px; }
.sp-picks { display: grid; gap: 8px; }
.sp-pick-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sp-pick-net { min-width: 150px; }
.sp-picks label.sp-pick { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; margin: 0; cursor: pointer; color: var(--text); font-weight: 400; }
.sp-picks label.sp-pick.off { opacity: .55; }
.sp-picks .sp-pick input, .field .sp-check input, .sp-check input, .field .sp-radios input, .sp-radios input { width: auto; height: auto; margin: 0; flex: none; }
.sp-picks label.sp-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
label.sp-check, .field label.sp-check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; margin: 0; color: var(--text); font-weight: 400; }
.sp-radios { display: flex; gap: 14px; flex-wrap: wrap; }
.sp-radios label, .field .sp-radios label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; margin: 0; color: var(--text); font-weight: 400; }
.sp-options { display: grid; gap: 12px; }
.sp-section { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.sp-counter { display: flex; gap: 8px; justify-content: flex-end; font-size: 12.5px; color: var(--muted); margin: -2px 0 6px; }
.sp-subtabs ~ .widget-head { margin-bottom: 12px; }
.sp-counter b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-counter.over b { color: #b03636; }
.sp-row { display: flex; gap: 8px; align-items: center; }
.sp-row > input, .sp-row > select { flex: 1; min-width: 0; }
.sp-days { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-day { min-width: 46px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.sp-day.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sp-select { height: 38px; width: auto; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }

/* ----- preview card (composer and details drawer) ----- */
.sp-preview { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); display: grid; gap: 10px; }
.sp-preview-who { display: flex; gap: 10px; align-items: center; }
.sp-preview-name { font-weight: 600; font-size: 14px; }
.sp-preview-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; color: var(--text); }
.sp-preview-media { width: 100%; max-height: 280px; object-fit: cover; border-radius: 8px; }
.sp-preview-ph { border: 1px dashed var(--line); border-radius: 8px; padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13px; display: grid; place-items: center; }

/* ----- details drawer ----- */
.sp-drawer-bg { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .32); display: flex; justify-content: flex-end; }
.sp-drawer { width: min(460px, 100%); height: 100%; background: var(--surface); box-shadow: -12px 0 32px rgba(16, 24, 40, .18); display: flex; flex-direction: column; }
.sp-drawer-head { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sp-drawer-title { font-weight: 650; font-size: 16px; }
.sp-drawer-head .icon-btn { margin-left: auto; }
.sp-drawer-body { flex: 1; overflow: auto; padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.sp-drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 4px 0; font-size: 13.5px; }
.sp-facts dt { color: var(--muted); }
.sp-facts dd { margin: 0; white-space: pre-wrap; }
.sp-result { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.sp-result .grow { flex: 1; min-width: 0; }

/* ----- editor tools, link card, best time ----- */
.sp-editor-tools { display: flex; gap: 6px; margin: -4px 0 0; }
.sp-editor-tools .icon-btn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sp-at { font: 600 15px/1 inherit; color: #475467; cursor: pointer; }
.sp-linkcard { display: grid; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--text); }
.sp-linkcard img { width: 100%; max-height: 180px; object-fit: cover; }
.sp-linkcard-text { padding: 8px 10px; display: grid; gap: 2px; background: var(--bg); font-size: 13px; }
.sp-besttime { display: grid; gap: 6px; }
.sp-besttime .sp-row { flex-wrap: wrap; }
.sp-shortlink { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; background: var(--bg); word-break: break-all; }
.sp-shortpreview { display: grid; gap: 4px; }
.sp-mentions { display: grid; gap: 2px; max-height: 280px; overflow: auto; }

/* ----- watermarks ----- */
.sp-wm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 12px; }
.sp-wm-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.sp-wm-thumb { height: 110px; border-radius: 8px; display: grid; place-items: center; background: repeating-conic-gradient(#eef1f5 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; }
.sp-wm-thumb img { max-width: 80%; max-height: 90px; object-fit: contain; }
.sp-wm-meta { display: grid; gap: 4px; }
.sp-wm-name { font-weight: 600; font-size: 14px; }
.sp-wm-tag { position: relative; justify-self: start; margin-top: -34px; margin-left: 8px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(15, 23, 42, .7); color: #fff; }
.sp-wm-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sp-wm-form { display: grid; gap: 10px; }
.sp-wm-preview { position: sticky; top: 0; display: grid; gap: 6px; }
.sp-wm-canvas { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.sp-align { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.sp-align-cell { width: 34px; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.sp-align-cell.on { background: var(--brand); border-color: var(--brand); }
.sp-range-out { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.sp-row > input[type=range] { padding: 0; }

/* ----- Global settings switch ----- */
.sp-global td { vertical-align: middle; }
label.sp-switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; font-size: 13.5px; color: var(--text); font-weight: 400; }
.sp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-switch-track { width: 36px; height: 20px; border-radius: 999px; background: #d0d5dd; position: relative; transition: background .15s; flex: none; }
.sp-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .2); transition: transform .15s; }
.sp-switch input:checked + .sp-switch-track { background: var(--brand); }
.sp-switch input:checked + .sp-switch-track::after { transform: translateX(16px); }
.sp-switch input:focus-visible + .sp-switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sp-switch-track, .sp-switch-track::after { transition: none; } }

/* ----- GHL's left-menu pages: Content and "Social planner settings" ----- */
.sp-split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-split-main { min-width: 0; }
.sp-split-body { padding: 20px; display: grid; gap: 14px; }
.sp-sidenav { display: grid; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: 12px; }
.sp-sidenav-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; }
.sp-sidenav-item > .ico { color: var(--muted); flex: none; }
.sp-sidenav-item .grow { flex: 1; min-width: 0; }
.sp-sidenav-item:hover { background: var(--hover); }
.sp-sidenav-item.on { background: var(--brand-soft); color: var(--brand); box-shadow: inset -2px 0 0 var(--brand); }
.sp-sidenav-item.on > .ico { color: var(--brand); }
.sp-new { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #fde68a; color: #713f12; }
.sp-settings-head { display: flex; align-items: center; padding: 4px 4px 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sp-back { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 4px; font: inherit; font-size: 16.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.sp-back:hover { color: var(--brand); }
/* Lists without the post table's checkbox column: the first column is text. */
.sp-table.sp-ghl th:first-child, .sp-table.sp-ghl td:first-child { width: auto; text-align: left; }
.sp-list-tools { display: flex; gap: 8px; align-items: center; }
.sp-list-tools .grow { flex: 1; }
/* GHL's illustrated empty list: stacked photo cards and a round plus. */
.sp-empty-big { padding: 72px 12px; display: grid; justify-items: center; gap: 6px; }
.sp-empty-big .btn { margin-top: 12px; }
.sp-empty-art { position: relative; width: 150px; height: 110px; margin-bottom: 14px; }
.sp-empty-art span:not(.sp-empty-plus) { position: absolute; width: 74px; height: 64px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(16, 24, 40, .08); }
.sp-empty-art span:nth-child(1) { left: 8px; top: 26px; transform: rotate(-14deg); }
.sp-empty-art span:nth-child(2) { left: 38px; top: 4px; }
.sp-empty-art span:nth-child(3) { right: 8px; top: 26px; transform: rotate(14deg); }
.sp-empty-plus { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #667085; color: #fff; box-shadow: 0 6px 14px rgba(16, 24, 40, .25); }

/* ----- CSV upload ----- */
.sp-drop { position: relative; display: grid; place-items: center; gap: 4px; padding: 22px; border: 1.5px dashed var(--line); border-radius: 10px; text-align: center; cursor: pointer; color: var(--text); margin: 0; }
.sp-drop.drop, .sp-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.sp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sp-tips { font-size: 13.5px; }
.sp-tips summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.sp-tips > div { margin-top: 8px; }

@media (max-width: 760px) {
  .sp-compose, .sp-wm-layout, .sp-split { grid-template-columns: 1fr; }
  .sp-sidenav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .sp-sidenav-item { white-space: nowrap; }
  .sp-compose-side { position: static; }
  .sp-cal-day { min-height: 64px; padding: 4px; }
  .sp-cal-post { font-size: 0; height: 6px; padding: 0; border-left: 0; }
  .sp-cal-post .sp-av { display: none; }
  .sp-cal-dow { font-size: 12.5px; padding: 6px 0; }
  .sp-cal-head { flex-wrap: wrap; gap: 8px; }
  .sp-seg button { min-width: 72px; }
  .sp-week-head, .sp-week-body { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
  .sp-head { gap: 4px 16px; }
  .sp-bar { flex-wrap: wrap; }
  .sp-bar .grow { display: none; }
  .sp-dates { flex: 1 1 100%; }
  .sp-date-in { flex: 1 1 0; width: auto; }
  .sp-welcome-nets { display: none; }
  .sp-bar .sp-search { min-width: 0; flex: 1 1 100%; }
  .sp-tiles { grid-template-columns: 1fr 1fr; }
  .sp-foot { justify-content: center; }
}

/* ----- Settings › Social accounts (GHL's Social Integration panel) ----- */
.sp-acc { display: grid; gap: 16px; }
.sp-acc-head, .sp-panel-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sp-acc-head > div:first-child, .sp-panel-head > div:first-child { flex: 1 1 200px; min-width: 0; }
.sp-split-body > * { min-width: 0; }
.sp-acc-title { font-size: 18px; font-weight: 600; color: #101828; letter-spacing: -0.01em; }
.sp-panel-heading { font-size: 14.5px; font-weight: 500; color: #344054; margin-top: 4px; }
.sp-acc-sub { font-size: 14px; color: #667085; margin-top: 4px; }
.sp-acc-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-acc-link { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 500; color: var(--brand); cursor: pointer; }
.sp-acc-link:hover { text-decoration: underline; }
.sp-acc-vr { width: 1px; height: 28px; background: var(--line); }
.sp-acc-invite, .sp-acc-connect { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; font-size: 15px; border-radius: 8px; }
.sp-acc-invite { color: var(--brand); border-color: #c7d7fb; }
.sp-acc-invite:hover { background: #f5f8ff; }
.sp-strip-wrap { overflow-x: scroll; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #98a2b3 #eaecf0; }
.sp-strip-wrap::-webkit-scrollbar { height: 10px; }
.sp-strip-wrap::-webkit-scrollbar-track { background: #eaecf0; border-radius: 6px; }
.sp-strip-wrap::-webkit-scrollbar-thumb { background: #98a2b3; border-radius: 6px; }
.sp-strip { display: flex; gap: 8px; width: max-content; min-width: calc(100% + 120px); border-bottom: 1px solid var(--line); }
.sp-strip-tab { display: inline-flex; align-items: center; gap: 9px; flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 12px 10px; margin-bottom: -1px; font: inherit; font-size: 15.5px; color: #475467; cursor: pointer; white-space: nowrap; }
.sp-strip-tab:hover { color: #101828; }
.sp-strip-tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.sp-brand { flex: none; }
.sp-acc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--surface); }
.sp-seg-btn { background: none; border: 0; padding: 6px 14px; border-radius: 6px; font: inherit; font-size: 15px; color: #475467; cursor: pointer; }
.sp-seg-btn:hover { background: var(--hover); }
.sp-seg-btn.on { color: var(--brand); font-weight: 500; }
.sp-acc-search { margin-left: auto; height: 40px; min-width: 420px; max-width: 100%; }
.sp-acc-table th { font-size: 15.5px; font-weight: 600; color: #101828; height: 52px; }
.sp-acc-table th .ico { width: 18px; height: 18px; color: #344054; }
.sp-acc-table td { height: 74px; font-size: 15.5px; color: #344054; }
.sp-acc-table th:last-child, .sp-acc-table td:last-child { width: 72px; }
.sp-acc-table th.sp-col-account { width: 34%; }
.sp-acc-table .icon-btn .ico { width: 18px; height: 18px; }
.sp-acc-who { display: flex; align-items: center; gap: 14px; }
.sp-acc-who .sp-av, .sp-acc-who .sp-av img, .sp-acc-who .sp-av .sp-ini { width: 34px; height: 34px; }
.sp-acc-who .sp-net { width: 16px; height: 16px; }
.sp-acc-name { color: #101828; }
.sp-acc-table .sp-status { padding: 4px 12px; font-size: 14.5px; }
.sp-acc-table .sp-status[data-status="expired"] { background: #fef3f2; color: #d92d20; }
.sp-acc-table .sp-status .ico { display: none; }
.sp-acc-reconnect { background: none; border: 0; padding: 0; font: inherit; font-size: 15.5px; font-weight: 600; color: var(--brand); cursor: pointer; }
.sp-acc-reconnect:hover { text-decoration: underline; }
.sp-acc-table .sp-switch-track { width: 40px; height: 22px; }
.sp-acc-table .sp-switch-track::after { width: 18px; height: 18px; }
.sp-acc-table .sp-switch input:checked + .sp-switch-track::after { transform: translateX(18px); }
.sp-acc-table .sp-switch input:checked + .sp-switch-track { background: #5b8def; }
.sp-switch-labelled { gap: 10px; }

/* ----- Connect socials ----- */
.sp-connect { gap: 0 !important; }
.sp-connect-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.sp-connect-row:last-child { border-bottom: 0; }
.sp-connect-mark { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.sp-connect-text { flex: 1; min-width: 0; }
.sp-connect-name { font-weight: 600; font-size: 14.5px; }

/* ----- invites and shareable links ----- */
.sp-invite-desc { font-size: 13.5px; color: #475467; }
.sp-invite-label { font-size: 13px; font-weight: 600; color: #344054; }
.sp-invite-radios { display: flex; gap: 18px; }
.sp-radio { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; cursor: pointer; }
.sp-radio input { width: auto; margin: 0; }
.sp-invite-pw { display: grid; gap: 6px; }
.sp-invite-pw[hidden] { display: none; }
.sp-invite-reqs { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.sp-invite-allow { align-items: flex-start; font-size: 13.5px; }
.sp-invite-allow input { margin-top: 3px; width: auto; }
.sp-invite-err { color: #b03636; font-size: 13px; }
.sp-invite-err:empty { display: none; }
.sp-invite-field { display: grid; gap: 6px; }
.sp-invite-copy { display: flex; gap: 6px; align-items: center; }
.sp-invite-copy input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.sp-invite-preview { display: grid; gap: 6px; }
.sp-invite-mail { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; color: #475467; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.sp-links-count { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.sp-notif-name { font-weight: 500; color: #101828; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; }
.sp-chip-x { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; display: inline-grid; place-items: center; }

/* ----- categories ----- */
.sp-cat { display: flex; align-items: center; gap: 10px; }
.sp-cat-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.sp-cat-colours { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-cat-colour { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sp-cat-colour.on { border-color: #101828; box-shadow: 0 0 0 2px #fff inset; }

/* ----- Landing: before any network is connected (sp-landing.js) --------------
   GHL's "Grow your audience…" page: centred pitch, two rows of five network
   tiles, the client-invite banner, four feature cards. */
.sp-landing-card { padding: 0; }
.sp-landing { padding: 40px 32px 36px; max-width: 1360px; margin: 0 auto; }
.sp-land-title { margin: 8px 0 12px; text-align: center; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.sp-land-sub { margin: 0 auto 40px; max-width: 1060px; text-align: center; font-size: 17px; line-height: 1.6; color: var(--muted); }
.sp-land-h2 { margin: 0 0 6px; text-align: center; font-size: 18px; font-weight: 600; }
.sp-land-h2.spaced { margin-top: 40px; }
.sp-land-hint { margin: 0 0 26px; text-align: center; font-size: 15px; color: var(--muted); }
.sp-land-group { margin: 0 0 12px; font-size: 15px; font-weight: 500; color: var(--dim); }
.sp-land-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.sp-land-net { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 12px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.sp-land-tile { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; }
.sp-land-tile.outlined { border: 1px solid var(--line); }
.sp-land-name { font-size: 16px; font-weight: 500; }
.sp-land-connect { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border: 0; border-radius: 8px; background: var(--hover); color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.sp-land-connect:hover { background: var(--brand-soft); color: var(--brand); }
.sp-land-connect:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sp-land-invite { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); font-size: 16px; }
.sp-land-invite .btn { background: var(--brand); border-color: var(--brand); color: #fff; padding: 11px 20px; font-size: 15px; font-weight: 600; }
.sp-land-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.sp-land-feat { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.sp-land-art { height: 292px; display: grid; place-items: center; padding: 0 28px; }
.sp-land-art.violet { background: linear-gradient(160deg, #f1ecff, #e6e0fb); }
.sp-land-art.mint { background: linear-gradient(160deg, #eafaf1, #c9f1da); }
.sp-land-art.sun { background: linear-gradient(160deg, #fff8e5, #fde9a6); }
.sp-land-art.sky { background: linear-gradient(160deg, #eaf2ff, #cfe0fb); }
.sp-land-feat-text { padding: 22px 22px 24px; }
.sp-land-feat-title { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.sp-land-feat-text p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
/* the previews: small white cards, always light, whatever the theme */
.sp-art-card { width: 100%; padding: 16px; border-radius: 14px; background: #fff; color: #344054; box-shadow: 0 8px 24px -14px rgba(16, 24, 40, .35); }
.sp-art-label { font-size: 12px; font-weight: 500; color: #2563c9; }
.sp-art-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sp-art-pill { padding: 2px 9px; border-radius: 99px; background: #e3edfd; color: #2563c9; font-size: 10px; font-weight: 500; }
.sp-th { display: block; border-radius: 6px; background: linear-gradient(135deg, #b9774a, #6b3a24); }
.sp-th.t1 { background: linear-gradient(135deg, #e5b08e, #b0452a); }
.sp-th.t2 { background: linear-gradient(135deg, #3b4f6e, #c68a7a); }
.sp-th.t3 { background: linear-gradient(135deg, #f2c8a8, #d98d7a); }
.sp-th.t4 { background: linear-gradient(135deg, #3d4a5a, #8da2b8); }
.sp-th.t5 { background: linear-gradient(135deg, #d9e3ec, #7d93a8); }
.sp-th.t6 { background: linear-gradient(135deg, #20303f, #5a7c93); }
.sp-th.t7 { background: linear-gradient(135deg, #cfd9e6, #94a8c0); }
.sp-th.t8 { background: linear-gradient(135deg, #f0c9b6, #c98a7a); }
.sp-th.more { display: grid; place-items: center; background: #f2f4f7; color: #667085; font-size: 14px; font-weight: 500; }
.sp-art-bulk { position: relative; display: flex; align-items: flex-end; gap: 12px; margin-top: 22px; }
.sp-th.big { width: 100px; height: 104px; border-radius: 10px; }
.sp-art-phone { flex: 1; min-width: 0; padding: 8px; border: 1px solid #eaecf0; border-radius: 10px; background: #fff; box-shadow: 0 4px 14px -8px rgba(16, 24, 40, .4); }
.sp-art-who { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; font-size: 7px; white-space: nowrap; }
.sp-art-who i { width: 8px; height: 8px; border-radius: 50%; background: #2563c9; }
.sp-art-img { height: 58px; display: grid; place-items: center; border-radius: 6px; background: #f2f4f7; color: #c4cad4; }
.sp-art-stats { margin-top: 5px; font-size: 6px; color: #98a2b3; white-space: nowrap; overflow: hidden; }
.sp-art-badge { position: absolute; left: -8px; bottom: -14px; width: 40px; height: 40px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: #1f5fe0; color: #fff; font-size: 13px; font-weight: 600; }
.sp-art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.sp-art-grid .sp-th { aspect-ratio: 4 / 3; }
.sp-art-days { display: flex; justify-content: space-between; margin-bottom: 10px; }
.sp-art-days span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: #eef1f5; color: #667085; font-size: 10px; font-weight: 500; }
.sp-art-days span.on { background: #1f5fe0; color: #fff; }
.sp-art-days span.dim { opacity: .45; }
.sp-art-at { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; background: #e3edfd; color: #2563c9; font-size: 11px; }
.sp-art-dots { display: flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 10px; color: #98a2b3; }
.sp-art-dots i { width: 18px; height: 18px; border-radius: 50%; }
.sp-art-dots span { margin-left: 2px; }
.sp-art-rss { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.sp-art-rss .sp-th { width: 30px; height: 30px; flex: none; border-radius: 5px; }
.sp-lines { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sp-lines i { display: block; height: 3px; border-radius: 2px; background: #e4e7ec; }
.sp-lines i:first-child { width: 90%; }
.sp-lines i:nth-child(2) { width: 62%; }
.sp-lines small { font-size: 9px; color: #98a2b3; }
@media (max-width: 1180px) {
  .sp-land-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-land-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sp-landing { padding: 24px 16px; }
  .sp-land-title { font-size: 24px; }
  .sp-land-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-land-feats { grid-template-columns: 1fr; }
  .sp-land-invite { flex-direction: column; align-items: stretch; text-align: center; }
}
/* ----- Statistics (public/sp-stats.js): GHL's left list, toolbar, totals
   and cards. Every colour here is GHL's own. ----- */
.sps { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 20px; align-items: start; }
.sps-menu { display: grid; gap: 2px; padding: 8px 0 8px 4px; }
.sps-menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px 0 0 6px; padding: 15px 20px; font: inherit; font-size: 17px; color: #101828; cursor: pointer; }
.sps-menu-item:hover { background: var(--hover); }
.sps-menu-item.on { background: var(--surface); color: #1570ef; }
.sps-main { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 24px; min-width: 0; }
.sps-main.loading { opacity: .6; }
.hint { color: var(--muted); font-size: 13px; }
.sps-block { border: 1px solid #d0d5dd; border-radius: 6px; padding: 24px; background: var(--surface); display: grid; gap: 16px; min-width: 0; }

/* toolbar */
.sps-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sps-picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: clamp(200px, 22vw, 320px); max-width: 100%; height: 50px; padding: 0 14px 0 16px; border: 1px solid #d0d5dd; border-radius: 8px; background: var(--surface); font: inherit; color: #667085; cursor: pointer; }
.sps-picker:hover { border-color: #98a2b3; }
.sps-picker .sp-stack .sp-av + .sp-av { margin-left: -6px; }
.sps-picker-more, .sps-picker-none { font-size: 13px; color: #475467; align-self: center; margin-left: 8px; }
.sps-rule { width: 1px; height: 24px; background: #d0d5dd; flex: none; }
.sps-date { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid #d0d5dd; border-radius: 8px; background: var(--surface); font: inherit; font-size: clamp(13px, 1.05vw, 16px); white-space: nowrap; color: #344054; cursor: pointer; }
.sps-date:hover { border-color: #98a2b3; }
.sps-date .ico { color: #667085; }
.sps-vs { color: #667085; margin: 0 4px; }
.sps-pop { min-width: 280px; max-width: 360px; padding: 6px; }
.sps-pop-search { width: 100%; margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.sps-pop-list { max-height: 320px; overflow: auto; display: grid; gap: 2px; }
.sps-pop-list .sp-pop-item { display: flex; align-items: center; gap: 10px; }
.sps-datepop { width: 310px; padding: 4px; }
.sps-datepop-group { display: grid; gap: 10px; padding: 8px 12px; border-radius: 6px; }
.sps-datepop-title { font-size: 14px; font-weight: 500; color: #344054; }
.sps-datepop-group select { width: 100%; height: 34px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 8px; font: inherit; font-size: 14px; background: var(--surface); }
.sps-datepop-row { display: flex; gap: 12px; }
.sps-datepop-field { flex: 1; display: grid; gap: 4px; }
.sps-datepop-field label { font-size: 12px; color: #667085; }
.sps-datepop-field input { width: 100%; padding: 8px 10px; border: 1px solid #d0d5dd; border-radius: 6px; font: inherit; font-size: 14px; color: #344054; }
.sps-datepop-rule { height: 1px; background: #e4e7ec; margin: 8px 12px 4px; }
.sps-datepop-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid #e4e7ec; margin-top: 6px; }

/* the five totals */
.sps-totals { display: flex; }
.sps-total { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sps-total + .sps-total { border-left: 1px solid #e4e7ec; padding-left: clamp(12px, 1.6vw, 32px); }
.sps-total:not(:last-child) { padding-right: clamp(12px, 1.6vw, 32px); }
.sps-total-head { display: flex; align-items: center; gap: 12px; }
.sps-total-icon { width: clamp(36px, 2.6vw, 44px); height: clamp(36px, 2.6vw, 44px); border-radius: 50%; flex: none; display: grid; place-items: center; }
.sps-total-label { display: flex; align-items: center; gap: 8px; font-size: clamp(14px, 1.3vw, 20px); font-weight: 500; color: #475467; line-height: 1.3; }
.sps-total-label > span { max-width: 6.2em; }
.sps-total-value { margin: 0; font-size: clamp(32px, 3.1vw, 46px); font-weight: 600; letter-spacing: -0.02em; color: #101828; line-height: 1; }
.sps-total-delta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #667085; margin-top: -6px; }

/* titles, badges, info */
.sps-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sps-sec-title { display: flex; align-items: center; gap: 8px; }
.sps-sec-title h3 { margin: 0; font-size: 22px; font-weight: 500; color: #101828; }
.sps-sec-title .ico { color: #344054; }
.sps-info { position: relative; display: inline-grid; place-items: center; color: #98a2b3; cursor: help; }
.sps-tip { position: fixed; z-index: 60; width: 320px; padding: 12px 14px; border-radius: 8px; background: #101828; color: #fff; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 24px rgba(16, 24, 40, .25); cursor: default; text-align: left; font-weight: 400; text-transform: none; }
.sps-tip p { margin: 0; }
.sps-tip-row + .sps-tip-row { margin-top: 10px; }
.sps-tip-t { font-weight: 600; margin-bottom: 2px !important; }
.sps-tip-li { display: flex; gap: 8px; }
.sps-tip-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; margin-top: 7px; flex: none; }
.sps-tip-socials { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.sps-net { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; flex: none; font-size: 10px; }
.sps-net b { font-size: 11px; }
.sps-netcell { display: flex; align-items: center; gap: 12px; color: #101828; }
.sps-badge { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sps-badge.up { color: #079455; background: #ecfdf3; }
.sps-badge.down { color: #d92d20; background: #fef3f2; }
.sps-badge.flat { color: #475467; background: #f9fafb; }
.sps-pill { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: #f2f4f7; color: #475467; }
.sps-th { display: inline-flex; align-items: center; gap: 8px; }
.sps-th .ico { color: #98a2b3; }

/* tables */
.sps-table-wrap { border: 1px solid #e4e7ec; border-radius: 8px; overflow-x: auto; }
.sps-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sps-table th { text-align: left; font-weight: 500; color: #475467; height: 44px; padding: 0 16px; background: #f9fafb; border-bottom: 1px solid #e4e7ec; border-right: 1px solid #e4e7ec; white-space: nowrap; }
.sps-table th .sps-info { margin-left: 6px; vertical-align: -3px; }
.sps-table td { height: 48px; padding: 6px 16px; border-bottom: 1px solid #e4e7ec; border-right: 1px solid #e4e7ec; color: #101828; font-weight: 500; vertical-align: middle; }
.sps-table th:last-child, .sps-table td:last-child { border-right: 0; }
.sps-table tr:last-child td { border-bottom: 0; }
.sps-table tbody tr:hover td { background: var(--hover); }
.sps-table tr.dim td { opacity: .5; }
.sps-table .num { text-align: right; }
.sps-post { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sps-post .sp-media, .sps-post .sp-media-ph { margin: 0; flex: none; }
.sps-post-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; color: #475467; font-weight: 400; }
.sps-open { color: #1570ef; display: inline-grid; }
.sps-sort { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #d0d5dd; border-radius: 8px; background: var(--surface); font: inherit; font-size: 14px; color: #344054; cursor: pointer; }
.sps-sort .ico { color: #667085; }

/* charts */
.sps-chart { position: relative; width: 100%; }
.sps-chart svg { display: block; }
.sps-axis { font-size: 12px; fill: #6E7079; }
.sps-axis-name { font-size: 14px; fill: #555; }
.sps-chart-tip { position: absolute; z-index: 5; width: 220px; padding: 10px 12px; border-radius: 6px; background: #fff; border: 1px solid #e4e7ec; box-shadow: 0 6px 18px rgba(16, 24, 40, .12); font-size: 13px; pointer-events: none; }
.sps-chart-tip-t { font-weight: 600; margin-bottom: 6px; color: #101828; }
.sps-chart-tip-r { display: flex; align-items: center; gap: 8px; color: #475467; }
.sps-chart-tip-r .grow { flex: 1; }
.sps-chart-tip-r b { color: #101828; }
.sps-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sps-legend { display: flex; gap: 20px; padding-left: 12px; }
.sps-legend-col { display: grid; gap: 4px; align-content: start; }
.sps-legend-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #667085; text-transform: capitalize; }
.sps-metric-legend { display: flex; justify-content: center; align-items: center; gap: 16px; }

/* a metric card: the gauge beside its table */
.sps-metric { display: flex; gap: 32px; align-items: flex-start; }
.sps-metric-gauge { width: 40%; display: flex; flex-direction: column; align-items: center; }
.sps-gauge { width: 320px; max-width: 100%; height: auto; }
.sps-gauge-label { font-size: 14px; fill: #475467; }
.sps-gauge-value { font-size: 45px; font-weight: 500; fill: #3E4A59; }
.sps-metric-under { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: -12px; }
.sps-metric-under p { margin: 0; font-size: 14px; color: #667085; }
.sps-metric .sps-table-wrap { width: 60%; }

/* link clicks by socials */
.sps-linkbars { display: grid; gap: 10px; }
.sps-linkbar { display: grid; grid-template-columns: 90px minmax(0, 1fr) 56px; align-items: center; gap: 12px; font-size: 14px; }
.sps-linkbar.dim { opacity: .5; }
.sps-linkbar-label { color: #475467; }
.sps-linkbar-track { height: 10px; border-radius: 999px; background: #f2f4f7; overflow: hidden; }
.sps-linkbar-fill { height: 100%; border-radius: 999px; min-width: 0; transition: width .2s; }
.sps-linkbar-value { text-align: right; color: #101828; font-weight: 500; }

/* engagement stats */
.sps-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 8px; background: #f2f4f7; }
.sps-tab { border: 0; background: none; padding: 8px 14px; border-radius: 6px; font: inherit; font-size: 15px; color: #475467; cursor: pointer; }
.sps-tab.on { background: var(--surface); color: #101828; box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.sps-pt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sps-pt-card { display: flex; gap: 8px; padding: 12px; border-radius: 6px; background: #f9fafb; }
.sps-pt-card.dim { opacity: .5; }
.sps-ring { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 2px; }
.sps-pt-label { font-size: 14px; color: #667085; text-transform: capitalize; }
.sps-pt-value { font-size: 20px; font-weight: 500; color: #101828; }

/* empty states */
.sps-empty { text-align: center; padding: 36px 12px; color: #475467; font-size: 14px; display: grid; justify-items: center; gap: 6px; }
.sps-empty-page { padding: 64px 12px; min-height: 50vh; align-content: center; }
.sps-empty-icon { color: #98a2b3; margin-bottom: 8px; }
.sps-empty-ring { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #d1e9ff; border: 8px solid #eff8ff; color: #1570ef; margin-bottom: 10px; box-sizing: content-box; }
.sps-empty-title { color: #101828; font-weight: 600; font-size: 15px; }
.sps-empty .btn { margin-top: 10px; }

@media (max-width: 1560px) {
  .sps { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
  .sps-main { padding: 20px; gap: 20px; }
  .sps-block { padding: 20px; }
  .sps-total-head { gap: 8px; }
  .sps-total-icon { width: 32px; height: 32px; }
  .sps-total-icon .ico { width: 16px; height: 16px; }
  .sps-total-label { gap: 6px; font-size: 13px; }
  .sps-total + .sps-total { padding-left: 14px; }
  .sps-total:not(:last-child) { padding-right: 14px; }
  .sps-total-value { font-size: 34px; }
  .sps-total-delta { font-size: 11.5px; gap: 5px; white-space: nowrap; }
  .sps-total-delta .sps-badge { font-size: 12px; padding: 1px 6px; }
}
@media (max-width: 1100px) {
  .sps { grid-template-columns: 1fr; }
  .sps-menu { grid-auto-flow: column; overflow-x: auto; padding: 0; }
  .sps-menu-item { white-space: nowrap; border-radius: 6px; padding: 10px 14px; }
  .sps-totals { flex-wrap: wrap; gap: 16px; }
  .sps-total { flex: 1 1 160px; }
  .sps-total + .sps-total { border-left: 0; padding-left: 0; }
  .sps-metric { flex-direction: column; }
  .sps-metric-gauge, .sps-metric .sps-table-wrap { width: 100%; }
}
/* ----- Comments (sp-comments.js): GHL's left menu of networks, the inbox toolbar,
   one card per post with its comments, and the thread drawer ----------------- */
.sp-cm { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.sp-cm-nets { display: grid; gap: 2px; padding: 2px 0; }
.sp-cm-net { display: flex; align-items: center; gap: 12px; width: 100%; height: 50px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 16px; color: #344054; text-align: left; cursor: pointer; }
.sp-cm-net:hover { background: var(--hover); }
.sp-cm-net.on { background: #eff6ff; color: var(--brand); font-weight: 500; }
.sp-cm-net.off { color: #98a2b3; cursor: not-allowed; }
.sp-cm-net.off .sp-cm-brand { opacity: .45; }
.sp-cm-net .grow { flex: 1; min-width: 0; }
.sp-cm-brand { flex: none; }
.sp-cm-count { background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; }
.sp-cm-main { padding: 20px; min-height: 72vh; }
.sp-cm-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.sp-cm-bar .grow { flex: 1; }
.sp-cm-select { height: 42px; min-width: 232px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 8px; appearance: none; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; }
.sp-cm-bar .sp-who { min-width: 236px; height: 42px; justify-content: space-between; }
.sp-cm-bar .sp-dates { height: 42px; }
.sp-cm-bar .sp-date-in { width: 198px; font-size: 15px; }
.sp-cm-ph { color: #667085; }
.sp-cm-search { min-width: 296px; height: 42px; }
.sp-cm-tool { width: 36px; height: 36px; color: #475467; }
.sp-cm-tool:disabled { opacity: .45; cursor: not-allowed; }
.sp-cm-empty { min-height: 58vh; display: grid; place-content: center; text-align: center; color: #475467; font-size: 16.5px; gap: 6px; }
.sp-cm-empty-text { color: var(--muted); font-size: 14px; }
.sp-cm-posts { display: grid; gap: 24px; }
.sp-cm-post { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.sp-cm-post-head { padding: 12px 16px; display: grid; gap: 10px; }
.sp-cm-post-head:not(.drawer) { cursor: pointer; }
.sp-cm-post-head:not(.drawer):hover { background: #f9fafb; }
.sp-cm-post-who { display: flex; align-items: center; gap: 10px; }
.sp-cm-post-names { flex: 1; min-width: 0; }
.sp-cm-post-name { font-weight: 600; font-size: 14px; }
.sp-cm-post-when { font-size: 12px; color: var(--muted); }
.sp-cm-post-link { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--brand); text-decoration: none; }
.sp-cm-post-cap { display: flex; gap: 10px; align-items: flex-start; }
.sp-cm-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg); }
.sp-cm-post-text { font-size: 14px; color: var(--text); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-cm-post-head.drawer .sp-cm-post-text { -webkit-line-clamp: 6; }
.sp-cm-comments { padding: 12px 16px; display: grid; gap: 16px; border-top: 1px solid #f2f4f7; }
.sp-cm-comments:not(.drawer) { cursor: pointer; }
.sp-cm-comments.drawer { padding: 16px 18px; border-top: 0; }
.sp-cm-c { display: flex; gap: 10px; align-items: flex-start; }
.sp-cm-c.hidden .sp-cm-bubble { opacity: .55; }
.sp-cm-c-body { flex: 1; min-width: 0; }
.sp-cm-bubble { background: #f2f4f7; border-radius: 12px; padding: 8px 12px; display: inline-block; max-width: 100%; }
.sp-cm-c-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.sp-cm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.sp-cm-author { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.sp-cm-hidden { font-size: 11px; font-weight: 500; color: #b54708; background: #fdf3e2; border-radius: 4px; padding: 0 5px; }
.sp-cm-c-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-cm-c-acts { display: flex; align-items: center; gap: 12px; padding: 4px 12px 0; font-size: 12px; color: #475467; min-height: 24px; }
.sp-cm-c-when { font-size: 12px; color: var(--muted); }
.sp-cm-act { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: #475467; cursor: pointer; }
.sp-cm-act:hover { text-decoration: underline; }
.sp-cm-act.on, .sp-cm-act.link { color: var(--brand); }
.sp-cm-likes { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-size: 12px; color: #475467; }
.sp-cm-likes .ico { background: var(--brand); color: #fff; border-radius: 50%; padding: 3px; width: 18px; height: 18px; box-sizing: border-box; }
.sp-cm-c-more { width: 24px; height: 24px; color: var(--muted); opacity: 0; }
.sp-cm-c:hover > .sp-cm-c-body > .sp-cm-c-acts .sp-cm-c-more, .sp-cm-c-more:focus-visible { opacity: 1; }
.sp-cm-replies { display: grid; gap: 12px; margin-top: 12px; }
.sp-cm-reply { margin-top: 10px; }
.sp-cm-foot { padding: 12px 16px; border-top: 1px solid #f2f4f7; display: grid; gap: 12px; }
.sp-cm-foot-row { display: flex; justify-content: space-between; align-items: center; }
.sp-cm-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--brand); cursor: pointer; }
.sp-cm-link:hover { text-decoration: underline; }
.sp-cm-counts { display: flex; gap: 14px; font-size: 13px; color: #475467; }
.sp-cm-counts span { display: inline-flex; align-items: center; gap: 5px; }
.sp-cm-compose { display: flex; align-items: center; gap: 10px; margin: 0; }
.sp-cm-compose input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 20px; padding: 0 14px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.sp-cm-compose input:focus { outline: 0; border-color: var(--brand); }
.sp-cm-compose .icon-btn { color: var(--brand); }
.sp-cm-compose .icon-btn:disabled { color: var(--muted); cursor: default; }
.sp-cm-more { margin: 18px auto 0; display: block; }
.sp-cm-drawer-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .35); }
.sp-cm-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 550px; max-width: 100%; background: var(--surface); box-shadow: -12px 0 40px rgba(16, 24, 40, .2); display: flex; flex-direction: column; }
.sp-cm-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sp-cm-drawer-title { font-weight: 600; font-size: 16px; }
.sp-cm-drawer-scroll { flex: 1; overflow: auto; }
.sp-cm-drawer .sp-cm-post-head.drawer { border-bottom: 1px solid var(--line); }
.sp-cm-drawer-foot { border-top: 1px solid var(--line); padding: 12px 18px; display: grid; gap: 12px; }
@media (max-width: 900px) {
  .sp-cm { grid-template-columns: 1fr; }
  .sp-cm-nets { grid-auto-flow: column; overflow-x: auto; }
  .sp-cm-net { white-space: nowrap; }
  .sp-cm-drawer { width: 100%; }
}
/* ----- Social Intelligence (BETA): Social trends (public/sp-intel.js) ----- */
.sp-intel { display: flex; flex-direction: column; gap: 16px; padding: 0 14px 4px; }
.sp-intel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.sp-intel-title { margin: 0; font-size: 18px; font-weight: 600; color: #101828; }
.sp-intel-tools { display: flex; align-items: center; gap: 8px; }
.sp-intel-date { position: relative; display: flex; align-items: center; gap: 8px; width: 160px; height: 36px; padding: 0 12px; margin: 0; border: 1px solid #d0d5dd; border-radius: 8px; background: var(--surface); font-size: 14px; color: #101828; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.sp-intel-date .ico { flex: none; color: #667085; }
.sp-intel-date:hover { border-color: #b2b9c4; }
.sp-intel-date:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sp-intel-date input { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.sp-intel-date-text.placeholder { color: #98a2b3; }
.sp-intel-refresh { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #d0d5dd; border-radius: 8px; background: var(--surface); color: #475467; cursor: pointer; }
.sp-intel-refresh:hover { background: #f9fafb; color: #101828; }
.sp-intel-refresh .ico { width: 20px; height: 20px; }
.sp-intel-refresh.spin .ico { animation: sp-intel-spin 1s linear infinite; }
@keyframes sp-intel-spin { to { transform: rotate(360deg); } }
.sp-intel-updated { margin-top: -8px; display: flex; justify-content: flex-end; font-size: 12px; color: #98a2b3; }
.sp-intel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sp-intel-card { position: relative; display: flex; flex-direction: column; border: 1px solid #e4e7ec; border-radius: 12px; background: var(--surface); overflow: hidden; transition: box-shadow .2s, transform .2s, opacity .2s, filter .2s; }
.sp-intel-card:hover { box-shadow: 0 4px 6px -1px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .06); }
.sp-intel-card.on { box-shadow: 0 20px 25px -5px rgba(16, 24, 40, .12), 0 8px 10px -6px rgba(16, 24, 40, .1), 0 0 0 2px #60a5fa; transform: translateY(-2px); }
.sp-intel-card.dim { filter: blur(1px); opacity: .6; pointer-events: none; }
.sp-intel-cover { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.sp-intel-card.on .sp-intel-cover { display: none; }
.sp-intel-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid #f2f4f7; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sp-intel-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; flex: none; overflow: hidden; }
.sp-intel-mark img { width: 32px; height: 32px; display: block; }
.sp-intel-mark-letter { width: 32px; height: 32px; border-radius: 50%; background: #475467; color: #fff; font-weight: 700; font-size: 11px; display: inline-grid; place-items: center; }
.sp-intel-card-title { flex: 1; font-size: 14px; font-weight: 600; color: #101828; }
.sp-intel-live { position: relative; display: inline-flex; width: 8px; height: 8px; flex: none; }
.sp-intel-live .ping { position: absolute; inset: 0; border-radius: 50%; background: #4ade80; opacity: .75; animation: sp-intel-ping 1s cubic-bezier(0, 0, .2, 1) infinite; }
.sp-intel-live .dot { position: relative; display: inline-flex; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
@keyframes sp-intel-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.sp-intel-scroll { max-height: 420px; overflow-y: auto; outline: none; }
.sp-intel-card:not(.on) .sp-intel-scroll { pointer-events: none; }
.sp-intel-rows > * + * { border-top: 1px solid #f2f4f7; }
.sp-intel-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; transition: background .2s; }
.sp-intel-row:hover { background: #f9fafb; }
.sp-intel-rank { flex: none; width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: #98a2b3; font-variant-numeric: tabular-nums; }
.sp-intel-thumb, .sp-intel-tile { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px; flex: none; overflow: hidden; }
.sp-intel-thumb img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; display: block; }
.sp-intel-out { position: absolute; right: 2px; top: 2px; color: #3b82f6; opacity: 0; transition: opacity .15s; pointer-events: none; }
.sp-intel-row:hover .sp-intel-out { opacity: 1; }
.sp-intel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-intel-row-title { font-size: 13px; font-weight: 500; color: #101828; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-intel-metric { font-size: 12px; color: #98a2b3; margin-top: 2px; }
.sp-intel-side { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.sp-intel-side .ico.up { color: #22c55e; }
.sp-intel-side .ico.down { color: #ef4444; }
.sp-intel-change { font-size: 12px; font-weight: 600; }
.sp-intel-change.up { color: #16a34a; }
.sp-intel-change.down { color: #dc2626; }
.sp-intel-new { font-size: 12px; font-weight: 600; color: #16a34a; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; padding: 2px 6px; }
.sp-intel-tip { position: fixed; z-index: 90; max-width: 240px; padding: 6px 10px; border-radius: 6px; background: #101828; color: #fff; font-size: 12px; line-height: 1.4; white-space: pre-line; pointer-events: none; box-shadow: 0 4px 12px rgba(16, 24, 40, .2); }
.sp-intel-tip-title { font-weight: 600; margin-bottom: 2px; }
.sp-intel-tip-text { font-weight: 500; color: #d0d5dd; }
/* skeleton: GHL's TrendsSkeleton, six cards of a header and five rows */
.sp-intel-skel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f2f4f7; }
.sp-intel-skel-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.sp-skel { display: inline-block; background: #f2f4f7; background-image: linear-gradient(90deg, #f2f4f7 0%, #f8f9fb 40%, #f2f4f7 80%); background-size: 200% 100%; animation: sp-intel-shimmer 1.6s linear infinite; }
@keyframes sp-intel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sp-skel-mark { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.sp-skel-title { width: 128px; height: 14px; border-radius: 999px; }
.sp-skel-tile { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.sp-skel-line { flex: 1; height: 12px; border-radius: 999px; }
.sp-skel-short { width: 40px; height: 12px; border-radius: 999px; flex: none; }
@media (prefers-reduced-motion: reduce) { .sp-skel, .sp-intel-live .ping, .sp-intel-refresh.spin .ico { animation: none; } }
/* empty and error */
.sp-intel-center { display: flex; justify-content: center; padding: 80px 0; }
.sp-intel-state { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; max-width: 460px; }
.sp-intel-art { width: 100%; max-width: 320px; height: auto; margin-bottom: 8px; }
.sp-intel-state-title { font-size: 16px; font-weight: 600; color: #101828; }
.sp-intel-state-text { font-size: 14px; color: #667085; }
.sp-intel-state-hint { font-size: 13px; color: #98a2b3; margin-top: 4px; }
.sp-intel-state-foot { margin-top: 20px; }
.sp-intel .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1100px) { .sp-intel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sp-intel-grid { grid-template-columns: 1fr; } .sp-intel-head { flex-wrap: wrap; } }
