:root {
  color-scheme: light dark;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  color: #e5e7ef;
  background: #232429;
  --panel: #2c2d34;
  --muted: #aeb1bf;
  --header: #32343d;
  --hover: #363843;
  --link: #88baff;
  --badge: #42487b;
  --badge-text: #e0e4ff;
  --border: #80859460;
  --uat: #8bdda1;
  --control-height: 34px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
main {
  height: 100dvh;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  padding: max(14px, env(safe-area-inset-top), var(--discord-safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right), var(--discord-safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom), var(--discord-safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left), var(--discord-safe-area-inset-left, 0px));
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.refresh-group {
  display: flex;
  flex-shrink: 0;
  margin-left: auto;
  align-items: center;
  gap: 10px;
}
.title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
#result-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.header-action {
  padding: 4px 8px;
  font-size: 12px;
}
.icon-button {
  width: var(--control-height);
  padding: 3px;
  font-size: 16px;
  line-height: 1;
}
#active-filter-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 3px;
  border-radius: 50%;
  background: #5865f2;
  box-shadow: 0 0 0 2px color-mix(in srgb, #5865f2 25%, transparent);
}
.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 700;
}
h1 {
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 0;
}
button,
input,
summary {
  font: inherit;
}
button,
summary,
input[type="search"] {
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
}
button,
summary {
  cursor: pointer;
  height: var(--control-height);
  min-height: var(--control-height);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:hover:not(:disabled),
summary:hover {
  background: var(--hover);
}
input[type="checkbox"] {
  accent-color: #7282f8;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.controls,
#filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.controls {
  margin-top: 14px;
}
.filter summary {
  white-space: nowrap;
  list-style: none;
  font-size: 12px;
}
.filter summary::-webkit-details-marker {
  display: none;
}
.filter summary::after {
  content: "⌄";
  padding-left: 8px;
  color: var(--muted);
}
.filter[open] summary {
  border-color: #8591ff;
  background: var(--hover);
}
.filter-options {
  position: fixed;
  z-index: 10;
  width: min(300px, calc(100vw - 24px));
  overflow-y: auto;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px #0004;
  overscroll-behavior: contain;
}
.filter-options label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
}
.filter-options label:hover {
  background: var(--hover);
}
.filter-options input[type="search"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 14px;
}
.filter-options small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 4px;
}
.column-option {
  display: flex;
  align-items: center;
  gap: 2px;
}
.column-option label {
  flex: 1;
}
.column-option button {
  min-width: 32px;
  padding: 3px;
}
.drag-handle {
  touch-action: none;
  cursor: grab;
  padding: 8px 5px;
  color: var(--muted);
  user-select: none;
}
.dragging {
  background: var(--hover);
  outline: 1px dashed var(--link);
}
#active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 80px;
  overflow: auto;
  flex-shrink: 0;
}
#active-filters:not(:empty) {
  margin-top: 8px;
}
.filter-chip {
  font-size: 11px;
  background: var(--badge);
  color: var(--badge-text);
}
.uat-chip {
  display: inline-flex;
  border: 1px solid var(--uat);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--uat);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}
.collection-warning {
  display: inline-block;
  cursor: help;
}
.collection-warning:focus-visible,
#collection-feedback:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}
#reset {
  font-size: 12px;
}
#status {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  max-width: 240px;
}
#status.error {
  color: #ee9696;
}
.table-scroll {
  flex: 1;
  min-height: 100px;
  margin-top: 10px;
  overflow: auto;
  background: var(--panel);
  border-radius: 8px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  font-size: 13px;
}
th,
td {
  text-align: left;
  white-space: nowrap;
  padding: 3px 8px;
  height: 30px;
  vertical-align: middle;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--header);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: grab;
}
thead button {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: inherit;
}
thead button span {
  color: var(--link);
  margin-left: 3px;
}
tr.pr:hover {
  background: var(--hover);
}
td.age {
  color: var(--muted);
}
td.age,
td.round {
  font-variant-numeric: tabular-nums;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
td a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.author {
  color: var(--badge-text);
  background: var(--badge);
  border-radius: 4px;
  padding: 1px 5px;
}
.state {
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px 7px;
}
.state.ready {
  color: #9fe4b5;
  border-color: #579c7166;
}
.state.draft {
  color: var(--muted);
}
.empty {
  color: var(--muted);
  padding: 20px 12px;
  white-space: normal;
}
#ticket-tooltip {
  white-space: pre-line;
  position: fixed;
  z-index: 20;
  width: max-content;
  max-width: min(480px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--header);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 5px 20px #0004;
}
.argos-status {
  cursor: help;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
:focus-visible {
  outline: 2px solid #8591ff;
  outline-offset: 2px;
}
@media (pointer: coarse) {
  :root {
    --control-height: 44px;
  }
  .filter-options label {
    min-height: 44px;
  }
  .column-option button {
    min-width: 40px;
  }
  .drag-handle {
    padding: 12px 7px;
  }
  td {
    height: 36px;
  }
  td a {
    min-height: 30px;
  }
}
@media (max-width: 480px) {
  .toolbar > div:first-child,
  .title-line {
    max-width: 100%;
  }
  .title-line {
    flex-wrap: wrap;
    white-space: normal;
  }
  h1 {
    font-size: 20px;
  }
  .controls {
    margin-top: 10px;
  }
  .refresh-group {
    gap: 6px;
  }
  #status {
    max-width: 92px;
  }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --uat: #18743a;
    color: #30323b;
    background: #f5f6fa;
    --panel: #fff;
    --muted: #676b79;
    --header: #ebeef5;
    --hover: #f1f3fc;
    --link: #1769bd;
    --badge: #e4e7ff;
    --badge-text: #424aa2;
  }
  :root:not([data-theme]) #status.error {
    color: #b12636;
  }
  :root:not([data-theme]) .state.ready {
    color: #246d3c;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --uat: #18743a;
  color: #30323b;
  background: #f5f6fa;
  --panel: #fff;
  --muted: #676b79;
  --header: #ebeef5;
  --hover: #f1f3fc;
  --link: #1769bd;
  --badge: #e4e7ff;
  --badge-text: #424aa2;
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="light"] #status.error {
  color: #b12636;
}
:root[data-theme="light"] .state.ready {
  color: #246d3c;
}
