/* ── Reset ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: linear-gradient(160deg, #f4f7ff 0%, #f7f9fc 55%, #eef4ff 100%);
}

.app-update-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #123a72;
  color: #f3f8ff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.app-update-banner__text {
  font-size: 0.9rem;
  font-weight: 600;
}

.app-update-banner__actions {
  display: flex;
  gap: 0.45rem;
}

.app-update-banner[hidden] {
  display: none;
}

/* ── Cookie consent banner ──────────────────────────────────────────────── */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 0.7rem 1.25rem;
  background: #1f2a44;
  color: #e8edf8;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.cookie-consent-banner[hidden] {
  display: none;
}

.cookie-consent-banner__text {
  margin: 0;
  flex: 1 1 auto;
}

.cookie-consent-banner__link {
  color: #93b8f5;
  text-decoration: underline;
  white-space: nowrap;
}

.cookie-consent-banner__actions {
  display: flex;
  gap: 0.45rem;
  flex-shrink: 0;
}

.schema-warning-banner {
  position: sticky;
  top: 0;
  z-index: 1190;
  margin: 0;
  padding: 0.6rem 1rem;
  background: #fff3cd;
  color: #664d03;
  border-bottom: 1px solid #ffecb5;
  font-size: 0.88rem;
  font-weight: 600;
}

.schema-warning-banner[hidden] {
  display: none;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
  width: 100%;
}

/* ── Header row ────────────────────────────────────────────────────────────── */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.header-row__title-block {
  min-width: 280px;
}

.header-row h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2a44;
}

.header-row__subtitle {
  margin: 0.28rem 0 0;
  max-width: 68ch;
  font-size: 0.93rem;
  color: #4a5f88;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .header-row h1 {
    font-size: 1.3rem;
  }

  .header-row__subtitle {
    font-size: 0.86rem;
    white-space: normal;
  }
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
#main-tabs {
  margin-bottom: 0.75rem;
}

#main-tabs .nav-link {
  font-weight: 600;
}

.btn-icon {
  display: inline-block;
  margin-right: 0.35rem;
  line-height: 1;
}

/* ── Loading status ────────────────────────────────────────────────────────── */
.loading-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.6rem 0 0.25rem;
  color: #4a4a4a;
  font-size: 0.92rem;
}

.loading-status[hidden] {
  display: none;
}

.loading-status__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #0d6efd;
  animation: loading-pulse 1s ease-in-out infinite alternate;
}

.loading-status.is-error {
  color: #c62828;
}

.loading-status.is-error .loading-status__dot {
  background: #c62828;
  animation: none;
}

@keyframes loading-pulse {
  from { opacity: 0.35; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.15); }
}

/* ── Table loading/error surface ───────────────────────────────────────────── */
.table-skeleton {
  width: 100%;
  min-height: 420px;
  padding: 0.8rem;
  border: 1px solid #d8e2f5;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.07);
  background: #fff;
}

.table-skeleton[hidden] {
  display: none;
}

.table-skeleton__header,
.table-skeleton__row {
  border-radius: 8px;
  background: linear-gradient(90deg, #eaf0fc 25%, #f4f7ff 50%, #eaf0fc 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s linear infinite;
}

.table-skeleton__header {
  height: 36px;
  margin-bottom: 0.75rem;
}

.table-skeleton__row {
  height: 44px;
  margin-bottom: 0.55rem;
}

.table-error-panel {
  width: 100%;
  min-height: 220px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 1px solid #f4c7cc;
  border-radius: 12px;
  background: #fff6f7;
  color: #7e1f2a;
}

.table-error-panel[hidden] {
  display: none;
}

.table-error-panel__title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
}

.table-error-panel__text {
  margin: 0;
  font-size: 0.9rem;
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ── Filters dock + popover ───────────────────────────────────────────────── */
.filter-dock {
  position: fixed;
  left: -9999px;
  top: 0;
  width: min(420px, calc(100vw - 24px));
  opacity: 0;
  pointer-events: none;
}

.filter-popover {
  position: fixed;
  z-index: 25;
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d9e1f2;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(31, 42, 68, 0.16);
}

.filter-popover[hidden] {
  display: none;
}

.filter-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.filter-popover__heading {
  display: grid;
  gap: 0.2rem;
}

.filter-popover__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #223252;
}

.filter-popover__description {
  margin: 0;
  font-size: 0.82rem;
  color: #5f6f96;
  line-height: 1.35;
}

.filter-popover__close {
  width: 2rem;
  height: 2rem;
  border: 1px solid #c9d4ef;
  border-radius: 999px;
  background: #f5f8ff;
  color: #355a9e;
  font-size: 1.1rem;
  line-height: 1;
}

.filter-popover__close:hover,
.filter-popover__close:focus-visible {
  background: #eaf1ff;
  border-color: #9db8eb;
  outline: none;
}

.filter-popover__content {
  display: grid;
  gap: 0.65rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 220px;
  max-width: 280px;
}

.filter-field__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #5f6f96;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-help-btn {
  border: 0;
  background: transparent;
  color: #6682b8;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

.field-help-btn:hover,
.field-help-btn:focus-visible {
  color: #355a9e;
  outline: none;
}

.field-help-btn--inline {
  color: #5f6f96;
}

.field-help-btn__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: normal;
  text-transform: none;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.filter-multiselect {
  min-height: 40px;
}

.ts-wrapper.multi .ts-control {
  border-radius: 0.5rem;
  border-color: #c9d4ef;
  padding: 0.35rem 0.5rem;
  min-height: 42px;
}

.ts-wrapper.multi .ts-control > div {
  background: #e9f1ff;
  border: 1px solid #bfd2ff;
  border-radius: 999px;
  color: #2c3a5f;
  padding: 0.18rem 0.55rem;
}

.ts-wrapper .ts-dropdown {
  border-color: #c9d4ef;
  border-radius: 0.55rem;
  z-index: 30;
}

.ts-wrapper .ts-dropdown .active {
  background: #edf3ff;
  color: #1f2a44;
}

.date-range-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.filter-popover__content .filter-field,
.filter-popover__content .date-range-filter {
  max-width: none;
  flex: 1 1 auto;
}

.date-preset-wrap {
  display: grid;
  gap: 0.3rem;
}

.date-preset-wrap span {
  font-size: 0.78rem;
  color: #5a5a5a;
}

.date-preset-wrap .form-select {
  min-height: 42px;
  border-radius: 0.5rem;
  border-color: #c9d4ef;
  padding: 0.48rem 2.25rem 0.48rem 0.75rem;
  color: #2c3a5f;
  background-color: #eef3fb;
  box-shadow: none;
}

.date-preset-wrap .form-select:focus {
  border-color: #84a9ff;
  box-shadow: 0 0 0 0.2rem rgba(132, 169, 255, 0.25);
}

.date-range-filter__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.date-input-wrap {
  display: grid;
  gap: 0.3rem;
}

.date-input-wrap span {
  font-size: 0.78rem;
  color: #5a5a5a;
}

.date-range-filter input[type="date"] {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9d4ef;
  border-radius: 0.5rem;
  padding: 0.48rem 0.5rem;
  font: inherit;
  color: #323232;
  background: #fff;
}

.date-range-filter input[type="date"]:focus {
  outline: 2px solid #84a9ff;
  outline-offset: 1px;
}

.share-view-feedback {
  font-size: 0.82rem;
  color: #5f6f96;
}

.share-view-feedback.is-error {
  color: #c62828;
}

/* ── Column picker ─────────────────────────────────────────────────────────── */
.col-picker-wrap {
  position: relative;
  flex-shrink: 0;
}

.col-picker-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 1.5rem));
  box-shadow: 0 8px 24px rgba(31, 42, 68, 0.12);
}

.col-picker-panel.open {
  display: block;
}

.col-picker-heading {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6e6e6e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.col-picker-copy {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #5f6f96;
  line-height: 1.4;
}

.col-order-list {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.col-order-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.42rem 0.55rem;
  border: 1px solid #d9e3f5;
  border-radius: 0.7rem;
  background: #f8fbff;
  color: #31466f;
  font-size: 0.85rem;
  text-align: left;
  cursor: grab;
  user-select: none;
}

.col-order-item:hover,
.col-order-item:focus-visible {
  border-color: #9db8eb;
  background: #eef4ff;
  outline: none;
}

.col-order-item.is-hidden-column {
  opacity: 0.62;
}

.col-order-item.is-dragging {
  opacity: 0.5;
}

.col-order-item.is-drop-before {
  box-shadow: inset 0 3px 0 #5b84d7;
}

.col-order-item.is-drop-after {
  box-shadow: inset 0 -3px 0 #5b84d7;
}

.col-order-item__handle {
  color: #7a8fb8;
  flex: 0 0 auto;
}

.col-order-item__label {
  flex: 1 1 auto;
  min-width: 0;
}

.col-order-item__meta {
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 600;
  color: #6d7ea8;
}

.col-order-item__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  color: #48628f;
  cursor: pointer;
}

.col-order-item__toggle input {
  margin: 0;
}

.col-order-item__toggle span {
  white-space: nowrap;
}

.col-order-item__toggle:hover {
  color: #0d6efd;
}

.col-picker-reset-btn {
  margin-top: 0.65rem;
  width: 100%;
  border: 1px solid #c9d4ef;
  border-radius: 0.7rem;
  background: #f5f8ff;
  color: #355a9e;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.5rem 0.7rem;
}

.col-picker-reset-btn:hover,
.col-picker-reset-btn:focus-visible {
  background: #eaf1ff;
  border-color: #9db8eb;
  color: #26477f;
  outline: none;
}

@media (max-width: 820px) {
  .filter-popover {
    width: min(420px, calc(100vw - 24px)) !important;
  }
}

@media (max-width: 620px) {
  .date-range-filter__inputs {
    grid-template-columns: 1fr;
  }

  .filter-field,
  .date-range-filter {
    flex: 1 1 100%;
    min-width: 0;
  }

  .filter-popover {
    left: 12px !important;
    right: 12px;
    width: auto !important;
  }
}

/* ── Table ─────────────────────────────────────────────────────────────────── */
.table-container {
  width: 100%;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  border: 1px solid #d8e2f5;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.07);
  background: #fff;
}

.table-scroll-sentinel {
  width: 100%;
  height: 1px;
}

.table-shell {
  display: grid;
  gap: 0.45rem;
}

.table-shell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-results-summary {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 18rem;
  min-width: 0;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: #355a9e;
}

.table-results-summary__count {
  flex: 0 0 auto;
}

.table-results-summary__chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 16rem;
  min-width: 0;
  flex-wrap: wrap;
}

.table-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.26rem 0.6rem;
  border: 1px solid #c9d7f2;
  border-radius: 999px;
  background: #f5f8ff;
  color: #355a9e;
  font: inherit;
  line-height: 1.2;
}

.table-filter-chip:hover,
.table-filter-chip:focus-visible {
  background: #e9f1ff;
  border-color: #9db8eb;
  color: #26477f;
  outline: none;
}

.table-filter-chip__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-filter-chip__remove {
  flex: 0 0 auto;
  font-size: 0.92rem;
  line-height: 1;
}

.table-shell__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.table-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid #c9d4ef;
  background: #f5f8ff;
  color: #355a9e;
  box-shadow: 0 6px 18px rgba(31, 42, 68, 0.08);
}

.table-tool-btn:hover,
.table-tool-btn:focus-visible {
  background: #eaf1ff;
  border-color: #9db8eb;
  color: #26477f;
  outline: none;
}

.table-tool-btn--secondary {
  width: auto;
  padding: 0.5rem 0.8rem;
  gap: 0.45rem;
  font-weight: 600;
}

#main-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

#main-table th,
#main-table td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  border-color: #d7e2f6;
  border-right: 1px solid #dde7f8;
}

#main-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3ff;
  color: #223252;
  font-size: 0.77rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  font-weight: 700;
  border-top: 0;
  border-bottom-width: 2px;
  border-right-color: #cfdbf3;
  word-break: normal;
  overflow-wrap: normal;
}

#main-table thead th[data-col] {
  position: sticky;
  padding-right: 1.35rem;
}

#main-table thead th[data-col]:hover,
#main-table thead th[data-col]:focus-within {
  z-index: 4;
}

.table-col-resize-handle {
  position: absolute;
  top: 0;
  right: -0.8rem;
  width: 1.4rem;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: col-resize;
  z-index: 3;
}

.table-col-resize-handle::before {
  content: '';
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(95, 111, 150, 0.32);
  transition: background-color 120ms ease;
}

.table-col-resize-handle::after {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(157, 184, 235, 0.95);
  box-shadow: 0 6px 18px rgba(31, 42, 68, 0.12);
  color: #355a9e;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.table-col-resize-handle:hover::before,
.table-col-resize-handle:focus-visible::before,
#main-table thead th[data-col]:hover .table-col-resize-handle::before {
  background: rgba(53, 90, 158, 0.72);
}

.table-col-resize-handle:focus-visible {
  outline: none;
}

.table-col-resize-handle:hover::after,
.table-col-resize-handle:focus-visible::after,
#main-table thead th[data-col]:hover .table-col-resize-handle::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.03);
}

body.is-column-resizing {
  cursor: col-resize;
  user-select: none;
}

.table-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: 0.35rem;
  border: 1px solid #c9d4ef;
  border-radius: 999px;
  background: #f7faff;
  color: #5f6f96;
  vertical-align: middle;
}

.table-filter-trigger:hover,
.table-filter-trigger:focus-visible {
  color: #2f4f88;
  background: #e8f0ff;
  border-color: #9db8eb;
  outline: none;
}

.table-filter-trigger.is-filter-applied,
.table-filter-trigger.is-filter-open,
.table-filter-trigger[aria-expanded="true"] {
  color: #24467e;
  background: #dfeaff;
  border-color: #90ace0;
}

#main-table td {
  padding: 0.68rem 0.62rem;
}

#main-table tbody tr.selected > td {
  background: #dfeeff;
}

#main-table tbody tr:nth-child(odd):not(.hidden):not(.selected) > td {
  background: #f7faff;
}

#main-table tbody tr:nth-child(even):not(.hidden):not(.selected) > td {
  background: #ffffff;
}

#main-table tbody tr:hover:not(.hidden):not(.selected) > td {
  background: #edf4ff;
}

#main-table th:last-child,
#main-table td:last-child {
  border-right: 0;
}

.hidden {
  display: none;
}

#main-table th[data-col="date"],
#main-table td[data-col="date"] {
  text-align: center;
  width: 1%;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

#main-table th[data-col="title"],
#main-table td[data-col="title"] {
  text-align: left;
  min-width: 0;
}

#content-title-header {
  white-space: normal;
}

#content-title-header.is-featured-filter-active {
  background: #dbe9ff;
}

.featured-only-toggle {
  border: 1px solid #adc3ec;
  background: #f2f7ff;
  color: #52658f;
  border-radius: 999px;
  min-width: 1.55rem;
  height: 1.55rem;
  line-height: 1;
  padding: 0;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.featured-only-toggle.is-active {
  color: #2a4682;
  background: #e3edff;
  border-color: #8eaae1;
}

.featured-only-toggle:hover {
  color: #2a4682;
  border-color: #8eaae1;
  background: #e9f1ff;
}

.featured-only-toggle:focus-visible {
  outline: 2px solid #86a6e8;
  outline-offset: 2px;
}

#main-table td[data-col="title"] .table-title-link {
  color: #324d85;
  font-weight: 600;
  text-decoration: none;
}

#main-table td[data-col="title"] .table-title-link:hover,
#main-table td[data-col="title"] .table-title-link:focus-visible {
  text-decoration: underline;
}

.table-title-dropdown {
  display: block;
}

.table-title-main {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.table-title-main .badge-new,
.table-title-main .featured-row-star,
.table-title-link__caret {
  flex: 0 0 auto;
}

.table-title-main .badge-new {
  margin-left: 0;
}

.table-title-text {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.table-title-link--primary,
.table-title-link--menu {
  min-width: 0;
  max-width: 100%;
}

.table-title-link--menu {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.table-title-link__caret {
  font-size: 0.72em;
}

.featured-row-star {
  color: #2a4682;
  line-height: 1;
}

.badge-new {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2em 0.45em;
  border-radius: 0.75em;
  background: #007AC2;
  color: #fff;
  vertical-align: middle;
  margin-left: 0.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Subscribe dropdown ──────────────────────────────────────────────────── */

.subscribe-dropdown {
  min-width: 290px;
  max-width: 340px;
}

.subscribe-option__icon {
  font-size: 1.4rem;
  line-height: 1.2;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────── */

#main-table th[data-col="author"],
#main-table td[data-col="author"],
#main-table th[data-col="channel"],
#main-table td[data-col="channel"],
#main-table th[data-col="language"],
#main-table td[data-col="language"],
#main-table th[data-col="social"],
#main-table td[data-col="social"],
#main-table th[data-col="contributor"],
#main-table td[data-col="contributor"],
#main-table th[data-col="category"],
#main-table td[data-col="category"] {
  text-align: center;
}

#main-table th[data-col="topic"],
#main-table td[data-col="topic"] {
  text-align: center;
  min-width: 0;
}

#main-table th[data-col="social"],
#main-table td[data-col="social"] {
  width: 1%;
  min-width: 0;
  white-space: nowrap;
}

#main-table th[data-col="category"],
#main-table td[data-col="category"] {
  min-width: 0;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.social-link {
  text-decoration: none !important;
  font-size: 1rem;
  line-height: 1;
  color: #4b5c83;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 1.9em;
  min-width: 1.9em;
  min-height: 1.9em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, color 140ms ease;
}

.social-link--menu {
  background: transparent;
  padding: 0;
  position: relative;
}

.social-link:hover,
.social-link:focus-visible {
  color: #243a6c;
}

#main-table tbody tr:hover:not(.hidden):not(.selected) .social-link,
#main-table tbody tr:focus-within:not(.hidden):not(.selected) .social-link {
  filter: brightness(0.95);
}

.social-link--linkedin {
  color: #0a66c2;
}

.social-link--x {
  color: #111111;
}

.social-link--bluesky {
  color: #1185fe;
}

.social-link__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  padding: 0;
  border-radius: 999px;
  background: #d93025;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 0.56em;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
  position: absolute;
  top: -0.18em;
  right: -0.28em;
  pointer-events: none;
}

.social-link-menu {
  min-width: 11rem;
  font-size: 0.82rem;
}

.social-link-menu .dropdown-item {
  white-space: normal;
}

.table-title-menu {
  min-width: 12rem;
  max-width: min(22rem, calc(100vw - 2rem));
}

.table-title-menu .dropdown-header {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-title-menu .dropdown-item {
  white-space: normal;
}

.share-nudge {
  margin-top: 0.22rem;
  display: flex;
  align-items: flex-start;
  gap: 0.34rem;
  text-align: left;
  font-size: 0.74rem;
  line-height: 1.25;
  color: #415474;
}

.share-nudge__text {
  flex: 1;
}

.share-nudge__close {
  flex: 0 0 auto;
  border: 1px solid #bdd0f4;
  background: #f2f7ff;
  color: #2a3b5f;
  border-radius: 999px;
  width: 1.2rem;
  height: 1.2rem;
  line-height: 1;
  padding: 0;
  font-size: 0.9rem;
}

.share-nudge__close:hover,
.share-nudge__close:focus-visible {
  background: #e6efff;
  border-color: #9cb7ec;
}

#main-table tbody tr.share-nudge-active .social-link {
  animation: shareIconBounce 380ms ease-in-out 2;
}

@keyframes shareIconBounce {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-2px); }
  65% { transform: translateY(1px); }
}

.social-na {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #5f6f96;
  font-size: 0.86rem;
  font-weight: 600;
  background: #edf3ff;
  border: 1px solid #c9d4ef;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  border-bottom: 1px dotted #8b9dc8;
  cursor: help;
}

.social-na__icon {
  font-size: 0.8rem;
}

.share-view-feedback--floating {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 24;
  max-width: min(320px, calc(100vw - 2rem));
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #d9e1f2;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(31, 42, 68, 0.12);
}

.share-view-feedback--floating:empty {
  display: none;
}

.share-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.82rem 1rem;
  background: #0d6efd;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(13, 110, 253, 0.28);
}

.share-fab:hover,
.share-fab:focus-visible {
  background: #0a58ca;
  outline: none;
}

@media (max-width: 700px) {
  #main-table {
    min-width: max-content;
  }

  #main-table th[data-col="social"],
  #main-table td[data-col="social"] {
    min-width: max-content;
    position: sticky;
    right: 0;
    z-index: 3;
  }

  #main-table thead th[data-col="social"] {
    background: #e6efff;
    box-shadow: -2px 0 0 #dbe6fb;
  }

  #main-table tbody td[data-col="social"] {
    box-shadow: -2px 0 0 #edf3ff;
  }

  .table-skeleton {
    min-height: 340px;
    padding: 0.6rem;
  }

  .table-skeleton__row {
    height: 38px;
  }

  #main-table td {
    padding: 0.56rem 0.52rem;
    font-size: 0.9rem;
  }

  .social-link {
    width: 2.35em;
    height: 2.35em;
    min-width: 2.35em;
    min-height: 2.35em;
  }

  .social-link--menu {
    width: 2.35em;
    height: 2.35em;
  }

  .share-fab span {
    display: none;
  }

  .share-fab {
    width: 3.25rem;
    height: 3.25rem;
    justify-content: center;
    padding: 0;
  }
}

/* ── Trends tab ─────────────────────────────────────────────────────────────── */
.charts-note {
  margin: 0.75rem 0 1rem;
  font-size: 0.85rem;
  color: #6e6e6e;
}

.charts-index {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.6rem;
  border: 1px solid #d9e1f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
}

.charts-index__link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #c9d4ef;
  color: #2c3a5f;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f5f8ff;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.charts-index__link:hover,
.charts-index__link:focus-visible {
  background: #e9f1ff;
  border-color: #9eb8f2;
}

.charts-section {
  margin-bottom: 1.2rem;
}

.charts-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f6f96;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.chart-card {
  background: #fff;
  border: 1px solid #d9e1f2;
  border-radius: 10px;
  padding: 0.8rem 0.8rem 0.65rem;
  box-shadow: 0 4px 16px rgba(31, 42, 68, 0.08);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.chart-card:hover,
.chart-card:focus-visible {
  transform: translateY(-2px);
  border-color: #97b3ec;
  box-shadow: 0 10px 20px rgba(31, 42, 68, 0.12);
  outline: none;
}

.chart-card--wide {
  grid-column: auto;
}

.chart-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2c3a5f;
}

.chart-card__hint {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.72rem;
  color: #6d7ea8;
}

.chart-card canvas {
  width: 100% !important;
  height: 160px !important;
}

.chart-modal .modal-body {
  min-height: 360px;
}

.definitions-modal .modal-body {
  display: grid;
  gap: 1rem;
}

.definitions-section {
  border: 1px solid #dce5f8;
  border-radius: 0.6rem;
  padding: 0.8rem 0.9rem;
  background: #f8fbff;
}

.definitions-section__title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5f6f96;
}

.definitions-field-text,
.definitions-empty {
  margin: 0;
  color: #2c3a5f;
}

.definitions-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.definitions-list__item {
  display: grid;
  gap: 0.15rem;
  border-top: 1px solid #dce5f8;
  padding-top: 0.55rem;
}

.definitions-list__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.definitions-list__value {
  font-weight: 700;
  color: #2c3a5f;
}

.definitions-list__meaning {
  color: #40537f;
}

#chart-modal-canvas {
  width: 100% !important;
  height: min(70vh, 640px) !important;
}

/* ── Contributors tab ─────────────────────────────────────────────────────── */
.contributors-toolbar {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
  padding: 0.65rem;
  border: 1px solid #d9e1f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
}

.contributors-toolbar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  justify-self: start;
  gap: 0.45rem;
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  border: 1px solid #cdd8ee;
  border-radius: 999px;
  background: #fff;
  color: #24314f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.contributors-toolbar__toggle:hover,
.contributors-toolbar__toggle:focus-visible {
  border-color: #007ac2;
  background: #eef7ff;
  outline: none;
}

.contributors-toolbar__toggle-icon {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 150ms ease;
}

.contributors-toolbar.is-collapsed {
  gap: 0;
  width: max-content;
  max-width: 100%;
  padding: 0.35rem;
}

.contributors-toolbar.is-collapsed .contributors-toolbar__toggle-icon {
  transform: rotate(-45deg);
}

.contributors-toolbar__content {
  display: grid;
  gap: 0.55rem;
}

.contributors-toolbar__content[hidden] {
  display: none;
}

.contributors-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.contributors-chips--teams {
  padding-top: 0.55rem;
  border-top: 1px solid #dce5f8;
}

.contributors-chip {
  --chip-color: #007ac2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--chip-color), #fff 52%);
  border-radius: 999px;
  background: #fff;
  color: #24314f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.contributors-chip:hover,
.contributors-chip:focus-visible,
.contributors-chip.is-active {
  border-color: var(--chip-color);
  background: color-mix(in srgb, var(--chip-color), #fff 88%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip-color), transparent 78%);
  outline: none;
}

.contributors-chip__swatch {
  flex: 0 0 auto;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--chip-color);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.contributors-chip__label {
  min-width: 0;
}

.contributors-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip-color), #fff 82%);
  color: #1f2a44;
  font-size: 0.72rem;
  font-weight: 800;
}

.contributors-count {
  margin: 0 0 0.45rem;
  color: #24314f;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 96px));
  grid-auto-rows: 112px;
  justify-content: center;
  column-gap: 14px;
  row-gap: 6px;
  overflow: visible;
}

.contributors-group {
  display: contents;
}

.contributors-group__title {
  --group-color: #eef5ff;
  --group-text-color: #24314f;
  display: grid;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 0.18rem;
  margin: 0;
  min-width: 0;
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--group-color);
  border-radius: 8px;
  background: var(--group-color);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
  color: var(--group-text-color);
  overflow-wrap: anywhere;
}

.contributors-group__name {
  display: block;
  min-width: 0;
}

.contributors-group__stats {
  display: grid;
  justify-items: center;
  gap: 0.16rem;
  min-width: 0;
}

.contributors-group__total {
  display: block;
  color: var(--group-text-color);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.contributors-group__total::after {
  content: " contrib.";
  display: block;
  margin-top: 0.06rem;
  color: color-mix(in srgb, var(--group-text-color), transparent 14%);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.contributors-group__people {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-height: 1.05rem;
  padding: 0 0.36rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--group-text-color), transparent 86%);
  color: var(--group-text-color);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.contributors-group__people .fa-solid {
  color: currentColor;
  font-size: 0.62rem;
}

.contributors-group__grid {
  display: contents;
}

.contributor-card {
  --avatar-border-color: #007ac2;
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
  min-height: 112px;
  padding: 0.2rem 0.2rem;
  border-radius: 8px;
  color: #24314f;
  text-align: center;
  transition: background-color 150ms ease;
}

.contributor-card:hover {
  background: #f7faff;
}

.contributor-card__button {
  display: grid;
  grid-template-rows: 72px 1.9rem;
  justify-items: center;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.contributor-card__button:focus-visible {
  outline: none;
}

.contributor-card__button:focus-visible .contributor-card__avatar {
  box-shadow: 0 0 0 3px rgba(0, 122, 194, 0.22);
}

.contributor-card__avatar {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.contributor-card__avatar-img,
.contributor-card__avatar-fallback {
  width: 72px;
  height: 72px;
  border: 4px solid var(--avatar-border-color);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(31, 42, 68, 0.16);
}

.contributor-card__avatar-img {
  display: block;
  object-fit: cover;
  background: #eef3fb;
}

.contributor-card__avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3fb;
  color: #2c3a5f;
  font-size: 1.35rem;
  font-weight: 800;
}

.contributor-card__badge {
  position: absolute;
  right: -0.2rem;
  bottom: -0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.35rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #24314f;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(31, 42, 68, 0.18);
}

.contributor-card__name {
  max-width: 100%;
  height: 1.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.contributor-card__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 20;
  display: grid;
  gap: 0.15rem;
  width: max-content;
  max-width: 210px;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: #1f2a44;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: left;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.2rem);
  visibility: hidden;
}

.contributor-card__tooltip span {
  color: #d9e4ff;
}

.contributor-card__avatar:hover .contributor-card__tooltip,
.contributor-card__button:focus-visible .contributor-card__tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.contributor-card__menu {
  position: absolute;
  top: calc(100% - 0.1rem);
  left: 50%;
  z-index: 15;
  display: grid;
  gap: 0.25rem;
  width: min(180px, calc(100vw - 2rem));
  padding: 0.45rem;
  border: 1px solid #d9e1f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 42, 68, 0.18);
  transform: translateX(-50%);
}

.contributor-card__menu[hidden] {
  display: none;
}

.contributor-card__menu-link,
.contributor-card__menu-empty {
  display: block;
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border-radius: 6px;
  color: #24314f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
}

.contributor-card__menu-link:hover,
.contributor-card__menu-link:focus-visible {
  background: #eef5ff;
  color: #005e95;
  outline: none;
}

.contributor-card__menu-empty {
  color: #5f6f96;
}

.contributors-empty {
  margin: 1rem 0 0;
  color: #5f6f96;
  font-weight: 600;
}

#chart-section-volume,
#chart-section-breakdown,
#chart-section-topics,
#chart-overtime-card,
#chart-author-card,
#chart-type-card,
#chart-channel-card,
#chart-topic-card,
#chart-language-card {
  scroll-margin-top: 4.2rem;
}

@media (max-width: 700px) {
  .charts-index {
    top: 0.25rem;
    gap: 0.35rem;
    padding: 0.5rem;
  }

  .charts-index__link {
    min-height: 28px;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
  }

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

  .chart-card--wide {
    grid-column: 1;
  }

  .chart-card canvas {
    height: 180px !important;
  }

  .contributors-toolbar {
    top: 0.25rem;
    padding: 0.5rem;
  }

  .contributors-grid {
    grid-template-columns: repeat(auto-fill, minmax(82px, 90px));
    grid-auto-rows: 106px;
    column-gap: 12px;
    row-gap: 6px;
  }

  .contributor-card {
    min-height: 106px;
  }

  .contributor-card__button {
    grid-template-rows: 66px 1.9rem;
  }

  .contributor-card__avatar,
  .contributor-card__avatar-img,
  .contributor-card__avatar-fallback {
    width: 66px;
    height: 66px;
  }
}

/* ── Update toast ──────────────────────────────────────────────────────────── */
#update-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateX(0.75rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  background: #6b7280;
}

#update-toast[hidden] {
  display: none;
}

#update-toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#update-toast[data-type="checking"] { background: #6b7280; }
#update-toast[data-type="updating"]  { background: #2563eb; }
#update-toast[data-type="uptodate"]  { background: #059669; }

.update-toast__icon {
  display: inline-block;
  line-height: 1;
}

#update-toast[data-type="checking"] .update-toast__icon,
#update-toast[data-type="updating"] .update-toast__icon {
  animation: toast-spin 1s linear infinite;
}

.update-toast__close {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.65;
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  margin-left: 0.2rem;
}

.update-toast__close:hover {
  opacity: 1;
}

@keyframes toast-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Mobile filter button: hidden on desktop ──────────────────────────────── */
.mobile-filter-btn {
  display: none;
}

/* ── Mobile filters offcanvas styles ──────────────────────────────────────── */
.offcanvas.offcanvas-bottom.mobile-filters-offcanvas {
  border-radius: 1rem 1rem 0 0;
  height: 82vh !important;
}

.mobile-filters-offcanvas .offcanvas-body {
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 1rem);
}

/* ── Mobile feed layout (≤ 640px) ─────────────────────────────────────────── */
/*
 * Transforms the multi-column table into a 2-line feed list:
 *   Line 1: content title (full width, clickable)
 *   Line 2: date (left) · social share icons (right)
 * Desktop table is untouched — all changes are inside this media query.
 */
@media (max-width: 640px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* ── Filter button: visible on mobile ── */
  .mobile-filter-btn {
    display: inline-flex;
  }

  /* Stack filter slots vertically inside the offcanvas body */
  #mobile-filters-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  #mobile-filters-body .filter-field,
  #mobile-filters-body .date-range-filter {
    max-width: none;
    flex: 1 1 auto;
  }

  /* Force-show all filter slots regardless of column visibility state.
     applyColumnToggleState sets style="display:none" on the inner label/wrapper,
     so we need to override both the slot div and its direct child. */
  /* Force-show all filter slots regardless of column visibility state.
     applyColumnToggleState sets style="display:none" on the inner .filter-field label,
     so we need to override it here. */
  #mobile-filters-body > div > .filter-field {
    display: flex !important;
  }

  #mobile-filters-body > div > .date-range-filter {
    display: flex !important;
  }

  /* ── Override the 700px breakpoint that enables horizontal scroll ── */
  #main-table {
    min-width: unset;
    table-layout: auto;
  }

  #main-table th[data-col="social"],
  #main-table td[data-col="social"] {
    position: static;
    box-shadow: none;
    min-width: unset;
    white-space: normal;
  }

  /* ── Table → block list ── */
  #main-table,
  #main-table tbody {
    display: block;
    width: 100%;
  }

  #main-table thead {
    display: none;
  }

  /* Reset inline widths set by the column resizer JS */
  #main-table td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  /* Each row: 2-line grid (title full-width, then date + topic + social) */
  #main-table tbody tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.5rem;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #e2eaf8;
  }

  #main-table tbody tr.hidden {
    display: none;
  }

  /* Zebra / hover colors on the row itself instead of individual cells */
  #main-table tbody tr:nth-child(odd):not(.hidden):not(.selected) > td,
  #main-table tbody tr:nth-child(even):not(.hidden):not(.selected) > td {
    background: transparent;
  }

  #main-table tbody tr:nth-child(odd):not(.hidden) {
    background: #f7faff;
  }

  #main-table tbody tr:nth-child(even):not(.hidden) {
    background: #ffffff;
  }

  #main-table tbody tr:hover:not(.hidden) {
    background: #edf4ff;
  }

  #main-table tbody tr.selected {
    background: #dfeeff;
  }

  /* ── Title cell: row 1, full width ── */
  #main-table td[data-col="title"] {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0 0 0.35rem;
    text-align: left;
    border: none;
  }

  #main-table td[data-col="title"] .table-title-link {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  /* ── Date cell: row 2, col 1 ── */
  #main-table td[data-col="date"] {
    display: block;
    grid-column: 1;
    grid-row: 2;
    padding: 0;
    text-align: left;
    border: none;
    font-size: 0.78rem;
    color: #5f6f96;
    align-self: center;
    white-space: nowrap;
  }

  /* ── Author cell: row 2, col 2 (center, grows) ── */
  #main-table td[data-col="author"]::before {
    content: 'Published by: ';
    color: #8a9bbf;
  }

  #main-table td[data-col="author"] {
    display: block;
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    border: none;
    font-size: 0.72rem;
    color: #5f6f96;
    align-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
  }

  /* ── Social cell: row 2, col 3 ── */
  #main-table td[data-col="social"] {
    display: block;
    grid-column: 3;
    grid-row: 2;
    padding: 0;
    border: none;
    text-align: right;
    align-self: center;
  }

  /* Social icons: slightly smaller in the metadata row */
  #main-table td[data-col="social"] .social-link {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    font-size: 0.9rem;
  }

  /* ── Hide secondary columns ── */
  #main-table td[data-col="topic"],
  #main-table td[data-col="channel"],
  #main-table td[data-col="language"],
  #main-table td[data-col="contributor"],
  #main-table td[data-col="category"] {
    display: none;
  }

  /* ── Table container: cleaner flat look ── */
  .table-container {
    border-radius: 8px;
    overflow: hidden;
  }

  /* ── Col-picker irrelevant in feed layout — hide it ── */
  .col-picker-wrap {
    display: none;
  }

  /* ── Tighten the table shell header ── */
  .table-shell__header {
    padding: 0.25rem 0;
  }

  /* ── Subscribe dropdown: hide browser extension option on mobile ── */
  .subscribe-dropdown .subscribe-option:first-of-type,
  .subscribe-dropdown hr {
    display: none;
  }

  /* ── Hide share nudge ("Found this useful?") ── */
  .share-nudge {
    display: none;
  }

  /* ── Featured rows: left accent border ── */
  #main-table tbody tr[data-featured="1"] {
    border-left: 3px solid #2a4682;
    padding-left: calc(0.75rem - 3px);
  }

  /* ── Header: hide subtitle, make Subscribe icon-only ── */
  .header-row__subtitle {
    display: none;
  }

  .header-row h1 {
    font-size: 1.15rem;
  }

  .subscribe-btn__label {
    display: none;
  }

  #subscribe-btn {
    padding: 0.45rem 0.6rem;
  }
}
