/* Shared online data tables. The identity, event and registration runtimes serve
   this same file. Opt in with classes; printed sheets and editing grids keep
   their own layout. Domain styles own column widths, alignment and reflow. */
.ui-table {
  --ui-table-radius: var(--radius-panel, 14px);
  --ui-table-inner-radius: calc(var(--ui-table-radius) - 1px);
  --ui-table-line: var(--line);
  --ui-table-paper: var(--paper);
  --ui-table-head: var(--table-head, var(--soft));
  --ui-table-row-bg: var(--ui-table-paper);
  --ui-table-hover: var(--hover, var(--soft));
  --ui-table-padding-block: 12px;
  --ui-table-padding-inline: 16px;
  --ui-table-font-size: 14px;
  min-width: 0; max-width: 100%;
  border: 1px solid var(--ui-table-line);
  border-radius: var(--ui-table-radius);
  corner-shape: var(--corner-shape, superellipse(1.5));
  background: var(--ui-table-paper);
  color: var(--ink);
}
.ui-table-compact {
  --ui-table-padding-block: 10px;
  --ui-table-padding-inline: 12px;
  --ui-table-font-size: 13px;
}
/* A table with two-dimensional information scrolls within its existing wrapper.
   Reflowing lists can override overflow while retaining the shared frame. */
.ui-table-scroll { overflow: auto; overscroll-behavior-inline: contain; }
.ui-table-scroll:focus-visible { outline: var(--focus-width, 2px) solid var(--focus); outline-offset: calc(-1 * var(--focus-width, 2px)); }
.ui-table-native {
  width: 100%; margin: 0; border-collapse: separate; border-spacing: 0;
  font-size: var(--ui-table-font-size); line-height: 1.6; text-align: left;
  font-variant-numeric: tabular-nums;
}
/* Low-specificity cell rules let domain-specific sticky columns, status colours
   and mobile card layouts override only the properties they need. */
.ui-table-native :where(th, td) {
  padding: var(--ui-table-padding-block) var(--ui-table-padding-inline);
  border: 0; border-bottom: 1px solid var(--ui-table-line);
  background: var(--ui-table-row-bg); text-align: inherit; vertical-align: middle;
  font-size: inherit;
  corner-shape: var(--corner-shape, superellipse(1.5));
}
.ui-table-native :where(thead th) {
  background: var(--ui-table-head); color: var(--muted);
  font-size: 13px; font-weight: 550;
}
.ui-table-native :where(tbody th) { font-weight: 600; }
.ui-table-native :where(caption) {
  padding: 12px var(--ui-table-padding-inline); text-align: left;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
@media (any-hover: hover) and (any-pointer: fine) {
  :where(:root:not([data-ui-hover="false"])) .ui-table-native :where(tbody tr:hover) { --ui-table-row-bg: var(--ui-table-hover); }
}
.ui-table-native :where(tbody:last-child > tr:last-child > *, tfoot:last-child > tr:last-child > *) { border-bottom: 0; }
.ui-table-native :where(thead tr:first-child > :first-child) { border-start-start-radius: var(--ui-table-inner-radius); }
.ui-table-native :where(thead tr:first-child > :last-child) { border-start-end-radius: var(--ui-table-inner-radius); }
.ui-table-native :where(tbody:last-child > tr:last-child > :first-child, tfoot:last-child > tr:last-child > :first-child) { border-end-start-radius: var(--ui-table-inner-radius); }
.ui-table-native :where(tbody:last-child > tr:last-child > :last-child, tfoot:last-child > tr:last-child > :last-child) { border-end-end-radius: var(--ui-table-inner-radius); }

/* A responsive object list uses the same frame, header and dividers. Its domain
   supplies grid columns and chooses when to show the column labels. No clipping
   is applied here, so keyboard focus and detached action menus remain visible. */
.ui-table-list-head {
  padding: 12px 16px; border-bottom: 1px solid var(--ui-table-line);
  border-radius: var(--ui-table-inner-radius) var(--ui-table-inner-radius) 0 0;
  corner-shape: var(--corner-shape, superellipse(1.5));
  background: var(--ui-table-head); color: var(--muted);
  font-size: 13px; font-weight: 550;
}
.ui-table-list-row {
  min-width: 0; padding: 8px 16px; min-height: 72px;
  border-bottom: 1px solid var(--ui-table-line); background: var(--ui-table-paper);
  corner-shape: var(--corner-shape, superellipse(1.5));
}
.ui-table > .ui-table-list-row:first-child {
  border-start-start-radius: var(--ui-table-inner-radius);
  border-start-end-radius: var(--ui-table-inner-radius);
}
@media (any-hover: hover) and (any-pointer: fine) {
  :where(:root:not([data-ui-hover="false"])) .ui-table-list-row:has(.ui-list-row-target):hover { background: var(--ui-table-hover); }
}
.ui-table-list-row:last-child {
  border-bottom: 0; border-end-start-radius: var(--ui-table-inner-radius); border-end-end-radius: var(--ui-table-inner-radius);
}

/* Object lists share the same surface as tables. Plain lists already sit in a
   panel; compact lists reduce spacing without reducing readable body text.
   Domain rules own columns, grouping and explicit selected/expanded states. */
.ui-list {
  --ui-list-radius: var(--radius-panel, 14px);
  --ui-list-inner-radius: calc(var(--ui-list-radius) - 1px);
  --ui-list-line: var(--line);
  --ui-list-paper: var(--paper);
  --ui-list-hover: var(--hover, var(--soft));
  --ui-list-padding-block: 12px;
  --ui-list-padding-inline: 16px;
  --ui-list-font-size: 14px;
  --ui-list-title-size: 16px;
  --ui-list-meta-size: 13px;
  min-width: 0; max-width: 100%; margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--ui-list-line); border-radius: var(--ui-list-radius);
  corner-shape: var(--corner-shape, superellipse(1.5));
  background: var(--ui-list-paper); color: var(--ink);
  font-size: var(--ui-list-font-size); line-height: 1.6;
}
.ui-list-compact { --ui-list-padding-block: 10px; --ui-list-padding-inline: 12px; }
.ui-list-plain {
  --ui-list-radius: 0px; --ui-list-inner-radius: 0px;
  border: 0; border-radius: 0; background: transparent;
}
.ui-list-row {
  min-width: 0; max-width: 100%; margin: 0;
  padding: var(--ui-list-padding-block) var(--ui-list-padding-inline);
  border: 0; border-bottom: 1px solid var(--ui-list-line);
  background: transparent; font-size: var(--ui-list-font-size); line-height: 1.6;
  corner-shape: var(--corner-shape, superellipse(1.5));
  overflow-wrap: anywhere;
}
.ui-list-row:first-child { border-start-start-radius: var(--ui-list-inner-radius); border-start-end-radius: var(--ui-list-inner-radius); }
.ui-list-row:last-child { border-bottom: 0; border-end-start-radius: var(--ui-list-inner-radius); border-end-end-radius: var(--ui-list-inner-radius); }
/* A row is a click target only when it says so, and only then does it take a hover background
   (guidelines §2 列表与工具栏): an <a>, <button> or <label> row, the summary of a <details> row, or a row
   whose main link or checkbox label carries .ui-list-row-target. That target then covers the whole row;
   the row's other links and buttons stay on top and keep their own action. Data tables keep their row
   highlight as a reading aid across columns. */
@media (any-hover: hover) and (any-pointer: fine) {
  :where(:root:not([data-ui-hover="false"])) :is(a, button, label).ui-list-row:hover,
  :where(:root:not([data-ui-hover="false"])) .ui-list-row:has(.ui-list-row-target):hover,
  :where(:root:not([data-ui-hover="false"])) details.ui-list-row > summary:hover { background: var(--ui-list-hover); }
}
:is(.ui-list-row, .ui-table-list-row):has(.ui-list-row-target) { position: relative; cursor: pointer; }
:is(.ui-list-row, .ui-table-list-row):has(.ui-list-row-target) .ui-list-row-target::after { content: ""; position: absolute; inset: 0; z-index: 0; }
:is(.ui-list-row, .ui-table-list-row):has(.ui-list-row-target) :is(a, button, input, select, textarea, summary, details, [tabindex]):not(.ui-list-row-target) { position: relative; z-index: 1; }
/* A link target shows focus once, as the row's inner ring; a checkbox target keeps the checkbox's own ring. */
:is(.ui-list-row, .ui-table-list-row):has(a.ui-list-row-target:focus-visible) { outline: var(--focus-width, 2px) solid var(--focus); outline-offset: calc(-1 * var(--focus-width, 2px)); }
:is(.ui-list-row, .ui-table-list-row):has(.ui-list-row-target) a.ui-list-row-target:focus-visible { outline: none; }
.ui-list-row:where(a, button, summary, label) { min-height: 44px; text-align: left; }
.ui-list-row:focus-visible { outline: var(--focus-width, 2px) solid var(--focus); outline-offset: calc(-1 * var(--focus-width, 2px)); }
.ui-list-title { min-width: 0; margin: 0; font-size: var(--ui-list-title-size, 16px); line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.ui-list-meta { margin: 0; color: var(--muted); font-size: var(--ui-list-meta-size, 13px); line-height: 1.6; overflow-wrap: anywhere; }
.ui-list-body { padding: var(--ui-list-padding-block) var(--ui-list-padding-inline); }

.ui-list-empty { margin: 0; padding: 24px var(--ui-list-padding-inline, 16px); color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }

/* Precision sheet table (.ui-table.is-sheet): lifted white sheet, hairline rows, quiet small headers. */
.ui-table.is-sheet {
  /* 单元格与列表行继承 --ui-table-paper，暗色模式下须与 --sheet 同步，避免 --paper 盖住浮起纸面。 */
  --ui-table-paper: var(--sheet, var(--paper));
  --ui-table-line: var(--line-soft);
  --ui-table-head: transparent;
  border: 0;
  background: var(--sheet, var(--paper));
  box-shadow: var(--shadow-sheet);
}
/* The same sheet for an object list (.ui-list.is-sheet), e.g. the published schedule. */
.ui-list.is-sheet {
  --ui-list-paper: var(--sheet, var(--paper));
  --ui-list-line: var(--line-soft);
  border: 0;
  background: var(--sheet, var(--paper));
  box-shadow: var(--shadow-sheet);
}
.ui-table.is-sheet .ui-table-native :where(thead th),
.ui-table.is-sheet .ui-table-list-head {
  color: var(--muted);
  font-size: var(--text-caption, 12px);
  font-weight: 500;
  letter-spacing: var(--tracking-label, .04em);
}
.ui-table-group,
.ui-table-native tr.ui-table-group > :where(th, td) {
  padding: 10px var(--ui-table-padding-inline, 16px);
  border-bottom: 1px solid var(--ui-table-line, var(--line-soft));
  background: var(--soft);
  color: var(--ink-2);
  font-size: var(--text-meta, 13px);
  font-weight: 650;
  letter-spacing: var(--tracking-label, .04em);
}
@media (forced-colors: active) {
  :is(.ui-table, .ui-list).is-sheet { border: 1px solid CanvasText; box-shadow: none; }
}
