*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 920px; margin: 0 auto; padding: 1.5rem;
  color: #1a1a1a; background: #fafafa;
  font-size: 15px; line-height: 1.6;
}

/* header */
header { position: relative; margin-bottom: .75rem; }
header h1 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 3rem; font-weight: 900;
}
.subtitle {
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem; color: #555; margin-top: .15rem;
}

.gh-link {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; gap: .35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: .85rem; color: #555;
}
.gh-link:hover { color: #0969da; text-decoration: none; }

/* nav tabs */
nav { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 2px solid #e5e7eb; }
.tab {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: .45rem 1rem; font-size: .9rem; cursor: pointer;
  border: none; background: none; color: #555;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab.active { color: #0969da; border-bottom-color: #0969da; font-weight: 700; }

/* filters */
#stats {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .85rem; color: #555; margin-bottom: .5rem;
}
.filters {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex; gap: 1rem; margin-bottom: .75rem; font-size: .85rem; color: #555;
}
.filters label { display: flex; align-items: center; gap: .3rem; cursor: pointer; }

/* links */
a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }

/* status badges */
.badge {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .85rem; padding: .15rem .5rem; border-radius: 10px;
  font-weight: 500; white-space: nowrap;
}
.badge-tp {
  color: #15803d;
  position: relative;
  padding-left: 1.4rem;
}

.badge-tp::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: .95rem;
  height: .95rem;
  background-color: #15803d;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.4-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.4-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
}

.badge-notp {
  padding-left: 1.4rem;
}
.badge-notp { color: #b91c1c; }
.badge-unk { color: #a16207; }
.tk { color: #065f46; font-weight: 700; font-size: .9rem; }

/* package names in table */
.gridjs-td:nth-child(2) {
  font-family: "Inconsolata", monospace;
  font-weight: 500;
}

.gridjs-td {
  padding: 6px 24px !important;
}

.gridjs-td:first-child,
.gridjs-th:first-child {
  min-width: 100px;
  text-align: right;
}

/* detail panel */
#detail { margin-top: 1rem; }
#detail h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem;
}
.issue {
  display: flex; gap: .5rem; align-items: center;
  padding: .3rem 0; font-size: .9rem;
}
.issue .st {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .75rem; padding: .1rem .4rem; border-radius: 3px; font-weight: 600;
}
.st-OPEN, .st-open { background: #d1fae5; color: #065f46; }
.st-CLOSED, .st-closed { background: #e5e7eb; color: #374151; }
.kw { font-size: .75rem; color: #6b7280; font-style: italic; }

/* resources */
.res-section { margin-bottom: 1.5rem; }
.res-section h2 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 1.6rem; font-weight: 700; margin-bottom: .2rem; color: #333;
}
.res-item {
  padding: .4rem 0; font-size: .9rem;
  border-bottom: 1px solid #f0f0f0;
}
.res-item:last-child { border-bottom: none; }
.res-tag {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .7rem; padding: .1rem .35rem; border-radius: 3px;
  background: #e5e7eb; color: #374151; margin-left: .4rem;
}
.res-desc { font-size: .8rem; color: #666; margin-top: .15rem; }

footer {
  margin-top: 2rem; padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  font-family: "Space Grotesk", sans-serif;
  font-size: .8rem; color: #888;
  text-align: center;
}
.credits { margin-bottom: .35rem; }
.credits a { color: #888; text-decoration: underline; }
.credits a:hover { color: #0969da; }

/* auth */
#auth {
  position: absolute; top: 8px; right: 10px;
}
.gh-link {
  position: absolute; top: 10px; left: auto; right: auto;
  top: 40px; right: 10px;
}
.auth-btn {
  font-family: "Space Grotesk", sans-serif;
  font-size: .8rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .8rem; border-radius: 6px;
  border: 1px solid #d0d7de; background: #f6f8fa;
  color: #24292f; cursor: pointer;
  transition: background .15s;
}
.auth-btn:hover { background: #eaeef2; }
.auth-btn-small { font-size: .75rem; padding: .25rem .55rem; }
.auth-user {
  display: flex; align-items: center; gap: .45rem;
}
.auth-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid #d0d7de;
}
.auth-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: .8rem; font-weight: 500; color: #24292f;
}

/* track section */
.track-section {
  margin-bottom: .75rem;
}
.track-section form {
  display: flex; gap: .5rem;
}
.track-section input[type="text"] {
  flex: 1; padding: .4rem .6rem; font-size: .85rem;
  border: 1px solid #d0d7de; border-radius: 5px;
  font-family: "Inconsolata", monospace;
}
.track-section input[type="text"]:focus {
  outline: 2px solid #0969da; border-color: transparent;
}
#track-result {
  margin-top: .5rem; font-size: .85rem;
}
#track-result .kw {
  font-size: .75rem; color: #6b7280; font-style: italic;
}
