/*
 * Shared ordinary-table experiments.
 *
 * This file deliberately contains only opt-in component modifiers. A route
 * chooses a documented table capability through a class; it does not add a
 * page-local table rule or an inline style. Gate 63e.3 uses these modifiers
 * in a Local-only fixture before any production Admin route adopts them.
 */

/* Capability 1: a table may be wider than its available page surface. */
.admin-table-scroll--horizontal {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
}

/* A diagnostic table inside a modal may scroll without sticky headings. */
.admin-table-scroll--modal {
  max-height: min(480px, max(180px, calc(100vh - 300px)));
  overflow: auto;
}

.admin-operational-table--wide-tracks {
  width: 1088px;
  min-width: 1088px;
}

/* Opt-in content sizing: the source table contains both headings and rows,
 * so each track accounts for both. Long values wrap at a bounded width; the
 * surrounding surface owns any horizontal overflow. */
.admin-operational-table--content-sized {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}

.admin-operational-table--content-sized :is(th, td) {
  max-width: 280px;
  overflow-wrap: anywhere;
}

/* Identifiers must remain readable and copyable as one unbroken value. */
.admin-operational-table--content-sized .admin-table-column--identifier {
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
}

.admin-operational-table--content-sized :is(th, td):not(:last-child) {
  padding-right: 16px;
}

.admin-operational-table--content-sized thead th {
  white-space: normal;
}

.admin-operational-table--content-sized .admin-table-actions {
  width: auto;
}

/* Threaded records use the same source table and scrolling mechanics, while
 * reserving a readable conversation measure and a compact action column. */
.admin-operational-table--conversation {
  width: 100%;
  min-width: 680px;
  max-width: 962px;
  table-layout: fixed;
}
.admin-operational-table--conversation :is(th, td) { max-width: none; }
.admin-operational-table--conversation :is(th, td):last-child { width: 184px; }
.admin-operational-table--conversation tbody td { padding-top: 14px; padding-bottom: 14px; }
.admin-operational-table--conversation .discussion-table-row.is-action-menu-open { position: relative; z-index: 5; }

/* Chapter review overviews share the normal content-sized table and toolbar;
 * their icon/count columns stay compact and aligned with their headings. */
.draft-review-overview .draft-overview-summary { width: 100%; }
.admin-operational-table--draft-review :is(th, td):nth-child(n + 4) {
  text-align: center;
  white-space: nowrap;
}
.admin-operational-table--draft-review .draft-chapter-row { cursor: pointer; }
.admin-operational-table--draft-review .draft-chapter-row:hover > td { background: #fafafa; }

/* Paired chapter-review cards keep their shared tracks aligned with the
 * four-part decision heading while using the ordinary scrolling foundation. */
.admin-operational-table--chapter-comparison {
  min-width: 960px;
}
.admin-operational-table--chapter-comparison col:last-child { width: 300px; }
.admin-operational-table--chapter-comparison th,
.admin-operational-table--chapter-comparison td {
  padding-right: 18px;
  padding-left: 0;
}
.admin-operational-table--chapter-comparison th:last-child,
.admin-operational-table--chapter-comparison td:last-child { padding-right: 0; }
.admin-operational-table--chapter-comparison thead th { height: 34px; padding-top: 0; padding-bottom: 8px; }
.admin-operational-table--chapter-comparison tbody td { padding-top: 10px; padding-bottom: 10px; }
.admin-operational-table--chapter-comparison .admin-comparison-chapter td {
  padding-top: 32px;
  padding-bottom: 6px;
  color: #65708a;
  font: 600 13px/1.2 Helvetica,Arial,sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.admin-operational-table--chapter-comparison .admin-comparison-left-behind td {
  padding-top: 12px;
  padding-bottom: 8px;
  border-top: 2px solid #e4e4e9;
  border-bottom: 0;
  color: #914641;
  font: 600 13px/1.2 Helvetica,Arial,sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.admin-operational-table--chapter-comparison .admin-comparison-section-gap td {
  height: 32px;
  padding: 0;
  border: 0;
}
.admin-table-toolbar--chapter-comparison {
  margin-top: -10px;
  padding-top: 10px;
  padding-bottom: 40px;
}

/* Interactions and reading-progress comparisons use a narrower control area
 * than the four-slot sharing/feedback comparison. */
.admin-operational-table--chapter-comparison-compact { min-width: 860px; max-width: 1046px; }
.admin-operational-table--chapter-comparison-compact col:last-child { width: 210px; }
.admin-operational-table--chapter-comparison-compact .admin-comparison-chapter td {
  padding-top: 10px;
}

/* Import's chapter mapping uses the same toolbar and scrolling surface, with
 * its paired chapter columns and their existing compact status track. */
.admin-operational-table--chapter-mapping {
  table-layout: fixed;
}
.admin-operational-table--chapter-mapping col:nth-child(-n + 2) {
  width: 42%;
}
.admin-operational-table--chapter-mapping col:nth-child(3) {
  width: 16%;
}
.admin-operational-table--chapter-mapping thead th {
  height: auto;
  padding: 0 10px 8px;
}
.admin-operational-table--chapter-mapping thead th:nth-child(-n + 2) {
  padding-left: 22px;
}
.admin-operational-table--chapter-mapping > tbody > tr > td {
  padding-top: 16px;
  padding-bottom: 18px;
}
.admin-operational-table--chapter-mapping > tbody > tr:first-child > td {
  padding-top: 24px;
}

/* Opt-in details panels escape a table's clipped horizontal scrollport. */
[data-admin-table-popover] > [data-admin-table-popover-panel] {
  position: fixed;
  top: var(--admin-table-popover-top, 0px);
  left: var(--admin-table-popover-left, 0px);
  right: auto;
}

/* Menus must escape the horizontal viewport, including in its final row. */
.admin-operational-table--content-sized .admin-table-action-menu,
.admin-operational-table--content-sized .reader-actions > .action-menu {
  position: fixed;
  top: var(--admin-table-menu-top, 0px);
  left: var(--admin-table-menu-left, 0px);
  right: auto;
}

/* Stored-data details use the same escape from the horizontal viewport as
 * row menus, but retain the standard diagnostic panel's own appearance. */
.admin-operational-table--content-sized[data-admin-table-details] .block-details-panel {
  position: fixed !important;
  top: var(--admin-table-details-top, 0px) !important;
  left: var(--admin-table-details-left, 0px) !important;
  max-height: calc(100vh - 16px);
  overflow: auto;
}

/* The panel contains its own field table; the enclosing record table's
 * bounded column rules must not squeeze its relation column to one letter. */
.admin-operational-table--content-sized[data-admin-table-details] .block-details-panel :is(th, td) {
  max-width: none;
  overflow-wrap: normal;
}

/* A single compact row action needs only its control plus ordinary cell
 * padding. Wider split-action controls continue to use the existing
 * action-group token in the shared table foundation. */
.admin-operational-table col.admin-table-column--action-compact {
  width: 88px;
}

/* Capability 2: an ordinary table heading sticks at the Admin breadcrumb
 * boundary. The one-table fixture deliberately combines this with the
 * horizontal wrapper in a later stage, so browser behaviour is observed
 * rather than assumed. */
.admin-operational-table--sticky-header thead th {
  position: sticky;
  top: calc(var(--admin-table-sticky-top) + var(--admin-table-toolbar-height));
  z-index: 2;
}

/* Transitional opt-out used only while the fixture isolates one capability
 * at a time. Existing routes retain their current behaviour until their own
 * reviewed migration. */
.admin-operational-table--no-sticky-header thead th {
  position: static;
}

/* Capability 3: leading cells may remain visible within a horizontal table.
 * The stacked z-indexes make the top-left selection cell win where a sticky
 * header meets a sticky column. */
.admin-operational-table--sticky-leading :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--admin-table-sticky-cell-background, #fff);
}

.admin-operational-table--sticky-leading :is(th, td):nth-child(2) {
  position: sticky;
  left: var(--admin-floating-first-column-width, 48px);
  z-index: 1;
  background: var(--admin-table-sticky-cell-background, #fff);
}

.admin-operational-table--sticky-leading thead th:first-child,
.admin-operational-table--sticky-leading thead th:nth-child(2) {
  /* Leading header cells freeze left/right with the source table, but only
   * the shared floating mirror may freeze them vertically. This overrides
   * the legacy global heading `top` rule without creating a page exception. */
  top: auto;
  /* These titles must cover scrolling titles as well as body cells. */
  z-index: 5;
}

/* A wide matrix with a single identifying Reader column uses the same
 * horizontal contract without inventing a checkbox column or a permanent
 * divider. */
.admin-operational-table--sticky-reader td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--admin-table-sticky-cell-background, #fff);
}

/* A wide ordinary table may retain one identifying column.  It is a
 * declarative component capability: routes choose it in their renderer while
 * the shared table owns the frozen body cell, mirrored heading and depth cue. */
.admin-operational-table--sticky-first-column > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--admin-table-sticky-cell-background, #fff);
}

/* A frozen body cell covers its scrolling siblings. Routes which deliberately
 * make rows interactive set this variable on their exact hover/focus state;
 * ordinary non-interactive rows must remain visually unchanged. */

.admin-operational-table--notification-candidates .notification-row--email-included {
  --admin-table-sticky-cell-background: #eaf6eb;
}

.admin-operational-table--notification-candidates .notification-row--email-included:hover,
.admin-operational-table--notification-candidates .notification-row--email-included:focus-visible {
  --admin-table-sticky-cell-background: #e4f1e7;
}

.admin-operational-table--draft-review .draft-chapter-row:hover,
.admin-operational-table--analytics-progress tbody tr[data-admin-row-href]:focus-visible,
.admin-analytics-engagement-row:focus-visible,
.admin-operational-table--reader-engagement tbody tr:hover,
.admin-operational-table--reader-engagement tbody tr:focus-visible,
.admin-operational-table--reader-directory .reader-overview-row:hover,
.admin-operational-table--circle-directory .circle-row:hover,
.admin-operational-table--circle-members .circle-member-row:hover,
.admin-operational-table--bug-reports .bug-report-row:hover,
.admin-operational-table--access-requests .access-request-row:hover,
.notification-row:hover,
.notification-row:focus-visible,
.email-dry-run-row:hover,
.email-dry-run-row:focus-visible,
.notification-email-history-row:hover,
.notification-email-history-row:focus-visible,
.notification-email-sent-row:hover,
.notification-email-sent-row:focus-visible {
  --admin-table-sticky-cell-background: #fafafa;
}

.admin-operational-table--sticky-first-column thead th:first-child {
  top: auto;
  z-index: 1;
}

.admin-horizontal-table__header-table.admin-operational-table--sticky-reader thead th:first-child {
  position: relative;
  /* Cancel the ordinary-table sticky offset: the parent header is already the
   * sole vertical sticky layer. Leaving `top` in place offsets this leading
   * title by the breadcrumb height. */
  top: auto;
  /* The ordinary-table header baseline assigns each title z-index:4. This
   * frozen title must sit above those translated sibling titles. */
  z-index: 5;
  background: #fff;
  transform: translateX(var(--admin-horizontal-table-leading-offset, 0px));
}

/* The frozen-column boundary is deliberately quiet at rest. It appears only
 * after the horizontal owner has moved away from its left edge, where it gives
 * a small depth cue without becoming a visible divider. */
.admin-table-scroll--horizontal.is-admin-table-scrolled-x .admin-operational-table--sticky-leading:not([data-admin-floating-header]) :is(th, td):nth-child(2) {
  box-shadow: 5px 0 10px -10px rgb(37 37 48 / 42%);
}

/* Like the matrix component, horizontal tables use one continuous shadow
 * attached to the frozen heading edge. Per-cell shadows visibly break at
 * row boundaries, so they are intentionally not used here. */
.admin-horizontal-table.is-admin-table-scrolled-x .admin-horizontal-table__header-table.admin-operational-table--sticky-reader thead th:first-child::after {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 100%;
  width: var(--admin-table-sticky-shadow-width);
  height: 100vh;
  background: linear-gradient(90deg, var(--admin-table-sticky-shadow-color), transparent);
  content: "";
  pointer-events: none;
}

/* An opt-in visual mirror used only after a one-table header has crossed the
 * page sticky boundary. The source table remains the single real table; this
 * element is created immediately after the toolbar by the shared enhancer.
 * It reserves its header height, then cancels that space with the matching
 * negative margin, so it can stick without moving the real source table. */
.admin-table-floating-header {
  position: sticky;
  top: var(--admin-floating-table-top, 0px);
  /* This is below the shared toolbar but above the horizontally scrolling
   * source rows. Otherwise a wrapped source value can paint through the
   * mirror's lower edge while the page is moving. */
  z-index: 4;
  width: var(--admin-floating-table-width, 100%);
  height: var(--admin-floating-table-height, 0px);
  margin-bottom: calc(-1 * var(--admin-floating-table-height, 0px));
  overflow: hidden;
  isolation: isolate;
}

.admin-table-floating-header:not(.is-active) {
  visibility: hidden;
  pointer-events: none;
}

.admin-table-floating-header.is-active {
  background: #fff;
}

.admin-table-floating-header table {
  margin: 0 0 0 var(--admin-floating-table-offset, 0px);
}

.admin-table-floating-header .admin-operational-table thead th {
  position: static;
}

/* A floating-header table has exactly one sticky header: its shared mirror.
 * Keep the source header in normal document flow. Without this explicit
 * override, the older operational-table baseline can make the source header
 * sticky as well, which places it over a data row halfway down the table. */
.admin-operational-table[data-admin-floating-header] thead th,
.admin-table-scroll--horizontal > .admin-operational-table thead th {
  position: static;
  top: auto;
  z-index: auto;
}

/* The source heading stays horizontally frozen until the shared floating
 * mirror takes over at the page sticky boundary. */
.admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-first-column thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-leading thead th:first-child,
.admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-leading thead th:nth-child(2) {
  position: sticky;
  z-index: 1;
  background: #fff;
}

/* A transformed mirror table cannot use native `left: sticky` for its leading
 * heading cells, because the mirror itself is not a horizontal scroller. The
 * shared enhancer supplies the same scroll offset so these two visual cells
 * remain aligned with the source table's frozen checkbox and Reader columns. */
.admin-table-floating-header .admin-operational-table--sticky-leading thead th:first-child,
.admin-table-floating-header .admin-operational-table--sticky-leading thead th:nth-child(2) {
  position: relative;
  left: auto;
  z-index: 5;
  background: #fff;
  transform: translateX(var(--admin-floating-leading-offset, 0px));
}

.admin-table-floating-header .admin-operational-table--sticky-first-column thead th:first-child {
  position: relative;
  left: auto;
  z-index: 1;
  background: #fff;
  transform: translateX(var(--admin-floating-leading-offset, 0px));
}

/*
 * A wide frozen identity/date column makes a phone-sized horizontal table
 * harder to use than an unfrozen one. Compact screens therefore release all
 * ordinary leading columns. A first-column checkbox is the exception: it is
 * a compact selection control, so retain that one useful target without also
 * freezing the adjacent Reader/name column. `:has()` keeps this semantic rule
 * in the shared component rather than requiring route-specific classes.
 */
@media (max-width: 700px) {
  .admin-operational-table--sticky-first-column > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child,
  .admin-operational-table--sticky-reader td:first-child,
  .admin-operational-table--sticky-leading :is(th, td):first-child,
  .admin-operational-table--sticky-leading :is(th, td):nth-child(2),
  .admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-first-column thead th:first-child,
  .admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-leading thead th:first-child,
  .admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-leading thead th:nth-child(2) {
    position: static;
    left: auto;
    z-index: auto;
    background: inherit;
  }

  .admin-table-floating-header .admin-operational-table--sticky-first-column thead th:first-child,
  .admin-table-floating-header .admin-operational-table--sticky-leading thead th:first-child,
  .admin-table-floating-header .admin-operational-table--sticky-leading thead th:nth-child(2) {
    position: static;
    left: auto;
    z-index: auto;
    transform: none;
  }

  .admin-operational-table--sticky-first-column:has(thead th:first-child input[type="checkbox"]) > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child,
  .admin-operational-table--sticky-leading:has(thead th:first-child input[type="checkbox"]) :is(th, td):first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--admin-table-sticky-cell-background, #fff);
  }

  .admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-first-column:has(thead th:first-child input[type="checkbox"]) thead th:first-child,
  .admin-operational-table[data-admin-floating-header].admin-operational-table--sticky-leading:has(thead th:first-child input[type="checkbox"]) thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
  }

  .admin-table-floating-header .admin-operational-table--sticky-first-column:has(thead th:first-child input[type="checkbox"]) thead th:first-child,
  .admin-table-floating-header .admin-operational-table--sticky-leading:has(thead th:first-child input[type="checkbox"]) thead th:first-child {
    position: relative;
    left: auto;
    z-index: 1;
    background: #fff;
    transform: translateX(var(--admin-floating-leading-offset, 0px));
  }
}

/* This single component-owned layer follows the mirror in painting order, so
 * it also covers the floating heading, while remaining below the toolbar. It
 * is toggled only after horizontal movement. */
.admin-table-floating-leading-shadow {
  position: fixed;
  z-index: 4;
  display: none;
  width: var(--admin-table-sticky-shadow-width, 8px);
  height: var(--admin-floating-leading-shadow-height, 0);
  background: linear-gradient(90deg, var(--admin-table-sticky-shadow-color, rgb(37 37 48 / .032)), transparent);
  pointer-events: none;
}

.admin-table-floating-leading-shadow.is-active { display: block; }

/* Notification-channel table configurations. These are component variants:
 * routes name their record shape in markup, while all structural geometry,
 * heading treatment, row treatment, and scroll mechanics stay here. */
.admin-operational-table--notification-schedule:not(.admin-operational-table--content-sized) {
  width: 1040px !important;
  min-width: 1040px !important;
}

.admin-operational-table--notification-staged:not(.admin-operational-table--content-sized) {
  width: 1160px !important;
  min-width: 1160px !important;
}

.admin-operational-table--notification-sent:not(.admin-operational-table--content-sized) {
  width: 1170px !important;
  min-width: 1170px !important;
}

.admin-operational-table--notification-overview:not(.admin-operational-table--content-sized) {
  width: 1320px !important;
  min-width: 1320px !important;
}

.admin-operational-table--notification-inbox:not(.admin-operational-table--content-sized) {
  width: 1040px !important;
  min-width: 1040px !important;
}

.admin-operational-table--notification-candidates {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}

.admin-operational-table--notification-schedule td,
.admin-operational-table--notification-staged td,
.admin-operational-table--notification-sent td,
.admin-operational-table--notification-candidates td { vertical-align: top; }

.admin-operational-table--notification-schedule td:first-child,
.admin-operational-table--notification-staged td:first-child { overflow-wrap: anywhere; }

.admin-operational-table--notification-schedule td:nth-child(2) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-operational-table--notification-sent .notification-email-sent-subject,
.admin-operational-table--notification-candidates .notification-table-message { overflow-wrap: anywhere; }

.admin-operational-table--notification-candidates:not(.admin-operational-table--content-sized) .notification-table-message { max-width: 400px; }

/* Analytics Reading progress is a page-relative matrix: its shared header
 * layer is sticky to the Admin breadcrumb boundary, while only its body has
 * horizontal overflow. Compact metric tracks remain compact at wide widths. */
.admin-table-surface--analytics-progress { margin: 12px 0 18px; }
.admin-table-surface--analytics-progress .admin-analytics-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.admin-operational-table--analytics-progress col.analytics-percentage-column { width: 70px; }
.admin-operational-table--analytics-progress col.analytics-last-column { width: 64px; }
.admin-operational-table--analytics-progress col.analytics-chapter-column { width: 42px; }
.admin-operational-table--analytics-progress .admin-analytics-progress-percent,
.admin-operational-table--analytics-progress .admin-analytics-progress-last { color: #65708a; font-variant-numeric: tabular-nums; }
.admin-operational-table--analytics-progress .admin-analytics-progress-chapter { padding-right: 6px; padding-left: 6px; }
.admin-analytics-progress-dot { display: inline-block; width: 18px; height: 18px; border: 1px solid #cfd4dc; border-radius: 50%; vertical-align: middle; }
.admin-analytics-progress-dot.is-partial { border-color: #d6a62f; background: conic-gradient(#e5bd45 calc(var(--progress-ratio) * 1turn), #fff 0); }
.admin-analytics-progress-dot.is-complete { border-color: #63804f; background: #63804f; }
.admin-operational-table--analytics-progress tbody tr[data-admin-row-href] { cursor: pointer; }
.admin-operational-table--analytics-progress tbody tr[data-admin-row-href]:focus-visible > td { background: #f3f7f1; outline: 0; }

/* Analytics Engagement uses the same page-relative matrix mechanics as
 * Reading progress, with a compact Used summary followed by named measures. */
.admin-table-surface--analytics-engagement { margin: 12px 0 18px; }
.admin-table-surface--analytics-engagement .admin-analytics-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.admin-operational-table--analytics-engagement col.analytics-percentage-column { width: 70px; }
.admin-operational-table--analytics-engagement col.analytics-last-column { width: 64px; }
.admin-operational-table--analytics-engagement col.analytics-used-column { width: 60px; }
.admin-operational-table--analytics-engagement col.analytics-measure-column { width: 42px; }
.admin-operational-table--content-sized.admin-operational-table--compact-matrix :is(th, td) {
  padding: 14px 6px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.admin-operational-table--content-sized.admin-operational-table--compact-matrix :is(th, td):nth-child(2) {
  max-width: 280px;
  padding-left: 16px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.admin-operational-table--content-sized:is(.admin-operational-table--analytics-progress, .admin-operational-table--analytics-engagement) :is(th, td) {
  padding: 14px 6px;
  text-align: center;
  white-space: nowrap;
}
.admin-operational-table--content-sized:is(.admin-operational-table--analytics-progress, .admin-operational-table--analytics-engagement) :is(th, td):first-child {
  max-width: 280px;
  padding-left: 16px;
  text-align: left;
  white-space: normal;
}
.admin-operational-table--analytics-engagement .admin-analytics-progress-percent,
.admin-operational-table--analytics-engagement .admin-analytics-progress-last { color: #65708a; font-variant-numeric: tabular-nums; }
.analytics-tabs { display: flex; gap: 0; margin: 0 0 26px; border-bottom: 1px solid var(--admin-line); }
.analytics-tabs a { display: inline-flex; align-items: baseline; padding: 13px 22px; color: #252530; font-weight: 600; text-decoration: none; }
.analytics-tabs .is-active { position: relative; margin: 0 0 -1px; padding-top: 10px; border: 1px solid var(--admin-line); border-top: 3px solid var(--admin-green); }
.analytics-tabs .is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: #f6f6f6; content: ""; }
.analytics-picker { position: relative; display: inline-block; }
.analytics-picker[open] { z-index: 20; }
.analytics-picker summary { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; box-sizing: border-box; padding: 7px 10px; border: 1px solid #cfc4be; border-radius: 4px; background: #fff; color: #252530; cursor: pointer; font: 400 14px/1.2 Helvetica,Arial,sans-serif; list-style: none; white-space: nowrap; }
.analytics-picker summary::-webkit-details-marker { display: none; }
.analytics-picker-chevron { width: 14px; height: 14px; margin-left: 2px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; transition: transform .14s ease; }
.analytics-picker[open] .analytics-picker-chevron { transform: rotate(180deg); }
.analytics-picker summary:hover,.analytics-picker[open] summary { border-color: #aa9d97; }
.analytics-picker-panel { position: absolute; z-index: 21; top: calc(100% + 5px); left: 0; display: grid; min-width: 224px; width: max-content; max-width: min(420px,calc(100vw - 64px)); max-height: min(420px,calc(100vh - 180px)); overflow: auto; padding: 5px; border: 1px solid #cfc4be; border-radius: 4px; background: #fff; box-shadow: 0 6px 18px rgb(45 37 32 / .13); }
.analytics-picker-panel a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; box-sizing: border-box; width: 100%; padding: 8px 9px; border: 0; background: transparent; color: #252530; font: 400 14px/1.2 Helvetica,Arial,sans-serif; text-align: left; text-decoration: none; white-space: nowrap; }
.analytics-picker-panel a:hover,.analytics-picker-panel a:focus,.analytics-picker-panel a.is-active { background: #f3f1f0; outline: 0; }
.analytics-picker-panel a.is-active { color: #365f4a; }
.analytics-picker-count { color: #9b9693; font-size: 13px; text-align: right; }
.analytics-engagement-tooltip { position: relative; }
.analytics-engagement-tooltip::after { position: fixed; z-index: 100; top: var(--analytics-tooltip-top,0); left: var(--analytics-tooltip-left,0); display: none; max-width: min(220px,calc(100vw - 16px)); padding: 6px 8px; border-radius: 3px; background: #302d2b; color: #fff; content: attr(data-analytics-tooltip); font: 400 12px/1.3 Helvetica,Arial,sans-serif; letter-spacing: 0; text-align: left; text-transform: none; transform: translateX(-50%); white-space: normal; pointer-events: none; }
.analytics-engagement-tooltip[data-analytics-tooltip-position="above"]::after { transform: translate(-50%,-100%); }
.analytics-engagement-tooltip:hover::after,.analytics-engagement-tooltip:focus-visible::after { display: block; }
.admin-operational-table--analytics-engagement thead th.has-engagement-tooltip { z-index: 1000; }
.admin-analytics-engagement-row { cursor: pointer; }
.admin-analytics-engagement-row:focus-visible > td { background: #f3f7f1; outline: 0; }
.admin-analytics-engagement-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; color: #65708a; vertical-align: middle; }
.admin-analytics-engagement-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-analytics-engagement-icon img { display: block; width: 18px; height: 18px; object-fit: contain; }
.admin-analytics-engagement-icon svg .engagement-modal-fill { fill: currentColor; stroke: none; }
.admin-analytics-engagement-icon svg .engagement-modal-lines { fill: none; stroke: #fff; }
.admin-analytics-engagement-icon.is-modal { color: rgb(237 172 197); }
.admin-analytics-engagement-icon.is-reply { color: #5e9dca; }
.admin-analytics-engagement-icon.is-reply svg { fill: currentColor; stroke: none; }
.admin-analytics-engagement-icon.is-email svg { width: 14px; height: 14px; }

/* Reader-detail tables share the standard section tabs and a compact
 * engagement-history layout. The page supplies only its data and row target. */
.admin-reader-tabs { display: flex; gap: 0; margin: 0 0 26px; border-bottom: 1px solid var(--admin-line); }
.admin-reader-tabs a { display: inline-flex; padding: 13px 22px; color: #252530; font-weight: 600; text-decoration: none; }
.admin-reader-tabs a:hover,.admin-reader-tabs a:focus { color: #365f4a; outline: none; }
.admin-reader-tabs .is-active { position: relative; margin: 0 0 -1px; padding-top: 10px; border: 1px solid var(--admin-line); border-top: 3px solid var(--admin-green); background: transparent; color: #252530; }
.admin-reader-tabs .is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: #f6f6f6; content: ""; }

.admin-operational-table--reader-engagement col.admin-table-column--icon { width: 50px; }
.admin-operational-table--reader-engagement :is(th,td) { vertical-align: top; }
.admin-operational-table--reader-engagement tbody tr { cursor: pointer; }
.admin-operational-table--reader-engagement tbody tr:hover > td,.admin-operational-table--reader-engagement tbody tr:focus-visible > td { background: #fafafa; }
.admin-operational-table--reader-engagement tbody tr:focus-visible { outline: 0; }
.admin-reader-engagement-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; color: #65708a; vertical-align: middle; }
.admin-reader-engagement-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-reader-engagement-icon svg .engagement-modal-fill { fill: currentColor; stroke: none; }
.admin-reader-engagement-icon svg .engagement-modal-lines { fill: none; stroke: #fff; }
.admin-reader-engagement-icon img { display: block; width: 18px; height: 18px; object-fit: contain; }
.admin-reader-engagement-icon.is-modal { color: rgb(237 172 197); }
.admin-reader-engagement-icon.is-reply { color: #5e9dca; }
.admin-reader-engagement-icon.is-reply svg { fill: currentColor; stroke: none; }
.admin-reader-engagement-icon.is-email svg { width: 14px; height: 14px; }

/* The import report uses normal semantic tracks with contained, wrapping
 * values; skipped rows may include unusually long invalid input. */
.admin-operational-table--import-report td { overflow-wrap: anywhere; }

.admin-operational-table--invitation-email-history details { min-width: 130px; }
.admin-operational-table--invitation-email-history td:first-child { overflow-wrap: anywhere; }
.admin-operational-table--invitation-email-history summary { color: #252530; cursor: pointer; }
.admin-operational-table--invitation-email-history .admin-email-history-content { max-width: 620px; margin-top: 10px; padding: 12px; border-left: 3px solid #d5dde8; background: #f7f9fc; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.5 Helvetica,Arial,sans-serif; }
.admin-email-history-status { font-weight: 600; }
.admin-email-history-status.is-not-accepted { color: #a32626; }
.admin-operational-table--notification-candidates .notification-table-message-content { display: block; padding-bottom: 4px; line-height: 1.35; }
.admin-operational-table--notification-candidates .notification-row--email-included > td { background: #eaf6eb; }
.admin-operational-table--notification-candidates .notification-row--email-included:hover > td,
.admin-operational-table--notification-candidates .notification-row--email-included:focus-visible > td { background: #e4f1e7; }

/* Reader directory: a normal-width operational table. The route supplies
 * only reader records and existing actions; this variant owns the directory
 * column vocabulary, links, sorting controls, and row affordance. */
.admin-table-surface--reader-directory,
.admin-table-surface--circle-directory,
.admin-table-surface--circle-members,
.admin-table-surface--access-requests,
.admin-table-surface--bug-reports {
  /* A page heading or tab band needs its own clear boundary before the table
   * surface.  The complete surface then owns the same top and bottom inset,
   * whether it happens to contain a toolbar or only a table. */
  margin-top: 12px;
}

.admin-table-surface--reader-directory { padding: 24px; }
/* The directory has no frozen column: all columns move together. */
.admin-operational-table--reader-directory .reader-overview-row { cursor: pointer; }
.admin-operational-table--reader-directory .reader-overview-row:hover > td { background: #fafafa; }
.admin-operational-table--reader-directory a { color: #252530; text-decoration: none; }
.admin-operational-table--reader-directory a:hover,
.admin-operational-table--reader-directory a:focus { color: #365f4a; text-decoration: none; }
.admin-operational-table--reader-directory .display-name-fallback { font-style: italic; }
.admin-operational-table--reader-directory td:last-child,
.admin-operational-table--reader-directory th:last-child { text-align: right; }

/* Reading-circle directory: a compact ordinary table with the same shared
 * sortable headers, row route, and split-action component as other lists. */
.admin-table-surface--circle-directory { padding: 24px; }
.admin-operational-table--circle-directory td { overflow-wrap: anywhere; }
.admin-operational-table--circle-directory .circle-row { cursor: pointer; }
.admin-operational-table--circle-directory .circle-row:hover > td { background: #fafafa; }

/* Circle members reuse the Reader vocabulary but are scoped to one circle. */
.admin-table-surface--circle-members { padding: 24px; }
.admin-operational-table--circle-members td { overflow-wrap: anywhere; }
.admin-operational-table--circle-members .circle-member-row { cursor: pointer; }
.admin-operational-table--circle-members .circle-member-row:hover > td { background: #fafafa; }
.admin-operational-table--circle-members a { color: #252530; text-decoration: none; }
.admin-operational-table--circle-members a:hover,
.admin-operational-table--circle-members a:focus { color: #365f4a; text-decoration: none; }
.admin-operational-table--circle-members .display-name-fallback { font-style: italic; }

/* The site shell has a broad link colour. A sortable column label belongs to
 * the table heading and therefore keeps the shared muted heading colour. */
.admin-operational-table thead .admin-table-sort-link { color: #65708a; }

/* Bug reports are the widest ordinary operational table. Their contained
 * viewport uses the shared floating-heading enhancement. */
.admin-table-surface--bug-reports { padding: 24px; }
.admin-operational-table--bug-reports .bug-report-row { cursor: pointer; }
.admin-operational-table--bug-reports .bug-report-row:hover > td { background: #fafafa; }
.admin-operational-table--bug-reports .bug-report-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Access requests use the same sortable ordinary-table capabilities while
 * retaining their status-specific column set and existing invitation actions. */
.admin-table-surface--access-requests { padding: 24px; }
.admin-operational-table--access-requests .access-request-row { cursor: pointer; }
.admin-operational-table--access-requests .access-request-row:hover > td { background: #fafafa; }

.admin-operational-table--notification-overview:not(.admin-operational-table--content-sized) .notification-table-message { max-width: 680px; }
.admin-operational-table--notification-candidates .notification-table-message { line-height: 1.35; }
.notification-email-candidate-context { display: block; color: #4e79a5; }
.notification-email-candidate-context strong { font-weight: 700; }
.notification-email-candidate-excerpt { display: block; margin-top: 3px; }

.admin-operational-table--notification-inbox col.notification-time-column { width: 82px; }
.admin-operational-table--notification-inbox col.notification-date-column { width: 108px; }
.admin-operational-table--notification-inbox col.notification-circle-column { width: 140px; }
.admin-operational-table--notification-inbox col.notification-status-column { width: 134px; }
.admin-operational-table--notification-inbox col.notification-ripple-count-column { width: 72px; }
.admin-operational-table--notification-overview col.notification-time-column { width: 112px; }
.admin-operational-table--notification-overview col.notification-circle-column { width: 164px; }
.admin-operational-table--notification-overview col.notification-reader-column { width: 158px; }
.admin-operational-table--notification-overview col.notification-status-column { width: 134px; }
.admin-operational-table--notification-candidates col { width: auto !important; }
.admin-operational-table--notification-candidates col.notification-thread-column { width: 92px !important; }
.admin-operational-table--notification-candidates col.notification-target-column { width: 190px !important; }
.admin-operational-table--notification-candidates col.notification-type-column { width: 132px !important; }
.admin-operational-table--notification-candidates col.notification-actor-column { width: 160px !important; }
.admin-operational-table--notification-candidates col.notification-time-column { width: 112px !important; }
.admin-operational-table--notification-candidates col.notification-status-column { width: 134px !important; }

/* Notification email lists retain their distinct data columns, but their
 * table geometry belongs to the ordinary-table component.  The routes only
 * supply semantic table variants; they do not own sticky, viewport, or
 * column-layout mechanics. */
.admin-operational-table--notification-schedule:not(.admin-operational-table--content-sized) { width: 1040px; min-width: 1040px; }
.admin-operational-table--notification-schedule col.email-dry-run-circle-column { width: 17%; }
.admin-operational-table--notification-schedule col.email-dry-run-reader-column { width: 17%; }
.admin-operational-table--notification-schedule col.email-dry-run-schedule-column { width: 24%; }
.admin-operational-table--notification-schedule col.email-dry-run-count-column { width: 10%; }
.admin-operational-table--notification-schedule col.email-dry-run-next-column { width: 20%; }
.admin-operational-table--notification-schedule col.email-dry-run-action-column { width: 12%; }

.admin-operational-table--notification-staged:not(.admin-operational-table--content-sized) { width: 1160px; min-width: 1160px; }
.admin-operational-table--notification-staged col.history-circle { width: 15%; }
.admin-operational-table--notification-staged col.history-reader { width: 15%; }
.admin-operational-table--notification-staged col.history-staged { width: 14%; }
.admin-operational-table--notification-staged col.history-items { width: 7%; }
.admin-operational-table--notification-staged col.history-subject { width: 26%; }
.admin-operational-table--notification-staged col.history-scheduled { width: 14%; }
.admin-operational-table--notification-staged col.history-action { width: 9%; }

.admin-operational-table--notification-sent:not(.admin-operational-table--content-sized) { width: 1170px; min-width: 1170px; }
.admin-operational-table--notification-sent col.sent-circle { width: 14%; }
.admin-operational-table--notification-sent col.sent-reader { width: 14%; }
.admin-operational-table--notification-sent col.sent-staged,
.admin-operational-table--notification-sent col.sent-at { width: 13%; }
.admin-operational-table--notification-sent col.sent-status { width: 8%; }
.admin-operational-table--notification-sent col.sent-items { width: 6%; }
.admin-operational-table--notification-sent col.sent-subject { width: 25%; }
.admin-operational-table--notification-sent col.sent-action { width: 170px; }

.admin-operational-table--notification-schedule td,
.admin-operational-table--notification-staged td,
.admin-operational-table--notification-sent td { vertical-align: top; }
.admin-operational-table--notification-schedule td:first-child,
.admin-operational-table--notification-schedule .notification-email-history-subject,
.admin-operational-table--notification-staged .notification-email-history-subject,
.admin-operational-table--notification-sent .notification-email-sent-subject { overflow-wrap: anywhere; }

.notification-sort-link,
.email-dry-run-sort-link,
.history-sort-link,
.sent-sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }

.notification-sort-link:hover,
.notification-sort-link:focus,
.email-dry-run-sort-link:hover,
.email-dry-run-sort-link:focus,
.history-sort-link:hover,
.history-sort-link:focus,
.sent-sort-link:hover,
.sent-sort-link:focus { color: #365f4a; text-decoration: none; }

.notification-sort-arrow,
.email-dry-run-sort-arrow,
.history-sort-arrow,
.sent-sort-arrow { font-size: 14px; line-height: 1; }

.notification-detail-modal { width: min(760px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 6px; box-shadow: 0 12px 32px #0003; }
.notification-detail-modal::backdrop { background: #25253066; }
.notification-detail-modal .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px 16px; }
.notification-detail-modal .modal-head h2 { margin: 0; font-size: 24px; }
.ripple-dismiss-confirm-modal .modal-head h2 { margin: 0; font-size: 24px; }
.notification-detail-modal .modal-body { max-height: min(620px, calc(100vh - 180px)); padding: 0 28px 24px; overflow: auto; }
.notification-detail-modal .modal-detail-table { width: 100%; border-collapse: collapse; }
.notification-detail-modal .modal-detail-table th { width: 160px; padding: 10px 12px 10px 0; border-top: 1px solid #e4e4e9; color: #65708a; font-weight: 400; text-align: left; vertical-align: top; }
.notification-detail-modal .modal-detail-table td { padding: 10px 0; border-top: 1px solid #e4e4e9; white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: top; }
.notification-detail-modal.notification-history-modal { width: min(1400px, calc(100vw - 32px)); }
.notification-detail-modal .modal-detail-table tbody tr:last-child > * { border-bottom: 1px solid #e4e4e9; }
.notification-detail-modal .notification-detail-link { color: #365f4a; text-decoration: none; }
.notification-detail-modal .notification-detail-link:hover,
.notification-detail-modal .notification-detail-link:focus { color: #365f4a; text-decoration: none; }
.notification-detail-modal .modal-actions { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; }
.activity-detail-modal .modal-actions a.button-primary { display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; padding: 11px 16px; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; }
.activity-detail-modal .modal-actions a.button-primary:hover, .activity-detail-modal .modal-actions a.button-primary:focus { color: #fff; text-decoration: none; }
.notification-detail-modal [data-open-notification-reader] { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; border-radius: 5px; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.notification-detail-modal [data-open-notification-reader]:hover,
.notification-detail-modal [data-open-notification-reader]:focus { color: #fff; text-decoration: none; }
.notification-detail-modal [data-open-notification-reader][hidden],
.notification-detail-modal [data-ripple-sharing][hidden] { display: none; }
.notification-row,
.email-dry-run-row,
.notification-email-history-row,
.notification-email-sent-row { cursor: pointer; }
.email-dry-run-row > td[data-bulk-toggle],
.notification-email-history-row > td[data-bulk-toggle] { cursor: default; }
.notification-row:hover > td,
.notification-row:focus-visible > td,
.email-dry-run-row:hover > td,
.email-dry-run-row:focus-visible > td,
.notification-email-history-row:hover > td,
.notification-email-history-row:focus-visible > td,
.notification-email-sent-row:hover > td,
.notification-email-sent-row:focus-visible > td { background: #fafafa; }

/* Rows act as one click target in a few shared operational tables. A mouse
 * click should not leave the browser's default focus ring painted across the
 * row; keyboard focus retains the deliberate, quiet table-state treatment. */
.admin-operational-table tbody > tr[tabindex]:focus { outline: 0; }

.notification-status,
.notification-email-delivery-status { color: #65708a; font-size: 13px; }
