@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/vendor/fonts/InterVariable.woff2?4.1") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/vendor/fonts/InterVariable-Italic.woff2?4.1") format("woff2");
}

:root {
  --bulma-family-primary: "Inter", sans-serif;

  /* Progress indicator colors */
  --progress-0: #c44536;
  --progress-low: #d4d4b6;
  --progress-medium: #7ec4b8;
  --progress-high: #3aaa9a;
  --progress-complete: #1a7f6d;

  /* Activity status colors */
  --activity-stale: #6b6b6b;
}

/* Site Header */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid #e9e9e9;
  padding: 1.25rem 0;
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.header-title a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #111;
  text-decoration: none;
}

.header-title a:hover {
  color: #333;
}

.header-logo {
  height: 2rem;
  width: auto;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.header-nav a {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

.header-nav a:hover {
  color: #111;
}

.external-arrow {
  font-size: 0.8em;
  opacity: 0.7;
}

.lock-icon {
  display: inline-block;
  height: 0.9em;
  width: 0.9em;
  margin-right: 0.3em;
  vertical-align: -0.1em;
  background-color: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
}

/* Sortable table headers */
.sortable-header {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sortable-header:hover {
  background-color: #f5f5f5;
}

.sortable-header::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  margin-left: 0.3em;
}

.sortable-header.is-active.sort-asc::after {
  content: "▲";
  font-size: 0.7em;
}

.sortable-header.is-active.sort-desc::after {
  content: "▼";
  font-size: 0.7em;
}

/* Clickable table rows */
.clickable-row {
  cursor: pointer;
}

/* Table container for horizontal scroll on mobile */
.table-container {
  overflow-x: auto;
}

/* Compact sortable tables */
.sortable-table {
  width: auto;
}

.sortable-table a {
  color: inherit;
}

.sortable-table a:hover {
  color: #3273dc;
}

.sortable-table td,
.sortable-table th {
  padding: 0.5em 0.75em;
}

.sortable-table td:not(:first-child),
.sortable-table th:not(:first-child) {
  text-align: center;
}

.sortable-table td:last-child,
.sortable-table th:last-child {
  text-align: left;
}

/* Header group row for column categories */
.header-group-row th {
  font-size: 0.85rem;
  font-weight: 600;
  color: #7a7a7a;
  padding-bottom: 0.25em;
  border-bottom: none;
}

.header-group-row + tr th {
  padding-top: 0.25em;
}

/* Column group separator */
.table.sortable-table th.group-start,
.table.sortable-table td.group-start {
  border-left: 1px solid #dbdbdb;
}

/* Activity status indicator */
.activity-status {
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
}

.activity-icon {
  margin-right: 0.25em;
}

.activity-icon.is-complete {
  color: var(--progress-complete);
}

.activity-icon.is-active {
  color: var(--progress-high);
}

.activity-icon.is-stale {
  color: var(--activity-stale);
}

/* Category navigation */
.category-nav .tabs ul {
  flex-wrap: nowrap;
}

.category-select {
  width: 100%;
}

.category-select select {
  width: 100%;
}

/* Managed badge */
.managed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #666;
  vertical-align: middle;
}

.managed-badge-icon {
  height: 1.1em;
  width: auto;
  vertical-align: middle;
}

.managed-badge-text {
  white-space: nowrap;
}

@media screen and (max-width: 768px) {
  .managed-badge-text {
    display: none;
  }
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
  .section {
    padding: 1.5rem 1rem;
  }

  .title.is-spaced {
    margin-bottom: 0.5rem !important;
  }

  .header-group-row th {
    font-size: 0.75rem;
  }

  .sortable-table {
    width: 100%;
  }

  .sortable-table td,
  .sortable-table th {
    padding: 0.4em 0.5em;
    font-size: 0.9rem;
  }

  .sortable-table .tag {
    font-size: 0.75rem;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }
}

.comment-row td,
.comment-row th {
  vertical-align: middle;
}

/* Comment content: show short on desktop, full on mobile */
.comment-content .full-content {
  display: none;
}

/* Mention styling */
.mention {
  background-color: var(--bulma-scheme-main-ter, #e8e8e8);
  padding: 0.1em 0.4em;
  border-radius: 0.5em;
}

.dismiss-button,
.assign-button {
  display: unset;
}

.comment-row.comment-dismissed .dismiss-button,
.comment-assigned .assign-button,
.copied-info {
  display: none;
}

.dismissed-status,
.undo-dismiss-button,
.unassign-button,
.comment-status-when-assigned,
.copied button {
  display: none;
}

.comment-row.comment-dismissed .dismissed-status,
.comment-row.comment-dismissed .undo-dismiss-button,
.comment-assigned .unassign-button,
.comment-assigned .comment-status-when-assigned,
.copied .copied-info {
  display: unset;
}

#comments-table tbody:nth-child(n + 3):before {
  content: "";
  display: block;
  height: 2ex;
}

#comments-table .comment-row:first-child td {
  border-top: hsl(0, 0%, 71%) 2px solid;
}

#comments-table .comment-row:last-child td {
  border-bottom: hsl(0, 0%, 71%) 2px solid;
}

.user-group-image {
  height: 1em;
  width: auto;
}

.comment-actions button {
  margin: 0.2em;
}

.share {
  background-image: url("/images/share-2.svg");
  background-size: contain;
}

.copied button {
  display: none !important;
}

.comment-actions {
  padding: 0.5em 0.75em !important;
  white-space: nowrap;
  text-align: left !important;
}

/* Make Undo same width as Dismiss */
.undo-dismiss-button,
.dismiss-button {
  width: 6em;
  text-align: center;
}

/* Make Assign same width as Unassign */
.assign-button,
.unassign-button {
  width: 6.5em;
  text-align: center;
}

.sortable-table .tag {
  min-width: 5.5em;
  justify-content: flex-end;
}

/* Ensure strong inherits color inside tags */
.tag strong {
  color: inherit;
}

/* Progress tag colors */
.tag.is-percent-0 {
  background-color: var(--progress-0);
  color: white;
}

.tag.is-percent-10,
.tag.is-percent-20,
.tag.is-percent-30,
.tag.is-percent-40 {
  background-color: var(--progress-low);
  color: black;
}

.tag.is-percent-50,
.tag.is-percent-60,
.tag.is-percent-70,
.tag.is-percent-80 {
  background-color: var(--progress-medium);
  color: black;
}

.tag.is-percent-90 {
  background-color: var(--progress-high);
  color: black;
}

.tag.is-percent-100 {
  background-color: var(--progress-complete);
  color: white;
}

/* Activity page styles */
.activity-stat-box {
  height: 100%;
}

.activity-stat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.activity-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-stat-icon svg {
  width: 28px;
  height: 28px;
}

/* Progress chart */
.chart-wrapper {
  height: 300px;
  position: relative;
}

/* Contributors table */
.contributors-table .rank-column {
  width: 3rem;
  text-align: center;
  vertical-align: middle;
}

.contributors-table .rank-column .user-group-image {
  display: block;
  margin: 0 auto;
  height: 1.25rem;
  width: auto;
}

.contributors-table .contributor-name {
  font-weight: 500;
}

.contributors-table .is-top-contributor {
  background-color: #fafafa;
}

/* Mobile: fixed table layout with truncated usernames */
@media screen and (max-width: 768px) {
  .contributors-table {
    table-layout: fixed;
  }

  .contributors-table .rank-column {
    width: 2.5rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .contributors-table .rank-badge {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }

  .contributors-table .contributor-name {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .contributors-table th:nth-child(3),
  .contributors-table td:nth-child(3) {
    width: 4.5rem;
  }

  /* Hide Approved column on mobile */
  .contributors-table th:nth-child(4),
  .contributors-table td:nth-child(4) {
    display: none;
  }
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
}

.rank-badge.is-gold {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #5c4813;
}

.rank-badge.is-silver {
  background: linear-gradient(135deg, #e8e8e8, #c0c0c0);
  color: #4a4a4a;
}

.rank-badge.is-bronze {
  background: linear-gradient(135deg, #deb887, #cd853f);
  color: #5c3d1e;
}

/* Stat tiles */
.stat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  min-width: 140px;
}

.stat-tile-icon {
  flex-shrink: 0;
  padding: 0.5rem;
  background: white;
  border-radius: 8px;
}

.stat-tile-icon svg {
  display: block;
}

.stat-tile-content {
  min-width: 0;
}

.stat-tile-value {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-tile-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #363636;
}

.stat-tile-hint {
  font-size: 0.75rem;
  color: #7a7a7a;
}

/* Progress tiles */
.progress-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.progress-tile {
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.progress-tile-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.progress-tile-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-tile-bar {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  align-items: center;
  gap: 0.5rem;
}

.progress-tile-label {
  font-size: 0.75rem;
  color: #7a7a7a;
}

.progress-tile-value {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
}

.progress-tile-meta {
  font-size: 0.75rem;
  color: #7a7a7a;
  margin-top: 0.75rem;
}

.progress-bar-track {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-fill.is-percent-0 {
  background-color: var(--progress-0);
}

.progress-bar-fill.is-percent-10,
.progress-bar-fill.is-percent-20,
.progress-bar-fill.is-percent-30,
.progress-bar-fill.is-percent-40 {
  background-color: var(--progress-low);
}

.progress-bar-fill.is-percent-50,
.progress-bar-fill.is-percent-60,
.progress-bar-fill.is-percent-70,
.progress-bar-fill.is-percent-80 {
  background-color: var(--progress-medium);
}

.progress-bar-fill.is-percent-90 {
  background-color: var(--progress-high);
}

.progress-bar-fill.is-percent-100 {
  background-color: var(--progress-complete);
}

/* Mobile adjustments for tiles */
@media screen and (max-width: 768px) {
  .stat-tiles {
    gap: 0.75rem;
  }

  .stat-tile {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
    padding: 0.75rem;
  }

  .stat-tile-icon {
    padding: 0.375rem;
  }

  .stat-tile-icon svg {
    width: 16px;
    height: 16px;
  }

  .stat-tile-value {
    font-size: 1.1rem;
  }

  .stat-tile-label {
    font-size: 0.8rem;
  }

  .progress-tiles {
    grid-template-columns: 1fr;
  }

  .progress-tile-bar {
    grid-template-columns: 65px 1fr 35px;
  }
}

/* Stale project indicator */
.project-row.is-stale {
  opacity: 0.7;
}

.project-row.is-stale:hover {
  opacity: 1;
}

/* Loading spinner */
.loader-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid #dbdbdb;
  border-top-color: #3273dc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Header - lighter background than page */
  .site-header {
    background-color: var(--bulma-scheme-main-ter);
    border-bottom-color: var(--bulma-border);
  }

  .header-title a {
    color: var(--bulma-text);
  }

  .header-title a:hover {
    color: var(--bulma-text-strong);
  }

  .header-nav a {
    color: var(--bulma-text-weak);
  }

  .header-nav a:hover {
    color: var(--bulma-text);
  }

  /* Tables */
  .sortable-table thead {
    background-color: var(--bulma-scheme-main-bis);
  }

  .sortable-header:hover {
    background-color: var(--bulma-scheme-main-ter);
  }

  .table.sortable-table th.group-start,
  .table.sortable-table td.group-start {
    border-left-color: var(--bulma-border);
  }

  .sortable-table a:hover {
    color: var(--bulma-link);
  }

  .header-group-row th {
    color: var(--bulma-text-weak);
  }

  /* Comments table */
  #comments-table .comment-row:first-child td {
    border-top-color: var(--bulma-border);
  }

  #comments-table .comment-row:last-child td {
    border-bottom-color: var(--bulma-border);
  }

  /* Managed badge */
  .managed-badge {
    color: var(--bulma-text-weak);
  }

  /* Contributors table */
  .contributors-table .is-top-contributor {
    background-color: var(--bulma-scheme-main-bis);
  }

  /* Loading spinner */
  .loader-spinner {
    border-color: var(--bulma-border);
    border-top-color: var(--bulma-link);
  }

  /* Stat tiles */
  .stat-tile {
    background-color: var(--bulma-scheme-main-bis);
  }

  .stat-tile-icon {
    background-color: var(--bulma-scheme-main-ter);
  }

  .stat-tile-label {
    color: var(--bulma-text);
  }

  .stat-tile-hint {
    color: var(--bulma-text-weak);
  }

  /* Progress tiles */
  .progress-tile {
    background-color: var(--bulma-scheme-main-bis);
  }

  .progress-tile-label,
  .progress-tile-meta {
    color: var(--bulma-text-weak);
  }

  .progress-bar-track {
    background-color: var(--bulma-scheme-main-ter);
  }

  /* Buttons - soften bright colors */
  .button.is-light {
    background-color: var(--bulma-scheme-main-ter);
    color: var(--bulma-text);
  }

  .button.is-light:hover {
    background-color: var(--bulma-scheme-main-bis);
  }

  .button.is-info {
    background-color: var(--bulma-info-soft);
    color: var(--bulma-info);
  }

  .button.is-info:hover {
    background-color: var(--bulma-info-soft);
    filter: brightness(1.1);
  }
}

/* Mobile card layout for comments */
@media screen and (max-width: 768px) {
  /* Hide table structure */
  #comments-table thead {
    display: none;
  }

  #comments-table,
  #comments-table tbody,
  #comments-table tr,
  #comments-table td {
    display: block;
  }

  #comments-table tbody {
    margin-bottom: 0.75rem;
  }

  /* Remove table borders */
  #comments-table.is-bordered td {
    border: none;
  }

  #comments-table .comment-row:first-child td {
    border-top: none;
  }

  #comments-table .comment-row:last-child td {
    border-bottom: none;
  }

  /* Card styling for each row */
  #comments-table .comment-row {
    background: var(--bulma-scheme-main, #fff);
    border: 1px solid var(--bulma-border, #dbdbdb);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    position: relative;
  }

  #comments-table .comment-row td {
    padding: 0.25rem 0;
  }

  /* Who & when - card header with icon inline */
  #comments-table .comment-row td:nth-child(1) {
    padding-bottom: 0.5rem;
    padding-right: 4rem; /* Space for type badge */
  }

  #comments-table .comment-row td:nth-child(1) .columns {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  #comments-table .comment-row td:nth-child(1) .column {
    padding: 0;
    flex: none;
    width: auto;
  }

  #comments-table .comment-row td:nth-child(1) .column.is-narrow {
    order: -1; /* Move icon before username */
  }

  #comments-table .comment-row td:nth-child(1) .user-group-image {
    height: 1.25rem;
    vertical-align: middle;
  }

  /* Type - inline badge with colors */
  #comments-table .comment-row td:nth-child(2) {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }

  #comments-table .comment-row td:nth-child(2) a {
    font-size: 0.75rem;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    text-decoration: none;
  }

  /* Comment type - blue */
  #comments-table .comment-type[data-type="comment"] a {
    background: var(--bulma-info-soft, #ebf5fb);
    color: var(--bulma-info, #3e8ed0);
  }

  /* Issue type - orange/warning */
  #comments-table .comment-type[data-type="issue"] a {
    background: var(--bulma-warning-soft, #fffaeb);
    color: var(--bulma-warning-dark, #946c00);
  }

  /* Text - show full content on mobile, hide short content */
  #comments-table .comment-row .comment-content {
    padding: 0.5rem 0;
  }

  #comments-table .comment-row .comment-content .short-content {
    display: none;
  }

  #comments-table .comment-row .comment-content .full-content {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Where - project and language on same line */
  #comments-table .comment-row td:nth-child(4) {
    color: var(--bulma-text-weak, #7a7a7a);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #comments-table .comment-row td:nth-child(4) br {
    display: none;
  }

  /* Status - subtle */
  #comments-table .comment-row td:nth-child(5) {
    color: var(--bulma-text-weak, #7a7a7a);
    font-size: 0.8rem;
    padding-bottom: 0.25rem;
  }

  /* Actions - margin above, no border */
  #comments-table .comment-row td:nth-child(6) {
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #comments-table .comment-actions {
    padding: 0 !important;
    text-align: left !important;
  }

  #comments-table .comment-actions button {
    margin: 0;
  }

  /* Remove spacing between grouped comments */
  #comments-table tbody:nth-child(n + 3):before {
    display: none;
  }

  /* Grouped comments - indent subsequent comments within the same group */
  #comments-table tbody .comment-row:not(:first-child) {
    margin-left: 1rem;
  }

  /* Filter layout - compact on mobile */
  .comment-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
  }

  .comment-filters > .column {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    padding: 0;
  }

  .comment-filters .label {
    display: none;
  }

  .comment-filters .select,
  .comment-filters select {
    width: 100%;
    font-size: 0.875rem;
  }

  .comment-filters .select:not(.is-multiple):not(.is-loading)::after {
    right: 0.75em;
  }

  /* Buttons row - full width */
  .comment-filters > .column:last-child {
    flex: 1 1 100%;
    display: flex;
    gap: 0.5rem;
  }

  .comment-filters > .column:last-child .button {
    flex: 1;
    font-size: 0.875rem;
  }
}
