
/*---------------------- GLOBAL ---------------------*/

  :root {
    --stat-gradient-entries: linear-gradient(to right, #ff9f43, #ffd166, #fff27d);
    --stat-gradient-linked: linear-gradient(to right, #5cff8d, #9dff8c, #d9ff97);
    --stat-gradient-unlinked: linear-gradient(to right, #ff7373, #ff9e7a, #ffd37f);
    --stat-gradient-na: linear-gradient(to right, #c39bff, #f0a8ff, #ffd4f4);
    --stat-gradient-updated: linear-gradient(to right, #7bc7ff, #87f0ff, #b6fff3);
    --guid-item-wash-linked: radial-gradient(circle at top left, rgba(92, 255, 141, 0.12), rgba(92, 255, 141, 0) 58%);
    --guid-item-wash-unlinked: radial-gradient(circle at top left, rgba(255, 115, 115, 0.12), rgba(255, 115, 115, 0) 58%);
    --guid-item-wash-na: radial-gradient(circle at top left, rgba(195, 155, 255, 0.13), rgba(195, 155, 255, 0) 58%);
  }

  main {
    padding: 2.4rem 1rem 3rem;
  }

/*---------------------- GLOBAL ---------------------*/



/*---------------------- STATS ----------------------*/

  .stats-panel {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .stat {
    --stat-gradient: var(--stat-gradient-entries);
    background: rgba(12, 12, 12, 0.72);
    border: 1px solid rgba(52, 52, 52, 0.72);
    border-radius: 0.85rem;
    padding: 0.9rem;
  }

  .stat-wide {
    min-width: 0;
  }

  .stat-label {
    color: #8c8c8c;
    display: block;
    font-size: 0.86rem;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .stat-value {
    color: transparent;
    display: block;
    font-size: 1.2rem;
    font-weight: 1000;
    line-height: 1.3;
    background: var(--stat-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-word;
  }

  .stat-entries {
    --stat-gradient: var(--stat-gradient-entries);
  }

  .stat-linked {
    --stat-gradient: var(--stat-gradient-linked);
  }

  .stat-unlinked {
    --stat-gradient: var(--stat-gradient-unlinked);
  }

  .stat-na {
    --stat-gradient: var(--stat-gradient-na);
  }

  .stat-updated {
    --stat-gradient: var(--stat-gradient-updated);
  }

/*---------------------- STATS ----------------------*/



/*---------------------- SEARCH ---------------------*/

  .controls-panel {
    display: grid;
    gap: 0.7rem;
  }

  .search-wrap {
    position: relative;
  }

  .search-label {
    color: #f1f1f1;
    font-size: 0.95rem;
    font-weight: 1000;
  }

  .search-input {
    width: 100%;
    background: rgba(12, 12, 12, 0.72);
    color: white;
    border: 1px solid rgba(52, 52, 52, 0.72);
    border-radius: 0.8rem;
    font: inherit;
    padding: 0.85rem 2.6rem 0.85rem 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }

  .search-input:focus {
    border-color: rgba(255, 166, 0, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 166, 0, 0.12);
  }

  .search-clear {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    display: none;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.15rem;
    transition: color 0.2s ease;
  }

  .search-wrap.has-value .search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .search-clear:hover {
    color: rgba(255, 255, 255, 0.72);
  }

  .search-clear:focus-visible {
    outline: 2px solid rgba(255, 166, 0, 0.65);
    outline-offset: 2px;
    border-radius: 0.3rem;
  }

  .filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .filter-label {
    color: #f1f1f1;
    font-size: 0.95rem;
    font-weight: 1000;
  }

  .filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .mode-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .mode-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .filter-button,
  .mode-button {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    background: rgba(12, 12, 12, 0.72);
    border: 1px solid rgba(52, 52, 52, 0.72);
    border-radius: 999px;
    color: #d0d0d0;
    cursor: pointer;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 1000;
    padding: 0.5rem 0.85rem;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .filter-count {
    color: #7a7a7a;
    font-size: 0.84em;
    font-weight: 700;
  }

  .filter-count-match {
    color: #e0b64a;
  }

  .filter-count-match-linked {
    color: #7aff8e;
  }

  .filter-count-match-unlinked {
    color: #ff9898;
  }

  .filter-count-match-na {
    color: #efbeff;
  }

  .filter-button:hover,
  .mode-button:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
  }

  .filter-button:hover .filter-count {
    color: #a7a7a7;
  }

  .filter-button.active,
  .mode-button.active {
    border-color: rgba(176, 176, 176, 0.7);
    color: #e9e9e9;
  }

  .filter-button.active .filter-count {
    color: rgba(255, 255, 255, 0.72);
  }

/*---------------------- SEARCH ---------------------*/



/*--------------------- COMPARE ---------------------*/

  .compare-callout-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    background: rgba(16, 16, 16, 0.66);
    border-color: rgba(58, 58, 58, 0.42);
  }

  .compare-callout-copy {
    display: grid;
    gap: 0.2rem;
  }

  .compare-callout-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    flex-shrink: 0;
  }

  .compare-callout-kicker {
    margin: 0;
    color: #f0f0f0;
    font-size: 0.95rem;
    font-weight: 1000;
  }

  .compare-callout-text {
    margin: 0;
    color: #a7a7a7;
    line-height: 1.45;
  }

  .compare-callout-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-shrink: 0;
    color: #d7d7d7;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 1000;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(52, 52, 52, 0.72);
    border-radius: 999px;
    background: rgba(12, 12, 12, 0.72);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  }

  .compare-callout-action:hover {
    border-color: rgba(255, 166, 0, 0.65);
    color: #ffffff;
    background: rgba(12, 12, 12, 0.72);
    transform: translateY(-1px);
  }

  .compare-callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
  }

  .compare-callout-icon img {
    display: block;
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
  }

/*--------------------- COMPARE ---------------------*/



/*----------------------- LIST ----------------------*/

  .guid-list,
  .history-list {
    display: grid;
    gap: 0.8rem;
    overflow-y: auto;
  }

  .guid-list {
    max-height: 44rem;
  }

  .guid-list.compact-mode {
    gap: 0.35rem;
  }

  .history-list {
    max-height: 22rem;
  }

  .guid-item,
  .history-item {
    border: 1px solid #1d1d1d;
    border-radius: 0.85rem;
    padding: 0.9rem;
  }

  .history-item {
    background: rgba(12, 12, 12, 0.72);
  }

  .guid-item {
    --guid-item-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0));
    background:
      var(--guid-item-wash),
      linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
      rgba(12, 12, 12, 0.72);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
  }

  .guid-order {
    color: #7f7f7f;
    font-size: 0.84rem;
    font-weight: 1000;
    line-height: 1;
    min-width: 2.2rem;
    text-align: center;
  }

  .guid-item-linked {
    --guid-item-wash: var(--guid-item-wash-linked);
    border-color: rgba(92, 255, 141, 0.12);
  }

  .guid-item-unlinked {
    --guid-item-wash: var(--guid-item-wash-unlinked);
    border-color: rgba(255, 115, 115, 0.12);
  }

  .guid-item-na {
    --guid-item-wash: var(--guid-item-wash-na);
    border-color: rgba(195, 155, 255, 0.14);
  }

  .guid-list.compact-mode .guid-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.6rem;
  }

  .guid-list.compact-mode .guid-order {
    font-size: 0.78rem;
    min-width: 1.9rem;
  }

  .guid-copy {
    min-width: 0;
  }

  .guid-list.compact-mode .guid-copy {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
  }

  .guid-name {
    color: white;
    font-size: 1rem;
    font-weight: 1000;
    margin: 0 0 0.35rem;
    overflow-wrap: anywhere;
  }

  .guid-title-link {
    color: inherit;
    text-decoration: none;
  }

  .guid-title-link:hover {
    color: #9ad5ff;
  }

  .guid-list.compact-mode .guid-name {
    font-size: 0.92rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .guid-url {
    color: #b1b1b1;
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .guid-list.compact-mode .guid-url {
    font-size: 0.82rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .guid-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .guid-list.compact-mode .guid-actions {
    align-items: center;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(58, 58, 58, 0.78);
    color: #d7d7d7;
    font-size: 0.76rem;
    font-weight: 1000;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.65rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: border-color 0.2s ease, color 0.2s ease;
  }

  .guid-list.compact-mode .status-pill {
    font-size: 0.68rem;
    padding: 0.28rem 0.5rem;
  }

  .status-pill.linked {
    border-color: rgba(0, 255, 76, 0.567);
    color: rgba(122, 255, 155, 0.927);
  }

  .status-pill.linked:hover {
    border-color: rgba(255, 166, 0, 0.95);
    color: #ffe6aa;
  }

  .status-pill.unlinked {
    border-color: rgba(255, 78, 78, 0.38);
    color: #ff9898;
  }

  .status-pill.na {
    border-color: rgba(220, 150, 255, 0.45);
    color: #efbeff;
  }

  .commit-link {
    color: transparent;
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-weight: 1000;
  }

  .entry-icon {
    width: 0.82rem;
    height: 0.82rem;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .commit-link:hover {
    background: linear-gradient(to right, #ffffff, #efefef, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
  }

  mark {
    background: rgba(255, 166, 0, 0.18);
    color: #fff5d6;
    border-radius: 0.25rem;
    padding: 0 0.08rem;
  }

/*----------------------- LIST ----------------------*/



/*---------------------- HISTORY --------------------*/

  .history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }

  .history-title {
    color: white;
    font-size: 1rem;
    font-weight: 1000;
    margin: 0 0 0.3rem;
  }

  .history-meta,
  .history-note {
    color: #9a9a9a;
    margin: 0;
    line-height: 1.5;
  }

  .change-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .change-tag {
    border-radius: 999px;
    border: 1px solid rgba(56, 56, 56, 0.78);
    color: #e3e3e3;
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
    white-space: nowrap;
  }

  .change-tag.added {
    color: #7aff8e;
  }

  .change-tag.updated {
    color: #9ad5ff;
  }

  .change-tag.removed {
    color: #ff8484;
  }

  .change-tag.more {
    color: #f3f3f3;
  }

/*---------------------- HISTORY --------------------*/



/*---------------------- MOBILE ---------------------*/

  @media (max-width: 900px) {
    .stats-panel {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .guid-item,
    .history-head {
      flex-direction: column;
      align-items: flex-start;
    }

    .guid-item {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.55rem;
    }

    .guid-order {
      min-width: 0;
      text-align: left;
    }

    .guid-actions {
      align-items: flex-start;
    }

    .guid-list.compact-mode .guid-item,
    .guid-list.compact-mode .guid-copy {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  @media (max-width: 640px) {
    main {
      padding: 1.2rem 0.75rem 2rem;
    }

    .compare-callout-panel {
      flex-direction: column;
      align-items: flex-start;
    }

    .compare-callout-actions {
      width: 100%;
      align-items: flex-start;
    }

    .stats-panel {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guid-list {
      max-height: none;
    }

    .history-list {
      max-height: none;
    }
  }

  @media (max-width: 420px) {
    .stats-panel {
      grid-template-columns: minmax(0, 1fr);
    }
  }

/*---------------------- MOBILE ---------------------*/