.gn-rich-table,
.wp-block-table.gn-rich-table {
  --gn-table-border: color-mix(in srgb, var(--gn-color-border) 82%, #fff 8%);
  --gn-table-head: color-mix(in srgb, var(--gn-color-bg-tertiary) 88%, var(--gn-color-community) 12%);
  --gn-table-row: rgba(255,255,255,.018);
  --gn-table-row-alt: rgba(255,255,255,.038);
  position: relative;
  width: 100%;
  margin: var(--gn-space-xl) 0;
  border: 1px solid var(--gn-table-border);
  border-radius: var(--gn-radius-xl);
  background: linear-gradient(180deg, rgba(18,27,42,.8), rgba(7,12,20,.92));
  box-shadow: var(--gn-shadow-md);
  overflow: hidden;
}
.gn-rich-table__viewport,
.wp-block-table.gn-rich-table {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--gn-color-community) 55%, transparent) rgba(255,255,255,.04);
  -webkit-overflow-scrolling: touch;
}
.gn-rich-table__viewport:focus-visible,
.wp-block-table.gn-rich-table:focus-visible { outline: 3px solid color-mix(in srgb, var(--gn-color-community) 62%, #fff); outline-offset: 3px; }
.gn-rich-table__viewport::-webkit-scrollbar,
.wp-block-table.gn-rich-table::-webkit-scrollbar { height: 10px; }
.gn-rich-table__viewport::-webkit-scrollbar-track,
.wp-block-table.gn-rich-table::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }
.gn-rich-table__viewport::-webkit-scrollbar-thumb,
.wp-block-table.gn-rich-table::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--gn-color-community) 58%, transparent); background-clip: padding-box; }
.gn-rich-table table,
.wp-block-table.gn-rich-table table {
  width: 100%;
  min-width: 100%;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  color: var(--gn-color-text-secondary);
  background: transparent;
}
.gn-rich-table--min-640 table { min-width: 640px; }
.gn-rich-table--min-800 table { min-width: 800px; }
.gn-rich-table--min-960 table { min-width: 960px; }
.gn-rich-table--min-1200 table { min-width: 1200px; }
.gn-rich-table caption,
.wp-block-table.gn-rich-table caption {
  padding: 15px 18px;
  caption-side: top;
  color: var(--gn-color-text-primary);
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--gn-table-border);
  font-size: var(--gn-font-size-md);
  font-weight: var(--gn-font-weight-black);
  text-align: left;
}
.wp-block-table.gn-rich-table > figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--gn-table-border);
  color: var(--gn-color-text-muted);
  background: rgba(255,255,255,.02);
  font-size: var(--gn-font-size-sm);
  text-align: left;
}
.gn-rich-table th,
.gn-rich-table td,
.wp-block-table.gn-rich-table th,
.wp-block-table.gn-rich-table td {
  min-width: 130px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--gn-table-border);
  border-bottom: 1px solid var(--gn-table-border);
  vertical-align: top;
  text-align: left;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
}
.gn-rich-table tr > :last-child,
.wp-block-table.gn-rich-table tr > :last-child { border-right: 0; }
.gn-rich-table tbody tr:last-child > *,
.gn-rich-table tfoot tr:last-child > *,
.wp-block-table.gn-rich-table tr:last-child > * { border-bottom: 0; }
.gn-rich-table th,
.wp-block-table.gn-rich-table th {
  color: var(--gn-color-text-primary);
  background: var(--gn-table-head);
  font-size: var(--gn-font-size-sm);
  font-weight: var(--gn-font-weight-black);
  letter-spacing: .01em;
}
.gn-rich-table--sticky-header thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--gn-table-border); }
.gn-rich-table--striped tbody tr:nth-child(even) td { background: var(--gn-table-row-alt); }
.gn-rich-table tbody tr:hover td,
.wp-block-table.gn-rich-table tbody tr:hover td { background: color-mix(in srgb, var(--gn-color-community) 7%, var(--gn-color-bg-secondary)); }
.gn-rich-table--compact th,
.gn-rich-table--compact td { padding: 11px 13px; }
.gn-rich-table__cell--center { text-align: center !important; }
.gn-rich-table__cell--right { text-align: right !important; }
.gn-rich-table td > :first-child,
.gn-rich-table th > :first-child,
.wp-block-table.gn-rich-table td > :first-child,
.wp-block-table.gn-rich-table th > :first-child { margin-top: 0; }
.gn-rich-table td > :last-child,
.gn-rich-table th > :last-child,
.wp-block-table.gn-rich-table td > :last-child,
.wp-block-table.gn-rich-table th > :last-child { margin-bottom: 0; }
.gn-rich-table p,
.gn-rich-table ul,
.gn-rich-table ol,
.gn-rich-table figure { margin-block: 0 10px; }
.gn-rich-table ul,
.gn-rich-table ol { padding-left: 1.25em; }
.gn-rich-table li + li { margin-top: 5px; }
.gn-rich-table img { display: block; max-width: min(100%,280px); height: auto; border-radius: var(--gn-radius-md); }
.gn-rich-table .wp-block-image { width: fit-content; }
.gn-rich-table a { color: var(--gn-color-link); text-underline-offset: 3px; }
.gn-rich-table__scroll-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--gn-color-border-hover);
  border-radius: var(--gn-radius-pill);
  color: var(--gn-color-text-primary);
  background: rgba(7,12,20,.9);
  box-shadow: var(--gn-shadow-md);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  backdrop-filter: blur(10px);
}
.gn-rich-table__scroll-hint.is-left { right: auto; left: 12px; }
.gn-rich-table.is-overflowing::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(7,12,20,.72));
  opacity: 1;
  transition: opacity var(--gn-transition-fast);
}
.gn-rich-table.is-overflowing.is-at-end::after { opacity: 0; }
.gn-rich-table.is-overflowing:not(.is-at-start)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 34px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7,12,20,.72), transparent);
}
@media (max-width: 600px) {
  .gn-rich-table,
  .wp-block-table.gn-rich-table { margin-block: var(--gn-space-lg); border-radius: var(--gn-radius-lg); }
  .gn-rich-table th,
  .gn-rich-table td,
  .wp-block-table.gn-rich-table th,
  .wp-block-table.gn-rich-table td { min-width: 150px; padding: 13px 14px; }
  .gn-rich-table__scroll-hint { right: 8px; bottom: 8px; }
  .gn-rich-table__scroll-hint.is-left { left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .gn-rich-table * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.gn-rich-table__sticky-shell {
  position: fixed;
  /* Content overlay only: it must stay below the Guided header (z-index 50)
     so search, notifications and profile menus always remain clickable. */
  z-index: 40;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  border: 1px solid var(--gn-table-border);
  border-bottom: 0;
  border-radius: var(--gn-radius-xl) var(--gn-radius-xl) 0 0;
  background: var(--gn-table-head);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.gn-rich-table__sticky-shell[hidden] { display: none; }
.gn-rich-table__sticky-clip { width: 100%; height: 100%; overflow: hidden; box-sizing: border-box; }
.gn-rich-table__sticky-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  color: var(--gn-color-text-secondary);
  background: transparent;
  will-change: transform;
}
.gn-rich-table__sticky-table th,
.gn-rich-table__sticky-table td {
  box-sizing: border-box;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--gn-table-border);
  border-bottom: 1px solid var(--gn-table-border);
  color: var(--gn-color-text-primary);
  background: var(--gn-table-head);
  font-size: var(--gn-font-size-sm);
  font-weight: var(--gn-font-weight-black);
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
  overflow: hidden;
  text-overflow: clip;
}
.gn-rich-table__sticky-table tr > :last-child { border-right: 0; }
.gn-rich-table__sticky-shell.is-compact th,
.gn-rich-table__sticky-shell.is-compact td { padding: 11px 13px; }
@media (max-width: 600px) {
  .gn-rich-table__sticky-shell { border-radius: var(--gn-radius-lg) var(--gn-radius-lg) 0 0; }
  .gn-rich-table__sticky-table th,
  .gn-rich-table__sticky-table td { padding: 13px 14px; }
}
